From: Andrea Bianco Date: Wed, 30 Mar 2016 10:00:24 +0000 (+0200) Subject: Built motion from commit 8bea19c.|0.0.70 X-Git-Tag: 20/10/16~314 X-Git-Url: http://repos.xcallymotion.com/base/%22angular-material.themes.css/%22javascript:;/%22avatar.png//%22https:?a=commitdiff_plain;h=22512939897f27e73e1b461fdcf17459f4579500;p=motion.git Built motion from commit 8bea19c.|0.0.70 --- diff --git a/public/app/8f31380f.app.js b/public/app/3a8f10a9.app.js similarity index 67% rename from public/app/8f31380f.app.js rename to public/app/3a8f10a9.app.js index a502552..0654d4b 100644 --- a/public/app/8f31380f.app.js +++ b/public/app/3a8f10a9.app.js @@ -1,34 +1,33 @@ -"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:"
","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:"
","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:""}]}]};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:"
{{'APPLICATION_'+row.entity.table.toUpperCase() | translate}}
"},{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:"
","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:"
","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:"Metric."+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,">")}function j(a){if(!a)return"";for(var b="(",c=0;c0&&(b+=" "+a.operator+" "),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:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat",{url:"/chat",template:"
","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:'
'},{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:"
","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:"
","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:"
","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:"
","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:'
{{row.entity.agent}} <{{row.entity.internal}}>
'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
({{hhours}}:{{mminutes}}:{{sseconds}})
',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:'
{{hhours}}:{{mminutes}}:{{sseconds}}({{row.entity.pauseType}})
',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:'
',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:'
'},{name:"chatPause",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
"},{name:"pauseType",cellClass:"text-center",cellTemplate:'{{row.entity.pauseType}}'},{name:"lastLoginAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
'}],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;dApril 1, 2014',sort:{direction:d.DESC,priority:1}},{name:"leaveAt",cellClass:"text-center",cellTemplate:''},{name:"unmanagedAt",cellClass:"text-center",cellTemplate:''}],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:'
'},{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:"
","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:"
","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:"
{{row.entity.ChatQueue ? row.entity.ChatQueue.name : row.entity.User.name}}
"},{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:"
","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:"
","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:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.snippet",{url:"/snippet",template:"
","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:"We're not online.
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:"
","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:"
","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:"
","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:"
","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:"
","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:'
{{row.entity.agent}} <{{row.entity.internal}}>
'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
({{hhours}}:{{mminutes}}:{{sseconds}})
',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:'
{{hhours}}:{{mminutes}}:{{sseconds}}({{row.entity.pauseType}})
',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:'
', -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:"
","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:"
{{row.entity.MailServerIn.state}}
",displayName:"IMAP",enableSorting:!1,enableFiltering:!1},{name:"MailServerOut.state",width:110,cellClass:"text-center ui-grid-vcenter",cellTemplate:"
{{row.entity.MailServerOut.state}}
",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:"
","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:"
{{row.entity.MailQueue ? row.entity.MailQueue.name : row.entity.User.name}}
"},{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:"
","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:"
#{{row.entity.id}}
",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:"
{{(row.entity.Users | map:'fullname').join(', ')}}
",enableSorting:!1,enableFiltering:!1},{name:"status",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
{{row.entity.status}}
",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:'
',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:"
","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:"
","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:"
","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:'
{{row.entity.agent}} <{{row.entity.internal}}>
'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
({{hhours}}:{{mminutes}}:{{sseconds}})
',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:'
{{hhours}}:{{mminutes}}:{{sseconds}}({{row.entity.pauseType}})
',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:'
',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:'
'},{name:"chatPause",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
"},{name:"pauseType",cellClass:"text-center",cellTemplate:'{{row.entity.pauseType}}'},{name:"lastLoginAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
'}],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;dApril 1, 2014',sort:{direction:d.DESC,priority:1}},{name:"leaveAt",displayName:"leaveAt",cellClass:"text-center",cellTemplate:''},{name:"unmanagedAt",displayName:"unmanangedAt",cellClass:"text-center",cellTemplate:''}],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("SmsAccount",["$resource",function(a){return a("/api/sms/accounts/:accountId/:controller/:id",{id:"@accountId"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts",{url:"/accounts",template:"
"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountListCtrl",["$scope","SmsAccount","gridOptions","$stateParams",function(a,b,c,d){a.message="Hello",a.initView=function(){var e={exporterCsvFilename:"sms_accounts.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/sms/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=c.gridOptions(b,e,a,{accountId:d.accountId})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.list",{url:"/list",templateUrl:"app/channels/sms/account/list/list.html",controller:"SmsAccountListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.action",{url:"/actions",template:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewActionListCtrl",["$scope","gridOptions","SmsAccount","$http","$translate","$stateParams",function(a,b,c,d,e,f){a.initActons=function(){var d={draggable:!0,exporterCsvFilename:"sms_applications.csv",enableSorting:!1,enableFiltering:!1,columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
{{row.entity.MailQueue ? row.entity.MailQueue.name : row.entity.User.name}}
"},{name:"timeout",cellClass:"text-center"},{name:"interval",cellClass:"text-center"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/sms/accounts/view/{{row.entity.SmsAccountId}}/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.sms.accounts.view.action.list",{url:"/list",templateUrl:"app/channels/sms/account/view/action/list/list.html",controller:"SmsAccountViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewActionViewCtrl",["$scope",function(a){a.message="Hello"}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.action.view",{url:"/view/:actionId",templateUrl:"app/channels/sms/account/view/action/view/view.html",controller:"SmsAccountViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewActionWizardCtrl",["$scope","$http","Agent","SmsQueue","Interval","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval",function(a,b,c,d,e,f,g,h,i,j,k,l,m){}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.action.wizard",{url:"/wizard",templateUrl:"app/channels/sms/account/view/action/wizard/wizard.html",controller:"SmsAccountViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewCtrl",["$scope","SmsAccount","$http","$stateParams","$translate","$location","xAlert",function(a,b,c,d,e,f,g){a.message="Hello",a.initView=function(){return console.log(d.accountId),console.log(d.id),b.get({id:d.accountId}).$promise.then(function(b){a.account=b,console.log(b)})["catch"](function(a){g.show(a.message,"danger")})},a.updateItemSmsAccount=function(){return b.update({id:d.accountId},a.account).$promise.then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view",{url:"/view/:accountId",templateUrl:"app/channels/sms/account/view/view.html",controller:"SmsAccountViewCtrl"}).state("main.channels.sms.accounts.view.settings",{url:"/settings",templateUrl:"app/channels/sms/account/view/view.settings.html",controller:"SmsAccountViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountWizardCtrl",["$scope","$http","$location","$translate","WizardHandler","xAlert","SmsAccount",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={}},a.goNext=function(){e.wizard().next()},a.formValidation=function(a){return a},a.createItem=function(){return console.log(a.item),g.save(a.item).$promise.then(function(){c.path("/channels/sms/accounts/list")})["catch"](function(a){f.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.wizard",{url:"/wizard",templateUrl:"app/channels/sms/account/wizard/wizard.html",controller:"SmsAccountWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.inbox",{url:"/inbox",template:"
"})}]),angular.module("xCallyShuttleApp").controller("SmsInboxListCtrl",["$scope","$rootScope","SmsRoom","gridOptions","uiGridConstants","Auth",function(a,b,c,d,e,f){a.initView=function(){var b={exporterCsvFilename:"mail_rooms.csv",enableRowHeaderSelection:f.isAdmin(),columnDefs:[{name:"id",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
#{{row.entity.id}}
",width:75,enableSorting:!1,enableFiltering:!1},{name:"from",cellClass:"text-center"},{name:"SmsAccount.name",displayName:"Account",cellClass:"text-center",enableSorting:!1,enableFiltering:!1},{name:"users",displayName:"APPLICATION_AGENTS",cellClass:"ui-grid-vcenter",cellTemplate:"
{{(row.entity.Users | map:'fullname').join(', ')}}
",enableSorting:!1,enableFiltering:!1},{name:"status",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
{{row.entity.status}}
",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:'
',enableSorting:!1,enableFiltering:!1,width:125},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/sms/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,b,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.inbox.list",{url:"/list",templateUrl:"app/channels/sms/inbox/list/list.html",controller:"SmsInboxListCtrl"})}]),angular.module("xCallyShuttleApp").directive("sms",function(){return{templateUrl:"app/channels/sms/inbox/sms/sms.html",restrict:"EA",scope:{smsMessage:"=message"}}}),angular.module("xCallyShuttleApp").controller("SmsInboxViewCtrl",["$scope","$location","$stateParams","$translate","$uibModal","socket","Auth","xAlert","SmsRoom","SmsAccount","SmsMessage",function(a,b,c,d,e,f,g,h,i,j,k){a.initRoom=function(){a.Auth=g,a.config={autoHideScrollbar:!1,theme:"light",advanced:{updateOnContentResize:!0},setHeight:781,scrollInertia:0},a.forms={},a.form={disabled:!1,disableTo:!1,from:[],body:""},j.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)}),c.id&&i.get({id:c.id}).$promise.then(function(b){a.SmsRoom=b,a.form.id=a.SmsRoom.SmsAccount.id,a.form.to=a.SmsRoom.from,a.form.disableTo=!0,console.log("SmsRoom",b)})["catch"](function(a){console.error(a)})},f.socket.on("sms_message:save",function(b){a.SmsRoom&&b.SmsRoomId===parseInt(c.id)&&(a.SmsRoom.SmsMessages.unshift(b),console.log("aftter",a.SmsRoom))}),a.sendSMS=function(){console.log(a.form);var c=_.find(a.smsAccounts,{id:a.form.id}).phone,e={from:c,to:a.form.to,body:a.form.body||null};return j.save({accountId:a.form.id,controller:"send"},e).$promise.then(function(a){console.log(a),h.show(d.instant("MESSAGE_WELL_DONE"),"success"),b.path("/channels/sms/inbox/list")})["catch"](function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){usSpinnerService.stop("spinner-grid"),a.form.disabled=!1})},a.cancel=function(){b.path("/channels/sms/inbox/list")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.inbox.view",{url:"/view",templateUrl:"app/channels/sms/inbox/view/view.html",controller:"SmsInboxViewCtrl"}).state("main.channels.sms.inbox.view.compose",{url:"/compose",templateUrl:"app/channels/sms/inbox/view/view.room.html",controller:"SmsInboxViewCtrl"}).state("main.channels.sms.inbox.view.room",{url:"/:id/room",templateUrl:"app/channels/sms/inbox/view/view.room.html",controller:"SmsInboxViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewModalTemplateCtrl",["$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.sms",{url:"/sms",template:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("SmsMessage",["$resource",function(a){return a("/api/sms/messages/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SmsRoom",["$resource",function(a){return a("/api/sms/rooms/:id/:controller",{id:"@id",controller:"@controller"},{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:"
","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:"
","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:"
","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:"
","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:"
","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:'
{{row.entity.agent}} <{{row.entity.internal}}>
'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
({{hhours}}:{{mminutes}}:{{sseconds}})
',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:"
{{'APPLICATION_'+row.entity.status | translate}} ({{hhours}}:{{mminutes}}:{{sseconds}})
",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:'
{{\'APPLICATION_\'+row.entity.queueStatus.toUpperCase() | translate}} [{{row.entity.lastQueue}}] [{{row.entity.pauseType}}] [{{hhours}}:{{mminutes}}:{{sseconds}}]
',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:'
{{row.entity.callstaken}}
',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1,width:100},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'
',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("VoiceRealtimeViewTelephoneCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Telephone","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(p).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=b.rows})["catch"](function(a){f.show(a.message,"danger")})["finally"](function(){k.stop("spinner-grid")})}function o(){e.socket.on("telephone:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});if(c){var d=a.gridOptions.data.indexOf(c);a.gridOptions.data[d].status=b.status,a.gridOptions.data[d].statusAt=b.statusAt,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}}),e.socket.on("telephone:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}a.voiceQueues=[];var p={offset:0,limit:10};a.moment=moment,a.initTelephones=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_TELEPHONE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
{{row.entity.name}} <{{row.entity.internal}}>
"},{name:"status",displayName:"APPLICATION_PHONE_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
{{'APPLICATION_'+row.entity.status | translate}} ({{hhours}}:{{mminutes}}:{{sseconds}})
",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:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'
',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(){q(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?p.order=null:p.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){p.offset=(a-1)*b,p.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?p[a.name]=a.filters[0].term:delete p[a.name]}),n()})}},n(),o()};var q=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("telephone")}),a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/voice/realtime/view/telephone/telephone.modal.info.html",controller:"VoiceRealtimeViewTelephoneInfoModalCtrl",resolve:{telephone:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.telephones",{url:"/telephones",templateUrl:"app/channels/voice/realtime/view/telephone/telephone.html",controller:"VoiceRealtimeViewTelephoneCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewTelephoneInfoModalCtrl",["$scope","$uibModalInstance","$http","telephone",function(a,b,c,d){a.telephone=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewCtrl",["$scope",function(a){}]),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:'
'},{name:"audio",displayName:"",width:225,enableSorting:!1,enableFiltering:!1,buttons:[{directive:''}]},{name:"action",width:150,buttons:[{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.uniqueid, row.entity.uniqueid)"},{directive:''}]}]};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:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.inbound",{url:"/inbound",template:"
","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:'
{{app.app}}({{app.appdata[0]}}), ...
{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}
',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.selectedApp=void 0,a.showGrid=!0,a.$application=i.application,a.$interval=j.interval,a.gridOptions={rowTemplate:'
',columnDefs:[{name:"app",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"appdata",displayName:"APPLICATION_ARGUMENTS",headerCellFilter:"translate",cellClass:"ui-grid-vcenter",cellTemplate:"
{{row.entity.appdata.join(',')}}
",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:'{{\'APPLICATION_SETTINGS\' | translate}}{{\'APPLICATION_DELETE\' | translate}}'}],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(c){if(c){var d,e;switch(void 0===a.selectedApp&&(a.application={app:c,interval:a.application.interval||"*,*,*,*",appdata:[]}),c){case"Queue":d=l,e=m;break;case"Playback":d=m;break;case"AGI":d=n;break;case"Goto":d=o;break;case"Voicemail":d=q;break;default:d=null,e=null}if(d)return d.get().$promise.then(function(b){a.items=b.rows}).then(function(){return e?e.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(){if(void 0===a.selectedApp)e.path("/channels/voice/routes/inbound/list");else{a.showGrid=!0;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,a.showGrid=!1,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:"
","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:'
{{app.app}}({{app.appdata[0]}}),...
{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}
',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.showGrid=!0,a.$application=i.application,a.$interval=j.interval,a.gridOptions={rowTemplate:'
',columnDefs:[{name:"app",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"appdata",displayName:"APPLICATION_ARGUMENTS",headerCellFilter:"translate",cellClass:"ui-grid-vcenter",cellTemplate:"
{{row.entity.appdata.join(',')}}
",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:'{{\'APPLICATION_SETTINGS\' | translate}}{{\'APPLICATION_DELETE\' | translate}}'}],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(c){if(c){var d,e;switch(void 0===a.selectedApp&&(a.application={app:c,interval:a.application.interval||"*,*,*,*",appdata:[]}),c){case"Queue":d=l,e=m;break;case"Playback":d=m;break;case"AGI":d=n;break;case"Goto":d=o;break;case"Voicemail":d=q;break;default:d=null,e=null}if(d)return d.get().$promise.then(function(b){a.items=b.rows}).then(function(){return e?e.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(){if(console.log(a.selectedApp),void 0===a.selectedApp)e.path("/channels/voice/routes/internal/list");else{a.showGrid=!0;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,a.showGrid=!1,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:'
{{app.app}}({{app.appdata[0]}}),...
{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}
',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:"
","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.selectedApp=void 0,a.showGrid=!0,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:'
',columnDefs:[{name:"app",displayName:"APPLICATION_APPLICATION",cellClass:"ui-grid-vcenter",cellTemplate:"
Default{{row.entity.app}}
",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"appdata",displayName:"APPLICATION_ARGUMENTS",headerCellFilter:"translate",cellClass:"ui-grid-vcenter",cellTemplate:"
{{row.entity.appdata.join(',')}}
",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:'{{\'APPLICATION_SETTINGS\' | translate}}{{\'APPLICATION_DELETE\' | translate}}'}],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(d){if(d){var e,f;switch(void 0===a.selectedApp&&(a.application={app:d,interval:a.application.interval||"*,*,*,*",appdata:[]}),d){case"Dial":e=l,f=m;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){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(){if(void 0===a.selectedApp)f.path("/channels/voice/routes/outbound/list");else{a.showGrid=!0;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,a.showGrid=!1,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:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice",{url:"/voice",template:"
","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:"
{{grid.appScope.moment(row.entity.stamp).format('YYYY-MM-DD HH:mm:ss')}}
"},{name:"duration",cellClass:"ui-grid-vcenter",cellTemplate:"
{{row.entity.duration*1000 | date:'mm:ss'}}
"},{name:"audio",displayName:"",width:225,enableSorting:!1,enableFiltering:!1,buttons:[{directive:''}]},{name:"action",width:150,buttons:[{directive:''},{"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:"
","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:"
","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:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ContactManagerListImportModalCtrl",["$scope","$uibModalInstance","indexes","csv","xAlert","socket","List","Contact","$translate",function(a,b,c,d,e,f,g,h,i){function j(b){if(b>=a.csvLength||a.stopped)return void(a.importing=!1);var c={Phones:[],Emails:[],customFields:{}};return _.forOwn(a.item,function(e,f){switch(f){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,c.ListId=a.item.ListId,c.CompanyId=a.item.CompanyId||null,h.save(c).$promise.then(function(c){a["import"].success+=k,a["import"].succeeded+=1,j(b+1)})["catch"](function(c){a["import"].fail+=k,a["import"].failed+=1,j(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 k=100/a.csvLength;a.forms={dashboard:void 0},a.item={},a.start=function(){a.importing=!0,a.submitted=!0,j(0)},a.getLists=function(){return g.get().$promise.then(function(b){a.lists=b.rows,a.item.ListId=1,a.getCustomFields()})["catch"](function(a){e.show(i.instant(a.message)+"!","danger")})},a.getCustomFields=function(){return g.get({listId:a.item.ListId,controller:"customfields"}).$promise.then(function(b){b.rows.forEach(function(a){a.values=JSON.parse(a.values)}),a.customFields=b.rows,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.ListId===a.item.ListId){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),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","List","uiGridConstants","xAlert","socket","$stateParams",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){a.initView=function(){return j.get().$promise.then(function(b){a.lists=[],b.rows.forEach(function(b,c){a.lists.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:"ListId",displayName:"APPLICATION_LIST",field:"List.name",filter:{type:k.filter.SELECT,term:n.listId||"",selectOptions:a.lists}},{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,n.listId?{ListId:n.listId}:null)})["catch"](function(a){l.show(b.instant(a.message)+"!","danger")})},d.FileSelect.prototype.isEmptyAfterSelection=function(){return!0};var o=a.uploader=new d({queueLimit:1,clearInputAfterAddedToQueue:!0});o.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",params:{listId:null},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:"
","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("List",["$resource",function(a){return a("/api/contactmanager/lists/:listId/:controller/:id",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.lists",{url:"/lists",template:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ContactManagerListListCreateModalCtrl",["$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("ContactManagerListListCtrl",["$scope","$http","$translate","Modal","xAlert","$uibModal","$log","List","gridOptions",function(a,b,c,d,e,f,g,h,i){a.initView=function(){var b={exporterCsvFilename:"Lists.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:190,buttons:[{"class":"blue-hoki",name:"settings",href:"/contactmanager/lists/view/{{row.entity.id}}/settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{"class":"green-turquoise",name:"contacts",uisref:"main.contactmanager.contacts.list({listId:{{row.entity.id}}})"}]}]};a.gridOptions=i.gridOptions(h,b,a)},a.create=function(){var d=f.open({animation:!0,templateUrl:"app/contactmanager/list/list/create.modal.html",controller:"ContactManagerListListCreateModalCtrl"});d.result.then(function(d){b.post("/api/contactmanager/lists/",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.lists.list",{url:"/list",templateUrl:"app/contactmanager/list/list/list.html",controller:"ContactManagerListListCtrl",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("ContactManagerListCustomFieldViewCreateModalCtrl",["$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("ContactManagerListViewCtrl",["$scope","xAlert","$translate","$stateParams","socket","$location","$uibModal","$log","Modal","List","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({listId:a.list.id,controller:"agents"},{agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})},deselect:function(b){return j["delete"]({listId:a.list.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})}}};a.getList=function(){return j.get({listId:d.id}).$promise.then(function(b){a.list=b})["catch"](function(a){f.path("/contactmanager/lists/list")})},a.updateList=function(){return j.update({listId:d.id},a.list).$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({listId: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:"alias",displayName:"APPLICATION_NAME"},{name:"type"},{name:"description"},{name:"action",width:200,buttons:[{"class":"blue-hoki",href:"/contactmanager/lists/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,{listId:d.id,controller:"customfields"})},a.create=function(){var e=g.open({animation:!0,templateUrl:"app/contactmanager/list/view/create.modal.html",controller:"ContactManagerListCustomFieldViewCreateModalCtrl"});e.result.then(function(e){return j.save({listId: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({listId: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({listId: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.lists.view",{url:"/view/:id",templateUrl:"app/contactmanager/list/view/view.html",controller:"ContactManagerListViewCtrl",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.lists.view.settings",{url:"/settings",templateUrl:"app/contactmanager/list/view/view.settings.html"}).state("main.contactmanager.lists.view.agents",{url:"/agents",templateUrl:"app/contactmanager/list/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.lists.view.customfields",{url:"/customfields",templateUrl:"app/contactmanager/list/view/view.customFields.html"}).state("main.contactmanager.lists.view.customfields.settings",{url:"/settings/:cfId",templateUrl:"app/contactmanager/list/view/view.customFieldSettings.html",controller:"ContactManagerListViewCtrl"})}]),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","Agent","socket",function(a,b,c,d,e,f){a.Auth=b;var g=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.initAgent=function(){f.socket.on("user_has_voice_queue:save",function(b){var c=_.findIndex(a.table1.data,{name:b.queue});c>-1&&(console.log("data",b),a.table1.data[c].UserHasVoiceQueue.loggedAt=b.loggedAt,a.table1.data[c].UserHasVoiceQueue.lastcall=b.lastcall,a.table1.data[c].UserHasVoiceQueue.callstaken=b.callstaken,console.log("data",b))}),f.socket.on("report_queue:save",function(b){b.queuecallerleaveAt?_.remove(a.table2.data,{id:b.id}):_.find(a.table1.data,{name:b.queue})&&a.table2.data.push(b)}),a.table1={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!0,columnDefs:[{name:"UserHasVoiceQueue.queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"},{name:"UserHasVoiceQueue.loggedAt",displayName:"logged At",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
'},{name:"UserHasVoiceQueue.lastcall",headerCellFilter:"translate",displayName:"APPLICATION_LAST_CALL",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
'},{name:"UserHasVoiceQueue.callstaken",headerCellFilter:"translate",displayName:"APPLICATION_CALLS_TAKEN",cellClass:"text-center ui-grid-vcenter"}],data:[], -onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){g(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)})}},a.table2={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!0,columnDefs:[{name:"calleridnum",headerCellFilter:"translate",displayName:"APPLICATION_NUMBER",cellClass:"text-center ui-grid-vcenter"},{name:"calleridname",headerCellFilter:"translate",displayName:"APPLICATION_NAME",cellClass:"text-center ui-grid-vcenter"},{name:"queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi1=b,a.gridApi1.grid.registerDataChangeCallback(function(){g(a.gridApi1.core.getVisibleRows(a.gridApi1.grid).length)})}},e.get({id:b.getCurrentUser().id,controller:"voice",controller1:"queues"}).$promise.then(function(b){a.table1.data=b.rows})["catch"](function(a){console.error(a)}),c.get({id:"waiting",controller:"list"}).$promise.then(function(b){a.table2.data=b.rows})["catch"](function(a){console.error(a)})},a.initWaiting=function(){return c.get({id:"waiting"}).$promise.then(function(b){a.waiting=b.value,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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:"
","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:"
","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:"
","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:"
","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:"
","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","xAlert","$translate","Contact",function(a,b,c,d,e,f){a.open=function(a){b.close(a)},a.getContacts=function(){return f.query({id:c,controller:"checkevent"}).$promise.then(function(b){a.contacts=b})["catch"](function(a){d.show(e.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='
',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="
",a.buttons.forEach(function(b){b.directive?a.cellTemplate+=b.directive:(a.cellTemplate+="':"",a.cellTemplate+=b.displayName||b.name?"{{'"+(b.displayName||"APPLICATION_"+b.name.toUpperCase())+"' | translate}}":"",a.cellTemplate+=" ")}),a.cellTemplate+="
",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,i&&delete i[a.name]):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({firstName:d.firstName,lastName:d.lastName,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,b):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,c){var d=_.find(a.workspaces,{contactID:b.id});if(d)d.active=!0;else{var e=b.firstName;b.lastName&&(e+=" "+b.lastName),a.workspaces.push({name:e,type:"contact",contactID:b.id,active:!0,eventData:b.uniqueid?b:null,data:c||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","List","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.getLists()},a.getLists=function(){return f.get().$promise.then(function(b){a.lists=b.rows,c.syncUpdates("list",a.lists),a.contact.ListId=1,a.getCustomFields()})["catch"](function(a){b.show(d.instant(a.message)+"!","danger")})},a.getCustomFields=function(){return f.get({listId:a.contact.ListId,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.ListId===a.contact.ListId){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","List","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={enablePaginationControls:!0,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.ListId),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({listId: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.ListId===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:'',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:'',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(' 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(' 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=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:' '+a.instant("MESSAGE_SUCCESS")+"!",delay:5e3});break;case"info":b.info({message:c,title:' '+a.instant("MESSAGE_INFO")+"!",delay:5e3});break;case"danger":b.error({message:c,title:' '+a.instant("MESSAGE_ERROR")+"!",delay:1e4});break;case"warning":b.warning({message:c,title:' '+a.instant("MESSAGE_WARNING")+"!",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:"
","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:"
","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:"
","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:"
","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:"
","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:'
'}]};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 e.pull().$promise["finally"](function(){b.dismiss("close"),d.path("/setting/updates/landing")})}},{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:"
","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:"
","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:"
","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:"
","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("Agent",["$resource",function(a){return a("/api/agents/:id/:controller/:controller1",{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:"
","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:"
","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:"
","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:"
","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:"
","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:"
","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:"
","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:"
","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:'
',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:"
","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:'{{\'APPLICATION_SETTINGS\' | translate}}{{\'APPLICATION_DELETE\' | translate}}'}]},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:"
","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='',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:"
","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:"
","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:"
","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:"
","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:'
',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:"
","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:"
","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:"
","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:"
","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:"
","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:"
","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 d=j.load("api/xchatty/assets?resource=notification/xc_blubb.mp3"),k={};"agent"===g.getCurrentUser().role&&(i.socket.on("report_mail:save",function(a){d.play();var e=f("MAIL CHANNEL",{icon:"assets/images/media/channels/mail64.png",body:"NEW Incoming Mail Message!",delay:1e3*a.timeslot});e.$on("click",function(){return n.get({id:a.id,controller1:"accept",controller2:a.uniqueid}).$promise.then(function(){b.$broadcast("mailMessageEvent",{message:"Mail properly assigned.."}),h.show("Mail properly assigned","success"),c.path("/channels/mail/inbox/view/"+a.roomid+"/room")})["catch"](function(a){h.show(a.data.message,"danger")})})}),i.socket.on("report_chat:save",function(a){d.play(),k[a.uniqueid]&&(k[a.uniqueid].close(),delete k[a.uniqueid]),k[a.uniqueid]=f("CHAT CHANNEL",{icon:"assets/images/media/channels/chat64.png",body:"NEW Incoming Chat Visitor!",delay:1e3*a.timeslot}),k[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){d.play();var c=m.get("chatRoomId");if((!c||c!==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){d.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:"

Are you sure you want to delete"+(e?" "+e+"":" selected items")+"?

",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.length1||_.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","
{{$select.selected.name}}
{{$select.selected.name}}
{{$select.selected.name}}
"),a.put("{widgetsPath}/counter/src/view.html",'
{{result}}
{{config.details}}
{{config.linkText}}
')}])}(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",'
{{$select.selected.name}}
as
'),a.put("{widgetsPath}/pie-chart/src/view.html",'
')}])}(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",'
{{$select.selected.name}}
as
'),a.put("{widgetsPath}/table/src/view.html",'
{{field.alias}}
{{result[field.alias]}}
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
')}])}(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 .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:'
'+$(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?'
':a.iconOnly?'
':a.textOnly?'
  '+(a.message?a.message:"LOADING...")+"
":'
  '+(a.message?a.message:"LOADING...")+"
",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('
')):($(".page-loading").remove(),$("body").append('
  '+(a&&a.message?a.message:"Loading...")+"
"))},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='
'+(a.close?'':"")+(""!==a.icon?' ':"")+a.message+"
";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 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(''),1===$(this).children("ul.sub-menu").size()&&$(this).addClass("open")}),"click"===a&&Metronic.getViewPort().width 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 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 li.open > a").click(),Metronic.stopPageLoading(),e.html(a),Layout.fixContentHeight(),Metronic.initAjax()},error:function(a,b,c){Metronic.stopPageLoading(),e.html("

Could not load the requested content.

")}})}),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().widthCould not load the requested content."),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('')}),$(".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\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_EXTRACTED_REPORTS\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n\n'),a.put("app/analytic/metric/list/create.modal.html",'\n\n\n'),a.put("app/analytic/metric/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_METRICS\' | translate }} \n
\n
\n \n
\n \n
\n \n
\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/analytic/metric/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{metric.name}}\n
\n \n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/analytic/metric/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_METRIC\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
\n \n
\n\n
\n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n \n
\n
\n \n\n
\n
\n
\n
\n
\n'),a.put("app/analytic/report/list/copy.modal.html",'\n\n\n'),a.put("app/analytic/report/list/create.modal.html",'\n\n\n'),a.put("app/analytic/report/list/extract.modal.html",'\n\n\n'),a.put("app/analytic/report/list/list.html",'\n
\n
\n \n
\n \n
\n
\n
\n \n {{ \'APPLICATION_FOLDERS\' | translate }} \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_REPORTS\' | translate }} - {{selectedNode}}\n
\n
\n \n
\n \n \n {{\'APPLICATION_IMPORT_FROM_JSON\' | translate}}\n \n \n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n\n'),a.put("app/analytic/report/list/preview.modal.html",'\n\n\n'),a.put("app/analytic/report/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{report.name}}\n
\n \n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'), -a.put("app/analytic/report/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_REPORT\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
\n \n
\n\n
\n\n
\n \n
\n
\n\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n\n\n \n
\n\n
\n \n
\n
\n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n
\n \n {{ \'APPLICATION_FIELDS\' | translate}} \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{{ \'APPLICATION_FIELD\' | translate }} / {{ \'APPLICATION_METRIC\' | translate }}{{ \'APPLICATION_ALIAS\' | translate }}{{ \'APPLICATION_FUNCTION\' | translate }}{{ \'APPLICATION_GROUP_BY\' | translate }}{{ \'APPLICATION_ORDER_BY\' | translate }}
\n \n
\n \n \n \n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n
\n \n
\n \n
\n \n \n {{$select.selected.name | translate}}\n \n {{$translate.instant(groupBy.name)}}\n \n \n
\n \n
\n \n
\n \n \n {{$select.selected}}\n \n
\n
\n
\n
\n \n
\n \n \n \n
\n {{ \'MESSAGE_ADD_A_FIELD\' | translate }}\n
\n \n \n
\n
\n
\n
\n \n {{ \'APPLICATION_CONDITIONS\' | translate}} \n
\n
\n
\n Output
\n \n
\n\n \n
\n \n
\n
\n
\n
\n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n
\n
\n
\n
\n
\n
\n
\n'),a.put("app/channels/chat/offline/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_VISITORS\' | translate }} \n
\n \n
\n
\n \n
\n
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/offline/view/view.detail.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_DETAIL\' | translate}}\n
\n
\n
\n
\n
\n

\n {{\'APPLICATION_MESSAGE\' | translate}}\n
\n

\n
\n \n
\n

\n {{chatVisitor.ChatEnquiry.text}}\n

\n
\n
\n \n
\n
\n
\n
\n'),a.put("app/channels/chat/offline/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{chatVisitor.ChatEnquiry.email}}\n
\n
\n {{chatVisitor.ChatEnquiry.username}}\n
\n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/online/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_VISITORS\' | translate }} \n
\n \n
\n
\n \n
\n
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/online/view/view.detail.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_DETAIL\' | translate}}\n
\n
\n \n
\n
\n
\n'),a.put("app/channels/chat/online/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{chatRoom.ChatVisitor.email}}\n
\n
\n {{chatRoom.ChatVisitor.fullname}}\n
\n
\n \n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/preview/preview.html",'\n
\n
\n \n \n \n \n \n {{statePreview.state == \'online\' ? chatWebsite.header_online : chatWebsite.header_offline}}\n
\n
\n
\n \n
\n
\n

\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n \n
\n
\n
\n \n
\n
\n

{{chatWebsite.rating_message}}

\n
\n
\n \n \n
\n
\n \n \n
\n \n \n
\n
\n \n
\n
\n'), -a.put("app/channels/chat/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/chat/queue/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_QUEUES\' | translate }} \n
\n \n
\n
\n \n
\n
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/queue/view/view.agents.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_AGENTS\' | translate}}\n
\n
\n
\n \n
\n
\n \n
\n \n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n'),a.put("app/channels/chat/queue/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{queue.name}}\n
\n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/queue/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
\n
\n
\n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n \n {{$select.selected.toUpperCase()}}\n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n'),a.put("app/channels/chat/realtime/view/agent/agent.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/chat/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/chat/realtime/view/queue/queue.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/realtime/view/session/session.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/realtime/view/view.html",'\n\n\n'),a.put("app/channels/chat/visitor/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_VISITORS\' | translate }} \n
\n \n
\n
\n \n
\n
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/visitor/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{chatVisitor.fullname}}\n
\n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/visitor/view/view.profile.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_PROFILE\' | translate}}\n
\n
\n \n
\n
\n
\n'),a.put("app/channels/chat/website/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_WEB_SITES\' | translate }} \n
\n \n
\n
\n \n
\n
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/website/view/action/list/list.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n
\n
\n'),a.put("app/channels/chat/website/view/action/view/view.html",'\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_ACTION\' | translate }} \n
\n
\n
\n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n\n
\n \n
\n \n \n {{$select.selected.fullname}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n\n \n
\n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n
\n \n
\n
\n \n
\n
to
\n
\n \n
\n
\n \n\n \n
\n \n
\n \n
\n
\n \n\n \n
\n \n
\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
\n
\n \n
\n\n
\n\n \n
\n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n
\n
\n
\n \n
\n
\n\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:"
","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:"
","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:""}]}]};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:"
{{'APPLICATION_'+row.entity.table.toUpperCase() | translate}}
"},{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:"
","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),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:"
","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:"Metric."+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,">")}function j(a){if(!a)return"";for(var b="(",c=0;c0&&(b+=" "+a.operator+" "),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:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat",{url:"/chat",template:"
","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("ChatReport",["$resource",function(a){return a("/api/report/chats/:id/:controller1/:controller2",{id:"@id"},{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").factory("ChatMessage",["$resource",function(a){return a("/api/chat/messages/:id/:controller",{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").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:'
'},{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:"
","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:"
","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:"
","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:"
","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});c&&(c.online=b.online,c.lastLoginAt=b.lastLoginAt,c.pause=b.chatPause,c.pauseType=b.pauseType,c.lastPauseAt=b.lastPauseAt,c.ipaddr=b.ipaddr,c.port=b.port,c.fullcontact=b.fullcontact,c.useragent=b.useragent,c.lastms=b.lastms,c.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:'
{{row.entity.agent}} <{{row.entity.internal}}>
'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
({{hhours}}:{{mminutes}}:{{sseconds}})
',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:'
{{hhours}}:{{mminutes}}:{{sseconds}}({{row.entity.pauseType}})
',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:'
',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})})}}});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:'
'},{name:"chatPause",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
"},{name:"pauseType",cellClass:"text-center",cellTemplate:'{{row.entity.pauseType}}'},{name:"lastLoginAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
'}],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;dApril 1, 2014',sort:{direction:d.DESC,priority:1}},{name:"leaveAt",cellClass:"text-center",cellTemplate:''},{name:"unmanagedAt",cellClass:"text-center",cellTemplate:''}],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:'
'},{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:"
","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:"
","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:"
{{row.entity.ChatQueue ? row.entity.ChatQueue.name : row.entity.User.name}}
"},{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:"
","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:"
","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:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.snippet",{url:"/snippet",template:"
","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:"We're not online.
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:"
","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:"
","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:"
","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:"
","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:"
","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});c&&(c.online=b.online,c.lastLoginAt=b.lastLoginAt,c.pause=b.faxPause,c.pauseType=b.pauseType,c.lastPauseAt=b.lastPauseAt,c.ipaddr=b.ipaddr,c.port=b.port,c.fullcontact=b.fullcontact,c.useragent=b.useragent,c.lastms=b.lastms,c.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:'
{{row.entity.agent}} <{{row.entity.internal}}>
'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
({{hhours}}:{{mminutes}}:{{sseconds}})
',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:'
{{hhours}}:{{mminutes}}:{{sseconds}}({{row.entity.pauseType}})
',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:'
',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})})}}});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:"
","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:"
{{row.entity.MailServerIn.state}}
",displayName:"IMAP",enableSorting:!1,enableFiltering:!1},{name:"MailServerOut.state",width:110,cellClass:"text-center ui-grid-vcenter",cellTemplate:"
{{row.entity.MailServerOut.state}}
",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:"
","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:"
{{row.entity.MailQueue ? row.entity.MailQueue.name : row.entity.User.name}}
"},{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:"
","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:"
#{{row.entity.id}}
",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:"
{{(row.entity.Users | map:'fullname').join(', ')}}
",enableSorting:!1,enableFiltering:!1},{name:"status",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
{{row.entity.status}}
",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:'
',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:"
","abstract":!0})}]),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").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").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:"
","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:"
","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});c&&(c.online=b.online,c.lastLoginAt=b.lastLoginAt,c.pause=b.mailPause,c.pauseType=b.pauseType,c.lastPauseAt=b.lastPauseAt,c.ipaddr=b.ipaddr,c.port=b.port,c.fullcontact=b.fullcontact,c.useragent=b.useragent,c.lastms=b.lastms,c.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:'
{{row.entity.agent}} <{{row.entity.internal}}>
'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
({{hhours}}:{{mminutes}}:{{sseconds}})
',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:'
{{hhours}}:{{mminutes}}:{{sseconds}}({{row.entity.pauseType}})
',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:'
',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})})}}});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:'
'},{name:"chatPause",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
"},{name:"pauseType",cellClass:"text-center",cellTemplate:'{{row.entity.pauseType}}'},{name:"lastLoginAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
'}],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;dApril 1, 2014',sort:{direction:d.DESC,priority:1}},{name:"leaveAt",displayName:"leaveAt",cellClass:"text-center",cellTemplate:''},{name:"unmanagedAt",displayName:"unmanangedAt",cellClass:"text-center",cellTemplate:''}],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("SmsAccount",["$resource",function(a){return a("/api/sms/accounts/:accountId/:controller/:id",{id:"@accountId"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts",{url:"/accounts",template:"
"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountListCtrl",["$scope","SmsAccount","gridOptions","$stateParams",function(a,b,c,d){a.message="Hello",a.initView=function(){var e={exporterCsvFilename:"sms_accounts.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/sms/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=c.gridOptions(b,e,a,{accountId:d.accountId})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.list",{url:"/list",templateUrl:"app/channels/sms/account/list/list.html",controller:"SmsAccountListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.action",{url:"/actions",template:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewActionListCtrl",["$scope","gridOptions","SmsAccount","$http","$translate","$stateParams",function(a,b,c,d,e,f){a.initActons=function(){var d={draggable:!0,exporterCsvFilename:"sms_applications.csv",enableSorting:!1,enableFiltering:!1,columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
{{row.entity.MailQueue ? row.entity.MailQueue.name : row.entity.User.name}}
"},{name:"timeout",cellClass:"text-center"},{name:"interval",cellClass:"text-center"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/sms/accounts/view/{{row.entity.SmsAccountId}}/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.sms.accounts.view.action.list",{url:"/list",templateUrl:"app/channels/sms/account/view/action/list/list.html",controller:"SmsAccountViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewActionViewCtrl",["$scope",function(a){a.message="Hello"}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.action.view",{url:"/view/:actionId",templateUrl:"app/channels/sms/account/view/action/view/view.html",controller:"SmsAccountViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewActionWizardCtrl",["$scope","$http","Agent","SmsQueue","Interval","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval",function(a,b,c,d,e,f,g,h,i,j,k,l,m){}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.action.wizard",{url:"/wizard",templateUrl:"app/channels/sms/account/view/action/wizard/wizard.html",controller:"SmsAccountViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewCtrl",["$scope","SmsAccount","$http","$stateParams","$translate","$location","xAlert",function(a,b,c,d,e,f,g){a.message="Hello",a.initView=function(){return console.log(d.accountId),console.log(d.id),b.get({id:d.accountId}).$promise.then(function(b){a.account=b,console.log(b)})["catch"](function(a){g.show(a.message,"danger")})},a.updateItemSmsAccount=function(){return b.update({id:d.accountId},a.account).$promise.then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.show(a.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view",{url:"/view/:accountId",templateUrl:"app/channels/sms/account/view/view.html",controller:"SmsAccountViewCtrl"}).state("main.channels.sms.accounts.view.settings",{url:"/settings",templateUrl:"app/channels/sms/account/view/view.settings.html",controller:"SmsAccountViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountWizardCtrl",["$scope","$http","$location","$translate","WizardHandler","xAlert","SmsAccount",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={}},a.goNext=function(){e.wizard().next()},a.formValidation=function(a){return a},a.createItem=function(){return console.log(a.item),g.save(a.item).$promise.then(function(){c.path("/channels/sms/accounts/list")})["catch"](function(a){f.show(a.data.message,"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.wizard",{url:"/wizard",templateUrl:"app/channels/sms/account/wizard/wizard.html",controller:"SmsAccountWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.inbox",{url:"/inbox",template:"
"})}]),angular.module("xCallyShuttleApp").controller("SmsInboxListCtrl",["$scope","$rootScope","SmsRoom","gridOptions","uiGridConstants","Auth",function(a,b,c,d,e,f){a.initView=function(){var b={exporterCsvFilename:"mail_rooms.csv",enableRowHeaderSelection:f.isAdmin(),columnDefs:[{name:"id",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
#{{row.entity.id}}
",width:75,enableSorting:!1,enableFiltering:!1},{name:"from",cellClass:"text-center"},{name:"SmsAccount.name",displayName:"Account",cellClass:"text-center",enableSorting:!1,enableFiltering:!1},{name:"users",displayName:"APPLICATION_AGENTS",cellClass:"ui-grid-vcenter",cellTemplate:"
{{(row.entity.Users | map:'fullname').join(', ')}}
",enableSorting:!1,enableFiltering:!1},{name:"status",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
{{row.entity.status}}
",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:'
',enableSorting:!1,enableFiltering:!1,width:125},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/sms/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,b,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.inbox.list",{url:"/list",templateUrl:"app/channels/sms/inbox/list/list.html",controller:"SmsInboxListCtrl"})}]),angular.module("xCallyShuttleApp").directive("sms",function(){return{templateUrl:"app/channels/sms/inbox/sms/sms.html",restrict:"EA",scope:{smsMessage:"=message"}}}),angular.module("xCallyShuttleApp").controller("SmsInboxViewCtrl",["$scope","$location","$stateParams","$translate","$uibModal","socket","Auth","xAlert","SmsRoom","SmsAccount","SmsMessage",function(a,b,c,d,e,f,g,h,i,j,k){a.initRoom=function(){a.Auth=g,a.config={autoHideScrollbar:!1,theme:"light",advanced:{updateOnContentResize:!0},setHeight:781,scrollInertia:0},a.forms={},a.form={disabled:!1,disableTo:!1,from:[],body:""},j.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)}),c.id&&i.get({id:c.id}).$promise.then(function(b){a.SmsRoom=b,a.form.id=a.SmsRoom.SmsAccount.id,a.form.to=a.SmsRoom.from,a.form.disableTo=!0,console.log("SmsRoom",b)})["catch"](function(a){console.error(a)})},f.socket.on("sms_message:save",function(b){a.SmsRoom&&b.SmsRoomId===parseInt(c.id)&&(a.SmsRoom.SmsMessages.unshift(b),console.log("aftter",a.SmsRoom))}),a.sendSMS=function(){console.log(a.form);var c=_.find(a.smsAccounts,{id:a.form.id}).phone,e={from:c,to:a.form.to,body:a.form.body||null};return j.save({accountId:a.form.id,controller:"send"},e).$promise.then(function(a){console.log(a),h.show(d.instant("MESSAGE_WELL_DONE"),"success"),b.path("/channels/sms/inbox/list")})["catch"](function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){usSpinnerService.stop("spinner-grid"),a.form.disabled=!1})},a.cancel=function(){b.path("/channels/sms/inbox/list")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.inbox.view",{url:"/view",templateUrl:"app/channels/sms/inbox/view/view.html",controller:"SmsInboxViewCtrl"}).state("main.channels.sms.inbox.view.compose",{url:"/compose",templateUrl:"app/channels/sms/inbox/view/view.room.html",controller:"SmsInboxViewCtrl"}).state("main.channels.sms.inbox.view.room",{url:"/:id/room",templateUrl:"app/channels/sms/inbox/view/view.room.html",controller:"SmsInboxViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewModalTemplateCtrl",["$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.sms",{url:"/sms",template:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("SmsMessage",["$resource",function(a){return a("/api/sms/messages/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SmsRoom",["$resource",function(a){return a("/api/sms/rooms/:id/:controller",{id:"@id",controller:"@controller"},{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:"
","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:"
","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:"
","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:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("ReportQueue",["$resource",function(a){return a("/api/report/queues/:id/:controller/:controller2",{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:"
","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});c&&(c.online=b.online,c.lastLoginAt=b.lastLoginAt,c.pause=b.voicePause,c.pauseType=b.pauseType,c.lastPauseAt=b.lastPauseAt,c.status=b.status,c.statusAt=b.statusAt,c.queueStatus=b.queueStatus,c.queueStatusAt=b.queueStatusAt,c.lastQueue=b.lastQueue,c.ipaddr=b.ipaddr,c.port=b.port,c.fullcontact=b.fullcontact,c.useragent=b.useragent,c.lastms=b.lastms,c.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:'
{{row.entity.agent}} <{{row.entity.internal}}>
'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
({{hhours}}:{{mminutes}}:{{sseconds}})
',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:"
{{'APPLICATION_'+row.entity.status | translate}} ({{hhours}}:{{mminutes}}:{{sseconds}})
",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:'
{{\'APPLICATION_\'+row.entity.queueStatus.toUpperCase() | translate}} [{{row.entity.lastQueue}}] [{{row.entity.pauseType}}] [{{hhours}}:{{mminutes}}:{{sseconds}}]
',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:'
{{row.entity.callstaken}}
',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1,width:100},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'
',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})})}}});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("VoiceRealtimeViewQueueCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportQueue","Pause","Action","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return j.spin("spinner-grid"),g.get({controller:"waiting",controller2:"calls"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.show(a.message,"danger")})["finally"](function(){o(),j.stop("spinner-grid")})}function o(){e.socket.on("report_queue:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c?(_.merge(c,b),b.queuecallerleaveAt&&m(function(){_.remove(a.gridOptions.data,{id:b.id})},1e4)):b.queuecallerleaveAt||a.gridOptions.data.push(b)}),e.socket.on("report_queue:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}a.moment=moment,a.initQueues=function(){a.gridOptions={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}{{\'APPLICATION_QUEUESTATUS_ABANDON\' | translate}}{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}} [{{hhours}}:{{mminutes}}:{{sseconds}}]
',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"caller",displayName:"APPLICATION_CALLER",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
{{row.entity.calleridnum || ''}} {{row.entity.calleridname || ''}}
",enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"agent",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
{{row.entity.connectedlinenum || ''}} {{row.entity.connectedlinename || ''}}
",enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1}],data:[],gridMenuTitleFilter:function(a){var b=k.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){console.log("datachange"),p(a.gridOptions.data.length)})}},n()};var p=function(a){var b=a?30*a+60: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("report_queue")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.queues",{url:"/queues",templateUrl:"app/channels/voice/realtime/view/queue/queue.html",controller:"VoiceRealtimeViewQueueCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewTelephoneCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Telephone","Pause","Action","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(){return j.spin("spinner-grid"),g.get(o).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=b.rows})["catch"](function(a){f.show(a.message,"danger")})["finally"](function(){j.stop("spinner-grid")})}function n(){e.socket.on("telephone:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c&&(c.status=b.status,c.statusAt=b.statusAt,c.ipaddr=b.ipaddr,c.port=b.port,c.fullcontact=b.fullcontact,c.useragent=b.useragent,c.lastms=b.lastms,c.internal=b.internal)}),e.socket.on("telephone:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}var o={offset:0,limit:10};a.moment=moment,a.initTelephones=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_TELEPHONE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
{{row.entity.name}} <{{row.entity.internal}}>
"},{name:"status",displayName:"APPLICATION_PHONE_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"
{{'APPLICATION_'+row.entity.status | translate}} ({{hhours}}:{{mminutes}}:{{sseconds}})
",filter:{type:l.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:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'
',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=k.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){p(a.gridOptions.data.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?o.order=null:o.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),m()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){o.offset=(a-1)*b,o.limit=b,m()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?o[a.name]=a.filters[0].term:delete o[a.name]}),m()})}},m(),n()};var p=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("telephone")}),a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/voice/realtime/view/telephone/telephone.modal.info.html",controller:"VoiceRealtimeViewTelephoneInfoModalCtrl",resolve:{telephone:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.telephones",{url:"/telephones",templateUrl:"app/channels/voice/realtime/view/telephone/telephone.html",controller:"VoiceRealtimeViewTelephoneCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewTelephoneInfoModalCtrl",["$scope","$uibModalInstance","$http","telephone",function(a,b,c,d){a.telephone=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewCtrl",["$scope",function(a){}]),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:'
'},{name:"audio",displayName:"",width:225,enableSorting:!1,enableFiltering:!1,buttons:[{directive:''}]},{name:"action",width:150,buttons:[{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.uniqueid, row.entity.uniqueid)"},{directive:''}]}]};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:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.inbound",{url:"/inbound",template:"
","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:'
{{app.app}}({{app.appdata[0]}}), ...
{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}
',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.selectedApp=void 0,a.showGrid=!0,a.$application=i.application,a.$interval=j.interval,a.gridOptions={rowTemplate:'
',columnDefs:[{name:"app",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"appdata",displayName:"APPLICATION_ARGUMENTS",headerCellFilter:"translate",cellClass:"ui-grid-vcenter",cellTemplate:"
{{row.entity.appdata.join(',')}}
",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:'{{\'APPLICATION_SETTINGS\' | translate}}{{\'APPLICATION_DELETE\' | translate}}'}],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(c){if(c){var d,e;switch(void 0===a.selectedApp&&(a.application={app:c,interval:a.application.interval||"*,*,*,*",appdata:[]}),c){case"Queue":d=l,e=m;break;case"Playback":d=m;break;case"AGI":d=n;break;case"Goto":d=o;break;case"Voicemail":d=q;break;default:d=null,e=null}if(d)return d.get().$promise.then(function(b){a.items=b.rows}).then(function(){return e?e.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(){if(void 0===a.selectedApp)e.path("/channels/voice/routes/inbound/list");else{a.showGrid=!0;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,a.showGrid=!1,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:"
","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:'
{{app.app}}({{app.appdata[0]}}),...
{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}
',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.showGrid=!0,a.$application=i.application,a.$interval=j.interval,a.gridOptions={rowTemplate:'
',columnDefs:[{name:"app",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"appdata",displayName:"APPLICATION_ARGUMENTS",headerCellFilter:"translate",cellClass:"ui-grid-vcenter",cellTemplate:"
{{row.entity.appdata.join(',')}}
",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:'{{\'APPLICATION_SETTINGS\' | translate}}{{\'APPLICATION_DELETE\' | translate}}'}],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(c){if(c){var d,e;switch(void 0===a.selectedApp&&(a.application={app:c,interval:a.application.interval||"*,*,*,*",appdata:[]}),c){case"Queue":d=l,e=m;break;case"Playback":d=m;break;case"AGI":d=n;break;case"Goto":d=o;break;case"Voicemail":d=q;break;default:d=null,e=null}if(d)return d.get().$promise.then(function(b){a.items=b.rows}).then(function(){return e?e.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(){if(console.log(a.selectedApp),void 0===a.selectedApp)e.path("/channels/voice/routes/internal/list");else{a.showGrid=!0;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,a.showGrid=!1,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:'
{{app.app}}({{app.appdata[0]}}),...
{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}
',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:"
","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.selectedApp=void 0,a.showGrid=!0,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:'
',columnDefs:[{name:"app",displayName:"APPLICATION_APPLICATION",cellClass:"ui-grid-vcenter",cellTemplate:"
Default{{row.entity.app}}
",headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},{name:"appdata",displayName:"APPLICATION_ARGUMENTS",headerCellFilter:"translate",cellClass:"ui-grid-vcenter",cellTemplate:"
{{row.entity.appdata.join(',')}}
",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:'{{\'APPLICATION_SETTINGS\' | translate}}{{\'APPLICATION_DELETE\' | translate}}'}],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(d){if(d){var e,f;switch(void 0===a.selectedApp&&(a.application={app:d,interval:a.application.interval||"*,*,*,*",appdata:[]}),d){case"Dial":e=l,f=m;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){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(){if(void 0===a.selectedApp)f.path("/channels/voice/routes/outbound/list");else{a.showGrid=!0;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,a.showGrid=!1,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:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice",{url:"/voice",template:"
","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:"
{{grid.appScope.moment(row.entity.stamp).format('YYYY-MM-DD HH:mm:ss')}}
"},{name:"duration",cellClass:"ui-grid-vcenter",cellTemplate:"
{{row.entity.duration*1000 | date:'mm:ss'}}
"},{name:"audio",displayName:"",width:225,enableSorting:!1,enableFiltering:!1,buttons:[{directive:''}]},{name:"action",width:150,buttons:[{directive:''},{"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:"
","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:"
","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:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ContactManagerListImportModalCtrl",["$scope","$uibModalInstance","indexes","csv","xAlert","socket","List","Contact","$translate",function(a,b,c,d,e,f,g,h,i){function j(b){if(b>=a.csvLength||a.stopped)return void(a.importing=!1);var c={Phones:[],Emails:[],customFields:{}};return _.forOwn(a.item,function(e,f){switch(f){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,c.ListId=a.item.ListId,c.CompanyId=a.item.CompanyId||null,h.save(c).$promise.then(function(c){a["import"].success+=k,a["import"].succeeded+=1,j(b+1)})["catch"](function(c){a["import"].fail+=k,a["import"].failed+=1,j(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 k=100/a.csvLength;a.forms={dashboard:void 0},a.item={},a.start=function(){a.importing=!0,a.submitted=!0,j(0)},a.getLists=function(){return g.get().$promise.then(function(b){a.lists=b.rows,a.item.ListId=1,a.getCustomFields()})["catch"](function(a){e.show(i.instant(a.message)+"!","danger")})},a.getCustomFields=function(){return g.get({listId:a.item.ListId,controller:"customfields"}).$promise.then(function(b){b.rows.forEach(function(a){a.values=JSON.parse(a.values)}),a.customFields=b.rows,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.ListId===a.item.ListId){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),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","List","uiGridConstants","xAlert","socket","$stateParams",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){a.initView=function(){return j.get().$promise.then(function(b){a.lists=[],b.rows.forEach(function(b,c){a.lists.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:"ListId",displayName:"APPLICATION_LIST",field:"List.name",filter:{type:k.filter.SELECT,term:n.listId||"",selectOptions:a.lists}},{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,n.listId?{ListId:n.listId}:null)})["catch"](function(a){l.show(b.instant(a.message)+"!","danger")})},d.FileSelect.prototype.isEmptyAfterSelection=function(){return!0};var o=a.uploader=new d({queueLimit:1,clearInputAfterAddedToQueue:!0});o.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",params:{listId:null},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:"
","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("List",["$resource",function(a){return a("/api/contactmanager/lists/:listId/:controller/:id",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.lists",{url:"/lists",template:"
","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ContactManagerListListCreateModalCtrl",["$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("ContactManagerListListCtrl",["$scope","$http","$translate","Modal","xAlert","$uibModal","$log","List","gridOptions",function(a,b,c,d,e,f,g,h,i){a.initView=function(){var b={exporterCsvFilename:"Lists.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:190,buttons:[{"class":"blue-hoki",name:"settings",href:"/contactmanager/lists/view/{{row.entity.id}}/settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{"class":"green-turquoise",name:"contacts",uisref:"main.contactmanager.contacts.list({listId:{{row.entity.id}}})"}]}]};a.gridOptions=i.gridOptions(h,b,a)},a.create=function(){var d=f.open({animation:!0,templateUrl:"app/contactmanager/list/list/create.modal.html",controller:"ContactManagerListListCreateModalCtrl"});d.result.then(function(d){b.post("/api/contactmanager/lists/",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.lists.list",{url:"/list",templateUrl:"app/contactmanager/list/list/list.html",controller:"ContactManagerListListCtrl",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("ContactManagerListCustomFieldViewCreateModalCtrl",["$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("ContactManagerListViewCtrl",["$scope","xAlert","$translate","$stateParams","socket","$location","$uibModal","$log","Modal","List","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({listId:a.list.id,controller:"agents"},{agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})},deselect:function(b){return j["delete"]({listId:a.list.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})}}};a.getList=function(){return j.get({listId:d.id}).$promise.then(function(b){a.list=b})["catch"](function(a){f.path("/contactmanager/lists/list")})},a.updateList=function(){return j.update({listId:d.id},a.list).$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({listId: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:"alias",displayName:"APPLICATION_NAME"},{name:"type"},{name:"description"},{name:"action",width:200,buttons:[{"class":"blue-hoki",href:"/contactmanager/lists/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,{listId:d.id,controller:"customfields"})},a.create=function(){var e=g.open({animation:!0,templateUrl:"app/contactmanager/list/view/create.modal.html",controller:"ContactManagerListCustomFieldViewCreateModalCtrl"});e.result.then(function(e){return j.save({listId: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({listId: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({listId: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.lists.view",{url:"/view/:id",templateUrl:"app/contactmanager/list/view/view.html",controller:"ContactManagerListViewCtrl",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.lists.view.settings",{url:"/settings",templateUrl:"app/contactmanager/list/view/view.settings.html"}).state("main.contactmanager.lists.view.agents",{url:"/agents",templateUrl:"app/contactmanager/list/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.lists.view.customfields",{url:"/customfields",templateUrl:"app/contactmanager/list/view/view.customFields.html"}).state("main.contactmanager.lists.view.customfields.settings",{url:"/settings/:cfId",templateUrl:"app/contactmanager/list/view/view.customFieldSettings.html",controller:"ContactManagerListViewCtrl"})}]),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","Agent","socket",function(a,b,c,d,e,f){a.Auth=b;var g=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.initAgent=function(){f.socket.on("user_has_voice_queue:save",function(b){var c=_.findIndex(a.table1.data,{name:b.queue});c>-1&&(a.table1.data[c].UserHasVoiceQueue.loggedAt=b.loggedAt,a.table1.data[c].UserHasVoiceQueue.lastcall=b.lastcall,a.table1.data[c].UserHasVoiceQueue.callstaken=b.callstaken)}),f.socket.on("report_queue:save",function(b){b.queuecallerleaveAt?_.remove(a.table2.data,{id:b.id}):_.find(a.table1.data,{name:b.queue})&&a.table2.data.push(b)}),a.table1={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!0,columnDefs:[{name:"UserHasVoiceQueue.queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"},{name:"UserHasVoiceQueue.loggedAt",displayName:"logged At",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
'},{name:"UserHasVoiceQueue.lastcall",headerCellFilter:"translate",displayName:"APPLICATION_LAST_CALL",cellClass:"text-center ui-grid-vcenter",cellTemplate:'
'},{name:"UserHasVoiceQueue.callstaken",headerCellFilter:"translate",displayName:"APPLICATION_CALLS_TAKEN",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){g(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)})}},a.table2={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!0,columnDefs:[{name:"calleridnum",headerCellFilter:"translate",displayName:"APPLICATION_NUMBER",cellClass:"text-center ui-grid-vcenter"},{name:"calleridname",headerCellFilter:"translate",displayName:"APPLICATION_NAME",cellClass:"text-center ui-grid-vcenter"},{name:"queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi1=b,a.gridApi1.grid.registerDataChangeCallback(function(){g(a.gridApi1.core.getVisibleRows(a.gridApi1.grid).length)})}},e.get({id:b.getCurrentUser().id,controller:"voice",controller1:"queues"}).$promise.then(function(b){a.table1.data=b.rows})["catch"](function(a){console.error(a)}),c.get({id:"waiting",controller:"list"}).$promise.then(function(b){a.table2.data=b.rows})["catch"](function(a){console.error(a)})},a.initWaiting=function(){return c.get({id:"waiting"}).$promise.then(function(b){a.waiting=b.value,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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,f.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:"
","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:"
","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:"
","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:"
","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:"
","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","xAlert","$translate","Contact",function(a,b,c,d,e,f){a.open=function(a){b.close(a)},a.getContacts=function(){return f.query({id:c,controller:"checkevent"}).$promise.then(function(b){a.contacts=b})["catch"](function(a){d.show(e.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='
',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="
",a.buttons.forEach(function(b){b.directive?a.cellTemplate+=b.directive:(a.cellTemplate+="':"",a.cellTemplate+=b.displayName||b.name?"{{'"+(b.displayName||"APPLICATION_"+b.name.toUpperCase())+"' | translate}}":"",a.cellTemplate+=" ")}),a.cellTemplate+="
",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,i&&delete i[a.name]):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({firstName:d.firstName,lastName:d.lastName,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,b):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,c){var d=_.find(a.workspaces,{contactID:b.id});if(d)d.active=!0;else{var e=b.firstName;b.lastName&&(e+=" "+b.lastName),a.workspaces.push({name:e,type:"contact",contactID:b.id,active:!0,eventData:b.uniqueid?b:null,data:c||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","List","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.getLists()},a.getLists=function(){return f.get().$promise.then(function(b){a.lists=b.rows,c.syncUpdates("list",a.lists),a.contact.ListId=1,a.getCustomFields()})["catch"](function(a){b.show(d.instant(a.message)+"!","danger")})},a.getCustomFields=function(){return f.get({listId:a.contact.ListId,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.ListId===a.contact.ListId){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","List","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={enablePaginationControls:!0,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.ListId),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({listId: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.ListId===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:'',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:'',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(' 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(' 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=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:' '+a.instant("MESSAGE_SUCCESS")+"!",delay:5e3});break;case"info":b.info({message:c,title:' '+a.instant("MESSAGE_INFO")+"!",delay:5e3});break;case"danger":b.error({message:c,title:' '+a.instant("MESSAGE_ERROR")+"!",delay:1e4});break;case"warning":b.warning({message:c,title:' '+a.instant("MESSAGE_WARNING")+"!",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:"
","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:"
","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:"
","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:"
","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:"
","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:'
'}]};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 e.pull().$promise["finally"](function(){b.dismiss("close"),d.path("/setting/updates/landing")})}},{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:"
","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:"
","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:"
","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:"
","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("Agent",["$resource",function(a){return a("/api/agents/:id/:controller/:controller1",{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:"
","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:"
","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:"
","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:"
","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:"
","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:"
","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:"
","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:"
","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:'
',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)}}]),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)}}]),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:"
","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:'{{\'APPLICATION_SETTINGS\' | translate}}{{\'APPLICATION_DELETE\' | translate}}'}]},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:"
","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='',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:"
","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:"
","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:"
","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:"
","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:'
',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:"
","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)}}]),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)}}]),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:"
","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:"
","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),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:"
","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:"
","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:"
","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 d=j.load("api/xchatty/assets?resource=notification/xc_blubb.mp3"),k={};"agent"===g.getCurrentUser().role&&(i.socket.on("report_mail:save",function(a){d.play();var e=f("MAIL CHANNEL",{icon:"assets/images/media/channels/mail64.png",body:"NEW Incoming Mail Message!",delay:1e3*a.timeslot});e.$on("click",function(){return n.get({id:a.id,controller1:"accept",controller2:a.uniqueid}).$promise.then(function(){b.$broadcast("mailMessageEvent",{message:"Mail properly assigned.."}),h.show("Mail properly assigned","success"),c.path("/channels/mail/inbox/view/"+a.roomid+"/room")})["catch"](function(a){h.show(a.data.message,"danger")})})}),i.socket.on("report_chat:save",function(a){d.play(),k[a.uniqueid]&&(k[a.uniqueid].close(),delete k[a.uniqueid]),k[a.uniqueid]=f("CHAT CHANNEL",{icon:"assets/images/media/channels/chat64.png",body:"NEW Incoming Chat Visitor!",delay:1e3*a.timeslot}),k[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){d.play();var c=m.get("chatRoomId");if((!c||c!==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){d.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:"

Are you sure you want to delete"+(e?" "+e+"":" selected items")+"?

",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.length1||_.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","
{{$select.selected.name}}
{{$select.selected.name}}
{{$select.selected.name}}
"),a.put("{widgetsPath}/counter/src/view.html",'
{{result}}
{{config.details}}
{{config.linkText}}
')}])}(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",'
{{$select.selected.name}}
as
'),a.put("{widgetsPath}/pie-chart/src/view.html",'
')}])}(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",'
{{$select.selected.name}}
as
'),a.put("{widgetsPath}/table/src/view.html",'
{{field.alias}}
{{result[field.alias]}}
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
')}])}(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 .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:'
'+$(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"),railVisible:"1"==$(this).attr("data-rail-visible"),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?'
':a.iconOnly?'
':a.textOnly?'
  '+(a.message?a.message:"LOADING...")+"
":'
  '+(a.message?a.message:"LOADING...")+"
",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('
')):($(".page-loading").remove(),$("body").append('
  '+(a&&a.message?a.message:"Loading...")+"
"))},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='
'+(a.close?'':"")+(""!==a.icon?' ':"")+a.message+"
";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 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(''),1===$(this).children("ul.sub-menu").size()&&$(this).addClass("open")}),"click"===a&&Metronic.getViewPort().width 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 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 li.open > a").click(),Metronic.stopPageLoading(),e.html(a),Layout.fixContentHeight(),Metronic.initAjax()},error:function(a,b,c){Metronic.stopPageLoading(),e.html("

Could not load the requested content.

")}})}),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().widthCould not load the requested content."),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('')}),$(".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\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_EXTRACTED_REPORTS\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n\n'),a.put("app/analytic/metric/list/create.modal.html",'\n\n\n'),a.put("app/analytic/metric/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_METRICS\' | translate }} \n
\n
\n \n
\n \n
\n \n
\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/analytic/metric/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{metric.name}}\n
\n \n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/analytic/metric/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_METRIC\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
\n \n
\n\n
\n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n \n
\n
\n \n\n
\n
\n
\n
\n
\n'),a.put("app/analytic/report/list/copy.modal.html",'\n\n\n'),a.put("app/analytic/report/list/create.modal.html",'\n\n\n'),a.put("app/analytic/report/list/extract.modal.html",'\n\n\n'),a.put("app/analytic/report/list/list.html",'\n
\n
\n \n
\n \n
\n
\n
\n \n {{ \'APPLICATION_FOLDERS\' | translate }} \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_REPORTS\' | translate }} - {{selectedNode}}\n
\n
\n \n
\n \n \n {{\'APPLICATION_IMPORT_FROM_JSON\' | translate}}\n \n \n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n\n'),a.put("app/analytic/report/list/preview.modal.html",'\n\n\n'),a.put("app/analytic/report/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{report.name}}\n
\n \n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/analytic/report/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_REPORT\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
\n \n
\n\n
\n\n
\n \n
\n
\n\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n\n\n \n
\n\n
\n \n
\n
\n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n
\n \n {{ \'APPLICATION_FIELDS\' | translate}} \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{{ \'APPLICATION_FIELD\' | translate }} / {{ \'APPLICATION_METRIC\' | translate }}{{ \'APPLICATION_ALIAS\' | translate }}{{ \'APPLICATION_FUNCTION\' | translate }}{{ \'APPLICATION_GROUP_BY\' | translate }}{{ \'APPLICATION_ORDER_BY\' | translate }}
\n \n
\n \n \n \n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n
\n \n
\n \n
\n \n \n {{$select.selected.name | translate}}\n \n {{$translate.instant(groupBy.name)}}\n \n \n
\n \n
\n \n
\n \n \n {{$select.selected}}\n \n
\n
\n
\n
\n \n
\n \n \n \n
\n {{ \'MESSAGE_ADD_A_FIELD\' | translate }}\n
\n \n \n
\n
\n
\n
\n \n {{ \'APPLICATION_CONDITIONS\' | translate}} \n
\n
\n
\n Output
\n \n
\n\n \n
\n \n
\n
\n
\n
\n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n
\n
\n
\n
\n
\n
\n
\n'), +a.put("app/channels/chat/offline/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_VISITORS\' | translate }} \n
\n \n
\n
\n \n
\n
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/offline/view/view.detail.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_DETAIL\' | translate}}\n
\n
\n
\n
\n
\n

\n {{\'APPLICATION_MESSAGE\' | translate}}\n
\n

\n
\n \n
\n

\n {{chatVisitor.ChatEnquiry.text}}\n

\n
\n
\n \n
\n
\n
\n
\n'),a.put("app/channels/chat/offline/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{chatVisitor.ChatEnquiry.email}}\n
\n
\n {{chatVisitor.ChatEnquiry.username}}\n
\n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/online/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_VISITORS\' | translate }} \n
\n \n
\n
\n \n
\n
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/online/view/view.detail.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_DETAIL\' | translate}}\n
\n
\n \n
\n
\n
\n'),a.put("app/channels/chat/online/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{chatRoom.ChatVisitor.email}}\n
\n
\n {{chatRoom.ChatVisitor.fullname}}\n
\n
\n \n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/preview/preview.html",'\n
\n
\n \n \n \n \n \n {{statePreview.state == \'online\' ? chatWebsite.header_online : chatWebsite.header_offline}}\n
\n
\n
\n \n
\n
\n

\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n \n
\n
\n
\n \n
\n
\n

{{chatWebsite.rating_message}}

\n
\n
\n \n \n
\n
\n \n \n
\n \n \n
\n
\n \n
\n
\n'),a.put("app/channels/chat/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/chat/queue/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_QUEUES\' | translate }} \n
\n \n
\n
\n \n
\n
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
\n
\n \n
\n
\n \n
\n
\n\n'), +a.put("app/channels/chat/queue/view/view.agents.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_AGENTS\' | translate}}\n
\n
\n
\n \n
\n
\n \n
\n \n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n'),a.put("app/channels/chat/queue/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{queue.name}}\n
\n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/queue/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
\n
\n
\n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n \n {{$select.selected.toUpperCase()}}\n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n'),a.put("app/channels/chat/realtime/view/agent/agent.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/chat/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/chat/realtime/view/queue/queue.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/realtime/view/session/session.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/realtime/view/view.html",'\n\n\n'),a.put("app/channels/chat/visitor/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_VISITORS\' | translate }} \n
\n \n
\n
\n \n
\n
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/visitor/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{chatVisitor.fullname}}\n
\n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/visitor/view/view.profile.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_PROFILE\' | translate}}\n
\n
\n \n
\n
\n
\n'),a.put("app/channels/chat/website/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_WEB_SITES\' | translate }} \n
\n \n
\n
\n \n
\n
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/website/view/action/list/list.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n
\n
\n'),a.put("app/channels/chat/website/view/action/view/view.html",'\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_ACTION\' | translate }} \n
\n
\n
\n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n\n
\n \n
\n \n \n {{$select.selected.fullname}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n\n \n
\n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n
\n \n
\n
\n \n
\n
to
\n
\n \n
\n
\n \n\n \n
\n \n
\n \n
\n
\n \n\n \n
\n \n
\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
\n
\n \n
\n\n
\n\n \n
\n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n
\n
\n
\n \n
\n
\n\n'), a.put("app/channels/chat/website/view/action/wizard/wizard.html",'\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_ACTION\' | translate }} WIZARD \n
\n
\n
\n \n \n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n\n
\n \n
\n \n \n {{$select.selected.fullname}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n\n \n
\n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n
\n \n
\n
\n \n
\n
to
\n
\n \n
\n
\n \n\n \n
\n \n
\n \n
\n
\n \n\n \n
\n \n
\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
\n
\n \n
\n\n
\n\n \n
\n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n\n \n
\n
\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n \n
\n
\n
\n
\n \n
\n
\n\n'),a.put("app/channels/chat/website/view/embedding/view/view.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_EMBEDDING\' | translate}}\n
\n \n
\n
\n
\n
\n

{{\'APPLICATION_EMBED_SNIPPET\' | translate}}

\n

\n {{\'MESSAGE_EMBED_SNIPPET\' | translate}}\n

\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n'),a.put("app/channels/chat/website/view/form/view/view.html",'
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n {{ \'APPLICATION_FIELDS_SELECTED\' | translate }}\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n {{ \'APPLICATION_FIELDS_AVAILABLE\' | translate }}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n {{ \'APPLICATION_FIELDS_SELECTED\' | translate }}\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n {{ \'APPLICATION_FIELDS_AVAILABLE\' | translate }}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n'),a.put("app/channels/chat/website/view/proactive/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/chat/website/view/proactive/list/list.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_PROACTIVE_ACTIONS\' | translate}}\n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n
\n
\n'),a.put("app/channels/chat/website/view/snippet/view/view.html",'
\n
\n
\n \n
\n
\n
\n
\n\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{$translate.instant(\'APPLICATION_\' + $select.selected.toUpperCase())}}\n \n
\n
\n
\n
\n \n\n \n
\n \n \n \n {{$select.selected ? \'On\' : \'Off\'}}\n \n
\n
\n
\n
\n \n\n\n \n
\n
\n \n\n \n
\n
\n\n \n
\n \n \n {{$select.selected ? \'On\' : \'Off\'}}\n \n
\n
\n
\n
\n \n\n \n
\n
\n \n\n \n
\n
\n\n

{{\'APPLICATION_ONLINE_STATE\' | translate}}

\n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n

{{\'APPLICATION_RATING_STATE\' | translate}}

\n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n

{{\'APPLICATION_OFFLINE_STATE\' | translate}}

\n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n
\n \n\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n
\n \n\n \n
\n
\n\n \n
\n
\n \n
\n \n\n \n
\n
\n \n {{\'MESSAGE_REMEMBER_SMTP_SERVICE_ACCOUNT\' | translate}}.\n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n
\n
\n
\n \n
\n \n \n \n {{$select.selected}}\n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n'), a.put("app/channels/chat/website/view/view.html",'\n\n\n'),a.put("app/channels/chat/website/wizard/wizard.html",'\n\n\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_WEB_SITE\' | translate }} WIZARD \n
\n
\n
\n \n \n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n \n
\n
\n\n \n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{$translate.instant(\'APPLICATION_\' + $select.selected.toUpperCase())}}\n \n
\n
\n
\n
\n \n\n \n
\n \n \n {{$select.selected ? \'On\' : \'Off\'}}\n \n
\n
\n
\n
\n \n\n\n \n
\n
\n\n \n
\n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n
\n\n \n
\n\n \n
\n \n \n {{$select.selected ? \'On\' : \'Off\'}}\n \n
\n
\n
\n
\n \n\n \n
\n
\n\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n
\n
\n
\n
\n \n
\n
\n\n'),a.put("app/channels/fax/account/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_ACCOUNTS\' | translate }} \n
\n \n
\n
\n \n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n \n {{$select.selected.name}}\n \n
\n
\n
\n
\n
\n
\n \n \n \n \n
\n
\n
\n
{{ \'APPLICATION_NAME\' | translate }}{{ \'APPLICATION_DESCRIPTION\' | translate }}{{ \'APPLICATION_PHONE\' | translate }}{{ \'APPLICATION_ACTIONS\' | translate }}
{{faxAccount.name}}{{faxAccount.description}}{{faxAccount.phone}}\n \n {{ \'APPLICATION_EDIT\' | translate }}\n \n \n {{ \'APPLICATION_DELETE\' | translate }}\n \n
\n No fax account available\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/fax/account/view/view.applications.html",'
\n
\n\n \n
\n
\n
\n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
\n
\n
\n \n \n
\n \n
\n \n \n {{$select.selected | uppercase}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n \n \n\n \n
\n
\n\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n
\n
\n
\n
\n \n
\n
\n\n'), a.put("app/channels/fax/account/view/view.html",'\n
\n
\n \n\n\n\n\n \n
\n \n
\n \n
\n \n
\n \n\n \n
\n
\n {{ account.name || account.description }}\n
\n
\n {{ account.phone }}\n
\n
\n \n\n \n \n \n
\n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/fax/account/view/view.routes.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_ROUTES\' | translate}}\n
\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{{\'APPLICATION_APPLICATION\' | translate}}{{\'APPLICATION_ARGUMENTS\' | translate}}{{\'APPLICATION_TIMEOUT\' | translate}}{{ \'APPLICATION_ACTIONS\' | translate }}
{{application.app}} {{getAppdata(application.app, application.appdata)}}{{application.timeout}}\n \n {{ \'APPLICATION_DELETE\' | translate }}\n \n
\n No applications available\n
\n \n
\n
\n
\n
\n'),a.put("app/channels/fax/account/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
\n \n
\n
\n
\n \n
\n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n\n
\n
\n
\n
\n
\n'),a.put("app/channels/fax/account/wizard/wizard.html",'\n\n\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
\n
\n
\n \n \n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n\n
\n
\n\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n
\n\n
\n\n
\n
\n \n
\n
\n\n'),a.put("app/channels/fax/inbox/inbox.html",'\n\n\n
\n
\n
\n
\n'),a.put("app/channels/fax/inbox/incoming/incoming.html",'\n
\n \n
\n

Inbox

\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n \n {{$select.selected}}\n \n \n \n \n
\n
\n
\n \n \n {{faxRoom.from}}\n \n {{faxRoom.MailAccount.description ? faxRoom.MailAccount.description : faxRoom.MailAccount.name}}\n \n {{faxRoom.status | uppercase}} \n \n {{faxRoom.User.fullname}} \n {{\'APPLICATION_UNASSIGNED\' | translate}} \n \n \n
\n {{\'MESSAGE_NO_AVAILABLE_MESSAGES\' | translate}}\n
\n \n
\n
\n
\n'),a.put("app/channels/fax/inbox/room/room.html",'\n
\n
\n \n \n \n
\n
\n
\n
\n
    \n
  • \n \n
    \n \n \n {{\'APPLICATION_FROM\' | translate}}: \n {{faxMessage.From.fullname}} \n <{{faxMessage.From.phone}}> \n
    \n {{\'APPLICATION_TO\' | translate}}: \n {{faxMessage.To.fullname}} \n <{{faxMessage.To.phone}}> \n
    \n \n \n \n \n {{faxMessage.status | uppercase}} \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n
  • \n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n \n {{ getCurrentUser().fullname }}\n
\n
\n
\n \n\n \n
\n
\n
\n
\n \n
\n
\n \n {{$select.selected.name}} - {{$select.selected.phone}}\n \n
\n \n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n
\n
\n\n \n
\n
\n
\n
\n \n
\n
\n \n {{$item}}\n \n {{to}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n
\n
\n\n \n
\n
\n \n
\n
\n
\n \n\n \n
\n
\n \n \n \n \n \n \n \n \n \n
\n \n {{ item.file.name }}\n \n \n {{ item.file.size/1024/1024|number:2 }} MB\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n\n
\n
\n
\n
\n
\n
\n
\n\n'), a.put("app/channels/fax/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/fax/queue/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_QUEUES\' | translate }} \n
\n \n
\n
\n \n
\n
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/fax/queue/view/view.agents.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_AGENTS\' | translate}}\n
\n
\n
\n \n
\n
\n \n
\n \n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n'),a.put("app/channels/fax/queue/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{queue.name}}\n
\n \n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/fax/queue/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
\n
\n
\n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n \n {{$select.selected.toUpperCase()}}\n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n'),a.put("app/channels/fax/realtime/view/agent/agent.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/fax/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/fax/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/fax/realtime/view/view.html",'\n\n\n'),a.put("app/channels/mail/account/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_ACCOUNTS\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/mail/account/view/action/list/list.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n
\n
\n'),a.put("app/channels/mail/account/view/action/view/view.html",'\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_ACTION\' | translate }} \n
\n
\n
\n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n\n
\n \n
\n \n \n {{$select.selected.fullname}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n\n \n
\n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n
\n \n
\n
\n \n
\n
to
\n
\n \n
\n
\n \n\n \n
\n \n
\n \n
\n
\n \n\n \n
\n \n
\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
\n
\n \n
\n\n
\n\n \n
\n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n
\n
\n
\n \n
\n
\n\n'), a.put("app/channels/mail/account/view/action/wizard/wizard.html",'\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_ACTION\' | translate }} WIZARD \n
\n
\n
\n \n \n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n\n
\n \n
\n \n \n {{$select.selected.fullname}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n\n \n
\n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n
\n \n
\n
\n \n
\n
to
\n
\n \n
\n
\n \n\n \n
\n \n
\n \n
\n
\n \n\n \n
\n \n
\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
\n
\n \n
\n\n
\n\n \n
\n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n\n \n
\n
\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n \n
\n
\n
\n
\n \n
\n
\n\n'),a.put("app/channels/mail/account/view/view.html",'\n
\n
\n \n\n\n\n\n \n
\n \n
\n \n
\n \n
\n \n\n \n
\n
\n {{ account.description || account.name }}\n
\n
\n {{account.email}}\n
\n
\n \n\n \n \n \n
\n
\n \n
\n \n
\n\n
\n'),a.put("app/channels/mail/account/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
\n \n
\n
\n
\n \n
\n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n
\n \n\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n {{$select.selected}}\n \n
\n
\n
\n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n
\n \n\n \n
\n
\n \n
\n \n\n \n
\n
\n \n
\n \n\n \n
\n
\n \n\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n
\n \n\n \n \n
\n
\n \n
\n
\n
\n
\n
\n'), -a.put("app/channels/mail/account/wizard/wizard.html",'\n
\n
\n \n \n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
\n
\n
\n \n \n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n \n
\n
\n\n \n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n {{$select.selected}}\n \n
\n
\n
\n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n
\n \n\n \n
\n
\n \n
\n \n\n \n
\n
\n \n
\n \n\n \n
\n
\n \n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n
\n \n\n \n \n
\n
\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n
\n
\n
\n
\n \n
\n
\n\n'),a.put("app/channels/mail/inbox/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_INBOX\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/mail/inbox/mail/mail.html",'
\r\n
\r\n
\r\n From: \r\n {{mailMessage.from}}\r\n
\r\n To: \r\n {{mailMessage.to}} \r\n
\r\n Cc: \r\n {{mailMessage.cc}} \r\n
\r\n
\r\n {{\'APPLICATION_SENT_BY\' | translate}}: {{mailMessage.User.fullname}}\r\n
\r\n
\r\n
\r\n \r\n \r\n {{mailMessage.status | uppercase}}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n {{mailAttachment.name}}\r\n \r\n {{mailAttachment.size}}B \r\n \r\n {{ \'APPLICATION_DOWNLOAD\' | translate }}\r\n \r\n
\r\n
\r\n'),a.put("app/channels/mail/inbox/note/note.html",'
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {{\'APPLICATION_ADD_BY\' | translate}}: {{mailMessage.User.fullname}}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {{mailAttachment.name}}\r\n \r\n {{mailAttachment.size}}B \r\n \r\n {{ \'APPLICATION_DOWNLOAD\' | translate }}\r\n \r\n
\r\n
\r\n'),a.put("app/channels/mail/inbox/view/view.agents.modal.html",'\n\n\n'),a.put("app/channels/mail/inbox/view/view.html",'
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n'),a.put("app/channels/mail/inbox/view/view.notes.modal.html",'\n\n\n'),a.put("app/channels/mail/inbox/view/view.room.html",'\n
\n
\n
\n
\n \n {{mailRoom.status}} - {{mailRoom.subject}}\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
    \n
  • \n \n \n \n
  • \n
\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n \n
\n
\n \n {{$select.selected.name}}\n \n
\n \n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n
\n
\n \n\n \n
\n
\n
\n
\n \n
\n
\n \n {{$item}}\n \n {{to}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n
\n
\n \n\n \n
\n
\n
\n
\n \n
\n
\n \n {{$item}}\n \n {{cc}}\n \n \n
\n
\n
\n
\n \n\n \n
\n
\n
\n
\n \n
\n
\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n
\n
\n \n\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n \n\n \n
\n
\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n \n\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n
{{ item.file.name }}{{ item.file.size/1024/1024|number:2 }} MB\n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n\n'), +a.put("app/channels/mail/account/wizard/wizard.html",'\n
\n
\n \n \n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
\n
\n
\n \n \n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n \n
\n
\n\n \n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n {{$select.selected}}\n \n
\n
\n
\n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n
\n \n\n \n
\n
\n \n
\n \n\n \n
\n
\n \n
\n \n\n \n
\n
\n \n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n
\n \n\n \n \n
\n
\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n
\n
\n
\n
\n \n
\n
\n\n'),a.put("app/channels/mail/inbox/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_INBOX\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/mail/inbox/mail/mail.html",'
\n
\n
\n From: \n {{mailMessage.from}}\n
\n To: \n {{mailMessage.to}} \n
\n Cc: \n {{mailMessage.cc}} \n
\n
\n {{\'APPLICATION_SENT_BY\' | translate}}: {{mailMessage.User.fullname}}\n
\n
\n
\n \n \n {{mailMessage.status | uppercase}}\n \n \n \n \n \n
\n \n
\n
\n {{mailAttachment.name}}\n \n {{mailAttachment.size}}B \n \n {{ \'APPLICATION_DOWNLOAD\' | translate }}\n \n
\n
\n'),a.put("app/channels/mail/inbox/note/note.html",'
\n
\n
\n \n
\n
\n {{\'APPLICATION_ADD_BY\' | translate}}: {{mailMessage.User.fullname}}\n
\n
\n
\n \n
\n
\n {{mailAttachment.name}}\n \n {{mailAttachment.size}}B \n \n {{ \'APPLICATION_DOWNLOAD\' | translate }}\n \n
\n
\n'),a.put("app/channels/mail/inbox/view/view.agents.modal.html",'\n\n\n'),a.put("app/channels/mail/inbox/view/view.html",'\n\n\n
\n
\n
\n
\n
\n\n'),a.put("app/channels/mail/inbox/view/view.notes.modal.html",'\n\n\n'),a.put("app/channels/mail/inbox/view/view.room.html",'\n
\n
\n
\n
\n \n {{mailRoom.status}} - {{mailRoom.subject}}\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
    \n
  • \n \n \n \n
  • \n
\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n \n
\n
\n \n {{$select.selected.name}}\n \n
\n \n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n
\n
\n \n\n \n
\n
\n
\n
\n \n
\n
\n \n {{$item}}\n \n {{to}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n
\n
\n \n\n \n
\n
\n
\n
\n \n
\n
\n \n {{$item}}\n \n {{cc}}\n \n \n
\n
\n
\n
\n \n\n \n
\n
\n
\n
\n \n
\n
\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n
\n
\n \n\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n \n\n \n
\n
\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n \n\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n
{{ item.file.name }}{{ item.file.size/1024/1024|number:2 }} MB\n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n\n'), a.put("app/channels/mail/inbox/view/view.templates.modal.html",'\n\n\n'),a.put("app/channels/mail/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/mail/queue/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_QUEUES\' | translate }} \n
\n \n
\n
\n \n
\n
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/mail/queue/view/view.agents.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_AGENTS\' | translate}}\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\n

\n
\n
\n \n
\n
\n \n
\n \n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n'),a.put("app/channels/mail/queue/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{queue.name}}\n
\n \n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n \n'),a.put("app/channels/mail/queue/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
\n
\n
\n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n \n \n {{$select.selected.toUpperCase()}}\n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n'),a.put("app/channels/mail/realtime/view/agent/agent.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/mail/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/mail/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/mail/realtime/view/queue/queue.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/mail/realtime/view/session/session.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/mail/realtime/view/view.html",'\n\n\n'),a.put("app/channels/mail/realtime/view/view.queue.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/sms/account/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_ACCOUNTS\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/sms/account/view/action/list/list.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n
\n
\n'),a.put("app/channels/sms/account/view/action/view/view.html","
This is the view view.
\n"),a.put("app/channels/sms/account/view/action/wizard/wizard.html","
\n This is action wizard\n
\n"),a.put("app/channels/sms/account/view/view.html",'\n
\n
\n \n\n\n\n\n \n
\n \n
\n \n
\n \n
\n \n\n \n
\n
\n {{ account.description || account.name }}\n
\n
\n {{account.email}}\n
\n
\n \n\n \n \n \n
\n
\n \n
\n \n
\n\n
\n'),a.put("app/channels/sms/account/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
\n \n
\n
\n
\n \n
\n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n\n\n \n \n \n\n \n \n \n\n \n
\n \n \n
\n \n \n\n \n \n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n \n
\n
\n \n\n\n\n
\n
\n
\n
\n
\n'), a.put("app/channels/sms/account/wizard/wizard.html",'\n
\n
\n \n \n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
\n
\n
\n \n \n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n \n\n
\n \n \n {{$select.selected}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n \n
\n
\n\n\n\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n
\n
\n
\n
\n \n
\n
\n\n'),a.put("app/channels/sms/inbox/list/list.html",'\n\n\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_INBOX\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/sms/inbox/sms/sms.html",'
\n
\n
\n From: \n {{smsMessage.from}}\n
\n To: \n {{smsMessage.to}} \n
\n \n
\n
\n {{\'APPLICATION_SENT_BY\' | translate}}: {{smsMessage.User.fullname}}\n
\n
\n
\n
\n Message: \n {{smsMessage.body}}\n
\n\n
\n\n
\n
\n \n \n {{smsMessage.status | uppercase}}\n \n \n \n \n \n
\n \n \n
\n'),a.put("app/channels/sms/inbox/view/view.html",'\n\n\n
\n
\n
\n
\n
\n\n'),a.put("app/channels/sms/inbox/view/view.room.html",'\n
\n
\n \n
\n
\n
\n
\n
    \n
  • \n \n \n \n
  • \n
\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n \n
\n
\n \n \n\n {{$select.selected.name}}\n \n
\n \n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n
\n
\n \n\n \n
\n
\n
\n
\n \n
\n
\n \n\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n
\n
\n \n\n\n\n \n \n \n\n \n
\n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n
\n \n
\n
\n \n \n
\n
\n\n
\n
\n
\n
\n
\n
\n
\n\n'),a.put("app/channels/sms/inbox/view/view.templates.modal.html",'\n\n\n'),a.put("app/channels/voice/chanspy/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/voice/chanspy/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_CHANSPY\' | translate }} \n
\n
\n \n
\n \n
\n
\n
\n
\n \n
\n
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/chanspy/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{chanspy.name}}\n
\n \n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'), a.put("app/channels/voice/chanspy/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_CHANSPY\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
\n \n
\n\n
\n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$item.value}}: {{$item.name | translate}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n \n
\n
\n \n\n
\n
\n
\n
\n
\n'),a.put("app/channels/voice/context/list/create.modal.html",'\n\n\n'),a.put("app/channels/voice/context/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_CONTEXTS\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/context/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{context.name}}\n
\n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n \n'),a.put("app/channels/voice/context/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_CONTEXT\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
\n \n
\n\n
\n
\n \n
\n
\n\n \n
\n \n \n \n {{ \'DESCRIPTION_CANT_EDIT_NAME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n \n
\n
\n \n\n
\n
\n
\n
\n
\n'),a.put("app/channels/voice/moh/list/create.modal.html",'\n\n\n'),a.put("app/channels/voice/moh/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_MOHS\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/moh/view/view.addFiles.html",'\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_MOH\' | translate }} {{ \'APPLICATION_ADD_FILES\' | translate }} \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

\n
\n
\n\n \n
\n \n \n {{$item.display_name}}\n \n {{sound.display_name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/moh/view/view.audios.html",'
\n
\n
\n
\n
\n
\n \n {{\'APPLICATION_AUDIOS\' | translate}}\n
\n \n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_FOLDER_DOES_NOT_EXIST\' | translate }}\n

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{{ \'APPLICATION_NAME\' | translate }}{{ \'APPLICATION_PREVIEW\' | translate }}{{ \'APPLICATION_ACTIONS\' | translate }}
{{audiofile}}\n \n \n {{ \'APPLICATION_DELETE\' | translate }}\n \n
\n {{ \'MESSAGE_NO_AUDIOFILES_AVAILABLE\' | translate }}\n
\n \n
\n
\n
\n
\n
\n'),a.put("app/channels/voice/moh/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{moh.name}}\n
\n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/moh/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_MOH_CLASS\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
\n \n
\n\n
\n
\n \n
\n
\n\n \n
\n \n \n
\n \n\n \n
\n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(sort.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n
\n
\n
\n
\n
\n'),a.put("app/channels/voice/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/voice/queue/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_QUEUES\' | translate }}\n
\n \n
\n
\n \n
\n
{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
\n
\n \n
\n
\n \n
\n
\n\n'), a.put("app/channels/voice/queue/view/view.agents.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_AGENTS\' | translate}}\n
\n
\n
\n

Warning!

{{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}

\n
\n
\n \n
\n
\n \n
\n \n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n'),a.put("app/channels/voice/queue/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{queue.name}}\n
\n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/queue/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_QUEUE_SETTINGS\' | translate}}\n
\n \n
\n\n
\n
\n \n
\n
\n
\n
\n \n
\n \n \n {{$select.selected.toUpperCase()}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_STRATEGY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_VOICE_MOH\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_QUEUE_TIMEOUT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_QUEUE_MAXLEN\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_QUEUE_RETRY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n
\n \n
\n \n \n \n {{ \'DESCRIPTION_QUEUE_WRAPUPTIME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_QUEUE_WEIGHT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$item}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_JOINEMPTY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$item}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_LEAVEWHENEMPTY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.display_name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n \n
\n \n \n
\n \n\n \n
\n
\n\n
\n
\n
\n
\n \n
\n \n \n {{$item.display_name}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

\n
\n \n {{ \'DESCRIPTION_QUEUE_PERIODIC_ANNOUNCE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n
\n
\n

{{\'APPLICATION_SETTINGS\' | translate}}

\n \n
\n \n \n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE_FREQUENCY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_QUEUE_MIN_ANNOUNCE_FREQUENCY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_QUEUE_PERIODIC_ANNOUNCE_FREQUENCY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected | capitalize}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_RANDOM_PERIODIC_ANNOUNCE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected | capitalize}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE_HOLDTIME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected | capitalize}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE_POSITION\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE_POSITION_LIMIT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected | capitalize}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_REPORTHOLDTIME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n
\n

{{\'APPLICATION_SOUNDS\' | translate}}

\n \n
\n \n \n {{$select.selected.display_name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_REPORTHOLD\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.display_name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_YOUARENEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.display_name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_THEREARE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.display_name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_CALLSWAITING\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.display_name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_HOLDTIME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.display_name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_MINUTES\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.display_name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_MINUTE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.display_name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_SECONDS\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.display_name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_THANKYOU\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n
\n\n \n
\n
\n \n \n
\n
\n\n
\n
\n\n \n
\n \n \n {{$select.selected | capitalize}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_AUTOPAUSE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected | capitalize}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_RINGINUSE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_QUEUE_MEMBER_DELAY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n \n {{ \'DESCRIPTION_ACW\' | translate }}\n \n \n {{\'APPLICATION_ACW\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n
\n\n \n
\n \n \n {{$select.selected | capitalize}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_TIMEOUTRESTART\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_MONITOR_FORMAT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_QUEUE_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_ACW_TIMEOUT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n
\n\n \n
\n
\n \n\n
\n
\n
\n
\n
\n'), -a.put("app/channels/voice/realtime/view/agent/agent.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/areport/report.html",'\n
\n
\n \n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n \n {{$select.selected.name}}\n \n
\n
\n
\n
\n
\n
\n \n \n \n \n
\n
\n
\n
{{ \'APPLICATION_UNIQUEID\' | translate }}{{ \'APPLICATION_QUEUE\' | translate }}{{ \'APPLICATION_AGENT\' | translate }}{{ \'APPLICATION_CALLER\' | translate }}{{ \'APPLICATION_CALLED_AT\' | translate }}{{ \'APPLICATION_CONNECTED_AT\' | translate }}{{ \'APPLICATION_COMPLETED_AT\' | translate }}{{ \'APPLICATION_REASON\' | translate }}{{ \'APPLICATION_HOLDTIME\' | translate }}{{ \'APPLICATION_TALKTIME\' | translate }}
\n {{agent.uniqueid}}{{agent.queue}}{{agent.destcalleridname ? agent.destcalleridname + \' [\' + agent.membername + \']\' : agent.membername }}{{agent.calleridname ? agent.calleridname + \' [\' + agent.calleridnum + \']\' : agent.calleridnum }}\n \n \n \n \n \n \n {{agent.reason | uppercase}}\n {{agent.holdtime || 0 | VoiceRealtimeViewAgentReportFilter | date:\'HH:mm:ss\'}}{{agent.talktime || 0 | VoiceRealtimeViewAgentReportFilter | date:\'HH:mm:ss\'}}
\n No agents available\n
\n \n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n \n
\n \n
\n
\n\n'),a.put("app/channels/voice/realtime/view/qreport/report.html",'\n
\n
\n \n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n \n {{$select.selected.name}}\n \n
\n
\n
\n
\n
\n
\n \n \n \n \n
\n
\n
\n
{{ \'APPLICATION_UNIQUEID\' | translate }}{{ \'APPLICATION_QUEUE\' | translate }}{{ \'APPLICATION_AGENT\' | translate }}{{ \'APPLICATION_CALLER\' | translate }}{{ \'APPLICATION_CALLED_AT\' | translate }}{{ \'APPLICATION_CONNECTED_AT\' | translate }}{{ \'APPLICATION_ABANDONED_AT\' | translate }}
\n {{queue.uniqueid}}{{queue.queue}}{{queue.connectedlinename ? queue.connectedlinename + \' [\' + queue.connectedlinenum + \']\' : queue.connectedlinenum }}{{queue.calleridname ? queue.calleridname + \' [\' + queue.calleridnum + \']\' : queue.calleridnum }}\n \n \n \n \n \n
\n No queues available\n
\n \n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n \n
\n \n
\n
\n\n'),a.put("app/channels/voice/realtime/view/queue/pause.modal.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/queue/queue.add.modal.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/queue/queue.html",'\n
\n
\n
Selection from a modal: {{ selected }}
\n \n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n \n {{$select.selected.name}}\n \n
\n
\n
\n
\n
\n \n
\n
\n
{{ \'APPLICATION_QUEUE\' | translate }}{{ \'APPLICATION_AGENT\' | translate }}{{ \'APPLICATION_LAST_LOGIN\' | translate }}{{ \'APPLICATION_LAST_PAUSE\' | translate }}{{ \'APPLICATION_LAST_INCOMING_CALL\' | translate }}{{ \'APPLICATION_SERVED\' | translate }}
{{group.queue}}\n \n \n \n \n {{agent.membername}}\n \n \n \n \n \n {{agent.paused ? \'(\' + agent.reason + \')\' : \'\'}}\n \n \n \n {{agent.callstaken}}\n \n \n \n \n \n \n \n
\n \n \n \n \n {{agent.membername}}\n \n \n \n \n \n {{agent.paused ? \'(\' + agent.reason + \')\' : \'\'}}\n \n \n \n {{agent.callstaken}}\n \n \n \n
\n \n \n \n \n {{agent.membername}}\n \n \n \n \n \n {{agent.paused ? \'(\' + agent.reason + \')\' : \'\'}}\n \n \n \n {{agent.callstaken}}\n \n \n \n
\n No agents available\n
\n
\n \n \n
\n
\n \n
\n \n
\n\n
\n\n'),a.put("app/channels/voice/realtime/view/queue/queue.modal.add.html",'\n\n\n'), -a.put("app/channels/voice/realtime/view/queue/queue.modal.remove.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/queue/queue.remove.modal.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/telephone/telephone.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/realtime/view/telephone/telephone.modal.info.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/view.html",'\n\n\n'),a.put("app/channels/voice/recording/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_RECORDINGS\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/route/inbound/list/create.modal.html",'\n\n\n\n'),a.put("app/channels/voice/route/inbound/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_INBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/route/inbound/view/view.applications.html",'
\n
\n
\n
\n
\n
\n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n
\n
\n
\n'),a.put("app/channels/voice/route/inbound/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{route.exten}}\n
\n \n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n \n
\n
\n\n"),a.put("app/channels/voice/route/inbound/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_INBOUND\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
\n \n
\n\n
\n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n
\n \n\n
\n
\n
\n
\n
\n'),a.put("app/channels/voice/route/internal/list/create.modal.html",'\n\n\n\n'),a.put("app/channels/voice/route/internal/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_INTERNAL\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/route/internal/view/view.applications.html",'
\n
\n
\n
\n
\n
\n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n
\n
\n
\n'),a.put("app/channels/voice/route/internal/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{route.exten}}\n
\n \n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n \n
\n
\n\n"),a.put("app/channels/voice/route/internal/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_INTERNAL\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
\n \n
\n\n
\n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n
\n \n\n
\n
\n
\n
\n
\n'), -a.put("app/channels/voice/route/outbound/list/create.modal.html",'\n\n\n\n'),a.put("app/channels/voice/route/outbound/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_OUTBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/route/outbound/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{route.exten}}\n
\n \n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n \n
\n
\n\n"),a.put("app/channels/voice/route/outbound/view/view.route.html",'
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_NEW_ROUTE\' | translate }} WIZARD \n
\n
\n
\n
\n {{(main.app | capitalize) || \'Application\'}}\n
\n \n \n
\n \n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_TRUNKS\' | translate}}\n

\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n\n \n
\n \n \' placeholder=\'"name" \' class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n \n {{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_OUTBOUND_PREFIX\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n
\n \n
\n \n \n \n
\n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(intType.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n \n
\n
\n
to
\n
\n \n
\n
\n \n\n \n
\n \n
\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(weekDay.name)}}\n \n \n to\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(weekDay.name)}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(month.name)}}\n \n \n to\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(month.name)}}\n \n \n
\n
\n \n
\n\n
\n\n \n
\n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(interval.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n\n \n \n
\n
\n\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n \n
\n
\n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/route/outbound/view/view.routeSettings.html",'\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_APPLICATION_SETTINGS\' | translate }} WIZARD \n
\n
\n
\n \n
\n {{(main.app | capitalize) || \'Application\'}}\n
\n \n
\n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_TRUNKS\' | translate}}\n

\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n \n \n\n \n
\n \n \' placeholder=\'"name" \' class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n \n {{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }} "name" <number>\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_OUTBOUND_PREFIX\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n
\n \n
\n \n \n \n
\n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(intType.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n \n
\n
\n
to
\n
\n \n
\n
\n \n\n \n
\n \n
\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(weekDay.name)}}\n \n \n to\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(weekDay.name)}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(month.name)}}\n \n \n to\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(month.name)}}\n \n \n
\n
\n \n
\n\n
\n\n \n
\n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(interval.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n \n
\n
\n\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n \n
\n
\n
\n
\n \n
\n
\n\n'), +a.put("app/channels/voice/realtime/view/agent/agent.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/queue/queue.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/realtime/view/telephone/telephone.html",'\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/realtime/view/telephone/telephone.modal.info.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/view.html",'\n\n\n'),a.put("app/channels/voice/recording/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_RECORDINGS\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/route/inbound/list/create.modal.html",'\n\n\n\n'),a.put("app/channels/voice/route/inbound/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_INBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/route/inbound/view/view.applications.html",'
\n
\n
\n
\n
\n
\n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n
\n
\n
\n'),a.put("app/channels/voice/route/inbound/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{route.exten}}\n
\n \n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n \n
\n
\n\n"),a.put("app/channels/voice/route/inbound/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_INBOUND\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
\n \n
\n\n
\n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n
\n \n\n
\n
\n
\n
\n
\n'),a.put("app/channels/voice/route/internal/list/create.modal.html",'\n\n\n\n'),a.put("app/channels/voice/route/internal/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_INTERNAL\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/route/internal/view/view.applications.html",'
\n
\n
\n
\n
\n
\n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n
\n
\n
\n'),a.put("app/channels/voice/route/internal/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{route.exten}}\n
\n \n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n \n
\n
\n\n"),a.put("app/channels/voice/route/internal/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_INTERNAL\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
\n \n
\n\n
\n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n
\n \n\n
\n
\n
\n
\n
\n'),a.put("app/channels/voice/route/outbound/list/create.modal.html",'\n\n\n\n'), +a.put("app/channels/voice/route/outbound/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_OUTBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/route/outbound/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{route.exten}}\n
\n \n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n \n
\n
\n\n"),a.put("app/channels/voice/route/outbound/view/view.route.html",'
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_NEW_ROUTE\' | translate }} WIZARD \n
\n
\n
\n
\n {{(main.app | capitalize) || \'Application\'}}\n
\n \n \n
\n \n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_TRUNKS\' | translate}}\n

\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n\n \n
\n \n \' placeholder=\'"name" \' class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n \n {{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_OUTBOUND_PREFIX\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n
\n \n
\n \n \n \n
\n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(intType.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n \n
\n
\n
to
\n
\n \n
\n
\n \n\n \n
\n \n
\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(weekDay.name)}}\n \n \n to\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(weekDay.name)}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(month.name)}}\n \n \n to\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(month.name)}}\n \n \n
\n
\n \n
\n\n
\n\n \n
\n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(interval.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n\n \n \n
\n
\n\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n \n
\n
\n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/route/outbound/view/view.routeSettings.html",'\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_APPLICATION_SETTINGS\' | translate }} WIZARD \n
\n
\n
\n \n
\n {{(main.app | capitalize) || \'Application\'}}\n
\n \n
\n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_TRUNKS\' | translate}}\n

\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n \n \n\n \n
\n \n \' placeholder=\'"name" \' class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n \n {{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }} "name" <number>\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n
\n \n\n \n
\n \n \n \n {{ \'DESCRIPTION_OUTBOUND_PREFIX\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n
\n \n
\n \n \n \n
\n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(intType.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n \n
\n
\n
to
\n
\n \n
\n
\n \n\n \n
\n \n
\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(weekDay.name)}}\n \n \n to\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(weekDay.name)}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(month.name)}}\n \n \n to\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(month.name)}}\n \n \n
\n
\n \n
\n\n
\n\n \n
\n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(interval.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n \n
\n
\n\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n \n
\n
\n
\n
\n \n
\n
\n\n'), a.put("app/channels/voice/route/outbound/view/view.routes.html",'
\n
\n
\n
\n
\n
\n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n
\n
\n
\n'),a.put("app/channels/voice/route/outbound/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_OUTBOUND\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
\n \n
\n\n
\n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n\n \n
\n
\n \n\n
\n
\n
\n
\n
\n'),a.put("app/channels/voice/route/view.application.html",'\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_NEW_APPLICATION\' | translate }} WIZARD \n
\n
\n
\n \n
\n {{(main.app | capitalize) || \'Application\'}}\n
\n \n
\n \n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.display_name}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n
\n \n
\n \n \n {{$select.selected.display_name}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n \n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_PROJECTS_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_PROJECTS\' | translate}}\n

\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n \n
\n \n \n {{$select.selected.name | translate}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n \n
\n \n \n {{$select.selected.mailbox}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_VOICEMAILS_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_VOICEMAILS\' | translate}}\n

\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n
\n \n
\n \n \n \n
\n \n \n {{$select.selected.name | translate}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n \n
\n
\n
to
\n
\n \n
\n
\n \n\n \n
\n \n
\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(weekDay.name)}}\n \n \n to\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(weekDay.name)}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(month.name)}}\n \n \n to\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(month.name)}}\n \n \n
\n
\n \n
\n\n
\n\n \n
\n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(interval.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n \n
\n
\n\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n \n
\n
\n
\n
\n \n
\n
\n\n\n'), a.put("app/channels/voice/route/view.applicationSettings.html",'\n
\n
\n \n
\n
\n
\n \n {{ \'APPLICATION_APPLICATION_SETTINGS\' | translate }} WIZARD \n
\n
\n
\n \n
\n {{(main.app | capitalize) || \'Application\'}}\n
\n \n
\n\n \n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$translate.instant($item.name)}}\n \n {{$translate.instant(queueOpt.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.display_name}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n
\n \n
\n \n \n {{$select.selected.display_name}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(audioOpt.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n \n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_PROJECTS_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_PROJECTS\' | translate}}\n

\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n \n \n\n
\n
\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n \n
\n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(hangupCause.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n
\n \n
\n \n \n {{$select.selected.mailbox}}\n \n
\n
\n
\n
\n

Warning!

\n

\n {{ \'MESSAGE_NO_VOICEMAILS_AVAILABLE\' | translate }}\n

\n

\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_VOICEMAILS\' | translate}}\n

\n
\n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n
\n \n
\n \n \n \n
\n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(intType.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n
\n \n
\n \n
\n
\n
to
\n
\n \n
\n
\n \n\n \n
\n \n
\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(weekDay.name)}}\n \n \n to\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(weekDay.name)}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
\n
\n \n\n \n
\n \n
\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(month.name)}}\n \n \n to\n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(month.name)}}\n \n \n
\n
\n \n
\n\n
\n\n \n
\n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(interval.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n
\n \n \n
\n
\n\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n \n
\n
\n
\n
\n \n
\n
\n\n'), a.put("app/channels/voice/voicemail/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_VOICEMAILS\' | translate }} \n
\n \n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/voicemail/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{voicemail.mailbox}}\n
\n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/channels/voice/voicemail/view/view.messages.html",'
\n
\n
\n
\n
\n \n {{\'APPLICATION_MESSAGES\' | translate}}\n
\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n
\n
\n'),a.put("app/channels/voice/voicemail/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_VOICEMAIL\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
\n \n
\n\n
\n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n {{$select.selected.name}}\n \n
\n
\n
\n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n \n \n \n \n\n
\n
\n
\n
\n
\n'),a.put("app/channels/voice/voicemail/wizard/wizard.html",'
\n \n \n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_VOICEMAIL\' | translate }} WIZARD \n
\n
\n
\n \n \n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n
\n\n \n

{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

\n \n \n
\n
\n
\n
\n \n
\n'),a.put("app/contactmanager/company/list/create.modal.html",'\n\n\n'),a.put("app/contactmanager/company/list/list.html",'\n
\n
\n \n\n \n
\n
\n
\n \n {{ \'APPLICATION_COMPANIES\' | translate }} \n
\n
\n \n
\n \n
\n \n
\n
\n
\n \n
\n
{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
\n
\n \n
\n
\n \n
\n
\n\n'),a.put("app/contactmanager/company/view/view.html",'\n
\n
\n \n\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n {{company.name}}\n
\n \n
\n \n\n \n \n \n
\n \n
\n \n \n
\n
\n \n
\n
\n\n'),a.put("app/contactmanager/company/view/view.settings.html",'
\n
\n
\n
\n
\n \n {{ \'APPLICATION_COMPANY\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
\n \n
\n\n
\n
\n \n
\n
\n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n
\n \n \n
\n
\n \n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n \n
\n
\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n\n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n \n
\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
\n \n \n
\n
\n
\n
\n
\n
\n'), @@ -49,5 +48,5 @@ a.put("app/tools/tag/list/list.create.modal.html",''),h=angular.element(g.children()[0]);h.attr("href",a.URL.createObjectURL(d)),h.attr("download",b.getFilename()),h.attr("target","_blank"),e.find("body").append(g),f(function(){h[0].click(),h.remove()},null)}}c.bind("click",function(){b.buildCSV().then(function(){d()}),b.$apply()})}}}])}(window,document),function(angular){"use strict";if(!angular)throw"Missing something? Please add angular.js to your project or move this script below the angular.js reference";var directiveId="ngRemoteValidate",remoteValidate=function($http,$timeout,$q){return{restrict:"A",require:["^form","ngModel"],scope:{ngRemoteInterceptors:"=?"},link:function(scope,el,attrs,ctrls){var cache={},handleChange,setValidation,addToCache,request,shouldProcess,ngForm=ctrls[0],ngModel=ctrls[1],options={ngRemoteThrottle:400,ngRemoteMethod:"POST"};angular.extend(options,attrs),"["===options.ngRemoteValidate.charAt(0)?options.urls=eval(options.ngRemoteValidate):"{"===options.ngRemoteValidate.charAt(0)?(options.keys=eval("("+options.ngRemoteValidate+")"),options.urls=Object.keys(options.keys)):options.urls=[options.ngRemoteValidate],addToCache=function(a){var b=a[0].data.value;return cache[b]?cache[b]:void(cache[b]=a)},shouldProcess=function(a){var b=!1;for(var c in ngModel.$error){var d=!options.hasOwnProperty("keys")||!Object.keys(options.keys).filter(function(a){return options.keys[a]===c})[0];if(ngModel.$error[c]&&c!=directiveId&&d){b=!0;break}}return!(ngModel.$pristine||b)},setValidation=function(a,b){for(var c=0,d=a.length,e=options.hasOwnProperty("keys"),f=!0;d>c&&(scope.ngRemoteInterceptors&&scope.ngRemoteInterceptors.response&&(a[c]=scope.ngRemoteInterceptors.response(a[c])),a[c].data.isValid||(f=!1,e));c++){var g=e&&a[c].hasOwnProperty("config")&&options.keys[a[c].config.url];if(g){var h=options.keys[a[c].config.url];ngModel.$setValidity(h,a[c].data.isValid)}}b||addToCache(a),ngModel.$setValidity(directiveId,f),ngModel.$processing=ngModel.$pending=ngForm.$pending=!1},handleChange=function(a){return"undefined"==typeof a||""===a?void ngModel.$setPristine():shouldProcess(a)?cache[a]?setValidation(cache[a],!0):(ngModel.$pending||(ngModel.$processing=ngModel.$pending=ngForm.$pending=!0),request&&$timeout.cancel(request),request=$timeout(function(){var b=[],c=0,d=options.urls.length,e={value:a},f={method:options.ngRemoteMethod};for(scope[el[0].name+"SetArgs"]&&(e=scope[el[0].name+"SetArgs"](a,el,attrs,ngModel)),"POST"==options.ngRemoteMethod?f.data=e:f.params=e;d>c;c++)f.url=options.urls[c],scope.ngRemoteInterceptors&&scope.ngRemoteInterceptors.request&&(f=scope.ngRemoteInterceptors.request(f)),b.push($http(f));$q.all(b).then(setValidation)},options.ngRemoteThrottle),!0):setValidation([{data:{isValid:!0,value:a}}],!0)},scope.$watch(function(){return ngModel.$viewValue},handleChange)}}};angular.module("remoteValidation",[]).constant("MODULE_VERSION","0.6.1").directive(directiveId,["$http","$timeout","$q",remoteValidate])}(this.angular),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),function(a){"undefined"!=typeof module&&module.exports?module.exports=a:a(jQuery,window,document)}(function(a){!function(b){var c="function"==typeof define&&define.amd,d="undefined"!=typeof module&&module.exports,e="https:"==document.location.protocol?"https:":"http:",f="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";c||(d?require("jquery-mousewheel")(a):a.event.special.mousewheel||a("head").append(decodeURI("%3Cscript src="+e+"//"+f+"%3E%3C/script%3E"))),b()}(function(){var b,c="mCustomScrollbar",d="mCS",e=".mCustomScrollbar",f={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},g=0,h={},i=window.attachEvent&&!window.addEventListener?1:0,j=!1,k=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],l={init:function(b){var b=a.extend(!0,{},f,b),c=m.call(this);if(b.live){var i=b.liveSelector||this.selector||e,j=a(i);if("off"===b.live)return void o(i);h[i]=setTimeout(function(){j.mCustomScrollbar(b),"once"===b.live&&j.length&&o(i)},500)}else o(i);return b.setWidth=b.set_width?b.set_width:b.setWidth,b.setHeight=b.set_height?b.set_height:b.setHeight,b.axis=b.horizontalScroll?"x":p(b.axis),b.scrollInertia=b.scrollInertia>0&&b.scrollInertia<17?17:b.scrollInertia,"object"!=typeof b.mouseWheel&&1==b.mouseWheel&&(b.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),b.mouseWheel.scrollAmount=b.mouseWheelPixels?b.mouseWheelPixels:b.mouseWheel.scrollAmount,b.mouseWheel.normalizeDelta=b.advanced.normalizeMouseWheelDelta?b.advanced.normalizeMouseWheelDelta:b.mouseWheel.normalizeDelta,b.scrollButtons.scrollType=q(b.scrollButtons.scrollType),n(b),a(c).each(function(){var c=a(this);if(!c.data(d)){c.data(d,{idx:++g,opt:b,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:c.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=c.data(d),f=e.opt,h=c.data("mcs-axis"),i=c.data("mcs-scrollbar-position"),j=c.data("mcs-theme");h&&(f.axis=h),i&&(f.scrollbarPosition=i),j&&(f.theme=j,n(f)),r.call(this),e&&f.callbacks.onCreate&&"function"==typeof f.callbacks.onCreate&&f.callbacks.onCreate.call(this),a("#mCSB_"+e.idx+"_container img:not(."+k[2]+")").addClass(k[2]),l.update.call(null,c)}})},update:function(b,c){var e=b||m.call(this);return a(e).each(function(){var b=a(this);if(b.data(d)){var e=b.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container"),h=a("#mCSB_"+e.idx),i=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];if(!g.length)return;e.tweenRunning&&U(b),c&&e&&f.callbacks.onBeforeUpdate&&"function"==typeof f.callbacks.onBeforeUpdate&&f.callbacks.onBeforeUpdate.call(this),b.hasClass(k[3])&&b.removeClass(k[3]),b.hasClass(k[4])&&b.removeClass(k[4]),h.css("max-height","none"),h.height()!==b.height()&&h.css("max-height",b.height()),t.call(this),"y"===f.axis||f.advanced.autoExpandHorizontalScroll||g.css("width",s(g)),e.overflowed=y.call(this),C.call(this),f.autoDraggerLength&&v.call(this),w.call(this),A.call(this);var j=[Math.abs(g[0].offsetTop),Math.abs(g[0].offsetLeft)];"x"!==f.axis&&(e.overflowed[0]?i[0].height()>i[0].parent().height()?z.call(this):(V(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(z.call(this),"y"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[1]&&V(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==f.axis&&(e.overflowed[1]?i[1].width()>i[1].parent().width()?z.call(this):(V(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(z.call(this),"x"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[0]&&V(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),c&&e&&(2===c&&f.callbacks.onImageLoad&&"function"==typeof f.callbacks.onImageLoad?f.callbacks.onImageLoad.call(this):3===c&&f.callbacks.onSelectorChange&&"function"==typeof f.callbacks.onSelectorChange?f.callbacks.onSelectorChange.call(this):f.callbacks.onUpdate&&"function"==typeof f.callbacks.onUpdate&&f.callbacks.onUpdate.call(this)),S.call(this)}})},scrollTo:function(b,c){if("undefined"!=typeof b&&null!=b){var e=m.call(this);return a(e).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h={trigger:"external",scrollInertia:g.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=a.extend(!0,{},h,c),j=Q.call(this,b),k=i.scrollInertia>0&&i.scrollInertia<17?17:i.scrollInertia;j[0]=R.call(this,j[0],"y"),j[1]=R.call(this,j[1],"x"),i.moveDragger&&(j[0]*=f.scrollRatio.y,j[1]*=f.scrollRatio.x),i.dur=ca()?0:k,setTimeout(function(){null!==j[0]&&"undefined"!=typeof j[0]&&"x"!==g.axis&&f.overflowed[0]&&(i.dir="y",i.overwrite="all",V(e,j[0].toString(),i)),null!==j[1]&&"undefined"!=typeof j[1]&&"y"!==g.axis&&f.overflowed[1]&&(i.dir="x",i.overwrite="none",V(e,j[1].toString(),i))},i.timeout)}})}},stop:function(){var b=m.call(this);return a(b).each(function(){var b=a(this);b.data(d)&&U(b)})},disable:function(b){var c=m.call(this);return a(c).each(function(){var c=a(this);if(c.data(d)){c.data(d);S.call(this,"remove"),B.call(this),b&&z.call(this),C.call(this,!0),c.addClass(k[3])}})},destroy:function(){var b=m.call(this);return a(b).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx),i=a("#mCSB_"+f.idx+"_container"),j=a(".mCSB_"+f.idx+"_scrollbar");g.live&&o(g.liveSelector||a(b).selector),S.call(this,"remove"),B.call(this),z.call(this),e.removeData(d),Z(this,"mcs"),j.remove(),i.find("img."+k[2]).removeClass(k[2]),h.replaceWith(i.contents()),e.removeClass(c+" _"+d+"_"+f.idx+" "+k[6]+" "+k[7]+" "+k[5]+" "+k[3]).addClass(k[4])}})}},m=function(){return"object"!=typeof a(this)||a(this).length<1?e:this},n=function(b){var c=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],d=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],e=["minimal","minimal-dark"],f=["minimal","minimal-dark"],g=["minimal","minimal-dark"];b.autoDraggerLength=a.inArray(b.theme,c)>-1?!1:b.autoDraggerLength,b.autoExpandScrollbar=a.inArray(b.theme,d)>-1?!1:b.autoExpandScrollbar,b.scrollButtons.enable=a.inArray(b.theme,e)>-1?!1:b.scrollButtons.enable,b.autoHideScrollbar=a.inArray(b.theme,f)>-1?!0:b.autoHideScrollbar,b.scrollbarPosition=a.inArray(b.theme,g)>-1?"outside":b.scrollbarPosition},o=function(a){h[a]&&(clearTimeout(h[a]),Z(h,a))},p=function(a){return"yx"===a||"xy"===a||"auto"===a?"yx":"x"===a||"horizontal"===a?"x":"y"},q=function(a){return"stepped"===a||"pixels"===a||"step"===a||"click"===a?"stepped":"stepless"},r=function(){var b=a(this),e=b.data(d),f=e.opt,g=f.autoExpandScrollbar?" "+k[1]+"_expand":"",h=["
","
"],i="yx"===f.axis?"mCSB_vertical_horizontal":"x"===f.axis?"mCSB_horizontal":"mCSB_vertical",j="yx"===f.axis?h[0]+h[1]:"x"===f.axis?h[1]:h[0],l="yx"===f.axis?"
":"",m=f.autoHideScrollbar?" "+k[6]:"",n="x"!==f.axis&&"rtl"===e.langDir?" "+k[7]:"";f.setWidth&&b.css("width",f.setWidth),f.setHeight&&b.css("height",f.setHeight),f.setLeft="y"!==f.axis&&"rtl"===e.langDir?"989999px":f.setLeft,b.addClass(c+" _"+d+"_"+e.idx+m+n).wrapInner("
");var o=a("#mCSB_"+e.idx),p=a("#mCSB_"+e.idx+"_container");"y"===f.axis||f.advanced.autoExpandHorizontalScroll||p.css("width",s(p)),"outside"===f.scrollbarPosition?("static"===b.css("position")&&b.css("position","relative"),b.css("overflow","visible"),o.addClass("mCSB_outside").after(j)):(o.addClass("mCSB_inside").append(j),p.wrap(l)),u.call(this);var q=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];q[0].css("min-height",q[0].height()),q[1].css("min-width",q[1].width())},s=function(b){var c=[b[0].scrollWidth,Math.max.apply(Math,b.children().map(function(){return a(this).outerWidth(!0)}).get())],d=b.parent().width();return c[0]>d?c[0]:c[1]>d?c[1]:"100%"},t=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx+"_container");if(e.advanced.autoExpandHorizontalScroll&&"y"!==e.axis){f.css({width:"auto","min-width":0,"overflow-x":"scroll"});var g=Math.ceil(f[0].scrollWidth);3===e.advanced.autoExpandHorizontalScroll||2!==e.advanced.autoExpandHorizontalScroll&&g>f.parent().width()?f.css({width:g,"min-width":"100%","overflow-x":"inherit"}):f.css({"overflow-x":"inherit",position:"absolute"}).wrap("
").css({width:Math.ceil(f[0].getBoundingClientRect().right+.4)-Math.floor(f[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},u=function(){ -var b=a(this),c=b.data(d),e=c.opt,f=a(".mCSB_"+c.idx+"_scrollbar:first"),g=aa(e.scrollButtons.tabindex)?"tabindex='"+e.scrollButtons.tabindex+"'":"",h=["","","",""],i=["x"===e.axis?h[2]:h[0],"x"===e.axis?h[3]:h[1],h[2],h[3]];e.scrollButtons.enable&&f.prepend(i[0]).append(i[1]).next(".mCSB_scrollTools").prepend(i[2]).append(i[3])},v=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[e.height()/f.outerHeight(!1),e.width()/f.outerWidth(!1)],j=[parseInt(g[0].css("min-height")),Math.round(h[0]*g[0].parent().height()),parseInt(g[1].css("min-width")),Math.round(h[1]*g[1].parent().width())],k=i&&j[1]g&&(g=i),j>h&&(h=j),[g>e.height(),h>e.width()]},z=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx),g=a("#mCSB_"+c.idx+"_container"),h=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")];if(U(b),("x"!==e.axis&&!c.overflowed[0]||"y"===e.axis&&c.overflowed[0])&&(h[0].add(g).css("top",0),V(b,"_resetY")),"y"!==e.axis&&!c.overflowed[1]||"x"===e.axis&&c.overflowed[1]){var i=dx=0;"rtl"===c.langDir&&(i=f.width()-g.outerWidth(!1),dx=Math.abs(i/c.scrollRatio.x)),g.css("left",i),h[1].css("left",dx),V(b,"_resetX")}},A=function(){function b(){g=setTimeout(function(){a.event.special.mousewheel?(clearTimeout(g),H.call(c[0])):b()},100)}var c=a(this),e=c.data(d),f=e.opt;if(!e.bindEvents){if(E.call(this),f.contentTouchScroll&&F.call(this),G.call(this),f.mouseWheel.enable){var g;b()}K.call(this),M.call(this),f.advanced.autoScrollOnFocus&&L.call(this),f.scrollButtons.enable&&N.call(this),f.keyboard.enable&&O.call(this),e.bindEvents=!0}},B=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=".mCSB_"+c.idx+"_scrollbar",h=a("#mCSB_"+c.idx+",#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,"+g+" ."+k[12]+",#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal,"+g+">a"),i=a("#mCSB_"+c.idx+"_container");e.advanced.releaseDraggableSelectors&&h.add(a(e.advanced.releaseDraggableSelectors)),e.advanced.extraDraggableSelectors&&h.add(a(e.advanced.extraDraggableSelectors)),c.bindEvents&&(a(document).add(a(!I()||top.document)).unbind("."+f),h.each(function(){a(this).unbind("."+f)}),clearTimeout(b[0]._focusTimeout),Z(b[0],"_focusTimeout"),clearTimeout(c.sequential.step),Z(c.sequential,"step"),clearTimeout(i[0].onCompleteTimeout),Z(i[0],"onCompleteTimeout"),c.bindEvents=!1)},C=function(b){var c=a(this),e=c.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container_wrapper"),h=g.length?g:a("#mCSB_"+e.idx+"_container"),i=[a("#mCSB_"+e.idx+"_scrollbar_vertical"),a("#mCSB_"+e.idx+"_scrollbar_horizontal")],j=[i[0].find(".mCSB_dragger"),i[1].find(".mCSB_dragger")];"x"!==f.axis&&(e.overflowed[0]&&!b?(i[0].add(j[0]).add(i[0].children("a")).css("display","block"),h.removeClass(k[8]+" "+k[10])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[0].css("display","none"),h.removeClass(k[10])):(i[0].css("display","none"),h.addClass(k[10])),h.addClass(k[8]))),"y"!==f.axis&&(e.overflowed[1]&&!b?(i[1].add(j[1]).add(i[1].children("a")).css("display","block"),h.removeClass(k[9]+" "+k[11])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[1].css("display","none"),h.removeClass(k[11])):(i[1].css("display","none"),h.addClass(k[11])),h.addClass(k[9]))),e.overflowed[0]||e.overflowed[1]?c.removeClass(k[5]):c.addClass(k[5])},D=function(b){var c=b.type,d=b.target.ownerDocument!==document?[a(frameElement).offset().top,a(frameElement).offset().left]:null,e=I()&&b.target.ownerDocument!==top.document?[a(b.view.frameElement).offset().top,a(b.view.frameElement).offset().left]:[0,0];switch(c){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return d?[b.originalEvent.pageY-d[0]+e[0],b.originalEvent.pageX-d[1]+e[1],!1]:[b.originalEvent.pageY,b.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var f=b.originalEvent.touches[0]||b.originalEvent.changedTouches[0],g=b.originalEvent.touches.length||b.originalEvent.changedTouches.length;return b.target.ownerDocument!==document?[f.screenY,f.screenX,g>1]:[f.pageY,f.pageX,g>1];default:return d?[b.pageY-d[0]+e[0],b.pageX-d[1]+e[1],!1]:[b.pageY,b.pageX,!1]}},E=function(){function b(a){var b=o.find("iframe");if(b.length){var c=a?"auto":"none";b.css("pointer-events",c)}}function c(a,b,c,d){if(o[0].idleTimer=l.scrollInertia<233?250:0,e.attr("id")===n[1])var f="x",g=(e[0].offsetLeft-b+d)*k.scrollRatio.x;else var f="y",g=(e[0].offsetTop-a+c)*k.scrollRatio.y;V(h,g.toString(),{dir:f,drag:!0})}var e,f,g,h=a(this),k=h.data(d),l=k.opt,m=d+"_"+k.idx,n=["mCSB_"+k.idx+"_dragger_vertical","mCSB_"+k.idx+"_dragger_horizontal"],o=a("#mCSB_"+k.idx+"_container"),p=a("#"+n[0]+",#"+n[1]),q=l.advanced.releaseDraggableSelectors?p.add(a(l.advanced.releaseDraggableSelectors)):p,r=l.advanced.extraDraggableSelectors?a(!I()||top.document).add(a(l.advanced.extraDraggableSelectors)):a(!I()||top.document);p.bind("mousedown."+m+" touchstart."+m+" pointerdown."+m+" MSPointerDown."+m,function(c){if(c.stopImmediatePropagation(),c.preventDefault(),$(c)){j=!0,i&&(document.onselectstart=function(){return!1}),b(!1),U(h),e=a(this);var d=e.offset(),k=D(c)[0]-d.top,m=D(c)[1]-d.left,n=e.height()+d.top,o=e.width()+d.left;n>k&&k>0&&o>m&&m>0&&(f=k,g=m),x(e,"active",l.autoExpandScrollbar)}}).bind("touchmove."+m,function(a){a.stopImmediatePropagation(),a.preventDefault();var b=e.offset(),d=D(a)[0]-b.top,h=D(a)[1]-b.left;c(f,g,d,h)}),a(document).add(r).bind("mousemove."+m+" pointermove."+m+" MSPointerMove."+m,function(a){if(e){var b=e.offset(),d=D(a)[0]-b.top,h=D(a)[1]-b.left;if(f===d&&g===h)return;c(f,g,d,h)}}).add(q).bind("mouseup."+m+" touchend."+m+" pointerup."+m+" MSPointerUp."+m,function(a){e&&(x(e,"active",l.autoExpandScrollbar),e=null),j=!1,i&&(document.onselectstart=null),b(!0)})},F=function(){function c(a){if(!_(a)||j||D(a)[2])return void(b=0);b=1,w=0,x=0,k=1,y.removeClass("mCS_touch_action");var c=E.offset();l=D(a)[0]-c.top,m=D(a)[1]-c.left,L=[D(a)[0],D(a)[1]]}function e(a){if(_(a)&&!j&&!D(a)[2]&&(A.documentTouchScroll||a.preventDefault(),a.stopImmediatePropagation(),(!x||w)&&k)){q=X();var b=C.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left,e="mcsLinearOut";if(G.push(c),H.push(d),L[2]=Math.abs(D(a)[0]-L[0]),L[3]=Math.abs(D(a)[1]-L[1]),z.overflowed[0])var f=F[0].parent().height()-F[0].height(),g=l-c>0&&c-l>-(f*z.scrollRatio.y)&&(2*L[3]0&&d-m>-(h*z.scrollRatio.x)&&(2*L[2]30)){t=1e3/(r-p);var e="mcsEaseOut",f=2.5>t,g=f?[G[G.length-2],H[H.length-2]]:[0,0];s=f?[c-g[0],d-g[1]]:[c-n,d-o];var l=[Math.abs(s[0]),Math.abs(s[1])];t=f?[Math.abs(s[0]/4),Math.abs(s[1]/4)]:[t,t];var m=[Math.abs(E[0].offsetTop)-s[0]*h(l[0]/t[0],t[0]),Math.abs(E[0].offsetLeft)-s[1]*h(l[1]/t[1],t[1])];u="yx"===A.axis?[m[0],m[1]]:"x"===A.axis?[null,m[1]]:[m[0],null],v=[4*l[0]+A.scrollInertia,4*l[1]+A.scrollInertia];var y=parseInt(A.contentTouchScroll)||0;u[0]=l[0]>y?u[0]:0,u[1]=l[1]>y?u[1]:0,z.overflowed[0]&&i(u[0],v[0],e,"y",K,!1),z.overflowed[1]&&i(u[1],v[1],e,"x",K,!1)}}}function h(a,b){var c=[1.5*b,2*b,b/1.5,b/2];return a>90?b>4?c[0]:c[3]:a>60?b>3?c[3]:c[2]:a>30?b>8?c[1]:b>6?c[0]:b>4?b:c[2]:b>8?b:c[3]}function i(a,b,c,d,e,f){a&&V(y,a.toString(),{dur:b,scrollEasing:c,dir:d,overwrite:e,drag:f})}var k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=a(this),z=y.data(d),A=z.opt,B=d+"_"+z.idx,C=a("#mCSB_"+z.idx),E=a("#mCSB_"+z.idx+"_container"),F=[a("#mCSB_"+z.idx+"_dragger_vertical"),a("#mCSB_"+z.idx+"_dragger_horizontal")],G=[],H=[],J=0,K="yx"===A.axis?"none":"all",L=[],M=E.find("iframe"),N=["touchstart."+B+" pointerdown."+B+" MSPointerDown."+B,"touchmove."+B+" pointermove."+B+" MSPointerMove."+B,"touchend."+B+" pointerup."+B+" MSPointerUp."+B],O=void 0!==document.body.style.touchAction;E.bind(N[0],function(a){c(a)}).bind(N[1],function(a){e(a)}),C.bind(N[0],function(a){f(a)}).bind(N[2],function(a){g(a)}),M.length&&M.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind(N[0],function(a){c(a),f(a)}).bind(N[1],function(a){e(a)}).bind(N[2],function(a){g(a)})})})},G=function(){function c(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function e(a,b,c){k.type=c&&f?"stepped":"stepless",k.scrollAmount=10,P(g,a,b,"mcsLinearOut",c?60:null)}var f,g=a(this),h=g.data(d),i=h.opt,k=h.sequential,l=d+"_"+h.idx,m=a("#mCSB_"+h.idx+"_container"),n=m.parent();m.bind("mousedown."+l,function(a){b||f||(f=1,j=!0)}).add(document).bind("mousemove."+l,function(a){if(!b&&f&&c()){var d=m.offset(),g=D(a)[0]-d.top+m[0].offsetTop,j=D(a)[1]-d.left+m[0].offsetLeft;g>0&&g0&&jg?e("on",38):g>n.height()&&e("on",40)),"y"!==i.axis&&h.overflowed[1]&&(0>j?e("on",37):j>n.width()&&e("on",39)))}}).bind("mouseup."+l+" dragend."+l,function(a){b||(f&&(f=0,e("off",null)),j=!1)})},H=function(){function b(b,d){if(U(c),!J(c,b.target)){var g="auto"!==f.mouseWheel.deltaFactor?parseInt(f.mouseWheel.deltaFactor):i&&b.deltaFactor<100?100:b.deltaFactor||100,k=f.scrollInertia;if("x"===f.axis||"x"===f.mouseWheel.axis)var l="x",m=[Math.round(g*e.scrollRatio.x),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.width()?.9*h.width():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetLeft),p=j[1][0].offsetLeft,q=j[1].parent().width()-j[1].width(),r=b.deltaX||b.deltaY||d;else var l="y",m=[Math.round(g*e.scrollRatio.y),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.height()?.9*h.height():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetTop),p=j[0][0].offsetTop,q=j[0].parent().height()-j[0].height(),r=b.deltaY||d;"y"===l&&!e.overflowed[0]||"x"===l&&!e.overflowed[1]||((f.mouseWheel.invert||b.webkitDirectionInvertedFromDevice)&&(r=-r),f.mouseWheel.normalizeDelta&&(r=0>r?-1:1),(r>0&&0!==p||0>r&&p!==q||f.mouseWheel.preventDefault)&&(b.stopImmediatePropagation(),b.preventDefault()),b.deltaFactor<2&&!f.mouseWheel.normalizeDelta&&(n=b.deltaFactor,k=17),V(c,(o-r*n).toString(),{dir:l,dur:k}))}}if(a(this).data(d)){var c=a(this),e=c.data(d),f=e.opt,g=d+"_"+e.idx,h=a("#mCSB_"+e.idx),j=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")],k=a("#mCSB_"+e.idx+"_container").find("iframe");k.length&&k.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind("mousewheel."+g,function(a,c){b(a,c)})})}),h.bind("mousewheel."+g,function(a,c){b(a,c)})}},I=function(a){var b=null;if(a){try{var c=a.contentDocument||a.contentWindow.document;b=c.body.innerHTML}catch(d){}return null!==b}try{var c=top.document;b=c.body.innerHTML}catch(d){}return null!==b},J=function(b,c){var e=c.nodeName.toLowerCase(),f=b.data(d).opt.mouseWheel.disableOver,g=["select","textarea"];return a.inArray(e,f)>-1&&!(a.inArray(e,g)>-1&&!a(c).is(":focus"))},K=function(){var b,c=a(this),e=c.data(d),f=d+"_"+e.idx,g=a("#mCSB_"+e.idx+"_container"),h=g.parent(),i=a(".mCSB_"+e.idx+"_scrollbar ."+k[12]);i.bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(c){j=!0,a(c.target).hasClass("mCSB_dragger")||(b=1)}).bind("touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(a){j=!1}).bind("click."+f,function(d){if(b&&(b=0,a(d.target).hasClass(k[12])||a(d.target).hasClass("mCSB_draggerRail"))){U(c);var f=a(this),i=f.find(".mCSB_dragger");if(f.parent(".mCSB_scrollTools_horizontal").length>0){if(!e.overflowed[1])return;var j="x",l=d.pageX>i.offset().left?-1:1,m=Math.abs(g[0].offsetLeft)-l*(.9*h.width())}else{if(!e.overflowed[0])return;var j="y",l=d.pageY>i.offset().top?-1:1,m=Math.abs(g[0].offsetTop)-l*(.9*h.height())}V(c,m.toString(),{dir:j,scrollEasing:"mcsEaseInOut"})}})},L=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=a("#mCSB_"+c.idx+"_container"),h=g.parent();g.bind("focusin."+f,function(c){var d=a(document.activeElement),f=g.find(".mCustomScrollBox").length,i=0;d.is(e.advanced.autoScrollOnFocus)&&(U(b),clearTimeout(b[0]._focusTimeout),b[0]._focusTimer=f?(i+17)*f:0,b[0]._focusTimeout=setTimeout(function(){var a=[ba(d)[0],ba(d)[1]],c=[g[0].offsetTop,g[0].offsetLeft],f=[c[0]+a[0]>=0&&c[0]+a[0]=0&&c[0]+a[1]a");i.bind("mousedown."+g+" touchstart."+g+" pointerdown."+g+" MSPointerDown."+g+" mouseup."+g+" touchend."+g+" pointerup."+g+" MSPointerUp."+g+" mouseout."+g+" pointerout."+g+" MSPointerOut."+g+" click."+g,function(d){function g(a,c){f.scrollAmount=e.scrollButtons.scrollAmount,P(b,a,c)}if(d.preventDefault(),$(d)){var h=a(this).attr("class");switch(f.type=e.scrollButtons.scrollType,d.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===f.type)return;j=!0,c.tweenRunning=!1,g("on",h);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===f.type)return;j=!1,f.dir&&g("off",h);break;case"click":if("stepped"!==f.type||c.tweenRunning)return;g("on",h)}}})},O=function(){function b(b){function d(a,b){g.type=f.keyboard.scrollType,g.scrollAmount=f.keyboard.scrollAmount,"stepped"===g.type&&e.tweenRunning||P(c,a,b)}switch(b.type){case"blur":e.tweenRunning&&g.dir&&d("off",null);break;case"keydown":case"keyup":var h=b.keyCode?b.keyCode:b.which,i="on";if("x"!==f.axis&&(38===h||40===h)||"y"!==f.axis&&(37===h||39===h)){if((38===h||40===h)&&!e.overflowed[0]||(37===h||39===h)&&!e.overflowed[1])return;"keyup"===b.type&&(i="off"),a(document.activeElement).is(l)||(b.preventDefault(),b.stopImmediatePropagation(),d(i,h))}else if(33===h||34===h){if((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type){U(c);var m=34===h?-1:1;if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=Math.abs(j[0].offsetLeft)-m*(.9*k.width());else var n="y",o=Math.abs(j[0].offsetTop)-m*(.9*k.height());V(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}else if((35===h||36===h)&&!a(document.activeElement).is(l)&&((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type)){if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=35===h?Math.abs(k.width()-j.outerWidth(!1)):0;else var n="y",o=35===h?Math.abs(k.height()-j.outerHeight(!1)):0;V(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}}var c=a(this),e=c.data(d),f=e.opt,g=e.sequential,h=d+"_"+e.idx,i=a("#mCSB_"+e.idx),j=a("#mCSB_"+e.idx+"_container"),k=j.parent(),l="input,textarea,select,datalist,keygen,[contenteditable='true']",m=j.find("iframe"),n=["blur."+h+" keydown."+h+" keyup."+h];m.length&&m.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind(n[0],function(a){b(a)})})}),i.attr("tabindex","0").bind(n[0],function(a){b(a)})},P=function(b,c,e,f,g){function h(a){l.snapAmount&&(m.scrollAmount=l.snapAmount instanceof Array?"x"===m.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var c="stepped"!==m.type,d=g?g:a?c?p/1.5:q:1e3/60,e=a?c?7.5:40:2.5,i=[Math.abs(n[0].offsetTop),Math.abs(n[0].offsetLeft)],k=[j.scrollRatio.y>10?10:j.scrollRatio.y,j.scrollRatio.x>10?10:j.scrollRatio.x],o="x"===m.dir[0]?i[1]+m.dir[1]*(k[1]*e):i[0]+m.dir[1]*(k[0]*e),r="x"===m.dir[0]?i[1]+m.dir[1]*parseInt(m.scrollAmount):i[0]+m.dir[1]*parseInt(m.scrollAmount),s="auto"!==m.scrollAmount?r:o,t=f?f:a?c?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",u=a?!0:!1;return a&&17>d&&(s="x"===m.dir[0]?i[1]:i[0]),V(b,s.toString(),{dir:m.dir[0],scrollEasing:t,dur:d,onComplete:u}),a?void(m.dir=!1):(clearTimeout(m.step),void(m.step=setTimeout(function(){h()},d)))}function i(){clearTimeout(m.step),Z(m,"step"),U(b)}var j=b.data(d),l=j.opt,m=j.sequential,n=a("#mCSB_"+j.idx+"_container"),o="stepped"===m.type?!0:!1,p=l.scrollInertia<26?26:l.scrollInertia,q=l.scrollInertia<1?17:l.scrollInertia;switch(c){case"on":if(m.dir=[e===k[16]||e===k[15]||39===e||37===e?"x":"y",e===k[13]||e===k[15]||38===e||37===e?-1:1],U(b),aa(e)&&"stepped"===m.type)return;h(o);break;case"off":i(),(o||j.tweenRunning&&m.dir)&&h(!0)}},Q=function(b){var c=a(this).data(d).opt,e=[];return"function"==typeof b&&(b=b()),b instanceof Array?e=b.length>1?[b[0],b[1]]:"x"===c.axis?[null,b[0]]:[b[0],null]:(e[0]=b.y?b.y:b.x||"x"===c.axis?null:b,e[1]=b.x?b.x:b.y||"y"===c.axis?null:b),"function"==typeof e[0]&&(e[0]=e[0]()),"function"==typeof e[1]&&(e[1]=e[1]()),e},R=function(b,c){if(null!=b&&"undefined"!=typeof b){var e=a(this),f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx+"_container"),i=h.parent(),j=typeof b;c||(c="x"===g.axis?"x":"y");var k="x"===c?h.outerWidth(!1):h.outerHeight(!1),m="x"===c?h[0].offsetLeft:h[0].offsetTop,n="x"===c?"left":"top";switch(j){case"function":return b();case"object":var o=b.jquery?b:a(b);if(!o.length)return;return"x"===c?ba(o)[1]:ba(o)[0];case"string":case"number":if(aa(b))return Math.abs(b);if(-1!==b.indexOf("%"))return Math.abs(k*parseInt(b)/100);if(-1!==b.indexOf("-="))return Math.abs(m-parseInt(b.split("-=")[1]));if(-1!==b.indexOf("+=")){var p=m+parseInt(b.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==b.indexOf("px")&&aa(b.split("px")[0]))return Math.abs(b.split("px")[0]);if("top"===b||"left"===b)return 0;if("bottom"===b)return Math.abs(i.height()-h.outerHeight(!1));if("right"===b)return Math.abs(i.width()-h.outerWidth(!1));if("first"===b||"last"===b){var o=h.find(":"+b);return"x"===c?ba(o)[1]:ba(o)[0]}return a(b).length?"x"===c?ba(a(b))[1]:ba(a(b))[0]:(h.css(n,b),void l.update.call(null,e[0]))}}},S=function(b){function c(){return clearTimeout(m[0].autoUpdate),0===h.parents("html").length?void(h=null):void(m[0].autoUpdate=setTimeout(function(){return j.advanced.updateOnSelectorChange&&(i.poll.change.n=f(),i.poll.change.n!==i.poll.change.o)?(i.poll.change.o=i.poll.change.n,void g(3)):j.advanced.updateOnContentResize&&(i.poll.size.n=h[0].scrollHeight+h[0].scrollWidth+m[0].offsetHeight+h[0].offsetHeight+h[0].offsetWidth,i.poll.size.n!==i.poll.size.o)?(i.poll.size.o=i.poll.size.n,void g(1)):!j.advanced.updateOnImageLoad||"auto"===j.advanced.updateOnImageLoad&&"y"===j.axis||(i.poll.img.n=m.find("img").length,i.poll.img.n===i.poll.img.o)?void((j.advanced.updateOnSelectorChange||j.advanced.updateOnContentResize||j.advanced.updateOnImageLoad)&&c()):(i.poll.img.o=i.poll.img.n,void m.find("img").each(function(){e(this)}))},j.advanced.autoUpdateTimeout))}function e(b){function c(a,b){return function(){return b.apply(a,arguments)}}function d(){this.onload=null,a(b).addClass(k[2]),g(2)}if(a(b).hasClass(k[2]))return void g();var e=new Image;e.onload=c(e,d),e.src=b.src}function f(){j.advanced.updateOnSelectorChange===!0&&(j.advanced.updateOnSelectorChange="*");var a=0,b=m.find(j.advanced.updateOnSelectorChange);return j.advanced.updateOnSelectorChange&&b.length>0&&b.each(function(){a+=this.offsetHeight+this.offsetWidth}),a}function g(a){clearTimeout(m[0].autoUpdate),l.update.call(null,h[0],a)}var h=a(this),i=h.data(d),j=i.opt,m=a("#mCSB_"+i.idx+"_container");return b?(clearTimeout(m[0].autoUpdate),void Z(m[0],"autoUpdate")):void c()},T=function(a,b,c){return Math.round(a/b)*b-c},U=function(b){var c=b.data(d),e=a("#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal");e.each(function(){Y.call(this)})},V=function(b,c,e){function f(a){return i&&j.callbacks[a]&&"function"==typeof j.callbacks[a]}function g(){return[j.callbacks.alwaysTriggerOffsets||u>=v[0]+y,j.callbacks.alwaysTriggerOffsets||-z>=u]}function h(){var a=[n[0].offsetTop,n[0].offsetLeft],c=[s[0].offsetTop,s[0].offsetLeft],d=[n.outerHeight(!1),n.outerWidth(!1)],f=[m.height(),m.width()];b[0].mcs={content:n,top:a[0],left:a[1],draggerTop:c[0],draggerLeft:c[1],topPct:Math.round(100*Math.abs(a[0])/(Math.abs(d[0])-f[0])),leftPct:Math.round(100*Math.abs(a[1])/(Math.abs(d[1])-f[1])),direction:e.dir}}var i=b.data(d),j=i.opt,k={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:j.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},e=a.extend(k,e),l=[e.dur,e.drag?0:e.dur],m=a("#mCSB_"+i.idx),n=a("#mCSB_"+i.idx+"_container"),o=n.parent(),p=j.callbacks.onTotalScrollOffset?Q.call(b,j.callbacks.onTotalScrollOffset):[0,0],q=j.callbacks.onTotalScrollBackOffset?Q.call(b,j.callbacks.onTotalScrollBackOffset):[0,0];if(i.trigger=e.trigger,(0!==o.scrollTop()||0!==o.scrollLeft())&&(a(".mCSB_"+i.idx+"_scrollbar").css("visibility","visible"),o.scrollTop(0).scrollLeft(0)),"_resetY"!==c||i.contentReset.y||(f("onOverflowYNone")&&j.callbacks.onOverflowYNone.call(b[0]),i.contentReset.y=1),"_resetX"!==c||i.contentReset.x||(f("onOverflowXNone")&&j.callbacks.onOverflowXNone.call(b[0]),i.contentReset.x=1),"_resetY"!==c&&"_resetX"!==c){if(!i.contentReset.y&&b[0].mcs||!i.overflowed[0]||(f("onOverflowY")&&j.callbacks.onOverflowY.call(b[0]),i.contentReset.x=null),!i.contentReset.x&&b[0].mcs||!i.overflowed[1]||(f("onOverflowX")&&j.callbacks.onOverflowX.call(b[0]),i.contentReset.x=null),j.snapAmount){var r=j.snapAmount instanceof Array?"x"===e.dir?j.snapAmount[1]:j.snapAmount[0]:j.snapAmount;c=T(c,r,j.snapOffset)}switch(e.dir){case"x":var s=a("#mCSB_"+i.idx+"_dragger_horizontal"),t="left",u=n[0].offsetLeft,v=[m.width()-n.outerWidth(!1),s.parent().width()-s.width()],w=[c,0===c?0:c/i.scrollRatio.x],y=p[1],z=q[1],A=y>0?y/i.scrollRatio.x:0,B=z>0?z/i.scrollRatio.x:0;break;case"y":var s=a("#mCSB_"+i.idx+"_dragger_vertical"),t="top",u=n[0].offsetTop,v=[m.height()-n.outerHeight(!1),s.parent().height()-s.height()],w=[c,0===c?0:c/i.scrollRatio.y],y=p[0],z=q[0],A=y>0?y/i.scrollRatio.y:0,B=z>0?z/i.scrollRatio.y:0}w[1]<0||0===w[0]&&0===w[1]?w=[0,0]:w[1]>=v[1]?w=[v[0],v[1]]:w[0]=-w[0],b[0].mcs||(h(),f("onInit")&&j.callbacks.onInit.call(b[0])),clearTimeout(n[0].onCompleteTimeout),W(s[0],t,Math.round(w[1]),l[1],e.scrollEasing),(i.tweenRunning||!(0===u&&w[0]>=0||u===v[0]&&w[0]<=v[0]))&&W(n[0],t,Math.round(w[0]),l[0],e.scrollEasing,e.overwrite,{onStart:function(){e.callbacks&&e.onStart&&!i.tweenRunning&&(f("onScrollStart")&&(h(),j.callbacks.onScrollStart.call(b[0])),i.tweenRunning=!0,x(s),i.cbOffsets=g())},onUpdate:function(){e.callbacks&&e.onUpdate&&f("whileScrolling")&&(h(),j.callbacks.whileScrolling.call(b[0]))},onComplete:function(){if(e.callbacks&&e.onComplete){"yx"===j.axis&&clearTimeout(n[0].onCompleteTimeout);var a=n[0].idleTimer||0;n[0].onCompleteTimeout=setTimeout(function(){f("onScroll")&&(h(),j.callbacks.onScroll.call(b[0])),f("onTotalScroll")&&w[1]>=v[1]-A&&i.cbOffsets[0]&&(h(),j.callbacks.onTotalScroll.call(b[0])),f("onTotalScrollBack")&&w[1]<=B&&i.cbOffsets[1]&&(h(),j.callbacks.onTotalScrollBack.call(b[0])),i.tweenRunning=!1,n[0].idleTimer=0,x(s,"hide")},a)}}})}},W=function(a,b,c,d,e,f,g){function h(){v.stop||(s||o.call(),s=X()-r,i(),s>=v.time&&(v.time=s>v.time?s+m-(s-v.time):s+m-1,v.time0?(v.currVal=l(v.time,t,w,d,e),u[b]=Math.round(v.currVal)+"px"):u[b]=c+"px",p.call()}function j(){m=1e3/60,v.time=s+m,n=window.requestAnimationFrame?window.requestAnimationFrame:function(a){return i(),setTimeout(a,.01)},v.id=n(h)}function k(){null!=v.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(v.id):clearTimeout(v.id),v.id=null)}function l(a,b,c,d,e){switch(e){case"linear":case"mcsLinear":return c*a/d+b;case"mcsLinearOut":return a/=d,a--,c*Math.sqrt(1-a*a)+b;case"easeInOutSmooth":return a/=d/2,1>a?c/2*a*a+b:(a--,-c/2*(a*(a-2)-1)+b);case"easeInOutStrong":return a/=d/2,1>a?c/2*Math.pow(2,10*(a-1))+b:(a--,c/2*(-Math.pow(2,-10*a)+2)+b);case"easeInOut":case"mcsEaseInOut":return a/=d/2,1>a?c/2*a*a*a+b:(a-=2,c/2*(a*a*a+2)+b);case"easeOutSmooth":return a/=d,a--,-c*(a*a*a*a-1)+b;case"easeOutStrong":return c*(-Math.pow(2,-10*a/d)+1)+b;case"easeOut":case"mcsEaseOut":default:var f=(a/=d)*a,g=f*a;return b+c*(.499999999999997*g*f+-2.5*f*f+5.5*g+-6.5*f+4*a)}}a._mTween||(a._mTween={top:{},left:{}});var m,n,g=g||{},o=g.onStart||function(){},p=g.onUpdate||function(){},q=g.onComplete||function(){},r=X(),s=0,t=a.offsetTop,u=a.style,v=a._mTween[b];"left"===b&&(t=a.offsetLeft);var w=c-t;v.stop=0,"none"!==f&&k(),j()},X=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Y=function(){var a=this;a._mTween||(a._mTween={top:{},left:{}});for(var b=["top","left"],c=0;c=0&&d[0]+ba(e)[0]=0&&d[1]+ba(e)[1]
":"
"},c=function(b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q;return h=d.duration||1,q=d.timingFunction||"ease-in-out",i=c.scope(),j=d.emitOnClose,n=d.onClose,m=void 0!==d.lazyRender,g=null,o=null,k=function(a){var b,d,e,f,g;for(e=0,d=c.children(),f=0,g=d.length;g>f;f++)b=d[f],e+=b.clientHeight;return""+e+"px"},p=function(){return g&&a.cancel(g),m&&(b.lazyRender=!0),a(function(){return o&&a.cancel(o),c.css({overflow:"hidden",transitionProperty:"height",transitionDuration:""+h+"s",transitionTimingFunction:q,height:k()}),o=a(function(){return c.css({overflow:"visible",transition:"none",height:"auto"})},1e3*h)})},l=function(){return o&&a.cancel(o),c.css({overflow:"hidden",transitionProperty:"height",transitionDuration:""+h+"s",transitionTimingFunction:q,height:"0px"}),j||n||m?g=a(function(){return j&&b.$emit(j,{}),n&&i.$eval(n),m?b.lazyRender=!1:void 0},1e3*h):void 0},b.$watch("expanded",function(b,d){return b?a(p):(null!=b&&(c.css({height:k()}),c[0].clientHeight),a(l))})},{restrict:"A",scope:{expanded:"=ngSlideDown"},transclude:!0,link:c,template:function(a,c){return b(a,c)}}}])}.call(this);var mod;mod=angular.module("infinite-scroll",[]),mod.directive("infiniteScroll",["$rootScope","$window","$timeout",function(a,b,c){return{link:function(d,e,f){var g,h,i,j;return b=angular.element(b),i=0,null!=f.infiniteScrollDistance&&d.$watch(f.infiniteScrollDistance,function(a){return i=parseInt(a,10)}),j=!0,g=!1,null!=f.infiniteScrollDisabled&&d.$watch(f.infiniteScrollDisabled,function(a){return j=!a,j&&g?(g=!1,h()):void 0}),h=function(){var c,h,k,l;return l=b.height()+b.scrollTop(),c=e.offset().top+e.height(),h=c-l,k=h<=b.height()*i,k&&j?a.$$phase?d.$eval(f.infiniteScroll):d.$apply(f.infiniteScroll):k?g=!0:void 0},b.on("scroll",h),d.$on("$destroy",function(){return b.off("scroll",h)}),c(function(){return f.infiniteScrollImmediateCheck?d.$eval(f.infiniteScrollImmediateCheck)?h():void 0:h()},0)}}}]),angular.module("ngMap",[]),function(){"use strict";function camelCase(a){return a.replace(SPECIAL_CHARS_REGEXP,function(a,b,c,d){return d?c.toUpperCase():c}).replace(MOZ_HACK_REGEXP,"Moz$1")}function JSONize(a){try{return JSON.parse(a),a}catch(b){return a.replace(/([\$\w]+)\s*:/g,function(a,b){ -return'"'+b+'":'}).replace(/'([^']+)'/g,function(a,b){return'"'+b+'"'})}}var SPECIAL_CHARS_REGEXP=/([\:\-\_]+(.))/g,MOZ_HACK_REGEXP=/^moz([A-Z])/,Attr2Options=function($parse,$timeout,$log,NavigatorGeolocation,GeoCoder){var orgAttributes=function(a){a.length>0&&(a=a[0]);for(var b={},c=0;c-1&&b.splice(c,1),this.el.className=b.join(" ")},d.prototype.onAdd=function(){this.getPanes().overlayMouseTarget.appendChild(this.el)},d.prototype.draw=function(){this.setPosition(),this.setZIndex(this.zIndex),this.setVisible(this.visible)},d.prototype.onRemove=function(){this.el.parentNode.removeChild(this.el),this.el=null}},f=function(c,e){return function(f,g,h,i){var j=(a.orgAttributes(g),a.filter(h)),k=a.getOptions(j,f),l=a.getEvents(f,j),m=g[0].parentElement.removeChild(g[0]),n=new d(k);b(function(){f.$watch("["+e.join(",")+"]",function(a){n.setContent(c,f)}),n.setContent(m.innerHTML,f);var a=m.firstElementChild.className;n.addClass("custom-marker"),n.addClass(a),k.position instanceof google.maps.LatLng||i.getGeoLocation(k.position).then(function(a){n.setPosition(a)})});for(var o in l)google.maps.event.addDomListener(n.el,o,l[o]);i.addObject("customMarkers",n),g.bind("$destroy",function(){i.deleteObject("customMarkers",n)})}},g=function(d,g,h){return a=d,b=g,c=h,e(),{restrict:"E",require:"^map",compile:function(a){var b=a.html(),c=b.match(/{{([^}]+)}}/g),d=[];return(c||[]).forEach(function(a){var b=a.replace("{{","").replace("}}","");-1==a.indexOf("::")&&-1==a.indexOf("this.")&&-1==d.indexOf(b)&&d.push(a.replace("{{","").replace("}}",""))}),f(b,d)}}};g.$inject=["Attr2Options","$timeout","$compile"],angular.module("ngMap").directive("customMarker",g)}(),function(){"use strict";var a=function(a,b){a.panel&&(a.panel=document.getElementById(a.panel)||document.querySelector(a.panel));var c=new google.maps.DirectionsRenderer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c},b=function(b,c,d){var e=b,f=new google.maps.DirectionsService,g=function(a,b){var e=b;e.travelMode=e.travelMode||"DRIVING";var g=["origin","destination","travelMode","transitOptions","unitSystem","durationInTraffic","waypoints","optimizeWaypoints","provideRouteAlternatives","avoidHighways","avoidTolls","region"];for(var h in e)-1===g.indexOf(h)&&delete e[h];e.waypoints&&("[]"==e.waypoints||""==e.waypoints)&&delete e.waypoints;var i=function(b){f.route(b,function(b,d){d==google.maps.DirectionsStatus.OK&&c(function(){a.setDirections(b)})})};e.origin&&e.destination&&("current-location"==e.origin?d.getCurrentPosition().then(function(a){e.origin=new google.maps.LatLng(a.coords.latitude,a.coords.longitude),i(e)}):"current-location"==e.destination?d.getCurrentPosition().then(function(a){e.destination=new google.maps.LatLng(a.coords.latitude,a.coords.longitude),i(e)}):i(e))},h=function(b,d,f,h){var i=e.orgAttributes(d),j=e.filter(f),k=e.getOptions(j),l=e.getEvents(b,j),m=e.getAttrsToObserve(i),n=a(k,l);h.addObject("directionsRenderers",n),m.forEach(function(a){!function(a){f.$observe(a,function(b){if("panel"==a)c(function(){var a=document.getElementById(b)||document.querySelector(b);a&&n.setPanel(a)});else if(k[a]!==b){var d=e.toOptionValue(b,{key:a});k[a]=d,g(n,k)}})}(a)}),b.$on("mapInitialized",function(a,b){g(n,k)}),b.$on("$destroy",function(a,b){h.deleteObject("directionsRenderers",n)})};return{restrict:"E",require:"^map",link:h}};b.$inject=["Attr2Options","$timeout","NavigatorGeolocation"],angular.module("ngMap").directive("directions",b)}(),function(){"use strict";angular.module("ngMap").directive("drawingManager",["Attr2Options",function(a){var b=a;return{restrict:"E",require:"^map",link:function(a,c,d,e){var f=(b.orgAttributes(c),b.filter(d)),g=b.getOptions(f),h=b.getControlOptions(f),i=b.getEvents(a,f),j=new google.maps.drawing.DrawingManager({drawingMode:g.drawingmode,drawingControl:g.drawingcontrol,drawingControlOptions:h.drawingControlOptions,circleOptions:g.circleoptions,markerOptions:g.markeroptions,polygonOptions:g.polygonoptions,polylineOptions:g.polylineoptions,rectangleOptions:g.rectangleoptions}),i=b.getEvents(a,f);for(var k in i)google.maps.event.addListener(j,k,i[k]);e.addObject("mapDrawingManager",j)}}}])}(),function(){"use strict";angular.module("ngMap").directive("dynamicMapsEngineLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.visualization.DynamicMapsEngineLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.filter(e),h=b.getOptions(g),i=b.getEvents(a,g,i),j=c(h,i);f.addObject("mapsEngineLayers",j)}}}])}(),function(){"use strict";angular.module("ngMap").directive("fusionTablesLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.FusionTablesLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.filter(e),h=b.getOptions(g),i=b.getEvents(a,g,i),j=c(h,i);f.addObject("fusionTablesLayers",j)}}}])}(),function(){"use strict";angular.module("ngMap").directive("heatmapLayer",["Attr2Options","$window",function(a,b){var c=a;return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=c.filter(e),h=c.getOptions(g);if(h.data=b[e.data]||a[e.data],!(h.data instanceof Array))throw"invalid heatmap data";h.data=new google.maps.MVCArray(h.data);var i=new google.maps.visualization.HeatmapLayer(h);c.getEvents(a,g);f.addObject("heatmapLayers",i)}}}])}(),function(){"use strict";var a=function(a,b,c,d){var e=a,f=function(a,d,e){var f;!a.position||a.position instanceof google.maps.LatLng||delete a.position,f=new google.maps.InfoWindow(a),Object.keys(d).length>0;for(var g in d)g&&google.maps.event.addListener(f,g,d[g]);var h=e.html().trim();if(1!=angular.element(h).length)throw"info-window working as a template must have a container";return f.__template=h.replace(/\s?ng-non-bindable[='"]+/,""),f.__compile=function(a,c){c&&(a["this"]=c);var d=b(f.__template)(a);f.setContent(d[0]),a.$apply()},f.__open=function(a,b,d){c(function(){f.__compile(b,d),d&&d.getPosition?f.open(a,d):d&&d instanceof google.maps.LatLng?(f.open(a),f.setPosition(d)):f.open(a)})},f},g=function(a,b,c,g){b.css("display","none");var h,i=e.orgAttributes(b),j=e.filter(c),k=e.getOptions(j,a),l=e.getEvents(a,j);!k.position||k.position instanceof google.maps.LatLng||(h=k.position);var m=f(k,l,b);h&&g.getGeoLocation(h).then(function(b){m.setPosition(b),m.__open(g.map,a,b);var e=c.geoCallback;e&&d(e)(a)}),g.addObject("infoWindows",m),g.observeAttrSetObj(i,c,m),a.$on("mapInitialized",function(b,c){if(m.visible&&m.__open(c,a),m.visibleOnMarker){var d=m.visibleOnMarker;m.__open(c,a,c.markers[d])}}),a.showInfoWindow=function(b,c,d){var e=g.map.infoWindows[c],f=d?d:this.getPosition?this:null;e.__open(g.map,a,f),g.singleInfoWindow&&(g.lastInfoWindow&&a.hideInfoWindow(b,g.lastInfoWindow),g.lastInfoWindow=c)},a.hideInfoWindow=a.hideInfoWindow||function(a,b){var c=g.map.infoWindows[b];c.close()}};return{restrict:"E",require:"^map",link:g}};a.$inject=["Attr2Options","$compile","$timeout","$parse"],angular.module("ngMap").directive("infoWindow",a)}(),function(){"use strict";angular.module("ngMap").directive("kmlLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.KmlLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("kmlLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("kmlLayers",k)})}}}])}(),function(){"use strict";angular.module("ngMap").directive("mapData",["Attr2Options",function(a){var b=a;return{restrict:"E",require:"^map",link:function(a,c,d,e){var f=b.filter(d),g=b.getOptions(f),h=b.getEvents(a,f,h);a.$on("mapInitialized",function(b,c){for(var d in g)if(d){var e=g[d];"function"==typeof a[e]?c.data[d](a[e]):c.data[d](e)}for(var f in h)h[f]&&c.data.addListener(f,h[f])})}}}])}(),function(){"use strict";var a,b,c,d,e=function(c,e,f){var g=f.mapLazyLoadParams||f.mapLazyLoad;if(window.lazyLoadCallback=function(){a(function(){e.html(d),b(e.contents())(c)},100)},void 0===window.google||void 0===window.google.maps){var h=document.createElement("script");h.src=g+(g.indexOf("?")>-1?"&":"?")+"callback=lazyLoadCallback",document.body.appendChild(h)}else e.html(d),b(e.contents())(c)},f=function(a,b){return!b.mapLazyLoad&&void 0,d=a.html(),c=b.mapLazyLoad,document.querySelector('script[src="'+c+(c.indexOf("?")>-1?"&":"?")+'callback=lazyLoadCallback"]')?!1:(a.html(""),{pre:e})},g=function(c,d){return b=c,a=d,{compile:f}};g.$inject=["$compile","$timeout"],angular.module("ngMap").directive("mapLazyLoad",g)}(),function(){"use strict";angular.module("ngMap").directive("mapType",["Attr2Options","$window",function(a,b){return{restrict:"E",require:"^map",link:function(a,c,d,e){var f,g=d.name;if(!g)throw"invalid map-type name";if(d.object){var h=a[d.object]?a:b;f=h[d.object],"function"==typeof f&&(f=new f)}if(!f)throw"invalid map-type object";a.$on("mapInitialized",function(a,b){b.mapTypes.set(g,f)}),e.addObject("mapTypes",f)}}}])}(),function(){"use strict";function a(a,b){var c;return a.currentStyle?c=a.currentStyle[b]:window.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b)),c}var b=function(b,c,d){var e=b,f=function(b,f,g,h){var i=e.orgAttributes(f);b.google=google;var j=document.createElement("div");j.style.width="100%",j.style.height="100%",f.prepend(j),"false"!==g.defaultStyle&&("block"!=a(f[0],"display")&&f.css("display","block"),a(f[0],"height").match(/^(0|auto)/)&&f.css("height","300px")),f[0].addEventListener("dragstart",function(a){return a.preventDefault(),!1});var k=function(a,e){var f=new google.maps.Map(j,{});f.markers={},f.shapes={},c(function(){google.maps.event.trigger(f,"resize")}),a.zoom=a.zoom||15;var k=a.center;k?k instanceof google.maps.LatLng||(delete a.center,h.getGeoLocation(k,m.geoLocationOptions).then(function(a){f.setCenter(a);var c=g.geoCallback;c&&d(c)(b)},function(a){f.setCenter(m.geoFallbackCenter)})):a.center=new google.maps.LatLng(0,0),f.setOptions(a),h.singleInfoWindow=a.singleInfoWindow;for(var l in e)l&&google.maps.event.addListener(f,l,e[l]);h.observeAttrSetObj(i,g,f),h.map=f,h.addObjects(h._objects),b.map=f,b.map.scope=b,google.maps.event.addListenerOnce(f,"idle",function(){b.$emit("mapInitialized",f),g.zoomToIncludeMarkers&&(h.zoomToIncludeMarkers(),"auto"==g.zoomToIncludeMarkers&&b.$on("objectChanged",function(a,b){"markers"==b[0]&&h.zoomToIncludeMarkers()}))})},l=e.filter(g),m=e.getOptions(l,b),n=e.getControlOptions(l),o=angular.extend(m,n),p=e.getEvents(b,l);g.initEvent?b.$on(g.initEvent,function(){!h.map&&k(o,p)}):k(o,p)};return{restrict:"AE",controller:"MapController",link:f}};angular.module("ngMap").directive("map",["Attr2Options","$timeout","$parse",b])}(),function(){"use strict";var a=function(a,b,c,d,e){var f=e,g=this,h=function(a,b,c){a.$observe(b,function(a){if(a){var d=f.camelCase("set-"+b),e=f.toOptionValue(a,{key:b});c[d]&&(b.match(/center|position/)&&"string"==typeof e?g.getGeoLocation(e).then(function(a){c[d](a)}):c[d](e))}})};this.map=null,this._objects=[],this.addObject=function(b,c){if(this.map){this.map[b]=this.map[b]||{};var d=Object.keys(this.map[b]).length;this.map[b][c.id||d]=c,"infoWindows"!=b&&c.setMap&&c.setMap&&c.setMap(this.map),c.centered&&c.position&&this.map.setCenter(c.position),a.$emit("objectChanged",[b,this.map[b]])}else c.groupName=b,this._objects.push(c)},this.deleteObject=function(b,c){if(c.map){var d=c.map[b];for(var e in d)d[e]===c&&delete d[e];c.map&&c.setMap&&c.setMap(null),a.$emit("objectChanged",[b,this.map[b]])}},this.addObjects=function(a){for(var b=0;b0;for(var d in b)d&&google.maps.event.addListener(c,d,b[d]);return c},b=function(b,c){var d=b,e=function(b,e,f,g){var h,i=d.orgAttributes(e),j=d.filter(f),k=d.getOptions(j,b),l=d.getEvents(b,j);k.position instanceof google.maps.LatLng||(h=k.position);var m=a(k,l);g.addObject("markers",m),h&&g.getGeoLocation(h).then(function(a){m.setPosition(a),k.centered&&m.map.setCenter(a);var d=f.geoCallback;d&&c(d)(b)}),k.noWatcher||g.observeAttrSetObj(i,f,m),e.bind("$destroy",function(){g.deleteObject("markers",m)})};return{restrict:"E",require:"^map",link:e}};b.$inject=["Attr2Options","$parse"],angular.module("ngMap").directive("marker",b)}(),function(){"use strict";angular.module("ngMap").directive("overlayMapType",["Attr2Options","$window",function(a,b){return{restrict:"E",require:"^map",link:function(a,c,d,e){var f,g=d.initMethod||"insertAt";if(d.object){var h=a[d.object]?a:b;f=h[d.object],"function"==typeof f&&(f=new f)}if(!f)throw"invalid map-type object";a.$on("mapInitialized",function(a,b){if("insertAt"==g){var c=parseInt(d.index,10);b.overlayMapTypes.insertAt(c,f)}else"push"==g&&b.overlayMapTypes.push(f)}),e.addObject("overlayMapTypes",f)}}}])}(),function(){"use strict";var a=function(a,b){var c=a,d=function(a,d,e,f){if("false"===e.placesAutoComplete)return!1;var g=c.filter(e),h=c.getOptions(g),i=c.getEvents(a,g),j=new google.maps.places.Autocomplete(d[0],h);for(var k in i)google.maps.event.addListener(j,k,i[k]);var l=function(){b(function(){f&&f.$setViewValue(d.val())},100)};google.maps.event.addListener(j,"place_changed",l),d[0].addEventListener("change",l),e.$observe("types",function(a){if(a){var b=c.toOptionValue(a,{key:"types"});j.setTypes(b)}})};return{restrict:"A",require:"?ngModel",link:d}};a.$inject=["Attr2Options","$timeout"],angular.module("ngMap").directive("placesAutoComplete",a)}(),function(){"use strict";var a=function(a,b){var c,d=a.name;switch(delete a.name,d){case"circle":a.center instanceof google.maps.LatLng||(a.center=new google.maps.LatLng(0,0)),c=new google.maps.Circle(a);break;case"polygon":c=new google.maps.Polygon(a);break;case"polyline":c=new google.maps.Polyline(a);break;case"rectangle":c=new google.maps.Rectangle(a);break;case"groundOverlay":case"image":var e=a.url,f={opacity:a.opacity,clickable:a.clickable,id:a.id};c=new google.maps.GroundOverlay(e,a.bounds,f)}for(var g in b)b[g]&&google.maps.event.addListener(c,g,b[g]);return c},b=function(b,c){var d=b,e=function(b,e,f,g){var h,i,j=d.orgAttributes(e),k=d.filter(f),l=d.getOptions(k),m=d.getEvents(b,k);i=l.name,l.center instanceof google.maps.LatLng||(h=l.center);var n=a(l,m);g.addObject("shapes",n),h&&"circle"==i&&g.getGeoLocation(h).then(function(a){n.setCenter(a),n.centered&&n.map.setCenter(a);var d=f.geoCallback;d&&c(d)(b)}),g.observeAttrSetObj(j,f,n),e.bind("$destroy",function(){g.deleteObject("shapes",n)})};return{restrict:"E",require:"^map",link:e}};b.$inject=["Attr2Options","$parse"],angular.module("ngMap").directive("shape",b)}(),function(){"use strict";var a=function(a){var b=a,c=function(a,b,c){var d,e;b.container&&(e=document.getElementById(b.container),e=e||document.querySelector(b.container)),e?d=new google.maps.StreetViewPanorama(e,b):(d=a.getStreetView(),d.setOptions(b));for(var f in c)f&&google.maps.event.addListener(d,f,c[f]);return d},d=function(a,d,e,f){var g=(b.orgAttributes(d),b.filter(e)),h=b.getOptions(g),i=b.getControlOptions(g),j=angular.extend(h,i),k=b.getEvents(a,g);a.$on("mapInitialized",function(a,b){var d=c(b,j,k);b.setStreetView(d),!d.getPosition()&&d.setPosition(b.getCenter()),google.maps.event.addListener(d,"position_changed",function(){d.getPosition()!==b.getCenter()&&b.setCenter(d.getPosition())});var e=google.maps.event.addListener(b,"center_changed",function(){d.setPosition(b.getCenter()),google.maps.event.removeListener(e)})})};return{restrict:"E",require:"^map",link:d}};a.$inject=["Attr2Options"],angular.module("ngMap").directive("streetViewPanorama",a)}(),function(){"use strict";angular.module("ngMap").directive("trafficLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.TrafficLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("trafficLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("trafficLayers",k)})}}}])}(),function(){"use strict";angular.module("ngMap").directive("transitLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.TransitLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("transitLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("transitLayers",k)})}}}])}(),function(){"use strict";angular.module("ngMap").directive("weatherLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.weather.WeatherLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("weatherLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("weatherLayers",k)})}}}])}(),function(a,b){"use strict";var c=["ng","oc.lazyLoad"],d={},e=[],f=[],g=[],h=[],i=a.noop,j={},k=[],l=a.module("oc.lazyLoad",["ng"]);l.provider("$ocLazyLoad",["$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider",function(l,m,p,q,r,s){function t(b,d,e){if(d){var f,h,l,m=[];for(f=d.length-1;f>=0;f--)if(h=d[f],a.isString(h)||(h=w(h)),h&&-1===k.indexOf(h)&&(!y[h]||-1!==g.indexOf(h))){var n=-1===c.indexOf(h);if(l=o(h),n&&(c.push(h),t(b,l.requires,e)),l._runBlocks.length>0)for(j[h]=[];l._runBlocks.length>0;)j[h].push(l._runBlocks.shift());a.isDefined(j[h])&&(n||e.rerun)&&(m=m.concat(j[h])),v(b,l._invokeQueue,h,e.reconfig),v(b,l._configBlocks,h,e.reconfig),i(n?"ocLazyLoad.moduleLoaded":"ocLazyLoad.moduleReloaded",h),d.pop(),k.push(h)}var p=b.getInstanceInjector();a.forEach(m,function(a){p.invoke(a)})}}function u(b,c){function e(b,c){var d,e=!0;return c.length&&(d=f(b),a.forEach(c,function(a){e=e&&f(a)!==d})),e}function f(b){return a.isArray(b)?F(b.toString()):a.isObject(b)?F(E(b)):a.isDefined(b)&&null!==b?F(b.toString()):b}var g=b[2][0],h=b[1],j=!1;a.isUndefined(d[c])&&(d[c]={}),a.isUndefined(d[c][h])&&(d[c][h]={});var k=function(a,b){d[c][h].hasOwnProperty(a)||(d[c][h][a]=[]),e(b,d[c][h][a])&&(j=!0,d[c][h][a].push(b),i("ocLazyLoad.componentLoaded",[c,h,a]))};if(a.isString(g))k(g,b[2][1]);else{if(!a.isObject(g))return!1;a.forEach(g,function(b,c){a.isString(b)?k(b,g[1]):k(c,b)})}return j}function v(b,c,d,f){if(c){var g,h,i,j;for(g=0,h=c.length;h>g;g++)if(i=c[g],a.isArray(i)){if(null!==b){if(!b.hasOwnProperty(i[0]))throw new Error("unsupported provider "+i[0]);j=b[i[0]]}var k=u(i,d);if("invoke"!==i[1])k&&a.isDefined(j)&&j[i[1]].apply(j,i[2]);else{var l=function(b){var c=e.indexOf(d+"-"+b);(-1===c||f)&&(-1===c&&e.push(d+"-"+b),a.isDefined(j)&&j[i[1]].apply(j,i[2]))};if(a.isFunction(i[2][0]))l(i[2][0]);else if(a.isArray(i[2][0]))for(var m=0,n=i[2][0].length;n>m;m++)a.isFunction(i[2][0][m])&&l(i[2][0][m])}}}}function w(b){var c=null;return a.isString(b)?c=b:a.isObject(b)&&b.hasOwnProperty("name")&&a.isString(b.name)&&(c=b.name),c}function x(b){if(!a.isString(b))return!1;try{return o(b)}catch(c){if(/No module/.test(c)||c.message.indexOf("$injector:nomod")>-1)return!1}}var y={},z={$controllerProvider:l,$compileProvider:p,$filterProvider:q,$provide:m,$injector:r,$animateProvider:s},A=!1,B=!1,C=[],D={};C.push=function(a){-1===this.indexOf(a)&&Array.prototype.push.apply(this,arguments)},this.config=function(b){a.isDefined(b.modules)&&(a.isArray(b.modules)?a.forEach(b.modules,function(a){y[a.name]=a}):y[b.modules.name]=b.modules),a.isDefined(b.debug)&&(A=b.debug),a.isDefined(b.events)&&(B=b.events)},this._init=function(d){if(0===f.length){var e=[d],g=["ng:app","ng-app","x-ng-app","data-ng-app"],i=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/,j=function(a){return a&&e.push(a)};a.forEach(g,function(b){g[b]=!0,j(document.getElementById(b)),b=b.replace(":","\\:"),"undefined"!=typeof d[0]&&d[0].querySelectorAll&&(a.forEach(d[0].querySelectorAll("."+b),j),a.forEach(d[0].querySelectorAll("."+b+"\\:"),j),a.forEach(d[0].querySelectorAll("["+b+"]"),j))}),a.forEach(e,function(b){if(0===f.length){var c=" "+d.className+" ",e=i.exec(c);e?f.push((e[2]||"").replace(/\s+/g,",")):a.forEach(b.attributes,function(a){0===f.length&&g[a.name]&&f.push(a.value)})}})}0!==f.length||(b.jasmine||b.mocha)&&a.isDefined(a.mock)||console.error("No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.");var k=function l(b){if(-1===c.indexOf(b)){c.push(b);var d=a.module(b);v(null,d._invokeQueue,b),v(null,d._configBlocks,b),a.forEach(d.requires,l)}};a.forEach(f,function(a){k(a)}),f=[],h.pop()};var E=function(b){try{return JSON.stringify(b)}catch(c){var d=[];return JSON.stringify(b,function(b,c){if(a.isObject(c)&&null!==c){if(-1!==d.indexOf(c))return;d.push(c)}return c})}},F=function(a){var b,c,d,e=0;if(0==a.length)return e;for(b=0,d=a.length;d>b;b++)c=a.charCodeAt(b),e=(e<<5)-e+c,e|=0;return e};this.$get=["$log","$rootElement","$rootScope","$cacheFactory","$q",function(b,e,g,j,l){function m(a){var c=l.defer();return b.error(a.message),c.reject(a),c.promise}var p,q=j("ocLazyLoad");return A||(b={},b.error=a.noop,b.warn=a.noop,b.info=a.noop),z.getInstanceInjector=function(){return p?p:p=e.data("$injector")||a.injector()},i=function(a,c){B&&g.$broadcast(a,c),A&&b.info(a,c)},{_broadcast:i,_$log:b,_getFilesCache:function(){return q},toggleWatch:function(a){a?h.push(!0):h.pop()},getModuleConfig:function(b){if(!a.isString(b))throw new Error("You need to give the name of the module to get");return y[b]?a.copy(y[b]):null},setModuleConfig:function(b){if(!a.isObject(b))throw new Error("You need to give the module config object to set");return y[b.name]=b,b},getModules:function(){return c},isLoaded:function(b){var d=function(a){var b=c.indexOf(a)>-1;return b||(b=!!x(a)),b};if(a.isString(b)&&(b=[b]), -a.isArray(b)){var e,f;for(e=0,f=b.length;f>e;e++)if(!d(b[e]))return!1;return!0}throw new Error("You need to define the module(s) name(s)")},_getModuleName:w,_getModule:function(a){try{return o(a)}catch(b){throw(/No module/.test(b)||b.message.indexOf("$injector:nomod")>-1)&&(b.message='The module "'+E(a)+'" that you are trying to load does not exist. '+b.message),b}},moduleExists:x,_loadDependencies:function(b,c){var d,e,f,g=[],h=this;if(b=h._getModuleName(b),null===b)return l.when();try{d=h._getModule(b)}catch(i){return m(i)}return e=h.getRequires(d),a.forEach(e,function(d){if(a.isString(d)){var e=h.getModuleConfig(d);if(null===e)return void C.push(d);d=e,e.name=void 0}if(h.moduleExists(d.name))return f=d.files.filter(function(a){return h.getModuleConfig(d.name).files.indexOf(a)<0}),0!==f.length&&h._$log.warn('Module "',b,'" attempted to redefine configuration for dependency. "',d.name,'"\n Additional Files Loaded:',f),a.isDefined(h.filesLoader)?void g.push(h.filesLoader(d,c).then(function(){return h._loadDependencies(d)})):m(new Error("Error: New dependencies need to be loaded from external files ("+d.files+"), but no loader has been defined."));if(a.isArray(d)){var i=[];a.forEach(d,function(a){var b=h.getModuleConfig(a);null===b?i.push(a):b.files&&(i=i.concat(b.files))}),i.length>0&&(d={files:i})}else a.isObject(d)&&d.hasOwnProperty("name")&&d.name&&(h.setModuleConfig(d),C.push(d.name));if(a.isDefined(d.files)&&0!==d.files.length){if(!a.isDefined(h.filesLoader))return m(new Error('Error: the module "'+d.name+'" is defined in external files ('+d.files+"), but no loader has been defined."));g.push(h.filesLoader(d,c).then(function(){return h._loadDependencies(d)}))}}),l.all(g)},inject:function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],d=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],e=this,g=l.defer();if(a.isDefined(b)&&null!==b){if(a.isArray(b)){var h=[];return a.forEach(b,function(a){h.push(e.inject(a,c,d))}),l.all(h)}e._addToLoadList(e._getModuleName(b),!0,d)}if(f.length>0){var i=f.slice(),j=function m(a){C.push(a),D[a]=g.promise,e._loadDependencies(a,c).then(function(){try{k=[],t(z,C,c)}catch(a){return e._$log.error(a.message),void g.reject(a)}f.length>0?m(f.shift()):g.resolve(i)},function(a){g.reject(a)})};j(f.shift())}else{if(c&&c.name&&D[c.name])return D[c.name];g.resolve()}return g.promise},getRequires:function(b){var d=[];return a.forEach(b.requires,function(a){-1===c.indexOf(a)&&d.push(a)}),d},_invokeQueue:v,_registerInvokeList:u,_register:t,_addToLoadList:n,_unregister:function(b){a.isDefined(b)&&a.isArray(b)&&a.forEach(b,function(a){d[a]=void 0})}}}],this._init(a.element(b.document))}]);var m=a.bootstrap;a.bootstrap=function(b,c,d){return a.forEach(c.slice(),function(a){n(a,!0,!0)}),m(b,c,d)};var n=function(b,c,d){(h.length>0||c)&&a.isString(b)&&-1===f.indexOf(b)&&(f.push(b),d&&g.push(b))},o=a.module;a.module=function(a,b,c){return n(a,!1,!0),o(a,b,c)},"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="oc.lazyLoad")}(angular,window),function(a){"use strict";a.module("oc.lazyLoad").directive("ocLazyLoad",["$ocLazyLoad","$compile","$animate","$parse","$timeout",function(b,c,d,e,f){return{restrict:"A",terminal:!0,priority:1e3,compile:function(f,g){var h=f[0].innerHTML;return f.html(""),function(f,g,i){var j=e(i.ocLazyLoad);f.$watch(function(){return j(f)||i.ocLazyLoad},function(e){a.isDefined(e)&&b.load(e).then(function(){d.enter(h,g),c(g.contents())(f)})},!0)}}}}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q","$window","$interval",function(b,c,d,e){var f=!1,g=!1,h=d.document.getElementsByTagName("head")[0]||d.document.getElementsByTagName("body")[0];return b.buildElement=function(i,j,k){var l,m,n=c.defer(),o=b._getFilesCache(),p=function(a){var b=(new Date).getTime();return a.indexOf("?")>=0?"&"===a.substring(0,a.length-1)?a+"_dc="+b:a+"&_dc="+b:a+"?_dc="+b};switch(a.isUndefined(o.get(j))&&o.put(j,n.promise),i){case"css":l=d.document.createElement("link"),l.type="text/css",l.rel="stylesheet",l.href=k.cache===!1?p(j):j;break;case"js":l=d.document.createElement("script"),l.src=k.cache===!1?p(j):j;break;default:o.remove(j),n.reject(new Error('Requested type "'+i+'" is not known. Could not inject "'+j+'"'))}l.onload=l.onreadystatechange=function(a){l.readyState&&!/^c|loade/.test(l.readyState)||m||(l.onload=l.onreadystatechange=null,m=1,b._broadcast("ocLazyLoad.fileLoaded",j),n.resolve())},l.onerror=function(){o.remove(j),n.reject(new Error("Unable to load "+j))},l.async=k.serie?0:1;var q=h.lastChild;if(k.insertBefore){var r=a.element(a.isDefined(window.jQuery)?k.insertBefore:document.querySelector(k.insertBefore));r&&r.length>0&&(q=r[0])}if(q.parentNode.insertBefore(l,q),"css"==i){if(!f){var s=d.navigator.userAgent.toLowerCase();if(/iP(hone|od|ad)/.test(d.navigator.platform)){var t=d.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),u=parseFloat([parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3]||0,10)].join("."));g=6>u}else if(s.indexOf("android")>-1){var v=parseFloat(s.slice(s.indexOf("android")+8));g=4.4>v}else if(s.indexOf("safari")>-1){var w=s.match(/version\/([\.\d]+)/i);g=w&&w[1]&&parseFloat(w[1])<6}}if(g)var x=1e3,y=e(function(){try{l.sheet.cssRules,e.cancel(y),l.onload()}catch(a){--x<=0&&l.onerror()}},20)}return n.promise},b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q",function(b,c){return b.filesLoader=function(d){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],f=[],g=[],h=[],i=[],j=null,k=b._getFilesCache();b.toggleWatch(!0),a.extend(e,d);var l=function(c){var d,l=null;if(a.isObject(c)&&(l=c.type,c=c.path),j=k.get(c),a.isUndefined(j)||e.cache===!1){if(null!==(d=/^(css|less|html|htm|js)?(?=!)/.exec(c))&&(l=d[1],c=c.substr(d[1].length+1,c.length)),!l)if(null!==(d=/[.](css|less|html|htm|js)?((\?|#).*)?$/.exec(c)))l=d[1];else{if(b.jsLoader.hasOwnProperty("ocLazyLoadLoader")||!b.jsLoader.hasOwnProperty("requirejs"))return void b._$log.error("File type could not be determined. "+c);l="js"}"css"!==l&&"less"!==l||-1!==f.indexOf(c)?"html"!==l&&"htm"!==l||-1!==g.indexOf(c)?"js"===l||-1===h.indexOf(c)?h.push(c):b._$log.error("File type is not valid. "+c):g.push(c):f.push(c)}else j&&i.push(j)};if(e.serie?l(e.files.shift()):a.forEach(e.files,function(a){l(a)}),f.length>0){var m=c.defer();b.cssLoader(f,function(c){a.isDefined(c)&&b.cssLoader.hasOwnProperty("ocLazyLoadLoader")?(b._$log.error(c),m.reject(c)):m.resolve()},e),i.push(m.promise)}if(g.length>0){var n=c.defer();b.templatesLoader(g,function(c){a.isDefined(c)&&b.templatesLoader.hasOwnProperty("ocLazyLoadLoader")?(b._$log.error(c),n.reject(c)):n.resolve()},e),i.push(n.promise)}if(h.length>0){var o=c.defer();b.jsLoader(h,function(c){a.isDefined(c)&&(b.jsLoader.hasOwnProperty("ocLazyLoadLoader")||b.jsLoader.hasOwnProperty("requirejs"))?(b._$log.error(c),o.reject(c)):o.resolve()},e),i.push(o.promise)}if(0===i.length){var p=c.defer(),q="Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.";return b._$log.error(q),p.reject(q),p.promise}return e.serie&&e.files.length>0?c.all(i).then(function(){return b.filesLoader(d,e)}):c.all(i)["finally"](function(a){return b.toggleWatch(!1),a})},b.load=function(d){var e,f=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=this,h=null,i=[],j=c.defer(),k=a.copy(d),l=a.copy(f);if(a.isArray(k))return a.forEach(k,function(a){i.push(g.load(a,l))}),c.all(i).then(function(a){j.resolve(a)},function(a){j.reject(a)}),j.promise;if(a.isString(k)?(h=g.getModuleConfig(k),h||(h={files:[k]})):a.isObject(k)&&(h=a.isDefined(k.path)&&a.isDefined(k.type)?{files:[k]}:g.setModuleConfig(k)),null===h){var m=g._getModuleName(k);return e='Module "'+(m||"unknown")+'" is not configured, cannot load.',b._$log.error(e),j.reject(new Error(e)),j.promise}a.isDefined(h.template)&&(a.isUndefined(h.files)&&(h.files=[]),a.isString(h.template)?h.files.push(h.template):a.isArray(h.template)&&h.files.concat(h.template));var n=a.extend({},l,h);return a.isUndefined(h.files)&&a.isDefined(h.name)&&b.moduleExists(h.name)?b.inject(h.name,n,!0):(b.filesLoader(h,n).then(function(){b.inject(null,n).then(function(a){j.resolve(a)},function(a){j.reject(a)})},function(a){j.reject(a)}),j.promise)},b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q",function(b,c){return b.cssLoader=function(d,e,f){var g=[];a.forEach(d,function(a){g.push(b.buildElement("css",a,f))}),c.all(g).then(function(){e()},function(a){e(a)})},b.cssLoader.ocLazyLoadLoader=!0,b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q",function(b,c){return b.jsLoader=function(d,e,f){var g=[];a.forEach(d,function(a){g.push(b.buildElement("js",a,f))}),c.all(g).then(function(){e()},function(a){e(a)})},b.jsLoader.ocLazyLoadLoader=!0,b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$templateCache","$q","$http",function(b,c,d,e){return b.templatesLoader=function(f,g,h){var i=[],j=b._getFilesCache();return a.forEach(f,function(b){var f=d.defer();i.push(f.promise),e.get(b,h).success(function(d){a.isString(d)&&d.length>0&&a.forEach(a.element(d),function(a){"SCRIPT"===a.nodeName&&"text/ng-template"===a.type&&c.put(a.id,a.innerHTML)}),a.isUndefined(j.get(b))&&j.put(b,!0),f.resolve()}).error(function(a){f.reject(new Error('Unable to load template file "'+b+'": '+a))})}),d.all(i).then(function(){g()},function(a){g(a)})},b.templatesLoader.ocLazyLoadLoader=!0,b}])}])}(angular),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=+b||0;if(Math.abs(f)===1/0&&(f=0),f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);e>c;){if(c in d&&d[c]===a)return c;c++}return-1}),"undefined"==typeof PDFJS&&(("undefined"!=typeof window?window:this).PDFJS={}),PDFJS.version="1.1.551",PDFJS.build="2a5616c",function(){"use strict";function a(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.infos&&console.log("Info: "+a)}function b(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.warnings&&console.log("Warning: "+a)}function c(a){b("Deprecated API usage: "+a)}function d(a){throw PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.errors&&(console.log("Error: "+a),console.log(e())),I.notify(H.unknown),new Error(a)}function e(){try{throw new Error}catch(a){return a.stack?a.stack.split("\n").slice(2).join("\n"):""}}function f(a,b){a||d(b)}function g(a,b){if(!b)return a;if(/^[a-z][a-z0-9+\-.]*:/i.test(b))return b;var c;if("/"===b.charAt(0))return c=a.indexOf("://"),"/"===b.charAt(1)?++c:c=a.indexOf("/",c+3),a.substring(0,c)+b;var d=a.length;c=a.lastIndexOf("#"),d=c>=0?c:d,c=a.lastIndexOf("?",d),d=c>=0?c:d;var e=a.lastIndexOf("/",d);return a.substring(0,e+1)+b}function h(a,b){if(!a)return!1;var c=/^[a-z][a-z0-9+\-.]*(?=:)/i.exec(a);if(!c)return b;switch(c=c[0].toLowerCase()){case"http":case"https":case"ftp":case"mailto":case"tel":return!0;default:return!1}}function i(a,b,c){return Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!1}),c}function j(){switch(PDFJS.openExternalLinksInNewWindow&&(b("PDFJS.openExternalLinksInNewWindow is deprecated, use PDFJS.externalLinkTarget instead."),PDFJS.externalLinkTarget===J.NONE&&(PDFJS.externalLinkTarget=J.BLANK),PDFJS.openExternalLinksInNewWindow=!1),PDFJS.externalLinkTarget){case J.NONE:return!1;case J.SELF:case J.BLANK:case J.PARENT:case J.TOP:return!0}return b("PDFJS.externalLinkTarget is invalid: "+PDFJS.externalLinkTarget),PDFJS.externalLinkTarget=J.NONE,!1}function k(a){f(null!==a&&"object"==typeof a&&void 0!==a.length,"Invalid argument for bytesToString");var b=a.length,c=8192;if(c>b)return String.fromCharCode.apply(null,a);for(var d=[],e=0;b>e;e+=c){var g=Math.min(e+c,b),h=a.subarray(e,g);d.push(String.fromCharCode.apply(null,h))}return d.join("")}function l(a){f("string"==typeof a,"Invalid argument for stringToBytes");for(var b=a.length,c=new Uint8Array(b),d=0;b>d;++d)c[d]=255&a.charCodeAt(d);return c}function m(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,255&a)}function n(){var a=new Uint8Array(2);a[0]=1;var b=new Uint16Array(a.buffer);return 1===b[0]}function o(){var a=document.createElement("canvas");a.width=a.height=1;var b=a.getContext("2d"),c=b.createImageData(1,1);return"undefined"!=typeof c.data.buffer}function p(a){return"number"==typeof a}function q(a){return a instanceof Array}function r(a){return"object"==typeof a&&null!==a&&void 0!==a.byteLength}function s(){var a={};return a.promise=new Promise(function(b,c){a.resolve=b,a.reject=c}),a}function t(a,b){this.name=a,this.comObj=b,this.callbackIndex=1,this.postMessageTransfers=!0;var c=this.callbacksCapabilities={},e=this.actionHandler={};e.console_log=[function(a){console.log.apply(console,a)}],e.console_error=[function(a){console.error.apply(console,a)}],e._unsupported_feature=[function(a){I.notify(a)}],b.onmessage=function(a){var f=a.data;if(f.isReply){var g=f.callbackId;if(f.callbackId in c){var h=c[g];delete c[g],"error"in f?h.reject(f.error):h.resolve(f.data)}else d("Cannot resolve callback "+g)}else if(f.action in e){var i=e[f.action];f.callbackId?Promise.resolve().then(function(){return i[0].call(i[1],f.data)}).then(function(a){b.postMessage({isReply:!0,callbackId:f.callbackId,data:a})},function(a){a instanceof Error&&(a+=""),b.postMessage({isReply:!0,callbackId:f.callbackId,error:a})}):i[0].call(i[1],f.data)}else d("Unknown action from worker: "+f.action)}}function u(a,c,d){var e=new Image;e.onload=function(){d.resolve(a,e)},e.onerror=function(){d.resolve(a,null),b("Error during JPEG image loading")},e.src=c}function v(a,b){var c=document.createElement("canvas");return c.width=a,c.height=b,c}function w(a){a.mozCurrentTransform||(a._originalSave=a.save,a._originalRestore=a.restore,a._originalRotate=a.rotate,a._originalScale=a.scale,a._originalTranslate=a.translate,a._originalTransform=a.transform,a._originalSetTransform=a.setTransform,a._transformMatrix=a._transformMatrix||[1,0,0,1,0,0],a._transformStack=[],Object.defineProperty(a,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(a,"mozCurrentTransformInverse",{get:function(){var a=this._transformMatrix,b=a[0],c=a[1],d=a[2],e=a[3],f=a[4],g=a[5],h=b*e-c*d,i=c*d-b*e;return[e/h,c/i,d/i,b/h,(e*f-d*g)/i,(c*f-b*g)/h]}}),a.save=function(){var a=this._transformMatrix;this._transformStack.push(a),this._transformMatrix=a.slice(0,6),this._originalSave()},a.restore=function(){var a=this._transformStack.pop();a&&(this._transformMatrix=a,this._originalRestore())},a.translate=function(a,b){var c=this._transformMatrix;c[4]=c[0]*a+c[2]*b+c[4],c[5]=c[1]*a+c[3]*b+c[5],this._originalTranslate(a,b)},a.scale=function(a,b){var c=this._transformMatrix;c[0]=c[0]*a,c[1]=c[1]*a,c[2]=c[2]*b,c[3]=c[3]*b,this._originalScale(a,b)},a.transform=function(b,c,d,e,f,g){var h=this._transformMatrix;this._transformMatrix=[h[0]*b+h[2]*c,h[1]*b+h[3]*c,h[0]*d+h[2]*e,h[1]*d+h[3]*e,h[0]*f+h[2]*g+h[4],h[1]*f+h[3]*g+h[5]],a._originalTransform(b,c,d,e,f,g)},a.setTransform=function(b,c,d,e,f,g){this._transformMatrix=[b,c,d,e,f,g],a._originalSetTransform(b,c,d,e,f,g)},a.rotate=function(a){var b=Math.cos(a),c=Math.sin(a),d=this._transformMatrix;this._transformMatrix=[d[0]*b+d[2]*c,d[1]*b+d[3]*c,d[0]*-c+d[2]*b,d[1]*-c+d[3]*b,d[4],d[5]],this._originalRotate(a)})}function x(a){var b,c,d,e,f=1e3,g=a.width,h=a.height,i=g+1,j=new Uint8Array(i*(h+1)),k=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),l=g+7&-8,m=a.data,n=new Uint8Array(l*h),o=0;for(b=0,e=m.length;e>b;b++)for(var p=128,q=m[b];p>0;)n[o++]=q&p?0:255,p>>=1;var r=0;for(o=0,0!==n[o]&&(j[0]=1,++r),c=1;g>c;c++)n[o]!==n[o+1]&&(j[c]=n[o]?2:1,++r),o++;for(0!==n[o]&&(j[c]=2,++r),b=1;h>b;b++){o=b*l,d=b*i,n[o-l]!==n[o]&&(j[d]=n[o]?1:8,++r);var s=(n[o]?4:0)+(n[o-l]?8:0);for(c=1;g>c;c++)s=(s>>2)+(n[o+1]?4:0)+(n[o-l+1]?8:0),k[s]&&(j[d+c]=k[s],++r),o++;if(n[o-l]!==n[o]&&(j[d+c]=n[o]?2:4,++r),r>f)return null}for(o=l*(h-1),d=b*i,0!==n[o]&&(j[d]=8,++r),c=1;g>c;c++)n[o]!==n[o+1]&&(j[d+c]=n[o]?4:8,++r),o++;if(0!==n[o]&&(j[d+c]=4,++r),r>f)return null;var t=new Int32Array([0,i,-1,0,-i,0,0,0,1]),u=[];for(b=0;r&&h>=b;b++){for(var v=b*i,w=v+g;w>v&&!j[v];)v++;if(v!==w){var x,y=[v%i,b],z=j[v],A=v;do{var B=t[z];do v+=B;while(!j[v]);x=j[v],5!==x&&10!==x?(z=x,j[v]=0):(z=x&51*z>>4,j[v]&=z>>2|z<<2),y.push(v%i),y.push(v/i|0),--r}while(A!==v);u.push(y),--b}}var C=function(a){a.save(),a.scale(1/g,-1/h),a.translate(0,-h),a.beginPath();for(var b=0,c=u.length;c>b;b++){var d=u[b];a.moveTo(d[0],d[1]);for(var e=2,f=d.length;f>e;e+=2)a.lineTo(d[e],d[e+1])}a.fill(),a.beginPath(),a.restore()};return C}function y(a){var b=ma[a[0]];return b||d("Unknown IR type: "+a[0]),b.fromIR(a)}var z="undefined"==typeof window?this:window,A="undefined"==typeof window,B=[.001,0,0,.001,0,0],C={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},D={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},E={WIDGET:1,TEXT:2,LINK:3},F={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};z.PDFJS||(z.PDFJS={}),z.PDFJS.pdfBug=!1,PDFJS.VERBOSITY_LEVELS={errors:0,warnings:1,infos:5};var G=PDFJS.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},H=PDFJS.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},I=PDFJS.UnsupportedManager=function(){var a=[];return{listen:function(b){a.push(b)},notify:function(c){b('Unsupported feature "'+c+'"');for(var d=0,e=a.length;e>d;d++)a[d](c)}}}();PDFJS.isValidUrl=h,PDFJS.shadow=i;var J=PDFJS.LinkTarget={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4},K=["","_self","_blank","_parent","_top"];PDFJS.isExternalLinkTargetSet=j;var L=PDFJS.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},M=function(){function a(a,b){this.name="PasswordException",this.message=a,this.code=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.PasswordException=M;var N=function(){function a(a,b){this.name="UnknownErrorException",this.message=a,this.details=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnknownErrorException=N;var O=function(){function a(a){this.name="InvalidPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.InvalidPDFException=O;var P=function(){function a(a){this.name="MissingPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.MissingPDFException=P;var Q=function(){function a(a,b){this.name="UnexpectedResponseException",this.message=a,this.status=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnexpectedResponseException=Q;(function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="NotImplementedException",a.constructor=a,a})(),function(){function a(a,b){this.begin=a,this.end=b,this.message="Missing data ["+a+", "+b+")"}return a.prototype=new Error,a.prototype.name="MissingDataException",a.constructor=a,a}(),function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="XRefParseException",a.constructor=a,a}();Object.defineProperty(PDFJS,"isLittleEndian",{configurable:!0,get:function(){return i(PDFJS,"isLittleEndian",n())}}),Object.defineProperty(PDFJS,"hasCanvasTypedArrays",{configurable:!0,get:function(){return i(PDFJS,"hasCanvasTypedArrays",o())}});var R=function(){function a(a,b){this.buffer=a,this.byteLength=a.length,this.length=void 0===b?this.byteLength>>2:b,c(this.length)}function b(a){return{get:function(){var b=this.buffer,c=a<<2;return(b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24)>>>0},set:function(b){var c=this.buffer,d=a<<2;c[d]=255&b,c[d+1]=b>>8&255,c[d+2]=b>>16&255,c[d+3]=b>>>24&255}}}function c(c){for(;c>d;)Object.defineProperty(a.prototype,d,b(d)),d++}a.prototype=Object.create(null);var d=0;return a}(),S=[1,0,0,1,0,0],T=PDFJS.Util=function(){function a(){}var b=["rgb(",0,",",0,",",0,")"];return a.makeCssRgb=function(a,c,d){return b[1]=a,b[3]=c,b[5]=d,b.join("")},a.transform=function(a,b){return[a[0]*b[0]+a[2]*b[1],a[1]*b[0]+a[3]*b[1],a[0]*b[2]+a[2]*b[3],a[1]*b[2]+a[3]*b[3],a[0]*b[4]+a[2]*b[5]+a[4],a[1]*b[4]+a[3]*b[5]+a[5]]},a.applyTransform=function(a,b){var c=a[0]*b[0]+a[1]*b[2]+b[4],d=a[0]*b[1]+a[1]*b[3]+b[5];return[c,d]},a.applyInverseTransform=function(a,b){var c=b[0]*b[3]-b[1]*b[2],d=(a[0]*b[3]-a[1]*b[2]+b[2]*b[5]-b[4]*b[3])/c,e=(-a[0]*b[1]+a[1]*b[0]+b[4]*b[1]-b[5]*b[0])/c;return[d,e]},a.getAxialAlignedBoundingBox=function(b,c){var d=a.applyTransform(b,c),e=a.applyTransform(b.slice(2,4),c),f=a.applyTransform([b[0],b[3]],c),g=a.applyTransform([b[2],b[1]],c);return[Math.min(d[0],e[0],f[0],g[0]),Math.min(d[1],e[1],f[1],g[1]),Math.max(d[0],e[0],f[0],g[0]),Math.max(d[1],e[1],f[1],g[1])]},a.inverseTransform=function(a){var b=a[0]*a[3]-a[1]*a[2];return[a[3]/b,-a[1]/b,-a[2]/b,a[0]/b,(a[2]*a[5]-a[4]*a[3])/b,(a[4]*a[1]-a[5]*a[0])/b]},a.apply3dTransform=function(a,b){return[a[0]*b[0]+a[1]*b[1]+a[2]*b[2],a[3]*b[0]+a[4]*b[1]+a[5]*b[2],a[6]*b[0]+a[7]*b[1]+a[8]*b[2]]},a.singularValueDecompose2dScale=function(a){var b=[a[0],a[2],a[1],a[3]],c=a[0]*b[0]+a[1]*b[2],d=a[0]*b[1]+a[1]*b[3],e=a[2]*b[0]+a[3]*b[2],f=a[2]*b[1]+a[3]*b[3],g=(c+f)/2,h=Math.sqrt((c+f)*(c+f)-4*(c*f-e*d))/2,i=g+h||1,j=g-h||1;return[Math.sqrt(i),Math.sqrt(j)]},a.normalizeRect=function(a){var b=a.slice(0);return a[0]>a[2]&&(b[0]=a[2],b[2]=a[0]),a[1]>a[3]&&(b[1]=a[3],b[3]=a[1]),b},a.intersect=function(b,c){function d(a,b){return a-b}var e=[b[0],b[2],c[0],c[2]].sort(d),f=[b[1],b[3],c[1],c[3]].sort(d),g=[];return b=a.normalizeRect(b),c=a.normalizeRect(c),e[0]===b[0]&&e[1]===c[0]||e[0]===c[0]&&e[1]===b[0]?(g[0]=e[1],g[2]=e[2],f[0]===b[1]&&f[1]===c[1]||f[0]===c[1]&&f[1]===b[1]?(g[1]=f[1],g[3]=f[2],g):!1):!1},a.sign=function(a){return 0>a?-1:1},a.appendToArray=function(a,b){Array.prototype.push.apply(a,b)},a.prependToArray=function(a,b){Array.prototype.unshift.apply(a,b)},a.extendObj=function(a,b){for(var c in b)a[c]=b[c]},a.getInheritableProperty=function(a,b){for(;a&&!a.has(b);)a=a.get("Parent");return a?a.get(b):null},a.inherit=function(a,b,c){a.prototype=Object.create(b.prototype),a.prototype.constructor=a;for(var d in c)a.prototype[d]=c[d]},a.loadScript=function(a,b){var c=document.createElement("script"),d=!1;c.setAttribute("src",a),b&&(c.onload=function(){d||b(),d=!0}),document.getElementsByTagName("head")[0].appendChild(c)},a}();PDFJS.PageViewport=function(){function a(a,b,c,d,e,f){this.viewBox=a,this.scale=b,this.rotation=c,this.offsetX=d,this.offsetY=e;var g,h,i,j,k=(a[2]+a[0])/2,l=(a[3]+a[1])/2;switch(c%=360,c=0>c?c+360:c){case 180:g=-1,h=0,i=0,j=1;break;case 90:g=0,h=1,i=1,j=0;break;case 270:g=0,h=-1,i=-1,j=0;break;default:g=1,h=0,i=0,j=-1}f&&(i=-i,j=-j);var m,n,o,p;0===g?(m=Math.abs(l-a[1])*b+d,n=Math.abs(k-a[0])*b+e,o=Math.abs(a[3]-a[1])*b,p=Math.abs(a[2]-a[0])*b):(m=Math.abs(k-a[0])*b+d,n=Math.abs(l-a[1])*b+e,o=Math.abs(a[2]-a[0])*b,p=Math.abs(a[3]-a[1])*b),this.transform=[g*b,h*b,i*b,j*b,m-g*b*k-i*b*l,n-h*b*k-j*b*l],this.width=o,this.height=p,this.fontScale=b}return a.prototype={clone:function(b){b=b||{};var c="scale"in b?b.scale:this.scale,d="rotation"in b?b.rotation:this.rotation;return new a(this.viewBox.slice(),c,d,this.offsetX,this.offsetY,b.dontFlip)},convertToViewportPoint:function(a,b){return T.applyTransform([a,b],this.transform)},convertToViewportRectangle:function(a){var b=T.applyTransform([a[0],a[1]],this.transform),c=T.applyTransform([a[2],a[3]],this.transform);return[b[0],b[1],c[0],c[1]]},convertToPdfPoint:function(a,b){return T.applyInverseTransform([a,b],this.transform)}},a}();PDFJS.createPromiseCapability=s,function(){function a(a){this._status=c,this._handlers=[];try{a.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(b){this._reject(b)}}if(z.Promise)return"function"!=typeof z.Promise.all&&(z.Promise.all=function(a){var b,c,d=0,e=[],f=new z.Promise(function(a,d){b=a,c=d});return a.forEach(function(a,f){d++,a.then(function(a){e[f]=a,d--,0===d&&b(e)},c)}),0===d&&b(e),f}),"function"!=typeof z.Promise.resolve&&(z.Promise.resolve=function(a){return new z.Promise(function(b){b(a)})}),"function"!=typeof z.Promise.reject&&(z.Promise.reject=function(a){return new z.Promise(function(b,c){c(a)})}),void("function"!=typeof z.Promise.prototype["catch"]&&(z.Promise.prototype["catch"]=function(a){return z.Promise.prototype.then(void 0,a)}));var c=0,d=1,e=2,f=500,g={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(a){a._status!==c&&(this.handlers=this.handlers.concat(a._handlers),a._handlers=[],this.running||(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(var a=1,b=Date.now()+a;this.handlers.length>0;){var c=this.handlers.shift(),f=c.thisPromise._status,g=c.thisPromise._value;try{f===d?"function"==typeof c.onResolve&&(g=c.onResolve(g)):"function"==typeof c.onReject&&(g=c.onReject(g),f=d,c.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(c.thisPromise))}catch(h){f=e,g=h}if(c.nextPromise._updateStatus(f,g),Date.now()>=b)break}return this.handlers.length>0?void setTimeout(this.runHandlers.bind(this),0):void(this.running=!1)},addUnhandledRejection:function(a){this.unhandledRejections.push({promise:a,time:Date.now()}),this.scheduleRejectionCheck()},removeUnhandeledRejection:function(a){a._unhandledRejection=!1;for(var b=0;bf){var d=this.unhandledRejections[c].promise._value,e="Unhandled rejection: "+d;d.stack&&(e+="\n"+d.stack),b(e),this.unhandledRejections.splice(c),c--}this.unhandledRejections.length&&this.scheduleRejectionCheck()}.bind(this),f))}};a.all=function(b){function c(a){g._status!==e&&(i=[],f(a))}var d,f,g=new a(function(a,b){d=a,f=b}),h=b.length,i=[];if(0===h)return d(i),g;for(var j=0,k=b.length;k>j;++j){var l=b[j],m=function(a){return function(b){g._status!==e&&(i[a]=b,h--,0===h&&d(i))}}(j);a.isPromise(l)?l.then(m,c):m(l)}return g},a.isPromise=function(a){return a&&"function"==typeof a.then},a.resolve=function(b){return new a(function(a){a(b)})},a.reject=function(b){return new a(function(a,c){c(b)})},a.prototype={_status:null,_value:null,_handlers:null,_unhandledRejection:null,_updateStatus:function(b,c){if(this._status!==d&&this._status!==e){if(b===d&&a.isPromise(c))return void c.then(this._updateStatus.bind(this,d),this._updateStatus.bind(this,e));this._status=b,this._value=c,b===e&&0===this._handlers.length&&(this._unhandledRejection=!0,g.addUnhandledRejection(this)),g.scheduleHandlers(this)}},_resolve:function(a){this._updateStatus(d,a)},_reject:function(a){this._updateStatus(e,a)},then:function(b,c){var d=new a(function(a,b){this.resolve=a,this.reject=b});return this._handlers.push({thisPromise:this,onResolve:b,onReject:c,nextPromise:d}),g.scheduleHandlers(this),d},"catch":function(a){return this.then(void 0,a)}},z.Promise=a}();var U=function(){function a(a,b,c){for(;a.lengthb;++b){var g=d[b].name;g.length>f&&(f=g.length)}for(b=0,c=d.length;c>b;++b){var h=d[b],i=h.end-h.start;e+=a(h.name," ",f)+" "+i+"ms\n"}return e}},c}();PDFJS.createBlob=function(a,b){if("undefined"!=typeof Blob)return new Blob([a],{type:b});var c=new MozBlobBuilder;return c.append(a),c.getBlob(b)},PDFJS.createObjectURL=function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(b,c){if(!PDFJS.disableCreateObjectURL&&"undefined"!=typeof URL&&URL.createObjectURL){var d=PDFJS.createBlob(b,c);return URL.createObjectURL(d)}for(var e="data:"+c+";base64,",f=0,g=b.length;g>f;f+=3){var h=255&b[f],i=255&b[f+1],j=255&b[f+2],k=h>>2,l=(3&h)<<4|i>>4,m=g>f+1?(15&i)<<2|j>>6:64,n=g>f+2?63&j:64;e+=a[k]+a[l]+a[m]+a[n]}return e}}(),t.prototype={on:function(a,b,c){var e=this.actionHandler;e[a]&&d('There is already an actionName called "'+a+'"'),e[a]=[b,c]},send:function(a,b,c){var d={action:a,data:b};this.postMessage(d,c)},sendWithPromise:function(a,b,c){var d=this.callbackIndex++,e={action:a,data:b,callbackId:d},f=s();this.callbacksCapabilities[d]=f;try{this.postMessage(e,c)}catch(g){f.reject(g)}return f.promise},postMessage:function(a,b){b&&this.postMessageTransfers?this.comObj.postMessage(a,b):this.comObj.postMessage(a)}},PDFJS.maxImageSize=void 0===PDFJS.maxImageSize?-1:PDFJS.maxImageSize,PDFJS.cMapUrl=void 0===PDFJS.cMapUrl?null:PDFJS.cMapUrl,PDFJS.cMapPacked=void 0===PDFJS.cMapPacked?!1:PDFJS.cMapPacked,PDFJS.disableFontFace=void 0===PDFJS.disableFontFace?!1:PDFJS.disableFontFace,PDFJS.imageResourcesPath=void 0===PDFJS.imageResourcesPath?"":PDFJS.imageResourcesPath,PDFJS.disableWorker=void 0===PDFJS.disableWorker?!1:PDFJS.disableWorker,PDFJS.workerSrc=void 0===PDFJS.workerSrc?null:PDFJS.workerSrc,PDFJS.disableRange=void 0===PDFJS.disableRange?!1:PDFJS.disableRange,PDFJS.disableStream=void 0===PDFJS.disableStream?!1:PDFJS.disableStream,PDFJS.disableAutoFetch=void 0===PDFJS.disableAutoFetch?!1:PDFJS.disableAutoFetch,PDFJS.pdfBug=void 0===PDFJS.pdfBug?!1:PDFJS.pdfBug,PDFJS.postMessageTransfers=void 0===PDFJS.postMessageTransfers?!0:PDFJS.postMessageTransfers,PDFJS.disableCreateObjectURL=void 0===PDFJS.disableCreateObjectURL?!1:PDFJS.disableCreateObjectURL,PDFJS.disableWebGL=void 0===PDFJS.disableWebGL?!0:PDFJS.disableWebGL,PDFJS.disableFullscreen=void 0===PDFJS.disableFullscreen?!1:PDFJS.disableFullscreen,PDFJS.useOnlyCssZoom=void 0===PDFJS.useOnlyCssZoom?!1:PDFJS.useOnlyCssZoom, -PDFJS.verbosity=void 0===PDFJS.verbosity?PDFJS.VERBOSITY_LEVELS.warnings:PDFJS.verbosity,PDFJS.maxCanvasPixels=void 0===PDFJS.maxCanvasPixels?16777216:PDFJS.maxCanvasPixels,PDFJS.openExternalLinksInNewWindow=void 0===PDFJS.openExternalLinksInNewWindow?!1:PDFJS.openExternalLinksInNewWindow,PDFJS.externalLinkTarget=void 0===PDFJS.externalLinkTarget?PDFJS.LinkTarget.NONE:PDFJS.externalLinkTarget,PDFJS.isEvalSupported=void 0===PDFJS.isEvalSupported?!0:PDFJS.isEvalSupported,PDFJS.getDocument=function(a,b,e,f){var h=new V;arguments.length>1&&c("getDocument is called with pdfDataRangeTransport, passwordCallback or progressCallback argument"),b&&(b instanceof W||(b=Object.create(b),b.length=a.length,b.initialData=a.initialData,b.abort||(b.abort=function(){})),a=Object.create(a),a.range=b),h.onPassword=e||null,h.onProgress=f||null;var i,j,k;"string"==typeof a?k={url:a}:r(a)?k={data:a}:a instanceof W?k={range:a}:("object"!=typeof a&&d("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object"),a.url||a.data||a.range||d("Invalid parameter object: need either .data, .range or .url"),k=a);var m={};for(var n in k)if("url"!==n||"undefined"==typeof window){if("range"!==n)if("data"!==n||k[n]instanceof Uint8Array)m[n]=k[n];else{var o=k[n];"string"==typeof o?m[n]=l(o):"object"!=typeof o||null===o||isNaN(o.length)?r(o)?m[n]=new Uint8Array(o):d("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property."):m[n]=new Uint8Array(o)}}else m[n]=g(window.location.href,k[n]);return i=s(),j=new Z(i,k.range),i.promise.then(function(){j.fetchDocument(h,m)}),h._transport=j,h};var V=function(){function a(){this._capability=s(),this._transport=null,this.onPassword=null,this.onProgress=null}return a.prototype={get promise(){return this._capability.promise},destroy:function(){return this._transport.destroy()},then:function(a,b){return this.promise.then.apply(this.promise,arguments)}},a}(),W=function(){function a(a,b){this.length=a,this.initialData=b,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._readyCapability=s()}return a.prototype={addRangeListener:function(a){this._rangeListeners.push(a)},addProgressListener:function(a){this._progressListeners.push(a)},addProgressiveReadListener:function(a){this._progressiveReadListeners.push(a)},onDataRange:function(a,b){for(var c=this._rangeListeners,d=0,e=c.length;e>d;++d)c[d](a,b)},onDataProgress:function(a){this._readyCapability.promise.then(function(){for(var b=this._progressListeners,c=0,d=b.length;d>c;++c)b[c](a)}.bind(this))},onDataProgressiveRead:function(a){this._readyCapability.promise.then(function(){for(var b=this._progressiveReadListeners,c=0,d=b.length;d>c;++c)b[c](a)}.bind(this))},transportReady:function(){this._readyCapability.resolve()},requestDataRange:function(a,b){throw new Error("Abstract method PDFDataRangeTransport.requestDataRange")},abort:function(){}},a}();PDFJS.PDFDataRangeTransport=W;var X=function(){function a(a,b,c){this.pdfInfo=a,this.transport=b,this.loadingTask=c}return a.prototype={get numPages(){return this.pdfInfo.numPages},get fingerprint(){return this.pdfInfo.fingerprint},getPage:function(a){return this.transport.getPage(a)},getPageIndex:function(a){return this.transport.getPageIndex(a)},getDestinations:function(){return this.transport.getDestinations()},getDestination:function(a){return this.transport.getDestination(a)},getAttachments:function(){return this.transport.getAttachments()},getJavaScript:function(){return this.transport.getJavaScript()},getOutline:function(){return this.transport.getOutline()},getMetadata:function(){return this.transport.getMetadata()},getData:function(){return this.transport.getData()},getDownloadInfo:function(){return this.transport.downloadInfoCapability.promise},getStats:function(){return this.transport.getStats()},cleanup:function(){this.transport.startCleanup()},destroy:function(){return this.transport.destroy()}},a}(),Y=function(){function a(a,b,c){this.pageIndex=a,this.pageInfo=b,this.transport=c,this.stats=new U,this.stats.enabled=!!z.PDFJS.enableStats,this.commonObjs=c.commonObjs,this.objs=new $,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this.intentStates={},this.destroyed=!1}return a.prototype={get pageNumber(){return this.pageIndex+1},get rotate(){return this.pageInfo.rotate},get ref(){return this.pageInfo.ref},get view(){return this.pageInfo.view},getViewport:function(a,b){return arguments.length<2&&(b=this.rotate),new PDFJS.PageViewport(this.view,a,b,0,0)},getAnnotations:function(){return this.annotationsPromise||(this.annotationsPromise=this.transport.getAnnotations(this.pageIndex)),this.annotationsPromise},render:function(a){function b(a){var b=f.renderTasks.indexOf(g);b>=0&&f.renderTasks.splice(b,1),i.cleanupAfterRender&&(i.pendingCleanup=!0),i._tryCleanup(),a?g.capability.reject(a):g.capability.resolve(),d.timeEnd("Rendering"),d.timeEnd("Overall")}var d=this.stats;d.time("Overall"),this.pendingCleanup=!1;var e="print"===a.intent?"print":"display";this.intentStates[e]||(this.intentStates[e]={});var f=this.intentStates[e];f.displayReadyCapability||(f.receivingOperatorList=!0,f.displayReadyCapability=s(),f.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this.stats.time("Page Request"),this.transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageNumber-1,intent:e}));var g=new aa(b,a,this.objs,this.commonObjs,f.operatorList,this.pageNumber);g.useRequestAnimationFrame="print"!==e,f.renderTasks||(f.renderTasks=[]),f.renderTasks.push(g);var h=g.task;a.continueCallback&&(c("render is used with continueCallback parameter"),h.onContinue=a.continueCallback);var i=this;return f.displayReadyCapability.promise.then(function(a){return i.pendingCleanup?void b():(d.time("Rendering"),g.initalizeGraphics(a),void g.operatorListChanged())},function(a){b(a)}),h},getOperatorList:function(){function a(){c.operatorList.lastChunk&&c.opListReadCapability.resolve(c.operatorList)}var b="oplist";this.intentStates[b]||(this.intentStates[b]={});var c=this.intentStates[b];if(!c.opListReadCapability){var d={};d.operatorListChanged=a,c.receivingOperatorList=!0,c.opListReadCapability=s(),c.renderTasks=[],c.renderTasks.push(d),c.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this.transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageIndex,intent:b})}return c.opListReadCapability.promise},getTextContent:function(){return this.transport.messageHandler.sendWithPromise("GetTextContent",{pageIndex:this.pageNumber-1})},_destroy:function(){this.destroyed=!0,this.transport.pageCache[this.pageIndex]=null;var a=[];return Object.keys(this.intentStates).forEach(function(b){var c=this.intentStates[b];c.renderTasks.forEach(function(b){var c=b.capability.promise["catch"](function(){});a.push(c),b.cancel()})},this),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(a)},destroy:function(){c("page destroy method, use cleanup() instead"),this.cleanup()},cleanup:function(){this.pendingCleanup=!0,this._tryCleanup()},_tryCleanup:function(){this.pendingCleanup&&!Object.keys(this.intentStates).some(function(a){var b=this.intentStates[a];return 0!==b.renderTasks.length||b.receivingOperatorList},this)&&(Object.keys(this.intentStates).forEach(function(a){delete this.intentStates[a]},this),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1)},_startRenderPage:function(a,b){var c=this.intentStates[b];c.displayReadyCapability&&c.displayReadyCapability.resolve(a)},_renderPageChunk:function(a,b){var c,d,e=this.intentStates[b];for(c=0,d=a.length;d>c;c++)e.operatorList.fnArray.push(a.fnArray[c]),e.operatorList.argsArray.push(a.argsArray[c]);for(e.operatorList.lastChunk=a.lastChunk,c=0;ch&&(g.cleanupAfterRender=!0);break;default:d("Got unknown object type "+f)}},this),a.on("DocProgress",function(a){var b=this.loadingTask;b.onProgress&&b.onProgress({loaded:a.loaded,total:a.total})},this),a.on("PageError",function(a){var b=this.pageCache[a.pageNum-1],c=b.intentStates[a.intent];c.displayReadyCapability?c.displayReadyCapability.reject(a.error):d(a.error)},this),a.on("JpegDecode",function(a){var b=a[0],c=a[1];return 3!==c&&1!==c?Promise.reject(new Error("Only 3 components or 1 component can be returned")):new Promise(function(a,d){var e=new Image;e.onload=function(){var b=e.width,d=e.height,f=b*d,g=4*f,h=new Uint8Array(f*c),i=v(b,d),j=i.getContext("2d");j.drawImage(e,0,0);var k,l,m=j.getImageData(0,0,b,d).data;if(3===c)for(k=0,l=0;g>k;k+=4,l+=3)h[l]=m[k],h[l+1]=m[k+1],h[l+2]=m[k+2];else if(1===c)for(k=0,l=0;g>k;k+=4,l++)h[l]=m[k];a({data:h,width:b,height:d})},e.onerror=function(){d(new Error("JpegDecode failed to load image"))},e.src=b})})},fetchDocument:function(a,b){return this.destroyed?(a._capability.reject(new Error("Loading aborted")),void this.destroyCapability.resolve()):(this.loadingTask=a,b.disableAutoFetch=PDFJS.disableAutoFetch,b.disableStream=PDFJS.disableStream,b.chunkedViewerLoading=!!this.pdfDataRangeTransport,this.pdfDataRangeTransport&&(b.length=this.pdfDataRangeTransport.length,b.initialData=this.pdfDataRangeTransport.initialData),void this.messageHandler.send("GetDocRequest",{source:b,disableRange:PDFJS.disableRange,maxImageSize:PDFJS.maxImageSize,cMapUrl:PDFJS.cMapUrl,cMapPacked:PDFJS.cMapPacked,disableFontFace:PDFJS.disableFontFace,disableCreateObjectURL:PDFJS.disableCreateObjectURL,verbosity:PDFJS.verbosity}))},getData:function(){return this.messageHandler.sendWithPromise("GetData",null)},getPage:function(a,b){if(0>=a||a>this.numPages||(0|a)!==a)return Promise.reject(new Error("Invalid page request"));var c=a-1;if(c in this.pagePromises)return this.pagePromises[c];var d=this.messageHandler.sendWithPromise("GetPage",{pageIndex:c}).then(function(a){if(this.destroyed)throw new Error("Transport destroyed");var b=new Y(c,a,this);return this.pageCache[c]=b,b}.bind(this));return this.pagePromises[c]=d,d},getPageIndex:function(a){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:a})},getAnnotations:function(a){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:a})},getDestinations:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)},getDestination:function(a){return this.messageHandler.sendWithPromise("GetDestination",{id:a})},getAttachments:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)},getJavaScript:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)},getOutline:function(){return this.messageHandler.sendWithPromise("GetOutline",null)},getMetadata:function(){return this.messageHandler.sendWithPromise("GetMetadata",null).then(function(a){return{info:a[0],metadata:a[1]?new PDFJS.Metadata(a[1]):null}})},getStats:function(){return this.messageHandler.sendWithPromise("GetStats",null)},startCleanup:function(){this.messageHandler.sendWithPromise("Cleanup",null).then(function(){for(var a=0,b=this.pageCache.length;b>a;a++){var c=this.pageCache[a];c&&c.cleanup()}this.commonObjs.clear(),pa.clear()}.bind(this))}},c}(),$=function(){function a(){this.objs={}}return a.prototype={ensureObj:function(a){if(this.objs[a])return this.objs[a];var b={capability:s(),data:null,resolved:!1};return this.objs[a]=b,b},get:function(a,b){if(b)return this.ensureObj(a).capability.promise.then(b),null;var c=this.objs[a];return c&&c.resolved||d("Requesting object that isn't resolved yet "+a),c.data},resolve:function(a,b){var c=this.ensureObj(a);c.resolved=!0,c.data=b,c.capability.resolve(b)},isResolved:function(a){var b=this.objs;return b[a]?b[a].resolved:!1},hasData:function(a){return this.isResolved(a)},getData:function(a){var b=this.objs;return b[a]&&b[a].resolved?b[a].data:null},clear:function(){this.objs={}}},a}(),_=function(){function a(a){this._internalRenderTask=a,this.onContinue=null}return a.prototype={get promise(){return this._internalRenderTask.capability.promise},cancel:function(){this._internalRenderTask.cancel()},then:function(a,b){return this.promise.then.apply(this.promise,arguments)}},a}(),aa=function(){function a(a,b,c,d,e,f){this.callback=a,this.params=b,this.objs=c,this.commonObjs=d,this.operatorListIdx=null,this.operatorList=e,this.pageNumber=f,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this.useRequestAnimationFrame=!1,this.cancelled=!1,this.capability=s(),this.task=new _(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this)}return a.prototype={initalizeGraphics:function(a){if(!this.cancelled){PDFJS.pdfBug&&"StepperManager"in z&&z.StepperManager.enabled&&(this.stepper=z.StepperManager.create(this.pageNumber-1),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var b=this.params;this.gfx=new ka(b.canvasContext,this.commonObjs,this.objs,b.imageLayer),this.gfx.beginDrawing(b.viewport,a),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}},cancel:function(){this.running=!1,this.cancelled=!0,this.callback("cancelled")},operatorListChanged:function(){return this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),void(this.running||this._continue())):void(this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound))},_continue:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue.call(this.task,this._scheduleNextBound):this._scheduleNext())},_scheduleNext:function(){this.useRequestAnimationFrame?window.requestAnimationFrame(this._nextBound):Promise.resolve(void 0).then(this._nextBound)},_next:function(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this.callback())))}},a}(),ba=(PDFJS.Metadata=function(){function a(a){return a.replace(/>\\376\\377([^<]+)/g,function(a,b){for(var c=b.replace(/\\([0-3])([0-7])([0-7])/g,function(a,b,c,d){return String.fromCharCode(64*b+8*c+1*d)}),d="",e=0;e"+d})}function b(b){if("string"==typeof b){b=a(b);var c=new DOMParser;b=c.parseFromString(b,"application/xml")}else b instanceof Document||d("Metadata: Invalid metadata object");this.metaDocument=b,this.metadata={},this.parse()}return b.prototype={parse:function(){var a=this.metaDocument,b=a.documentElement;if("rdf:rdf"!==b.nodeName.toLowerCase())for(b=b.firstChild;b&&"rdf:rdf"!==b.nodeName.toLowerCase();)b=b.nextSibling;var c=b?b.nodeName.toLowerCase():null;if(b&&"rdf:rdf"===c&&b.hasChildNodes()){var d,e,f,g,h,i,j,k=b.childNodes;for(g=0,i=k.length;i>g;g++)if(d=k[g],"rdf:description"===d.nodeName.toLowerCase())for(h=0,j=d.childNodes.length;j>h;h++)"#text"!==d.childNodes[h].nodeName.toLowerCase()&&(e=d.childNodes[h],f=e.nodeName.toLowerCase(),this.metadata[f]=e.textContent.trim())}},get:function(a){return this.metadata[a]||null},has:function(a){return"undefined"!=typeof this.metadata[a]}},b}(),16),ca=100,da=4096,ea=.65,fa=!0,ga=1e3,ha=16,ia=function(){var a={};return{getCanvas:function(b,c,d,e){var f;if(void 0!==a[b])f=a[b],f.canvas.width=c,f.canvas.height=d,f.context.setTransform(1,0,0,1,0,0);else{var g=v(c,d),h=g.getContext("2d");e&&w(h),a[b]=f={canvas:g,context:h}}return f},clear:function(){for(var b in a){var c=a[b];c.canvas.width=0,c.canvas.height=0,delete a[b]}}}}(),ja=function(){function a(a){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=S,this.textMatrixScale=1,this.fontMatrix=B,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=C.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.old=a}return a.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(a,b){this.x=a,this.y=b}},a}(),ka=function(){function c(a,b,c,d){this.ctx=a,this.current=new ja,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=b,this.objs=c,this.imageLayer=d,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,a&&w(a),this.cachedGetSinglePixelWidth=null}function e(a,b){if("undefined"!=typeof ImageData&&b instanceof ImageData)return void a.putImageData(b,0,0);var c,e,f,g,h,i=b.height,j=b.width,k=i%ha,l=(i-k)/ha,m=0===k?l:l+1,n=a.createImageData(j,ha),o=0,p=b.data,q=n.data;if(b.kind===D.GRAYSCALE_1BPP){var r=p.byteLength,s=PDFJS.hasCanvasTypedArrays?new Uint32Array(q.buffer):new R(q),t=s.length,u=j+7>>3,v=4294967295,w=PDFJS.isLittleEndian||!PDFJS.hasCanvasTypedArrays?4278190080:255;for(e=0;m>e;e++){for(g=l>e?ha:k,c=0,f=0;g>f;f++){for(var x=r-o,y=0,z=x>u?j:8*x-7,A=-8&z,B=0,C=0;A>y;y+=8)C=p[o++],s[c++]=128&C?v:w,s[c++]=64&C?v:w,s[c++]=32&C?v:w,s[c++]=16&C?v:w,s[c++]=8&C?v:w,s[c++]=4&C?v:w,s[c++]=2&C?v:w,s[c++]=1&C?v:w;for(;z>y;y++)0===B&&(C=p[o++],B=128),s[c++]=C&B?v:w,B>>=1}for(;t>c;)s[c++]=0;a.putImageData(n,0,e*ha)}}else if(b.kind===D.RGBA_32BPP){for(f=0,h=j*ha*4,e=0;l>e;e++)q.set(p.subarray(o,o+h)),o+=h,a.putImageData(n,0,f),f+=ha;m>e&&(h=j*k*4,q.set(p.subarray(o,o+h)),a.putImageData(n,0,f))}else if(b.kind===D.RGB_24BPP)for(g=ha,h=j*g,e=0;m>e;e++){for(e>=l&&(g=k,h=j*g),c=0,f=h;f--;)q[c++]=p[o++],q[c++]=p[o++],q[c++]=p[o++],q[c++]=255;a.putImageData(n,0,e*ha)}else d("bad image kind: "+b.kind)}function g(a,b){for(var c=b.height,d=b.width,e=c%ha,f=(c-e)/ha,g=0===e?f:f+1,h=a.createImageData(d,ha),i=0,j=b.data,k=h.data,l=0;g>l;l++){for(var m=f>l?ha:e,n=3,o=0;m>o;o++)for(var p=0,q=0;d>q;q++){if(!p){var r=j[i++];p=128}k[n]=r&p?0:255,n+=4,p>>=1}a.putImageData(h,0,l*ha)}}function h(a,b){for(var c=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],d=0,e=c.length;e>d;d++){var f=c[d];void 0!==a[f]&&(b[f]=a[f])}void 0!==a.setLineDash?(b.setLineDash(a.getLineDash()),b.lineDashOffset=a.lineDashOffset):void 0!==a.mozDashOffset&&(b.mozDash=a.mozDash,b.mozDashOffset=a.mozDashOffset)}function j(a,b,c,d){for(var e=a.length,f=3;e>f;f+=4){var g=a[f];if(0===g)a[f-3]=b,a[f-2]=c,a[f-1]=d;else if(255>g){var h=255-g;a[f-3]=a[f-3]*g+b*h>>8,a[f-2]=a[f-2]*g+c*h>>8,a[f-1]=a[f-1]*g+d*h>>8}}}function k(a,b){for(var c=a.length,d=1/255,e=3;c>e;e+=4){var f=a[e];b[e]=b[e]*f*d|0}}function l(a,b){for(var c=a.length,d=3;c>d;d+=4){var e=77*a[d-3]+152*a[d-2]+28*a[d-1];b[d]=b[d]*e>>16}}function m(a,b,c,d,e,f){var g,h=!!f,i=h?f[0]:0,m=h?f[1]:0,n=h?f[2]:0;g="Luminosity"===e?l:k;for(var o=1048576,p=Math.min(d,Math.ceil(o/c)),q=0;d>q;q+=p){var r=Math.min(p,d-q),s=a.getImageData(0,q,c,r),t=b.getImageData(0,q,c,r);h&&j(s.data,i,m,n),g(s.data,t.data),a.putImageData(t,0,q)}}function n(a,b,c){var d=b.canvas,e=b.context;a.setTransform(b.scaleX,0,0,b.scaleY,b.offsetX,b.offsetY);var f=b.backdrop||null;if(la.isEnabled){var g=la.composeSMask(c.canvas,d,{subtype:b.subtype,backdrop:f});return a.setTransform(1,0,0,1,0,0),void a.drawImage(g,b.offsetX,b.offsetY)}m(e,c,d.width,d.height,b.subtype,f),a.drawImage(d,0,0)}var o=15,r=10,s=["butt","round","square"],t=["miter","round","bevel"],u={},v={};c.prototype={beginDrawing:function(a,b){var c=this.ctx.canvas.width,d=this.ctx.canvas.height;b?this.ctx.clearRect(0,0,c,d):(this.ctx.mozOpaque=!0,this.ctx.save(),this.ctx.fillStyle="rgb(255, 255, 255)",this.ctx.fillRect(0,0,c,d),this.ctx.restore());var e=a.transform;this.ctx.save(),this.ctx.transform.apply(this.ctx,e),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(a,b,c,d){var e=a.argsArray,f=a.fnArray,g=b||0,h=e.length;if(h===g)return g;for(var i,j=h-g>r&&"function"==typeof c,k=j?Date.now()+o:0,l=0,m=this.commonObjs,n=this.objs;;){if(void 0!==d&&g===d.nextBreakPoint)return d.breakIt(g,c),g;if(i=f[g],i!==G.dependency)this[i].apply(this,e[g]);else for(var p=e[g],q=0,s=p.length;s>q;q++){var t=p[q],u="g"===t[0]&&"_"===t[1],v=u?m:n;if(!v.isResolved(t))return v.get(t,c),g}if(g++,g===h)return g;if(j&&++l>r){if(Date.now()>k)return c(),g;l=0}}},endDrawing:function(){this.ctx.restore(),ia.clear(),la.clear(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(a){this.current.lineWidth=a,this.ctx.lineWidth=a},setLineCap:function(a){this.ctx.lineCap=s[a]},setLineJoin:function(a){this.ctx.lineJoin=t[a]},setMiterLimit:function(a){this.ctx.miterLimit=a},setDash:function(a,b){var c=this.ctx;void 0!==c.setLineDash?(c.setLineDash(a),c.lineDashOffset=b):(c.mozDash=a,c.mozDashOffset=b)},setRenderingIntent:function(a){},setFlatness:function(a){},setGState:function(a){for(var c=0,d=a.length;d>c;c++){var e=a[c],f=e[0],g=e[1];switch(f){case"LW":this.setLineWidth(g);break;case"LC":this.setLineCap(g);break;case"LJ":this.setLineJoin(g);break;case"ML":this.setMiterLimit(g);break;case"D":this.setDash(g[0],g[1]);break;case"RI":this.setRenderingIntent(g);break;case"FL":this.setFlatness(g);break;case"Font":this.setFont(g[0],g[1]);break;case"CA":this.current.strokeAlpha=e[1];break;case"ca":this.current.fillAlpha=e[1],this.ctx.globalAlpha=e[1];break;case"BM":if(g&&g.name&&"Normal"!==g.name){var h=g.name.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()}).substring(1);this.ctx.globalCompositeOperation=h,this.ctx.globalCompositeOperation!==h&&b('globalCompositeOperation "'+h+'" is not supported')}else this.ctx.globalCompositeOperation="source-over";break;case"SMask":this.current.activeSMask&&this.endSMaskGroup(),this.current.activeSMask=g?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null}}},beginSMaskGroup:function(){var a=this.current.activeSMask,b=a.canvas.width,c=a.canvas.height,d="smaskGroupAt"+this.groupLevel,e=ia.getCanvas(d,b,c,!0),f=this.ctx,g=f.mozCurrentTransform;this.ctx.save();var i=e.context;i.scale(1/a.scaleX,1/a.scaleY),i.translate(-a.offsetX,-a.offsetY),i.transform.apply(i,g),h(f,i),this.ctx=i,this.setGState([["BM","Normal"],["ca",1],["CA",1]]),this.groupStack.push(f),this.groupLevel++},endSMaskGroup:function(){var a=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),n(this.ctx,this.current.activeSMask,a),this.ctx.restore()},save:function(){this.ctx.save();var a=this.current;this.stateStack.push(a),this.current=a.clone(),this.current.activeSMask=null},restore:function(){0!==this.stateStack.length&&(null!==this.current.activeSMask&&this.endSMaskGroup(),this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this.cachedGetSinglePixelWidth=null)},transform:function(a,b,c,d,e,f){this.ctx.transform(a,b,c,d,e,f),this.cachedGetSinglePixelWidth=null},constructPath:function(a,b){for(var c=this.ctx,d=this.current,e=d.x,f=d.y,g=0,h=0,i=a.length;i>g;g++)switch(0|a[g]){case G.rectangle:e=b[h++],f=b[h++];var j=b[h++],k=b[h++];0===j&&(j=this.getSinglePixelWidth()),0===k&&(k=this.getSinglePixelWidth());var l=e+j,m=f+k;this.ctx.moveTo(e,f),this.ctx.lineTo(l,f),this.ctx.lineTo(l,m),this.ctx.lineTo(e,m),this.ctx.lineTo(e,f),this.ctx.closePath();break;case G.moveTo:e=b[h++],f=b[h++],c.moveTo(e,f);break;case G.lineTo:e=b[h++],f=b[h++],c.lineTo(e,f);break;case G.curveTo:e=b[h+4],f=b[h+5],c.bezierCurveTo(b[h],b[h+1],b[h+2],b[h+3],e,f),h+=6;break;case G.curveTo2:c.bezierCurveTo(e,f,b[h],b[h+1],b[h+2],b[h+3]),e=b[h+2],f=b[h+3],h+=4;break;case G.curveTo3:e=b[h+2],f=b[h+3],c.bezierCurveTo(b[h],b[h+1],e,f,e,f),h+=4;break;case G.closePath:c.closePath()}d.setCurrentPoint(e,f)},closePath:function(){this.ctx.closePath()},stroke:function(a){a="undefined"!=typeof a?a:!0;var b=this.ctx,c=this.current.strokeColor;b.lineWidth=Math.max(this.getSinglePixelWidth()*ea,this.current.lineWidth),b.globalAlpha=this.current.strokeAlpha,c&&c.hasOwnProperty("type")&&"Pattern"===c.type?(b.save(),b.strokeStyle=c.getPattern(b,this),b.stroke(),b.restore()):b.stroke(),a&&this.consumePath(),b.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(a){a="undefined"!=typeof a?a:!0;var b=this.ctx,c=this.current.fillColor,d=this.current.patternFill,e=!1;d&&(b.save(),b.fillStyle=c.getPattern(b,this),e=!0),this.pendingEOFill?(void 0!==b.mozFillRule?(b.mozFillRule="evenodd",b.fill(),b.mozFillRule="nonzero"):b.fill("evenodd"),this.pendingEOFill=!1):b.fill(),e&&b.restore(),a&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=u},eoClip:function(){this.pendingClip=v},beginText:function(){this.current.textMatrix=S,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){var a=this.pendingTextPaths,b=this.ctx;if(void 0===a)return void b.beginPath();b.save(),b.beginPath();for(var c=0;cc?(c=-c,f.fontDirection=-1):f.fontDirection=1,this.current.font=e,this.current.fontSize=c,!e.isType3Font){var g=e.loadedName||"sans-serif",h=e.black?e.bold?"900":"bold":e.bold?"bold":"normal",i=e.italic?"italic":"normal",j='"'+g+'", '+e.fallbackName,k=ba>c?ba:c>ca?ca:c;this.current.fontSizeScale=c/k;var l=i+" "+h+" "+k+"px "+j;this.ctx.font=l}},setTextRenderingMode:function(a){this.current.textRenderingMode=a},setTextRise:function(a){this.current.textRise=a},moveText:function(a,b){this.current.x=this.current.lineX+=a,this.current.y=this.current.lineY+=b},setLeadingMoveText:function(a,b){this.setLeading(-b),this.moveText(a,b)},setTextMatrix:function(a,b,c,d,e,f){this.current.textMatrix=[a,b,c,d,e,f],this.current.textMatrixScale=Math.sqrt(a*a+b*b),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar:function(a,b,c){var d,e=this.ctx,f=this.current,g=f.font,h=f.textRenderingMode,i=f.fontSize/f.fontSizeScale,j=h&C.FILL_STROKE_MASK,k=!!(h&C.ADD_TO_PATH_FLAG);if((g.disableFontFace||k)&&(d=g.getPathGenerator(this.commonObjs,a)),g.disableFontFace?(e.save(),e.translate(b,c),e.beginPath(),d(e,i),(j===C.FILL||j===C.FILL_STROKE)&&e.fill(),(j===C.STROKE||j===C.FILL_STROKE)&&e.stroke(),e.restore()):((j===C.FILL||j===C.FILL_STROKE)&&e.fillText(a,b,c),(j===C.STROKE||j===C.FILL_STROKE)&&e.strokeText(a,b,c)),k){var l=this.pendingTextPaths||(this.pendingTextPaths=[]); -l.push({transform:e.mozCurrentTransform,x:b,y:c,fontSize:i,addToPath:d})}},get isFontSubpixelAAEnabled(){var a=document.createElement("canvas").getContext("2d");a.scale(1.5,1),a.fillText("I",0,10);for(var b=a.getImageData(0,0,10,10).data,c=!1,d=3;d0&&b[d]<255){c=!0;break}return i(this,"isFontSubpixelAAEnabled",c)},showText:function(a){var b=this.current,c=b.font;if(c.isType3Font)return this.showType3Text(a);var d=b.fontSize;if(0!==d){var e=this.ctx,f=b.fontSizeScale,g=b.charSpacing,h=b.wordSpacing,i=b.fontDirection,j=b.textHScale*i,k=a.length,l=c.vertical,m=l?1:-1,n=c.defaultVMetrics,o=d*b.fontMatrix[0],q=b.textRenderingMode===C.FILL&&!c.disableFontFace;e.save(),e.transform.apply(e,b.textMatrix),e.translate(b.x,b.y+b.textRise),i>0?e.scale(j,-1):e.scale(j,1);var r=b.lineWidth,s=b.textMatrixScale;if(0===s||0===r){var t=b.textRenderingMode&C.FILL_STROKE_MASK;(t===C.STROKE||t===C.FILL_STROKE)&&(this.cachedGetSinglePixelWidth=null,r=this.getSinglePixelWidth()*ea)}else r/=s;1!==f&&(e.scale(f,f),r/=f),e.lineWidth=r;var u,v=0;for(u=0;k>u;++u){var w=a[u];if(null!==w)if(p(w))v+=m*w*d/1e3;else{var x,y,z,A,B=!1,D=w.fontChar,E=w.accent,F=w.width;if(l){var G,H,I;G=w.vmetric||n,H=w.vmetric?G[1]:.5*F,H=-H*o,I=G[2]*o,F=G?-G[0]:F,x=H/f,y=(v+I)/f}else x=v/f,y=0;if(c.remeasure&&F>0&&this.isFontSubpixelAAEnabled){var J=1e3*e.measureText(D).width/d*f,K=F/J;B=!0,e.save(),e.scale(K,1),x/=K}q&&!E?e.fillText(D,x,y):(this.paintChar(D,x,y),E&&(z=x+E.offset.x/f,A=y-E.offset.y/f,this.paintChar(E.fontChar,z,A)));var L=F*o+g*i;v+=L,B&&e.restore()}else v+=i*h}l?b.y-=v*j:b.x+=v*j,e.restore()}},showType3Text:function(a){var c,d,e,f,g=this.ctx,h=this.current,i=h.font,j=h.fontSize,k=h.fontDirection,l=i.vertical?1:-1,m=h.charSpacing,n=h.wordSpacing,o=h.textHScale*k,q=h.fontMatrix||B,r=a.length,s=h.textRenderingMode===C.INVISIBLE;if(!s&&0!==j){for(this.cachedGetSinglePixelWidth=null,g.save(),g.transform.apply(g,h.textMatrix),g.translate(h.x,h.y),g.scale(o,k),c=0;r>c;++c)if(d=a[c],null!==d)if(p(d))f=l*d*j/1e3,this.ctx.translate(f,0),h.x+=f*o;else{var t=i.charProcOperatorList[d.operatorListId];if(t){this.processingType3=d,this.save(),g.scale(j,j),g.transform.apply(g,q),this.executeOperatorList(t),this.restore();var u=T.applyTransform([d.width,0],q);e=u[0]*j+m,g.translate(e,0),h.x+=e*o}else b('Type3 character "'+d.operatorListId+'" is not available')}else this.ctx.translate(n,0),h.x+=n*o;g.restore(),this.processingType3=null}},setCharWidth:function(a,b){},setCharWidthAndBounds:function(a,b,c,d,e,f){this.ctx.rect(c,d,e-c,f-d),this.clip(),this.endPath()},getColorN_Pattern:function(a){var b;if("TilingPattern"===a[0]){var c=a[1],d=this.baseTransform||this.ctx.mozCurrentTransform.slice();b=new oa(a,c,this.ctx,this.objs,this.commonObjs,d)}else b=y(a);return b},setStrokeColorN:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)},setFillColorN:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0},setStrokeRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.ctx.strokeStyle=d,this.current.strokeColor=d},setFillRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.ctx.fillStyle=d,this.current.fillColor=d,this.current.patternFill=!1},shadingFill:function(a){var b=this.ctx;this.save();var c=y(a);b.fillStyle=c.getPattern(b,this,!0);var d=b.mozCurrentTransformInverse;if(d){var e=b.canvas,f=e.width,g=e.height,h=T.applyTransform([0,0],d),i=T.applyTransform([0,g],d),j=T.applyTransform([f,0],d),k=T.applyTransform([f,g],d),l=Math.min(h[0],i[0],j[0],k[0]),m=Math.min(h[1],i[1],j[1],k[1]),n=Math.max(h[0],i[0],j[0],k[0]),o=Math.max(h[1],i[1],j[1],k[1]);this.ctx.fillRect(l,m,n-l,o-m)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){d("Should not call beginInlineImage")},beginImageData:function(){d("Should not call beginImageData")},paintFormXObjectBegin:function(a,b){if(this.save(),this.baseTransformStack.push(this.baseTransform),q(a)&&6===a.length&&this.transform.apply(this,a),this.baseTransform=this.ctx.mozCurrentTransform,q(b)&&4===b.length){var c=b[2]-b[0],d=b[3]-b[1];this.ctx.rect(b[0],b[1],c,d),this.clip(),this.endPath()}},paintFormXObjectEnd:function(){this.restore(),this.baseTransform=this.baseTransformStack.pop()},beginGroup:function(c){this.save();var d=this.ctx;c.isolated||a("TODO: Support non-isolated groups."),c.knockout&&b("Knockout groups not supported.");var e=d.mozCurrentTransform;c.matrix&&d.transform.apply(d,c.matrix),f(c.bbox,"Bounding box is required.");var g=T.getAxialAlignedBoundingBox(c.bbox,d.mozCurrentTransform),i=[0,0,d.canvas.width,d.canvas.height];g=T.intersect(g,i)||[0,0,0,0];var j=Math.floor(g[0]),k=Math.floor(g[1]),l=Math.max(Math.ceil(g[2])-j,1),m=Math.max(Math.ceil(g[3])-k,1),n=1,o=1;l>da&&(n=l/da,l=da),m>da&&(o=m/da,m=da);var p="groupAt"+this.groupLevel;c.smask&&(p+="_smask_"+this.smaskCounter++%2);var q=ia.getCanvas(p,l,m,!0),r=q.context;r.scale(1/n,1/o),r.translate(-j,-k),r.transform.apply(r,e),c.smask?this.smaskStack.push({canvas:q.canvas,context:r,offsetX:j,offsetY:k,scaleX:n,scaleY:o,subtype:c.smask.subtype,backdrop:c.smask.backdrop}):(d.setTransform(1,0,0,1,0,0),d.translate(j,k),d.scale(n,o)),h(d,r),this.ctx=r,this.setGState([["BM","Normal"],["ca",1],["CA",1]]),this.groupStack.push(d),this.groupLevel++},endGroup:function(a){this.groupLevel--;var b=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,a.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(b.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.current=new ja},endAnnotations:function(){this.restore()},beginAnnotation:function(a,b,c){if(this.save(),q(a)&&4===a.length){var d=a[2]-a[0],e=a[3]-a[1];this.ctx.rect(a[0],a[1],d,e),this.clip(),this.endPath()}this.transform.apply(this,b),this.transform.apply(this,c)},endAnnotation:function(){this.restore()},paintJpegXObject:function(a,c,d){var e=this.objs.get(a);if(!e)return void b("Dependent image isn't ready yet");this.save();var f=this.ctx;if(f.scale(1/c,-1/d),f.drawImage(e,0,0,e.width,e.height,0,-d,c,d),this.imageLayer){var g=f.mozCurrentTransformInverse,h=this.getCanvasPosition(0,0);this.imageLayer.appendImage({objId:a,left:h[0],top:h[1],width:c/g[0],height:d/g[3]})}this.restore()},paintImageMaskXObject:function(a){var b=this.ctx,c=a.width,d=a.height,e=this.current.fillColor,f=this.current.patternFill,h=this.processingType3;if(fa&&h&&void 0===h.compiled&&(ga>=c&&ga>=d?h.compiled=x({data:a.data,width:c,height:d}):h.compiled=null),h&&h.compiled)return void h.compiled(b);var i=ia.getCanvas("maskCanvas",c,d),j=i.context;j.save(),g(j,a),j.globalCompositeOperation="source-in",j.fillStyle=f?e.getPattern(j,this):e,j.fillRect(0,0,c,d),j.restore(),this.paintInlineImageXObject(i.canvas)},paintImageMaskXObjectRepeat:function(a,b,c,d){var e=a.width,f=a.height,h=this.current.fillColor,i=this.current.patternFill,j=ia.getCanvas("maskCanvas",e,f),k=j.context;k.save(),g(k,a),k.globalCompositeOperation="source-in",k.fillStyle=i?h.getPattern(k,this):h,k.fillRect(0,0,e,f),k.restore();for(var l=this.ctx,m=0,n=d.length;n>m;m+=2)l.save(),l.transform(b,0,0,c,d[m],d[m+1]),l.scale(1,-1),l.drawImage(j.canvas,0,0,e,f,0,-1,1,1),l.restore()},paintImageMaskXObjectGroup:function(a){for(var b=this.ctx,c=this.current.fillColor,d=this.current.patternFill,e=0,f=a.length;f>e;e++){var h=a[e],i=h.width,j=h.height,k=ia.getCanvas("maskCanvas",i,j),l=k.context;l.save(),g(l,h),l.globalCompositeOperation="source-in",l.fillStyle=d?c.getPattern(l,this):c,l.fillRect(0,0,i,j),l.restore(),b.save(),b.transform.apply(b,h.transform),b.scale(1,-1),b.drawImage(k.canvas,0,0,i,j,0,-1,1,1),b.restore()}},paintImageXObject:function(a){var c=this.objs.get(a);return c?void this.paintInlineImageXObject(c):void b("Dependent image isn't ready yet")},paintImageXObjectRepeat:function(a,c,d,e){var f=this.objs.get(a);if(!f)return void b("Dependent image isn't ready yet");for(var g=f.width,h=f.height,i=[],j=0,k=e.length;k>j;j+=2)i.push({transform:[c,0,0,d,e[j],e[j+1]],x:0,y:0,w:g,h:h});this.paintInlineImageXObjectGroup(f,i)},paintInlineImageXObject:function(a){var b=a.width,c=a.height,d=this.ctx;this.save(),d.scale(1/b,-1/c);var f,g,h=d.mozCurrentTransformInverse,i=h[0],j=h[1],k=Math.max(Math.sqrt(i*i+j*j),1),l=h[2],m=h[3],n=Math.max(Math.sqrt(l*l+m*m),1);if(a instanceof HTMLElement||!a.data)f=a;else{g=ia.getCanvas("inlineImage",b,c);var o=g.context;e(o,a),f=g.canvas}for(var p=b,q=c,r="prescale1";k>2&&p>1||n>2&&q>1;){var s=p,t=q;k>2&&p>1&&(s=Math.ceil(p/2),k/=p/s),n>2&&q>1&&(t=Math.ceil(q/2),n/=q/t),g=ia.getCanvas(r,s,t),o=g.context,o.clearRect(0,0,s,t),o.drawImage(f,0,0,p,q,0,0,s,t),f=g.canvas,p=s,q=t,r="prescale1"===r?"prescale2":"prescale1"}if(d.drawImage(f,0,0,p,q,0,-c,b,c),this.imageLayer){var u=this.getCanvasPosition(0,-c);this.imageLayer.appendImage({imgData:a,left:u[0],top:u[1],width:b/h[0],height:c/h[3]})}this.restore()},paintInlineImageXObjectGroup:function(a,b){var c=this.ctx,d=a.width,f=a.height,g=ia.getCanvas("inlineImage",d,f),h=g.context;e(h,a);for(var i=0,j=b.length;j>i;i++){var k=b[i];if(c.save(),c.transform.apply(c,k.transform),c.scale(1,-1),c.drawImage(g.canvas,k.x,k.y,k.w,k.h,0,-1,1,1),this.imageLayer){var l=this.getCanvasPosition(k.x,k.y);this.imageLayer.appendImage({imgData:a,left:l[0],top:l[1],width:d,height:f})}c.restore()}},paintSolidColorImageMask:function(){this.ctx.fillRect(0,0,1,1)},paintXObject:function(){I.notify(H.unknown),b("Unsupported 'paintXObject' command.")},markPoint:function(a){},markPointProps:function(a,b){},beginMarkedContent:function(a){},beginMarkedContentProps:function(a,b){},endMarkedContent:function(){},beginCompat:function(){},endCompat:function(){},consumePath:function(){var a=this.ctx;this.pendingClip&&(this.pendingClip===v?void 0!==a.mozFillRule?(a.mozFillRule="evenodd",a.clip(),a.mozFillRule="nonzero"):a.clip("evenodd"):a.clip(),this.pendingClip=null),a.beginPath()},getSinglePixelWidth:function(a){if(null===this.cachedGetSinglePixelWidth){var b=this.ctx.mozCurrentTransformInverse;this.cachedGetSinglePixelWidth=Math.sqrt(Math.max(b[0]*b[0]+b[1]*b[1],b[2]*b[2]+b[3]*b[3]))}return this.cachedGetSinglePixelWidth},getCanvasPosition:function(a,b){var c=this.ctx.mozCurrentTransform;return[c[0]*a+c[2]*b+c[4],c[1]*a+c[3]*b+c[5]]}};for(var z in G)c.prototype[G[z]]=c.prototype[z];return c}(),la=function(){function a(a,b,c){var d=a.createShader(c);a.shaderSource(d,b),a.compileShader(d);var e=a.getShaderParameter(d,a.COMPILE_STATUS);if(!e){var f=a.getShaderInfoLog(d);throw new Error("Error during shader compilation: "+f)}return d}function b(b,c){return a(b,c,b.VERTEX_SHADER)}function c(b,c){return a(b,c,b.FRAGMENT_SHADER)}function d(a,b){for(var c=a.createProgram(),d=0,e=b.length;e>d;++d)a.attachShader(c,b[d]);a.linkProgram(c);var f=a.getProgramParameter(c,a.LINK_STATUS);if(!f){var g=a.getProgramInfoLog(c);throw new Error("Error during program linking: "+g)}return c}function e(a,b,c){a.activeTexture(c);var d=a.createTexture();return a.bindTexture(a.TEXTURE_2D,d),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b),d}function f(){m||(n=document.createElement("canvas"),m=n.getContext("webgl",{premultipliedalpha:!1}))}function g(){var a,e;f(),a=n,n=null,e=m,m=null;var g=b(e,o),h=c(e,p),i=d(e,[g,h]);e.useProgram(i);var j={};j.gl=e,j.canvas=a,j.resolutionLocation=e.getUniformLocation(i,"u_resolution"),j.positionLocation=e.getAttribLocation(i,"a_position"),j.backdropLocation=e.getUniformLocation(i,"u_backdrop"),j.subtypeLocation=e.getUniformLocation(i,"u_subtype");var k=e.getAttribLocation(i,"a_texCoord"),l=e.getUniformLocation(i,"u_image"),r=e.getUniformLocation(i,"u_mask"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),e.STATIC_DRAW),e.enableVertexAttribArray(k),e.vertexAttribPointer(k,2,e.FLOAT,!1,0,0),e.uniform1i(l,0),e.uniform1i(r,1),q=j}function h(a,b,c){var d=a.width,f=a.height;q||g();var h=q,i=h.canvas,j=h.gl;i.width=d,i.height=f,j.viewport(0,0,j.drawingBufferWidth,j.drawingBufferHeight),j.uniform2f(h.resolutionLocation,d,f),c.backdrop?j.uniform4f(h.resolutionLocation,c.backdrop[0],c.backdrop[1],c.backdrop[2],1):j.uniform4f(h.resolutionLocation,0,0,0,0),j.uniform1i(h.subtypeLocation,"Luminosity"===c.subtype?1:0);var k=e(j,a,j.TEXTURE0),l=e(j,b,j.TEXTURE1),m=j.createBuffer();return j.bindBuffer(j.ARRAY_BUFFER,m),j.bufferData(j.ARRAY_BUFFER,new Float32Array([0,0,d,0,0,f,0,f,d,0,d,f]),j.STATIC_DRAW),j.enableVertexAttribArray(h.positionLocation),j.vertexAttribPointer(h.positionLocation,2,j.FLOAT,!1,0,0),j.clearColor(0,0,0,0),j.enable(j.BLEND),j.blendFunc(j.ONE,j.ONE_MINUS_SRC_ALPHA),j.clear(j.COLOR_BUFFER_BIT),j.drawArrays(j.TRIANGLES,0,6),j.flush(),j.deleteTexture(k),j.deleteTexture(l),j.deleteBuffer(m),i}function j(){var a,e;f(),a=n,n=null,e=m,m=null;var g=b(e,r),h=c(e,s),i=d(e,[g,h]);e.useProgram(i);var j={};j.gl=e,j.canvas=a,j.resolutionLocation=e.getUniformLocation(i,"u_resolution"),j.scaleLocation=e.getUniformLocation(i,"u_scale"),j.offsetLocation=e.getUniformLocation(i,"u_offset"),j.positionLocation=e.getAttribLocation(i,"a_position"),j.colorLocation=e.getAttribLocation(i,"a_color"),t=j}function k(a,b,c,d,e){t||j();var f=t,g=f.canvas,h=f.gl;g.width=a,g.height=b,h.viewport(0,0,h.drawingBufferWidth,h.drawingBufferHeight),h.uniform2f(f.resolutionLocation,a,b);var i,k,l,m=0;for(i=0,k=d.length;k>i;i++)switch(d[i].type){case"lattice":l=d[i].coords.length/d[i].verticesPerRow|0,m+=(l-1)*(d[i].verticesPerRow-1)*6;break;case"triangles":m+=d[i].coords.length}var n=new Float32Array(2*m),o=new Uint8Array(3*m),p=e.coords,q=e.colors,r=0,s=0;for(i=0,k=d.length;k>i;i++){var u=d[i],v=u.coords,w=u.colors;switch(u.type){case"lattice":var x=u.verticesPerRow;l=v.length/x|0;for(var y=1;l>y;y++)for(var z=y*x+1,A=1;x>A;A++,z++)n[r]=p[v[z-x-1]],n[r+1]=p[v[z-x-1]+1],n[r+2]=p[v[z-x]],n[r+3]=p[v[z-x]+1],n[r+4]=p[v[z-1]],n[r+5]=p[v[z-1]+1],o[s]=q[w[z-x-1]],o[s+1]=q[w[z-x-1]+1],o[s+2]=q[w[z-x-1]+2],o[s+3]=q[w[z-x]],o[s+4]=q[w[z-x]+1],o[s+5]=q[w[z-x]+2],o[s+6]=q[w[z-1]],o[s+7]=q[w[z-1]+1],o[s+8]=q[w[z-1]+2],n[r+6]=n[r+2],n[r+7]=n[r+3],n[r+8]=n[r+4],n[r+9]=n[r+5],n[r+10]=p[v[z]],n[r+11]=p[v[z]+1],o[s+9]=o[s+3],o[s+10]=o[s+4],o[s+11]=o[s+5],o[s+12]=o[s+6],o[s+13]=o[s+7],o[s+14]=o[s+8],o[s+15]=q[w[z]],o[s+16]=q[w[z]+1],o[s+17]=q[w[z]+2],r+=12,s+=18;break;case"triangles":for(var B=0,C=v.length;C>B;B++)n[r]=p[v[B]],n[r+1]=p[v[B]+1],o[s]=q[w[B]],o[s+1]=q[w[B]+1],o[s+2]=q[w[B]+2],r+=2,s+=3}}c?h.clearColor(c[0]/255,c[1]/255,c[2]/255,1):h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT);var D=h.createBuffer();h.bindBuffer(h.ARRAY_BUFFER,D),h.bufferData(h.ARRAY_BUFFER,n,h.STATIC_DRAW),h.enableVertexAttribArray(f.positionLocation),h.vertexAttribPointer(f.positionLocation,2,h.FLOAT,!1,0,0);var E=h.createBuffer();return h.bindBuffer(h.ARRAY_BUFFER,E),h.bufferData(h.ARRAY_BUFFER,o,h.STATIC_DRAW),h.enableVertexAttribArray(f.colorLocation),h.vertexAttribPointer(f.colorLocation,3,h.UNSIGNED_BYTE,!1,0,0),h.uniform2f(f.scaleLocation,e.scaleX,e.scaleY),h.uniform2f(f.offsetLocation,e.offsetX,e.offsetY),h.drawArrays(h.TRIANGLES,0,m),h.flush(),h.deleteBuffer(D),h.deleteBuffer(E),g}function l(){q&&q.canvas&&(q.canvas.width=0,q.canvas.height=0),t&&t.canvas&&(t.canvas.width=0,t.canvas.height=0),q=null,t=null}var m,n,o=" attribute vec2 a_position; attribute vec2 a_texCoord; uniform vec2 u_resolution; varying vec2 v_texCoord; void main() { vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_texCoord = a_texCoord; } ",p=" precision mediump float; uniform vec4 u_backdrop; uniform int u_subtype; uniform sampler2D u_image; uniform sampler2D u_mask; varying vec2 v_texCoord; void main() { vec4 imageColor = texture2D(u_image, v_texCoord); vec4 maskColor = texture2D(u_mask, v_texCoord); if (u_backdrop.a > 0.0) { maskColor.rgb = maskColor.rgb * maskColor.a + u_backdrop.rgb * (1.0 - maskColor.a); } float lum; if (u_subtype == 0) { lum = maskColor.a; } else { lum = maskColor.r * 0.3 + maskColor.g * 0.59 + maskColor.b * 0.11; } imageColor.a *= lum; imageColor.rgb *= imageColor.a; gl_FragColor = imageColor; } ",q=null,r=" attribute vec2 a_position; attribute vec3 a_color; uniform vec2 u_resolution; uniform vec2 u_scale; uniform vec2 u_offset; varying vec4 v_color; void main() { vec2 position = (a_position + u_offset) * u_scale; vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_color = vec4(a_color / 255.0, 1.0); } ",s=" precision mediump float; varying vec4 v_color; void main() { gl_FragColor = v_color; } ",t=null;return{get isEnabled(){if(PDFJS.disableWebGL)return!1;var a=!1;try{f(),a=!!m}catch(b){}return i(this,"isEnabled",a)},composeSMask:h,drawFigures:k,clear:l}}(),ma={};ma.RadialAxial={fromIR:function(a){var b=a[1],c=a[2],d=a[3],e=a[4],f=a[5],g=a[6];return{type:"Pattern",getPattern:function(a){var h;"axial"===b?h=a.createLinearGradient(d[0],d[1],e[0],e[1]):"radial"===b&&(h=a.createRadialGradient(d[0],d[1],f,e[0],e[1],g));for(var i=0,j=c.length;j>i;++i){var k=c[i];h.addColorStop(k[0],k[1])}return h}}}};var na=function(){function a(a,b,c,d,e,f,g,h){var i,j=b.coords,k=b.colors,l=a.data,m=4*a.width;j[c+1]>j[d+1]&&(i=c,c=d,d=i,i=f,f=g,g=i),j[d+1]>j[e+1]&&(i=d,d=e,e=i,i=g,g=h,h=i),j[c+1]>j[d+1]&&(i=c,c=d,d=i,i=f,f=g,g=i);var n=(j[c]+b.offsetX)*b.scaleX,o=(j[c+1]+b.offsetY)*b.scaleY,p=(j[d]+b.offsetX)*b.scaleX,q=(j[d+1]+b.offsetY)*b.scaleY,r=(j[e]+b.offsetX)*b.scaleX,s=(j[e+1]+b.offsetY)*b.scaleY;if(!(o>=s))for(var t,u,v,w,x,y,z,A,B,C=k[f],D=k[f+1],E=k[f+2],F=k[g],G=k[g+1],H=k[g+2],I=k[h],J=k[h+1],K=k[h+2],L=Math.round(o),M=Math.round(s),N=L;M>=N;N++){q>N?(B=o>N?0:o===q?1:(o-N)/(o-q),t=n-(n-p)*B,u=C-(C-F)*B,v=D-(D-G)*B,w=E-(E-H)*B):(B=N>s?1:q===s?0:(q-N)/(q-s),t=p-(p-r)*B,u=F-(F-I)*B,v=G-(G-J)*B,w=H-(H-K)*B),B=o>N?0:N>s?1:(o-N)/(o-s),x=n-(n-r)*B,y=C-(C-I)*B,z=D-(D-J)*B,A=E-(E-K)*B;for(var O=Math.round(Math.min(t,x)),P=Math.round(Math.max(t,x)),Q=m*N+4*O,R=O;P>=R;R++)B=(t-R)/(t-x),B=0>B?0:B>1?1:B,l[Q++]=u-(u-y)*B|0,l[Q++]=v-(v-z)*B|0,l[Q++]=w-(w-A)*B|0,l[Q++]=255}}function b(b,c,e){var f,g,h=c.coords,i=c.colors;switch(c.type){case"lattice":var j=c.verticesPerRow,k=Math.floor(h.length/j)-1,l=j-1;for(f=0;k>f;f++)for(var m=f*j,n=0;l>n;n++,m++)a(b,e,h[m],h[m+1],h[m+j],i[m],i[m+1],i[m+j]),a(b,e,h[m+j+1],h[m+1],h[m+j],i[m+j+1],i[m+1],i[m+j]);break;case"triangles":for(f=0,g=h.length;g>f;f+=3)a(b,e,h[f],h[f+1],h[f+2],i[f],i[f+1],i[f+2]);break;default:d("illigal figure")}}function c(a,c,d,e,f,g){var h,i,j,k,l=1.1,m=3e3,n=Math.floor(a[0]),o=Math.floor(a[1]),p=Math.ceil(a[2])-n,q=Math.ceil(a[3])-o,r=Math.min(Math.ceil(Math.abs(p*c[0]*l)),m),s=Math.min(Math.ceil(Math.abs(q*c[1]*l)),m),t=p/r,u=q/s,v={coords:d,colors:e,offsetX:-n,offsetY:-o,scaleX:1/t,scaleY:1/u};if(la.isEnabled)h=la.drawFigures(r,s,g,f,v),i=ia.getCanvas("mesh",r,s,!1),i.context.drawImage(h,0,0),h=i.canvas;else{i=ia.getCanvas("mesh",r,s,!1);var w=i.context,x=w.createImageData(r,s);if(g){var y=x.data;for(j=0,k=y.length;k>j;j+=4)y[j]=g[0],y[j+1]=g[1],y[j+2]=g[2],y[j+3]=255}for(j=0;j=14?!0:"node"===a?!0:!1}(),nativeFontFaces:[],isFontLoadingAPISupported:!A&&"undefined"!=typeof document&&!!document.fonts,addNativeFontFace:function(a){this.nativeFontFaces.push(a),document.fonts.add(a)},bind:function(a,c){f(!A,"bind() shall be called from main thread");for(var d=[],e=[],g=[],h=function(a){return a.loaded["catch"](function(c){b('Failed to load font "'+a.family+'": '+c)})},i=0,j=a.length;j>i;i++){var k=a[i];if(!k.attached&&k.loading!==!1)if(k.attached=!0,this.isFontLoadingAPISupported){var l=k.createNativeFontFace();l&&g.push(h(l))}else{var m=k.bindDOM();m&&(d.push(m),e.push(k))}}var n=pa.queueLoadingCallback(c);this.isFontLoadingAPISupported?Promise.all(g).then(function(){n.complete()}):d.length>0&&!this.isSyncFontLoadingSupported?pa.prepareFontLoadEvent(d,e,n):n.complete()},queueLoadingCallback:function(a){function b(){for(f(!e.end,"completeRequest() cannot be called twice"),e.end=Date.now();c.requests.length>0&&c.requests[0].end;){var a=c.requests.shift();setTimeout(a.callback,0)}}var c=pa.loadingContext,d="pdfjs-font-loading-"+c.nextRequestId++,e={id:d,complete:b,callback:a,started:Date.now()};return c.requests.push(e),e},prepareFontLoadEvent:function(a,c,d){function e(a,b){return a.charCodeAt(b)<<24|a.charCodeAt(b+1)<<16|a.charCodeAt(b+2)<<8|255&a.charCodeAt(b+3)}function f(a,b,c,d){var e=a.substr(0,b),f=a.substr(b+c);return e+d+f}function g(a,c){if(l++,l>30)return b("Load test font never loaded."),void c();k.font="30px "+a,k.fillText(".",0,20);var d=k.getImageData(0,0,1,1);return d.data[3]>0?void c():void setTimeout(g.bind(null,a,c))}var h,i,j=document.createElement("canvas");j.width=1,j.height=1;var k=j.getContext("2d"),l=0,n="lt"+Date.now()+this.loadTestFontId++,o=this.loadTestFont,p=976;o=f(o,p,n.length,n);var q=16,r=1482184792,s=e(o,q);for(h=0,i=n.length-3;i>h;h+=4)s=s-r+e(n,h)|0;hh;h++)v.push(c[h].loadedName);v.push(n);var w=document.createElement("div");for(w.setAttribute("style","visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;"),h=0,i=v.length;i>h;++h){var x=document.createElement("span");x.textContent="Hi",x.style.fontFamily=v[h],w.appendChild(x)}document.body.appendChild(w),g(n,function(){document.body.removeChild(w),d.complete()})}},qa=function(){function a(a,b,c){if(this.compiledGlyphs={},1!==arguments.length);else{var d=arguments[0];for(var e in d)this[e]=d[e]}}return a.prototype={createNativeFontFace:function(){if(!this.data)return null;if(PDFJS.disableFontFace)return this.disableFontFace=!0,null;var a=new FontFace(this.loadedName,this.data,{});return pa.addNativeFontFace(a),PDFJS.pdfBug&&"FontInspector"in z&&z.FontInspector.enabled&&z.FontInspector.fontAdded(this),a},bindDOM:function(){if(!this.data)return null;if(PDFJS.disableFontFace)return this.disableFontFace=!0,null;var a=k(new Uint8Array(this.data)),b=this.loadedName,c="url(data:"+this.mimetype+";base64,"+window.btoa(a)+");",d='@font-face { font-family:"'+b+'";src:'+c+"}";return pa.insertRule(d),PDFJS.pdfBug&&"FontInspector"in z&&z.FontInspector.enabled&&z.FontInspector.fontAdded(this,c),d},getPathGenerator:function(a,b){if(!(b in this.compiledGlyphs)){var c,d,e,f=a.get(this.loadedName+"_path_"+b);if(pa.isEvalSupported){var g,h="";for(d=0,e=f.length;e>d;d++)c=f[d],g=void 0!==c.args?c.args.join(","):"",h+="c."+c.cmd+"("+g+");\n";this.compiledGlyphs[b]=new Function("c","size",h)}else this.compiledGlyphs[b]=function(a,b){for(d=0,e=f.length;e>d;d++)c=f[d],"scale"===c.cmd&&(c.args=[b,-b]),a[c.cmd].apply(a,c.args)}}return this.compiledGlyphs[b]}},a}(),ra=10,sa=function(){function a(a,b,c){var d=a.style;if(d.fontSize=b.fontSize+"px",d.direction=b.fontDirection<0?"rtl":"ltr",c){d.fontWeight=c.black?c.bold?"bolder":"bold":c.bold?"bold":"normal",d.fontStyle=c.italic?"italic":"normal";var e=c.loadedName,f=e?'"'+e+'", ':"",g=c.fallbackName||"Helvetica, sans-serif";d.fontFamily=f+g}}function c(a){var c=document.createElement("section"),d=c.style,e=a.rect[2]-a.rect[0],f=a.rect[3]-a.rect[1];if(a.borderStyle.width>0){c.style.borderWidth=a.borderStyle.width+"px",a.borderStyle.style!==F.UNDERLINE&&(e-=2*a.borderStyle.width,f-=2*a.borderStyle.width);var g=a.borderStyle.horizontalCornerRadius,h=a.borderStyle.verticalCornerRadius;if(g>0||h>0){var i=g+"px / "+h+"px";CustomStyle.setProp("borderRadius",c,i)}switch(a.borderStyle.style){case F.SOLID:c.style.borderStyle="solid";break;case F.DASHED:c.style.borderStyle="dashed";break;case F.BEVELED:b("Unimplemented border style: beveled");break;case F.INSET:b("Unimplemented border style: inset");break;case F.UNDERLINE:c.style.borderBottomStyle="solid"}a.color?c.style.borderColor=T.makeCssRgb(0|a.color[0],0|a.color[1],0|a.color[2]):c.style.borderWidth=0; -}return d.width=e+"px",d.height=f+"px",c}function d(b,c){var d=document.createElement("div"),e=b.rect[2]-b.rect[0],f=b.rect[3]-b.rect[1];d.style.width=e+"px",d.style.height=f+"px",d.style.display="table";var g=document.createElement("div");g.textContent=b.fieldValue;var h=b.textAlignment;g.style.textAlign=["left","center","right"][h],g.style.verticalAlign="middle",g.style.display="table-cell";var i=b.fontRefName?c.getData(b.fontRefName):null;return a(g,b,i),d.appendChild(g),d}function e(a){var b=a.rect;b[3]-b[1]i;++i){var t=s[i];r.appendChild(document.createTextNode(t)),j-1>i&&r.appendChild(document.createElement("br"))}q.appendChild(r);var u=!1,v=function(a){a&&(u=!0),h.hasAttribute("hidden")&&(d.style.zIndex+=1,h.removeAttribute("hidden"))},w=function(a){a&&(u=!1),h.hasAttribute("hidden")||u||(d.style.zIndex-=1,h.setAttribute("hidden",!0))},x=function(){u?w(!0):v(!0)};e.addEventListener("click",function(){x()},!1),e.addEventListener("mouseover",function(){v()},!1),e.addEventListener("mouseout",function(){w()},!1),h.addEventListener("click",function(){w(!0)},!1)}else h.setAttribute("hidden",!0);return h.appendChild(p),h.appendChild(q),g.appendChild(h),d.appendChild(e),d.appendChild(g),d}function f(a){var b=c(a);b.className="annotLink";var d=document.createElement("a");return d.href=d.title=a.url||"",a.url&&j()&&(d.target=K[PDFJS.externalLinkTarget]),b.appendChild(d),b}function g(a,b){switch(a.annotationType){case E.WIDGET:return d(a,b);case E.TEXT:return e(a);case E.LINK:return f(a);default:throw new Error("Unsupported annotationType: "+a.annotationType)}}return{getHtmlElement:g}}();PDFJS.AnnotationUtils=sa;var ta={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},ua=function(){function a(a,b,c){for(var d=-1,e=b;c>e;e++){var f=255&(d^a[e]),h=g[f];d=d>>>8^h}return-1^d}function b(b,c,d,e){var f=e,g=c.length;d[f]=g>>24&255,d[f+1]=g>>16&255,d[f+2]=g>>8&255,d[f+3]=255&g,f+=4,d[f]=255&b.charCodeAt(0),d[f+1]=255&b.charCodeAt(1),d[f+2]=255&b.charCodeAt(2),d[f+3]=255&b.charCodeAt(3),f+=4,d.set(c,f),f+=c.length;var h=a(d,e+4,f);d[f]=h>>24&255,d[f+1]=h>>16&255,d[f+2]=h>>8&255,d[f+3]=255&h}function c(a,b,c){for(var d=1,e=0,f=b;c>f;++f)d=(d+(255&a[f]))%65521,e=(e+d)%65521;return e<<16|d}function d(a,d){var g,h,i,j=a.width,k=a.height,l=a.data;switch(d){case D.GRAYSCALE_1BPP:h=0,g=1,i=j+7>>3;break;case D.RGB_24BPP:h=2,g=8,i=3*j;break;case D.RGBA_32BPP:h=6,g=8,i=4*j;break;default:throw new Error("invalid format")}var m,n,o=new Uint8Array((1+i)*k),p=0,q=0;for(m=0;k>m;++m)o[p++]=0,o.set(l.subarray(q,q+i),p),q+=i,p+=i;if(d===D.GRAYSCALE_1BPP)for(p=0,m=0;k>m;m++)for(p++,n=0;i>n;n++)o[p++]^=255;var r=new Uint8Array([j>>24&255,j>>16&255,j>>8&255,255&j,k>>24&255,k>>16&255,k>>8&255,255&k,g,h,0,0,0]),s=o.length,t=65535,u=Math.ceil(s/t),v=new Uint8Array(2+s+5*u+4),w=0;v[w++]=120,v[w++]=156;for(var x=0;s>t;)v[w++]=0,v[w++]=255,v[w++]=255,v[w++]=0,v[w++]=0,v.set(o.subarray(x,x+t),w),w+=t,x+=t,s-=t;v[w++]=1,v[w++]=255&s,v[w++]=s>>8&255,v[w++]=65535&~s&255,v[w++]=(65535&~s)>>8&255,v.set(o.subarray(x),w),w+=o.length-x;var y=c(o,0,o.length);v[w++]=y>>24&255,v[w++]=y>>16&255,v[w++]=y>>8&255,v[w++]=255&y;var z=e.length+3*f+r.length+v.length,A=new Uint8Array(z),B=0;return A.set(e,B),B+=e.length,b("IHDR",r,A,B),B+=f+r.length,b("IDATA",v,A,B),B+=f+v.length,b("IEND",new Uint8Array(0),A,B),PDFJS.createObjectURL(A,"image/png")}for(var e=new Uint8Array([137,80,78,71,13,10,26,10]),f=12,g=new Int32Array(256),h=0;256>h;h++){for(var i=h,j=0;8>j;j++)i=1&i?3988292384^i>>1&2147483647:i>>1&2147483647;g[h]=i}return function(a){var b=void 0===a.kind?D.GRAYSCALE_1BPP:a.kind;return d(a,b)}}(),va=function(){function a(){this.fontSizeScale=1,this.fontWeight=ta.fontWeight,this.fontSize=0,this.textMatrix=S,this.fontMatrix=B,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=ta.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.clipId="",this.pendingClip=!1,this.maskId=""}return a.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(a,b){this.x=a,this.y=b}},a}(),wa=function(){function a(a,b){var c="http://www.w3.org/2000/svg",d=document.createElementNS(c,"svg:svg");return d.setAttributeNS(null,"version","1.1"),d.setAttributeNS(null,"width",a+"px"),d.setAttributeNS(null,"height",b+"px"),d.setAttributeNS(null,"viewBox","0 0 "+a+" "+b),d}function c(a){for(var b=[],c=[],d=a.length,e=0;d>e;e++)"save"!==a[e].fn?"restore"===a[e].fn?b=c.pop():b.push(a[e]):(b.push({fnId:92,fn:"group",items:[]}),c.push(b),b=b[b.length-1].items);return b}function d(a){if(a===(0|a))return a.toString();var b=a.toFixed(10),c=b.length-1;if("0"!==b[c])return b;do c--;while("0"===b[c]);return b.substr(0,"."===b[c]?c:c+1)}function e(a){if(0===a[4]&&0===a[5]){if(0===a[1]&&0===a[2])return 1===a[0]&&1===a[3]?"":"scale("+d(a[0])+" "+d(a[3])+")";if(a[0]===a[3]&&a[1]===-a[2]){var b=180*Math.acos(a[0])/Math.PI;return"rotate("+d(b)+")"}}else if(1===a[0]&&0===a[1]&&0===a[2]&&1===a[3])return"translate("+d(a[4])+" "+d(a[5])+")";return"matrix("+d(a[0])+" "+d(a[1])+" "+d(a[2])+" "+d(a[3])+" "+d(a[4])+" "+d(a[5])+")"}function f(a,b){this.current=new va,this.transformMatrix=S,this.transformStack=[],this.extraStack=[],this.commonObjs=a,this.objs=b,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts={},this.cssStyle=null}var g="http://www.w3.org/2000/svg",h="http://www.w3.org/XML/1998/namespace",i="http://www.w3.org/1999/xlink",j=["butt","round","square"],k=["miter","round","bevel"],l=0,m=0;return f.prototype={save:function(){this.transformStack.push(this.transformMatrix);var a=this.current;this.extraStack.push(a),this.current=a.clone()},restore:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix)),this.pgrp.appendChild(this.tgrp)},group:function(a){this.save(),this.executeOpTree(a),this.restore()},loadDependencies:function(a){for(var b=a.fnArray,c=b.length,d=a.argsArray,e=this,f=0;c>f;f++)if(G.dependency===b[f])for(var g=d[f],h=0,i=g.length;i>h;h++){var j,k=g[h],l="g_"===k.substring(0,2);j=l?new Promise(function(a){e.commonObjs.get(k,a)}):new Promise(function(a){e.objs.get(k,a)}),this.current.dependencies.push(j)}return Promise.all(this.current.dependencies)},transform:function(a,b,c,d,f,h){var i=[a,b,c,d,f,h];this.transformMatrix=PDFJS.Util.transform(this.transformMatrix,i),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix))},getSVG:function(b,c){return this.svg=a(c.width,c.height),this.viewport=c,this.loadDependencies(b).then(function(){this.transformMatrix=S,this.pgrp=document.createElementNS(g,"svg:g"),this.pgrp.setAttributeNS(null,"transform",e(c.transform)),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix)),this.defs=document.createElementNS(g,"svg:defs"),this.pgrp.appendChild(this.defs),this.pgrp.appendChild(this.tgrp),this.svg.appendChild(this.pgrp);var a=this.convertOpList(b);return this.executeOpTree(a),this.svg}.bind(this))},convertOpList:function(a){var b=a.argsArray,d=a.fnArray,e=d.length,f=[],g=[];for(var h in G)f[G[h]]=h;for(var i=0;e>i;i++){var j=d[i];g.push({fnId:j,fn:f[j],args:b[i]})}return c(g)},executeOpTree:function(a){for(var c=a.length,d=0;c>d;d++){var e=a[d].fn,f=a[d].fnId,g=a[d].args;switch(0|f){case G.beginText:this.beginText();break;case G.setLeading:this.setLeading(g);break;case G.setLeadingMoveText:this.setLeadingMoveText(g[0],g[1]);break;case G.setFont:this.setFont(g);break;case G.showText:this.showText(g[0]);break;case G.showSpacedText:this.showText(g[0]);break;case G.endText:this.endText();break;case G.moveText:this.moveText(g[0],g[1]);break;case G.setCharSpacing:this.setCharSpacing(g[0]);break;case G.setWordSpacing:this.setWordSpacing(g[0]);break;case G.setHScale:this.setHScale(g[0]);break;case G.setTextMatrix:this.setTextMatrix(g[0],g[1],g[2],g[3],g[4],g[5]);break;case G.setLineWidth:this.setLineWidth(g[0]);break;case G.setLineJoin:this.setLineJoin(g[0]);break;case G.setLineCap:this.setLineCap(g[0]);break;case G.setMiterLimit:this.setMiterLimit(g[0]);break;case G.setFillRGBColor:this.setFillRGBColor(g[0],g[1],g[2]);break;case G.setStrokeRGBColor:this.setStrokeRGBColor(g[0],g[1],g[2]);break;case G.setDash:this.setDash(g[0],g[1]);break;case G.setGState:this.setGState(g[0]);break;case G.fill:this.fill();break;case G.eoFill:this.eoFill();break;case G.stroke:this.stroke();break;case G.fillStroke:this.fillStroke();break;case G.eoFillStroke:this.eoFillStroke();break;case G.clip:this.clip("nonzero");break;case G.eoClip:this.clip("evenodd");break;case G.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case G.paintJpegXObject:this.paintJpegXObject(g[0],g[1],g[2]);break;case G.paintImageXObject:this.paintImageXObject(g[0]);break;case G.paintInlineImageXObject:this.paintInlineImageXObject(g[0]);break;case G.paintImageMaskXObject:this.paintImageMaskXObject(g[0]);break;case G.paintFormXObjectBegin:this.paintFormXObjectBegin(g[0],g[1]);break;case G.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case G.closePath:this.closePath();break;case G.closeStroke:this.closeStroke();break;case G.closeFillStroke:this.closeFillStroke();break;case G.nextLine:this.nextLine();break;case G.transform:this.transform(g[0],g[1],g[2],g[3],g[4],g[5]);break;case G.constructPath:this.constructPath(g[0],g[1]);break;case G.endPath:this.endPath();break;case 92:this.group(a[d].items);break;default:b("Unimplemented method "+e)}}},setWordSpacing:function(a){this.current.wordSpacing=a},setCharSpacing:function(a){this.current.charSpacing=a},nextLine:function(){this.moveText(0,this.current.leading)},setTextMatrix:function(a,b,c,e,f,h){var i=this.current;this.current.textMatrix=this.current.lineMatrix=[a,b,c,e,f,h],this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,i.xcoords=[],i.tspan=document.createElementNS(g,"svg:tspan"),i.tspan.setAttributeNS(null,"font-family",i.fontFamily),i.tspan.setAttributeNS(null,"font-size",d(i.fontSize)+"px"),i.tspan.setAttributeNS(null,"y",d(-i.y)),i.txtElement=document.createElementNS(g,"svg:text"),i.txtElement.appendChild(i.tspan)},beginText:function(){this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,this.current.textMatrix=S,this.current.lineMatrix=S,this.current.tspan=document.createElementNS(g,"svg:tspan"),this.current.txtElement=document.createElementNS(g,"svg:text"),this.current.txtgrp=document.createElementNS(g,"svg:g"),this.current.xcoords=[]},moveText:function(a,b){var c=this.current;this.current.x=this.current.lineX+=a,this.current.y=this.current.lineY+=b,c.xcoords=[],c.tspan=document.createElementNS(g,"svg:tspan"),c.tspan.setAttributeNS(null,"font-family",c.fontFamily),c.tspan.setAttributeNS(null,"font-size",d(c.fontSize)+"px"),c.tspan.setAttributeNS(null,"y",d(-c.y))},showText:function(a){var b=this.current,c=b.font,f=b.fontSize;if(0!==f){var g,i=b.charSpacing,j=b.wordSpacing,k=b.fontDirection,l=b.textHScale*k,m=a.length,n=c.vertical,o=f*b.fontMatrix[0],q=0;for(g=0;m>g;++g){var r=a[g];if(null!==r)if(p(r))q+=-r*f*.001;else{b.xcoords.push(b.x+q*l);var s=r.width,t=r.fontChar,u=s*o+i*k;q+=u,b.tspan.textContent+=t}else q+=k*j}n?b.y-=q*l:b.x+=q*l,b.tspan.setAttributeNS(null,"x",b.xcoords.map(d).join(" ")),b.tspan.setAttributeNS(null,"y",d(-b.y)),b.tspan.setAttributeNS(null,"font-family",b.fontFamily),b.tspan.setAttributeNS(null,"font-size",d(b.fontSize)+"px"),b.fontStyle!==ta.fontStyle&&b.tspan.setAttributeNS(null,"font-style",b.fontStyle),b.fontWeight!==ta.fontWeight&&b.tspan.setAttributeNS(null,"font-weight",b.fontWeight),b.fillColor!==ta.fillColor&&b.tspan.setAttributeNS(null,"fill",b.fillColor),b.txtElement.setAttributeNS(null,"transform",e(b.textMatrix)+" scale(1, -1)"),b.txtElement.setAttributeNS(h,"xml:space","preserve"),b.txtElement.appendChild(b.tspan),b.txtgrp.appendChild(b.txtElement),this.tgrp.appendChild(b.txtElement)}},setLeadingMoveText:function(a,b){this.setLeading(-b),this.moveText(a,b)},addFontStyle:function(a){this.cssStyle||(this.cssStyle=document.createElementNS(g,"svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));var b=PDFJS.createObjectURL(a.data,a.mimetype);this.cssStyle.textContent+='@font-face { font-family: "'+a.loadedName+'"; src: url('+b+"); }\n"},setFont:function(a){var b=this.current,c=this.commonObjs.get(a[0]),e=a[1];this.current.font=c,this.embedFonts&&c.data&&!this.embeddedFonts[c.loadedName]&&(this.addFontStyle(c),this.embeddedFonts[c.loadedName]=c),b.fontMatrix=c.fontMatrix?c.fontMatrix:B;var f=c.black?c.bold?"bolder":"bold":c.bold?"bold":"normal",h=c.italic?"italic":"normal";0>e?(e=-e,b.fontDirection=-1):b.fontDirection=1,b.fontSize=e,b.fontFamily=c.loadedName,b.fontWeight=f,b.fontStyle=h,b.tspan=document.createElementNS(g,"svg:tspan"),b.tspan.setAttributeNS(null,"y",d(-b.y)),b.xcoords=[]},endText:function(){this.current.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix))},setLineWidth:function(a){this.current.lineWidth=a},setLineCap:function(a){this.current.lineCap=j[a]},setLineJoin:function(a){this.current.lineJoin=k[a]},setMiterLimit:function(a){this.current.miterLimit=a},setStrokeRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.current.strokeColor=d},setFillRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.current.fillColor=d,this.current.tspan=document.createElementNS(g,"svg:tspan"),this.current.xcoords=[]},setDash:function(a,b){this.current.dashArray=a,this.current.dashPhase=b},constructPath:function(a,b){var c=this.current,e=c.x,f=c.y;c.path=document.createElementNS(g,"svg:path");for(var h=[],i=a.length,j=0,k=0;i>j;j++)switch(0|a[j]){case G.rectangle:e=b[k++],f=b[k++];var l=b[k++],m=b[k++],n=e+l,o=f+m;h.push("M",d(e),d(f),"L",d(n),d(f),"L",d(n),d(o),"L",d(e),d(o),"Z");break;case G.moveTo:e=b[k++],f=b[k++],h.push("M",d(e),d(f));break;case G.lineTo:e=b[k++],f=b[k++],h.push("L",d(e),d(f));break;case G.curveTo:e=b[k+4],f=b[k+5],h.push("C",d(b[k]),d(b[k+1]),d(b[k+2]),d(b[k+3]),d(e),d(f)),k+=6;break;case G.curveTo2:e=b[k+2],f=b[k+3],h.push("C",d(e),d(f),d(b[k]),d(b[k+1]),d(b[k+2]),d(b[k+3])),k+=4;break;case G.curveTo3:e=b[k+2],f=b[k+3],h.push("C",d(b[k]),d(b[k+1]),d(e),d(f),d(e),d(f)),k+=4;break;case G.closePath:h.push("Z")}c.path.setAttributeNS(null,"d",h.join(" ")),c.path.setAttributeNS(null,"stroke-miterlimit",d(c.miterLimit)),c.path.setAttributeNS(null,"stroke-linecap",c.lineCap),c.path.setAttributeNS(null,"stroke-linejoin",c.lineJoin),c.path.setAttributeNS(null,"stroke-width",d(c.lineWidth)+"px"),c.path.setAttributeNS(null,"stroke-dasharray",c.dashArray.map(d).join(" ")),c.path.setAttributeNS(null,"stroke-dashoffset",d(c.dashPhase)+"px"),c.path.setAttributeNS(null,"fill","none"),this.tgrp.appendChild(c.path),c.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp),c.element=c.path,c.setCurrentPoint(e,f)},endPath:function(){var a=this.current;a.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix))},clip:function(a){var b=this.current;b.clipId="clippath"+l,l++,this.clippath=document.createElementNS(g,"svg:clipPath"),this.clippath.setAttributeNS(null,"id",b.clipId);var c=b.element.cloneNode();"evenodd"===a?c.setAttributeNS(null,"clip-rule","evenodd"):c.setAttributeNS(null,"clip-rule","nonzero"),this.clippath.setAttributeNS(null,"transform",e(this.transformMatrix)),this.clippath.appendChild(c),this.defs.appendChild(this.clippath),b.pendingClip=!0,this.cgrp=document.createElementNS(g,"svg:g"),this.cgrp.setAttributeNS(null,"clip-path","url(#"+b.clipId+")"),this.pgrp.appendChild(this.cgrp)},closePath:function(){var a=this.current,b=a.path.getAttributeNS(null,"d");b+="Z",a.path.setAttributeNS(null,"d",b)},setLeading:function(a){this.current.leading=-a},setTextRise:function(a){this.current.textRise=a},setHScale:function(a){this.current.textHScale=a/100},setGState:function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b],e=d[0],f=d[1];switch(e){case"LW":this.setLineWidth(f);break;case"LC":this.setLineCap(f);break;case"LJ":this.setLineJoin(f);break;case"ML":this.setMiterLimit(f);break;case"D":this.setDash(f[0],f[1]);break;case"RI":break;case"FL":break;case"Font":this.setFont(f);break;case"CA":break;case"ca":break;case"BM":break;case"SMask":}}},fill:function(){var a=this.current;a.element.setAttributeNS(null,"fill",a.fillColor)},stroke:function(){var a=this.current;a.element.setAttributeNS(null,"stroke",a.strokeColor),a.element.setAttributeNS(null,"fill","none")},eoFill:function(){var a=this.current;a.element.setAttributeNS(null,"fill",a.fillColor),a.element.setAttributeNS(null,"fill-rule","evenodd")},fillStroke:function(){this.stroke(),this.fill()},eoFillStroke:function(){this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()},closeStroke:function(){this.closePath(),this.stroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},paintSolidColorImageMask:function(){var a=this.current,b=document.createElementNS(g,"svg:rect");b.setAttributeNS(null,"x","0"),b.setAttributeNS(null,"y","0"),b.setAttributeNS(null,"width","1px"),b.setAttributeNS(null,"height","1px"),b.setAttributeNS(null,"fill",a.fillColor),this.tgrp.appendChild(b)},paintJpegXObject:function(a,b,c){var e=this.current,f=this.objs.get(a),h=document.createElementNS(g,"svg:image");h.setAttributeNS(i,"xlink:href",f.src),h.setAttributeNS(null,"width",f.width+"px"),h.setAttributeNS(null,"height",f.height+"px"),h.setAttributeNS(null,"x","0"),h.setAttributeNS(null,"y",d(-c)),h.setAttributeNS(null,"transform","scale("+d(1/b)+" "+d(-1/c)+")"),this.tgrp.appendChild(h),e.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp)},paintImageXObject:function(a){var c=this.objs.get(a);return c?void this.paintInlineImageXObject(c):void b("Dependent image isn't ready yet")},paintInlineImageXObject:function(a,b){var c=this.current,e=a.width,f=a.height,h=ua(a),j=document.createElementNS(g,"svg:rect");j.setAttributeNS(null,"x","0"),j.setAttributeNS(null,"y","0"),j.setAttributeNS(null,"width",d(e)),j.setAttributeNS(null,"height",d(f)),c.element=j,this.clip("nonzero");var k=document.createElementNS(g,"svg:image");k.setAttributeNS(i,"xlink:href",h),k.setAttributeNS(null,"x","0"),k.setAttributeNS(null,"y",d(-f)),k.setAttributeNS(null,"width",d(e)+"px"),k.setAttributeNS(null,"height",d(f)+"px"),k.setAttributeNS(null,"transform","scale("+d(1/e)+" "+d(-1/f)+")"),b?b.appendChild(k):this.tgrp.appendChild(k),c.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp)},paintImageMaskXObject:function(a){var b=this.current,c=a.width,e=a.height,f=b.fillColor;b.maskId="mask"+m++;var h=document.createElementNS(g,"svg:mask");h.setAttributeNS(null,"id",b.maskId);var i=document.createElementNS(g,"svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",d(c)),i.setAttributeNS(null,"height",d(e)),i.setAttributeNS(null,"fill",f),i.setAttributeNS(null,"mask","url(#"+b.maskId+")"),this.defs.appendChild(h),this.tgrp.appendChild(i),this.paintInlineImageXObject(a,h)},paintFormXObjectBegin:function(a,b){if(this.save(),q(a)&&6===a.length&&this.transform(a[0],a[1],a[2],a[3],a[4],a[5]),q(b)&&4===b.length){var c=b[2]-b[0],e=b[3]-b[1],f=document.createElementNS(g,"svg:rect");f.setAttributeNS(null,"x",b[0]),f.setAttributeNS(null,"y",b[1]),f.setAttributeNS(null,"width",d(c)),f.setAttributeNS(null,"height",d(e)),this.current.element=f,this.clip("nonzero"),this.endPath()}},paintFormXObjectEnd:function(){this.restore()}},f}();PDFJS.SVGGraphics=wa}.call("undefined"==typeof window?this:window),PDFJS.workerSrc||"undefined"==typeof document||(PDFJS.workerSrc=function(){"use strict";var a=document.body||document.getElementsByTagName("head")[0],b=a.lastChild.src;return b&&b.replace(/\.js$/i,".worker.js")}()),"undefined"==typeof PDFJS&&(("undefined"!=typeof window?window:this).PDFJS={}),PDFJS.version="1.1.551",PDFJS.build="2a5616c",function(){"use strict";function a(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.infos&&console.log("Info: "+a)}function b(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.warnings&&console.log("Warning: "+a)}function c(a){throw PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.errors&&(console.log("Error: "+a),console.log(d())),aa.notify(_.unknown),new Error(a)}function d(){try{throw new Error}catch(a){return a.stack?a.stack.split("\n").slice(2).join("\n"):""}}function e(a,b){a||c(b)}function f(a,b){if(!a)return!1;var c=/^[a-z][a-z0-9+\-.]*(?=:)/i.exec(a);if(!c)return b;switch(c=c[0].toLowerCase()){case"http":case"https":case"ftp":case"mailto":case"tel":return!0;default:return!1}}function g(a,b,c){return Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!1}),c}function h(){switch(PDFJS.openExternalLinksInNewWindow&&(b("PDFJS.openExternalLinksInNewWindow is deprecated, use PDFJS.externalLinkTarget instead."),PDFJS.externalLinkTarget===ba.NONE&&(PDFJS.externalLinkTarget=ba.BLANK),PDFJS.openExternalLinksInNewWindow=!1),PDFJS.externalLinkTarget){case ba.NONE:return!1;case ba.SELF:case ba.BLANK:case ba.PARENT:case ba.TOP:return!0}return b("PDFJS.externalLinkTarget is invalid: "+PDFJS.externalLinkTarget),PDFJS.externalLinkTarget=ba.NONE,!1}function i(a){e(null!==a&&"object"==typeof a&&void 0!==a.length,"Invalid argument for bytesToString");var b=a.length,c=8192;if(c>b)return String.fromCharCode.apply(null,a);for(var d=[],f=0;b>f;f+=c){var g=Math.min(f+c,b),h=a.subarray(f,g);d.push(String.fromCharCode.apply(null,h))}return d.join("")}function j(a){e("string"==typeof a,"Invalid argument for stringToBytes");for(var b=a.length,c=new Uint8Array(b),d=0;b>d;++d)c[d]=255&a.charCodeAt(d);return c}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,255&a)}function l(a){for(var b=1,c=0;a>b;)b<<=1,c++;return c}function m(a,b){return a[b]<<24>>24}function n(a,b){return a[b]<<8|a[b+1]}function o(a,b){return(a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3])>>>0}function p(){var a=new Uint8Array(2);a[0]=1;var b=new Uint16Array(a.buffer);return 1===b[0]}function q(){var a=document.createElement("canvas");a.width=a.height=1;var b=a.getContext("2d"),c=b.createImageData(1,1);return"undefined"!=typeof c.data.buffer}function r(a){var b,c=a.length,d=[];if("þ"===a[0]&&"ÿ"===a[1])for(b=2;c>b;b+=2)d.push(String.fromCharCode(a.charCodeAt(b)<<8|a.charCodeAt(b+1)));else for(b=0;c>b;++b){var e=oa[a.charCodeAt(b)];d.push(e?String.fromCharCode(e):a.charAt(b))}return d.join("")}function s(a){return decodeURIComponent(escape(a))}function t(a){return unescape(encodeURIComponent(a))}function u(a){for(var b in a)return!1;return!0}function v(a){return"boolean"==typeof a}function w(a){return"number"==typeof a&&(0|a)===a}function x(a){return"number"==typeof a}function y(a){return"string"==typeof a}function z(a){return a instanceof ya}function A(a,b){return a instanceof za&&(void 0===b||a.cmd===b)}function B(a,b){if(!(a instanceof Aa))return!1;if(!b)return!0;var c=a.get("Type");return z(c)&&c.name===b}function C(a){return a instanceof Array}function D(a){return"object"==typeof a&&null!==a&&void 0!==a.getBytes}function E(a){return"object"==typeof a&&null!==a&&void 0!==a.byteLength}function F(a){return a instanceof Ba}function G(){var a={};return a.promise=new Promise(function(b,c){a.resolve=b,a.reject=c}),a}function H(a,b){this.name=a,this.comObj=b,this.callbackIndex=1,this.postMessageTransfers=!0;var d=this.callbacksCapabilities={},e=this.actionHandler={};e.console_log=[function(a){console.log.apply(console,a)}],e.console_error=[function(a){console.error.apply(console,a)}],e._unsupported_feature=[function(a){aa.notify(a)}],b.onmessage=function(a){var f=a.data;if(f.isReply){var g=f.callbackId;if(f.callbackId in d){var h=d[g];delete d[g],"error"in f?h.reject(f.error):h.resolve(f.data)}else c("Cannot resolve callback "+g)}else if(f.action in e){var i=e[f.action];f.callbackId?Promise.resolve().then(function(){return i[0].call(i[1],f.data)}).then(function(a){b.postMessage({isReply:!0,callbackId:f.callbackId,data:a})},function(a){a instanceof Error&&(a+=""),b.postMessage({isReply:!0,callbackId:f.callbackId,error:a})}):i[0].call(i[1],f.data)}else c("Unknown action from worker: "+f.action)}}function I(){}function J(a,b,c){var d=b.get("Matrix"),e=b.get("BBox"),f=b.get("XStep"),g=b.get("YStep"),h=b.get("PaintType"),i=b.get("TilingType");return["TilingPattern",c,a,d,e,f,g,h,i]}function K(a){return a>=65520&&65535>=a?0:a>=62976&&63743>=a?Wb[a]||a:a}function L(a){for(var b=0,c=Xb.length;c>b;b++){var d=Xb[b];if(a>=d.begin&&a=b.begin&&a=b.begin&&a=b||!M(a.charCodeAt(0)))return a;for(var c="",d=b-1;d>=0;d--)c+=a[d];return c}function O(a){if(a.fontMatrix[0]!==T[0]){var b=.001/a.fontMatrix[0],c=a.widths;for(var d in c)c[d]*=b;a.defaultWidth*=b}}function P(a,b){switch(a){case"Type1":return"Type1C"===b?Z.TYPE1C:Z.TYPE1;case"CIDFontType0":return"CIDFontType0C"===b?Z.CIDFONTTYPE0C:Z.CIDFONTTYPE0;case"OpenType":return Z.OPENTYPE;case"TrueType":return Z.TRUETYPE;case"CIDFontType2":return Z.CIDFONTTYPE2;case"MMType1":return Z.MMTYPE1;case"Type0":return Z.TYPE0;default:return Z.UNKNOWN}}function Q(a,b,c){var d,e,f,g=Object.create(null);if(a.baseEncodingName)for(f=Pb[a.baseEncodingName],e=0;e=0?g[e]=d:g[e]=0;else if(a.flags&Ob.Symbolic)for(e in b)g[e]=b[e];else for(f=Pb.StandardEncoding,e=0;e=0?g[e]=d:g[e]=0;var h=a.differences;if(h)for(e in h){var i=h[e];d=c.indexOf(i),d>=0?g[e]=d:g[e]=0}return g}function R(a){return a===Dc}var S="undefined"==typeof window?this:window,T=("undefined"==typeof window,[.001,0,0,.001,0,0]),U={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},V={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},W={WIDGET:1,TEXT:2,LINK:3},X={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},Y={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9},Z={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10};S.PDFJS||(S.PDFJS={}),S.PDFJS.pdfBug=!1,PDFJS.VERBOSITY_LEVELS={errors:0,warnings:1,infos:5};var $=PDFJS.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},_=PDFJS.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},aa=PDFJS.UnsupportedManager=function(){var a=[];return{listen:function(b){a.push(b)},notify:function(c){b('Unsupported feature "'+c+'"');for(var d=0,e=a.length;e>d;d++)a[d](c)}}}();PDFJS.isValidUrl=f,PDFJS.shadow=g;var ba=PDFJS.LinkTarget={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};PDFJS.isExternalLinkTargetSet=h;var ca=PDFJS.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},da=function(){function a(a,b){this.name="PasswordException",this.message=a,this.code=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.PasswordException=da;var ea=function(){function a(a,b){this.name="UnknownErrorException",this.message=a,this.details=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnknownErrorException=ea;var fa=function(){function a(a){this.name="InvalidPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.InvalidPDFException=fa;var ga=function(){function a(a){this.name="MissingPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.MissingPDFException=ga;var ha=function(){function a(a,b){this.name="UnexpectedResponseException",this.message=a,this.status=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnexpectedResponseException=ha;var ia=function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="NotImplementedException",a.constructor=a,a}(),ja=function(){function a(a,b){this.begin=a,this.end=b,this.message="Missing data ["+a+", "+b+")"}return a.prototype=new Error,a.prototype.name="MissingDataException",a.constructor=a,a}(),ka=function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="XRefParseException",a.constructor=a,a}();Object.defineProperty(PDFJS,"isLittleEndian",{configurable:!0,get:function(){return g(PDFJS,"isLittleEndian",p())}}),Object.defineProperty(PDFJS,"hasCanvasTypedArrays",{configurable:!0,get:function(){return g(PDFJS,"hasCanvasTypedArrays",q())}});var la=function(){function a(a,b){this.buffer=a,this.byteLength=a.length,this.length=void 0===b?this.byteLength>>2:b,c(this.length)}function b(a){return{get:function(){var b=this.buffer,c=a<<2;return(b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24)>>>0},set:function(b){var c=this.buffer,d=a<<2;c[d]=255&b,c[d+1]=b>>8&255,c[d+2]=b>>16&255,c[d+3]=b>>>24&255}}}function c(c){for(;c>d;)Object.defineProperty(a.prototype,d,b(d)), -d++}a.prototype=Object.create(null);var d=0;return a}(),ma=[1,0,0,1,0,0],na=PDFJS.Util=function(){function a(){}var b=["rgb(",0,",",0,",",0,")"];return a.makeCssRgb=function(a,c,d){return b[1]=a,b[3]=c,b[5]=d,b.join("")},a.transform=function(a,b){return[a[0]*b[0]+a[2]*b[1],a[1]*b[0]+a[3]*b[1],a[0]*b[2]+a[2]*b[3],a[1]*b[2]+a[3]*b[3],a[0]*b[4]+a[2]*b[5]+a[4],a[1]*b[4]+a[3]*b[5]+a[5]]},a.applyTransform=function(a,b){var c=a[0]*b[0]+a[1]*b[2]+b[4],d=a[0]*b[1]+a[1]*b[3]+b[5];return[c,d]},a.applyInverseTransform=function(a,b){var c=b[0]*b[3]-b[1]*b[2],d=(a[0]*b[3]-a[1]*b[2]+b[2]*b[5]-b[4]*b[3])/c,e=(-a[0]*b[1]+a[1]*b[0]+b[4]*b[1]-b[5]*b[0])/c;return[d,e]},a.getAxialAlignedBoundingBox=function(b,c){var d=a.applyTransform(b,c),e=a.applyTransform(b.slice(2,4),c),f=a.applyTransform([b[0],b[3]],c),g=a.applyTransform([b[2],b[1]],c);return[Math.min(d[0],e[0],f[0],g[0]),Math.min(d[1],e[1],f[1],g[1]),Math.max(d[0],e[0],f[0],g[0]),Math.max(d[1],e[1],f[1],g[1])]},a.inverseTransform=function(a){var b=a[0]*a[3]-a[1]*a[2];return[a[3]/b,-a[1]/b,-a[2]/b,a[0]/b,(a[2]*a[5]-a[4]*a[3])/b,(a[4]*a[1]-a[5]*a[0])/b]},a.apply3dTransform=function(a,b){return[a[0]*b[0]+a[1]*b[1]+a[2]*b[2],a[3]*b[0]+a[4]*b[1]+a[5]*b[2],a[6]*b[0]+a[7]*b[1]+a[8]*b[2]]},a.singularValueDecompose2dScale=function(a){var b=[a[0],a[2],a[1],a[3]],c=a[0]*b[0]+a[1]*b[2],d=a[0]*b[1]+a[1]*b[3],e=a[2]*b[0]+a[3]*b[2],f=a[2]*b[1]+a[3]*b[3],g=(c+f)/2,h=Math.sqrt((c+f)*(c+f)-4*(c*f-e*d))/2,i=g+h||1,j=g-h||1;return[Math.sqrt(i),Math.sqrt(j)]},a.normalizeRect=function(a){var b=a.slice(0);return a[0]>a[2]&&(b[0]=a[2],b[2]=a[0]),a[1]>a[3]&&(b[1]=a[3],b[3]=a[1]),b},a.intersect=function(b,c){function d(a,b){return a-b}var e=[b[0],b[2],c[0],c[2]].sort(d),f=[b[1],b[3],c[1],c[3]].sort(d),g=[];return b=a.normalizeRect(b),c=a.normalizeRect(c),e[0]===b[0]&&e[1]===c[0]||e[0]===c[0]&&e[1]===b[0]?(g[0]=e[1],g[2]=e[2],f[0]===b[1]&&f[1]===c[1]||f[0]===c[1]&&f[1]===b[1]?(g[1]=f[1],g[3]=f[2],g):!1):!1},a.sign=function(a){return 0>a?-1:1},a.appendToArray=function(a,b){Array.prototype.push.apply(a,b)},a.prependToArray=function(a,b){Array.prototype.unshift.apply(a,b)},a.extendObj=function(a,b){for(var c in b)a[c]=b[c]},a.getInheritableProperty=function(a,b){for(;a&&!a.has(b);)a=a.get("Parent");return a?a.get(b):null},a.inherit=function(a,b,c){a.prototype=Object.create(b.prototype),a.prototype.constructor=a;for(var d in c)a.prototype[d]=c[d]},a.loadScript=function(a,b){var c=document.createElement("script"),d=!1;c.setAttribute("src",a),b&&(c.onload=function(){d||b(),d=!0}),document.getElementsByTagName("head")[0].appendChild(c)},a}(),oa=(PDFJS.PageViewport=function(){function a(a,b,c,d,e,f){this.viewBox=a,this.scale=b,this.rotation=c,this.offsetX=d,this.offsetY=e;var g,h,i,j,k=(a[2]+a[0])/2,l=(a[3]+a[1])/2;switch(c%=360,c=0>c?c+360:c){case 180:g=-1,h=0,i=0,j=1;break;case 90:g=0,h=1,i=1,j=0;break;case 270:g=0,h=-1,i=-1,j=0;break;default:g=1,h=0,i=0,j=-1}f&&(i=-i,j=-j);var m,n,o,p;0===g?(m=Math.abs(l-a[1])*b+d,n=Math.abs(k-a[0])*b+e,o=Math.abs(a[3]-a[1])*b,p=Math.abs(a[2]-a[0])*b):(m=Math.abs(k-a[0])*b+d,n=Math.abs(l-a[1])*b+e,o=Math.abs(a[2]-a[0])*b,p=Math.abs(a[3]-a[1])*b),this.transform=[g*b,h*b,i*b,j*b,m-g*b*k-i*b*l,n-h*b*k-j*b*l],this.width=o,this.height=p,this.fontScale=b}return a.prototype={clone:function(b){b=b||{};var c="scale"in b?b.scale:this.scale,d="rotation"in b?b.rotation:this.rotation;return new a(this.viewBox.slice(),c,d,this.offsetX,this.offsetY,b.dontFlip)},convertToViewportPoint:function(a,b){return na.applyTransform([a,b],this.transform)},convertToViewportRectangle:function(a){var b=na.applyTransform([a[0],a[1]],this.transform),c=na.applyTransform([a[2],a[3]],this.transform);return[b[0],b[1],c[0],c[1]]},convertToPdfPoint:function(a,b){return na.applyInverseTransform([a,b],this.transform)}},a}(),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364]);PDFJS.createPromiseCapability=G,function(){function a(a){this._status=c,this._handlers=[];try{a.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(b){this._reject(b)}}if(S.Promise)return"function"!=typeof S.Promise.all&&(S.Promise.all=function(a){var b,c,d=0,e=[],f=new S.Promise(function(a,d){b=a,c=d});return a.forEach(function(a,f){d++,a.then(function(a){e[f]=a,d--,0===d&&b(e)},c)}),0===d&&b(e),f}),"function"!=typeof S.Promise.resolve&&(S.Promise.resolve=function(a){return new S.Promise(function(b){b(a)})}),"function"!=typeof S.Promise.reject&&(S.Promise.reject=function(a){return new S.Promise(function(b,c){c(a)})}),void("function"!=typeof S.Promise.prototype["catch"]&&(S.Promise.prototype["catch"]=function(a){return S.Promise.prototype.then(void 0,a)}));var c=0,d=1,e=2,f=500,g={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(a){a._status!==c&&(this.handlers=this.handlers.concat(a._handlers),a._handlers=[],this.running||(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(var a=1,b=Date.now()+a;this.handlers.length>0;){var c=this.handlers.shift(),f=c.thisPromise._status,g=c.thisPromise._value;try{f===d?"function"==typeof c.onResolve&&(g=c.onResolve(g)):"function"==typeof c.onReject&&(g=c.onReject(g),f=d,c.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(c.thisPromise))}catch(h){f=e,g=h}if(c.nextPromise._updateStatus(f,g),Date.now()>=b)break}return this.handlers.length>0?void setTimeout(this.runHandlers.bind(this),0):void(this.running=!1)},addUnhandledRejection:function(a){this.unhandledRejections.push({promise:a,time:Date.now()}),this.scheduleRejectionCheck()},removeUnhandeledRejection:function(a){a._unhandledRejection=!1;for(var b=0;bf){var d=this.unhandledRejections[c].promise._value,e="Unhandled rejection: "+d;d.stack&&(e+="\n"+d.stack),b(e),this.unhandledRejections.splice(c),c--}this.unhandledRejections.length&&this.scheduleRejectionCheck()}.bind(this),f))}};a.all=function(b){function c(a){g._status!==e&&(i=[],f(a))}var d,f,g=new a(function(a,b){d=a,f=b}),h=b.length,i=[];if(0===h)return d(i),g;for(var j=0,k=b.length;k>j;++j){var l=b[j],m=function(a){return function(b){g._status!==e&&(i[a]=b,h--,0===h&&d(i))}}(j);a.isPromise(l)?l.then(m,c):m(l)}return g},a.isPromise=function(a){return a&&"function"==typeof a.then},a.resolve=function(b){return new a(function(a){a(b)})},a.reject=function(b){return new a(function(a,c){c(b)})},a.prototype={_status:null,_value:null,_handlers:null,_unhandledRejection:null,_updateStatus:function(b,c){if(this._status!==d&&this._status!==e){if(b===d&&a.isPromise(c))return void c.then(this._updateStatus.bind(this,d),this._updateStatus.bind(this,e));this._status=b,this._value=c,b===e&&0===this._handlers.length&&(this._unhandledRejection=!0,g.addUnhandledRejection(this)),g.scheduleHandlers(this)}},_resolve:function(a){this._updateStatus(d,a)},_reject:function(a){this._updateStatus(e,a)},then:function(b,c){var d=new a(function(a,b){this.resolve=a,this.reject=b});return this._handlers.push({thisPromise:this,onResolve:b,onReject:c,nextPromise:d}),g.scheduleHandlers(this),d},"catch":function(a){return this.then(void 0,a)}},S.Promise=a}();(function(){function a(a,b,c){for(;a.lengthb;++b){var g=d[b].name;g.length>f&&(f=g.length)}for(b=0,c=d.length;c>b;++b){var h=d[b],i=h.end-h.start;e+=a(h.name," ",f)+" "+i+"ms\n"}return e}},c})();PDFJS.createBlob=function(a,b){if("undefined"!=typeof Blob)return new Blob([a],{type:b});var c=new MozBlobBuilder;return c.append(a),c.getBlob(b)},PDFJS.createObjectURL=function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(b,c){if(!PDFJS.disableCreateObjectURL&&"undefined"!=typeof URL&&URL.createObjectURL){var d=PDFJS.createBlob(b,c);return URL.createObjectURL(d)}for(var e="data:"+c+";base64,",f=0,g=b.length;g>f;f+=3){var h=255&b[f],i=255&b[f+1],j=255&b[f+2],k=h>>2,l=(3&h)<<4|i>>4,m=g>f+1?(15&i)<<2|j>>6:64,n=g>f+2?63&j:64;e+=a[k]+a[l]+a[m]+a[n]}return e}}(),H.prototype={on:function(a,b,d){var e=this.actionHandler;e[a]&&c('There is already an actionName called "'+a+'"'),e[a]=[b,d]},send:function(a,b,c){var d={action:a,data:b};this.postMessage(d,c)},sendWithPromise:function(a,b,c){var d=this.callbackIndex++,e={action:a,data:b,callbackId:d},f=G();this.callbacksCapabilities[d]=f;try{this.postMessage(e,c)}catch(g){f.reject(g)}return f.promise},postMessage:function(a,b){b&&this.postMessageTransfers?this.comObj.postMessage(a,b):this.comObj.postMessage(a)}};var pa=function(){function a(a,b){this.url=a,b=b||{},this.isHttp=/^https?:/i.test(a),this.httpHeaders=this.isHttp&&b.httpHeaders||{},this.withCredentials=b.withCredentials||!1,this.getXhr=b.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests={},this.loadedRequests={}}function b(a){var b=a.response;if("string"!=typeof b)return b;for(var c=b.length,d=new Uint8Array(c),e=0;c>e;e++)d[e]=255&b.charCodeAt(e);return d.buffer}var c=200,d=206,e=function(){try{var a=new XMLHttpRequest;return a.open("GET","https://example.com"),a.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===a.responseType}catch(b){return!1}}();return a.prototype={requestRange:function(a,b,c){var d={begin:a,end:b};for(var e in c)d[e]=c[e];return this.request(d)},requestFull:function(a){return this.request(a)},request:function(a){var b=this.getXhr(),c=this.currXhrId++,d=this.pendingRequests[c]={xhr:b};b.open("GET",this.url),b.withCredentials=this.withCredentials;for(var f in this.httpHeaders){var g=this.httpHeaders[f];"undefined"!=typeof g&&b.setRequestHeader(f,g)}if(this.isHttp&&"begin"in a&&"end"in a){var h=a.begin+"-"+(a.end-1);b.setRequestHeader("Range","bytes="+h),d.expectedStatus=206}else d.expectedStatus=200;var i=e&&!!a.onProgressiveData;return i?(b.responseType="moz-chunked-arraybuffer",d.onProgressiveData=a.onProgressiveData,d.mozChunked=!0):b.responseType="arraybuffer",a.onError&&(b.onerror=function(c){a.onError(b.status)}),b.onreadystatechange=this.onStateChange.bind(this,c),b.onprogress=this.onProgress.bind(this,c),d.onHeadersReceived=a.onHeadersReceived,d.onDone=a.onDone,d.onError=a.onError,d.onProgress=a.onProgress,b.send(null),c},onProgress:function(a,c){var d=this.pendingRequests[a];if(d){if(d.mozChunked){var e=b(d.xhr);d.onProgressiveData(e)}var f=d.onProgress;f&&f(c)}},onStateChange:function(a,e){var f=this.pendingRequests[a];if(f){var g=f.xhr;if(g.readyState>=2&&f.onHeadersReceived&&(f.onHeadersReceived(),delete f.onHeadersReceived),4===g.readyState&&a in this.pendingRequests){if(delete this.pendingRequests[a],0===g.status&&this.isHttp)return void(f.onError&&f.onError(g.status));var h=g.status||c,i=h===c&&f.expectedStatus===d;if(!i&&h!==f.expectedStatus)return void(f.onError&&f.onError(g.status));this.loadedRequests[a]=!0;var j=b(g);if(h===d){var k=g.getResponseHeader("Content-Range"),l=/bytes (\d+)-(\d+)\/(\d+)/.exec(k),m=parseInt(l[1],10);f.onDone({begin:m,chunk:j})}else f.onProgressiveData?f.onDone(null):f.onDone({begin:0,chunk:j})}}},hasPendingRequests:function(){for(var a in this.pendingRequests)return!0;return!1},getRequestXhr:function(a){return this.pendingRequests[a].xhr},isStreamingRequest:function(a){return!!this.pendingRequests[a].onProgressiveData},isPendingRequest:function(a){return a in this.pendingRequests},isLoadedRequest:function(a){return a in this.loadedRequests},abortAllRequests:function(){for(var a in this.pendingRequests)this.abortRequest(0|a)},abortRequest:function(a){var b=this.pendingRequests[a].xhr;delete this.pendingRequests[a],b.abort()}},a}(),qa=function(){function a(a,b,c){this.bytes=new Uint8Array(a),this.start=0,this.pos=0,this.end=a,this.chunkSize=b,this.loadedChunks=[],this.numChunksLoaded=0,this.numChunks=Math.ceil(a/b),this.manager=c,this.progressiveDataLength=0,this.lastSuccessfulEnsureByteChunk=-1}return a.prototype={getMissingChunks:function(){for(var a=[],b=0,c=this.numChunks;c>b;++b)this.loadedChunks[b]||a.push(b);return a},getBaseStreams:function(){return[this]},allChunksLoaded:function(){return this.numChunksLoaded===this.numChunks},onReceiveData:function(a,b){var c=a+b.byteLength;e(a%this.chunkSize===0,"Bad begin offset: "+a);var d=this.bytes.length;e(c%this.chunkSize===0||c===d,"Bad end offset: "+c),this.bytes.set(new Uint8Array(b),a);var f,g=this.chunkSize,h=Math.floor(a/g),i=Math.floor((c-1)/g)+1;for(f=h;i>f;++f)this.loadedChunks[f]||(this.loadedChunks[f]=!0,++this.numChunksLoaded)},onReceiveProgressiveData:function(a){var b=this.progressiveDataLength,c=Math.floor(b/this.chunkSize);this.bytes.set(new Uint8Array(a),b),b+=a.byteLength,this.progressiveDataLength=b;var d,e=b>=this.end?this.numChunks:Math.floor(b/this.chunkSize);for(d=c;e>d;++d)this.loadedChunks[d]||(this.loadedChunks[d]=!0,++this.numChunksLoaded)},ensureByte:function(a){var b=Math.floor(a/this.chunkSize);if(b!==this.lastSuccessfulEnsureByteChunk){if(!this.loadedChunks[b])throw new ja(a,a+1);this.lastSuccessfulEnsureByteChunk=b}},ensureRange:function(a,b){if(!(a>=b||b<=this.progressiveDataLength))for(var c=this.chunkSize,d=Math.floor(a/c),e=Math.floor((b-1)/c)+1,f=d;e>f;++f)if(!this.loadedChunks[f])throw new ja(a,b)},nextEmptyChunk:function(a){for(var b,c=this.numChunks,d=0;c>d;++d)if(b=(a+d)%c,!this.loadedChunks[b])return b;return null},hasChunk:function(a){return!!this.loadedChunks[a]},get length(){return this.end-this.start},get isEmpty(){return 0===this.length},getByte:function(){var a=this.pos;return a>=this.end?-1:(this.ensureByte(a),this.bytes[this.pos++])},getUint16:function(){var a=this.getByte(),b=this.getByte();return-1===a||-1===b?-1:(a<<8)+b},getInt32:function(){var a=this.getByte(),b=this.getByte(),c=this.getByte(),d=this.getByte();return(a<<24)+(b<<16)+(c<<8)+d},getBytes:function(a){var b=this.bytes,c=this.pos,d=this.end;if(!a)return this.ensureRange(c,d),b.subarray(c,d);var e=c+a;return e>d&&(e=d),this.ensureRange(c,e),this.pos=e,b.subarray(c,e)},peekByte:function(){var a=this.getByte();return this.pos--,a},peekBytes:function(a){var b=this.getBytes(a);return this.pos-=b.length,b},getByteRange:function(a,b){return this.ensureRange(a,b),this.bytes.subarray(a,b)},skip:function(a){a||(a=1),this.pos+=a},reset:function(){this.pos=this.start},moveStart:function(){this.start=this.pos},makeSubStream:function(a,b,c){function d(){}this.ensureRange(a,a+b),d.prototype=Object.create(this),d.prototype.getMissingChunks=function(){for(var a=this.chunkSize,b=Math.floor(this.start/a),c=Math.floor((this.end-1)/a)+1,d=[],e=b;c>e;++e)this.loadedChunks[e]||d.push(e);return d};var e=new d;return e.pos=e.start=a,e.end=a+b||this.end,e.dict=c,e},isStream:!0},a}(),ra=function(){function a(a,b,c,d){this.stream=new qa(a,b,this),this.length=a,this.chunkSize=b,this.url=c,this.disableAutoFetch=d.disableAutoFetch;var e=this.msgHandler=d.msgHandler;if(d.chunkedViewerLoading)e.on("OnDataRange",this.onReceiveData.bind(this)),e.on("OnDataProgress",this.onProgress.bind(this)),this.sendRequest=function(a,b){e.send("RequestDataRange",{begin:a,end:b})};else{var f=function(){return new XMLHttpRequest};this.networkManager=new pa(this.url,{getXhr:f,httpHeaders:d.httpHeaders,withCredentials:d.withCredentials}),this.sendRequest=function(a,b){this.networkManager.requestRange(a,b,{onDone:this.onReceiveData.bind(this),onProgress:this.onProgress.bind(this)})}}this.currRequestId=0,this.chunksNeededByRequest={},this.requestsByChunk={},this.promisesByRequest={},this.progressiveDataLength=0,this._loadedStreamCapability=G(),d.initialData&&this.onReceiveData({chunk:d.initialData})}return a.prototype={onLoadedStream:function(){return this._loadedStreamCapability.promise},requestAllChunks:function(){var a=this.stream.getMissingChunks();return this._requestChunks(a),this._loadedStreamCapability.promise},_requestChunks:function(a){var b,c,d,e=this.currRequestId++;for(this.chunksNeededByRequest[e]=b={},c=0,d=a.length;d>c;c++)this.stream.hasChunk(a[c])||(b[a[c]]=!0);if(u(b))return Promise.resolve();var f=G();this.promisesByRequest[e]=f;var g=[];for(var h in b)h=0|h,h in this.requestsByChunk||(this.requestsByChunk[h]=[],g.push(h)),this.requestsByChunk[h].push(e);if(!g.length)return f.promise;var i=this.groupChunks(g);for(c=0;cf;++f)e.push(f);return this._requestChunks(e)},requestRanges:function(a){a=a||[];for(var b=[],c=0;cf;++f)b.indexOf(f)<0&&b.push(f);return b.sort(function(a,b){return a-b}),this._requestChunks(b)},groupChunks:function(a){for(var b=[],c=-1,d=-1,e=0;ec&&(c=f),d>=0&&d+1!==f&&(b.push({beginChunk:c,endChunk:d+1}),c=f),e+1===a.length&&b.push({beginChunk:c,endChunk:f+1}),d=f}return b},onProgress:function(a){var b=this.stream.numChunksLoaded*this.chunkSize+a.loaded;this.msgHandler.send("DocProgress",{loaded:b,total:this.length})},onReceiveData:function(a){var b=a.chunk,c=void 0===a.begin,d=c?this.progressiveDataLength:a.begin,e=d+b.byteLength,f=Math.floor(d/this.chunkSize),g=eb;++b){var k=this.requestsByChunk[b]||[];for(delete this.requestsByChunk[b],h=0;hf){b("Page_getInheritedPageProp: maximum loop count exceeded.");break}c=c.get("Parent")}return d?1===d.length||!B(d[0])||e>f?d[0]:Aa.merge(this.xref,d):Aa.empty},get content(){return this.getPageProp("Contents")},get resources(){return g(this,"resources",this.getInheritedPageProp("Resources"))},get mediaBox(){var a=this.getInheritedPageProp("MediaBox");return C(a)&&4===a.length||(a=c),g(this,"mediaBox",a)},get view(){var a=this.mediaBox,b=this.getInheritedPageProp("CropBox");return C(b)&&4===b.length?(b=na.intersect(b,a),b?g(this,"view",b):g(this,"view",a)):g(this,"view",a)},get rotate(){var a=this.getInheritedPageProp("Rotate")||0;return a%90!==0?a=0:a>=360?a%=360:0>a&&(a=(a%360+360)%360),g(this,"rotate",a)},getContentStream:function(){var a,b=this.content;if(C(b)){var c,d=this.xref,e=b.length,f=[];for(c=0;e>c;++c)f.push(d.fetchIfRef(b[c]));a=new Pc(f)}else a=D(b)?b:new _c;return a},loadResources:function(a){return this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources")),this.resourcesPromise.then(function(){var b=new Ia(this.resources.map,a,this.xref);return b.load()}.bind(this))},getOperatorList:function(a,b,c){var d=this,e=this.pdfManager,f=e.ensure(this,"getContentStream",[]),g=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),h=new vb(e,this.xref,a,this.pageIndex,"p"+this.pageIndex+"_",this.idCounters,this.fontCache),i=Promise.all([f,g]),j=i.then(function(e){var f=e[0],g=new xb(c,a,d.pageIndex);return a.send("StartRenderPage",{transparency:h.hasBlendModes(d.resources),pageIndex:d.pageIndex,intent:c}),h.getOperatorList(f,b,d.resources,g).then(function(){return g})}),k=e.ensure(this,"annotations");return Promise.all([j,k]).then(function(a){var d=a[0],f=a[1];if(0===f.length)return d.flush(!0),d;var g=Na.appendToOperatorList(f,d,e,h,b,c);return g.then(function(){return d.flush(!0),d})})},extractTextContent:function(a){var b={on:function(){},send:function(){}},c=this,d=this.pdfManager,e=d.ensure(this,"getContentStream",[]),f=this.loadResources(["ExtGState","XObject","Font"]),g=Promise.all([e,f]);return g.then(function(e){var f=e[0],g=new vb(d,c.xref,b,c.pageIndex,"p"+c.pageIndex+"_",c.idCounters,c.fontCache);return g.getTextContent(f,a,c.resources)})},getAnnotationsData:function(){for(var a=this.annotations,b=[],c=0,d=a.length;d>c;++c)b.push(a[c].data);return b},get annotations(){for(var a=[],b=this.getInheritedPageProp("Annots")||[],c=new I,d=0,e=b.length;e>d;++d){var f=b[d],h=c.create(this.xref,f);h&&(h.isViewable()||h.isPrintable())&&a.push(h)}return g(this,"annotations",a)}},a}(),xa=function(){function b(a,b,e){D(b)?d.call(this,a,b,e):E(b)?d.call(this,a,new Mc(b),e):c("PDFDocument: Unknown argument type")}function d(a,b,c){e(b.length>0,"stream must have data"),this.pdfManager=a,this.stream=b;var d=new Fa(this.stream,c,a);this.xref=d}function f(a,b,c,d){var e=a.pos,f=a.end,g=[];e+c>f&&(c=f-e);for(var h=0;c>h;++h)g.push(String.fromCharCode(a.getByte()));var i=g.join("");a.pos=e;var j=d?i.lastIndexOf(b):i.indexOf(b);return-1===j?!1:(a.pos+=j,!0)}var h=1024,i="\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",k={get entries(){return g(this,"entries",{Title:y,Author:y,Subject:y,Keywords:y,Creator:y,Producer:y,CreationDate:y,ModDate:y,Trapped:z})}};return b.prototype={parse:function(b){this.setup(b);var c=this.catalog.catDict.get("Version");z(c)&&(this.pdfFormatVersion=c.name);try{if(this.acroForm=this.catalog.catDict.get("AcroForm"),this.acroForm){this.xfa=this.acroForm.get("XFA");var d=this.acroForm.get("Fields");d&&C(d)&&0!==d.length||this.xfa||(this.acroForm=null)}}catch(e){a("Something wrong with AcroForm entry"),this.acroForm=null}},get linearization(){var b=null;if(this.stream.length)try{b=Hc.create(this.stream)}catch(c){if(c instanceof ja)throw c;a(c)}return g(this,"linearization",b)},get startXRef(){var a=this.stream,b=0,c=this.linearization;if(c)a.reset(),f(a,"endobj",1024)&&(b=a.pos+6);else{for(var d=1024,e=!1,h=a.end;!e&&h>0;)h-=d-"startxref".length,0>h&&(h=0),a.pos=h,e=f(a,"startxref",d,!0);if(e){a.skip(9);var i;do i=a.getByte();while(Gc.isSpace(i));for(var j="";i>=32&&57>=i;)j+=String.fromCharCode(i),i=a.getByte();b=parseInt(j,10),isNaN(b)&&(b=0)}}return g(this,"startXRef",b)},get mainXRefEntriesOffset(){var a=0,b=this.linearization;return b&&(a=b.mainXRefEntriesOffset),g(this,"mainXRefEntriesOffset",a)},checkHeader:function(){var a=this.stream;if(a.reset(),f(a,"%PDF-",1024)){a.moveStart();for(var b,c=12,d="";(b=a.getByte())>32&&!(d.length>=c);)d+=String.fromCharCode(b);return void(this.pdfFormatVersion||(this.pdfFormatVersion=d.substring(5)))}},parseStartXRef:function(){var a=this.startXRef;this.xref.setStartXRef(a)},setup:function(a){this.xref.parse(a),this.catalog=new Ea(this.pdfManager,this.xref)},get numPages(){var a=this.linearization,b=a?a.numPages:this.catalog.numPages;return g(this,"numPages",b)},get documentInfo(){var b,c={PDFFormatVersion:this.pdfFormatVersion,IsAcroFormPresent:!!this.acroForm,IsXFAPresent:!!this.xfa};try{b=this.xref.trailer.get("Info")}catch(d){a("The document information dictionary is invalid.")}if(b){var e=k.entries;for(var f in e)if(b.has(f)){var h=b.get(f);e[f](h)?c[f]="string"!=typeof h?h:r(h):a('Bad value in document info for "'+f+'"')}}return g(this,"documentInfo",c)},get fingerprint(){var a,b=this.xref,c="",d=b.trailer.get("ID");d&&C(d)&&d[0]&&y(d[0])&&d[0]!==i?a=j(d[0]):(this.stream.ensureRange&&this.stream.ensureRange(0,Math.min(h,this.stream.end)),a=gb(this.stream.bytes.subarray(0,h),0,h));for(var e=0,f=a.length;f>e;e++){var k=a[e].toString(16);c+=1===k.length?"0"+k:k}return g(this,"fingerprint",c)},getPage:function(a){return this.catalog.getPage(a)},cleanup:function(){return this.catalog.cleanup()}},b}(),ya=function(){function a(a){this.name=a}a.prototype={};var b={};return a.get=function(c){var d=b[c];return d?d:b[c]=new a(c)},a}(),za=function(){function a(a){this.cmd=a}a.prototype={};var b={};return a.get=function(c){var d=b[c];return d?d:b[c]=new a(c)},a}(),Aa=function(){function a(a){if(!z(a.Type))return!0;var b=a.Type.name;return d[b]===!0}function b(a){this.map=Object.create(null),this.xref=a,this.objId=null,this.__nonSerializable__=c}var c=function(){return c},d={Background:!0,ExtGState:!0,Halftone:!0,Layout:!0,Mask:!0,Pagination:!0,Printing:!0};return b.prototype={assignXref:function(a){this.xref=a},get:function(a,b,c){var d,e=this.xref;return"undefined"!=typeof(d=this.map[a])||a in this.map||"undefined"==typeof b?e?e.fetchIfRef(d):d:"undefined"!=typeof(d=this.map[b])||b in this.map||"undefined"==typeof c?e?e.fetchIfRef(d):d:(d=this.map[c]||null,e?e.fetchIfRef(d):d)},getAsync:function(a,b,c){var d,e=this.xref;return"undefined"!=typeof(d=this.map[a])||a in this.map||"undefined"==typeof b?e?e.fetchIfRefAsync(d):Promise.resolve(d):"undefined"!=typeof(d=this.map[b])||b in this.map||"undefined"==typeof c?e?e.fetchIfRefAsync(d):Promise.resolve(d):(d=this.map[c]||null,e?e.fetchIfRefAsync(d):Promise.resolve(d))},getArray:function(a,b,c){var d=this.get(a,b,c),e=this.xref;if(!C(d)||!e)return d;d=d.slice();for(var f=0,g=d.length;g>f;f++)F(d[f])&&(d[f]=e.fetch(d[f]));return d},getRaw:function(a){return this.map[a]},getAll:function(){var c,d,e=Object.create(null),f=null;for(c in this.map)d=this.get(c),d instanceof b?a(d)?(f||(f=[])).push({target:e,key:c,obj:d}):e[c]=this.getRaw(c):e[c]=d;if(!f)return e;for(var g=Object.create(null);f.length>0;){var h=f.shift(),i=h.obj,j=i.objId;if(j&&j in g)h.target[h.key]=g[j];else{var k=Object.create(null);for(c in i.map)d=i.get(c),d instanceof b?a(d)?f.push({target:k,key:c,obj:d}):k[c]=i.getRaw(c):k[c]=d;j&&(g[j]=k),h.target[h.key]=k}}return e},getKeys:function(){return Object.keys(this.map)},set:function(a,b){this.map[a]=b},has:function(a){return a in this.map},forEach:function(a){for(var b in this.map)a(b,this.get(b))}},b.empty=new b(null),b.merge=function(a,c){for(var d=new b(a),e=0,f=c.length;f>e;e++){var g=c[e];if(B(g))for(var h in g.map)d.map[h]||(d.map[h]=g.map[h])}return d},b}(),Ba=function(){function a(a,b){this.num=a,this.gen=b}return a.prototype={toString:function(){var a=this.num+"R";return 0!==this.gen&&(a+=this.gen),a}},a}(),Ca=function(){function a(){this.dict={}}return a.prototype={has:function(a){return a.toString()in this.dict},put:function(a){this.dict[a.toString()]=!0},remove:function(a){delete this.dict[a.toString()]}},a}(),Da=function(){function a(){this.dict=Object.create(null)}return a.prototype={get:function(a){return this.dict[a.toString()]},has:function(a){return a.toString()in this.dict},put:function(a,b){this.dict[a.toString()]=b},putAlias:function(a,b){this.dict[a.toString()]=this.get(b)},forEach:function(a,b){for(var c in this.dict)a.call(b,this.dict[c])},clear:function(){this.dict=Object.create(null)}},a}(),Ea=function(){function d(a,b){this.pdfManager=a,this.xref=b,this.catDict=b.getCatalogObj(),this.fontCache=new Da,e(B(this.catDict),"catalog object is not a dictionary"),this.pagePromises=[]}return d.prototype={get metadata(){var b=this.catDict.getRaw("Metadata");if(!F(b))return g(this,"metadata",null);var c,d=this.xref.encrypt?this.xref.encrypt.encryptMetadata:!1,e=this.xref.fetch(b,!d);if(e&&B(e.dict)){var f=e.dict.get("Type"),h=e.dict.get("Subtype");if(z(f)&&z(h)&&"Metadata"===f.name&&"XML"===h.name)try{c=s(i(e.getBytes()))}catch(j){ -a("Skipping invalid metadata.")}}return g(this,"metadata",c)},get toplevelPagesDict(){var a=this.catDict.get("Pages");return e(B(a),"invalid top-level pages dictionary"),g(this,"toplevelPagesDict",a)},get documentOutline(){var a=null;try{a=this.readDocumentOutline()}catch(c){if(c instanceof ja)throw c;b("Unable to read document outline")}return g(this,"documentOutline",a)},readDocumentOutline:function(){var a=this.xref,b=this.catDict.get("Outlines"),d={items:[]};if(B(b)){b=b.getRaw("First");var e=new Ca;if(F(b)){var f=[{obj:b,parent:d}];for(e.put(b);f.length>0;){var g=f.shift(),h=a.fetchIfRef(g.obj);if(null!==h){h.has("Title")||c("Invalid outline item");var i=h.get("A");i?i=i.get("D"):h.has("Dest")&&(i=h.getRaw("Dest"),z(i)&&(i=i.name));var j=h.get("Title"),k={dest:i,title:r(j),color:h.get("C")||[0,0,0],count:h.get("Count"),bold:!!(2&h.get("F")),italic:!!(1&h.get("F")),items:[]};g.parent.items.push(k),b=h.getRaw("First"),F(b)&&!e.has(b)&&(f.push({obj:b,parent:k}),e.put(b)),b=h.getRaw("Next"),F(b)&&!e.has(b)&&(f.push({obj:b,parent:g.parent}),e.put(b))}}}}return d.items.length>0?d.items:null},get numPages(){var a=this.toplevelPagesDict.get("Count");return e(w(a),"page count in top level pages object is not an integer"),g(this,"num",a)},get destinations(){function a(a){return B(a)?a.get("D"):a}var b,c,d=this.xref,e={},f=this.catDict.get("Names");if(f&&f.has("Dests")?b=f.getRaw("Dests"):this.catDict.has("Dests")&&(c=this.catDict.get("Dests")),c&&(f=c,f.forEach(function(b,c){c&&(e[b]=a(c))})),b){var h=new Ga(b,d),i=h.getAll();for(var j in i)i.hasOwnProperty(j)&&(e[j]=a(i[j]))}return g(this,"destinations",e)},getDestination:function(a){function b(a){return B(a)?a.get("D"):a}var c,d,e=this.xref,f=null,g=this.catDict.get("Names");if(g&&g.has("Dests")?c=g.getRaw("Dests"):this.catDict.has("Dests")&&(d=this.catDict.get("Dests")),d){var h=d.get(a);h&&(f=b(h))}if(c){var i=new Ga(c,e);f=b(i.get(a))}return f},get attachments(){var a,b=this.xref,c=null,d=this.catDict.get("Names");if(d&&(a=d.getRaw("EmbeddedFiles")),a){var e=new Ga(a,b),f=e.getAll();for(var h in f)if(f.hasOwnProperty(h)){var i=new Ha(f[h],b);c||(c={}),c[r(h)]=i.serializable}}return g(this,"attachments",c)},get javaScript(){function a(a){var b=a.get("S");if(z(b)&&"JavaScript"===b.name){var c=a.get("JS");if(D(c))c=i(c.getBytes());else if(!y(c))return;d.push(r(c))}}var b=this.xref,c=this.catDict.get("Names"),d=[];if(c&&c.has("JavaScript")){var e=new Ga(c.getRaw("JavaScript"),b),f=e.getAll();for(var h in f)if(f.hasOwnProperty(h)){var j=f[h];B(j)&&a(j)}}var k=this.catDict.get("OpenAction");if(B(k,"Action")){var l=k.get("S");if(z(l)&&"Named"===l.name){var m=k.get("N");z(m)&&"Print"===m.name&&d.push("print({});")}else a(k)}return g(this,"javaScript",d)},cleanup:function(){var a=[];return this.fontCache.forEach(function(b){a.push(b)}),Promise.all(a).then(function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b].dict;delete d.translated}this.fontCache.clear()}.bind(this))},getPage:function(a){return a in this.pagePromises||(this.pagePromises[a]=this.getPageDict(a).then(function(b){var c=b[0],d=b[1];return new wa(this.pdfManager,this.xref,a,c,d,this.fontCache)}.bind(this))),this.pagePromises[a]},getPageDict:function(a){function b(){for(;d.length;){var i=d.pop();if(F(i))return void g.fetchAsync(i).then(function(e){return B(e,"Page")||B(e)&&!e.has("Kids")?void(a===f?c.resolve([e,i]):(f++,b())):(d.push(e),void b())},c.reject);e(B(i),"page dictionary kid reference points to wrong type of object");var j=i.get("Count");if(0===j&&(h=!0),a>=f+j)f+=j;else{var k=i.get("Kids");if(e(C(k),"page dictionary kids object is not an array"),h||j!==k.length)for(var l=k.length-1;l>=0;l--)d.push(k[l]);else d=[k[a-f]],f=a}}c.reject("Page index "+a+" not found.")}var c=G(),d=[this.catDict.getRaw("Pages")],f=0,g=this.xref,h=!1;return b(),c.promise},getPageIndex:function(a){function b(a){var b,d=0;return f.fetchAsync(a).then(function(a){return a?(b=a.getRaw("Parent"),a.getAsync("Parent")):null}).then(function(a){return a?a.getAsync("Kids"):null}).then(function(g){if(!g)return null;for(var h=[],i=!1,j=0;jh;h++){d.streamPos=b.pos,d.entryNum=h,d.parserBuf1=a.buf1,d.parserBuf2=a.buf2;var i={};i.offset=a.getObj(),i.gen=a.getObj();var j=a.getObj();A(j,"f")?i.free=!0:A(j,"n")&&(i.uncompressed=!0),w(i.offset)&&w(i.gen)&&(i.free||i.uncompressed)||c("Invalid entry in XRef subsection: "+f+", "+g),this.entries[h+f]||(this.entries[h+f]=i)}d.entryNum=0,d.streamPos=b.pos,d.parserBuf1=a.buf1,d.parserBuf2=a.buf2,delete d.firstEntryNum,delete d.entryCount}return 1===f&&this.entries[1]&&this.entries[1].free&&this.entries.shift(),this.entries[0]&&!this.entries[0].free&&c("Invalid XRef table: unexpected first object"),e},processXRefStream:function(a){if(!("streamState"in this)){var b=a.dict,c=b.get("W"),d=b.get("Index");d||(d=[0,b.get("Size")]),this.streamState={entryRanges:d,byteWidths:c,entryNum:0,streamPos:a.pos}}return this.readXRefStream(a),delete this.streamState,a.dict},readXRefStream:function(a){var b,d,e=this.streamState;a.pos=e.streamPos;for(var f=e.byteWidths,g=f[0],h=f[1],i=f[2],j=e.entryRanges;j.length>0;){var k=j[0],l=j[1];for(w(k)&&w(l)||c("Invalid XRef range fields: "+k+", "+l),w(g)&&w(h)&&w(i)||c("Invalid XRef entry fields length: "+k+", "+l),b=e.entryNum;l>b;++b){e.entryNum=b,e.streamPos=a.pos;var m=0,n=0,o=0;for(d=0;g>d;++d)m=m<<8|a.getByte();for(0===g&&(m=1),d=0;h>d;++d)n=n<<8|a.getByte();for(d=0;i>d;++d)o=o<<8|a.getByte();var p={};switch(p.offset=n,p.gen=o,m){case 0:p.free=!0;break;case 1:p.uncompressed=!0;break;case 2:break;default:c("Invalid XRef entry type: "+m)}this.entries[k+b]||(this.entries[k+b]=p)}e.entryNum=0,e.streamPos=a.pos,j.splice(0,2)}},indexObjects:function(){function a(a,b){for(var c="",f=a[b];f!==d&&f!==e&&f!==h&&!(++b>=a.length);)c+=String.fromCharCode(f),f=a[b];return c}function b(a,b,c){for(var d=c.length,e=a.length,f=0;e>b;){for(var g=0;d>g&&a[b+g]===c[g];)++g;if(g>=d)break;b++,f++}return f}var c=9,d=10,e=13,f=32,g=37,h=60,i=/^(\d+)\s+(\d+)\s+obj\b/,j=new Uint8Array([116,114,97,105,108,101,114]),k=new Uint8Array([115,116,97,114,116,120,114,101,102]),l=new Uint8Array([101,110,100,111,98,106]),m=new Uint8Array([47,88,82,101,102]);this.entries.length=0;var n=this.stream;n.pos=0;for(var o=n.getBytes(),p=n.start,q=o.length,r=[],s=[];q>p;){var t=o[p];if(t!==c&&t!==d&&t!==e&&t!==f)if(t!==g){var u,v=a(o,p);if(0!==v.indexOf("xref")||4!==v.length&&!/\s/.test(v[4]))if(u=i.exec(v)){"undefined"==typeof this.entries[u[1]]&&(this.entries[u[1]]={offset:p-n.start,gen:0|u[2],uncompressed:!0});var w=b(o,p,l)+7,x=o.subarray(p,p+w),y=b(x,0,m);w>y&&x[y+5]<64&&(s.push(p-n.start),this.xrefstms[p-n.start]=1),p+=w}else 0!==v.indexOf("trailer")||7!==v.length&&!/\s/.test(v[7])?p+=v.length+1:(r.push(p),p+=b(o,p,k));else p+=b(o,p,j),r.push(p),p+=b(o,p,k)}else do{if(++p,p>=q)break;t=o[p]}while(t!==d&&t!==e);else++p}var z,C;for(z=0,C=s.length;C>z;++z)this.startXRefQueue.push(s[z]),this.readXRef(!0);var D;for(z=0,C=r.length;C>z;++z){n.pos=r[z];var E=new Fc(new Gc(n),!0,this),F=E.getObj();if(A(F,"trailer")&&B(D=E.getObj())&&D.has("ID"))return D}if(D)return D;throw new fa("Invalid PDF structure")},readXRef:function(b){var d=this.stream;try{for(;this.startXRefQueue.length;){var e=this.startXRefQueue[0];d.pos=e+d.start;var f,g=new Fc(new Gc(d),!0,this),h=g.getObj();if(A(h,"xref")){if(f=this.processXRefTable(g),this.topDict||(this.topDict=f),h=f.get("XRefStm"),w(h)){var i=h;i in this.xrefstms||(this.xrefstms[i]=1,this.startXRefQueue.push(i))}}else w(h)?(w(g.getObj())&&A(g.getObj(),"obj")&&D(h=g.getObj())||c("Invalid XRef stream"),f=this.processXRefStream(h),this.topDict||(this.topDict=f),f||c("Failed to read XRef stream")):c("Invalid XRef stream header");h=f.get("Prev"),w(h)?this.startXRefQueue.push(h):F(h)&&this.startXRefQueue.push(h.num),this.startXRefQueue.shift()}return this.topDict}catch(j){if(j instanceof ja)throw j;a("(while reading XRef): "+j)}if(!b)throw new ka},getEntry:function(a){var b=this.entries[a];return b&&!b.free&&b.offset?b:null},fetchIfRef:function(a){return F(a)?this.fetch(a):a},fetch:function(a,b){e(F(a),"ref object is not a reference");var c=a.num;if(c in this.cache){var d=this.cache[c];return d}var f=this.getEntry(c);return null===f?this.cache[c]=null:(f=f.uncompressed?this.fetchUncompressed(a,f,b):this.fetchCompressed(f,b),B(f)?f.objId=a.toString():D(f)&&(f.dict.objId=a.toString()),f)},fetchUncompressed:function(a,b,d){var e=a.gen,f=a.num;b.gen!==e&&c("inconsistent generation in XRef");var g=this.stream.makeSubStream(b.offset+this.stream.start),h=new Fc(new Gc(g),!0,this),i=h.getObj(),j=h.getObj(),k=h.getObj();if(w(i)&&parseInt(i,10)===f&&w(j)&&parseInt(j,10)===e&&A(k)||c("bad XRef entry"),!A(k,"obj")){if(0===k.cmd.indexOf("obj")&&(f=parseInt(k.cmd.substring(3),10),!isNaN(f)))return f;c("bad XRef entry")}return b=this.encrypt&&!d?h.getObj(this.encrypt.createCipherTransform(f,e)):h.getObj(),D(b)||(this.cache[f]=b),b},fetchCompressed:function(a,b){var d=a.offset,e=this.fetch(new Ba(d,0));D(e)||c("bad ObjStm stream");var f=e.dict.get("First"),g=e.dict.get("N");w(f)&&w(g)||c("invalid first and n parameters for ObjStm stream");var h=new Fc(new Gc(e),!1,this);h.allowStreams=!0;var i,j,k=[],l=[];for(i=0;g>i;++i){j=h.getObj(),w(j)||c("invalid object number in the ObjStm stream: "+j),l.push(j);var m=h.getObj();w(m)||c("invalid object offset in the ObjStm stream: "+m)}for(i=0;g>i;++i){k.push(h.getObj()),j=l[i];var n=this.entries[j];n&&n.offset===d&&n.gen===i&&(this.cache[j]=k[i])}return a=k[a.gen],void 0===a&&c("bad XRef entry for compressed object"),a},fetchIfRefAsync:function(a){return F(a)?this.fetchAsync(a):Promise.resolve(a)},fetchAsync:function(a,b){var c=this.stream.manager,d=this;return new Promise(function e(f,g){try{f(d.fetch(a,b))}catch(h){if(h instanceof ja)return void c.requestRange(h.begin,h.end).then(function(){e(f,g)},g);g(h)}})},getCatalogObj:function(){return this.root}},d}(),Ga=function(){function a(a,b){this.root=a,this.xref=b}return a.prototype={getAll:function(){var a={};if(!this.root)return a;var b=this.xref,d=new Ca;d.put(this.root);for(var e=[this.root];e.length>0;){var f,g,h=b.fetchIfRef(e.shift());if(B(h))if(h.has("Kids")){var i=h.get("Kids");for(f=0,g=i.length;g>f;f++){var j=i[f];d.has(j)&&c("invalid destinations"),e.push(j),d.put(j)}}else{var k=h.get("Names");if(k)for(f=0,g=k.length;g>f;f+=2)a[b.fetchIfRef(k[f])]=b.fetchIfRef(k[f+1])}}return a},get:function(a){if(!this.root)return null;for(var c,d,e,f=this.xref,g=f.fetchIfRef(this.root),h=0,i=10;g.has("Kids");){if(h++,h>i)return b("Search depth limit for named destionations has been reached."),null;var j=g.get("Kids");if(!C(j))return null;for(c=0,d=j.length-1;d>=c;){e=c+d>>1;var k=f.fetchIfRef(j[e]),l=k.get("Limits");if(af.fetchIfRef(l[1]))){g=f.fetchIfRef(j[e]);break}c=e+1}}if(c>d)return null}var m=g.get("Names");if(C(m))for(c=0,d=m.length-2;d>=c;)if(e=c+d&-2,af.fetchIfRef(m[e])))return f.fetchIfRef(m[e+1]);c=e+2}return null}},a}(),Ha=function(){function a(a,c){a&&B(a)&&(this.xref=c,this.root=a,a.has("FS")&&(this.fs=a.get("FS")),this.description=a.has("Desc")?r(a.get("Desc")):"",a.has("RF")&&b("Related file specifications are not supported"),this.contentAvailable=!0,a.has("EF")||(this.contentAvailable=!1,b("Non-embedded file specifications are not supported")))}function c(a){return a.has("UF")?a.get("UF"):a.has("F")?a.get("F"):a.has("Unix")?a.get("Unix"):a.has("Mac")?a.get("Mac"):a.has("DOS")?a.get("DOS"):null}return a.prototype={get filename(){if(!this._filename&&this.root){var a=c(this.root)||"unnamed";this._filename=r(a).replace(/\\\\/g,"\\").replace(/\\\//g,"/").replace(/\\/g,"/")}return this._filename},get content(){if(!this.contentAvailable)return null;!this.contentRef&&this.root&&(this.contentRef=c(this.root.get("EF")));var a=null;if(this.contentRef){var d=this.xref,e=d.fetchIfRef(this.contentRef);e&&D(e)?a=e.getBytes():b("Embedded file specification points to non-existing/invalid content")}else b("Embedded file specification does not have a content");return a},get serializable(){return{filename:this.filename,content:this.content}}},a}(),Ia=function(){function a(a){return F(a)||B(a)||C(a)||D(a)}function b(b,c){var d;if(B(b)||D(b)){var e;e=B(b)?b.map:b.dict.map;for(var f in e)d=e[f],a(d)&&c.push(d)}else if(C(b))for(var g=0,h=b.length;h>g;g++)d=b[g],a(d)&&c.push(d)}function c(a,b,c){this.obj=a,this.keys=b,this.xref=c,this.refSet=null,this.capability=null}return c.prototype={load:function(){var a=this.keys;if(this.capability=G(),!(this.xref.stream instanceof qa)||0===this.xref.stream.getMissingChunks().length)return this.capability.resolve(),this.capability.promise;this.refSet=new Ca;for(var b=[],c=0;c=3&&(this.borderStyle.setHorizontalCornerRadius(d[0]),this.borderStyle.setVerticalCornerRadius(d[1]),this.borderStyle.setWidth(d[2]),4===d.length&&this.borderStyle.setDashArray(d[3]))}else this.borderStyle.setWidth(0)},isInvisible:function(){var a=this.data;return!!(a&&a.annotationFlags&&1&a.annotationFlags)},isViewable:function(){var a=this.data;return!(this.isInvisible()||!a||a.annotationFlags&&34&a.annotationFlags||!a.rect)},isPrintable:function(){var a=this.data;return!(!(!this.isInvisible()&&a&&a.annotationFlags&&4&a.annotationFlags)||2&a.annotationFlags||!a.rect)},loadResources:function(a){return new Promise(function(b,c){this.appearance.dict.getAsync("Resources").then(function(d){if(!d)return void b();var e=new Ia(d.map,a,d.xref);e.load().then(function(){b(d)},c)},c)}.bind(this))},getOperatorList:function(b,c){if(!this.appearance)return Promise.resolve(new xb);var d=this.data,e=this.appearance.dict,f=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),g=e.get("BBox")||[0,0,1,1],h=e.get("Matrix")||[1,0,0,1,0,0],i=a(d.rect,g,h),j=this;return f.then(function(a){var e=new xb;return e.addOp($.beginAnnotation,[d.rect,i,h]),b.getOperatorList(j.appearance,c,a,e).then(function(){return e.addOp($.endAnnotation,[]),j.appearance.reset(),e})})}},c.appendToOperatorList=function(a,b,c,d,e,f){function g(a){h.reject(a)}for(var h=G(),i=[],j=0,k=a.length;k>j;++j)("display"===f&&a[j].isViewable()||"print"===f&&a[j].isPrintable())&&i.push(a[j].getOperatorList(d,e));return Promise.all(i).then(function(a){b.addOp($.beginAnnotations,[]);for(var c=0,d=a.length;d>c;++c){var e=a[c];b.addOpList(e)}b.addOp($.endAnnotations,[]),h.resolve()},g),h.promise},c}(),Oa=function(){function a(){this.width=1,this.style=X.SOLID,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}return a.prototype={setWidth:function(a){a===(0|a)&&(this.width=a)},setStyle:function(a){if(a)switch(a.name){case"S":this.style=X.SOLID;break;case"D":this.style=X.DASHED;break;case"B":this.style=X.BEVELED;break;case"I":this.style=X.INSET;break;case"U":this.style=X.UNDERLINE}},setDashArray:function(a){if(C(a)&&a.length>0){for(var b=!0,c=!0,d=0,e=a.length;e>d;d++){var f=a[d],g=+f>=0;if(!g){b=!1;break}f>0&&(c=!1)}b&&!c?this.dashArray=a:this.width=0}else a&&(this.width=0)},setHorizontalCornerRadius:function(a){a===(0|a)&&(this.horizontalCornerRadius=a)},setVerticalCornerRadius:function(a){a===(0|a)&&(this.verticalCornerRadius=a)}},a}(),Pa=function(){function a(a){Na.call(this,a);var b=a.dict,c=this.data;c.fieldValue=r(na.getInheritableProperty(b,"V")||""),c.alternativeText=r(b.get("TU")||""),c.defaultAppearance=na.getInheritableProperty(b,"DA")||"";var d=na.getInheritableProperty(b,"FT");c.fieldType=z(d)?d.name:"",c.fieldFlags=na.getInheritableProperty(b,"Ff")||0,this.fieldResources=na.getInheritableProperty(b,"DR")||Aa.empty;for(var e=[],f=b,g=a.ref;f;){var h=f.get("Parent"),i=f.getRaw("Parent"),j=f.get("T");if(j)e.unshift(r(j));else if(h&&g){var k,l,m=h.get("Kids");for(k=0,l=m.length;l>k;k++){var n=m[k];if(n.num===g.num&&n.gen===g.gen)break}e.unshift("`"+k)}f=h,g=i}c.fullName=e.join(".")}var c=Na.prototype;return na.inherit(a,Na,{isViewable:function(){return"Sig"===this.data.fieldType?(b("unimplemented annotation type: Widget signature"),!1):c.isViewable.call(this)}}),a}(),Qa=function(){function a(a){Pa.call(this,a),this.data.textAlignment=na.getInheritableProperty(a.dict,"Q"),this.data.annotationType=W.WIDGET,this.data.hasHtml=!this.data.hasAppearance&&!!this.data.fieldValue}return na.inherit(a,Pa,{getOperatorList:function(a,b){if(this.appearance)return Na.prototype.getOperatorList.call(this,a,b);var c=new xb,d=this.data;if(!d.defaultAppearance)return Promise.resolve(c);var e=new Mc(j(d.defaultAppearance));return a.getOperatorList(e,b,this.fieldResources,c).then(function(){return c})}}),a}(),Ra=function(){function a(a){Na.call(this,a);var b=a.dict,c=this.data,d=b.get("Contents"),e=b.get("T");c.annotationType=W.TEXT,c.content=r(d||""),c.title=r(e||""),c.hasHtml=!0,c.hasAppearance?c.name="NoIcon":(c.rect[1]=c.rect[3]-Ma,c.rect[2]=c.rect[0]+Ma,c.name=b.has("Name")?b.get("Name").name:"Note"),b.has("C")&&(c.hasBgColor=!0)}return na.inherit(a,Na,{}),a}(),Sa=function(){function a(a){Na.call(this,a);var d=a.dict,e=this.data;e.annotationType=W.LINK,e.hasHtml=!0;var g=d.get("A");if(g&&B(g)){var h=g.get("S").name;if("URI"===h){var i=g.get("URI");z(i)?i="/"+i.name:i&&(i=c(i)),f(i,!1)||(i="");try{e.url=s(i)}catch(j){e.url=i}}else if("GoTo"===h)e.dest=g.get("D");else if("GoToR"===h){var k=g.get("F");B(k)&&(i=k.get("F")||""),f(i,!1)||(i=""),e.url=i,e.dest=g.get("D")}else"Named"===h?e.action=g.get("N").name:b("unrecognized link type: "+h)}else if(d.has("Dest")){var l=d.get("Dest");e.dest=z(l)?l.name:l}}function c(a){return a&&0===a.indexOf("www.")?"http://"+a:a}return na.inherit(a,Na,{}),a}(),Ta=function(){var b=0,d=2,e=3,f=4;return{getSampleArray:function(a,b,c,d){var e,f,g=1;for(e=0,f=a.length;f>e;e++)g*=a[e];g*=b;var h=new Array(g),i=0,j=0,k=1/(Math.pow(2,c)-1),l=d.getBytes((g*c+7)/8),m=0;for(e=0;g>e;e++){for(;c>i;)j<<=8,j|=l[m++],i+=8;i-=c,h[e]=(j>>i)*k,j&=(1<d;d++){var f=a.fetchIfRef(b[d]);c.push(Ta.parse(a,f))}return function(a,b,d,e){for(var f=0,g=c.length;g>f;f++)c[f](a,b,d,e+f)}},constructSampled:function(d,e){function f(a){for(var b=a.length,c=[],d=0,e=0;b>e;e+=2)c[d]=[a[e],a[e+1]],++d;return c}var g=e.get("Domain"),h=e.get("Range");g&&h||c("No domain or range");var i=g.length/2,j=h.length/2;g=f(g),h=f(h);var k=e.get("Size"),l=e.get("BitsPerSample"),m=e.get("Order")||1;1!==m&&a("No support for cubic spline interpolation: "+m);var n=e.get("Encode");if(!n){n=[];for(var o=0;i>o;++o)n.push(0),n.push(k[o]-1)}n=f(n);var p=e.get("Decode");p=p?f(p):h;var q=this.getSampleArray(k,j,l,d);return[b,i,g,n,p,q,k,j,Math.pow(2,l)-1,h]},constructSampledFromIR:function(a){function b(a,b,c,d,e){return d+(a-b)*((e-d)/(c-b))}return function(c,d,e,f){var g,h,i=a[1],j=a[2],k=a[3],l=a[4],m=a[5],n=a[6],o=a[7],p=a[9],q=1<h;h++)r[h]=1;var t=o,u=1;for(g=0;i>g;++g){var v=j[g][0],w=j[g][1],x=Math.min(Math.max(c[d+g],v),w),y=b(x,v,w,k[g][0],k[g][1]),z=n[g];y=Math.min(Math.max(y,0),z-1);var A=z-1>y?Math.floor(y):y-1,B=A+1-y,C=y-A,D=A*t,E=D+t;for(h=0;q>h;h++)h&u?(r[h]*=C,s[h]+=E):(r[h]*=B,s[h]+=D);t*=z,u<<=1}for(h=0;o>h;++h){var F=0;for(g=0;q>g;g++)F+=m[s[g]+h]*r[g];F=b(F,0,1,l[h][0],l[h][1]),e[f+h]=Math.min(Math.max(F,p[h][0]),p[h][1])}}},constructInterpolated:function(a,b){var e=b.get("C0")||[0],f=b.get("C1")||[1],g=b.get("N");C(e)&&C(f)||c("Illegal dictionary for interpolated function");for(var h=e.length,i=[],j=0;h>j;++j)i.push(f[j]-e[j]);return[d,e,i,g]},constructInterpolatedFromIR:function(a){var b=a[1],c=a[2],d=a[3],e=c.length;return function(a,f,g,h){for(var i=1===d?a[f]:Math.pow(a[f],d),j=0;e>j;++j)g[h+j]=b[j]+i*c[j]}},constructStiched:function(a,b,d){var f=b.get("Domain");f||c("No domain");var g=f.length/2;1!==g&&c("Bad domain for stiched function");for(var h=b.get("Functions"),i=[],j=0,k=h.length;k>j;++j)i.push(Ta.getIR(d,d.fetchIfRef(h[j])));var l=b.get("Bounds"),m=b.get("Encode");return[e,f,l,m,i]},constructStichedFromIR:function(a){for(var b=a[1],c=a[2],d=a[3],e=a[4],f=[],g=new Float32Array(1),h=0,i=e.length;i>h;h++)f.push(Ta.fromIR(e[h]));return function(a,e,h,i){for(var j=function(a,b,c){return a>c?a=c:b>a&&(a=b),a},k=j(a[e],b[0],b[1]),l=0,m=c.length;m>l&&!(k0&&(n=c[l-1]);var o=b[1];l>1,h=c.length>>1,i=new Va(e),j={},k=8192,l=k,m=new Float32Array(h);return function(a,b,c,e){var f,k,n="",o=m;for(f=0;h>f;f++)k=a[b+f],o[f]=k,n+=k+"_";var p=j[n];if(void 0!==p)return void c.set(p,e);var q=new Float32Array(g),r=i.execute(o),s=r.length-g;for(f=0;g>f;f++){k=r[s+f];var t=d[2*f];t>k?k=t:(t=d[2*f+1],k>t&&(k=t)),q[f]=k}l>0&&(l--,j[n]=q),c.set(q,e)}}}}(),Ua=function(){function a(a){this.stack=a?Array.prototype.slice.call(a,0):[]}var b=100;return a.prototype={push:function(a){this.stack.length>=b&&c("PostScript function stack overflow."),this.stack.push(a)},pop:function(){return this.stack.length<=0&&c("PostScript function stack underflow."),this.stack.pop()},copy:function(a){this.stack.length+a>=b&&c("PostScript function stack overflow.");for(var d=this.stack,e=d.length-a,f=a-1;f>=0;f--,e++)d.push(d[e])},index:function(a){ -this.push(this.stack[this.stack.length-a-1])},roll:function(a,b){var c,d,e,f=this.stack,g=f.length-a,h=f.length-1,i=g+(b-Math.floor(b/a)*a);for(c=g,d=h;d>c;c++,d--)e=f[c],f[c]=f[d],f[d]=e;for(c=g,d=i-1;d>c;c++,d--)e=f[c],f[c]=f[d],f[d]=e;for(c=i,d=h;d>c;c++,d--)e=f[c],f[c]=f[d],f[d]=e}},a}(),Va=function(){function a(a){this.operators=a}return a.prototype={execute:function(a){for(var b,d,e,f=new Ua(a),g=0,h=this.operators,i=h.length;i>g;)if(b=h[g++],"number"!=typeof b)switch(b){case"jz":e=f.pop(),d=f.pop(),d||(g=e);break;case"j":d=f.pop(),g=d;break;case"abs":d=f.pop(),f.push(Math.abs(d));break;case"add":e=f.pop(),d=f.pop(),f.push(d+e);break;case"and":e=f.pop(),d=f.pop(),v(d)&&v(e)?f.push(d&&e):f.push(d&e);break;case"atan":d=f.pop(),f.push(Math.atan(d));break;case"bitshift":e=f.pop(),d=f.pop(),d>0?f.push(d<>e);break;case"ceiling":d=f.pop(),f.push(Math.ceil(d));break;case"copy":d=f.pop(),f.copy(d);break;case"cos":d=f.pop(),f.push(Math.cos(d));break;case"cvi":d=0|f.pop(),f.push(d);break;case"cvr":break;case"div":e=f.pop(),d=f.pop(),f.push(d/e);break;case"dup":f.copy(1);break;case"eq":e=f.pop(),d=f.pop(),f.push(d===e);break;case"exch":f.roll(2,1);break;case"exp":e=f.pop(),d=f.pop(),f.push(Math.pow(d,e));break;case"false":f.push(!1);break;case"floor":d=f.pop(),f.push(Math.floor(d));break;case"ge":e=f.pop(),d=f.pop(),f.push(d>=e);break;case"gt":e=f.pop(),d=f.pop(),f.push(d>e);break;case"idiv":e=f.pop(),d=f.pop(),f.push(d/e|0);break;case"index":d=f.pop(),f.index(d);break;case"le":e=f.pop(),d=f.pop(),f.push(e>=d);break;case"ln":d=f.pop(),f.push(Math.log(d));break;case"log":d=f.pop(),f.push(Math.log(d)/Math.LN10);break;case"lt":e=f.pop(),d=f.pop(),f.push(e>d);break;case"mod":e=f.pop(),d=f.pop(),f.push(d%e);break;case"mul":e=f.pop(),d=f.pop(),f.push(d*e);break;case"ne":e=f.pop(),d=f.pop(),f.push(d!==e);break;case"neg":d=f.pop(),f.push(-d);break;case"not":d=f.pop(),v(d)?f.push(!d):f.push(~d);break;case"or":e=f.pop(),d=f.pop(),v(d)&&v(e)?f.push(d||e):f.push(d|e);break;case"pop":f.pop();break;case"roll":e=f.pop(),d=f.pop(),f.roll(d,e);break;case"round":d=f.pop(),f.push(Math.round(d));break;case"sin":d=f.pop(),f.push(Math.sin(d));break;case"sqrt":d=f.pop(),f.push(Math.sqrt(d));break;case"sub":e=f.pop(),d=f.pop(),f.push(d-e);break;case"true":f.push(!0);break;case"truncate":d=f.pop(),d=0>d?Math.ceil(d):Math.floor(d),f.push(d);break;case"xor":e=f.pop(),d=f.pop(),v(d)&&v(e)?f.push(d!==e):f.push(d^e);break;default:c("Unknown operator "+b)}else f.push(b);return f.stack}},a}(),Wa=function(){function a(a){this.type=a}function b(b,c,d){a.call(this,"args"),this.index=b,this.min=c,this.max=d}function c(b){a.call(this,"literal"),this.number=b,this.min=b,this.max=b}function d(b,c,d,e,f){a.call(this,"binary"),this.op=b,this.arg1=c,this.arg2=d,this.min=e,this.max=f}function e(b,c){a.call(this,"max"),this.arg=b,this.min=b.min,this.max=c}function f(b,c,d){a.call(this,"var"),this.index=b,this.min=c,this.max=d}function g(b,c){a.call(this,"definition"),this.variable=b,this.arg=c}function h(){this.parts=[]}function i(a,b){return"literal"===b.type&&0===b.number?a:"literal"===a.type&&0===a.number?b:"literal"===b.type&&"literal"===a.type?new c(a.number+b.number):new d("+",a,b,a.min+b.min,a.max+b.max)}function j(a,b){if("literal"===b.type){if(0===b.number)return new c(0);if(1===b.number)return a;if("literal"===a.type)return new c(a.number*b.number)}if("literal"===a.type){if(0===a.number)return new c(0);if(1===a.number)return b}var e=Math.min(a.min*b.min,a.min*b.max,a.max*b.min,a.max*b.max),f=Math.max(a.min*b.min,a.min*b.max,a.max*b.min,a.max*b.max);return new d("*",a,b,e,f)}function k(a,b){if("literal"===b.type){if(0===b.number)return a;if("literal"===a.type)return new c(a.number-b.number)}return"binary"===b.type&&"-"===b.op&&"literal"===a.type&&1===a.number&&"literal"===b.arg1.type&&1===b.arg1.number?b.arg2:new d("-",a,b,a.min-b.max,a.max-b.min)}function l(a,b){return a.min>=b?new c(b):a.max<=b?a:new e(a,b)}function m(){}return a.prototype.visit=function(a){throw new Error("abstract method")},b.prototype=Object.create(a.prototype),b.prototype.visit=function(a){a.visitArgument(this)},c.prototype=Object.create(a.prototype),c.prototype.visit=function(a){a.visitLiteral(this)},d.prototype=Object.create(a.prototype),d.prototype.visit=function(a){a.visitBinaryOperation(this)},e.prototype=Object.create(a.prototype),e.prototype.visit=function(a){a.visitMin(this)},f.prototype=Object.create(a.prototype),f.prototype.visit=function(a){a.visitVariable(this)},g.prototype=Object.create(a.prototype),g.prototype.visit=function(a){a.visitVariableDefinition(this)},h.prototype={visitArgument:function(a){this.parts.push("Math.max(",a.min,", Math.min(",a.max,", src[srcOffset + ",a.index,"]))")},visitVariable:function(a){this.parts.push("v",a.index)},visitLiteral:function(a){this.parts.push(a.number)},visitBinaryOperation:function(a){this.parts.push("("),a.arg1.visit(this),this.parts.push(" ",a.op," "),a.arg2.visit(this),this.parts.push(")")},visitVariableDefinition:function(a){this.parts.push("var "),a.variable.visit(this),this.parts.push(" = "),a.arg.visit(this),this.parts.push(";")},visitMin:function(a){this.parts.push("Math.min("),a.arg.visit(this),this.parts.push(", ",a.max,")")},toString:function(){return this.parts.join("")}},m.prototype={compile:function(a,d,e){var m,n,o,p,q,r,s,t,u,v,w=[],x=[],y=d.length>>1,z=e.length>>1,A=0;for(m=0;y>m;m++)w.push(new b(m,d[2*m],d[2*m+1]));for(m=0,n=a.length;n>m;m++)if(v=a[m],"number"!=typeof v)switch(v){case"add":if(w.length<2)return null;r=w.pop(),q=w.pop(),w.push(i(q,r));break;case"cvr":if(w.length<1)return null;break;case"mul":if(w.length<2)return null;r=w.pop(),q=w.pop(),w.push(j(q,r));break;case"sub":if(w.length<2)return null;r=w.pop(),q=w.pop(),w.push(k(q,r));break;case"exch":if(w.length<2)return null;s=w.pop(),t=w.pop(),w.push(s,t);break;case"pop":if(w.length<1)return null;w.pop();break;case"index":if(w.length<1)return null;if(q=w.pop(),"literal"!==q.type)return null;if(o=q.number,0>o||(0|o)!==o||w.length=o||(0|o)!==o||(0|p)!==p||w.lengtha.min&&(g.unshift("Math.max(",d,", "),g.push(")")),fn&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){var p,q=8>=g?new Uint8Array(n):new Uint16Array(n);for(j=0;n>j;j++)q[j]=j;var r=new Uint8Array(3*n);this.getRgbBuffer(q,0,n,r,0,g,0);var s,t;if(o)for(m=new Uint8Array(3*l),t=0,j=0;l>j;++j)p=3*h[j],m[t++]=r[p],m[t++]=r[p+1],m[t++]=r[p+2];else for(s=0,j=0;l>j;++j)p=3*h[j],a[s++]=r[p],a[s++]=r[p+1],a[s++]=r[p+2],s+=i}else o?(m=new Uint8Array(3*l),this.getRgbBuffer(h,0,l,m,0,g,0)):this.getRgbBuffer(h,0,d*f,a,0,g,i);if(m)if(o)Bc.resize(m,g,3,b,c,d,e,a,i);else for(t=0,s=0,j=0,k=d*f;k>j;j++)a[s++]=m[t++],a[s++]=m[t++],a[s++]=m[t++],s+=i},usesZeroToOneRange:!0},a.parse=function(b,c,d){var e=a.parseToIR(b,c,d);return e instanceof Ya?e:a.fromIR(e)},a.fromIR=function(b){var d,e,f,g=C(b)?b[0]:b;switch(g){case"DeviceGrayCS":return this.singletons.gray;case"DeviceRgbCS":return this.singletons.rgb;case"DeviceCmykCS":return this.singletons.cmyk;case"CalGrayCS":return d=b[1].WhitePoint,e=b[1].BlackPoint,f=b[1].Gamma,new cb(d,e,f);case"CalRGBCS":d=b[1].WhitePoint,e=b[1].BlackPoint,f=b[1].Gamma;var h=b[1].Matrix;return new db(d,e,f,h);case"PatternCS":var i=b[1];return i&&(i=a.fromIR(i)),new Za(i);case"IndexedCS":var j=b[1],k=b[2],l=b[3];return new $a(a.fromIR(j),k,l);case"AlternateCS":var m=b[1],n=b[2],o=b[3];return new Ya(m,a.fromIR(n),Ta.fromIR(o));case"LabCS":d=b[1].WhitePoint,e=b[1].BlackPoint;var p=b[1].Range;return new eb(d,e,p);default:c("Unknown name "+g)}return null},a.parseToIR=function(d,e,f){if(z(d)){var g=f.get("ColorSpace");if(B(g)){var h=g.get(d.name);h&&(d=h)}}d=e.fetchIfRef(d);var i;if(z(d))switch(i=d.name,this.mode=i,i){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"Pattern":return["PatternCS",null];default:c("unrecognized colorspace "+i)}else if(C(d)){i=e.fetchIfRef(d[0]).name,this.mode=i;var j,k,l;switch(i){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"CalGray":return k=e.fetchIfRef(d[1]).getAll(),["CalGrayCS",k];case"CalRGB":return k=e.fetchIfRef(d[1]).getAll(),["CalRGBCS",k];case"ICCBased":var m=e.fetchIfRef(d[1]),n=m.dict;if(j=n.get("N"),l=n.get("Alternate")){var o=a.parseToIR(l,e,f),p=a.fromIR(o);if(p.numComps===j)return o;b("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===j)return"DeviceGrayCS";if(3===j)return"DeviceRgbCS";if(4===j)return"DeviceCmykCS";break;case"Pattern":var q=d[1]||null;return q&&(q=a.parseToIR(q,e,f)),["PatternCS",q];case"Indexed":case"I":var r=a.parseToIR(d[1],e,f),s=e.fetchIfRef(d[2])+1,t=e.fetchIfRef(d[3]);return D(t)&&(t=t.getBytes()),["IndexedCS",r,s,t];case"Separation":case"DeviceN":var u=e.fetchIfRef(d[1]);j=1,z(u)?j=1:C(u)&&(j=u.length),l=a.parseToIR(d[2],e,f);var v=Ta.getIR(e,e.fetchIfRef(d[3]));return["AlternateCS",j,l,v];case"Lab":return k=e.fetchIfRef(d[1]).getAll(),["LabCS",k];default:c('unimplemented color space object "'+i+'"')}}else c('unrecognized color space object: "'+d+'"');return null},a.isDefaultDecode=function(a,c){if(!C(a))return!0;if(2*c!==a.length)return b("The decode map is not the correct length"),!0;for(var d=0,e=a.length;e>d;d+=2)if(0!==a[d]||1!==a[d+1])return!1;return!0},a.singletons={get gray(){return g(this,"gray",new _a)},get rgb(){return g(this,"rgb",new ab)},get cmyk(){return g(this,"cmyk",new bb)}},a}(),Ya=function(){function a(a,b,c){this.name="Alternate",this.numComps=a,this.defaultColor=new Float32Array(a);for(var d=0;a>d;++d)this.defaultColor[d]=1;this.base=b,this.tintFn=c,this.tmpBuf=new Float32Array(b.numComps)}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=this.tmpBuf;this.tintFn(a,b,e,0),this.base.getRgbItem(e,0,c,d)},getRgbBuffer:function(a,b,c,d,e,f,g){var h,i,j=this.tintFn,k=this.base,l=1/((1<h;h++){for(i=0;r>i;i++)s[i]=a[b++]*l;for(j(s,0,t,0),i=0;m>i;i++)q[p++]=255*t[i]}else for(h=0;c>h;h++){for(i=0;r>i;i++)s[i]=a[b++]*l;j(s,0,t,0),k.getRgbItem(t,0,q,p),p+=m}o||k.getRgbBuffer(q,0,c,d,e,8,g)},getOutputLength:function(a,b){return this.base.getOutputLength(a*this.base.numComps/this.numComps,b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},a}(),Za=function(){function a(a){this.name="Pattern",this.base=a}return a.prototype={},a}(),$a=function(){function a(a,b,d){this.name="Indexed",this.numComps=1,this.defaultColor=new Uint8Array([0]),this.base=a,this.highVal=b;var e,f=a.numComps,g=f*b;if(D(d)){e=new Uint8Array(g);var h=d.getBytes(g);e.set(h)}else if(y(d)){e=new Uint8Array(g);for(var i=0;g>i;++i)e[i]=d.charCodeAt(i)}else d instanceof Uint8Array||d instanceof Array?e=d:c("Unrecognized lookup table: "+d);this.lookup=e}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=this.base.numComps,f=a[b]*e;this.base.getRgbItem(this.lookup,f,c,d)},getRgbBuffer:function(a,b,c,d,e,f,g){for(var h=this.base,i=h.numComps,j=h.getOutputLength(i,g),k=this.lookup,l=0;c>l;++l){var m=a[b++]*i;h.getRgbBuffer(k,m,1,d,e,8,g),e+=j}},getOutputLength:function(a,b){return this.base.getOutputLength(a*this.base.numComps,b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return!0},usesZeroToOneRange:!0},a}(),_a=function(){function a(){this.name="DeviceGray",this.numComps=1,this.defaultColor=new Float32Array([0])}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=255*a[b]|0;e=0>e?0:e>255?255:e,c[d]=c[d+1]=c[d+2]=e},getRgbBuffer:function(a,b,c,d,e,f,g){for(var h=255/((1<k;++k){var l=h*a[i++]|0;d[j++]=l,d[j++]=l,d[j++]=l,j+=g}},getOutputLength:function(a,b){return a*(3+b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},a}(),ab=function(){function a(){this.name="DeviceRGB",this.numComps=3,this.defaultColor=new Float32Array([0,0,0])}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=255*a[b]|0,f=255*a[b+1]|0,g=255*a[b+2]|0;c[d]=0>e?0:e>255?255:e,c[d+1]=0>f?0:f>255?255:f,c[d+2]=0>g?0:g>255?255:g},getRgbBuffer:function(a,b,c,d,e,f,g){if(8===f&&0===g)return void d.set(a.subarray(b,b+3*c),e);for(var h=255/((1<k;++k)d[j++]=h*a[i++]|0,d[j++]=h*a[i++]|0,d[j++]=h*a[i++]|0,j+=g},getOutputLength:function(a,b){return a*(3+b)/3|0},isPassthrough:function(a){return 8===a},fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},a}(),bb=function(){function a(a,b,c,d,e){var f=a[b+0]*c,g=a[b+1]*c,h=a[b+2]*c,i=a[b+3]*c,j=f*(-4.387332384609988*f+54.48615194189176*g+18.82290502165302*h+212.25662451639585*i+-285.2331026137004)+g*(1.7149763477362134*g-5.6096736904047315*h+-17.873870861415444*i-5.497006427196366)+h*(-2.5217340131683033*h-21.248923337353073*i+17.5119270841813)+i*(-21.86122147463605*i-189.48180835922747)+255|0,k=f*(8.841041422036149*f+60.118027045597366*g+6.871425592049007*h+31.159100130055922*i+-79.2970844816548)+g*(-15.310361306967817*g+17.575251261109482*h+131.35250912493976*i-190.9453302588951)+h*(4.444339102852739*h+9.8632861493405*i-24.86741582555878)+i*(-20.737325471181034*i-187.80453709719578)+255|0,l=f*(.8842522430003296*f+8.078677503112928*g+30.89978309703729*h-.23883238689178934*i+-14.183576799673286)+g*(10.49593273432072*g+63.02378494754052*h+50.606957656360734*i-112.23884253719248)+h*(.03296041114873217*h+115.60384449646641*i+-193.58209356861505)+i*(-22.33816807309886*i-180.12613974708367)+255|0;d[e]=j>255?255:0>j?0:j,d[e+1]=k>255?255:0>k?0:k,d[e+2]=l>255?255:0>l?0:l}function b(){this.name="DeviceCMYK",this.numComps=4,this.defaultColor=new Float32Array([0,0,0,1])}return b.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(b,c,d,e){a(b,c,1,d,e)},getRgbBuffer:function(b,c,d,e,f,g,h){for(var i=1/((1<j;j++)a(b,c,i,e,f),c+=4,f+=3+h},getOutputLength:function(a,b){return a/4*(3+b)|0},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},b}(),cb=function(){function d(d,e,f){this.name="CalGray",this.numComps=1,this.defaultColor=new Float32Array([0]),d||c("WhitePoint missing - required for color space CalGray"),e=e||[0,0,0],f=f||1,this.XW=d[0],this.YW=d[1],this.ZW=d[2],this.XB=e[0],this.YB=e[1],this.ZB=e[2],this.G=f,(this.XW<0||this.ZW<0||1!==this.YW)&&c("Invalid WhitePoint components for "+this.name+", no fallback available"),(this.XB<0||this.YB<0||this.ZB<0)&&(a("Invalid BlackPoint for "+this.name+", falling back to default"),this.XB=this.YB=this.ZB=0),(0!==this.XB||0!==this.YB||0!==this.ZB)&&b(this.name+", BlackPoint: XB: "+this.XB+", YB: "+this.YB+", ZB: "+this.ZB+", only default values are supported."),this.G<1&&(a("Invalid Gamma: "+this.G+" for "+this.name+", falling back to default"),this.G=1)}function e(a,b,c,d,e,f){var g=b[c]*f,h=Math.pow(g,a.G),i=a.YW*h,j=0|Math.max(295.8*Math.pow(i,.3333333333333333)-40.8,0);d[e]=j,d[e+1]=j,d[e+2]=j}return d.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){e(this,a,b,c,d,1)},getRgbBuffer:function(a,b,c,d,f,g,h){for(var i=1/((1<j;++j)e(this,a,b,d,f,i),b+=1,f+=3+h},getOutputLength:function(a,b){return a*(3+b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},d}(),db=function(){function b(b,d,e,f){this.name="CalRGB",this.numComps=3,this.defaultColor=new Float32Array(3),b||c("WhitePoint missing - required for color space CalRGB"),d=d||new Float32Array(3),e=e||new Float32Array([1,1,1]),f=f||new Float32Array([1,0,0,0,1,0,0,0,1]);var g=b[0],h=b[1],i=b[2];this.whitePoint=b;var j=d[0],k=d[1],l=d[2];this.blackPoint=d,this.GR=e[0],this.GG=e[1],this.GB=e[2],this.MXA=f[0],this.MYA=f[1],this.MZA=f[2],this.MXB=f[3],this.MYB=f[4],this.MZB=f[5],this.MXC=f[6],this.MYC=f[7],this.MZC=f[8],(0>g||0>i||1!==h)&&c("Invalid WhitePoint components for "+this.name+", no fallback available"),(0>j||0>k||0>l)&&(a("Invalid BlackPoint for "+this.name+" ["+j+", "+k+", "+l+"], falling back to default"),this.blackPoint=new Float32Array(3)),(this.GR<0||this.GG<0||this.GB<0)&&(a("Invalid Gamma ["+this.GR+", "+this.GG+", "+this.GB+"] for "+this.name+", falling back to default"),this.GR=this.GG=this.GB=1),(this.MXA<0||this.MYA<0||this.MZA<0||this.MXB<0||this.MYB<0||this.MZB<0||this.MXC<0||this.MYC<0||this.MZC<0)&&(a("Invalid Matrix for "+this.name+" ["+this.MXA+", "+this.MYA+", "+this.MZA+this.MXB+", "+this.MYB+", "+this.MZB+this.MXC+", "+this.MYC+", "+this.MZC+"], falling back to default"),this.MXA=this.MYB=this.MZC=1,this.MXB=this.MYA=this.MZA=this.MXC=this.MYC=this.MZB=0)}function d(a,b,c){c[0]=a[0]*b[0]+a[1]*b[1]+a[2]*b[2],c[1]=a[3]*b[0]+a[4]*b[1]+a[5]*b[2],c[2]=a[6]*b[0]+a[7]*b[1]+a[8]*b[2]}function e(a,b,c){c[0]=1*b[0]/a[0],c[1]=1*b[1]/a[1],c[2]=1*b[2]/a[2]}function f(a,b,c){var d=.95047,e=1,f=1.08883;c[0]=b[0]*d/a[0],c[1]=b[1]*e/a[1],c[2]=b[2]*f/a[2]}function g(a){return.0031308>=a?h(0,1,12.92*a):h(0,1,1.055*Math.pow(a,1/2.4)-.055)}function h(a,b,c){return Math.max(a,Math.min(b,c))}function i(a){return 0>a?-i(-a):a>8?Math.pow((a+16)/116,3):a*u}function j(a,b,c){if(0===a[0]&&0===a[1]&&0===a[2])return c[0]=b[0],c[1]=b[1],void(c[2]=b[2]);var d=i(0),e=d,f=i(a[0]),g=d,h=i(a[1]),j=d,k=i(a[2]),l=(1-e)/(1-f),m=1-l,n=(1-g)/(1-h),o=1-n,p=(1-j)/(1-k),q=1-p;c[0]=b[0]*l+m,c[1]=b[1]*n+o,c[2]=b[2]*p+q}function k(a,b,c){if(1===a[0]&&1===a[2])return c[0]=b[0],c[1]=b[1],void(c[2]=b[2]);var f=c;d(n,b,f);var g=r;e(a,f,g),d(o,g,c)}function l(a,b,c){var e=c;d(n,b,e);var g=r;f(a,e,g),d(o,g,c)}function m(a,b,c,e,f,i){var m=h(0,1,b[c]*i),n=h(0,1,b[c+1]*i),o=h(0,1,b[c+2]*i),r=Math.pow(m,a.GR),u=Math.pow(n,a.GG),v=Math.pow(o,a.GB),w=a.MXA*r+a.MXB*u+a.MXC*v,x=a.MYA*r+a.MYB*u+a.MYC*v,y=a.MZA*r+a.MZB*u+a.MZC*v,z=s;z[0]=w,z[1]=x,z[2]=y;var A=t;k(a.whitePoint,z,A);var B=s;j(a.blackPoint,A,B);var C=t;l(q,B,C);var D=s;d(p,C,D);var E=g(D[0]),F=g(D[1]),G=g(D[2]);e[f]=Math.round(255*E),e[f+1]=Math.round(255*F),e[f+2]=Math.round(255*G)}var n=new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]),o=new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867]),p=new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252]),q=new Float32Array([1,1,1]),r=new Float32Array(3),s=new Float32Array(3),t=new Float32Array(3),u=Math.pow(24/116,3)/8;return b.prototype={getRgb:function(a,b){var c=new Uint8Array(3);return this.getRgbItem(a,b,c,0),c},getRgbItem:function(a,b,c,d){m(this,a,b,c,d,1)},getRgbBuffer:function(a,b,c,d,e,f,g){for(var h=1/((1<i;++i)m(this,a,b,d,e,h),b+=3,e+=3+g},getOutputLength:function(a,b){return a*(3+b)/3|0},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},b}(),eb=function(){function b(b,d,e){this.name="Lab",this.numComps=3,this.defaultColor=new Float32Array([0,0,0]),b||c("WhitePoint missing - required for color space Lab"),d=d||[0,0,0],e=e||[-100,100,-100,100],this.XW=b[0],this.YW=b[1],this.ZW=b[2],this.amin=e[0],this.amax=e[1],this.bmin=e[2],this.bmax=e[3],this.XB=d[0],this.YB=d[1],this.ZB=d[2],(this.XW<0||this.ZW<0||1!==this.YW)&&c("Invalid WhitePoint components, no fallback available"),(this.XB<0||this.YB<0||this.ZB<0)&&(a("Invalid BlackPoint, falling back to default"),this.XB=this.YB=this.ZB=0),(this.amin>this.amax||this.bmin>this.bmax)&&(a("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}function d(a){return a>=6/29?a*a*a:108/841*(a-4/29)}function e(a,b,c,d){return c+a*(d-c)/b}function f(a,b,c,f,g,h){var i=b[c],j=b[c+1],k=b[c+2];f!==!1&&(i=e(i,f,0,100),j=e(j,f,a.amin,a.amax),k=e(k,f,a.bmin,a.bmax)),j=j>a.amax?a.amax:ja.bmax?a.bmax:k=l?0:l>=1?255:255*Math.sqrt(l)|0,g[h+1]=0>=m?0:m>=1?255:255*Math.sqrt(m)|0,g[h+2]=0>=n?0:n>=1?255:255*Math.sqrt(n)|0}return b.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){f(this,a,b,!1,c,d)},getRgbBuffer:function(a,b,c,d,e,g,h){for(var i=(1<j;j++)f(this,a,b,i,d,e),b+=3,e+=3+h},getOutputLength:function(a,b){return a*(3+b)/3|0},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return!0},usesZeroToOneRange:!1},b}(),fb=function(){function a(a){this.a=0,this.b=0;var b,c,d=new Uint8Array(256),e=0,f=a.length;for(b=0;256>b;++b)d[b]=b;for(b=0;256>b;++b)c=d[b],e=e+c+a[b%f]&255,d[b]=d[e],d[e]=c;this.s=d}return a.prototype={encryptBlock:function(a){var b,c,d,e=a.length,f=this.a,g=this.b,h=this.s,i=new Uint8Array(e);for(b=0;e>b;++b)f=f+1&255,c=h[f],g=g+c&255,d=h[g],h[f]=d,h[g]=c,i[b]=a[b]^h[c+d&255];return this.a=f,this.b=g,i}},a.prototype.decryptBlock=a.prototype.encryptBlock,a}(),gb=function(){function a(a,d,e){var f,g,h,i=1732584193,j=-271733879,k=-1732584194,l=271733878,m=e+72&-64,n=new Uint8Array(m);for(f=0;e>f;++f)n[f]=a[d++];for(n[f++]=128,h=m-8;h>f;)n[f++]=0;n[f++]=e<<3&255,n[f++]=e>>5&255,n[f++]=e>>13&255,n[f++]=e>>21&255,n[f++]=e>>>29&255,n[f++]=0,n[f++]=0,n[f++]=0;var o=new Int32Array(16);for(f=0;m>f;){for(g=0;16>g;++g,f+=4)o[g]=n[f]|n[f+1]<<8|n[f+2]<<16|n[f+3]<<24;var p,q,r=i,s=j,t=k,u=l;for(g=0;64>g;++g){16>g?(p=s&t|~s&u,q=g):32>g?(p=u&s|~u&t,q=5*g+1&15):48>g?(p=s^t^u,q=3*g+5&15):(p=t^(s|~u),q=7*g&15);var v=u,w=r+p+c[g]+o[q]|0,x=b[g];u=t,t=s,s=s+(w<>>32-x)|0,r=v}i=i+r|0,j=j+s|0,k=k+t|0,l=l+u|0}return new Uint8Array([255&i,i>>8&255,i>>16&255,i>>>24&255,255&j,j>>8&255,j>>16&255,j>>>24&255,255&k,k>>8&255,k>>16&255,k>>>24&255,255&l,l>>8&255,l>>16&255,l>>>24&255])}var b=new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]),c=new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]);return a}(),hb=function(){function a(a,b){this.high=0|a,this.low=0|b}return a.prototype={and:function(a){this.high&=a.high,this.low&=a.low},xor:function(a){this.high^=a.high,this.low^=a.low},or:function(a){this.high|=a.high,this.low|=a.low},shiftRight:function(a){a>=32?(this.low=this.high>>>a-32|0,this.high=0):(this.low=this.low>>>a|this.high<<32-a,this.high=this.high>>>a|0)},shiftLeft:function(a){a>=32?(this.high=this.low<>>32-a,this.low=this.low<>>a|c<<32-a,this.high=c>>>a|b<<32-a},not:function(){this.high=~this.high,this.low=~this.low},add:function(a){var b=(this.low>>>0)+(a.low>>>0),c=(this.high>>>0)+(a.high>>>0);b>4294967295&&(c+=1),this.low=0|b,this.high=0|c},copyTo:function(a,b){a[b]=this.high>>>24&255,a[b+1]=this.high>>16&255,a[b+2]=this.high>>8&255,a[b+3]=255&this.high,a[b+4]=this.low>>>24&255,a[b+5]=this.low>>16&255,a[b+6]=this.low>>8&255,a[b+7]=255&this.low},assign:function(a){this.high=a.high,this.low=a.low}},a}(),ib=function(){function a(a,b){return a>>>b|a<<32-b}function b(a,b,c){return a&b^~a&c}function c(a,b,c){return a&b^a&c^b&c}function d(b){return a(b,2)^a(b,13)^a(b,22)}function e(b){return a(b,6)^a(b,11)^a(b,25)}function f(b){return a(b,7)^a(b,18)^b>>>3}function g(b){return a(b,17)^a(b,19)^b>>>10}function h(a,h,j){var k,l,m,n=1779033703,o=3144134277,p=1013904242,q=2773480762,r=1359893119,s=2600822924,t=528734635,u=1541459225,v=64*Math.ceil((j+9)/64),w=new Uint8Array(v);for(k=0;j>k;++k)w[k]=a[h++];for(w[k++]=128,m=v-8;m>k;)w[k++]=0;w[k++]=0,w[k++]=0,w[k++]=0,w[k++]=j>>>29&255,w[k++]=j>>21&255,w[k++]=j>>13&255,w[k++]=j>>5&255,w[k++]=j<<3&255;var x=new Uint32Array(64);for(k=0;v>k;){for(l=0;16>l;++l)x[l]=w[k]<<24|w[k+1]<<16|w[k+2]<<8|w[k+3],k+=4;for(l=16;64>l;++l)x[l]=g(x[l-2])+x[l-7]+f(x[l-15])+x[l-16]|0;var y,z,A=n,B=o,C=p,D=q,E=r,F=s,G=t,H=u;for(l=0;64>l;++l)y=H+e(E)+b(E,F,G)+i[l]+x[l],z=d(A)+c(A,B,C),H=G,G=F,F=E,E=D+y|0,D=C,C=B,B=A,A=y+z|0;n=n+A|0,o=o+B|0,p=p+C|0,q=q+D|0,r=r+E|0,s=s+F|0,t=t+G|0,u=u+H|0}return new Uint8Array([n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,p>>24&255,p>>16&255,p>>8&255,255&p,q>>24&255,q>>16&255,q>>8&255,255&q,r>>24&255,r>>16&255,r>>8&255,255&r,s>>24&255,s>>16&255,s>>8&255,255&s,t>>24&255,t>>16&255,t>>8&255,255&t,u>>24&255,u>>16&255,u>>8&255,255&u])}var i=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];return h}(),jb=function(){function a(a,b,c,d,e){a.assign(b),a.and(c),e.assign(b),e.not(),e.and(d),a.xor(e)}function b(a,b,c,d,e){a.assign(b),a.and(c),e.assign(b),e.and(d),a.xor(e),e.assign(c),e.and(d),a.xor(e)}function c(a,b,c){a.assign(b),a.rotateRight(28),c.assign(b),c.rotateRight(34),a.xor(c),c.assign(b),c.rotateRight(39),a.xor(c)}function d(a,b,c){a.assign(b),a.rotateRight(14),c.assign(b),c.rotateRight(18),a.xor(c),c.assign(b),c.rotateRight(41),a.xor(c)}function e(a,b,c){a.assign(b),a.rotateRight(1),c.assign(b),c.rotateRight(8),a.xor(c),c.assign(b),c.shiftRight(7),a.xor(c)}function f(a,b,c){a.assign(b),a.rotateRight(19),c.assign(b),c.rotateRight(61),a.xor(c),c.assign(b),c.shiftRight(6),a.xor(c)}function g(g,i,j,k){k=!!k;var l,m,n,o,p,q,r,s;k?(l=new hb(3418070365,3238371032),m=new hb(1654270250,914150663),n=new hb(2438529370,812702999),o=new hb(355462360,4144912697),p=new hb(1731405415,4290775857),q=new hb(2394180231,1750603025),r=new hb(3675008525,1694076839),s=new hb(1203062813,3204075428)):(l=new hb(1779033703,4089235720),m=new hb(3144134277,2227873595),n=new hb(1013904242,4271175723),o=new hb(2773480762,1595750129),p=new hb(1359893119,2917565137),q=new hb(2600822924,725511199),r=new hb(528734635,4215389547),s=new hb(1541459225,327033209));var t,u,v,w=128*Math.ceil((j+17)/128),x=new Uint8Array(w);for(t=0;j>t;++t)x[t]=g[i++];for(x[t++]=128,v=w-16;v>t;)x[t++]=0;x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=j>>>29&255,x[t++]=j>>21&255,x[t++]=j>>13&255,x[t++]=j>>5&255,x[t++]=j<<3&255;var y=new Array(80);for(t=0;80>t;t++)y[t]=new hb(0,0);var z,A=new hb(0,0),B=new hb(0,0),C=new hb(0,0),D=new hb(0,0),E=new hb(0,0),F=new hb(0,0),G=new hb(0,0),H=new hb(0,0),I=new hb(0,0),J=new hb(0,0),K=new hb(0,0),L=new hb(0,0);for(t=0;w>t;){for(u=0;16>u;++u)y[u].high=x[t]<<24|x[t+1]<<16|x[t+2]<<8|x[t+3],y[u].low=x[t+4]<<24|x[t+5]<<16|x[t+6]<<8|x[t+7],t+=8;for(u=16;80>u;++u)z=y[u],f(z,y[u-2],L),z.add(y[u-7]),e(K,y[u-15],L),z.add(K),z.add(y[u-16]);for(A.assign(l),B.assign(m),C.assign(n),D.assign(o),E.assign(p),F.assign(q),G.assign(r),H.assign(s),u=0;80>u;++u)I.assign(H),d(K,E,L),I.add(K),a(K,E,F,G,L),I.add(K),I.add(h[u]),I.add(y[u]),c(J,A,L),b(K,A,B,C,L),J.add(K),z=H,H=G,G=F,F=E,D.add(I),E=D,D=C,C=B,B=A,z.assign(I),z.add(J),A=z;l.add(A),m.add(B),n.add(C),o.add(D),p.add(E),q.add(F),r.add(G),s.add(H)}var M;return k?(M=new Uint8Array(48),l.copyTo(M,0),m.copyTo(M,8),n.copyTo(M,16),o.copyTo(M,24),p.copyTo(M,32),q.copyTo(M,40)):(M=new Uint8Array(64),l.copyTo(M,0),m.copyTo(M,8),n.copyTo(M,16),o.copyTo(M,24),p.copyTo(M,32),q.copyTo(M,40),r.copyTo(M,48),s.copyTo(M,56)),M}var h=[new hb(1116352408,3609767458),new hb(1899447441,602891725),new hb(3049323471,3964484399),new hb(3921009573,2173295548),new hb(961987163,4081628472),new hb(1508970993,3053834265),new hb(2453635748,2937671579),new hb(2870763221,3664609560),new hb(3624381080,2734883394),new hb(310598401,1164996542),new hb(607225278,1323610764),new hb(1426881987,3590304994),new hb(1925078388,4068182383),new hb(2162078206,991336113),new hb(2614888103,633803317),new hb(3248222580,3479774868),new hb(3835390401,2666613458),new hb(4022224774,944711139),new hb(264347078,2341262773),new hb(604807628,2007800933),new hb(770255983,1495990901),new hb(1249150122,1856431235),new hb(1555081692,3175218132),new hb(1996064986,2198950837),new hb(2554220882,3999719339),new hb(2821834349,766784016),new hb(2952996808,2566594879),new hb(3210313671,3203337956),new hb(3336571891,1034457026),new hb(3584528711,2466948901),new hb(113926993,3758326383),new hb(338241895,168717936),new hb(666307205,1188179964),new hb(773529912,1546045734),new hb(1294757372,1522805485),new hb(1396182291,2643833823),new hb(1695183700,2343527390),new hb(1986661051,1014477480),new hb(2177026350,1206759142),new hb(2456956037,344077627),new hb(2730485921,1290863460),new hb(2820302411,3158454273),new hb(3259730800,3505952657),new hb(3345764771,106217008),new hb(3516065817,3606008344),new hb(3600352804,1432725776),new hb(4094571909,1467031594),new hb(275423344,851169720),new hb(430227734,3100823752),new hb(506948616,1363258195),new hb(659060556,3750685593),new hb(883997877,3785050280),new hb(958139571,3318307427),new hb(1322822218,3812723403),new hb(1537002063,2003034995),new hb(1747873779,3602036899),new hb(1955562222,1575990012),new hb(2024104815,1125592928),new hb(2227730452,2716904306),new hb(2361852424,442776044),new hb(2428436474,593698344),new hb(2756734187,3733110249),new hb(3204031479,2999351573),new hb(3329325298,3815920427),new hb(3391569614,3928383900),new hb(3515267271,566280711),new hb(3940187606,3454069534),new hb(4118630271,4000239992),new hb(116418474,1914138554),new hb(174292421,2731055270),new hb(289380356,3203993006),new hb(460393269,320620315),new hb(685471733,587496836),new hb(852142971,1086792851),new hb(1017036298,365543100),new hb(1126000580,2618297676),new hb(1288033470,3409855158),new hb(1501505948,4234509866),new hb(1607167915,987167468),new hb(1816402316,1246189591)]; -return g}(),kb=function(){function a(a,b,c){return jb(a,b,c,!0)}return a}(),lb=function(){function a(){}return a.prototype={decryptBlock:function(a){return a}},a}(),mb=function(){function a(a){var b=176,c=new Uint8Array(b);c.set(a);for(var d=16,e=1;b>d;++e){var h=c[d-3],i=c[d-2],j=c[d-1],k=c[d-4];h=g[h],i=g[i],j=g[j],k=g[k],h^=f[e];for(var l=0;4>l;++l)c[d]=h^=c[d-16],d++,c[d]=i^=c[d-16],d++,c[d]=j^=c[d-16],d++,c[d]=k^=c[d-16],d++}return c}function b(a,b){var c=new Uint8Array(16);c.set(a);var d,e,f,g,i,j;for(e=0,f=160;16>e;++e,++f)c[e]^=b[f];for(d=9;d>=1;--d){for(g=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=g,g=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=g,c[2]=i,g=c[15],i=c[11],j=c[7],c[15]=c[3],c[11]=g,c[7]=i,c[3]=j,e=0;16>e;++e)c[e]=h[c[e]];for(e=0,f=16*d;16>e;++e,++f)c[e]^=b[f];for(e=0;16>e;e+=4){var l=k[c[e]],m=k[c[e+1]],n=k[c[e+2]],o=k[c[e+3]];g=l^m>>>8^m<<24^n>>>16^n<<16^o>>>24^o<<8,c[e]=g>>>24&255,c[e+1]=g>>16&255,c[e+2]=g>>8&255,c[e+3]=255&g}}for(g=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=g,g=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=g,c[2]=i,g=c[15],i=c[11],j=c[7],c[15]=c[3],c[11]=g,c[7]=i,c[3]=j,e=0;16>e;++e)c[e]=h[c[e]],c[e]^=b[e];return c}function c(a,b){var c,d,e,f,h=new Uint8Array(16);for(h.set(a),k=0;16>k;++k)h[k]^=b[k];for(j=1;10>j;j++){for(k=0;16>k;++k)h[k]=g[h[k]];e=h[1],h[1]=h[5],h[5]=h[9],h[9]=h[13],h[13]=e,e=h[2],d=h[6],h[2]=h[10],h[6]=h[14],h[10]=e,h[14]=d,e=h[3],d=h[7],c=h[11],h[3]=h[15],h[7]=e,h[11]=d,h[15]=c;for(var k=0;16>k;k+=4){var l=h[k+0],m=h[k+1],n=h[k+2],o=h[k+3];c=l^m^n^o,h[k+0]^=c^i[l^m],h[k+1]^=c^i[m^n],h[k+2]^=c^i[n^o],h[k+3]^=c^i[o^l]}for(k=0,f=16*j;16>k;++k,++f)h[k]^=b[f]}for(k=0;16>k;++k)h[k]=g[h[k]];for(e=h[1],h[1]=h[5],h[5]=h[9],h[9]=h[13],h[13]=e,e=h[2],d=h[6],h[2]=h[10],h[6]=h[14],h[10]=e,h[14]=d,e=h[3],d=h[7],c=h[11],h[3]=h[15],h[7]=e,h[11]=d,h[15]=c,k=0,f=160;16>k;++k,++f)h[k]^=b[f];return h}function d(b){this.key=a(b),this.buffer=new Uint8Array(16),this.bufferPosition=0}function e(a,c){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[],k=this.iv;for(d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){var l=b(h,this.key);for(e=0;16>e;++e)l[e]^=k[e];k=h,j.push(l),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=k,0===j.length)return new Uint8Array([]);var m=16*j.length;if(c){var n=j[j.length-1],o=n[15];if(16>=o){for(d=15,f=16-o;d>=f;--d)if(n[d]!==o){o=0;break}m-=o,j[j.length-1]=n.subarray(0,16-o)}}var p=new Uint8Array(m);for(d=0,e=0,f=j.length;f>d;++d,e+=16)p.set(j[d],e);return p}for(var f=new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),g=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]),h=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),i=new Uint8Array(256),j=0;256>j;j++)128>j?i[j]=j<<1:i[j]=j<<1^27;var k=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]);return d.prototype={decryptBlock:function(a,b){var c,d=a.length,f=this.buffer,g=this.bufferPosition;for(c=0;16>g&&d>c;++c,++g)f[g]=a[c];return 16>g?(this.bufferLength=g,new Uint8Array([])):(this.iv=f,this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=e,this.decryptBlock(a.subarray(16),b))},encrypt:function(a,b){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[];for(b||(b=new Uint8Array(16)),d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){for(e=0;16>e;++e)h[e]^=b[e];var k=c(h,this.key);b=k,j.push(k),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=b,0===j.length)return new Uint8Array([]);var l=16*j.length,m=new Uint8Array(l);for(d=0,e=0,f=j.length;f>d;++d,e+=16)m.set(j[d],e);return m}},d}(),nb=function(){function a(a){var b=240,c=new Uint8Array(b),d=1;c.set(a);for(var e=32,g=1;b>e;++g){if(e%32===16)h=f[h],i=f[i],j=f[j],k=f[k];else if(e%32===0){var h=c[e-3],i=c[e-2],j=c[e-1],k=c[e-4];h=f[h],i=f[i],j=f[j],k=f[k],h^=d,(d<<=1)>=256&&(d=255&(27^d))}for(var l=0;4>l;++l)c[e]=h^=c[e-32],e++,c[e]=i^=c[e-32],e++,c[e]=j^=c[e-32],e++,c[e]=k^=c[e-32],e++}return c}function b(a,b){var c=new Uint8Array(16);c.set(a);var d,e,f,h,i,k;for(e=0,f=224;16>e;++e,++f)c[e]^=b[f];for(d=13;d>=1;--d){for(h=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=h,h=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=h,c[2]=i,h=c[15],i=c[11],k=c[7],c[15]=c[3],c[11]=h,c[7]=i,c[3]=k,e=0;16>e;++e)c[e]=g[c[e]];for(e=0,f=16*d;16>e;++e,++f)c[e]^=b[f];for(e=0;16>e;e+=4){var l=j[c[e]],m=j[c[e+1]],n=j[c[e+2]],o=j[c[e+3]];h=l^m>>>8^m<<24^n>>>16^n<<16^o>>>24^o<<8,c[e]=h>>>24&255,c[e+1]=h>>16&255,c[e+2]=h>>8&255,c[e+3]=255&h}}for(h=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=h,h=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=h,c[2]=i,h=c[15],i=c[11],k=c[7],c[15]=c[3],c[11]=h,c[7]=i,c[3]=k,e=0;16>e;++e)c[e]=g[c[e]],c[e]^=b[e];return c}function c(a,b){var c,d,e,g,j=new Uint8Array(16);for(j.set(a),k=0;16>k;++k)j[k]^=b[k];for(i=1;14>i;i++){for(k=0;16>k;++k)j[k]=f[j[k]];e=j[1],j[1]=j[5],j[5]=j[9],j[9]=j[13],j[13]=e,e=j[2],d=j[6],j[2]=j[10],j[6]=j[14],j[10]=e,j[14]=d,e=j[3],d=j[7],c=j[11],j[3]=j[15],j[7]=e,j[11]=d,j[15]=c;for(var k=0;16>k;k+=4){var l=j[k+0],m=j[k+1],n=j[k+2],o=j[k+3];c=l^m^n^o,j[k+0]^=c^h[l^m],j[k+1]^=c^h[m^n],j[k+2]^=c^h[n^o],j[k+3]^=c^h[o^l]}for(k=0,g=16*i;16>k;++k,++g)j[k]^=b[g]}for(k=0;16>k;++k)j[k]=f[j[k]];for(e=j[1],j[1]=j[5],j[5]=j[9],j[9]=j[13],j[13]=e,e=j[2],d=j[6],j[2]=j[10],j[6]=j[14],j[10]=e,j[14]=d,e=j[3],d=j[7],c=j[11],j[3]=j[15],j[7]=e,j[11]=d,j[15]=c,k=0,g=224;16>k;++k,++g)j[k]^=b[g];return j}function d(b){this.key=a(b),this.buffer=new Uint8Array(16),this.bufferPosition=0}function e(a,c){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[],k=this.iv;for(d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){var l=b(h,this.key);for(e=0;16>e;++e)l[e]^=k[e];k=h,j.push(l),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=k,0===j.length)return new Uint8Array([]);var m=16*j.length;if(c){var n=j[j.length-1],o=n[15];if(16>=o){for(d=15,f=16-o;d>=f;--d)if(n[d]!==o){o=0;break}m-=o,j[j.length-1]=n.subarray(0,16-o)}}var p=new Uint8Array(m);for(d=0,e=0,f=j.length;f>d;++d,e+=16)p.set(j[d],e);return p}for(var f=(new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22])),g=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),h=new Uint8Array(256),i=0;256>i;i++)128>i?h[i]=i<<1:h[i]=i<<1^27;var j=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]);return d.prototype={decryptBlock:function(a,b,c){var d,f=a.length,g=this.buffer,h=this.bufferPosition;if(c)this.iv=c;else{for(d=0;16>h&&f>d;++d,++h)g[h]=a[d];if(16>h)return this.bufferLength=h,new Uint8Array([]);this.iv=g,a=a.subarray(16)}return this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=e,this.decryptBlock(a,b)},encrypt:function(a,b){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[];for(b||(b=new Uint8Array(16)),d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){for(e=0;16>e;++e)h[e]^=b[e];var k=c(h,this.key);this.iv=k,j.push(k),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=b,0===j.length)return new Uint8Array([]);var l=16*j.length,m=new Uint8Array(l);for(d=0,e=0,f=j.length;f>d;++d,e+=16)m.set(j[d],e);return m}},d}(),ob=function(){function a(a,b){if(a.length!==b.length)return!1;for(var c=0;cg||f[f.length-1]>g-32;){var h=b.length+e.length+d.length,i=new Uint8Array(64*h),j=a(b,e);j=a(j,d);for(var k=0,l=0;64>k;k++,l+=h)i.set(j,l);var m=new mb(e.subarray(0,16));f=m.encrypt(i,e.subarray(16,32));for(var n=0,o=0;16>o;o++)n*=1,n%=3,n+=(f[o]>>>0)%3,n%=3;0===n?e=ib(f,0,f.length):1===n?e=kb(f,0,f.length):2===n&&(e=jb(f,0,f.length)),g++}return e.subarray(0,32)}function c(){}function d(a,b){if(a.length!==b.length)return!1;for(var c=0;cn;++n)m[n]=b[n];for(j=0;32>n;)m[n++]=i[j++];for(j=0,k=c.length;k>j;++j)m[n++]=c[j];for(m[n++]=255&e,m[n++]=e>>8&255,m[n++]=e>>16&255,m[n++]=e>>>24&255,j=0,k=a.length;k>j;++j)m[n++]=a[j];f>=4&&!h&&(m[n++]=255,m[n++]=255,m[n++]=255,m[n++]=255);var o=gb(m,0,n),p=g>>3;if(f>=3)for(j=0;50>j;++j)o=gb(o,0,p);var q,r,s=o.subarray(0,p);if(f>=3){for(n=0;32>n;++n)m[n]=i[n];for(j=0,k=a.length;k>j;++j)m[n++]=a[j];q=new fb(s),r=q.encryptBlock(gb(m,0,n)),k=s.length;var t,u=new Uint8Array(k);for(j=1;19>=j;++j){for(t=0;k>t;++t)u[t]=s[t]^j;q=new fb(u),r=q.encryptBlock(r)}for(j=0,k=r.length;k>j;++j)if(d[j]!==r[j])return null}else for(q=new fb(s),r=q.encryptBlock(i),j=0,k=r.length;k>j;++j)if(d[j]!==r[j])return null;return s}function e(a,b,c,d){var e,f,g=new Uint8Array(32),h=0;for(f=Math.min(32,a.length);f>h;++h)g[h]=a[h];for(e=0;32>h;)g[h++]=i[e++];var j=gb(g,0,h),k=d>>3;if(c>=3)for(e=0;50>e;++e)j=gb(j,0,j.length);var l,m;if(c>=3){m=b;var n,o=new Uint8Array(k);for(e=19;e>=0;e--){for(n=0;k>n;++n)o[n]=j[n]^e;l=new fb(o),m=l.encryptBlock(m)}}else l=new fb(j.subarray(0,k)),m=l.encryptBlock(b);return m}function f(f,g,h){var i=f.get("Filter");z(i)&&"Standard"===i.name||c("unknown encryption method"),this.dict=f;var l=f.get("V");(!w(l)||1!==l&&2!==l&&4!==l&&5!==l)&&c("unsupported encryption algorithm"),this.algorithm=l;var m=f.get("Length")||40;(!w(m)||40>m||m%8!==0)&&c("invalid key length");var n=j(f.get("O")).subarray(0,32),o=j(f.get("U")).subarray(0,32),p=f.get("P"),q=f.get("R"),r=(4===l||5===l)&&f.get("EncryptMetadata")!==!1;this.encryptMetadata=r;var s,u=j(g);if(h){if(6===q)try{h=t(h)}catch(v){b("CipherTransformFactory: Unable to convert UTF8 encoded password.")}s=j(h)}var x;if(5!==l)x=d(u,s,n,o,p,q,m,r);else{var y=j(f.get("O")).subarray(32,40),A=j(f.get("O")).subarray(40,48),B=j(f.get("U")).subarray(0,48),C=j(f.get("U")).subarray(32,40),D=j(f.get("U")).subarray(40,48),E=j(f.get("OE")),F=j(f.get("UE")),G=j(f.get("Perms"));x=a(q,s,n,y,A,B,o,C,D,E,F,G)}if(!x&&!h)throw new da("No password given",ca.NEED_PASSWORD);if(!x&&h){var H=e(s,n,q,m);x=d(u,H,n,o,p,q,m,r)}if(!x)throw new da("Incorrect Password",ca.INCORRECT_PASSWORD);this.encryptionKey=x,l>=4&&(this.cf=f.get("CF"),this.stmf=f.get("StmF")||k,this.strf=f.get("StrF")||k,this.eff=f.get("EFF")||this.stmf)}function g(a,b,c,d){var e,f,g=new Uint8Array(c.length+9);for(e=0,f=c.length;f>e;++e)g[e]=c[e];g[e++]=255&a,g[e++]=a>>8&255,g[e++]=a>>16&255,g[e++]=255&b,g[e++]=b>>8&255,d&&(g[e++]=115,g[e++]=65,g[e++]=108,g[e++]=84);var h=gb(g,0,e);return h.subarray(0,Math.min(c.length+5,16))}function h(a,b,d,e,f){var h,i=a.get(b.name);return null!==i&&void 0!==i&&(h=i.get("CFM")),h&&"None"!==h.name?"V2"===h.name?function(){return new fb(g(d,e,f,!1))}:"AESV2"===h.name?function(){return new mb(g(d,e,f,!0))}:"AESV3"===h.name?function(){return new nb(f)}:void c("Unknown crypto method"):function(){return new lb}}var i=new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]),k=ya.get("Identity");return f.prototype={createCipherTransform:function(a,b){if(4===this.algorithm||5===this.algorithm)return new qb(h(this.cf,this.stmf,a,b,this.encryptionKey),h(this.cf,this.strf,a,b,this.encryptionKey));var c=g(a,b,this.encryptionKey,!1),d=function(){return new fb(c)};return new qb(d,d)}},f}(),sb={FUNCTION_BASED:1,AXIAL:2,RADIAL:3,FREE_FORM_MESH:4,LATTICE_FORM_MESH:5,COONS_PATCH_MESH:6,TENSOR_PATCH_MESH:7},tb=function(){function a(){c("should not call Pattern constructor")}return a.prototype={getPattern:function(a){c("Should not call Pattern.getStyle: "+a)}},a.parseShading=function(a,c,d,e){var f=D(a)?a.dict:a,g=f.get("ShadingType");try{switch(g){case sb.AXIAL:case sb.RADIAL:return new ub.RadialAxial(f,c,d,e);case sb.FREE_FORM_MESH:case sb.LATTICE_FORM_MESH:case sb.COONS_PATCH_MESH:case sb.TENSOR_PATCH_MESH:return new ub.Mesh(a,c,d,e);default:throw new Error("Unsupported ShadingType: "+g)}}catch(h){if(h instanceof ja)throw h;return aa.notify(_.shadingPattern),b(h),new ub.Dummy}},a}(),ub={};ub.SMALL_NUMBER=.01,ub.RadialAxial=function(){function d(c,d,e,f){this.matrix=d,this.coordsArr=c.get("Coords"),this.shadingType=c.get("ShadingType"),this.type="Pattern";var g=c.get("ColorSpace","CS");g=Xa.parse(g,e,f),this.cs=g;var h=0,i=1;if(c.has("Domain")){var j=c.get("Domain");h=j[0],i=j[1]}var k=!1,l=!1;if(c.has("Extend")){var m=c.get("Extend");k=m[0],l=m[1]}if(!(this.shadingType!==sb.RADIAL||k&&l)){var n=this.coordsArr[0],o=this.coordsArr[1],p=this.coordsArr[2],q=this.coordsArr[3],r=this.coordsArr[4],s=this.coordsArr[5],t=Math.sqrt((n-q)*(n-q)+(o-r)*(o-r));s+t>=p&&p+t>=s&&b("Unsupported radial gradient.")}this.extendStart=k,this.extendEnd=l;var u=c.get("Function"),v=Ta.parseArray(e,u),w=i-h,x=w/10,y=this.colorStops=[];if(h>=i||0>=x)return void a("Bad shading domain.");for(var z,A=new Float32Array(g.numComps),B=new Float32Array(1),C=h;i>=C;C+=x){B[0]=C,v(B,0,A,0),z=g.getRgb(A,0);var D=na.makeCssRgb(z[0],z[1],z[2]);y.push([(C-h)/w,D])}var E="transparent";c.has("Background")&&(z=g.getRgb(c.get("Background"),0),E=na.makeCssRgb(z[0],z[1],z[2])),k||(y.unshift([0,E]),y[1][0]+=ub.SMALL_NUMBER),l||(y[y.length-1][0]-=ub.SMALL_NUMBER,y.push([1,E])),this.colorStops=y}return d.prototype={getIR:function(){var a,b,d,e,f,g=this.coordsArr,h=this.shadingType;h===sb.AXIAL?(b=[g[0],g[1]],d=[g[2],g[3]],e=null,f=null,a="axial"):h===sb.RADIAL?(b=[g[0],g[1]],d=[g[3],g[4]],e=g[2],f=g[5],a="radial"):c("getPattern type unknown: "+h);var i=this.matrix;return i&&(b=na.applyTransform(b,i),d=na.applyTransform(d,i)),["RadialAxial",a,this.colorStops,b,d,e,f]}},d}(),ub.Mesh=function(){function a(a,b){this.stream=a,this.context=b,this.buffer=0,this.bufferLength=0;var c=b.numComps;this.tmpCompsBuf=new Float32Array(c);var d=b.colorSpace.numComps;this.tmpCsCompsBuf=b.colorFn?new Float32Array(d):this.tmpCompsBuf}function b(a,b){for(var c=a.coords,d=a.colors,f=[],g=[],h=0;b.hasData;){var i=b.readFlag(),j=b.readCoordinate(),k=b.readComponents();if(0===h){switch(e(i>=0&&2>=i,"Unknown type4 flag"),i){case 0:h=3;break;case 1:g.push(g[g.length-2],g[g.length-1]),h=1;break;case 2:g.push(g[g.length-3],g[g.length-1]),h=1}f.push(i)}g.push(c.length),c.push(j),d.push(k),h--,b.align()}a.figures.push({type:"triangles",coords:new Int32Array(g),colors:new Int32Array(g)})}function d(a,b,c){for(var d=a.coords,e=a.colors,f=[];b.hasData;){var g=b.readCoordinate(),h=b.readComponents();f.push(d.length),d.push(g),e.push(h)}a.figures.push({type:"lattice",coords:new Int32Array(f),colors:new Int32Array(f),verticesPerRow:c})}function f(a,b){var c=a.figures[b];e("patch"===c.type,"Unexpected patch mesh figure");var d=a.coords,f=a.colors,g=c.coords,h=c.colors,i=Math.min(d[g[0]][0],d[g[3]][0],d[g[12]][0],d[g[15]][0]),j=Math.min(d[g[0]][1],d[g[3]][1],d[g[12]][1],d[g[15]][1]),k=Math.max(d[g[0]][0],d[g[3]][0],d[g[12]][0],d[g[15]][0]),p=Math.max(d[g[0]][1],d[g[3]][1],d[g[12]][1],d[g[15]][1]),q=Math.ceil((k-i)*n/(a.bounds[2]-a.bounds[0]));q=Math.max(l,Math.min(m,q));var r=Math.ceil((p-j)*n/(a.bounds[3]-a.bounds[1]));r=Math.max(l,Math.min(m,r));for(var s=q+1,t=new Int32Array((r+1)*s),u=new Int32Array((r+1)*s),v=0,w=new Uint8Array(3),x=new Uint8Array(3),y=f[h[0]],z=f[h[1]],A=f[h[2]],B=f[h[3]],C=o(r),D=o(q),E=0;r>=E;E++){w[0]=(y[0]*(r-E)+A[0]*E)/r|0,w[1]=(y[1]*(r-E)+A[1]*E)/r|0,w[2]=(y[2]*(r-E)+A[2]*E)/r|0,x[0]=(z[0]*(r-E)+B[0]*E)/r|0,x[1]=(z[1]*(r-E)+B[1]*E)/r|0,x[2]=(z[2]*(r-E)+B[2]*E)/r|0;for(var F=0;q>=F;F++,v++)if(0!==E&&E!==r||0!==F&&F!==q){for(var G=0,H=0,I=0,J=0;3>=J;J++)for(var K=0;3>=K;K++,I++){var L=C[E][J]*D[F][K];G+=d[g[I]][0]*L,H+=d[g[I]][1]*L}t[v]=d.length,d.push([G,H]),u[v]=f.length;var M=new Uint8Array(3);M[0]=(w[0]*(q-F)+x[0]*F)/q|0,M[1]=(w[1]*(q-F)+x[1]*F)/q|0,M[2]=(w[2]*(q-F)+x[2]*F)/q|0,f.push(M)}}t[0]=g[0],u[0]=h[0],t[q]=g[3],u[q]=h[1],t[s*r]=g[12],u[s*r]=h[2],t[s*r+q]=g[15],u[s*r+q]=h[3],a.figures[b]={type:"lattice",coords:t,colors:u,verticesPerRow:s}}function g(a,b){for(var c=a.coords,d=a.colors,f=new Int32Array(16),g=new Int32Array(4);b.hasData;){var h=b.readFlag();e(h>=0&&3>=h,"Unknown type6 flag");var i,j,k=c.length;for(i=0,j=0!==h?8:12;j>i;i++)c.push(b.readCoordinate());var l=d.length;for(i=0,j=0!==h?2:4;j>i;i++)d.push(b.readComponents());var m,n,o,p;switch(h){case 0:f[12]=k+3,f[13]=k+4,f[14]=k+5,f[15]=k+6,f[8]=k+2,f[11]=k+7,f[4]=k+1,f[7]=k+8,f[0]=k,f[1]=k+11,f[2]=k+10,f[3]=k+9,g[2]=l+1,g[3]=l+2,g[0]=l,g[1]=l+3;break;case 1:m=f[12],n=f[13],o=f[14],p=f[15],f[12]=p,f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=o,f[11]=k+3,f[4]=n,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[2],n=g[3],g[2]=n,g[3]=l,g[0]=m,g[1]=l+1;break;case 2:m=f[15],n=f[11],f[12]=f[3],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[7],f[11]=k+3,f[4]=n,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[3],g[2]=g[1],g[3]=l,g[0]=m,g[1]=l+1;break;case 3:f[12]=f[0],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[1],f[11]=k+3,f[4]=f[2],f[7]=k+4,f[0]=f[3],f[1]=k+7,f[2]=k+6,f[3]=k+5,g[2]=g[0],g[3]=l,g[0]=g[1],g[1]=l+1}f[5]=c.length,c.push([(-4*c[f[0]][0]-c[f[15]][0]+6*(c[f[4]][0]+c[f[1]][0])-2*(c[f[12]][0]+c[f[3]][0])+3*(c[f[13]][0]+c[f[7]][0]))/9,(-4*c[f[0]][1]-c[f[15]][1]+6*(c[f[4]][1]+c[f[1]][1])-2*(c[f[12]][1]+c[f[3]][1])+3*(c[f[13]][1]+c[f[7]][1]))/9]),f[6]=c.length,c.push([(-4*c[f[3]][0]-c[f[12]][0]+6*(c[f[2]][0]+c[f[7]][0])-2*(c[f[0]][0]+c[f[15]][0])+3*(c[f[4]][0]+c[f[14]][0]))/9,(-4*c[f[3]][1]-c[f[12]][1]+6*(c[f[2]][1]+c[f[7]][1])-2*(c[f[0]][1]+c[f[15]][1])+3*(c[f[4]][1]+c[f[14]][1]))/9]),f[9]=c.length,c.push([(-4*c[f[12]][0]-c[f[3]][0]+6*(c[f[8]][0]+c[f[13]][0])-2*(c[f[0]][0]+c[f[15]][0])+3*(c[f[11]][0]+c[f[1]][0]))/9,(-4*c[f[12]][1]-c[f[3]][1]+6*(c[f[8]][1]+c[f[13]][1])-2*(c[f[0]][1]+c[f[15]][1])+3*(c[f[11]][1]+c[f[1]][1]))/9]),f[10]=c.length,c.push([(-4*c[f[15]][0]-c[f[0]][0]+6*(c[f[11]][0]+c[f[14]][0])-2*(c[f[12]][0]+c[f[3]][0])+3*(c[f[2]][0]+c[f[8]][0]))/9,(-4*c[f[15]][1]-c[f[0]][1]+6*(c[f[11]][1]+c[f[14]][1])-2*(c[f[12]][1]+c[f[3]][1])+3*(c[f[2]][1]+c[f[8]][1]))/9]),a.figures.push({type:"patch",coords:new Int32Array(f),colors:new Int32Array(g)})}}function h(a,b){for(var c=a.coords,d=a.colors,f=new Int32Array(16),g=new Int32Array(4);b.hasData;){var h=b.readFlag();e(h>=0&&3>=h,"Unknown type7 flag");var i,j,k=c.length;for(i=0,j=0!==h?12:16;j>i;i++)c.push(b.readCoordinate());var l=d.length;for(i=0,j=0!==h?2:4;j>i;i++)d.push(b.readComponents());var m,n,o,p;switch(h){case 0:f[12]=k+3,f[13]=k+4,f[14]=k+5,f[15]=k+6,f[8]=k+2,f[9]=k+13,f[10]=k+14,f[11]=k+7,f[4]=k+1,f[5]=k+12,f[6]=k+15,f[7]=k+8,f[0]=k,f[1]=k+11,f[2]=k+10,f[3]=k+9,g[2]=l+1,g[3]=l+2,g[0]=l,g[1]=l+3;break;case 1:m=f[12],n=f[13],o=f[14],p=f[15],f[12]=p,f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=o,f[9]=k+9,f[10]=k+10,f[11]=k+3,f[4]=n,f[5]=k+8,f[6]=k+11,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[2],n=g[3],g[2]=n,g[3]=l,g[0]=m,g[1]=l+1;break;case 2:m=f[15],n=f[11],f[12]=f[3],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[7],f[9]=k+9,f[10]=k+10,f[11]=k+3,f[4]=n,f[5]=k+8,f[6]=k+11,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[3],g[2]=g[1],g[3]=l,g[0]=m,g[1]=l+1;break;case 3:f[12]=f[0],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[1],f[9]=k+9,f[10]=k+10,f[11]=k+3,f[4]=f[2],f[5]=k+8,f[6]=k+11,f[7]=k+4,f[0]=f[3],f[1]=k+7,f[2]=k+6,f[3]=k+5,g[2]=g[0],g[3]=l,g[0]=g[1],g[1]=l+1}a.figures.push({type:"patch",coords:new Int32Array(f),colors:new Int32Array(g)})}}function i(a){for(var b=a.coords[0][0],c=a.coords[0][1],d=b,e=c,f=1,g=a.coords.length;g>f;f++){var h=a.coords[f][0],i=a.coords[f][1];b=b>h?h:b, -c=c>i?i:c,d=h>d?h:d,e=i>e?i:e}a.bounds=[b,c,d,e]}function j(a){var b,c,d,e,f=a.coords,g=new Float32Array(2*f.length);for(b=0,d=0,c=f.length;c>b;b++){var h=f[b];g[d++]=h[0],g[d++]=h[1]}a.coords=g;var i=a.colors,j=new Uint8Array(3*i.length);for(b=0,d=0,c=i.length;c>b;b++){var k=i[b];j[d++]=k[0],j[d++]=k[1],j[d++]=k[2]}a.colors=j;var l=a.figures;for(b=0,c=l.length;c>b;b++){var m=l[b],n=m.coords,o=m.colors;for(d=0,e=n.length;e>d;d++)n[d]*=2,o[d]*=3}}function k(k,l,m,n){e(D(k),"Mesh data is not a stream");var o=k.dict;this.matrix=l,this.shadingType=o.get("ShadingType"),this.type="Pattern",this.bbox=o.get("BBox");var p=o.get("ColorSpace","CS");p=Xa.parse(p,m,n),this.cs=p,this.background=o.has("Background")?p.getRgb(o.get("Background"),0):null;var q=o.get("Function"),r=q?Ta.parseArray(m,q):null;this.coords=[],this.colors=[],this.figures=[];var s={bitsPerCoordinate:o.get("BitsPerCoordinate"),bitsPerComponent:o.get("BitsPerComponent"),bitsPerFlag:o.get("BitsPerFlag"),decode:o.get("Decode"),colorFn:r,colorSpace:p,numComps:r?1:p.numComps},t=new a(k,s),u=!1;switch(this.shadingType){case sb.FREE_FORM_MESH:b(this,t);break;case sb.LATTICE_FORM_MESH:var v=0|o.get("VerticesPerRow");e(v>=2,"Invalid VerticesPerRow"),d(this,t,v);break;case sb.COONS_PATCH_MESH:g(this,t),u=!0;break;case sb.TENSOR_PATCH_MESH:h(this,t),u=!0;break;default:c("Unsupported mesh type.")}if(u){i(this);for(var w=0,x=this.figures.length;x>w;w++)f(this,w)}i(this),j(this)}a.prototype={get hasData(){if(this.stream.end)return this.stream.pos0)return!0;var a=this.stream.getByte();return 0>a?!1:(this.buffer=a,this.bufferLength=8,!0)},readBits:function(a){var b=this.buffer,c=this.bufferLength;if(32===a){if(0===c)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;b=b<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();var d=this.stream.getByte();return this.buffer=d&(1<>c)>>>0}if(8===a&&0===c)return this.stream.getByte();for(;a>c;)b=b<<8|this.stream.getByte(),c+=8;return c-=a,this.bufferLength=c,this.buffer=b&(1<>c},align:function(){this.buffer=0,this.bufferLength=0},readFlag:function(){return this.readBits(this.context.bitsPerFlag)},readCoordinate:function(){var a=this.context.bitsPerCoordinate,b=this.readBits(a),c=this.readBits(a),d=this.context.decode,e=32>a?1/((1<b?1/((1<f;f++,g+=2){var h=this.readBits(b);e[f]=h*c*(d[g+1]-d[g])+d[g]}var i=this.tmpCsCompsBuf;return this.context.colorFn&&this.context.colorFn(e,0,i,0),this.context.colorSpace.getRgb(i,0)}};var l=3,m=20,n=20,o=function(){function a(a){for(var b=[],c=0;a>=c;c++){var d=c/a,e=1-d;b.push(new Float32Array([e*e*e,3*d*e*e,3*d*d*e,d*d*d]))}return b}var b=[];return function(c){return b[c]||(b[c]=a(c)),b[c]}}();return k.prototype={getIR:function(){return["Mesh",this.shadingType,this.coords,this.colors,this.figures,this.bounds,this.matrix,this.bbox,this.background]}},k}(),ub.Dummy=function(){function a(){this.type="Pattern"}return a.prototype={getIR:function(){return["Dummy"]}},a}();var vb=function(){function d(a,b,c,d,e,f,g){this.pdfManager=a,this.xref=b,this.handler=c,this.pageIndex=d,this.uniquePrefix=e,this.idCounters=f,this.fontCache=g}function f(){this.reset()}var g=20,h=100;f.prototype={check:function(){return++this.checkedPDFJS.maxImageSize)return void b("Image exceeded maximum allowed size and was removed.");var l,m,n=i.get("ImageMask","IM")||!1;if(n){var o=i.get("Width","W"),p=i.get("Height","H"),q=o+7>>3,r=c.getBytes(q*p),s=i.get("Decode","D"),t=!!s&&s[0]>0;return l=Bc.createMask(r,o,p,c instanceof Oc,t),l.cached=!0,m=[l],e.addOp($.paintImageMaskXObject,m),void(f&&(g[f]={fn:$.paintImageMaskXObject,args:m}))}var u=i.get("SMask","SM")||!1,v=i.get("Mask")||!1,w=200;if(d&&!u&&!v&&!(c instanceof Sc)&&w>j+k){var y=new Bc(this.xref,a,c,d,null,null);return l=y.createImageData(!0),void e.addOp($.paintInlineImageXObject,[l])}var z=this.uniquePrefix||"",A="img_"+z+ ++this.idCounters.obj;return e.addDependency(A),m=[A,j,k],!u&&!v&&c instanceof Sc&&c.isNativelySupported(this.xref,a)?(e.addOp($.paintJpegXObject,m),void this.handler.send("obj",[A,this.pageIndex,"JpegStream",c.getIR()])):(Bc.buildImage(h.handler,h.xref,a,c,d).then(function(a){var b=a.createImageData(!1);h.handler.send("obj",[A,h.pageIndex,"Image",b],[b.data.buffer])}).then(void 0,function(a){b("Unable to decode image: "+a),h.handler.send("obj",[A,h.pageIndex,"Image",null])}),e.addOp($.paintImageXObject,m),void(f&&(g[f]={fn:$.paintImageXObject,args:m})))},handleSMask:function(a,b,c,d,e){var f=a.get("G"),g={subtype:a.get("S").name,backdrop:a.get("BC")};return this.buildFormXObject(b,f,g,c,d,e.state.clone())},handleTilingType:function(a,b,c,d,e,f,g){var h=new xb,i=[e.get("Resources"),c],j=Aa.merge(this.xref,i);return this.getOperatorList(d,g,j,h).then(function(){f.addDependencies(h.dependencies),f.addOp(a,J({fnArray:h.fnArray,argsArray:h.argsArray},e,b))})},handleSetFont:function(a,b,c,d,e,f){var g;b&&(b=b.slice(),g=b[0].name);var h=this;return this.loadFont(g,c,this.xref,a).then(function(b){return b.font.isType3Font?b.loadType3Data(h,a,d,e).then(function(){return b}):b}).then(function(a){return f.font=a.font,a.send(h.handler),a.loadedName})},handleText:function(a,b){var c=b.font,d=c.charsToGlyphs(a),e=!!(b.textRenderingMode&U.ADD_TO_PATH_FLAG);if(c.data&&(e||PDFJS.disableFontFace))for(var f=function(a){if(!c.renderer.hasBuiltPath(a)){var b=c.renderer.getPathJs(a);this.handler.send("commonobj",[c.loadedName+"_path_"+a,"FontPath",b])}}.bind(this),g=0,h=d.length;h>g;g++){var i=d[g];if(null!==i){f(i.fontChar);var j=i.accent;j&&j.fontChar&&f(j.fontChar)}}return d},setGState:function(c,d,e,f,g,h){var i=[],j=d.map,k=this,l=Promise.resolve();for(var m in j){var n=j[m];switch(m){case"Type":break;case"LW":case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":i.push([m,n]);break;case"Font":l=l.then(function(){return k.handleSetFont(c,null,n[0],e,f,h.state).then(function(a){e.addDependency(a),i.push([m,[a,n[1]]])})});break;case"BM":i.push([m,n]);break;case"SMask":if(z(n)&&"None"===n.name){i.push([m,!1]);break}var o=g.fetchIfRef(n);B(o)?(l=l.then(function(){return k.handleSMask(o,c,e,f,h)}),i.push([m,!0])):b("Unsupported SMask type");break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":a("graphic state operator "+m);break;default:a("Unknown graphic state operator "+m)}}return l.then(function(){i.length>=0&&e.addOp($.setGState,[i])})},loadFont:function(a,c,d,f){function g(){return Promise.resolve(new wb("g_font_error",new ec("Font "+a+" is not available"),c))}var h;if(c)e(F(c)),h=c;else{var i=f.get("Font");if(!i)return b("fontRes not available"),g();h=i.getRaw(a)}if(!h)return b("fontRef not available"),g();if(this.fontCache.has(h))return this.fontCache.get(h);if(c=d.fetchIfRef(h),!B(c))return g();if(c.translated)return c.translated;var j=G(),k=this.preEvaluateFont(c,d),l=k.descriptor,m=h.num+"_"+h.gen;if(B(l)){l.fontAliases||(l.fontAliases=Object.create(null));var n=l.fontAliases,o=k.hash;if(n[o]){var p=n[o].aliasRef;if(p&&this.fontCache.has(p))return this.fontCache.putAlias(h,p),this.fontCache.get(h)}n[o]||(n[o]={fontID:dc.getFontID()}),n[o].aliasRef=h,m=n[o].fontID}var q=B(h);q||this.fontCache.put(h,j.promise),c.loadedName="g_font_"+(q?a.replace(/\W/g,""):m),c.translated=j.promise;var r;try{r=Promise.resolve(this.translateFont(k,d))}catch(s){r=Promise.reject(s)}return r.then(function(a){if(void 0!==a.fontType){var b=d.stats.fontTypes;b[a.fontType]=!0}j.resolve(new wb(c.loadedName,a,c))},function(a){aa.notify(_.font);try{var b=k.descriptor,e=b&&b.get("FontFile3"),f=e&&e.get("Subtype"),g=P(k.type,f&&f.name),h=d.stats.fontTypes;h[g]=!0}catch(i){}j.resolve(new wb(c.loadedName,new ec(a instanceof Error?a.message:a),c))}),j.promise},buildPath:function(a,b,c){var d=a.length-1;if(c||(c=[]),0>d||a.fnArray[d]!==$.constructPath)a.addOp($.constructPath,[[b],c]);else{var e=a.argsArray[d];e[0].push(b),Array.prototype.push.apply(e[1],c)}},handleColorN:function(a,b,c,d,e,f,g,h){var i,l=c[c.length-1];if(z(l)&&(i=e.get(l.name))){var m=D(i)?i.dict:i,n=m.get("PatternType");if(n===j){var o=d.base?d.base.getRgb(c,0):null;return this.handleTilingType(b,o,f,i,m,a,g)}if(n===k){var p=m.get("Shading"),q=m.get("Matrix");return i=tb.parseShading(p,q,h,f),a.addOp(b,i.getIR()),Promise.resolve()}return Promise.reject("Unknown PatternType: "+n)}return a.addOp(b,c),Promise.resolve()},getOperatorList:function(d,g,h,j,k){var l=this,m=this.xref,n={};e(j),h=h||Aa.empty;var o=h.get("XObject")||Aa.empty,p=h.get("Pattern")||Aa.empty,q=new yb(k||new Ab),r=new Bb(d,m,q),s=new f;return new Promise(function t(d,f){g.ensureNotTerminated(),s.reset();for(var k,u,v,w,A={};!(k=s.check())&&(A.args=null,r.read(A));){var C=A.args,E=A.fn;switch(0|E){case $.paintXObject:if(C[0].code)break;var F=C[0].name;if(!F){b("XObject must be referred to by name.");continue}if(void 0!==n[F]){j.addOp(n[F].fn,n[F].args),C=null;continue}var G=o.get(F);if(G){e(D(G),"XObject should be a stream");var H=G.dict.get("Subtype");if(e(z(H),"XObject should have a Name subtype"),"Form"===H.name)return q.save(),l.buildFormXObject(h,G,null,j,g,q.state.clone()).then(function(){q.restore(),t(d,f)},f);if("Image"===H.name){l.buildPaintImageXObject(h,G,!1,j,F,n),C=null;continue}if("PS"===H.name){a("Ignored XObject subtype PS");continue}c("Unhandled XObject subtype "+H.name)}break;case $.setFont:var I=C[1];return l.handleSetFont(h,C,null,j,g,q.state).then(function(a){j.addDependency(a),j.addOp($.setFont,[a,I]),t(d,f)},f);case $.endInlineImage:var J=C[0].cacheKey;if(J){var K=n[J];if(void 0!==K){j.addOp(K.fn,K.args),C=null;continue}}l.buildPaintImageXObject(h,C[0],!0,j,J,n),C=null;continue;case $.showText:C[0]=l.handleText(C[0],q.state);break;case $.showSpacedText:var L=C[0],M=[],N=L.length,O=q.state;for(u=0;N>u;++u){var P=L[u];y(P)?Array.prototype.push.apply(M,l.handleText(P,O)):x(P)&&M.push(P)}C[0]=M,E=$.showText;break;case $.nextLineShowText:j.addOp($.nextLine),C[0]=l.handleText(C[0],q.state),E=$.showText;break;case $.nextLineSetSpacingShowText:j.addOp($.nextLine),j.addOp($.setWordSpacing,[C.shift()]),j.addOp($.setCharSpacing,[C.shift()]),C[0]=l.handleText(C[0],q.state),E=$.showText;break;case $.setTextRenderingMode:q.state.textRenderingMode=C[0];break;case $.setFillColorSpace:q.state.fillColorSpace=Xa.parse(C[0],m,h);continue;case $.setStrokeColorSpace:q.state.strokeColorSpace=Xa.parse(C[0],m,h);continue;case $.setFillColor:w=q.state.fillColorSpace,C=w.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeColor:w=q.state.strokeColorSpace,C=w.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.setFillGray:q.state.fillColorSpace=Xa.singletons.gray,C=Xa.singletons.gray.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeGray:q.state.strokeColorSpace=Xa.singletons.gray,C=Xa.singletons.gray.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.setFillCMYKColor:q.state.fillColorSpace=Xa.singletons.cmyk,C=Xa.singletons.cmyk.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeCMYKColor:q.state.strokeColorSpace=Xa.singletons.cmyk,C=Xa.singletons.cmyk.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.setFillRGBColor:q.state.fillColorSpace=Xa.singletons.rgb,C=Xa.singletons.rgb.getRgb(C,0);break;case $.setStrokeRGBColor:q.state.strokeColorSpace=Xa.singletons.rgb,C=Xa.singletons.rgb.getRgb(C,0);break;case $.setFillColorN:if(w=q.state.fillColorSpace,"Pattern"===w.name)return l.handleColorN(j,$.setFillColorN,C,w,p,h,g,m).then(function(){t(d,f)},f);C=w.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeColorN:if(w=q.state.strokeColorSpace,"Pattern"===w.name)return l.handleColorN(j,$.setStrokeColorN,C,w,p,h,g,m).then(function(){t(d,f)},f);C=w.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.shadingFill:var Q=h.get("Shading");Q||c("No shading resource found");var R=Q.get(C[0].name);R||c("No shading object found");var S=tb.parseShading(R,null,m,h),T=S.getIR();C=[T],E=$.shadingFill;break;case $.setGState:var U=C[0],V=h.get("ExtGState");if(!B(V)||!V.has(U.name))break;var W=V.get(U.name);return l.setGState(h,W,j,g,m,q).then(function(){t(d,f)},f);case $.moveTo:case $.lineTo:case $.curveTo:case $.curveTo2:case $.curveTo3:case $.closePath:l.buildPath(j,E,C);continue;case $.rectangle:l.buildPath(j,E,C);continue;case $.markPoint:case $.markPointProps:case $.beginMarkedContent:case $.beginMarkedContentProps:case $.endMarkedContent:case $.beginCompat:case $.endCompat:continue}j.addOp(E,C)}if(k)return void i.then(function(){t(d,f)},f);for(u=0,v=r.savedStatesDepth;v>u;u++)j.addOp($.restore,[]);d()})},getTextContent:function(a,b,c,d){function g(){var a=r.font;return a.loadedName in l.styles||(l.styles[a.loadedName]={fontFamily:a.fallbackName,ascent:a.ascent,descent:a.descent,vertical:a.vertical}),{str:[],dir:null,width:0,height:0,transform:null,fontName:a.loadedName}}function h(a){var b=a.str.join(""),c=PDFJS.bidi(b,-1,r.font.vertical);return a.str=c.str,a.dir=c.dir,a}function j(a,b){return p.loadFont(a,b,q,c).then(function(a){r.font=a.font,r.fontMatrix=a.font.fontMatrix||T})}function k(a,b){var c=r.font;if(b=b||g(),!b.transform){var d=[r.fontSize*r.textHScale,0,0,r.fontSize,0,r.textRise];if(c.isType3Font&&r.fontMatrix!==T&&1===r.fontSize){var e=c.bbox[3]-c.bbox[1];e>0&&(e*=r.fontMatrix[3],d[3]*=e)}var f=b.transform=na.transform(r.ctm,na.transform(r.textMatrix,d));c.vertical?b.width=Math.sqrt(f[0]*f[0]+f[1]*f[1]):b.height=Math.sqrt(f[2]*f[2]+f[3]*f[3])}for(var h=0,i=0,j=c.charsToGlyphs(a),k=c.defaultVMetrics,l=0;l0&&(s=r.charSpacing);var t=0,u=0;if(c.vertical){var v=p*r.fontMatrix[0];u=v*r.fontSize+s,i+=u}else{var w=p*r.fontMatrix[0];t=(w*r.fontSize+s)*r.textHScale,h+=t}r.translateTextMatrix(t,u),b.str.push(q)}else h+=r.wordSpacing*r.textHScale}var x=r.textLineMatrix[0],y=r.textLineMatrix[1],z=Math.sqrt(x*x+y*y);x=r.ctm[0],y=r.ctm[1];var A=Math.sqrt(x*x+y*y);return c.vertical?b.height+=Math.abs(i*A*z):b.width+=h*A*z,b}d=d||new yb(new zb);var l={items:[],styles:Object.create(null)},m=l.items,n=.3,o=1.5,p=this,q=this.xref;c=q.fetchIfRef(c)||Aa.empty;var r,s=null,t={},u=new Bb(a,q,d),v=new f;return new Promise(function w(a,f){b.ensureNotTerminated(),v.reset();for(var q,x={},y=[];!(q=v.check())&&(y.length=0,x.args=y,u.read(x));){r=d.state;var A=x.fn;switch(y=x.args,0|A){case $.setFont:return r.fontSize=y[1],j(y[0].name).then(function(){w(a,f)},f);case $.setTextRise:r.textRise=y[0];break;case $.setHScale:r.textHScale=y[0]/100;break;case $.setLeading:r.leading=y[0];break;case $.moveText:r.translateTextLineMatrix(y[0],y[1]),r.textMatrix=r.textLineMatrix.slice();break;case $.setLeadingMoveText:r.leading=-y[1],r.translateTextLineMatrix(y[0],y[1]),r.textMatrix=r.textLineMatrix.slice();break;case $.nextLine:r.carriageReturn();break;case $.setTextMatrix:r.setTextMatrix(y[0],y[1],y[2],y[3],y[4],y[5]),r.setTextLineMatrix(y[0],y[1],y[2],y[3],y[4],y[5]);break;case $.setCharSpacing:r.charSpacing=y[0];break;case $.setWordSpacing:r.wordSpacing=y[0];break;case $.beginText:r.textMatrix=ma.slice(),r.textLineMatrix=ma.slice();break;case $.showSpacedText:for(var E,F=y[0],G=g(),H=0,I=F.length;I>H;H++)if("string"==typeof F[H])k(F[H],G);else{var J=F[H]*r.fontSize/1e3;if(r.font.vertical?(E=J*r.textMatrix[3],r.translateTextMatrix(0,E),G.height+=E):(E=J*r.textHScale*r.textMatrix[0],r.translateTextMatrix(E,0),G.width-=E),F[H]<0&&r.font.spaceWidth>0){var K=-F[H]/r.font.spaceWidth;if(K>o)for(K=Math.round(K);K--;)G.str.push(" ");else K>n&&G.str.push(" ")}}m.push(h(G));break;case $.showText:m.push(h(k(y[0])));break;case $.nextLineShowText:r.carriageReturn(),m.push(h(k(y[0])));break;case $.nextLineSetSpacingShowText:r.wordSpacing=y[0],r.charSpacing=y[1],r.carriageReturn(),m.push(h(k(y[2])));break;case $.paintXObject:if(y[0].code)break;s||(s=c.get("XObject")||Aa.empty);var L=y[0].name;if(t.key===L){t.texts&&(na.appendToArray(m,t.texts.items),na.extendObj(l.styles,t.texts.styles));break}var M=s.get(L);if(!M)break;e(D(M),"XObject should be a stream");var N=M.dict.get("Subtype");if(e(z(N),"XObject should have a Name subtype"),"Form"!==N.name){t.key=L,t.texts=null;break}d.save();var O=M.dict.get("Matrix");return C(O)&&6===O.length&&d.transform(O),p.getTextContent(M,b,M.dict.get("Resources")||c,d).then(function(b){na.appendToArray(m,b.items),na.extendObj(l.styles,b.styles),d.restore(),t.key=L,t.texts=b,w(a,f)},f);case $.setGState:var P=y[0],Q=c.get("ExtGState");if(!B(Q)||!Q.has(P.name))break;var R=Q.get(P.name),S=null;for(var T in R)"Font"===T&&(e(!S),S=R[T]);if(S)return r.fontSize=S[1],j(S[0]).then(function(){w(a,f)},f)}}return q?void i.then(function(){w(a,f)},f):void a(l)})},extractDataStructures:function(a,b,d,e){var f=a.get("ToUnicode")||b.get("ToUnicode");if(f&&(e.toUnicode=this.readToUnicode(f)),e.composite){var g=a.get("CIDSystemInfo");B(g)&&(e.cidSystemInfo={registry:g.get("Registry"),ordering:g.get("Ordering"),supplement:g.get("Supplement")});var h=a.get("CIDToGIDMap");D(h)&&(e.cidToGidMap=this.readCidToGidMap(h))}var i,j=[],k=null;if(a.has("Encoding")){if(i=a.get("Encoding"),B(i)){if(k=i.get("BaseEncoding"),k=z(k)?k.name:null,i.has("Differences"))for(var l=i.get("Differences"),m=0,n=0,o=l.length;o>n;n++){var p=l[n];if(x(p))m=p;else if(z(p))j[m++]=p.name;else{if(F(p)){l[n--]=d.fetch(p);continue}c("Invalid entry in 'Differences' array: "+p)}}}else z(i)?k=i.name:c("Encoding is not a Name nor a Dict");"MacRomanEncoding"!==k&&"MacExpertEncoding"!==k&&"WinAnsiEncoding"!==k&&(k=null)}k?e.defaultEncoding=Pb[k].slice():(i="TrueType"===e.type?Pb.WinAnsiEncoding:Pb.StandardEncoding,e.flags&Ob.Symbolic&&(i=Pb.MacRomanEncoding,e.file||(/Symbol/i.test(e.name)?i=Pb.SymbolSetEncoding:/Dingbats/i.test(e.name)&&(i=Pb.ZapfDingbatsEncoding))),e.defaultEncoding=i),e.differences=j,e.baseEncodingName=k,e.dict=a},readToUnicode:function(a){var b,c=a;if(z(c))return b=Hb.create(c,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),b instanceof Fb?new ac(0,65535):new _b(b.getMap());if(D(c)){if(b=Hb.create(c,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),b instanceof Fb)return new ac(0,65535);var d=new Array(b.length);return b.forEach(function(a,b){for(var c=[],e=0;ed;d++){var f=b[d++]<<8|b[d];if(0!==f){var g=d>>1;c[g]=f}}return c},extractWidths:function(a,b,c,d){var e,f,g,h,i,j,k,l,m=[],n=0,o=[];if(d.composite){if(n=a.get("DW")||1e3,l=a.get("W"))for(f=0,g=l.length;g>f;f++)if(j=l[f++],k=b.fetchIfRef(l[f]),C(k))for(h=0,i=k.length;i>h;h++)m[j++]=k[h];else{var p=l[++f];for(h=j;k>=h;h++)m[h]=p}if(d.vertical){var q=a.get("DW2")||[880,-1e3];if(e=[q[1],.5*n,q[0]],q=a.get("W2"))for(f=0,g=q.length;g>f;f++)if(j=q[f++],k=b.fetchIfRef(q[f]),C(k))for(h=0,i=k.length;i>h;h++)o[j++]=[k[h++],k[h++],k[h]];else{var r=[q[++f],q[++f],q[++f]];for(h=j;k>=h;h++)o[h]=r}}}else{var s=d.firstChar;if(l=a.get("Widths")){for(h=s,f=0,g=l.length;g>f;f++)m[h++]=l[f];n=parseFloat(c.get("MissingWidth"))||0}else{var t=a.get("BaseFont");if(z(t)){var u=this.getBaseFontMetrics(t.name);m=this.buildCharCodeToWidth(u.widths,d),n=u.defaultWidth}}}var v=!0,w=n;for(var x in m){var y=m[x];if(y)if(w){if(w!==y){v=!1;break}}else w=y}v&&(d.flags|=Ob.FixedPitch),d.defaultWidth=n,d.widths=m,d.defaultVMetrics=e,d.vmetrics=o},isSerifFont:function(a){var b=a.split("-")[0];return b in Sb||-1!==b.search(/serif/gi)},getBaseFontMetrics:function(a){var b=0,c=[],d=!1,e=Qb[a]||a;e in Cc||(e=this.isSerifFont(a)?"Times-Roman":"Helvetica");var f=Cc[e];return x(f)?(b=f,d=!0):c=f,{defaultWidth:b,monospace:d,widths:c}},buildCharCodeToWidth:function(a,b){for(var c=Object.create(null),d=b.differences,e=b.defaultEncoding,f=0;256>f;f++)f in d&&a[d[f]]?c[f]=a[d[f]]:f in e&&a[e[f]]&&(c[f]=a[e[f]]);return c},preEvaluateFont:function(a,b){var d=a,f=a.get("Subtype");e(z(f),"invalid font Subtype");var g,h=!1;if("Type0"===f.name){var i=a.get("DescendantFonts");i||c("Descendant fonts are not specified"),a=C(i)?b.fetchIfRef(i[0]):i,f=a.get("Subtype"),e(z(f),"invalid font Subtype"),h=!0}var j=a.get("FontDescriptor");if(j){var k=new jd,l=d.getRaw("Encoding");if(z(l))k.update(l.name);else if(F(l))k.update(l.num+"_"+l.gen);else if(B(l))for(var m=l.getKeys(),n=0,o=m.length;o>n;n++){var p=l.getRaw(m[n]);z(p)?k.update(p.name):F(p)?k.update(p.num+"_"+p.gen):C(p)&&k.update(p.length.toString())}var q=a.get("ToUnicode")||d.get("ToUnicode");if(D(q)){var r=q.str||q;g=r.buffer?new Uint8Array(r.buffer.buffer,0,r.bufferLength):new Uint8Array(r.bytes.buffer,r.start,r.end-r.start),k.update(g)}else z(q)&&k.update(q.name);var s=a.get("Widths")||d.get("Widths");s&&(g=new Uint8Array(new Uint32Array(s).buffer),k.update(g))}return{descriptor:j,dict:a,baseDict:d,composite:h,type:f.name,hash:k?k.hexdigest():""}},translateFont:function(b,d){var f,g=b.baseDict,h=b.dict,i=b.composite,j=b.descriptor,k=b.type,l=i?65535:255;if(!j){if("Type3"!==k){var m=h.get("BaseFont");z(m)||c("Base font is not specified"),m=m.name.replace(/[,_]/g,"-");var n=this.getBaseFontMetrics(m),o=m.split("-")[0],p=(this.isSerifFont(o)?Ob.Serif:0)|(n.monospace?Ob.FixedPitch:0)|(Tb[o]?Ob.Symbolic:Ob.Nonsymbolic);return f={type:k,name:m,widths:n.widths,defaultWidth:n.defaultWidth,flags:p,firstChar:0,lastChar:l},this.extractDataStructures(h,h,d,f),f.widths=this.buildCharCodeToWidth(n.widths,f),new dc(m,null,f)}j=new Aa(null),j.set("FontName",ya.get(k)),j.set("FontBBox",h.get("FontBBox"))}var q=h.get("FirstChar")||0,r=h.get("LastChar")||l,s=j.get("FontName"),t=h.get("BaseFont");if(y(s)&&(s=ya.get(s)),y(t)&&(t=ya.get(t)),"Type3"!==k){var u=s&&s.name,v=t&&t.name;u!==v&&(a("The FontDescriptor's FontName is \""+u+'" but should be the same as the Font\'s BaseFont "'+v+'"'),u&&v&&0===v.indexOf(u)&&(s=t))}s=s||t,e(z(s),"invalid font name");var w=j.get("FontFile","FontFile2","FontFile3");if(w&&w.dict){var x=w.dict.get("Subtype");x&&(x=x.name);var A=w.dict.get("Length1"),B=w.dict.get("Length2")}if(f={type:k,name:s.name,subtype:x,file:w,length1:A,length2:B,loadedName:g.loadedName,composite:i,wideChars:i,fixedPitch:!1,fontMatrix:h.get("FontMatrix")||T,firstChar:q||0,lastChar:r||l,bbox:j.get("FontBBox"),ascent:j.get("Ascent"),descent:j.get("Descent"),xHeight:j.get("XHeight"),capHeight:j.get("CapHeight"),flags:j.get("Flags"),italicAngle:j.get("ItalicAngle"),coded:!1},i){var C=g.get("Encoding");z(C)&&(f.cidEncoding=C.name),f.cMap=Hb.create(C,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),f.vertical=f.cMap.vertical}return this.extractDataStructures(h,g,d,f),this.extractWidths(h,d,j,f),"Type3"===k&&(f.isType3Font=!0),new dc(s.name,w,f)}},d}(),wb=function(){function a(a,b,c){this.loadedName=a,this.font=b,this.dict=c,this.type3Loaded=null,this.sent=!1}return a.prototype={send:function(a){if(!this.sent){var b=this.font.exportData();a.send("commonobj",[this.loadedName,"Font",b]),this.sent=!0}},loadType3Data:function(a,c,d,f){if(e(this.font.isType3Font),this.type3Loaded)return this.type3Loaded;for(var g=this.font,h=Promise.resolve(),i=this.dict.get("CharProcs").getAll(),j=this.dict.get("Resources")||c,k=Object.keys(i),l={},m=0,n=k.length;n>m;++m)h=h.then(function(c){var e=i[c],g=new xb;return a.getOperatorList(e,f,j,g).then(function(){l[c]=g.getIR(),d.addDependencies(g.dependencies)},function(a){b('Type3 font resource "'+c+'" is not available');var d=new xb;l[c]=d.getIR()})}.bind(this,k[m]));return this.type3Loaded=h.then(function(){g.charProcOperatorList=l}),this.type3Loaded}},a}(),xb=function(){function a(a){for(var b=[],c=a.fnArray,d=a.argsArray,e=0,f=a.length;f>e;e++)switch(c[e]){case $.paintInlineImageXObject:case $.paintInlineImageXObjectGroup:case $.paintImageMaskXObject:var g=d[e][0];g.cached||b.push(g.data.buffer)}return b}function b(a,b,c){this.messageHandler=b,this.fnArray=[],this.argsArray=[],this.dependencies={},this.pageIndex=c,this.intent=a}var c=1e3,d=c-5;return b.prototype={get length(){return this.argsArray.length},addOp:function(a,b){this.fnArray.push(a),this.argsArray.push(b),this.messageHandler&&(this.fnArray.length>=c?this.flush():this.fnArray.length>=d&&(a===$.restore||a===$.endText)&&this.flush())},addDependency:function(a){a in this.dependencies||(this.dependencies[a]=!0,this.addOp($.dependency,[a]))},addDependencies:function(a){for(var b in a)this.addDependency(b)},addOpList:function(a){na.extendObj(this.dependencies,a.dependencies);for(var b=0,c=a.length;c>b;b++)this.addOp(a.fnArray[b],a.argsArray[b])},getIR:function(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}},flush:function(b){"oplist"!==this.intent&&(new Cb).optimize(this);var c=a(this);this.messageHandler.send("RenderPageChunk",{operatorList:{fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:b,length:this.length},pageIndex:this.pageIndex,intent:this.intent},c),this.dependencies={},this.fnArray.length=0,this.argsArray.length=0}},b}(),yb=function(){function a(a){this.state=a,this.stateStack=[]}return a.prototype={save:function(){var a=this.state;this.stateStack.push(this.state),this.state=a.clone()},restore:function(){var a=this.stateStack.pop();a&&(this.state=a)},transform:function(a){this.state.ctm=na.transform(this.state.ctm,a)}},a}(),zb=function(){function a(){this.ctm=new Float32Array(ma),this.fontSize=0,this.font=null,this.fontMatrix=T,this.textMatrix=ma.slice(),this.textLineMatrix=ma.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}return a.prototype={setTextMatrix:function(a,b,c,d,e,f){var g=this.textMatrix;g[0]=a,g[1]=b,g[2]=c,g[3]=d,g[4]=e,g[5]=f},setTextLineMatrix:function(a,b,c,d,e,f){var g=this.textLineMatrix;g[0]=a,g[1]=b,g[2]=c,g[3]=d,g[4]=e,g[5]=f},translateTextMatrix:function(a,b){var c=this.textMatrix;c[4]=c[0]*a+c[2]*b+c[4],c[5]=c[1]*a+c[3]*b+c[5]},translateTextLineMatrix:function(a,b){var c=this.textLineMatrix;c[4]=c[0]*a+c[2]*b+c[4],c[5]=c[1]*a+c[3]*b+c[5]},calcRenderMatrix:function(a){var b=[this.fontSize*this.textHScale,0,0,this.fontSize,0,this.textRise];return na.transform(a,na.transform(this.textMatrix,b))},carriageReturn:function(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()},clone:function(){var a=Object.create(this);return a.textMatrix=this.textMatrix.slice(),a.textLineMatrix=this.textLineMatrix.slice(),a.fontMatrix=this.fontMatrix.slice(),a}},a}(),Ab=function(){function a(){this.ctm=new Float32Array(ma),this.font=null,this.textRenderingMode=U.FILL,this.fillColorSpace=Xa.singletons.gray,this.strokeColorSpace=Xa.singletons.gray}return a.prototype={clone:function(){return Object.create(this)}},a}(),Bb=function(){function c(a,b,c){this.parser=new Fc(new Gc(a,d),!1,b),this.stateManager=c,this.nonProcessedArgs=[]}var d={w:{id:$.setLineWidth,numArgs:1,variableArgs:!1},J:{id:$.setLineCap,numArgs:1,variableArgs:!1},j:{id:$.setLineJoin,numArgs:1,variableArgs:!1},M:{id:$.setMiterLimit,numArgs:1,variableArgs:!1},d:{id:$.setDash,numArgs:2,variableArgs:!1},ri:{id:$.setRenderingIntent,numArgs:1,variableArgs:!1},i:{id:$.setFlatness,numArgs:1,variableArgs:!1},gs:{id:$.setGState,numArgs:1,variableArgs:!1},q:{id:$.save,numArgs:0,variableArgs:!1},Q:{id:$.restore,numArgs:0,variableArgs:!1},cm:{id:$.transform,numArgs:6,variableArgs:!1},m:{id:$.moveTo,numArgs:2,variableArgs:!1},l:{id:$.lineTo,numArgs:2,variableArgs:!1},c:{id:$.curveTo,numArgs:6,variableArgs:!1},v:{id:$.curveTo2,numArgs:4,variableArgs:!1},y:{id:$.curveTo3,numArgs:4,variableArgs:!1},h:{id:$.closePath,numArgs:0,variableArgs:!1},re:{id:$.rectangle,numArgs:4,variableArgs:!1},S:{id:$.stroke,numArgs:0,variableArgs:!1},s:{id:$.closeStroke,numArgs:0,variableArgs:!1},f:{id:$.fill,numArgs:0,variableArgs:!1},F:{id:$.fill,numArgs:0,variableArgs:!1},"f*":{id:$.eoFill,numArgs:0,variableArgs:!1},B:{id:$.fillStroke,numArgs:0,variableArgs:!1},"B*":{id:$.eoFillStroke,numArgs:0,variableArgs:!1},b:{id:$.closeFillStroke,numArgs:0,variableArgs:!1},"b*":{id:$.closeEOFillStroke,numArgs:0,variableArgs:!1},n:{id:$.endPath,numArgs:0,variableArgs:!1},W:{id:$.clip,numArgs:0,variableArgs:!1},"W*":{id:$.eoClip,numArgs:0,variableArgs:!1},BT:{id:$.beginText,numArgs:0,variableArgs:!1},ET:{id:$.endText,numArgs:0,variableArgs:!1},Tc:{id:$.setCharSpacing,numArgs:1,variableArgs:!1},Tw:{id:$.setWordSpacing,numArgs:1,variableArgs:!1},Tz:{id:$.setHScale,numArgs:1,variableArgs:!1},TL:{id:$.setLeading,numArgs:1,variableArgs:!1},Tf:{id:$.setFont,numArgs:2,variableArgs:!1},Tr:{id:$.setTextRenderingMode,numArgs:1,variableArgs:!1},Ts:{id:$.setTextRise,numArgs:1,variableArgs:!1},Td:{id:$.moveText,numArgs:2,variableArgs:!1},TD:{id:$.setLeadingMoveText,numArgs:2,variableArgs:!1},Tm:{id:$.setTextMatrix,numArgs:6,variableArgs:!1},"T*":{id:$.nextLine,numArgs:0,variableArgs:!1},Tj:{id:$.showText,numArgs:1,variableArgs:!1},TJ:{id:$.showSpacedText,numArgs:1,variableArgs:!1},"'":{id:$.nextLineShowText,numArgs:1,variableArgs:!1},'"':{id:$.nextLineSetSpacingShowText,numArgs:3,variableArgs:!1},d0:{id:$.setCharWidth,numArgs:2,variableArgs:!1},d1:{id:$.setCharWidthAndBounds,numArgs:6,variableArgs:!1},CS:{id:$.setStrokeColorSpace,numArgs:1,variableArgs:!1},cs:{id:$.setFillColorSpace,numArgs:1,variableArgs:!1},SC:{id:$.setStrokeColor,numArgs:4,variableArgs:!0},SCN:{id:$.setStrokeColorN,numArgs:33,variableArgs:!0},sc:{id:$.setFillColor,numArgs:4,variableArgs:!0},scn:{id:$.setFillColorN,numArgs:33,variableArgs:!0},G:{id:$.setStrokeGray,numArgs:1,variableArgs:!1},g:{id:$.setFillGray,numArgs:1,variableArgs:!1},RG:{id:$.setStrokeRGBColor,numArgs:3,variableArgs:!1},rg:{id:$.setFillRGBColor,numArgs:3,variableArgs:!1},K:{id:$.setStrokeCMYKColor,numArgs:4,variableArgs:!1},k:{id:$.setFillCMYKColor,numArgs:4,variableArgs:!1},sh:{id:$.shadingFill,numArgs:1,variableArgs:!1},BI:{id:$.beginInlineImage,numArgs:0,variableArgs:!1},ID:{id:$.beginImageData,numArgs:0,variableArgs:!1},EI:{id:$.endInlineImage,numArgs:1,variableArgs:!1},Do:{id:$.paintXObject,numArgs:1, -variableArgs:!1},MP:{id:$.markPoint,numArgs:1,variableArgs:!1},DP:{id:$.markPointProps,numArgs:2,variableArgs:!1},BMC:{id:$.beginMarkedContent,numArgs:1,variableArgs:!1},BDC:{id:$.beginMarkedContentProps,numArgs:2,variableArgs:!1},EMC:{id:$.endMarkedContent,numArgs:0,variableArgs:!1},BX:{id:$.beginCompat,numArgs:0,variableArgs:!1},EX:{id:$.endCompat,numArgs:0,variableArgs:!1},BM:null,BD:null,"true":null,fa:null,fal:null,fals:null,"false":null,nu:null,nul:null,"null":null};return c.prototype={get savedStatesDepth(){return this.stateManager.stateStack.length},read:function(c){for(var f=c.args;;){var g=this.parser.getObj();if(A(g)){var h=g.cmd,i=d[h];if(!i){b('Unknown command "'+h+'"');continue}var j=i.id,k=i.numArgs,l=null!==f?f.length:0;if(i.variableArgs)l>k&&a("Command "+j+": expected [0,"+k+"] args, but received "+l+" args");else{if(l!==k){for(var m=this.nonProcessedArgs;l>k;)m.push(f.shift()),l--;for(;k>l&&0!==m.length;)f||(f=[]),f.unshift(m.pop()),l++}if(k>l){a("Command "+j+": because expected "+k+" args, but received "+l+" args; skipping"),f=null;continue}}return this.preprocessCommand(j,f),c.fn=j,c.args=f,!0}if(R(g))return!1;null!==g&&(f||(f=[]),f.push(g instanceof Aa?g.getAll():g),e(f.length<=33,"Too many arguments"))}},preprocessCommand:function(a,b){switch(0|a){case $.save:this.stateManager.save();break;case $.restore:this.stateManager.restore();break;case $.transform:this.stateManager.transform(b)}}},c}(),Cb=function(){function a(a,b,c){for(var d=a,e=0,f=b.length-1;f>e;e++){var g=b[e];d=d[g]||(d[g]=[])}d[b[b.length-1]]=c}function b(a,b,c,d){for(var e=a+2,f=0;b>f;f++){var g=d[e+4*f],h=1===g.length&&g[0];if(!h||1!==h.width||1!==h.height||h.data.length&&(1!==h.data.length||0!==h.data[0]))break;c[e+4*f]=$.paintSolidColorImageMask}return b-f}function c(){}var d=[];return a(d,[$.save,$.transform,$.paintInlineImageXObject,$.restore],function(a){for(var b=10,c=200,d=1e3,e=1,f=a.fnArray,g=a.argsArray,h=a.iCurr,i=h-3,j=h-2,k=h-1,l=i+4,m=f.length;m>l+3&&f[l]===$.save&&f[l+1]===$.transform&&f[l+2]===$.paintInlineImageXObject&&f[l+3]===$.restore;)l+=4;var n=Math.min((l-i)/4,c);if(b>n)return l;var o,p=0,q=[],r=0,s=e,t=e;for(o=0;n>o;o++){var u=g[j+(o<<2)],v=g[k+(o<<2)][0];s+v.width>d&&(p=Math.max(p,s),t+=r+2*e,s=0,r=0),q.push({transform:u,x:s,y:t,w:v.width,h:v.height}),s+=v.width+2*e,r=Math.max(r,v.height)}var w=Math.max(p,s)+e,x=t+r+e,y=new Uint8Array(w*x*4),z=w<<2;for(o=0;n>o;o++){var A=g[k+(o<<2)][0].data,B=q[o].w<<2,C=0,D=q[o].x+q[o].y*w<<2;y.set(A.subarray(0,B),D-z);for(var E=0,F=q[o].h;F>E;E++)y.set(A.subarray(C,C+B),D),C+=B,D+=z;for(y.set(A.subarray(C-B,C),D);D>=0;)A[D-4]=A[D],A[D-3]=A[D+1],A[D-2]=A[D+2],A[D-1]=A[D+3],A[D+B]=A[D+B-4],A[D+B+1]=A[D+B-3],A[D+B+2]=A[D+B-2],A[D+B+3]=A[D+B-1],D-=z}return f.splice(i,4*n,$.paintInlineImageXObjectGroup),g.splice(i,4*n,[{width:w,height:x,kind:V.RGBA_32BPP,data:y},q]),i+1}),a(d,[$.save,$.transform,$.paintImageMaskXObject,$.restore],function(a){for(var c=10,d=100,e=1e3,f=a.fnArray,g=a.argsArray,h=a.iCurr,i=h-3,j=h-2,k=h-1,l=i+4,m=f.length;m>l+3&&f[l]===$.save&&f[l+1]===$.transform&&f[l+2]===$.paintImageMaskXObject&&f[l+3]===$.restore;)l+=4;var n=(l-i)/4;if(n=b(i,n,f,g),c>n)return l;var o,p,q,r=!1,s=g[k][0];if(0===g[j][1]&&0===g[j][2]){r=!0;var t=g[j][0],u=g[j][3];p=j+4;var v=k+4;for(o=1;n>o;o++,p+=4,v+=4)if(q=g[p],g[v][0]!==s||q[0]!==t||0!==q[1]||0!==q[2]||q[3]!==u){c>o?r=!1:n=o;break}}if(r){n=Math.min(n,e);var w=new Float32Array(2*n);for(p=j,o=0;n>o;o++,p+=4)q=g[p],w[o<<1]=q[4],w[(o<<1)+1]=q[5];f.splice(i,4*n,$.paintImageMaskXObjectRepeat),g.splice(i,4*n,[s,t,u,w])}else{n=Math.min(n,d);var x=[];for(o=0;n>o;o++){q=g[j+(o<<2)];var y=g[k+(o<<2)][0];x.push({data:y.data,width:y.width,height:y.height,transform:q})}f.splice(i,4*n,$.paintImageMaskXObjectGroup),g.splice(i,4*n,[x])}return i+1}),a(d,[$.save,$.transform,$.paintImageXObject,$.restore],function(a){var b=3,c=1e3,d=a.fnArray,e=a.argsArray,f=a.iCurr,g=f-3,h=f-2,i=f-1,j=f;if(0!==e[h][1]||0!==e[h][2])return j+1;for(var k=e[i][0],l=e[h][0],m=e[h][3],n=g+4,o=d.length;o>n+3&&d[n]===$.save&&d[n+1]===$.transform&&d[n+2]===$.paintImageXObject&&d[n+3]===$.restore&&e[n+1][0]===l&&0===e[n+1][1]&&0===e[n+1][2]&&e[n+1][3]===m&&e[n+2][0]===k;)n+=4;var p=Math.min((n-g)/4,c);if(b>p)return n;for(var q=new Float32Array(2*p),r=h,s=0;p>s;s++,r+=4){var t=e[r];q[s<<1]=t[4],q[(s<<1)+1]=t[5]}var u=[k,l,m,q];return d.splice(g,4*p,$.paintImageXObjectRepeat),e.splice(g,4*p,u),g+1}),a(d,[$.beginText,$.setFont,$.setTextMatrix,$.showText,$.endText],function(a){for(var b=3,c=1e3,d=a.fnArray,e=a.argsArray,f=a.iCurr,g=f-4,h=f-3,i=f-2,j=f-1,k=f,l=e[h][0],m=e[h][1],n=g+5,o=d.length;o>n+4&&d[n]===$.beginText&&d[n+1]===$.setFont&&d[n+2]===$.setTextMatrix&&d[n+3]===$.showText&&d[n+4]===$.endText&&e[n+1][0]===l&&e[n+1][1]===m;)n+=5;var p=Math.min((n-g)/5,c);if(b>p)return n;var q=g;g>=4&&d[g-4]===d[h]&&d[g-3]===d[i]&&d[g-2]===d[j]&&d[g-1]===d[k]&&e[g-4][0]===l&&e[g-4][1]===m&&(p++,q-=5);for(var r=q+4,s=1;p>s;s++)d.splice(r,3),e.splice(r,3),r+=2;return r+1}),c.prototype={optimize:function(a){for(var b,c=a.fnArray,e=a.argsArray,f={iCurr:0,fnArray:c,argsArray:e},g=0,h=c.length;h>g;)b=(b||d)[c[g]],"function"==typeof b?(f.iCurr=g,g=b(f),b=void 0,h=f.fnArray.length):g++}},c}(),Db=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Adobe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-UHC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJIS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPro-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"],Eb=function(){function a(a){this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=a}return a.prototype={addCodespaceRange:function(a,b,c){this.codespaceRanges[a-1].push(b,c),this.numCodespaceRanges++},mapCidRange:function(a,b,c){for(;b>=a;)this._map[a++]=c++},mapBfRange:function(a,b,c){for(var d=c.length-1;b>=a;)this._map[a++]=c,c=c.substr(0,d)+String.fromCharCode(c.charCodeAt(d)+1)},mapBfRangeToArray:function(a,b,c){for(var d=0,e=c.length;b>=a&&e>d;)this._map[a]=c[d++],++a},mapOne:function(a,b){this._map[a]=b},lookup:function(a){return this._map[a]},contains:function(a){return void 0!==this._map[a]},forEach:function(a){var b,c=this._map,d=c.length;if(65536>=d)for(b=0;d>b;b++)void 0!==c[b]&&a(b,c[b]);else for(b in this._map)a(b,c[b])},charCodeOf:function(a){return this._map.indexOf(a)},getMap:function(){return this._map},readCharCode:function(a,b,c){for(var d=0,e=this.codespaceRanges,f=this.codespaceRanges.length,g=0;f>g;g++){d=(d<<8|a.charCodeAt(b+g))>>>0;for(var h=e[g],i=0,j=h.length;j>i;){var k=h[i++],l=h[i++];if(d>=k&&l>=d)return c.charcode=d,void(c.length=g+1)}}c.charcode=0,c.length=1},get length(){return this._map.length},get isIdentityCMap(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(var a=0;65536>a;a++)if(this._map[a]!==a)return!1;return!0}},a}(),Fb=function(){function a(a,b){Eb.call(this),this.vertical=a,this.addCodespaceRange(b,0,65535)}return na.inherit(a,Eb,{}),a.prototype={addCodespaceRange:Eb.prototype.addCodespaceRange,mapCidRange:function(a,b,d){c("should not call mapCidRange")},mapBfRange:function(a,b,d){c("should not call mapBfRange")},mapBfRangeToArray:function(a,b,d){c("should not call mapBfRangeToArray")},mapOne:function(a,b){c("should not call mapCidOne")},lookup:function(a){return w(a)&&65535>=a?a:void 0},contains:function(a){return w(a)&&65535>=a},forEach:function(a){for(var b=0;65535>=b;b++)a(b,b)},charCodeOf:function(a){return w(a)&&65535>=a?a:-1},getMap:function(){for(var a=new Array(65536),b=0;65535>=b;b++)a[b]=b;return a},readCharCode:Eb.prototype.readCharCode,get length(){return 65536},get isIdentityCMap(){c("should not access .isIdentityCMap")}},a}(),Gb=function(){function a(a){var b=PDFJS.disableWorker,d=new XMLHttpRequest;if(d.open("GET",a,!1),!b)try{d.responseType="arraybuffer",b="arraybuffer"!==d.responseType}catch(e){b=!0}if(b&&d.overrideMimeType&&d.overrideMimeType("text/plain; charset=x-user-defined"),d.send(null),(b?d.responseText:d.response)||c("Unable to get binary cMap at: "+a),b){var f=Array.prototype.map.call(d.responseText,function(a){return 255&a.charCodeAt(0)});return new Uint8Array(f)}return new Uint8Array(d.response)}function b(a,b){for(var c=0,d=0;b>=d;d++)c=c<<8|a[d];return c>>>0}function d(a,b){return 1===b?String.fromCharCode(a[0],a[1]):3===b?String.fromCharCode(a[0],a[1],a[2],a[3]):String.fromCharCode.apply(null,a.subarray(0,b+1))}function f(a,b,c){for(var d=0,e=c;e>=0;e--)d+=a[e]+b[e],a[e]=255&d,d>>=8}function g(a,b){for(var c=1,d=b;d>=0&&c>0;d--)c+=a[d],a[d]=255&c,c>>=8}function h(a){this.buffer=a,this.pos=0,this.end=a.length,this.tmpBuf=new Uint8Array(l)}function i(i,j,l){var m=a(i),n=new h(m),o=n.readByte();j.vertical=!!(1&o);for(var p,q,r=null,s=new Uint8Array(k),t=new Uint8Array(k),u=new Uint8Array(k),v=new Uint8Array(k),w=new Uint8Array(k);(q=n.readByte())>=0;){var x=q>>5;if(7!==x){var y=!!(16&q),z=15&q;e(k>=z+1);var A,B=1,C=n.readNumber();switch(x){case 0:for(n.readHex(s,z),n.readHexNumber(t,z),f(t,s,z),j.addCodespaceRange(z+1,b(s,z),b(t,z)),A=1;C>A;A++)g(t,z),n.readHexNumber(s,z),f(s,t,z),n.readHexNumber(t,z),f(t,s,z),j.addCodespaceRange(z+1,b(s,z),b(t,z));break;case 1:for(n.readHex(s,z),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber(),A=1;C>A;A++)g(t,z),n.readHexNumber(s,z),f(s,t,z),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber();break;case 2:for(n.readHex(u,z),p=n.readNumber(),j.mapOne(b(u,z),p),A=1;C>A;A++)g(u,z),y||(n.readHexNumber(w,z),f(u,w,z)),p=n.readSigned()+(p+1),j.mapOne(b(u,z),p);break;case 3:for(n.readHex(s,z),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber(),j.mapCidRange(b(s,z),b(t,z),p),A=1;C>A;A++)g(t,z),y?s.set(t):(n.readHexNumber(s,z),f(s,t,z)),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber(),j.mapCidRange(b(s,z),b(t,z),p);break;case 4:for(n.readHex(u,B),n.readHex(v,z),j.mapOne(b(u,B),d(v,z)),A=1;C>A;A++)g(u,B),y||(n.readHexNumber(w,B),f(u,w,B)),g(v,z),n.readHexSigned(w,z),f(v,w,z),j.mapOne(b(u,B),d(v,z));break;case 5:for(n.readHex(s,B),n.readHexNumber(t,B),f(t,s,B),n.readHex(v,z),j.mapBfRange(b(s,B),b(t,B),d(v,z)),A=1;C>A;A++)g(t,B),y?s.set(t):(n.readHexNumber(s,B),f(s,t,B)),n.readHexNumber(t,B),f(t,s,B),n.readHex(v,z),j.mapBfRange(b(s,B),b(t,B),d(v,z));break;default:c("Unknown type: "+x)}}else switch(31&q){case 0:n.readString();break;case 1:r=n.readString()}}return r&&l(r),j}function j(){}var k=16,l=19;return h.prototype={readByte:function(){return this.pos>=this.end?-1:this.buffer[this.pos++]},readNumber:function(){var a,b=0;do{var d=this.readByte();0>d&&c("unexpected EOF in bcmap"),a=!(128&d),b=b<<7|127&d}while(!a);return b},readSigned:function(){var a=this.readNumber();return 1&a?~(a>>>1):a>>>1},readHex:function(a,b){a.set(this.buffer.subarray(this.pos,this.pos+b+1)),this.pos+=b+1},readHexNumber:function(a,b){var d,e=this.tmpBuf,f=0;do{var g=this.readByte();0>g&&c("unexpected EOF in bcmap"),d=!(128&g),e[f++]=127&g}while(!d);for(var h=b,i=0,j=0;h>=0;){for(;8>j&&e.length>0;)i=e[--f]<>=8,j-=8}},readHexSigned:function(a,b){this.readHexNumber(a,b);for(var c=1&a[b]?255:0,d=0,e=0;b>=e;e++)d=(1&d)<<8|a[e],a[e]=d>>1^c},readString:function(){for(var a=this.readNumber(),b="",c=0;a>c;c++)b+=String.fromCharCode(this.readNumber());return b}},j.prototype={read:i},j}(),Hb=function(){function a(a){for(var b=0,c=0;c>>0}function d(a){y(a)||c("Malformed CMap: expected string.")}function f(a){w(a)||c("Malformed CMap: expected int.")}function g(b,c){for(;;){var e=c.getObj();if(R(e))break;if(A(e,"endbfchar"))return;d(e);var f=a(e);e=c.getObj(),d(e);var g=e;b.mapOne(f,g)}}function h(b,e){for(;;){var f=e.getObj();if(R(f))break;if(A(f,"endbfrange"))return;d(f);var g=a(f);f=e.getObj(),d(f);var h=a(f);if(f=e.getObj(),w(f)||y(f)){var i=w(f)?String.fromCharCode(f):f;b.mapBfRange(g,h,i)}else{if(!A(f,"["))break;f=e.getObj();for(var j=[];!A(f,"]")&&!R(f);)j.push(f),f=e.getObj();b.mapBfRangeToArray(g,h,j)}}c("Invalid bf range.")}function i(b,c){for(;;){var e=c.getObj();if(R(e))break;if(A(e,"endcidchar"))return;d(e);var g=a(e);e=c.getObj(),f(e);var h=e;b.mapOne(g,h)}}function j(b,c){for(;;){var e=c.getObj();if(R(e))break;if(A(e,"endcidrange"))return;d(e);var g=a(e);e=c.getObj(),d(e);var h=a(e);e=c.getObj(),f(e);var i=e;b.mapCidRange(g,h,i)}}function k(b,d){for(;;){var e=d.getObj();if(R(e))break;if(A(e,"endcodespacerange"))return;if(!y(e))break;var f=a(e);if(e=d.getObj(),!y(e))break;var g=a(e);b.addCodespaceRange(e.length,f,g)}c("Invalid codespace range.")}function l(a,b){var c=b.getObj();w(c)&&(a.vertical=!!c)}function m(a,b){var c=b.getObj();z(c)&&y(c.name)&&(a.name=c.name)}function n(a,b,c,d){var e,f;a:for(;;){var n=b.getObj();if(R(n))break;if(z(n))"WMode"===n.name?l(a,b):"CMapName"===n.name&&m(a,b),e=n;else if(A(n))switch(n.cmd){case"endcmap":break a;case"usecmap":z(e)&&(f=e.name);break;case"begincodespacerange":k(a,b);break;case"beginbfchar":g(a,b);break;case"begincidchar":i(a,b);break;case"beginbfrange":h(a,b);break;case"begincidrange":j(a,b)}}!d&&f&&(d=f),d&&o(a,c,d)}function o(a,b,c){if(a.useCMap=q(c,b),0===a.numCodespaceRanges){for(var d=a.useCMap.codespaceRanges,e=0;e=b;b++)a(b,b)},has:function(a){return this.firstChar<=a&&a<=this.lastChar},get:function(a){return this.firstChar<=a&&a<=this.lastChar?String.fromCharCode(a):void 0},charCodeOf:function(a){c("should not call .charCodeOf")}},a}(),bc=function(){function a(a,b,c){a[b]=c>>8&255,a[b+1]=255&c}function b(a,b,c){a[b]=c>>24&255,a[b+1]=c>>16&255,a[b+2]=c>>8&255,a[b+3]=255&c}function c(a,b,c){var d,e;if(c instanceof Uint8Array)a.set(c,b);else if("string"==typeof c)for(d=0,e=c.length;e>d;d++)a[b++]=255&c.charCodeAt(d);else for(d=0,e=c.length;e>d;d++)a[b++]=255&c[d]}function d(a){this.sfnt=a,this.tables=Object.create(null)}d.getSearchParams=function(a,b){for(var c=1,d=0;(c^a)>c;)c<<=1,d++;var e=c*b;return{range:e,entry:d,rangeShift:b*a-e}};var e=12,f=16;return d.prototype={toArray:function(){var g=this.sfnt,h=this.tables,i=Object.keys(h);i.sort();var j,l,m,n,o,p=i.length,q=e+p*f,r=[q];for(j=0;p>j;j++){n=h[i[j]];var s=(n.length+3&-4)>>>0;q+=s,r.push(q)}var t=new Uint8Array(q);for(j=0;p>j;j++)n=h[i[j]],c(t,r[j],n);"true"===g&&(g=k(65536)),t[0]=255&g.charCodeAt(0),t[1]=255&g.charCodeAt(1),t[2]=255&g.charCodeAt(2),t[3]=255&g.charCodeAt(3),a(t,4,p);var u=d.getSearchParams(p,16);for(a(t,6,u.range),a(t,8,u.entry),a(t,10,u.rangeShift),q=e,j=0;p>j;j++){o=i[j],t[q]=255&o.charCodeAt(0),t[q+1]=255&o.charCodeAt(1),t[q+2]=255&o.charCodeAt(2),t[q+3]=255&o.charCodeAt(3);var v=0;for(l=r[j],m=r[j+1];m>l;l+=4){var w=(t[l]<<24)+(t[l+1]<<16)+(t[l+2]<<8)+t[l+3];v=v+w|0}b(t,q+4,v),b(t,q+8,r[j]),b(t,q+12,h[o].length),q+=f}return t},addTable:function(a,b){if(a in this.tables)throw new Error("Table "+a+" already exists");this.tables[a]=b}},d}(),cc=new Int32Array([0,32,127,161,173,174,1536,1920,2208,4256,6016,6144,8192,8208,8209,8210,8232,8240,8287,8304,9676,9677,43616,43648,65520,65536]),dc=function(){function d(d,e,f){var g,h,i;this.name=d,this.loadedName=f.loadedName,this.isType3Font=f.isType3Font,this.sizes=[],this.glyphCache={};var j=d.split("+");j=j.length>1?j[1]:j[0],j=j.split(/[-,_]/g)[0],this.isSerifFont=!!(f.flags&Ob.Serif),this.isSymbolicFont=!!(f.flags&Ob.Symbolic),this.isMonospace=!!(f.flags&Ob.FixedPitch);var k=f.type,l=f.subtype;if(this.type=k,this.fallbackName=this.isMonospace?"monospace":this.isSerifFont?"serif":"sans-serif",this.differences=f.differences,this.widths=f.widths,this.defaultWidth=f.defaultWidth,this.composite=f.composite,this.wideChars=f.wideChars,this.cMap=f.cMap,this.ascent=f.ascent/Lb,this.descent=f.descent/Lb,this.fontMatrix=f.fontMatrix,this.bbox=f.bbox,this.toUnicode=f.toUnicode=this.buildToUnicode(f),this.toFontChar=[],"Type3"===f.type){for(g=0;256>g;g++)this.toFontChar[g]=this.differences[g]||f.defaultEncoding[g];return void(this.fontType=Z.TYPE3)}if(this.cidEncoding=f.cidEncoding,this.vertical=f.vertical,this.vertical&&(this.vmetrics=f.vmetrics,this.defaultVMetrics=f.defaultVMetrics),!e||e.isEmpty){e&&b('Font file is empty in "'+d+'" ('+this.loadedName+")"),this.missingFile=!0;var o=d.replace(/[,_]/g,"-"),p=!!Qb[o]||!(!Rb[o]||!Qb[Rb[o]]);if(o=Qb[o]||Rb[o]||o,this.bold=-1!==o.search(/bold/gi),this.italic=-1!==o.search(/oblique/gi)||-1!==o.search(/italic/gi),this.black=-1!==d.search(/Black/g),this.remeasure=Object.keys(this.widths).length>0,p&&"CIDFontType2"===k&&0===f.cidEncoding.indexOf("Identity-")){var q=[];for(g in Ub)q[+g]=Ub[g];if(/ArialBlack/i.test(d))for(g in Vb)q[+g]=Vb[g];var r=this.toUnicode instanceof ac;r||this.toUnicode.forEach(function(a,b){q[+a]=b}),this.toFontChar=q,this.toUnicode=new _b(q)}else if(/Symbol/i.test(o)){var s=Pb.SymbolSetEncoding;for(g in s)i=zc[s[g]],i&&(this.toFontChar[g]=i);for(g in f.differences)i=zc[f.differences[g]],i&&(this.toFontChar[g]=i)}else if(/Dingbats/i.test(o)){/Wingdings/i.test(d)&&b("Wingdings font without embedded font file, falling back to the ZapfDingbats encoding.");var t=Pb.ZapfDingbatsEncoding;for(g in t)i=Ac[t[g]],i&&(this.toFontChar[g]=i);for(g in f.differences)i=Ac[f.differences[g]],i&&(this.toFontChar[g]=i)}else if(p){this.toFontChar=[];for(g in f.defaultEncoding)h=f.differences[g]||f.defaultEncoding[g],this.toFontChar[g]=zc[h]}else{var u=-1===k.indexOf("CIDFontType");this.toUnicode.forEach(function(a,b){u&&(h=f.differences[a]||f.defaultEncoding[a],b=zc[h]||b),this.toFontChar[a]=b}.bind(this))}return this.loadedName=o.split("-")[0],this.loading=!1,void(this.fontType=P(k,l))}"Type1C"===l&&"Type1"!==k&&"MMType1"!==k&&(m(e)?l="TrueType":k="Type1"),"CIDFontType0C"===l&&"CIDFontType0"!==k&&(k="CIDFontType0"),"OpenType"===l&&(k="OpenType"),"CIDFontType0"===k&&(l=n(e)?"CIDFontType0":"CIDFontType0C");var v;switch(k){case"MMType1":a("MMType1 font ("+d+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";var w="Type1C"===l||"CIDFontType0C"===l?new jc(e,f):new ic(d,e,f);O(f),v=this.convert(d,w,f);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",v=this.checkAndRepair(d,e,f),this.isOpenType&&(k="OpenType");break;default:c("Font "+k+" is not supported")}this.data=v,this.fontType=P(k,l),this.fontMatrix=f.fontMatrix,this.widths=f.widths,this.defaultWidth=f.defaultWidth,this.encoding=f.baseEncoding,this.seacMap=f.seacMap,this.loading=!0}function f(a,b){return(a<<8)+b}function h(a,b,c,d){return(a<<24)+(b<<16)+(c<<8)+d}function j(a){return String.fromCharCode(a>>8&255,255&a)}function l(a){return a=a>32767?32767:-32768>a?-32768:a,String.fromCharCode(a>>8&255,255&a)}function m(a){var b=a.peekBytes(4);return 65536===o(b,0)}function n(a){var b=a.peekBytes(2);return 37===b[0]&&33===b[1]?!0:128===b[0]&&1===b[1]?!0:!1}function p(a){for(var b=0,c=cc.length-1;c>b;){var d=b+c+1>>1;a=i)do l=i++,Kb&&61440===l&&(l=61472,i=l+1);while(void 0!==h[l]&&Jb>=i);f[l]=k,g[j]=l,h[l]=!0}return{toFontChar:g,charCodeToGlyphId:f,nextAvailableFontCharCode:i}}function r(a){var b=[];for(var c in a)b.push({fontCharCode:0|c,glyphId:a[c]});b.sort(function(a,b){return a.fontCharCode-b.fontCharCode});for(var d=[],e=b.length,f=0;e>f;){var g=b[f].fontCharCode,h=[b[f].glyphId];++f;for(var i=g;e>f&&i+1===b[f].fontCharCode&&(h.push(b[f].glyphId),++i,++f,65535!==i););d.push([g,i,h])}return d}function s(a){var b,c,d,e,f=r(a),g=f[f.length-1][1]>65535?2:1,h="\x00\x00"+j(g)+"\x00\x00"+k(4+8*g);for(b=f.length-1;b>=0&&!(f[b][0]<=65535);--b);var i=b+1;f[b][0]<65535&&65535===f[b][1]&&(f[b][1]=65534); -var l,m,n,o,p=f[b][1]<65535?1:0,q=i+p,s=bc.getSearchParams(q,2),t="",u="",v="",w="",x="",y=0;for(b=0,c=i;c>b;b++){l=f[b],m=l[0],n=l[1],t+=j(m),u+=j(n),o=l[2];var z=!0;for(d=1,e=o.length;e>d;++d)if(o[d]!==o[d-1]+1){z=!1;break}if(z){var A=o[0];v+=j(A-m&65535),w+=j(0)}else{var B=2*(q-b)+2*y;for(y+=n-m+1,v+=j(0),w+=j(B),d=0,e=o.length;e>d;++d)x+=j(o[d])}}p>0&&(u+="ÿÿ",t+="ÿÿ",v+="\x00",w+="\x00\x00");var C="\x00\x00"+j(2*q)+j(s.range)+j(s.entry)+j(s.rangeShift)+u+"\x00\x00"+t+v+w+x,D="",E="";if(g>1){for(h+="\x00\x00\n"+k(4+8*g+4+C.length),D="",b=0,c=f.length;c>b;b++){l=f[b],m=l[0],o=l[2];var F=o[0];for(d=1,e=o.length;e>d;++d)o[d]!==o[d-1]+1&&(n=l[0]+d-1,D+=k(m)+k(n)+k(F),m=n+1,F=o[d]);D+=k(m)+k(l[1])+k(F)}E="\x00\f\x00\x00"+k(D.length+16)+"\x00\x00\x00\x00"+k(D.length/12)}return h+"\x00"+j(C.length+4)+C+E+D}function t(a){var b=new Mc(a.data),c=b.getUint16();b.getBytes(60);var d=b.getUint16();if(4>c&&768&d)return!1;var e=b.getUint16(),f=b.getUint16();if(e>f)return!1;b.getBytes(6);var g=b.getUint16();return 0===g?!1:(a.data[8]=a.data[9]=0,!0)}function u(a,b,d){d=d||{unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};var e=0,f=0,g=0,h=0,i=null,l=0;if(b)for(var m in b){m|=0,(i>m||!i)&&(i=m),m>l&&(l=m);var n=L(m);32>n?e|=1<n?f|=1<n?g|=1<n?h|=1< 123 are reserved for internal usage")}else i=0,l=255;var o=a.bbox||[0,0,0,0],p=d.unitsPerEm||1/(a.fontMatrix||T)[0],q=a.ascentScaled?1:p/Lb,r=d.ascent||Math.round(q*(a.ascent||o[3])),s=d.descent||Math.round(q*(a.descent||o[1]));s>0&&a.descent>0&&o[1]<0&&(s=-s);var t=d.yMax||r,u=-d.yMin||-s;return"\x00$ô\x00\x00\x00Š»\x00\x00\x00ŒŠ»\x00\x00ß\x001\x00\x00\x00\x00"+String.fromCharCode(a.fixedPitch?9:0)+"\x00\x00\x00\x00\x00\x00"+k(e)+k(f)+k(g)+k(h)+"*21*"+j(a.italicAngle?1:0)+j(i||a.firstChar)+j(l||a.lastChar)+j(r)+j(s)+"\x00d"+j(t)+j(u)+"\x00\x00\x00\x00\x00\x00\x00\x00"+j(a.xHeight)+j(a.capHeight)+j(0)+j(i||a.firstChar)+"\x00"}function v(a){var b=Math.floor(a.italicAngle*Math.pow(2,16));return"\x00\x00\x00"+k(b)+"\x00\x00\x00\x00"+k(a.fixedPitch)+"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"}function w(a,b){b||(b=[[],[]]);var c,d,e,f,g,h=[b[0][0]||"Original licence",b[0][1]||a,b[0][2]||"Unknown",b[0][3]||"uniqueID",b[0][4]||a,b[0][5]||"Version 0.11",b[0][6]||"",b[0][7]||"Unknown",b[0][8]||"Unknown",b[0][9]||"Unknown"],i=[];for(c=0,d=h.length;d>c;c++){g=b[1][c]||h[c];var k=[];for(e=0,f=g.length;f>e;e++)k.push(j(g.charCodeAt(e)));i.push(k.join(""))}var l=[h,i],m=["\x00","\x00"],n=["\x00\x00","\x00"],o=["\x00\x00"," "],p=h.length*m.length,q="\x00\x00"+j(p)+j(12*p+6),r=0;for(c=0,d=m.length;d>c;c++){var s=l[c];for(e=0,f=s.length;f>e;e++){g=s[e];var t=m[c]+n[c]+o[c]+j(e)+j(g.length)+j(r);q+=t,r+=g.length}}return q+=h.join("")+i.join("")}return d.getFontID=function(){var a=1;return function(){return String(a++)}}(),d.prototype={name:null,font:null,mimetype:null,encoding:null,get renderer(){var a=yc.create(this);return g(this,"renderer",a)},exportData:function(){var a={};for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},checkAndRepair:function(d,g,j){function k(a){var b=i(a.getBytes(4)),c=a.getInt32(),d=a.getInt32()>>>0,e=a.getInt32()>>>0,f=a.pos;a.pos=a.start?a.start:0,a.skip(d);var g=a.getBytes(e);return a.pos=f,"head"===b&&(g[8]=g[9]=g[10]=g[11]=0,g[17]|=32),{tag:b,checksum:c,length:e,offset:d,data:g}}function l(a){return{version:i(a.getBytes(4)),numTables:a.getUint16(),searchRange:a.getUint16(),entrySelector:a.getUint16(),rangeShift:a.getUint16()}}function m(a,c,d,e){var f,g=(c.start?c.start:0)+a.offset;c.pos=g;for(var h,i=(c.getUint16(),c.getUint16()),j=!1,k=0;i>k;k++){var l=c.getUint16(),m=c.getUint16(),n=c.getInt32()>>>0,o=!1;if(0===l&&0===m?o=!0:1===l&&0===m?o=!0:3!==l||1!==m||(d||!e)&&h?d&&3===l&&0===m&&(o=!0,j=!0):(o=!0,d||(j=!0)),o&&(h={platformId:l,encodingId:m,offset:n}),j)break}if(h&&(c.pos=g+h.offset),!h||-1===c.peekByte())return b("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var p,q,r=c.getUint16(),s=(c.getUint16(),c.getUint16(),!1),t=[];if(0===r){for(p=0;256>p;p++){var u=c.getByte();u&&t.push({charCode:p,glyphId:u})}s=!0}else if(4===r){var v=c.getUint16()>>1;c.getBytes(6);var w,x=[];for(w=0;v>w;w++)x.push({end:c.getUint16()});for(c.getUint16(),w=0;v>w;w++)x[w].start=c.getUint16();for(w=0;v>w;w++)x[w].delta=c.getUint16();var y=0;for(w=0;v>w;w++){f=x[w];var z=c.getUint16();if(z){var A=(z>>1)-(v-w);f.offsetIndex=A,y=Math.max(y,A+f.end-f.start+1)}else f.offsetIndex=-1}var B=[];for(p=0;y>p;p++)B.push(c.getUint16());for(w=0;v>w;w++){f=x[w],g=f.start;var C=f.end,D=f.delta;for(A=f.offsetIndex,p=g;C>=p;p++)65535!==p&&(q=0>A?p:B[A+p-g],q=q+D&65535,0!==q&&t.push({charCode:p,glyphId:q}))}}else{if(6!==r)return b("cmap table has unsupported format: "+r),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var E=c.getUint16(),F=c.getUint16();for(p=0;F>p;p++){q=c.getUint16();var G=E+p;t.push({charCode:G,glyphId:q})}}for(t.sort(function(a,b){return a.charCode-b.charCode}),k=1;ke&&(a("The numOfMetrics ("+f+") should not be greater than the numGlyphs ("+e+")"),f=e,c.data[34]=(65280&f)>>8,c.data[35]=255&f);var g=e-f,h=g-(d.length-4*f>>1);if(h>0){var i=new Uint8Array(d.length+2*h);i.set(d.data),d.data=i}}function o(a,b,c,d,e,f){if(12>=c-b)return 0;var g=a.subarray(b,c),h=g[0]<<8|g[1];if(32768&h)return d.set(g,e),g.length;var i,j=10,k=0;for(i=0;h>i;i++){var l=g[j]<<8|g[j+1];k=l+1,j+=2}var m=j,n=g[j]<<8|g[j+1];j+=2+n;var o=j,p=0;for(i=0;k>i;i++){var q=g[j++];192&q&&(g[j-1]=63&q);var r=(2&q?1:16&q?0:2)+(4&q?1:32&q?0:2);if(p+=r,8&q){var s=g[j++];i+=s,p+=s*r}}if(0===p)return 0;var t=j+p;return t>g.length?0:!f&&n>0?(d.set(g.subarray(0,m),e),d.set([0,0],e+m),d.set(g.subarray(o,t),e+m+2),t-=n,g.length-t>3&&(t=t+3&-4),t):g.length-t>3?(t=t+3&-4,d.set(g.subarray(0,t),e),t):(d.set(g,e),g.length)}function p(c,d,e){var g=c.data,i=h(g[0],g[1],g[2],g[3]);i>>16!==1&&(a("Attempting to fix invalid version in head table: "+i),g[0]=0,g[1]=1,g[2]=0,g[3]=0);var j=f(g[50],g[51]);if(0>j||j>1){a("Attempting to fix invalid indexToLocFormat in head table: "+j);var k=d+1;e===k<<1?(g[50]=0,g[51]=0):e===k<<2?(g[50]=0,g[51]=1):b("Could not fix indexToLocFormat: "+j)}}function r(a,b,c,d,e,f){var g,h,i;d?(g=4,h=function(a,b){return a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3]},i=function(a,b,c){a[b]=c>>>24&255,a[b+1]=c>>16&255,a[b+2]=c>>8&255,a[b+3]=255&c}):(g=2,h=function(a,b){return a[b]<<9|a[b+1]<<1},i=function(a,b,c){a[b]=c>>9&255,a[b+1]=c>>1&255});var j=a.data,k=g*(1+c);j.length!==k&&(j=new Uint8Array(k),j.set(a.data.subarray(0,k)),a.data=j);var l=b.data,m=l.length,n=new Uint8Array(m),p=h(j,0),q=0,r={};i(j,0,q);var s,t;for(s=0,t=g;c>s;s++,t+=g){var u=h(j,t);if(u>m&&(m+3&-4)===u&&(u=m),u>m)i(j,t,q),p=u;else{p===u&&(r[s]=!0);var v=o(l,p,u,n,q,e);q+=v,i(j,t,q),p=u}}if(0===q){var w=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(s=0,t=g;c>s;s++,t+=g)i(j,t,w.length);return b.data=w,r}if(f){var x=h(j,g);n.length>x+q?b.data=n.subarray(0,x+q):(b.data=new Uint8Array(x+q),b.data.set(n.subarray(0,q))),b.data.set(n.subarray(0,x),q),i(a.data,j.length-g,q+x)}else b.data=n.subarray(0,q);return r}function y(a,c,d){var e=(g.start?g.start:0)+a.offset;g.pos=e;var f=a.length,h=e+f,i=g.getInt32();g.getBytes(28);var j,k,l=!0;switch(i){case 65536:j=Yb;break;case 131072:var m=g.getUint16();if(m!==d){l=!1;break}var n=[];for(k=0;m>k;++k){var o=g.getUint16();if(o>=32768){l=!1;break}n.push(o)}if(!l)break;for(var p=[],q=[];g.posk;++k)q[k]=String.fromCharCode(g.getByte());p.push(q.join(""))}for(j=[],k=0;m>k;++k){var s=n[k];258>s?j.push(Yb[s]):j.push(p[s-258])}break;case 196608:break;default:b("Unknown/unsupported post table version "+i),l=!1,c.defaultEncoding&&(j=c.defaultEncoding)}return c.glyphNames=j,l}function z(a){var b=(g.start?g.start:0)+a.offset;g.pos=b;var c=[[],[]],d=a.length,e=b+d,f=g.getUint16(),h=6;if(0!==f||h>d)return c;var j,k,l=g.getUint16(),m=g.getUint16(),n=[],o=12;for(j=0;l>j&&g.pos+o<=e;j++){var p={platform:g.getUint16(),encoding:g.getUint16(),language:g.getUint16(),name:g.getUint16(),length:g.getUint16(),offset:g.getUint16()};(1===p.platform&&0===p.encoding&&0===p.language||3===p.platform&&1===p.encoding&&1033===p.language)&&n.push(p)}for(j=0,k=n.length;k>j;j++){var q=n[j],r=b+m+q.offset;if(!(r+q.length>e)){g.pos=r;var s=q.name;if(q.encoding){for(var t="",u=0,v=q.length;v>u;u+=2)t+=String.fromCharCode(g.getUint16());c[1][s]=t}else c[0][s]=i(g.getBytes(q.length))}}return c}function A(a,c){for(var d,e,f,g,h,i=a.data,j=0,k=0,l=0,m=[],n=[],o=[],p=c.tooComplexToFollowFunctions,q=!1,r=0,s=0,t=i.length;t>j;){var u=i[j++];if(64===u)if(e=i[j++],q||s)j+=e;else for(d=0;e>d;d++)m.push(i[j++]);else if(65===u)if(e=i[j++],q||s)j+=2*e;else for(d=0;e>d;d++)f=i[j++],m.push(f<<8|i[j++]);else if(176===(248&u))if(e=u-176+1,q||s)j+=e;else for(d=0;e>d;d++)m.push(i[j++]);else if(184===(248&u))if(e=u-184+1,q||s)j+=2*e;else for(d=0;e>d;d++)f=i[j++],m.push(f<<8|i[j++]);else if(43!==u||p)if(44!==u||p){if(45===u)if(q)q=!1,k=j;else{if(h=n.pop(),!h)return b("TT: ENDF bad stack"),void(c.hintsValid=!1);g=o.pop(),i=h.data,j=h.i,c.functionsStackDeltas[g]=m.length-h.stackTop}else if(137===u)(q||s)&&(b("TT: nested IDEFs not allowed"),p=!0),q=!0,l=j;else if(88===u)++r;else if(27===u)s=r;else if(89===u)s===r&&(s=0),--r;else if(28===u&&!q&&!s){var v=m[m.length-1];v>0&&(j+=v-1)}}else(q||s)&&(b("TT: nested FDEFs not allowed"),p=!0),q=!0,l=j,g=m.pop(),c.functionsDefined[g]={data:i,i:j};else if(!q&&!s)if(g=m[m.length-1],c.functionsUsed[g]=!0,g in c.functionsStackDeltas)m.length+=c.functionsStackDeltas[g];else if(g in c.functionsDefined&&o.indexOf(g)<0){if(n.push({data:i,i:j,stackTop:m.length-1}),o.push(g),h=c.functionsDefined[g],!h)return b("TT: CALL non-existent function"),void(c.hintsValid=!1);i=h.data,j=h.i}if(!q&&!s){var w=142>=u?F[u]:u>=192&&223>=u?-1:u>=224?-2:0;for(u>=113&&117>=u&&(e=m.pop(),e===e&&(w=2*-e));0>w&&m.length>0;)m.pop(),w++;for(;w>0;)m.push(NaN),w--}}c.tooComplexToFollowFunctions=p;var x=[i];j>i.length&&x.push(new Uint8Array(j-i.length)),l>k&&(b("TT: complementing a missing function tail"),x.push(new Uint8Array([34,45]))),C(a,x)}function B(a,c){if(!a.tooComplexToFollowFunctions){if(a.functionsDefined.length>c)return b("TT: more functions defined than expected"),void(a.hintsValid=!1);for(var d=0,e=a.functionsUsed.length;e>d;d++){if(d>c)return b("TT: invalid function id: "+d),void(a.hintsValid=!1);if(a.functionsUsed[d]&&!a.functionsDefined[d])return b("TT: undefined function: "+d),void(a.hintsValid=!1)}}}function C(a,b){if(b.length>1){var c,d,e=0;for(c=0,d=b.length;d>c;c++)e+=b[c].length;e=e+3&-4;var f=new Uint8Array(e),g=0;for(c=0,d=b.length;d>c;c++)f.set(b[c],g),g+=b[c].length;a.data=f,a.length=e}}function D(a,b,c){var d={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(a&&A(a,d),b&&A(b,d),a&&B(d,R),c&&1&c.length){var e=new Uint8Array(c.length+1);e.set(c.data),c.data=e}return d.hintsValid}function E(a,b,c){return V[a]?!aa&&b>=0&&$.has(b)?!0:_&&c>=0&&x(_[c])?!0:!1:!0}var F=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];g=new Mc(new Uint8Array(g.getBytes()));for(var G,H,I,J=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "],K=l(g),L=K.numTables,M={"OS/2":null,cmap:null,head:null,hhea:null,hmtx:null,maxp:null,name:null,post:null},N=0;L>N;N++)I=k(g),J.indexOf(I.tag)<0||0!==I.length&&(M[I.tag]=I);var O=!M["CFF "];if(O)M.glyf&&M.loca||c('Required "glyf" or "loca" tables are not found'),this.isOpenType=!1;else{if("OTTO"===K.version&&"CIDFontType2"!==j.type||!M.head||!M.hhea||!M.maxp||!M.post)return H=new Mc(M["CFF "].data),G=new jc(H,j),this.convert(d,G,j);delete M.glyf,delete M.loca,delete M.fpgm,delete M.prep,delete M["cvt "],this.isOpenType=!0}M.maxp||c('Required "maxp" table is not found'),g.pos=(g.start||0)+M.maxp.offset;var P=g.getInt32(),Q=g.getUint16(),R=0;if(P>=65536&&M.maxp.length>=22){g.pos+=8;var S=g.getUint16();S>2&&(M.maxp.data[14]=0,M.maxp.data[15]=2),g.pos+=4,R=g.getUint16()}var T=!1;"CIDFontType2"===j.type&&j.toUnicode&&j.toUnicode.get(0)>"\x00"&&(T=!0,Q++,M.maxp.data[4]=Q>>8,M.maxp.data[5]=255&Q);var U=D(M.fpgm,M.prep,M["cvt "],R);U||(delete M.fpgm,delete M.prep,delete M["cvt "]),n(g,M.hhea,M.hmtx,Q),M.head||c('Required "head" table is not found'),p(M.head,Q,O?M.loca.length:0);var V={};if(O){var W=f(M.head.data[50],M.head.data[51]);V=r(M.loca,M.glyf,Q,W,U,T)}if(M.hhea||c('Required "hhea" table is not found'),0===M.hhea.data[10]&&0===M.hhea.data[11]&&(M.hhea.data[10]=255,M.hhea.data[11]=255),M.post){var X=y(M.post,j,Q);X||(M.post=null)}var Y,Z=[],$=j.toUnicode,_=j.widths,aa=$ instanceof ac||65536===$.length;if("CIDFontType2"===j.type){var ba=j.cidToGidMap||[],ca=0===ba.length;j.cMap.forEach(function(a,b){e(65535>=b,"Max size of CID is 65,535");var c=-1;ca?c=a:void 0!==ba[b]&&(c=ba[b]),c>=0&&Q>c&&E(c,a,b)&&(Z[a]=c)}),T&&(Z[0]=Q-1)}else{var da=j.differences.length>0||!!j.baseEncodingName,ea=m(M.cmap,g,this.isSymbolicFont,da),fa=ea.platformId,ga=ea.encodingId,ha=ea.mappings,ia=ha.length;if(da&&(3===fa&&1===ga||1===fa&&0===ga)||-1===fa&&-1===ga&&Pb[j.baseEncodingName]){var ja=[];for(("MacRomanEncoding"===j.baseEncodingName||"WinAnsiEncoding"===j.baseEncodingName)&&(ja=Pb[j.baseEncodingName]),Y=0;256>Y;Y++){var ka;if(ka=this.differences&&Y in this.differences?this.differences[Y]:Y in ja&&""!==ja[Y]?ja[Y]:Pb.StandardEncoding[Y]){var la,ma=!1;3===fa&&1===ga?(la=zc[ka],ma=!0):1===fa&&0===ga&&(la=Pb.MacRomanEncoding.indexOf(ka));var na=!1;for(N=0;ia>N;++N)if(ha[N].charCode===la){var oa=ma?Y:la;if(E(ha[N].glyphId,oa,-1)){Z[Y]=ha[N].glyphId,na=!0;break}}if(!na&&j.glyphNames){var pa=j.glyphNames.indexOf(ka);pa>0&&E(pa,-1,-1)?Z[Y]=pa:Z[Y]=0}}}}else if(0===fa&&0===ga)for(N=0;ia>N;++N)Z[ha[N].charCode]=ha[N].glyphId;else for(N=0;ia>N;++N)Y=255&ha[N].charCode,Z[Y]=ha[N].glyphId}0===Z.length&&(Z[0]=0);var qa=q(Z,j);if(this.toFontChar=qa.toFontChar,M.cmap={tag:"cmap",data:s(qa.charCodeToGlyphId)},!M["OS/2"]||!t(M["OS/2"])){var ra={unitsPerEm:f(M.head.data[18],M.head.data[19]),yMax:f(M.head.data[42],M.head.data[43]),yMin:f(M.head.data[38],M.head.data[39])-65536,ascent:f(M.hhea.data[4],M.hhea.data[5]),descent:f(M.hhea.data[6],M.hhea.data[7])-65536};M["OS/2"]={tag:"OS/2",data:u(j,qa.charCodeToGlyphId,ra)}}if(M.post||(M.post={tag:"post",data:v(j)}),!O)try{H=new Mc(M["CFF "].data);var sa=new kc(H,j);G=sa.parse();var ta=new xc(G);M["CFF "].data=ta.compile()}catch(ua){b("Failed to compile font "+j.loadedName)}if(M.name){var va=z(M.name);M.name.data=w(d,va)}else M.name={tag:"name",data:w(this.name)};var wa=new bc(K.version);for(var xa in M)wa.addTable(xa,M[xa].data);return wa.toArray()},convert:function(a,b,c){function d(a,b){var c=null;for(var d in a)b===a[d]&&(c||(c=[]),c.push(0|d));return c}function e(a,b){for(var c in a)if(b===a[c])return 0|c;return g.charCodeToGlyphId[g.nextAvailableFontCharCode]=b,g.nextAvailableFontCharCode++}c.fixedPitch=!1;var f=b.getGlyphMapping(c),g=q(f,c);this.toFontChar=g.toFontChar;var h=b.numGlyphs,i=b.seacs;if(Nb&&i&&i.length){var k=c.fontMatrix||T,m=b.getCharset(),n=Object.create(null);for(var o in i){o|=0;var p=i[o],r=Pb.StandardEncoding[p[2]],t=Pb.StandardEncoding[p[3]],x=m.indexOf(r),y=m.indexOf(t);if(!(0>x||0>y)){var z={x:p[0]*k[0]+p[1]*k[2]+k[4],y:p[0]*k[1]+p[1]*k[3]+k[5]},A=d(f,o);if(A)for(var B=0,C=A.length;C>B;B++){var D=A[B],E=g.charCodeToGlyphId,F=e(E,x),G=e(E,y);n[D]={baseFontCharCode:F,accentFontCharCode:G,accentOffset:z}}}}c.seacMap=n}var H=1/(c.fontMatrix||T)[0],I=new bc("OTTO");return I.addTable("CFF ",b.data),I.addTable("OS/2",u(c,g.charCodeToGlyphId)),I.addTable("cmap",s(g.charCodeToGlyphId)),I.addTable("head","\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00_<õ\x00\x00"+l(H)+"\x00\x00\x00\x00ž\x0B~'\x00\x00\x00\x00ž\x0B~'\x00\x00"+l(c.descent)+"ÿ"+l(c.ascent)+j(c.italicAngle?2:0)+"\x00\x00\x00\x00\x00\x00\x00"),I.addTable("hhea","\x00\x00\x00"+l(c.ascent)+l(c.descent)+"\x00\x00ÿÿ\x00\x00\x00\x00\x00\x00"+l(c.capHeight)+l(Math.tan(c.italicAngle)*c.xHeight)+"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"+j(h)),I.addTable("hmtx",function(){for(var a=b.charstrings,c=b.cff?b.cff.widths:null,d="\x00\x00\x00\x00",e=1,f=h;f>e;e++){var g=0;if(a){var i=a[e-1];g="width"in i?i.width:0}else c&&(g=Math.ceil(c[e]||0));d+=j(g)+j(0)}return d}()),I.addTable("maxp","\x00\x00P\x00"+j(h)),I.addTable("name",w(a)),I.addTable("post",v(c)),I.toArray()},buildToUnicode:function(a){if(a.toUnicode&&0!==a.toUnicode.length)return a.toUnicode;var b,c;if(!a.composite){b=[];var d=a.defaultEncoding.slice(),f=a.baseEncodingName,g=a.differences;for(c in g)d[c]=g[c];for(c in d){var h=d[c];if(""!==h)if(void 0!==zc[h])b[c]=String.fromCharCode(zc[h]);else{var i=0;switch(h[0]){case"G":3===h.length&&(i=parseInt(h.substr(1),16));break;case"g":5===h.length&&(i=parseInt(h.substr(1),16));break;case"C":case"c":h.length>=3&&(i=+h.substr(1))}if(i){if(f&&i===+c){var j=Pb[f];if(j&&(h=j[c])){b[c]=String.fromCharCode(zc[h]);continue}}b[c]=String.fromCharCode(i)}}}return new _b(b)}if(a.composite&&(a.cMap.builtInCMap&&!(a.cMap instanceof Fb)||"Adobe"===a.cidSystemInfo.registry&&("GB1"===a.cidSystemInfo.ordering||"CNS1"===a.cidSystemInfo.ordering||"Japan1"===a.cidSystemInfo.ordering||"Korea1"===a.cidSystemInfo.ordering))){var k=a.cidSystemInfo.registry,l=a.cidSystemInfo.ordering,m=new ya(k+"-"+l+"-UCS2"),n=Hb.create(m,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),o=a.cMap;return b=[],o.forEach(function(a,c){e(65535>=c,"Max size of CID is 65,535");var d=n.lookup(c);d&&(b[a]=String.fromCharCode((d.charCodeAt(0)<<8)+d.charCodeAt(1)))}),new _b(b)}return new ac(a.firstChar,a.lastChar)},get spaceWidth(){if("_shadowWidth"in this)return this._shadowWidth;for(var a,b=["space","minus","one","i"],c=0,d=b.length;d>c;c++){var e=b[c];if(e in this.widths){a=this.widths[e];break}var f=zc[e],g=0;if(this.composite&&this.cMap.contains(f)&&(g=this.cMap.lookup(f)),!g&&"toUnicode"in this&&(g=this.toUnicode.charCodeOf(f)),0>=g&&(g=f),a=this.widths[g])break}return a=a||this.defaultWidth,this._shadowWidth=a,a},charToGlyph:function(a){var b,c,d,e=a;this.cMap&&this.cMap.contains(a)&&(e=this.cMap.lookup(a)),c=this.widths[e],c=x(c)?c:this.defaultWidth;var f=this.vmetrics&&this.vmetrics[e],g=this.toUnicode.get(a)||a;"number"==typeof g&&(g=String.fromCharCode(g)),b=this.toFontChar[a]||a,this.missingFile&&(b=K(b)),this.isType3Font&&(d=b);var h=null;if(this.seacMap&&this.seacMap[a]){var i=this.seacMap[a];b=i.baseFontCharCode,h={fontChar:String.fromCharCode(i.accentFontCharCode),offset:i.accentOffset}}var j=String.fromCharCode(b),k=this.glyphCache[a];return k&&k.matchesForCache(j,g,h,c,f,d)||(k=new $b(j,g,h,c,f,d),this.glyphCache[a]=k),k},charsToGlyphs:function(a){var b,c,d,e=this.charsCache;if(e&&(b=e[a]))return b;e||(e=this.charsCache=Object.create(null)),b=[];var f,g=a,h=0;if(this.cMap)for(var i={};hh;++h)d=a.charCodeAt(h),c=this.charToGlyph(d),b.push(c),32===d&&b.push(null);return e[g]=b}},d}(),ec=function(){function a(a){this.error=a,this.loadedName="g_font_error",this.loading=!1}return a.prototype={charsToGlyphs:function(){return[]},exportData:function(){return{error:this.error}}},a}(),fc=function(){function a(){this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}var c={hstem:[1],vstem:[3],vmoveto:[4],rlineto:[5],hlineto:[6],vlineto:[7],rrcurveto:[8],callsubr:[10],flex:[12,35],drop:[12,18],endchar:[14],rmoveto:[21],hmoveto:[22],vhcurveto:[30],hvcurveto:[31]};return a.prototype={convert:function(a,d){for(var e,f,g,h=a.length,i=!1,j=0;h>j;j++){var k=a[j];if(32>k){switch(12===k&&(k=(k<<8)+a[++j]),k){case 1:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.hstem);break;case 3:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.vstem);break;case 4:if(this.flexing){if(this.stack.length<1){i=!0;break}var l=this.stack.pop();this.stack.push(0,l);break}i=this.executeCommand(1,c.vmoveto);break;case 5:i=this.executeCommand(2,c.rlineto);break;case 6:i=this.executeCommand(1,c.hlineto);break;case 7:i=this.executeCommand(1,c.vlineto);break;case 8:i=this.executeCommand(6,c.rrcurveto);break;case 9:this.stack=[];break;case 10:if(this.stack.length<1){i=!0;break}g=this.stack.pop(),i=this.convert(d[g],d);break;case 11:return i;case 13:if(this.stack.length<2){i=!0;break}e=this.stack.pop(),f=this.stack.pop(),this.lsb=f,this.width=e,this.stack.push(e,f),i=this.executeCommand(2,c.hmoveto);break;case 14:this.output.push(c.endchar[0]);break;case 21:if(this.flexing)break;i=this.executeCommand(2,c.rmoveto);break;case 22:if(this.flexing){this.stack.push(0);break}i=this.executeCommand(1,c.hmoveto);break;case 30:i=this.executeCommand(4,c.vhcurveto);break;case 31:i=this.executeCommand(4,c.hvcurveto);break;case 3072:this.stack=[];break;case 3073:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.vstem);break;case 3074:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.hstem);break;case 3078:Nb?(this.seac=this.stack.splice(-4,4),i=this.executeCommand(0,c.endchar)):i=this.executeCommand(4,c.endchar);break;case 3079:if(this.stack.length<4){i=!0;break}this.stack.pop();e=this.stack.pop();var m=this.stack.pop();f=this.stack.pop(),this.lsb=f,this.width=e,this.stack.push(e,f,m),i=this.executeCommand(3,c.rmoveto);break;case 3084:if(this.stack.length<2){i=!0;break}var n=this.stack.pop(),o=this.stack.pop();this.stack.push(o/n);break;case 3088:if(this.stack.length<2){i=!0;break}g=this.stack.pop();var p=this.stack.pop();if(0===g&&3===p){var q=this.stack.splice(this.stack.length-17,17);this.stack.push(q[2]+q[0],q[3]+q[1],q[4],q[5],q[6],q[7],q[8],q[9],q[10],q[11],q[12],q[13],q[14]),i=this.executeCommand(13,c.flex,!0),this.flexing=!1,this.stack.push(q[15],q[16])}else 1===g&&0===p&&(this.flexing=!0);break;case 3089:break;case 3105:this.stack=[];break;default:b('Unknown type 1 charstring command of "'+k+'"')}if(i)break}else 246>=k?k-=139:k=250>=k?256*(k-247)+a[++j]+108:254>=k?-(256*(k-251))-a[++j]-108:(255&a[++j])<<24|(255&a[++j])<<16|(255&a[++j])<<8|(255&a[++j])<<0,this.stack.push(k)}return i},executeCommand:function(a,b,c){var d=this.stack.length;if(a>d)return!0;for(var e=d-a,f=e;d>f;f++){var g=this.stack[f];g===(0|g)?this.output.push(28,g>>8&255,255&g):(g=65536*g|0,this.output.push(255,g>>24&255,g>>16&255,g>>8&255,255&g))}return this.output.push.apply(this.output,b),c?this.stack.splice(e,a):this.stack.length=0,!1}},a}(),gc=function(){function a(a){return a>=48&&57>=a||a>=65&&70>=a||a>=97&&102>=a}function b(a,b,c){for(var d=0|b,e=52845,f=22719,g=a.length,h=new Uint8Array(g),i=0;g>i;i++){var j=a[i];h[i]=j^d>>8,d=(j+d)*e+f&65535}return Array.prototype.slice.call(h,c)}function c(b,c,d){var e,f,g=0|c,h=52845,i=22719,j=b.length,k=j>>>1,l=new Uint8Array(k);for(e=0,f=0;j>e;e++){var m=b[e];if(a(m)){e++;for(var n;j>e&&!a(n=b[e]);)e++;if(j>e){var o=parseInt(String.fromCharCode(m,n),16);l[f++]=o^g>>8,g=(o+g)*h+i&65535}}}return Array.prototype.slice.call(l,d,f)}function d(a){return 47===a||91===a||93===a||123===a||125===a||40===a||41===a}function e(d,e){if(e){var g=d.getBytes(),h=!(a(g[0])&&a(g[1])&&a(g[2])&&a(g[3]));d=new Mc(h?b(g,f,4):c(g,f,4))}this.stream=d,this.nextChar()}var f=55665,g=4330;return e.prototype={readNumberArray:function(){this.getToken();for(var a=[];;){var b=this.getToken();if(null===b||"]"===b||"}"===b)break;a.push(parseFloat(b||0))}return a},readNumber:function(){var a=this.getToken();return parseFloat(a||0)},readInt:function(){var a=this.getToken();return 0|parseInt(a||0,10)},readBoolean:function(){var a=this.getToken();return"true"===a?1:0},nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){for(var a=!1,b=this.currentChar;;){if(-1===b)return null;if(a)(10===b||13===b)&&(a=!1);else if(37===b)a=!0;else if(!Gc.isSpace(b))break;b=this.nextChar()}if(d(b))return this.nextChar(),String.fromCharCode(b);var c="";do c+=String.fromCharCode(b),b=this.nextChar();while(b>=0&&!Gc.isSpace(b)&&!d(b));return c},extractFontProgram:function(){for(var a,c,d,e,f,h=this.stream,i=[],j=[],k={subrs:[],charstrings:[],properties:{privateData:{lenIV:4}}};null!==(a=this.getToken());)if("/"===a)switch(a=this.getToken()){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();;){if(a=this.getToken(),null===a||"end"===a)break;if("/"===a){var l=this.getToken();c=this.readInt(),this.getToken(),d=h.makeSubStream(h.pos,c),e=k.properties.privateData.lenIV,f=b(d.getBytes(),g,e),h.skip(c),this.nextChar(),a=this.getToken(),"noaccess"===a&&this.getToken(),j.push({glyph:l,encoded:f})}}break;case"Subrs":this.readInt();for(this.getToken();"dup"===(a=this.getToken());){var m=this.readInt();c=this.readInt(),this.getToken(),d=h.makeSubStream(h.pos,c),e=k.properties.privateData.lenIV,f=b(d.getBytes(),g,e),h.skip(c),this.nextChar(),a=this.getToken(),"noaccess"===a&&this.getToken(),i[m]=f}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":var n=this.readNumberArray();n.length>0&&n.length%2===0&&Mb&&(k.properties.privateData[a]=n);break;case"StemSnapH":case"StemSnapV":k.properties.privateData[a]=this.readNumberArray();break;case"StdHW":case"StdVW":k.properties.privateData[a]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":case"ExpansionFactor":k.properties.privateData[a]=this.readNumber();break;case"ForceBold":k.properties.privateData[a]=this.readBoolean()}for(var o=0;og;g++){for(b=this.getToken();"dup"!==b&&"def"!==b;)if(b=this.getToken(),null===b)return;if("def"===b)break;var h=this.readInt();this.getToken();var i=this.getToken();d[h]=i,this.getToken()}}else d=Pb[e];a.builtInEncoding=d;break;case"FontBBox":var j=this.readNumberArray();a.ascent=j[3],a.descent=j[1],a.ascentScaled=!0}}},e}(),hc=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],ic=function(a,b,c){var d=6,e=c.length1,f=c.length2,g=b.peekBytes(d),h=128===g[0]&&1===g[1];h&&(b.skip(d),e=g[5]<<24|g[4]<<16|g[3]<<8|g[2]);var i=new Mc(b.getBytes(e)),j=new gc(i);j.extractFontHeader(c),h&&(g=b.getBytes(d),f=g[5]<<24|g[4]<<16|g[3]<<8|g[2]);var k=new Mc(b.getBytes(f)),l=new gc(k,!0),m=l.extractFontProgram();for(var n in m.properties)c[n]=m.properties[n];var o=m.charstrings,p=this.getType2Charstrings(o),q=this.getType2Subrs(m.subrs);this.charstrings=o,this.data=this.wrap(a,p,this.charstrings,q,c),this.seacs=this.getSeacs(m.charstrings)};ic.prototype={get numGlyphs(){return this.charstrings.length+1},getCharset:function(){for(var a=[".notdef"],b=this.charstrings,c=0;c=0&&(f[g]=b)}return Q(a,f,d)},getSeacs:function(a){var b,c,d=[];for(b=0,c=a.length;c>b;b++){var e=a[b];e.seac&&(d[b+1]=e.seac)}return d},getType2Charstrings:function(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c].charstring);return b},getType2Subrs:function(a){var b=0,c=a.length;b=1133>c?107:33769>c?1131:32768;var d,e=[];for(d=0;b>d;d++)e.push([11]);for(d=0;c>d;d++)e.push(a[d]);return e},wrap:function(a,b,c,d,e){var f=new lc;f.header=new mc(1,0,4,4),f.names=[a];var g=new qc;g.setByName("version",391),g.setByName("Notice",392),g.setByName("FullName",393),g.setByName("FamilyName",394),g.setByName("Weight",395),g.setByName("Encoding",null),g.setByName("FontMatrix",e.fontMatrix),g.setByName("FontBBox",e.bbox),g.setByName("charset",null),g.setByName("CharStrings",null),g.setByName("Private",null),f.topDict=g;var h=new nc;h.add("Version 0.11"),h.add("See original notice"),h.add(a),h.add(a),h.add("Medium"),f.strings=h,f.globalSubrIndex=new oc;var i,j,k=b.length,l=[0];for(i=0;k>i;i++){var m=hc.indexOf(c[i].glyphName);-1===m&&(m=0),l.push(m>>8&255,255&m)}f.charset=new tc(!1,0,[],l);var n=new oc;for(n.add([139,14]),i=0;k>i;i++)n.add(b[i]);f.charStrings=n;var o=new rc;o.setByName("Subrs",null);var p=["BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for(i=0,j=p.length;j>i;i++){var q=p[i];if(e.privateData.hasOwnProperty(q)){var r=e.privateData[q];if(C(r))for(var s=r.length-1;s>0;s--)r[s]-=r[s-1];o.setByName(q,r)}}f.topDict.privateDict=o;var t=new oc;for(i=0,j=d.length;j>i;i++)t.add(d[i]);o.subrsIndex=t;var u=new xc(f);return u.compile()}};var jc=function(){function a(a,c){this.properties=c;var d=new kc(a,c);this.cff=d.parse();var e=new xc(this.cff);this.seacs=this.cff.seacs;try{this.data=e.compile()}catch(f){b("Failed to compile font "+c.loadedName),this.data=a}}return a.prototype={get numGlyphs(){return this.cff.charStrings.count},getCharset:function(){return this.cff.charset.charset},getGlyphMapping:function(){var a,b,c=this.cff,d=this.properties,e=c.charset.charset;if(d.composite){if(a=Object.create(null),c.isCIDFont)for(b=0;bq;++q){var s=p.get(q),t=this.createDict(qc,this.parseDict(s),b.strings);this.parsePrivateDict(t),b.fdArray.push(t)}o=null,n=this.parseCharsets(i.getByName("charset"),b.charStrings.count,b.strings,!0),b.fdSelect=this.parseFDSelect(i.getByName("FDSelect"),b.charStrings.count)}else n=this.parseCharsets(i.getByName("charset"),b.charStrings.count,b.strings,!1),o=this.parseEncoding(i.getByName("Encoding"),a,b.strings,n.charset);return b.charset=n,b.encoding=o,b},parseHeader:function(){for(var b=this.bytes,d=b.length,e=0;d>e&&1!==b[e];)++e;e>=d?c("Invalid CFF header"):0!==e&&(a("cff data is shifted"),b=b.subarray(e),this.bytes=b);var f=b[0],g=b[1],h=b[2],i=b[3],j=new mc(f,g,h,i);return{obj:j,endPos:h}},parseDict:function(a){function b(){var b=a[e++];return 30===b?d(e):28===b?(b=a[e++],b=(b<<24|a[e++]<<16)>>16):29===b?(b=a[e++],b=b<<8|a[e++],b=b<<8|a[e++],b=b<<8|a[e++]):b>=32&&246>=b?b-139:b>=247&&250>=b?256*(b-247)+a[e++]+108:b>=251&&254>=b?-(256*(b-251))-a[e++]-108:(c("255 is not a valid DICT command"),-1)}function d(){for(var b="",c=15,d=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],f=a.length;f>e;){var g=a[e++],h=g>>4,i=15&g;if(h===c)break;if(b+=d[h],i===c)break;b+=d[i]}return parseFloat(b)}var e=0,f=[],g=[];e=0;for(var h=a.length;h>e;){var i=a[e];21>=i?(12===i&&(i=i<<8|a[++e]),g.push([i,f]),f=[],++e):f.push(b())}return g},parseIndex:function(a){var b,c,d=new oc,e=this.bytes,f=e[a++]<<8|e[a++],g=[],h=a;if(0!==f){var i=e[a++],j=a+(f+1)*i-1;for(b=0,c=f+1;c>b;++b){for(var k=0,l=0;i>l;++l)k<<=8,k+=e[a++];g.push(j+k)}h=g[f]}for(b=0,c=g.length-1;c>b;++b){var m=g[b],n=g[b+1];d.add(e.subarray(m,n))}return{obj:d,endPos:h}},parseNameIndex:function(a){for(var b=[],c=0,d=a.count;d>c;++c){for(var e=a.get(c),f=Math.min(e.length,127),g=[],h=0;f>h;++h){var j=e[h];(0!==h||0!==j)&&(33>j||j>126||91===j||93===j||40===j||41===j||123===j||125===j||60===j||62===j||47===j||37===j||35===j)?g[h]=95:g[h]=j}b.push(i(g))}return b},parseStringIndex:function(a){for(var b=new nc,c=0,d=a.count;d>c;++c){var e=a.get(c);b.add(i(e))}return b},createDict:function(a,b,c){for(var d=new a(c),e=0,f=b.length;f>e;++e){var g=b[e],h=g[0],i=g[1];d.setByKey(h,i)}return d},parseCharStrings:function(a){for(var c=this.parseIndex(a).obj,d=[],g=[],h=c.count,i=0;h>i;i++){for(var j=c.get(i),k=0,l=[],m=!0,n=0,o=!0,p=j,q=p.length,r=!0,s=0;q>s;){var t=p[s++],u=null;if(12===t){var v=p[s++];0===v?(p[s-2]=139,p[s-1]=22,k=0):u=f[v]}else 28===t?(l[k]=(p[s]<<24|p[s+1]<<16)>>16,s+=2,k++):14===t?(k>=4&&(k-=4,Nb&&(d[i]=l.slice(k,k+4),o=!1)),u=e[t]):t>=32&&246>=t?(l[k]=t-139,k++):t>=247&&254>=t?(l[k]=251>t?(t-247<<8)+p[s]+108:-(t-251<<8)-p[s]-108,s++,k++):255===t?(l[k]=(p[s]<<24|p[s+1]<<16|p[s+2]<<8|p[s+3])/65536,s+=4,k++):19===t||20===t?(n+=k>>1,s+=n+7>>3,k%=2,u=e[t]):u=e[t];if(u){if(u.stem&&(n+=k>>1),"min"in u&&!m&&k=2&&u.stem?k%=2:k>1&&b("Found too many parameters for stack-clearing command"),k>0&&l[k-1]>=0&&(g[i]=l[k-1])),"stackDelta"in u?("stackFn"in u&&u.stackFn(l,k),k+=u.stackDelta):u.stackClearing?k=0:u.resetStack?(k=0,m=!1):u.undefStack&&(k=0,m=!0,r=!1)}}o||c.set(i,new Uint8Array([14]))}return{charStrings:c,seacs:d,widths:g}},emptyPrivateDictionary:function(a){var b=this.createDict(rc,[],a.strings);a.setByKey(18,[0,0]),a.privateDict=b},parsePrivateDict:function(a){if(!a.hasName("Private"))return void this.emptyPrivateDictionary(a);var b=a.getByName("Private");if(!C(b)||2!==b.length)return void a.removeByName("Private");var c=b[0],d=b[1];if(0===c||d>=this.bytes.length)return void this.emptyPrivateDictionary(a);var e=d+c,f=this.bytes.subarray(d,e),g=this.parseDict(f),h=this.createDict(rc,g,a.strings);if(a.privateDict=h,h.getByName("Subrs")){var i=h.getByName("Subrs"),j=d+i;if(0===i||j>=this.bytes.length)return void this.emptyPrivateDictionary(a);var k=this.parseIndex(j);h.subrsIndex=k.obj}},parseCharsets:function(a,b,d,e){if(0===a)return new tc(!0,sc.ISO_ADOBE,Ja);if(1===a)return new tc(!0,sc.EXPERT,Ka);if(2===a)return new tc(!0,sc.EXPERT_SUBSET,La);var f,g,h,i=this.bytes,j=a,k=i[a++],l=[".notdef"];switch(b-=1,k){case 0:for(h=0;b>h;h++)f=i[a++]<<8|i[a++],l.push(e?f:d.get(f));break;case 1:for(;l.length<=b;)for(f=i[a++]<<8|i[a++],g=i[a++],h=0;g>=h;h++)l.push(e?f++:d.get(f++));break;case 2:for(;l.length<=b;)for(f=i[a++]<<8|i[a++],g=i[a++]<<8|i[a++],h=0;g>=h;h++)l.push(e?f++:d.get(f++));break;default:c("Unknown charset format")}var m=a,n=i.subarray(j,m);return new tc(!1,k,l,n)},parseEncoding:function(a,b,d,e){function f(){var b=k[a++];for(h=0;b>h;h++){var c=k[a++],f=(k[a++]<<8)+(255&k[a++]);j[c]=e.indexOf(d.get(f))}}var g,h,i,j={},k=this.bytes,l=!1,m=!1,n=null;if(0===a||1===a){l=!0,g=a;var o=a?Pb.ExpertEncoding:Pb.StandardEncoding;for(h=0,i=e.length;i>h;h++){var p=o.indexOf(e[h]);-1!==p&&(j[p]=h)}}else{var q=a;switch(g=k[a++],127&g){case 0:var r=k[a++];for(h=1;r>=h;h++)j[k[a++]]=h;break;case 1:var s=k[a++],t=1;for(h=0;s>h;h++)for(var u=k[a++],v=k[a++],w=u;u+v>=w;w++)j[w]=t++;break;default:c("Unknow encoding format: "+g+" in CFF")}var x=a;128&g&&(k[q]&=127,f(),m=!0),n=k.subarray(q,x)}return g=127&g,new uc(l,g,j,n)},parseFDSelect:function(a,b){var d,e=a,f=this.bytes,g=f[a++],h=[];switch(g){case 0:for(d=0;b>d;++d){var i=f[a++];h.push(i)}break;case 3:var j=f[a++]<<8|f[a++];for(d=0;j>d;++d)for(var k=f[a++]<<8|f[a++],l=f[a++],m=f[a]<<8|f[a+1],n=k;m>n;++n)h.push(l);a+=2;break;default:c("Unknown fdselect format "+g)}var o=a;return new vc(h,f.subarray(e,o))}},d}(),lc=function(){function a(){this.header=null,this.names=[],this.topDict=null,this.strings=new nc,this.globalSubrIndex=null,this.encoding=null,this.charset=null,this.charStrings=null,this.fdArray=[],this.fdSelect=null,this.isCIDFont=!1}return a}(),mc=function(){function a(a,b,c,d){this.major=a,this.minor=b,this.hdrSize=c,this.offSize=d}return a}(),nc=function(){function a(){this.strings=[]}return a.prototype={get:function(a){return a>=0&&390>=a?hc[a]:a-391<=this.strings.length?this.strings[a-391]:hc[0]},add:function(a){this.strings.push(a)},get count(){return this.strings.length}},a}(),oc=function(){function a(){this.objects=[],this.length=0}return a.prototype={add:function(a){this.length+=a.length,this.objects.push(a)},set:function(a,b){this.length+=b.length-this.objects[a].length,this.objects[a]=b},get:function(a){return this.objects[a]},get count(){return this.objects.length}},a}(),pc=function(){function a(a,b){this.keyToNameMap=a.keyToNameMap,this.nameToKeyMap=a.nameToKeyMap,this.defaults=a.defaults,this.types=a.types,this.opcodes=a.opcodes,this.order=a.order,this.strings=b,this.values={}}return a.prototype={setByKey:function(a,b){if(!(a in this.keyToNameMap))return!1;if(0===b.length)return!0;var c=this.types[a];return("num"===c||"sid"===c||"offset"===c)&&(b=b[0]),this.values[a]=b,!0},setByName:function(a,b){a in this.nameToKeyMap||c('Invalid dictionary name "'+a+'"'),this.values[this.nameToKeyMap[a]]=b},hasName:function(a){return this.nameToKeyMap[a]in this.values},getByName:function(a){a in this.nameToKeyMap||c('Invalid dictionary name "'+a+'"');var b=this.nameToKeyMap[a];return b in this.values?this.values[b]:this.defaults[b]},removeByName:function(a){delete this.values[this.nameToKeyMap[a]]}},a.createTables=function(a){for(var b={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]},c=0,d=a.length;d>c;++c){var e=a[c],f=C(e[0])?(e[0][0]<<8)+e[0][1]:e[0];b.keyToNameMap[f]=e[1],b.nameToKeyMap[e[1]]=f,b.types[f]=e[2],b.defaults[f]=e[3],b.opcodes[f]=C(e[0])?e[0]:[e[0]],b.order.push(f)}return b},a}(),qc=function(){function a(a){null===c&&(c=pc.createTables(b)),pc.call(this,c,a),this.privateDict=null}var b=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]],c=null;return a.prototype=Object.create(pc.prototype),a}(),rc=function(){function a(a){null===c&&(c=pc.createTables(b)),pc.call(this,c,a),this.subrsIndex=null}var b=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]],c=null;return a.prototype=Object.create(pc.prototype),a}(),sc={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2},tc=function(){function a(a,b,c,d){this.predefined=a,this.format=b,this.charset=c,this.raw=d}return a}(),uc=function(){function a(a,b,c,d){this.predefined=a,this.format=b,this.encoding=c,this.raw=d}return a}(),vc=function(){function a(a,b){this.fdSelect=a,this.raw=b}return a}(),wc=function(){function a(){this.offsets={}}return a.prototype={isTracking:function(a){return a in this.offsets},track:function(a,b){a in this.offsets&&c("Already tracking location of "+a),this.offsets[a]=b},offset:function(a){for(var b in this.offsets)this.offsets[b]+=a},setEntryLocation:function(a,b,d){a in this.offsets||c("Not tracking location of "+a);for(var e=d.data,f=this.offsets[a],g=5,h=0,i=b.length;i>h;++h){var j=h*g+f,k=j+1,l=j+2,m=j+3,n=j+4;(29!==e[j]||0!==e[k]||0!==e[l]||0!==e[m]||0!==e[n])&&c("writing to an offset that is not empty");var o=b[h];e[j]=29,e[k]=o>>24&255,e[l]=o>>16&255,e[m]=o>>8&255,e[n]=255&o}}},a}(),xc=function(){function a(a){this.cff=a}return a.prototype={compile:function(){var a=this.cff,b={data:[],length:0,add:function(a){this.data=this.data.concat(a),this.length=this.data.length}},c=this.compileHeader(a.header);b.add(c);var d=this.compileNameIndex(a.names);if(b.add(d),a.isCIDFont&&a.topDict.hasName("FontMatrix")){var e=a.topDict.getByName("FontMatrix");a.topDict.removeByName("FontMatrix");for(var f=0,g=a.fdArray.length;g>f;f++){var h=a.fdArray[f],i=e.slice(0);h.hasName("FontMatrix")&&(i=na.transform(i,h.getByName("FontMatrix"))),h.setByName("FontMatrix",i)}}var j=this.compileTopDicts([a.topDict],b.length,a.isCIDFont);b.add(j.output);var k=j.trackers[0],l=this.compileStringIndex(a.strings.strings);b.add(l);var m=this.compileIndex(a.globalSubrIndex);if(b.add(m),a.encoding&&a.topDict.hasName("Encoding"))if(a.encoding.predefined)k.setEntryLocation("Encoding",[a.encoding.format],b);else{var n=this.compileEncoding(a.encoding);k.setEntryLocation("Encoding",[b.length],b),b.add(n)}if(a.charset&&a.topDict.hasName("charset"))if(a.charset.predefined)k.setEntryLocation("charset",[a.charset.format],b);else{var o=this.compileCharset(a.charset);k.setEntryLocation("charset",[b.length],b),b.add(o)}var p=this.compileCharStrings(a.charStrings);if(k.setEntryLocation("CharStrings",[b.length],b),b.add(p),a.isCIDFont){k.setEntryLocation("FDSelect",[b.length],b);var q=this.compileFDSelect(a.fdSelect.raw);b.add(q),j=this.compileTopDicts(a.fdArray,b.length,!0),k.setEntryLocation("FDArray",[b.length],b),b.add(j.output);var r=j.trackers;this.compilePrivateDicts(a.fdArray,r,b)}return this.compilePrivateDicts([a.topDict],[k],b),b.add([0]),b.data},encodeNumber:function(a){return parseFloat(a)!==parseInt(a,10)||isNaN(a)?this.encodeFloat(a):this.encodeInteger(a)},encodeFloat:function(a){var b=a.toString(),c=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(b);if(c){var d=parseFloat("1e"+((c[2]?+c[2]:0)+c[1].length));b=(Math.round(a*d)/d).toString()}var e,f,g="";for(e=0,f=b.length;f>e;++e){var h=b[e];g+="e"===h?"-"===b[++e]?"c":"b":"."===h?"a":"-"===h?"e":h}g+=1&g.length?"f":"ff";var i=[30];for(e=0,f=g.length;f>e;e+=2)i.push(parseInt(g.substr(e,2),16));return i},encodeInteger:function(a){var b;return a>=-107&&107>=a?b=[a+139]:a>=108&&1131>=a?(a=[a-108],b=[(a>>8)+247,255&a]):a>=-1131&&-108>=a?(a=-a-108,b=[(a>>8)+251,255&a]):b=a>=-32768&&32767>=a?[28,a>>8&255,255&a]:[29,a>>24&255,a>>16&255,a>>8&255,255&a],b},compileHeader:function(a){return[a.major,a.minor,a.hdrSize,a.offSize]},compileNameIndex:function(a){for(var b=new oc,c=0,d=a.length;d>c;++c)b.add(j(a[c]));return this.compileIndex(b)},compileTopDicts:function(a,b,c){for(var d=[],e=new oc,f=0,g=a.length;g>f;++f){var h=a[f];c&&(h.removeByName("CIDFontVersion"),h.removeByName("CIDFontRevision"),h.removeByName("CIDFontType"),h.removeByName("CIDCount"),h.removeByName("UIDBase"));var i=new wc,j=this.compileDict(h,i);d.push(i),e.add(j),i.offset(b)}return e=this.compileIndex(e,d),{trackers:d,output:e}},compilePrivateDicts:function(a,b,c){for(var d=0,f=a.length;f>d;++d){var g=a[d];e(g.privateDict&&g.hasName("Private"),"There must be an private dictionary.");var h=g.privateDict,i=new wc,j=this.compileDict(h,i),k=c.length;if(i.offset(k),j.length||(k=0),b[d].setEntryLocation("Private",[j.length,k],c),c.add(j),h.subrsIndex&&h.hasName("Subrs")){var l=this.compileIndex(h.subrsIndex);i.setEntryLocation("Subrs",[j.length],c),c.add(l)}}},compileDict:function(a,b){for(var d=[],e=a.order,f=0;fj;++j){var l=i[j],m=h[j];switch(l){case"num":case"sid":d=d.concat(this.encodeNumber(m));break;case"offset":var n=a.keyToNameMap[g];b.isTracking(n)||b.track(n,d.length),d=d.concat([29,0,0,0,0]);break;case"array":case"delta":d=d.concat(this.encodeNumber(m));for(var o=1,p=h.length;p>o;++o)d=d.concat(this.encodeNumber(h[o]));break;default:c("Unknown data type of "+l)}}d=d.concat(a.opcodes[g])}}}return d},compileStringIndex:function(a){for(var b=new oc,c=0,d=a.length;d>c;++c)b.add(j(a[c]));return this.compileIndex(b)},compileGlobalSubrIndex:function(){var a=this.cff.globalSubrIndex;this.out.writeByteArray(this.compileIndex(a))},compileCharStrings:function(a){return this.compileIndex(a)},compileCharset:function(a){return this.compileTypedArray(a.raw)},compileEncoding:function(a){return this.compileTypedArray(a.raw)},compileFDSelect:function(a){return this.compileTypedArray(a)},compileTypedArray:function(a){for(var b=[],c=0,d=a.length;d>c;++c)b[c]=a[c];return b},compileIndex:function(a,b){b=b||[];var c=a.objects,d=c.length;if(0===d)return[0,0,0];var e,f=[d>>8&255,255&d],g=1;for(e=0;d>e;++e)g+=c[e].length;var h;h=256>g?1:65536>g?2:16777216>g?3:4,f.push(h);var i=1;for(e=0;d+1>e;e++)1===h?f.push(255&i):2===h?f.push(i>>8&255,255&i):3===h?f.push(i>>16&255,i>>8&255,255&i):f.push(i>>>24&255,i>>16&255,i>>8&255,255&i),c[e]&&(i+=c[e].length);for(e=0;d>e;e++){b[e]&&b[e].offset(f.length);for(var j=0,k=c[e].length;k>j;j++)f.push(c[e][j])}return f}},a}();!function(){/Windows/.test(navigator.userAgent)&&(Nb=!0)}(),function(){/Windows.*Chrome/.test(navigator.userAgent)&&(Kb=!0)}();var yc=function(){function a(a,b){return a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3]}function b(a,b){return a[b]<<8|a[b+1]}function d(d,e,f){var g,h,i,j,k=1===b(d,e+2)?a(d,e+8):a(d,e+16),l=b(d,e+k);if(4===l){g=b(d,e+k+2);var m=b(d,e+k+6)>>1;for(i=e+k+14,h=[],j=0;m>j;j++,i+=2)h[j]={end:b(d,i)};for(i+=2,j=0;m>j;j++,i+=2)h[j].start=b(d,i);for(j=0;m>j;j++,i+=2)h[j].idDelta=b(d,i);for(j=0;m>j;j++,i+=2){var n=b(d,i);if(0!==n){h[j].ids=[];for(var o=0,p=h[j].end-h[j].start+1;p>o;o++)h[j].ids[o]=b(d,i+n),n+=2}}return h}if(12===l){g=a(d,e+k+4);var q=a(d,e+k+12);for(i=e+k+16,h=[],j=0;q>j;j++)h.push({start:a(d,i),end:a(d,i+4),idDelta:a(d,i+8)-a(d,i)}),i+=12;return h}c("not supported cmap: "+l)}function e(a,b,c){var d={},e=new kc(new Mc(a,b,c-b),d),f=e.parse();return{glyphs:f.charStrings.objects,subrs:f.topDict.privateDict&&f.topDict.privateDict.subrsIndex&&f.topDict.privateDict.subrsIndex.objects,gsubrs:f.globalSubrIndex&&f.globalSubrIndex.objects}}function f(a,b,c){var d,e;c?(d=4,e=function(a,b){return a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3]}):(d=2,e=function(a,b){return a[b]<<9|a[b+1]<<1});for(var f=[],g=e(b,0),h=d;hd;){var f=d+e+1>>1;c>16,k=0,l=0;if(i+=10,0>j){do{g=a[i]<<8|a[i+1];var m=a[i+2]<<8|a[i+3];i+=4;var n,o;1&g?(n=(a[i]<<24|a[i+1]<<16)>>16,o=(a[i+2]<<24|a[i+3]<<16)>>16,i+=4):(n=a[i++],o=a[i++]),2&g?(k=n,l=o):(k=0,l=0);var p=1,q=1,r=0,s=0;8&g?(p=q=(a[i]<<24|a[i+1]<<16)/1073741824,i+=2):64&g?(p=(a[i]<<24|a[i+1]<<16)/1073741824,q=(a[i+2]<<24|a[i+3]<<16)/1073741824,i+=4):128&g&&(p=(a[i]<<24|a[i+1]<<16)/1073741824,r=(a[i+2]<<24|a[i+3]<<16)/1073741824,s=(a[i+4]<<24|a[i+5]<<16)/1073741824,q=(a[i+6]<<24|a[i+7]<<16)/1073741824,i+=8);var t=c.glyphs[m];t&&(b.push({cmd:"save"}),b.push({cmd:"transform",args:[p,r,s,q,k,l]}),h(t,b,c),b.push({cmd:"restore"}))}while(32&g)}else{var u,v,w=[];for(u=0;j>u;u++)w.push(a[i]<<8|a[i+1]),i+=2;var x=a[i]<<8|a[i+1];i+=2+x;for(var y=w[w.length-1]+1,z=[];z.length0;)z.push({flags:g})}for(u=0;y>u;u++){switch(18&z[u].flags){case 0:k+=(a[i]<<24|a[i+1]<<16)>>16,i+=2;break;case 2:k-=a[i++];break;case 18:k+=a[i++]}z[u].x=k}for(u=0;y>u;u++){switch(36&z[u].flags){case 0:l+=(a[i]<<24|a[i+1]<<16)>>16,i+=2;break;case 4:l-=a[i++];break;case 36:l+=a[i++]}z[u].y=l}var B=0;for(i=0;j>i;i++){var C=w[i],D=z.slice(B,C+1);if(1&D[0].flags)D.push(D[0]);else if(1&D[D.length-1].flags)D.unshift(D[D.length-1]);else{var E={flags:1,x:(D[0].x+D[D.length-1].x)/2,y:(D[0].y+D[D.length-1].y)/2};D.unshift(E),D.push(E)}for(d(D[0].x,D[0].y),u=1,v=D.length;v>u;u++)1&D[u].flags?e(D[u].x,D[u].y):1&D[u+1].flags?(f(D[u].x,D[u].y,D[u+1].x,D[u+1].y),u++):f(D[u].x,D[u].y,(D[u].x+D[u+1].x)/2,(D[u].y+D[u+1].y)/2);B=C+1}}}function j(a,b,d){function e(a,c){b.push({cmd:"moveTo",args:[a,c]})}function f(a,c){b.push({cmd:"lineTo",args:[a,c]})}function h(a,c,d,e,f,g){b.push({cmd:"bezierCurveTo",args:[a,c,d,e,f,g]})}function i(a){for(var o=0;o>1,y=!0;break;case 3:n+=k.length>>1,y=!0;break;case 4:m+=k.pop(),e(l,m),y=!0;break;case 5:for(;k.length>0;)l+=k.shift(),m+=k.shift(),f(l,m);break;case 6:for(;k.length>0&&(l+=k.shift(),f(l,m),0!==k.length);)m+=k.shift(),f(l,m);break;case 7:for(;k.length>0&&(m+=k.shift(),f(l,m),0!==k.length);)l+=k.shift(),f(l,m);break;case 8:for(;k.length>0;)p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m);break;case 10:w=k.pop()+d.subrsBias,x=d.subrs[w],x&&i(x);break;case 11:return;case 12:switch(z=a[o++]){case 34:p=l+k.shift(),q=p+k.shift(),t=m+k.shift(),l=q+k.shift(),h(p,m,q,t,l,t),p=l+k.shift(),q=p+k.shift(),l=q+k.shift(),h(p,t,q,m,l,m);break;case 35:p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m),p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m),k.pop();break;case 36:p=l+k.shift(),t=m+k.shift(),q=p+k.shift(),u=t+k.shift(),l=q+k.shift(),h(p,t,q,u,l,u),p=l+k.shift(),q=p+k.shift(),v=u+k.shift(),l=q+k.shift(),h(p,u,q,v,l,m);break;case 37:var A=l,B=m;p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m),p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q,m=s,Math.abs(l-A)>Math.abs(m-B)?l+=k.shift():m+=k.shift(),h(p,r,q,s,l,m);break;default:c("unknown operator: 12 "+z)}break;case 14:if(k.length>=4){var C=k.pop(),D=k.pop();m=k.pop(),l=k.pop(),b.push({cmd:"save"}),b.push({cmd:"translate",args:[l,m]});var E=g(d.cmap,String.fromCharCode(d.glyphNameMap[Pb.StandardEncoding[C]]));j(d.glyphs[E],b,d),b.push({cmd:"restore"}),E=g(d.cmap,String.fromCharCode(d.glyphNameMap[Pb.StandardEncoding[D]])),j(d.glyphs[E],b,d)}return;case 18:n+=k.length>>1,y=!0;break;case 19:n+=k.length>>1,o+=n+7>>3,y=!0;break;case 20:n+=k.length>>1,o+=n+7>>3,y=!0;break;case 21:m+=k.pop(),l+=k.pop(),e(l,m),y=!0;break;case 22:l+=k.pop(),e(l,m),y=!0;break;case 23:n+=k.length>>1,y=!0;break;case 24:for(;k.length>2;)p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m);l+=k.shift(),m+=k.shift(),f(l,m);break;case 25:for(;k.length>6;)l+=k.shift(),m+=k.shift(),f(l,m);p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m);break;case 26:for(k.length%2&&(l+=k.shift());k.length>0;)p=l,r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q,m=s+k.shift(),h(p,r,q,s,l,m);break;case 27:for(k.length%2&&(m+=k.shift());k.length>0;)p=l+k.shift(),r=m,q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s,h(p,r,q,s,l,m);break;case 28:k.push((a[o]<<24|a[o+1]<<16)>>16),o+=2;break;case 29:w=k.pop()+d.gsubrsBias,x=d.gsubrs[w],x&&i(x);break;case 30:for(;k.length>0&&(p=l,r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+(1===k.length?k.shift():0),h(p,r,q,s,l,m),0!==k.length);)p=l+k.shift(),r=m,q=p+k.shift(),s=r+k.shift(),m=s+k.shift(),l=q+(1===k.length?k.shift():0),h(p,r,q,s,l,m);break;case 31:for(;k.length>0&&(p=l+k.shift(),r=m,q=p+k.shift(),s=r+k.shift(),m=s+k.shift(),l=q+(1===k.length?k.shift():0),h(p,r,q,s,l,m),0!==k.length);)p=l,r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+(1===k.length?k.shift():0),h(p,r,q,s,l,m);break;default:32>z&&c("unknown operator: "+z),247>z?k.push(z-139):251>z?k.push(256*(z-247)+a[o++]+108):255>z?k.push(256*-(z-251)-a[o++]-108):(k.push((a[o]<<24|a[o+1]<<16|a[o+2]<<8|a[o+3])/65536),o+=4)}y&&(k.length=0)}}var k=[],l=0,m=0,n=0;i(a)}function k(a){this.compiledGlyphs={},this.fontMatrix=a}function l(a,b,c){c=c||[488e-6,0,0,488e-6,0,0],k.call(this,c),this.glyphs=a,this.cmap=b,this.compiledGlyphs=[]}function m(a,b,c,d){c=c||[.001,0,0,.001,0,0],k.call(this,c),this.glyphs=a.glyphs,this.gsubrs=a.gsubrs||[],this.subrs=a.subrs||[],this.cmap=b,this.glyphNameMap=d||zc,this.compiledGlyphs=[],this.gsubrsBias=this.gsubrs.length<1240?107:this.gsubrs.length<33900?1131:32768,this.subrsBias=this.subrs.length<1240?107:this.subrs.length<33900?1131:32768}var n="";return k.prototype={getPathJs:function(a){var b=g(this.cmap,a),c=this.compiledGlyphs[b];return c||(this.compiledGlyphs[b]=c=this.compileGlyph(this.glyphs[b])),c},compileGlyph:function(a){if(!a||0===a.length||14===a[0])return n;var b=[];return b.push({cmd:"save"}),b.push({cmd:"transform",args:this.fontMatrix.slice()}),b.push({cmd:"scale",args:["size","-size"]}),this.compileGlyphImpl(a,b),b.push({cmd:"restore"}),b},compileGlyphImpl:function(){c("Children classes should implement this.")},hasBuiltPath:function(a){var b=g(this.cmap,a);return b in this.compiledGlyphs}},na.inherit(l,k,{compileGlyphImpl:function(a,b){h(a,b,this)}}),na.inherit(m,k,{compileGlyphImpl:function(a,b){j(a,b,this)}}),{create:function(c){for(var g,h,j,k,n,o,p=new Uint8Array(c.data),q=b(p,4),r=0,s=12;q>r;r++,s+=16){var t=i(p.subarray(s,s+4)),u=a(p,s+8),v=a(p,s+12);switch(t){case"cmap":g=d(p,u,u+v);break;case"glyf":h=p.subarray(u,u+v);break;case"loca":j=p.subarray(u,u+v);break;case"head":o=b(p,u+18),n=b(p,u+50);break;case"CFF ":k=e(p,u,u+v)}}if(h){var w=o?[1/o,0,0,1/o,0,0]:c.fontMatrix;return new l(f(h,j,n),g,w)}return new m(k,g,c.fontMatrix,c.glyphNameMap)}}}(),zc={A:65,AE:198,AEacute:508,AEmacron:482,AEsmall:63462,Aacute:193,Aacutesmall:63457,Abreve:258,Abreveacute:7854,Abrevecyrillic:1232,Abrevedotbelow:7862,Abrevegrave:7856,Abrevehookabove:7858,Abrevetilde:7860,Acaron:461,Acircle:9398,Acircumflex:194,Acircumflexacute:7844,Acircumflexdotbelow:7852,Acircumflexgrave:7846,Acircumflexhookabove:7848,Acircumflexsmall:63458,Acircumflextilde:7850,Acute:63177,Acutesmall:63412,Acyrillic:1040,Adblgrave:512,Adieresis:196,Adieresiscyrillic:1234,Adieresismacron:478,Adieresissmall:63460,Adotbelow:7840,Adotmacron:480,Agrave:192,Agravesmall:63456,Ahookabove:7842,Aiecyrillic:1236,Ainvertedbreve:514,Alpha:913,Alphatonos:902,Amacron:256,Amonospace:65313,Aogonek:260,Aring:197,Aringacute:506,Aringbelow:7680,Aringsmall:63461,Asmall:63329,Atilde:195,Atildesmall:63459,Aybarmenian:1329,B:66,Bcircle:9399,Bdotaccent:7682,Bdotbelow:7684,Becyrillic:1041,Benarmenian:1330,Beta:914,Bhook:385,Blinebelow:7686,Bmonospace:65314,Brevesmall:63220,Bsmall:63330,Btopbar:386,C:67,Caarmenian:1342,Cacute:262,Caron:63178,Caronsmall:63221,Ccaron:268,Ccedilla:199,Ccedillaacute:7688,Ccedillasmall:63463,Ccircle:9400,Ccircumflex:264,Cdot:266,Cdotaccent:266,Cedillasmall:63416,Chaarmenian:1353,Cheabkhasiancyrillic:1212,Checyrillic:1063,Chedescenderabkhasiancyrillic:1214,Chedescendercyrillic:1206,Chedieresiscyrillic:1268,Cheharmenian:1347,Chekhakassiancyrillic:1227,Cheverticalstrokecyrillic:1208,Chi:935,Chook:391,Circumflexsmall:63222,Cmonospace:65315,Coarmenian:1361,Csmall:63331,D:68,DZ:497,DZcaron:452,Daarmenian:1332,Dafrican:393,Dcaron:270,Dcedilla:7696,Dcircle:9401,Dcircumflexbelow:7698,Dcroat:272,Ddotaccent:7690,Ddotbelow:7692,Decyrillic:1044,Deicoptic:1006,Delta:8710,Deltagreek:916,Dhook:394,Dieresis:63179,DieresisAcute:63180,DieresisGrave:63181,Dieresissmall:63400,Digammagreek:988,Djecyrillic:1026,Dlinebelow:7694,Dmonospace:65316,Dotaccentsmall:63223,Dslash:272,Dsmall:63332,Dtopbar:395,Dz:498,Dzcaron:453,Dzeabkhasiancyrillic:1248,Dzecyrillic:1029,Dzhecyrillic:1039,E:69,Eacute:201,Eacutesmall:63465,Ebreve:276,Ecaron:282,Ecedillabreve:7708,Echarmenian:1333,Ecircle:9402,Ecircumflex:202,Ecircumflexacute:7870,Ecircumflexbelow:7704,Ecircumflexdotbelow:7878,Ecircumflexgrave:7872,Ecircumflexhookabove:7874,Ecircumflexsmall:63466,Ecircumflextilde:7876,Ecyrillic:1028,Edblgrave:516,Edieresis:203, -Edieresissmall:63467,Edot:278,Edotaccent:278,Edotbelow:7864,Efcyrillic:1060,Egrave:200,Egravesmall:63464,Eharmenian:1335,Ehookabove:7866,Eightroman:8551,Einvertedbreve:518,Eiotifiedcyrillic:1124,Elcyrillic:1051,Elevenroman:8554,Emacron:274,Emacronacute:7702,Emacrongrave:7700,Emcyrillic:1052,Emonospace:65317,Encyrillic:1053,Endescendercyrillic:1186,Eng:330,Enghecyrillic:1188,Enhookcyrillic:1223,Eogonek:280,Eopen:400,Epsilon:917,Epsilontonos:904,Ercyrillic:1056,Ereversed:398,Ereversedcyrillic:1069,Escyrillic:1057,Esdescendercyrillic:1194,Esh:425,Esmall:63333,Eta:919,Etarmenian:1336,Etatonos:905,Eth:208,Ethsmall:63472,Etilde:7868,Etildebelow:7706,Euro:8364,Ezh:439,Ezhcaron:494,Ezhreversed:440,F:70,Fcircle:9403,Fdotaccent:7710,Feharmenian:1366,Feicoptic:996,Fhook:401,Fitacyrillic:1138,Fiveroman:8548,Fmonospace:65318,Fourroman:8547,Fsmall:63334,G:71,GBsquare:13191,Gacute:500,Gamma:915,Gammaafrican:404,Gangiacoptic:1002,Gbreve:286,Gcaron:486,Gcedilla:290,Gcircle:9404,Gcircumflex:284,Gcommaaccent:290,Gdot:288,Gdotaccent:288,Gecyrillic:1043,Ghadarmenian:1346,Ghemiddlehookcyrillic:1172,Ghestrokecyrillic:1170,Gheupturncyrillic:1168,Ghook:403,Gimarmenian:1331,Gjecyrillic:1027,Gmacron:7712,Gmonospace:65319,Grave:63182,Gravesmall:63328,Gsmall:63335,Gsmallhook:667,Gstroke:484,H:72,H18533:9679,H18543:9642,H18551:9643,H22073:9633,HPsquare:13259,Haabkhasiancyrillic:1192,Hadescendercyrillic:1202,Hardsigncyrillic:1066,Hbar:294,Hbrevebelow:7722,Hcedilla:7720,Hcircle:9405,Hcircumflex:292,Hdieresis:7718,Hdotaccent:7714,Hdotbelow:7716,Hmonospace:65320,Hoarmenian:1344,Horicoptic:1e3,Hsmall:63336,Hungarumlaut:63183,Hungarumlautsmall:63224,Hzsquare:13200,I:73,IAcyrillic:1071,IJ:306,IUcyrillic:1070,Iacute:205,Iacutesmall:63469,Ibreve:300,Icaron:463,Icircle:9406,Icircumflex:206,Icircumflexsmall:63470,Icyrillic:1030,Idblgrave:520,Idieresis:207,Idieresisacute:7726,Idieresiscyrillic:1252,Idieresissmall:63471,Idot:304,Idotaccent:304,Idotbelow:7882,Iebrevecyrillic:1238,Iecyrillic:1045,Ifraktur:8465,Igrave:204,Igravesmall:63468,Ihookabove:7880,Iicyrillic:1048,Iinvertedbreve:522,Iishortcyrillic:1049,Imacron:298,Imacroncyrillic:1250,Imonospace:65321,Iniarmenian:1339,Iocyrillic:1025,Iogonek:302,Iota:921,Iotaafrican:406,Iotadieresis:938,Iotatonos:906,Ismall:63337,Istroke:407,Itilde:296,Itildebelow:7724,Izhitsacyrillic:1140,Izhitsadblgravecyrillic:1142,J:74,Jaarmenian:1345,Jcircle:9407,Jcircumflex:308,Jecyrillic:1032,Jheharmenian:1355,Jmonospace:65322,Jsmall:63338,K:75,KBsquare:13189,KKsquare:13261,Kabashkircyrillic:1184,Kacute:7728,Kacyrillic:1050,Kadescendercyrillic:1178,Kahookcyrillic:1219,Kappa:922,Kastrokecyrillic:1182,Kaverticalstrokecyrillic:1180,Kcaron:488,Kcedilla:310,Kcircle:9408,Kcommaaccent:310,Kdotbelow:7730,Keharmenian:1364,Kenarmenian:1343,Khacyrillic:1061,Kheicoptic:998,Khook:408,Kjecyrillic:1036,Klinebelow:7732,Kmonospace:65323,Koppacyrillic:1152,Koppagreek:990,Ksicyrillic:1134,Ksmall:63339,L:76,LJ:455,LL:63167,Lacute:313,Lambda:923,Lcaron:317,Lcedilla:315,Lcircle:9409,Lcircumflexbelow:7740,Lcommaaccent:315,Ldot:319,Ldotaccent:319,Ldotbelow:7734,Ldotbelowmacron:7736,Liwnarmenian:1340,Lj:456,Ljecyrillic:1033,Llinebelow:7738,Lmonospace:65324,Lslash:321,Lslashsmall:63225,Lsmall:63340,M:77,MBsquare:13190,Macron:63184,Macronsmall:63407,Macute:7742,Mcircle:9410,Mdotaccent:7744,Mdotbelow:7746,Menarmenian:1348,Mmonospace:65325,Msmall:63341,Mturned:412,Mu:924,N:78,NJ:458,Nacute:323,Ncaron:327,Ncedilla:325,Ncircle:9411,Ncircumflexbelow:7754,Ncommaaccent:325,Ndotaccent:7748,Ndotbelow:7750,Nhookleft:413,Nineroman:8552,Nj:459,Njecyrillic:1034,Nlinebelow:7752,Nmonospace:65326,Nowarmenian:1350,Nsmall:63342,Ntilde:209,Ntildesmall:63473,Nu:925,O:79,OE:338,OEsmall:63226,Oacute:211,Oacutesmall:63475,Obarredcyrillic:1256,Obarreddieresiscyrillic:1258,Obreve:334,Ocaron:465,Ocenteredtilde:415,Ocircle:9412,Ocircumflex:212,Ocircumflexacute:7888,Ocircumflexdotbelow:7896,Ocircumflexgrave:7890,Ocircumflexhookabove:7892,Ocircumflexsmall:63476,Ocircumflextilde:7894,Ocyrillic:1054,Odblacute:336,Odblgrave:524,Odieresis:214,Odieresiscyrillic:1254,Odieresissmall:63478,Odotbelow:7884,Ogoneksmall:63227,Ograve:210,Ogravesmall:63474,Oharmenian:1365,Ohm:8486,Ohookabove:7886,Ohorn:416,Ohornacute:7898,Ohorndotbelow:7906,Ohorngrave:7900,Ohornhookabove:7902,Ohorntilde:7904,Ohungarumlaut:336,Oi:418,Oinvertedbreve:526,Omacron:332,Omacronacute:7762,Omacrongrave:7760,Omega:8486,Omegacyrillic:1120,Omegagreek:937,Omegaroundcyrillic:1146,Omegatitlocyrillic:1148,Omegatonos:911,Omicron:927,Omicrontonos:908,Omonospace:65327,Oneroman:8544,Oogonek:490,Oogonekmacron:492,Oopen:390,Oslash:216,Oslashacute:510,Oslashsmall:63480,Osmall:63343,Ostrokeacute:510,Otcyrillic:1150,Otilde:213,Otildeacute:7756,Otildedieresis:7758,Otildesmall:63477,P:80,Pacute:7764,Pcircle:9413,Pdotaccent:7766,Pecyrillic:1055,Peharmenian:1354,Pemiddlehookcyrillic:1190,Phi:934,Phook:420,Pi:928,Piwrarmenian:1363,Pmonospace:65328,Psi:936,Psicyrillic:1136,Psmall:63344,Q:81,Qcircle:9414,Qmonospace:65329,Qsmall:63345,R:82,Raarmenian:1356,Racute:340,Rcaron:344,Rcedilla:342,Rcircle:9415,Rcommaaccent:342,Rdblgrave:528,Rdotaccent:7768,Rdotbelow:7770,Rdotbelowmacron:7772,Reharmenian:1360,Rfraktur:8476,Rho:929,Ringsmall:63228,Rinvertedbreve:530,Rlinebelow:7774,Rmonospace:65330,Rsmall:63346,Rsmallinverted:641,Rsmallinvertedsuperior:694,S:83,SF010000:9484,SF020000:9492,SF030000:9488,SF040000:9496,SF050000:9532,SF060000:9516,SF070000:9524,SF080000:9500,SF090000:9508,SF100000:9472,SF110000:9474,SF190000:9569,SF200000:9570,SF210000:9558,SF220000:9557,SF230000:9571,SF240000:9553,SF250000:9559,SF260000:9565,SF270000:9564,SF280000:9563,SF360000:9566,SF370000:9567,SF380000:9562,SF390000:9556,SF400000:9577,SF410000:9574,SF420000:9568,SF430000:9552,SF440000:9580,SF450000:9575,SF460000:9576,SF470000:9572,SF480000:9573,SF490000:9561,SF500000:9560,SF510000:9554,SF520000:9555,SF530000:9579,SF540000:9578,Sacute:346,Sacutedotaccent:7780,Sampigreek:992,Scaron:352,Scarondotaccent:7782,Scaronsmall:63229,Scedilla:350,Schwa:399,Schwacyrillic:1240,Schwadieresiscyrillic:1242,Scircle:9416,Scircumflex:348,Scommaaccent:536,Sdotaccent:7776,Sdotbelow:7778,Sdotbelowdotaccent:7784,Seharmenian:1357,Sevenroman:8550,Shaarmenian:1351,Shacyrillic:1064,Shchacyrillic:1065,Sheicoptic:994,Shhacyrillic:1210,Shimacoptic:1004,Sigma:931,Sixroman:8549,Smonospace:65331,Softsigncyrillic:1068,Ssmall:63347,Stigmagreek:986,T:84,Tau:932,Tbar:358,Tcaron:356,Tcedilla:354,Tcircle:9417,Tcircumflexbelow:7792,Tcommaaccent:354,Tdotaccent:7786,Tdotbelow:7788,Tecyrillic:1058,Tedescendercyrillic:1196,Tenroman:8553,Tetsecyrillic:1204,Theta:920,Thook:428,Thorn:222,Thornsmall:63486,Threeroman:8546,Tildesmall:63230,Tiwnarmenian:1359,Tlinebelow:7790,Tmonospace:65332,Toarmenian:1337,Tonefive:444,Tonesix:388,Tonetwo:423,Tretroflexhook:430,Tsecyrillic:1062,Tshecyrillic:1035,Tsmall:63348,Twelveroman:8555,Tworoman:8545,U:85,Uacute:218,Uacutesmall:63482,Ubreve:364,Ucaron:467,Ucircle:9418,Ucircumflex:219,Ucircumflexbelow:7798,Ucircumflexsmall:63483,Ucyrillic:1059,Udblacute:368,Udblgrave:532,Udieresis:220,Udieresisacute:471,Udieresisbelow:7794,Udieresiscaron:473,Udieresiscyrillic:1264,Udieresisgrave:475,Udieresismacron:469,Udieresissmall:63484,Udotbelow:7908,Ugrave:217,Ugravesmall:63481,Uhookabove:7910,Uhorn:431,Uhornacute:7912,Uhorndotbelow:7920,Uhorngrave:7914,Uhornhookabove:7916,Uhorntilde:7918,Uhungarumlaut:368,Uhungarumlautcyrillic:1266,Uinvertedbreve:534,Ukcyrillic:1144,Umacron:362,Umacroncyrillic:1262,Umacrondieresis:7802,Umonospace:65333,Uogonek:370,Upsilon:933,Upsilon1:978,Upsilonacutehooksymbolgreek:979,Upsilonafrican:433,Upsilondieresis:939,Upsilondieresishooksymbolgreek:980,Upsilonhooksymbol:978,Upsilontonos:910,Uring:366,Ushortcyrillic:1038,Usmall:63349,Ustraightcyrillic:1198,Ustraightstrokecyrillic:1200,Utilde:360,Utildeacute:7800,Utildebelow:7796,V:86,Vcircle:9419,Vdotbelow:7806,Vecyrillic:1042,Vewarmenian:1358,Vhook:434,Vmonospace:65334,Voarmenian:1352,Vsmall:63350,Vtilde:7804,W:87,Wacute:7810,Wcircle:9420,Wcircumflex:372,Wdieresis:7812,Wdotaccent:7814,Wdotbelow:7816,Wgrave:7808,Wmonospace:65335,Wsmall:63351,X:88,Xcircle:9421,Xdieresis:7820,Xdotaccent:7818,Xeharmenian:1341,Xi:926,Xmonospace:65336,Xsmall:63352,Y:89,Yacute:221,Yacutesmall:63485,Yatcyrillic:1122,Ycircle:9422,Ycircumflex:374,Ydieresis:376,Ydieresissmall:63487,Ydotaccent:7822,Ydotbelow:7924,Yericyrillic:1067,Yerudieresiscyrillic:1272,Ygrave:7922,Yhook:435,Yhookabove:7926,Yiarmenian:1349,Yicyrillic:1031,Yiwnarmenian:1362,Ymonospace:65337,Ysmall:63353,Ytilde:7928,Yusbigcyrillic:1130,Yusbigiotifiedcyrillic:1132,Yuslittlecyrillic:1126,Yuslittleiotifiedcyrillic:1128,Z:90,Zaarmenian:1334,Zacute:377,Zcaron:381,Zcaronsmall:63231,Zcircle:9423,Zcircumflex:7824,Zdot:379,Zdotaccent:379,Zdotbelow:7826,Zecyrillic:1047,Zedescendercyrillic:1176,Zedieresiscyrillic:1246,Zeta:918,Zhearmenian:1338,Zhebrevecyrillic:1217,Zhecyrillic:1046,Zhedescendercyrillic:1174,Zhedieresiscyrillic:1244,Zlinebelow:7828,Zmonospace:65338,Zsmall:63354,Zstroke:437,a:97,aabengali:2438,aacute:225,aadeva:2310,aagujarati:2694,aagurmukhi:2566,aamatragurmukhi:2622,aarusquare:13059,aavowelsignbengali:2494,aavowelsigndeva:2366,aavowelsigngujarati:2750,abbreviationmarkarmenian:1375,abbreviationsigndeva:2416,abengali:2437,abopomofo:12570,abreve:259,abreveacute:7855,abrevecyrillic:1233,abrevedotbelow:7863,abrevegrave:7857,abrevehookabove:7859,abrevetilde:7861,acaron:462,acircle:9424,acircumflex:226,acircumflexacute:7845,acircumflexdotbelow:7853,acircumflexgrave:7847,acircumflexhookabove:7849,acircumflextilde:7851,acute:180,acutebelowcmb:791,acutecmb:769,acutecomb:769,acutedeva:2388,acutelowmod:719,acutetonecmb:833,acyrillic:1072,adblgrave:513,addakgurmukhi:2673,adeva:2309,adieresis:228,adieresiscyrillic:1235,adieresismacron:479,adotbelow:7841,adotmacron:481,ae:230,aeacute:509,aekorean:12624,aemacron:483,afii00208:8213,afii08941:8356,afii10017:1040,afii10018:1041,afii10019:1042,afii10020:1043,afii10021:1044,afii10022:1045,afii10023:1025,afii10024:1046,afii10025:1047,afii10026:1048,afii10027:1049,afii10028:1050,afii10029:1051,afii10030:1052,afii10031:1053,afii10032:1054,afii10033:1055,afii10034:1056,afii10035:1057,afii10036:1058,afii10037:1059,afii10038:1060,afii10039:1061,afii10040:1062,afii10041:1063,afii10042:1064,afii10043:1065,afii10044:1066,afii10045:1067,afii10046:1068,afii10047:1069,afii10048:1070,afii10049:1071,afii10050:1168,afii10051:1026,afii10052:1027,afii10053:1028,afii10054:1029,afii10055:1030,afii10056:1031,afii10057:1032,afii10058:1033,afii10059:1034,afii10060:1035,afii10061:1036,afii10062:1038,afii10063:63172,afii10064:63173,afii10065:1072,afii10066:1073,afii10067:1074,afii10068:1075,afii10069:1076,afii10070:1077,afii10071:1105,afii10072:1078,afii10073:1079,afii10074:1080,afii10075:1081,afii10076:1082,afii10077:1083,afii10078:1084,afii10079:1085,afii10080:1086,afii10081:1087,afii10082:1088,afii10083:1089,afii10084:1090,afii10085:1091,afii10086:1092,afii10087:1093,afii10088:1094,afii10089:1095,afii10090:1096,afii10091:1097,afii10092:1098,afii10093:1099,afii10094:1100,afii10095:1101,afii10096:1102,afii10097:1103,afii10098:1169,afii10099:1106,afii10100:1107,afii10101:1108,afii10102:1109,afii10103:1110,afii10104:1111,afii10105:1112,afii10106:1113,afii10107:1114,afii10108:1115,afii10109:1116,afii10110:1118,afii10145:1039,afii10146:1122,afii10147:1138,afii10148:1140,afii10192:63174,afii10193:1119,afii10194:1123,afii10195:1139,afii10196:1141,afii10831:63175,afii10832:63176,afii10846:1241,afii299:8206,afii300:8207,afii301:8205,afii57381:1642,afii57388:1548,afii57392:1632,afii57393:1633,afii57394:1634,afii57395:1635,afii57396:1636,afii57397:1637,afii57398:1638,afii57399:1639,afii57400:1640,afii57401:1641,afii57403:1563,afii57407:1567,afii57409:1569,afii57410:1570,afii57411:1571,afii57412:1572,afii57413:1573,afii57414:1574,afii57415:1575,afii57416:1576,afii57417:1577,afii57418:1578,afii57419:1579,afii57420:1580,afii57421:1581,afii57422:1582,afii57423:1583,afii57424:1584,afii57425:1585,afii57426:1586,afii57427:1587,afii57428:1588,afii57429:1589,afii57430:1590,afii57431:1591,afii57432:1592,afii57433:1593,afii57434:1594,afii57440:1600,afii57441:1601,afii57442:1602,afii57443:1603,afii57444:1604,afii57445:1605,afii57446:1606,afii57448:1608,afii57449:1609,afii57450:1610,afii57451:1611,afii57452:1612,afii57453:1613,afii57454:1614,afii57455:1615,afii57456:1616,afii57457:1617,afii57458:1618,afii57470:1607,afii57505:1700,afii57506:1662,afii57507:1670,afii57508:1688,afii57509:1711,afii57511:1657,afii57512:1672,afii57513:1681,afii57514:1722,afii57519:1746,afii57534:1749,afii57636:8362,afii57645:1470,afii57658:1475,afii57664:1488,afii57665:1489,afii57666:1490,afii57667:1491,afii57668:1492,afii57669:1493,afii57670:1494,afii57671:1495,afii57672:1496,afii57673:1497,afii57674:1498,afii57675:1499,afii57676:1500,afii57677:1501,afii57678:1502,afii57679:1503,afii57680:1504,afii57681:1505,afii57682:1506,afii57683:1507,afii57684:1508,afii57685:1509,afii57686:1510,afii57687:1511,afii57688:1512,afii57689:1513,afii57690:1514,afii57694:64298,afii57695:64299,afii57700:64331,afii57705:64287,afii57716:1520,afii57717:1521,afii57718:1522,afii57723:64309,afii57793:1460,afii57794:1461,afii57795:1462,afii57796:1467,afii57797:1464,afii57798:1463,afii57799:1456,afii57800:1458,afii57801:1457,afii57802:1459,afii57803:1474,afii57804:1473,afii57806:1465,afii57807:1468,afii57839:1469,afii57841:1471,afii57842:1472,afii57929:700,afii61248:8453,afii61289:8467,afii61352:8470,afii61573:8236,afii61574:8237,afii61575:8238,afii61664:8204,afii63167:1645,afii64937:701,agrave:224,agujarati:2693,agurmukhi:2565,ahiragana:12354,ahookabove:7843,aibengali:2448,aibopomofo:12574,aideva:2320,aiecyrillic:1237,aigujarati:2704,aigurmukhi:2576,aimatragurmukhi:2632,ainarabic:1593,ainfinalarabic:65226,aininitialarabic:65227,ainmedialarabic:65228,ainvertedbreve:515,aivowelsignbengali:2504,aivowelsigndeva:2376,aivowelsigngujarati:2760,akatakana:12450,akatakanahalfwidth:65393,akorean:12623,alef:1488,alefarabic:1575,alefdageshhebrew:64304,aleffinalarabic:65166,alefhamzaabovearabic:1571,alefhamzaabovefinalarabic:65156,alefhamzabelowarabic:1573,alefhamzabelowfinalarabic:65160,alefhebrew:1488,aleflamedhebrew:64335,alefmaddaabovearabic:1570,alefmaddaabovefinalarabic:65154,alefmaksuraarabic:1609,alefmaksurafinalarabic:65264,alefmaksurainitialarabic:65267,alefmaksuramedialarabic:65268,alefpatahhebrew:64302,alefqamatshebrew:64303,aleph:8501,allequal:8780,alpha:945,alphatonos:940,amacron:257,amonospace:65345,ampersand:38,ampersandmonospace:65286,ampersandsmall:63270,amsquare:13250,anbopomofo:12578,angbopomofo:12580,angbracketleft:12296,angbracketright:12297,angkhankhuthai:3674,angle:8736,anglebracketleft:12296,anglebracketleftvertical:65087,anglebracketright:12297,anglebracketrightvertical:65088,angleleft:9001,angleright:9002,angstrom:8491,anoteleia:903,anudattadeva:2386,anusvarabengali:2434,anusvaradeva:2306,anusvaragujarati:2690,aogonek:261,apaatosquare:13056,aparen:9372,apostrophearmenian:1370,apostrophemod:700,apple:63743,approaches:8784,approxequal:8776,approxequalorimage:8786,approximatelyequal:8773,araeaekorean:12686,araeakorean:12685,arc:8978,arighthalfring:7834,aring:229,aringacute:507,aringbelow:7681,arrowboth:8596,arrowdashdown:8675,arrowdashleft:8672,arrowdashright:8674,arrowdashup:8673,arrowdblboth:8660,arrowdbldown:8659,arrowdblleft:8656,arrowdblright:8658,arrowdblup:8657,arrowdown:8595,arrowdownleft:8601,arrowdownright:8600,arrowdownwhite:8681,arrowheaddownmod:709,arrowheadleftmod:706,arrowheadrightmod:707,arrowheadupmod:708,arrowhorizex:63719,arrowleft:8592,arrowleftdbl:8656,arrowleftdblstroke:8653,arrowleftoverright:8646,arrowleftwhite:8678,arrowright:8594,arrowrightdblstroke:8655,arrowrightheavy:10142,arrowrightoverleft:8644,arrowrightwhite:8680,arrowtableft:8676,arrowtabright:8677,arrowup:8593,arrowupdn:8597,arrowupdnbse:8616,arrowupdownbase:8616,arrowupleft:8598,arrowupleftofdown:8645,arrowupright:8599,arrowupwhite:8679,arrowvertex:63718,asciicircum:94,asciicircummonospace:65342,asciitilde:126,asciitildemonospace:65374,ascript:593,ascriptturned:594,asmallhiragana:12353,asmallkatakana:12449,asmallkatakanahalfwidth:65383,asterisk:42,asteriskaltonearabic:1645,asteriskarabic:1645,asteriskmath:8727,asteriskmonospace:65290,asterisksmall:65121,asterism:8258,asuperior:63209,asymptoticallyequal:8771,at:64,atilde:227,atmonospace:65312,atsmall:65131,aturned:592,aubengali:2452,aubopomofo:12576,audeva:2324,augujarati:2708,augurmukhi:2580,aulengthmarkbengali:2519,aumatragurmukhi:2636,auvowelsignbengali:2508,auvowelsigndeva:2380,auvowelsigngujarati:2764,avagrahadeva:2365,aybarmenian:1377,ayin:1506,ayinaltonehebrew:64288,ayinhebrew:1506,b:98,babengali:2476,backslash:92,backslashmonospace:65340,badeva:2348,bagujarati:2732,bagurmukhi:2604,bahiragana:12400,bahtthai:3647,bakatakana:12496,bar:124,barmonospace:65372,bbopomofo:12549,bcircle:9425,bdotaccent:7683,bdotbelow:7685,beamedsixteenthnotes:9836,because:8757,becyrillic:1073,beharabic:1576,behfinalarabic:65168,behinitialarabic:65169,behiragana:12409,behmedialarabic:65170,behmeeminitialarabic:64671,behmeemisolatedarabic:64520,behnoonfinalarabic:64621,bekatakana:12505,benarmenian:1378,bet:1489,beta:946,betasymbolgreek:976,betdagesh:64305,betdageshhebrew:64305,bethebrew:1489,betrafehebrew:64332,bhabengali:2477,bhadeva:2349,bhagujarati:2733,bhagurmukhi:2605,bhook:595,bihiragana:12403,bikatakana:12499,bilabialclick:664,bindigurmukhi:2562,birusquare:13105,blackcircle:9679,blackdiamond:9670,blackdownpointingtriangle:9660,blackleftpointingpointer:9668,blackleftpointingtriangle:9664,blacklenticularbracketleft:12304,blacklenticularbracketleftvertical:65083,blacklenticularbracketright:12305,blacklenticularbracketrightvertical:65084,blacklowerlefttriangle:9699,blacklowerrighttriangle:9698,blackrectangle:9644,blackrightpointingpointer:9658,blackrightpointingtriangle:9654,blacksmallsquare:9642,blacksmilingface:9787,blacksquare:9632,blackstar:9733,blackupperlefttriangle:9700,blackupperrighttriangle:9701,blackuppointingsmalltriangle:9652,blackuppointingtriangle:9650,blank:9251,blinebelow:7687,block:9608,bmonospace:65346,bobaimaithai:3610,bohiragana:12412,bokatakana:12508,bparen:9373,bqsquare:13251,braceex:63732,braceleft:123,braceleftbt:63731,braceleftmid:63730,braceleftmonospace:65371,braceleftsmall:65115,bracelefttp:63729,braceleftvertical:65079,braceright:125,bracerightbt:63742,bracerightmid:63741,bracerightmonospace:65373,bracerightsmall:65116,bracerighttp:63740,bracerightvertical:65080,bracketleft:91,bracketleftbt:63728,bracketleftex:63727,bracketleftmonospace:65339,bracketlefttp:63726,bracketright:93,bracketrightbt:63739,bracketrightex:63738,bracketrightmonospace:65341,bracketrighttp:63737,breve:728,brevebelowcmb:814,brevecmb:774,breveinvertedbelowcmb:815,breveinvertedcmb:785,breveinverteddoublecmb:865,bridgebelowcmb:810,bridgeinvertedbelowcmb:826,brokenbar:166,bstroke:384,bsuperior:63210,btopbar:387,buhiragana:12406,bukatakana:12502,bullet:8226,bulletinverse:9688,bulletoperator:8729,bullseye:9678,c:99,caarmenian:1390,cabengali:2458,cacute:263,cadeva:2330,cagujarati:2714,cagurmukhi:2586,calsquare:13192,candrabindubengali:2433,candrabinducmb:784,candrabindudeva:2305,candrabindugujarati:2689,capslock:8682,careof:8453,caron:711,caronbelowcmb:812,caroncmb:780,carriagereturn:8629,cbopomofo:12568,ccaron:269,ccedilla:231,ccedillaacute:7689,ccircle:9426,ccircumflex:265,ccurl:597,cdot:267,cdotaccent:267,cdsquare:13253,cedilla:184,cedillacmb:807,cent:162,centigrade:8451,centinferior:63199,centmonospace:65504,centoldstyle:63394,centsuperior:63200,chaarmenian:1401,chabengali:2459,chadeva:2331,chagujarati:2715,chagurmukhi:2587,chbopomofo:12564,cheabkhasiancyrillic:1213,checkmark:10003,checyrillic:1095,chedescenderabkhasiancyrillic:1215,chedescendercyrillic:1207,chedieresiscyrillic:1269,cheharmenian:1395,chekhakassiancyrillic:1228,cheverticalstrokecyrillic:1209,chi:967,chieuchacirclekorean:12919,chieuchaparenkorean:12823,chieuchcirclekorean:12905,chieuchkorean:12618,chieuchparenkorean:12809,chochangthai:3594,chochanthai:3592,chochingthai:3593,chochoethai:3596,chook:392,cieucacirclekorean:12918,cieucaparenkorean:12822,cieuccirclekorean:12904,cieuckorean:12616,cieucparenkorean:12808,cieucuparenkorean:12828,circle:9675,circlecopyrt:169,circlemultiply:8855,circleot:8857,circleplus:8853,circlepostalmark:12342,circlewithlefthalfblack:9680,circlewithrighthalfblack:9681,circumflex:710,circumflexbelowcmb:813,circumflexcmb:770,clear:8999,clickalveolar:450,clickdental:448,clicklateral:449,clickretroflex:451,club:9827,clubsuitblack:9827,clubsuitwhite:9831,cmcubedsquare:13220,cmonospace:65347,cmsquaredsquare:13216,coarmenian:1409,colon:58,colonmonetary:8353,colonmonospace:65306,colonsign:8353,colonsmall:65109,colontriangularhalfmod:721,colontriangularmod:720,comma:44,commaabovecmb:787,commaaboverightcmb:789,commaaccent:63171,commaarabic:1548,commaarmenian:1373,commainferior:63201,commamonospace:65292,commareversedabovecmb:788,commareversedmod:701,commasmall:65104,commasuperior:63202,commaturnedabovecmb:786,commaturnedmod:699,compass:9788,congruent:8773,contourintegral:8750,control:8963,controlACK:6,controlBEL:7,controlBS:8,controlCAN:24,controlCR:13,controlDC1:17,controlDC2:18,controlDC3:19,controlDC4:20,controlDEL:127,controlDLE:16,controlEM:25,controlENQ:5,controlEOT:4,controlESC:27,controlETB:23,controlETX:3,controlFF:12,controlFS:28,controlGS:29,controlHT:9,controlLF:10,controlNAK:21,controlRS:30,controlSI:15,controlSO:14,controlSOT:2,controlSTX:1,controlSUB:26,controlSYN:22,controlUS:31,controlVT:11,copyright:169,copyrightsans:63721,copyrightserif:63193,cornerbracketleft:12300,cornerbracketlefthalfwidth:65378,cornerbracketleftvertical:65089,cornerbracketright:12301,cornerbracketrighthalfwidth:65379,cornerbracketrightvertical:65090,corporationsquare:13183,cosquare:13255,coverkgsquare:13254,cparen:9374,cruzeiro:8354,cstretched:663,curlyand:8911,curlyor:8910,currency:164,cyrBreve:63185,cyrFlex:63186,cyrbreve:63188,cyrflex:63189,d:100,daarmenian:1380,dabengali:2470,dadarabic:1590,dadeva:2342,dadfinalarabic:65214,dadinitialarabic:65215,dadmedialarabic:65216,dagesh:1468,dageshhebrew:1468,dagger:8224,daggerdbl:8225,dagujarati:2726,dagurmukhi:2598,dahiragana:12384,dakatakana:12480,dalarabic:1583,dalet:1491,daletdagesh:64307,daletdageshhebrew:64307,dalethebrew:1491,dalfinalarabic:65194,dammaarabic:1615,dammalowarabic:1615,dammatanaltonearabic:1612,dammatanarabic:1612,danda:2404,dargahebrew:1447,dargalefthebrew:1447,dasiapneumatacyrilliccmb:1157,dblGrave:63187,dblanglebracketleft:12298,dblanglebracketleftvertical:65085,dblanglebracketright:12299,dblanglebracketrightvertical:65086,dblarchinvertedbelowcmb:811,dblarrowleft:8660,dblarrowright:8658,dbldanda:2405,dblgrave:63190,dblgravecmb:783,dblintegral:8748,dbllowline:8215,dbllowlinecmb:819,dbloverlinecmb:831,dblprimemod:698,dblverticalbar:8214,dblverticallineabovecmb:782,dbopomofo:12553,dbsquare:13256,dcaron:271,dcedilla:7697,dcircle:9427,dcircumflexbelow:7699,dcroat:273,ddabengali:2465,ddadeva:2337,ddagujarati:2721,ddagurmukhi:2593,ddalarabic:1672,ddalfinalarabic:64393,dddhadeva:2396,ddhabengali:2466,ddhadeva:2338,ddhagujarati:2722,ddhagurmukhi:2594,ddotaccent:7691,ddotbelow:7693,decimalseparatorarabic:1643,decimalseparatorpersian:1643,decyrillic:1076,degree:176,dehihebrew:1453,dehiragana:12391,deicoptic:1007,dekatakana:12487,deleteleft:9003,deleteright:8998,delta:948,deltaturned:397,denominatorminusonenumeratorbengali:2552,dezh:676,dhabengali:2471,dhadeva:2343,dhagujarati:2727,dhagurmukhi:2599,dhook:599,dialytikatonos:901,dialytikatonoscmb:836,diamond:9830,diamondsuitwhite:9826,dieresis:168,dieresisacute:63191,dieresisbelowcmb:804,dieresiscmb:776,dieresisgrave:63192,dieresistonos:901,dihiragana:12386,dikatakana:12482,dittomark:12291,divide:247,divides:8739,divisionslash:8725,djecyrillic:1106,dkshade:9619,dlinebelow:7695,dlsquare:13207,dmacron:273,dmonospace:65348,dnblock:9604,dochadathai:3598,dodekthai:3604,dohiragana:12393,dokatakana:12489,dollar:36,dollarinferior:63203,dollarmonospace:65284,dollaroldstyle:63268,dollarsmall:65129,dollarsuperior:63204,dong:8363,dorusquare:13094,dotaccent:729,dotaccentcmb:775,dotbelowcmb:803,dotbelowcomb:803,dotkatakana:12539,dotlessi:305,dotlessj:63166,dotlessjstrokehook:644,dotmath:8901,dottedcircle:9676,doubleyodpatah:64287,doubleyodpatahhebrew:64287,downtackbelowcmb:798,downtackmod:725,dparen:9375,dsuperior:63211,dtail:598,dtopbar:396,duhiragana:12389,dukatakana:12485,dz:499,dzaltone:675,dzcaron:454,dzcurl:677,dzeabkhasiancyrillic:1249,dzecyrillic:1109,dzhecyrillic:1119,e:101,eacute:233,earth:9793,ebengali:2447,ebopomofo:12572,ebreve:277,ecandradeva:2317,ecandragujarati:2701,ecandravowelsigndeva:2373,ecandravowelsigngujarati:2757,ecaron:283,ecedillabreve:7709,echarmenian:1381,echyiwnarmenian:1415,ecircle:9428,ecircumflex:234,ecircumflexacute:7871,ecircumflexbelow:7705,ecircumflexdotbelow:7879,ecircumflexgrave:7873,ecircumflexhookabove:7875,ecircumflextilde:7877,ecyrillic:1108,edblgrave:517,edeva:2319,edieresis:235,edot:279,edotaccent:279,edotbelow:7865,eegurmukhi:2575,eematragurmukhi:2631,efcyrillic:1092,egrave:232,egujarati:2703,eharmenian:1383,ehbopomofo:12573,ehiragana:12360,ehookabove:7867,eibopomofo:12575,eight:56,eightarabic:1640,eightbengali:2542,eightcircle:9319,eightcircleinversesansserif:10129,eightdeva:2414,eighteencircle:9329,eighteenparen:9349,eighteenperiod:9369,eightgujarati:2798,eightgurmukhi:2670,eighthackarabic:1640,eighthangzhou:12328,eighthnotebeamed:9835,eightideographicparen:12839,eightinferior:8328,eightmonospace:65304,eightoldstyle:63288,eightparen:9339,eightperiod:9359,eightpersian:1784,eightroman:8567,eightsuperior:8312,eightthai:3672,einvertedbreve:519,eiotifiedcyrillic:1125,ekatakana:12456,ekatakanahalfwidth:65396,ekonkargurmukhi:2676,ekorean:12628,elcyrillic:1083,element:8712,elevencircle:9322,elevenparen:9342,elevenperiod:9362,elevenroman:8570,ellipsis:8230,ellipsisvertical:8942,emacron:275,emacronacute:7703,emacrongrave:7701,emcyrillic:1084,emdash:8212,emdashvertical:65073,emonospace:65349,emphasismarkarmenian:1371,emptyset:8709,enbopomofo:12579,encyrillic:1085,endash:8211,endashvertical:65074,endescendercyrillic:1187,eng:331,engbopomofo:12581,enghecyrillic:1189,enhookcyrillic:1224,enspace:8194,eogonek:281,eokorean:12627,eopen:603,eopenclosed:666,eopenreversed:604,eopenreversedclosed:606,eopenreversedhook:605,eparen:9376,epsilon:949,epsilontonos:941,equal:61,equalmonospace:65309,equalsmall:65126,equalsuperior:8316,equivalence:8801,erbopomofo:12582,ercyrillic:1088,ereversed:600,ereversedcyrillic:1101,escyrillic:1089,esdescendercyrillic:1195,esh:643,eshcurl:646,eshortdeva:2318,eshortvowelsigndeva:2374,eshreversedloop:426,eshsquatreversed:645,esmallhiragana:12359,esmallkatakana:12455,esmallkatakanahalfwidth:65386,estimated:8494,esuperior:63212,eta:951,etarmenian:1384,etatonos:942,eth:240,etilde:7869,etildebelow:7707,etnahtafoukhhebrew:1425,etnahtafoukhlefthebrew:1425,etnahtahebrew:1425,etnahtalefthebrew:1425,eturned:477,eukorean:12641,euro:8364,evowelsignbengali:2503,evowelsigndeva:2375,evowelsigngujarati:2759,exclam:33,exclamarmenian:1372,exclamdbl:8252,exclamdown:161,exclamdownsmall:63393,exclammonospace:65281,exclamsmall:63265,existential:8707,ezh:658,ezhcaron:495,ezhcurl:659,ezhreversed:441,ezhtail:442,f:102,fadeva:2398,fagurmukhi:2654,fahrenheit:8457,fathaarabic:1614,fathalowarabic:1614,fathatanarabic:1611,fbopomofo:12552,fcircle:9429,fdotaccent:7711,feharabic:1601,feharmenian:1414,fehfinalarabic:65234,fehinitialarabic:65235,fehmedialarabic:65236,feicoptic:997,female:9792,ff:64256,ffi:64259,ffl:64260,fi:64257,fifteencircle:9326,fifteenparen:9346,fifteenperiod:9366,figuredash:8210,filledbox:9632,filledrect:9644,finalkaf:1498,finalkafdagesh:64314,finalkafdageshhebrew:64314,finalkafhebrew:1498,finalmem:1501,finalmemhebrew:1501,finalnun:1503,finalnunhebrew:1503,finalpe:1507,finalpehebrew:1507,finaltsadi:1509,finaltsadihebrew:1509,firsttonechinese:713,fisheye:9673,fitacyrillic:1139,five:53,fivearabic:1637,fivebengali:2539,fivecircle:9316,fivecircleinversesansserif:10126,fivedeva:2411,fiveeighths:8541,fivegujarati:2795,fivegurmukhi:2667,fivehackarabic:1637,fivehangzhou:12325,fiveideographicparen:12836,fiveinferior:8325,fivemonospace:65301,fiveoldstyle:63285,fiveparen:9336,fiveperiod:9356,fivepersian:1781,fiveroman:8564,fivesuperior:8309,fivethai:3669,fl:64258,florin:402,fmonospace:65350,fmsquare:13209,fofanthai:3615,fofathai:3613,fongmanthai:3663,forall:8704,four:52,fourarabic:1636,fourbengali:2538,fourcircle:9315,fourcircleinversesansserif:10125,fourdeva:2410,fourgujarati:2794,fourgurmukhi:2666,fourhackarabic:1636,fourhangzhou:12324,fourideographicparen:12835,fourinferior:8324,fourmonospace:65300,fournumeratorbengali:2551,fouroldstyle:63284,fourparen:9335,fourperiod:9355,fourpersian:1780,fourroman:8563,foursuperior:8308,fourteencircle:9325,fourteenparen:9345,fourteenperiod:9365,fourthai:3668,fourthtonechinese:715,fparen:9377,fraction:8260,franc:8355,g:103,gabengali:2455,gacute:501,gadeva:2327,gafarabic:1711,gaffinalarabic:64403,gafinitialarabic:64404,gafmedialarabic:64405,gagujarati:2711,gagurmukhi:2583,gahiragana:12364,gakatakana:12460,gamma:947,gammalatinsmall:611,gammasuperior:736,gangiacoptic:1003,gbopomofo:12557,gbreve:287,gcaron:487,gcedilla:291,gcircle:9430,gcircumflex:285,gcommaaccent:291,gdot:289,gdotaccent:289,gecyrillic:1075,gehiragana:12370,gekatakana:12466,geometricallyequal:8785,gereshaccenthebrew:1436,gereshhebrew:1523,gereshmuqdamhebrew:1437,germandbls:223,gershayimaccenthebrew:1438,gershayimhebrew:1524,getamark:12307,ghabengali:2456,ghadarmenian:1394,ghadeva:2328,ghagujarati:2712,ghagurmukhi:2584,ghainarabic:1594,ghainfinalarabic:65230,ghaininitialarabic:65231,ghainmedialarabic:65232,ghemiddlehookcyrillic:1173,ghestrokecyrillic:1171,gheupturncyrillic:1169,ghhadeva:2394,ghhagurmukhi:2650,ghook:608,ghzsquare:13203,gihiragana:12366,gikatakana:12462,gimarmenian:1379,gimel:1490,gimeldagesh:64306,gimeldageshhebrew:64306,gimelhebrew:1490,gjecyrillic:1107,glottalinvertedstroke:446,glottalstop:660,glottalstopinverted:662,glottalstopmod:704,glottalstopreversed:661,glottalstopreversedmod:705,glottalstopreversedsuperior:740,glottalstopstroke:673,glottalstopstrokereversed:674,gmacron:7713,gmonospace:65351,gohiragana:12372,gokatakana:12468,gparen:9378,gpasquare:13228,gradient:8711,grave:96,gravebelowcmb:790,gravecmb:768,gravecomb:768,gravedeva:2387,gravelowmod:718,gravemonospace:65344,gravetonecmb:832,greater:62,greaterequal:8805,greaterequalorless:8923,greatermonospace:65310,greaterorequivalent:8819,greaterorless:8823,greateroverequal:8807,greatersmall:65125,gscript:609,gstroke:485,guhiragana:12368,guillemotleft:171,guillemotright:187,guilsinglleft:8249,guilsinglright:8250,gukatakana:12464,guramusquare:13080,gysquare:13257,h:104,haabkhasiancyrillic:1193,haaltonearabic:1729,habengali:2489,hadescendercyrillic:1203,hadeva:2361,hagujarati:2745,hagurmukhi:2617,haharabic:1581,hahfinalarabic:65186,hahinitialarabic:65187,hahiragana:12399,hahmedialarabic:65188,haitusquare:13098,hakatakana:12495,hakatakanahalfwidth:65418,halantgurmukhi:2637,hamzaarabic:1569,hamzalowarabic:1569,hangulfiller:12644,hardsigncyrillic:1098,harpoonleftbarbup:8636,harpoonrightbarbup:8640,hasquare:13258,hatafpatah:1458,hatafpatah16:1458,hatafpatah23:1458,hatafpatah2f:1458,hatafpatahhebrew:1458,hatafpatahnarrowhebrew:1458,hatafpatahquarterhebrew:1458,hatafpatahwidehebrew:1458,hatafqamats:1459,hatafqamats1b:1459,hatafqamats28:1459,hatafqamats34:1459,hatafqamatshebrew:1459,hatafqamatsnarrowhebrew:1459,hatafqamatsquarterhebrew:1459,hatafqamatswidehebrew:1459,hatafsegol:1457,hatafsegol17:1457,hatafsegol24:1457,hatafsegol30:1457,hatafsegolhebrew:1457,hatafsegolnarrowhebrew:1457,hatafsegolquarterhebrew:1457,hatafsegolwidehebrew:1457,hbar:295,hbopomofo:12559,hbrevebelow:7723,hcedilla:7721,hcircle:9431,hcircumflex:293,hdieresis:7719,hdotaccent:7715,hdotbelow:7717,he:1492,heart:9829,heartsuitblack:9829,heartsuitwhite:9825,hedagesh:64308,hedageshhebrew:64308,hehaltonearabic:1729,heharabic:1607,hehebrew:1492,hehfinalaltonearabic:64423, -hehfinalalttwoarabic:65258,hehfinalarabic:65258,hehhamzaabovefinalarabic:64421,hehhamzaaboveisolatedarabic:64420,hehinitialaltonearabic:64424,hehinitialarabic:65259,hehiragana:12408,hehmedialaltonearabic:64425,hehmedialarabic:65260,heiseierasquare:13179,hekatakana:12504,hekatakanahalfwidth:65421,hekutaarusquare:13110,henghook:615,herutusquare:13113,het:1495,hethebrew:1495,hhook:614,hhooksuperior:689,hieuhacirclekorean:12923,hieuhaparenkorean:12827,hieuhcirclekorean:12909,hieuhkorean:12622,hieuhparenkorean:12813,hihiragana:12402,hikatakana:12498,hikatakanahalfwidth:65419,hiriq:1460,hiriq14:1460,hiriq21:1460,hiriq2d:1460,hiriqhebrew:1460,hiriqnarrowhebrew:1460,hiriqquarterhebrew:1460,hiriqwidehebrew:1460,hlinebelow:7830,hmonospace:65352,hoarmenian:1392,hohipthai:3627,hohiragana:12411,hokatakana:12507,hokatakanahalfwidth:65422,holam:1465,holam19:1465,holam26:1465,holam32:1465,holamhebrew:1465,holamnarrowhebrew:1465,holamquarterhebrew:1465,holamwidehebrew:1465,honokhukthai:3630,hookabovecomb:777,hookcmb:777,hookpalatalizedbelowcmb:801,hookretroflexbelowcmb:802,hoonsquare:13122,horicoptic:1001,horizontalbar:8213,horncmb:795,hotsprings:9832,house:8962,hparen:9379,hsuperior:688,hturned:613,huhiragana:12405,huiitosquare:13107,hukatakana:12501,hukatakanahalfwidth:65420,hungarumlaut:733,hungarumlautcmb:779,hv:405,hyphen:45,hypheninferior:63205,hyphenmonospace:65293,hyphensmall:65123,hyphensuperior:63206,hyphentwo:8208,i:105,iacute:237,iacyrillic:1103,ibengali:2439,ibopomofo:12583,ibreve:301,icaron:464,icircle:9432,icircumflex:238,icyrillic:1110,idblgrave:521,ideographearthcircle:12943,ideographfirecircle:12939,ideographicallianceparen:12863,ideographiccallparen:12858,ideographiccentrecircle:12965,ideographicclose:12294,ideographiccomma:12289,ideographiccommaleft:65380,ideographiccongratulationparen:12855,ideographiccorrectcircle:12963,ideographicearthparen:12847,ideographicenterpriseparen:12861,ideographicexcellentcircle:12957,ideographicfestivalparen:12864,ideographicfinancialcircle:12950,ideographicfinancialparen:12854,ideographicfireparen:12843,ideographichaveparen:12850,ideographichighcircle:12964,ideographiciterationmark:12293,ideographiclaborcircle:12952,ideographiclaborparen:12856,ideographicleftcircle:12967,ideographiclowcircle:12966,ideographicmedicinecircle:12969,ideographicmetalparen:12846,ideographicmoonparen:12842,ideographicnameparen:12852,ideographicperiod:12290,ideographicprintcircle:12958,ideographicreachparen:12867,ideographicrepresentparen:12857,ideographicresourceparen:12862,ideographicrightcircle:12968,ideographicsecretcircle:12953,ideographicselfparen:12866,ideographicsocietyparen:12851,ideographicspace:12288,ideographicspecialparen:12853,ideographicstockparen:12849,ideographicstudyparen:12859,ideographicsunparen:12848,ideographicsuperviseparen:12860,ideographicwaterparen:12844,ideographicwoodparen:12845,ideographiczero:12295,ideographmetalcircle:12942,ideographmooncircle:12938,ideographnamecircle:12948,ideographsuncircle:12944,ideographwatercircle:12940,ideographwoodcircle:12941,ideva:2311,idieresis:239,idieresisacute:7727,idieresiscyrillic:1253,idotbelow:7883,iebrevecyrillic:1239,iecyrillic:1077,ieungacirclekorean:12917,ieungaparenkorean:12821,ieungcirclekorean:12903,ieungkorean:12615,ieungparenkorean:12807,igrave:236,igujarati:2695,igurmukhi:2567,ihiragana:12356,ihookabove:7881,iibengali:2440,iicyrillic:1080,iideva:2312,iigujarati:2696,iigurmukhi:2568,iimatragurmukhi:2624,iinvertedbreve:523,iishortcyrillic:1081,iivowelsignbengali:2496,iivowelsigndeva:2368,iivowelsigngujarati:2752,ij:307,ikatakana:12452,ikatakanahalfwidth:65394,ikorean:12643,ilde:732,iluyhebrew:1452,imacron:299,imacroncyrillic:1251,imageorapproximatelyequal:8787,imatragurmukhi:2623,imonospace:65353,increment:8710,infinity:8734,iniarmenian:1387,integral:8747,integralbottom:8993,integralbt:8993,integralex:63733,integraltop:8992,integraltp:8992,intersection:8745,intisquare:13061,invbullet:9688,invcircle:9689,invsmileface:9787,iocyrillic:1105,iogonek:303,iota:953,iotadieresis:970,iotadieresistonos:912,iotalatin:617,iotatonos:943,iparen:9380,irigurmukhi:2674,ismallhiragana:12355,ismallkatakana:12451,ismallkatakanahalfwidth:65384,issharbengali:2554,istroke:616,isuperior:63213,iterationhiragana:12445,iterationkatakana:12541,itilde:297,itildebelow:7725,iubopomofo:12585,iucyrillic:1102,ivowelsignbengali:2495,ivowelsigndeva:2367,ivowelsigngujarati:2751,izhitsacyrillic:1141,izhitsadblgravecyrillic:1143,j:106,jaarmenian:1393,jabengali:2460,jadeva:2332,jagujarati:2716,jagurmukhi:2588,jbopomofo:12560,jcaron:496,jcircle:9433,jcircumflex:309,jcrossedtail:669,jdotlessstroke:607,jecyrillic:1112,jeemarabic:1580,jeemfinalarabic:65182,jeeminitialarabic:65183,jeemmedialarabic:65184,jeharabic:1688,jehfinalarabic:64395,jhabengali:2461,jhadeva:2333,jhagujarati:2717,jhagurmukhi:2589,jheharmenian:1403,jis:12292,jmonospace:65354,jparen:9381,jsuperior:690,k:107,kabashkircyrillic:1185,kabengali:2453,kacute:7729,kacyrillic:1082,kadescendercyrillic:1179,kadeva:2325,kaf:1499,kafarabic:1603,kafdagesh:64315,kafdageshhebrew:64315,kaffinalarabic:65242,kafhebrew:1499,kafinitialarabic:65243,kafmedialarabic:65244,kafrafehebrew:64333,kagujarati:2709,kagurmukhi:2581,kahiragana:12363,kahookcyrillic:1220,kakatakana:12459,kakatakanahalfwidth:65398,kappa:954,kappasymbolgreek:1008,kapyeounmieumkorean:12657,kapyeounphieuphkorean:12676,kapyeounpieupkorean:12664,kapyeounssangpieupkorean:12665,karoriisquare:13069,kashidaautoarabic:1600,kashidaautonosidebearingarabic:1600,kasmallkatakana:12533,kasquare:13188,kasraarabic:1616,kasratanarabic:1613,kastrokecyrillic:1183,katahiraprolongmarkhalfwidth:65392,kaverticalstrokecyrillic:1181,kbopomofo:12558,kcalsquare:13193,kcaron:489,kcedilla:311,kcircle:9434,kcommaaccent:311,kdotbelow:7731,keharmenian:1412,kehiragana:12369,kekatakana:12465,kekatakanahalfwidth:65401,kenarmenian:1391,kesmallkatakana:12534,kgreenlandic:312,khabengali:2454,khacyrillic:1093,khadeva:2326,khagujarati:2710,khagurmukhi:2582,khaharabic:1582,khahfinalarabic:65190,khahinitialarabic:65191,khahmedialarabic:65192,kheicoptic:999,khhadeva:2393,khhagurmukhi:2649,khieukhacirclekorean:12920,khieukhaparenkorean:12824,khieukhcirclekorean:12906,khieukhkorean:12619,khieukhparenkorean:12810,khokhaithai:3586,khokhonthai:3589,khokhuatthai:3587,khokhwaithai:3588,khomutthai:3675,khook:409,khorakhangthai:3590,khzsquare:13201,kihiragana:12365,kikatakana:12461,kikatakanahalfwidth:65399,kiroguramusquare:13077,kiromeetorusquare:13078,kirosquare:13076,kiyeokacirclekorean:12910,kiyeokaparenkorean:12814,kiyeokcirclekorean:12896,kiyeokkorean:12593,kiyeokparenkorean:12800,kiyeoksioskorean:12595,kjecyrillic:1116,klinebelow:7733,klsquare:13208,kmcubedsquare:13222,kmonospace:65355,kmsquaredsquare:13218,kohiragana:12371,kohmsquare:13248,kokaithai:3585,kokatakana:12467,kokatakanahalfwidth:65402,kooposquare:13086,koppacyrillic:1153,koreanstandardsymbol:12927,koroniscmb:835,kparen:9382,kpasquare:13226,ksicyrillic:1135,ktsquare:13263,kturned:670,kuhiragana:12367,kukatakana:12463,kukatakanahalfwidth:65400,kvsquare:13240,kwsquare:13246,l:108,labengali:2482,lacute:314,ladeva:2354,lagujarati:2738,lagurmukhi:2610,lakkhangyaothai:3653,lamaleffinalarabic:65276,lamalefhamzaabovefinalarabic:65272,lamalefhamzaaboveisolatedarabic:65271,lamalefhamzabelowfinalarabic:65274,lamalefhamzabelowisolatedarabic:65273,lamalefisolatedarabic:65275,lamalefmaddaabovefinalarabic:65270,lamalefmaddaaboveisolatedarabic:65269,lamarabic:1604,lambda:955,lambdastroke:411,lamed:1500,lameddagesh:64316,lameddageshhebrew:64316,lamedhebrew:1500,lamfinalarabic:65246,lamhahinitialarabic:64714,laminitialarabic:65247,lamjeeminitialarabic:64713,lamkhahinitialarabic:64715,lamlamhehisolatedarabic:65010,lammedialarabic:65248,lammeemhahinitialarabic:64904,lammeeminitialarabic:64716,largecircle:9711,lbar:410,lbelt:620,lbopomofo:12556,lcaron:318,lcedilla:316,lcircle:9435,lcircumflexbelow:7741,lcommaaccent:316,ldot:320,ldotaccent:320,ldotbelow:7735,ldotbelowmacron:7737,leftangleabovecmb:794,lefttackbelowcmb:792,less:60,lessequal:8804,lessequalorgreater:8922,lessmonospace:65308,lessorequivalent:8818,lessorgreater:8822,lessoverequal:8806,lesssmall:65124,lezh:622,lfblock:9612,lhookretroflex:621,lira:8356,liwnarmenian:1388,lj:457,ljecyrillic:1113,ll:63168,lladeva:2355,llagujarati:2739,llinebelow:7739,llladeva:2356,llvocalicbengali:2529,llvocalicdeva:2401,llvocalicvowelsignbengali:2531,llvocalicvowelsigndeva:2403,lmiddletilde:619,lmonospace:65356,lmsquare:13264,lochulathai:3628,logicaland:8743,logicalnot:172,logicalnotreversed:8976,logicalor:8744,lolingthai:3621,longs:383,lowlinecenterline:65102,lowlinecmb:818,lowlinedashed:65101,lozenge:9674,lparen:9383,lslash:322,lsquare:8467,lsuperior:63214,ltshade:9617,luthai:3622,lvocalicbengali:2444,lvocalicdeva:2316,lvocalicvowelsignbengali:2530,lvocalicvowelsigndeva:2402,lxsquare:13267,m:109,mabengali:2478,macron:175,macronbelowcmb:817,macroncmb:772,macronlowmod:717,macronmonospace:65507,macute:7743,madeva:2350,magujarati:2734,magurmukhi:2606,mahapakhhebrew:1444,mahapakhlefthebrew:1444,mahiragana:12414,maichattawalowleftthai:63637,maichattawalowrightthai:63636,maichattawathai:3659,maichattawaupperleftthai:63635,maieklowleftthai:63628,maieklowrightthai:63627,maiekthai:3656,maiekupperleftthai:63626,maihanakatleftthai:63620,maihanakatthai:3633,maitaikhuleftthai:63625,maitaikhuthai:3655,maitholowleftthai:63631,maitholowrightthai:63630,maithothai:3657,maithoupperleftthai:63629,maitrilowleftthai:63634,maitrilowrightthai:63633,maitrithai:3658,maitriupperleftthai:63632,maiyamokthai:3654,makatakana:12510,makatakanahalfwidth:65423,male:9794,mansyonsquare:13127,maqafhebrew:1470,mars:9794,masoracirclehebrew:1455,masquare:13187,mbopomofo:12551,mbsquare:13268,mcircle:9436,mcubedsquare:13221,mdotaccent:7745,mdotbelow:7747,meemarabic:1605,meemfinalarabic:65250,meeminitialarabic:65251,meemmedialarabic:65252,meemmeeminitialarabic:64721,meemmeemisolatedarabic:64584,meetorusquare:13133,mehiragana:12417,meizierasquare:13182,mekatakana:12513,mekatakanahalfwidth:65426,mem:1502,memdagesh:64318,memdageshhebrew:64318,memhebrew:1502,menarmenian:1396,merkhahebrew:1445,merkhakefulahebrew:1446,merkhakefulalefthebrew:1446,merkhalefthebrew:1445,mhook:625,mhzsquare:13202,middledotkatakanahalfwidth:65381,middot:183,mieumacirclekorean:12914,mieumaparenkorean:12818,mieumcirclekorean:12900,mieumkorean:12609,mieumpansioskorean:12656,mieumparenkorean:12804,mieumpieupkorean:12654,mieumsioskorean:12655,mihiragana:12415,mikatakana:12511,mikatakanahalfwidth:65424,minus:8722,minusbelowcmb:800,minuscircle:8854,minusmod:727,minusplus:8723,minute:8242,miribaarusquare:13130,mirisquare:13129,mlonglegturned:624,mlsquare:13206,mmcubedsquare:13219,mmonospace:65357,mmsquaredsquare:13215,mohiragana:12418,mohmsquare:13249,mokatakana:12514,mokatakanahalfwidth:65427,molsquare:13270,momathai:3617,moverssquare:13223,moverssquaredsquare:13224,mparen:9384,mpasquare:13227,mssquare:13235,msuperior:63215,mturned:623,mu:181,mu1:181,muasquare:13186,muchgreater:8811,muchless:8810,mufsquare:13196,mugreek:956,mugsquare:13197,muhiragana:12416,mukatakana:12512,mukatakanahalfwidth:65425,mulsquare:13205,multiply:215,mumsquare:13211,munahhebrew:1443,munahlefthebrew:1443,musicalnote:9834,musicalnotedbl:9835,musicflatsign:9837,musicsharpsign:9839,mussquare:13234,muvsquare:13238,muwsquare:13244,mvmegasquare:13241,mvsquare:13239,mwmegasquare:13247,mwsquare:13245,n:110,nabengali:2472,nabla:8711,nacute:324,nadeva:2344,nagujarati:2728,nagurmukhi:2600,nahiragana:12394,nakatakana:12490,nakatakanahalfwidth:65413,napostrophe:329,nasquare:13185,nbopomofo:12555,nbspace:160,ncaron:328,ncedilla:326,ncircle:9437,ncircumflexbelow:7755,ncommaaccent:326,ndotaccent:7749,ndotbelow:7751,nehiragana:12397,nekatakana:12493,nekatakanahalfwidth:65416,newsheqelsign:8362,nfsquare:13195,ngabengali:2457,ngadeva:2329,ngagujarati:2713,ngagurmukhi:2585,ngonguthai:3591,nhiragana:12435,nhookleft:626,nhookretroflex:627,nieunacirclekorean:12911,nieunaparenkorean:12815,nieuncieuckorean:12597,nieuncirclekorean:12897,nieunhieuhkorean:12598,nieunkorean:12596,nieunpansioskorean:12648,nieunparenkorean:12801,nieunsioskorean:12647,nieuntikeutkorean:12646,nihiragana:12395,nikatakana:12491,nikatakanahalfwidth:65414,nikhahitleftthai:63641,nikhahitthai:3661,nine:57,ninearabic:1641,ninebengali:2543,ninecircle:9320,ninecircleinversesansserif:10130,ninedeva:2415,ninegujarati:2799,ninegurmukhi:2671,ninehackarabic:1641,ninehangzhou:12329,nineideographicparen:12840,nineinferior:8329,ninemonospace:65305,nineoldstyle:63289,nineparen:9340,nineperiod:9360,ninepersian:1785,nineroman:8568,ninesuperior:8313,nineteencircle:9330,nineteenparen:9350,nineteenperiod:9370,ninethai:3673,nj:460,njecyrillic:1114,nkatakana:12531,nkatakanahalfwidth:65437,nlegrightlong:414,nlinebelow:7753,nmonospace:65358,nmsquare:13210,nnabengali:2467,nnadeva:2339,nnagujarati:2723,nnagurmukhi:2595,nnnadeva:2345,nohiragana:12398,nokatakana:12494,nokatakanahalfwidth:65417,nonbreakingspace:160,nonenthai:3603,nonuthai:3609,noonarabic:1606,noonfinalarabic:65254,noonghunnaarabic:1722,noonghunnafinalarabic:64415,nooninitialarabic:65255,noonjeeminitialarabic:64722,noonjeemisolatedarabic:64587,noonmedialarabic:65256,noonmeeminitialarabic:64725,noonmeemisolatedarabic:64590,noonnoonfinalarabic:64653,notcontains:8716,notelement:8713,notelementof:8713,notequal:8800,notgreater:8815,notgreaternorequal:8817,notgreaternorless:8825,notidentical:8802,notless:8814,notlessnorequal:8816,notparallel:8742,notprecedes:8832,notsubset:8836,notsucceeds:8833,notsuperset:8837,nowarmenian:1398,nparen:9385,nssquare:13233,nsuperior:8319,ntilde:241,nu:957,nuhiragana:12396,nukatakana:12492,nukatakanahalfwidth:65415,nuktabengali:2492,nuktadeva:2364,nuktagujarati:2748,nuktagurmukhi:2620,numbersign:35,numbersignmonospace:65283,numbersignsmall:65119,numeralsigngreek:884,numeralsignlowergreek:885,numero:8470,nun:1504,nundagesh:64320,nundageshhebrew:64320,nunhebrew:1504,nvsquare:13237,nwsquare:13243,nyabengali:2462,nyadeva:2334,nyagujarati:2718,nyagurmukhi:2590,o:111,oacute:243,oangthai:3629,obarred:629,obarredcyrillic:1257,obarreddieresiscyrillic:1259,obengali:2451,obopomofo:12571,obreve:335,ocandradeva:2321,ocandragujarati:2705,ocandravowelsigndeva:2377,ocandravowelsigngujarati:2761,ocaron:466,ocircle:9438,ocircumflex:244,ocircumflexacute:7889,ocircumflexdotbelow:7897,ocircumflexgrave:7891,ocircumflexhookabove:7893,ocircumflextilde:7895,ocyrillic:1086,odblacute:337,odblgrave:525,odeva:2323,odieresis:246,odieresiscyrillic:1255,odotbelow:7885,oe:339,oekorean:12634,ogonek:731,ogonekcmb:808,ograve:242,ogujarati:2707,oharmenian:1413,ohiragana:12362,ohookabove:7887,ohorn:417,ohornacute:7899,ohorndotbelow:7907,ohorngrave:7901,ohornhookabove:7903,ohorntilde:7905,ohungarumlaut:337,oi:419,oinvertedbreve:527,okatakana:12458,okatakanahalfwidth:65397,okorean:12631,olehebrew:1451,omacron:333,omacronacute:7763,omacrongrave:7761,omdeva:2384,omega:969,omega1:982,omegacyrillic:1121,omegalatinclosed:631,omegaroundcyrillic:1147,omegatitlocyrillic:1149,omegatonos:974,omgujarati:2768,omicron:959,omicrontonos:972,omonospace:65359,one:49,onearabic:1633,onebengali:2535,onecircle:9312,onecircleinversesansserif:10122,onedeva:2407,onedotenleader:8228,oneeighth:8539,onefitted:63196,onegujarati:2791,onegurmukhi:2663,onehackarabic:1633,onehalf:189,onehangzhou:12321,oneideographicparen:12832,oneinferior:8321,onemonospace:65297,onenumeratorbengali:2548,oneoldstyle:63281,oneparen:9332,oneperiod:9352,onepersian:1777,onequarter:188,oneroman:8560,onesuperior:185,onethai:3665,onethird:8531,oogonek:491,oogonekmacron:493,oogurmukhi:2579,oomatragurmukhi:2635,oopen:596,oparen:9386,openbullet:9702,option:8997,ordfeminine:170,ordmasculine:186,orthogonal:8735,oshortdeva:2322,oshortvowelsigndeva:2378,oslash:248,oslashacute:511,osmallhiragana:12361,osmallkatakana:12457,osmallkatakanahalfwidth:65387,ostrokeacute:511,osuperior:63216,otcyrillic:1151,otilde:245,otildeacute:7757,otildedieresis:7759,oubopomofo:12577,overline:8254,overlinecenterline:65098,overlinecmb:773,overlinedashed:65097,overlinedblwavy:65100,overlinewavy:65099,overscore:175,ovowelsignbengali:2507,ovowelsigndeva:2379,ovowelsigngujarati:2763,p:112,paampssquare:13184,paasentosquare:13099,pabengali:2474,pacute:7765,padeva:2346,pagedown:8671,pageup:8670,pagujarati:2730,pagurmukhi:2602,pahiragana:12401,paiyannoithai:3631,pakatakana:12497,palatalizationcyrilliccmb:1156,palochkacyrillic:1216,pansioskorean:12671,paragraph:182,parallel:8741,parenleft:40,parenleftaltonearabic:64830,parenleftbt:63725,parenleftex:63724,parenleftinferior:8333,parenleftmonospace:65288,parenleftsmall:65113,parenleftsuperior:8317,parenlefttp:63723,parenleftvertical:65077,parenright:41,parenrightaltonearabic:64831,parenrightbt:63736,parenrightex:63735,parenrightinferior:8334,parenrightmonospace:65289,parenrightsmall:65114,parenrightsuperior:8318,parenrighttp:63734,parenrightvertical:65078,partialdiff:8706,paseqhebrew:1472,pashtahebrew:1433,pasquare:13225,patah:1463,patah11:1463,patah1d:1463,patah2a:1463,patahhebrew:1463,patahnarrowhebrew:1463,patahquarterhebrew:1463,patahwidehebrew:1463,pazerhebrew:1441,pbopomofo:12550,pcircle:9439,pdotaccent:7767,pe:1508,pecyrillic:1087,pedagesh:64324,pedageshhebrew:64324,peezisquare:13115,pefinaldageshhebrew:64323,peharabic:1662,peharmenian:1402,pehebrew:1508,pehfinalarabic:64343,pehinitialarabic:64344,pehiragana:12410,pehmedialarabic:64345,pekatakana:12506,pemiddlehookcyrillic:1191,perafehebrew:64334,percent:37,percentarabic:1642,percentmonospace:65285,percentsmall:65130,period:46,periodarmenian:1417,periodcentered:183,periodhalfwidth:65377,periodinferior:63207,periodmonospace:65294,periodsmall:65106,periodsuperior:63208,perispomenigreekcmb:834,perpendicular:8869,perthousand:8240,peseta:8359,pfsquare:13194,phabengali:2475,phadeva:2347,phagujarati:2731,phagurmukhi:2603,phi:966,phi1:981,phieuphacirclekorean:12922,phieuphaparenkorean:12826,phieuphcirclekorean:12908,phieuphkorean:12621,phieuphparenkorean:12812,philatin:632,phinthuthai:3642,phisymbolgreek:981,phook:421,phophanthai:3614,phophungthai:3612,phosamphaothai:3616,pi:960,pieupacirclekorean:12915,pieupaparenkorean:12819,pieupcieuckorean:12662,pieupcirclekorean:12901,pieupkiyeokkorean:12658,pieupkorean:12610,pieupparenkorean:12805,pieupsioskiyeokkorean:12660,pieupsioskorean:12612,pieupsiostikeutkorean:12661,pieupthieuthkorean:12663,pieuptikeutkorean:12659,pihiragana:12404,pikatakana:12500,pisymbolgreek:982,piwrarmenian:1411,plus:43,plusbelowcmb:799,pluscircle:8853,plusminus:177,plusmod:726,plusmonospace:65291,plussmall:65122,plussuperior:8314,pmonospace:65360,pmsquare:13272,pohiragana:12413,pointingindexdownwhite:9759,pointingindexleftwhite:9756,pointingindexrightwhite:9758,pointingindexupwhite:9757,pokatakana:12509,poplathai:3611,postalmark:12306,postalmarkface:12320,pparen:9387,precedes:8826,prescription:8478,primemod:697,primereversed:8245,product:8719,projective:8965,prolongedkana:12540,propellor:8984,propersubset:8834,propersuperset:8835,proportion:8759,proportional:8733,psi:968,psicyrillic:1137,psilipneumatacyrilliccmb:1158,pssquare:13232,puhiragana:12407,pukatakana:12503,pvsquare:13236,pwsquare:13242,q:113,qadeva:2392,qadmahebrew:1448,qafarabic:1602,qaffinalarabic:65238,qafinitialarabic:65239,qafmedialarabic:65240,qamats:1464,qamats10:1464,qamats1a:1464,qamats1c:1464,qamats27:1464,qamats29:1464,qamats33:1464,qamatsde:1464,qamatshebrew:1464,qamatsnarrowhebrew:1464,qamatsqatanhebrew:1464,qamatsqatannarrowhebrew:1464,qamatsqatanquarterhebrew:1464,qamatsqatanwidehebrew:1464,qamatsquarterhebrew:1464,qamatswidehebrew:1464,qarneyparahebrew:1439,qbopomofo:12561,qcircle:9440,qhook:672,qmonospace:65361,qof:1511,qofdagesh:64327,qofdageshhebrew:64327,qofhebrew:1511,qparen:9388,quarternote:9833,qubuts:1467,qubuts18:1467,qubuts25:1467,qubuts31:1467,qubutshebrew:1467,qubutsnarrowhebrew:1467,qubutsquarterhebrew:1467,qubutswidehebrew:1467,question:63,questionarabic:1567,questionarmenian:1374,questiondown:191,questiondownsmall:63423,questiongreek:894,questionmonospace:65311,questionsmall:63295,quotedbl:34,quotedblbase:8222,quotedblleft:8220,quotedblmonospace:65282,quotedblprime:12318,quotedblprimereversed:12317,quotedblright:8221,quoteleft:8216,quoteleftreversed:8219,quotereversed:8219,quoteright:8217,quoterightn:329,quotesinglbase:8218,quotesingle:39,quotesinglemonospace:65287,r:114,raarmenian:1404,rabengali:2480,racute:341,radeva:2352,radical:8730,radicalex:63717,radoverssquare:13230,radoverssquaredsquare:13231,radsquare:13229,rafe:1471,rafehebrew:1471,ragujarati:2736,ragurmukhi:2608,rahiragana:12425,rakatakana:12521,rakatakanahalfwidth:65431,ralowerdiagonalbengali:2545,ramiddlediagonalbengali:2544,ramshorn:612,ratio:8758,rbopomofo:12566,rcaron:345,rcedilla:343,rcircle:9441,rcommaaccent:343,rdblgrave:529,rdotaccent:7769,rdotbelow:7771,rdotbelowmacron:7773,referencemark:8251,reflexsubset:8838,reflexsuperset:8839,registered:174,registersans:63720,registerserif:63194,reharabic:1585,reharmenian:1408,rehfinalarabic:65198,rehiragana:12428,rekatakana:12524,rekatakanahalfwidth:65434,resh:1512,reshdageshhebrew:64328,reshhebrew:1512,reversedtilde:8765,reviahebrew:1431,reviamugrashhebrew:1431,revlogicalnot:8976,rfishhook:638,rfishhookreversed:639,rhabengali:2525,rhadeva:2397,rho:961,rhook:637,rhookturned:635,rhookturnedsuperior:693,rhosymbolgreek:1009,rhotichookmod:734,rieulacirclekorean:12913,rieulaparenkorean:12817,rieulcirclekorean:12899,rieulhieuhkorean:12608,rieulkiyeokkorean:12602,rieulkiyeoksioskorean:12649,rieulkorean:12601,rieulmieumkorean:12603,rieulpansioskorean:12652,rieulparenkorean:12803,rieulphieuphkorean:12607,rieulpieupkorean:12604,rieulpieupsioskorean:12651,rieulsioskorean:12605,rieulthieuthkorean:12606,rieultikeutkorean:12650,rieulyeorinhieuhkorean:12653,rightangle:8735,righttackbelowcmb:793,righttriangle:8895,rihiragana:12426,rikatakana:12522,rikatakanahalfwidth:65432,ring:730,ringbelowcmb:805,ringcmb:778,ringhalfleft:703,ringhalfleftarmenian:1369,ringhalfleftbelowcmb:796,ringhalfleftcentered:723,ringhalfright:702,ringhalfrightbelowcmb:825,ringhalfrightcentered:722,rinvertedbreve:531,rittorusquare:13137,rlinebelow:7775,rlongleg:636,rlonglegturned:634,rmonospace:65362,rohiragana:12429,rokatakana:12525,rokatakanahalfwidth:65435,roruathai:3619,rparen:9389,rrabengali:2524,rradeva:2353,rragurmukhi:2652,rreharabic:1681,rrehfinalarabic:64397,rrvocalicbengali:2528,rrvocalicdeva:2400,rrvocalicgujarati:2784,rrvocalicvowelsignbengali:2500,rrvocalicvowelsigndeva:2372,rrvocalicvowelsigngujarati:2756,rsuperior:63217,rtblock:9616,rturned:633,rturnedsuperior:692,ruhiragana:12427,rukatakana:12523,rukatakanahalfwidth:65433,rupeemarkbengali:2546,rupeesignbengali:2547,rupiah:63197,ruthai:3620,rvocalicbengali:2443,rvocalicdeva:2315,rvocalicgujarati:2699,rvocalicvowelsignbengali:2499,rvocalicvowelsigndeva:2371,rvocalicvowelsigngujarati:2755,s:115,sabengali:2488,sacute:347,sacutedotaccent:7781,sadarabic:1589,sadeva:2360,sadfinalarabic:65210,sadinitialarabic:65211,sadmedialarabic:65212,sagujarati:2744,sagurmukhi:2616,sahiragana:12373,sakatakana:12469,sakatakanahalfwidth:65403,sallallahoualayhewasallamarabic:65018,samekh:1505,samekhdagesh:64321,samekhdageshhebrew:64321,samekhhebrew:1505,saraaathai:3634,saraaethai:3649,saraaimaimalaithai:3652,saraaimaimuanthai:3651,saraamthai:3635,saraathai:3632,saraethai:3648,saraiileftthai:63622,saraiithai:3637,saraileftthai:63621,saraithai:3636,saraothai:3650,saraueeleftthai:63624,saraueethai:3639,saraueleftthai:63623,sarauethai:3638,sarauthai:3640,sarauuthai:3641,sbopomofo:12569,scaron:353,scarondotaccent:7783,scedilla:351,schwa:601,schwacyrillic:1241,schwadieresiscyrillic:1243,schwahook:602,scircle:9442,scircumflex:349,scommaaccent:537,sdotaccent:7777,sdotbelow:7779,sdotbelowdotaccent:7785,seagullbelowcmb:828,second:8243,secondtonechinese:714,section:167,seenarabic:1587,seenfinalarabic:65202,seeninitialarabic:65203,seenmedialarabic:65204,segol:1462,segol13:1462,segol1f:1462,segol2c:1462,segolhebrew:1462,segolnarrowhebrew:1462,segolquarterhebrew:1462,segoltahebrew:1426,segolwidehebrew:1462,seharmenian:1405,sehiragana:12379,sekatakana:12475,sekatakanahalfwidth:65406,semicolon:59,semicolonarabic:1563,semicolonmonospace:65307,semicolonsmall:65108,semivoicedmarkkana:12444,semivoicedmarkkanahalfwidth:65439,sentisquare:13090,sentosquare:13091,seven:55,sevenarabic:1639,sevenbengali:2541,sevencircle:9318,sevencircleinversesansserif:10128,sevendeva:2413,seveneighths:8542,sevengujarati:2797,sevengurmukhi:2669,sevenhackarabic:1639,sevenhangzhou:12327,sevenideographicparen:12838,seveninferior:8327,sevenmonospace:65303,sevenoldstyle:63287,sevenparen:9338,sevenperiod:9358,sevenpersian:1783,sevenroman:8566,sevensuperior:8311,seventeencircle:9328,seventeenparen:9348,seventeenperiod:9368,seventhai:3671,sfthyphen:173,shaarmenian:1399,shabengali:2486,shacyrillic:1096,shaddaarabic:1617,shaddadammaarabic:64609,shaddadammatanarabic:64606,shaddafathaarabic:64608,shaddakasraarabic:64610,shaddakasratanarabic:64607,shade:9618,shadedark:9619,shadelight:9617,shademedium:9618,shadeva:2358,shagujarati:2742,shagurmukhi:2614,shalshelethebrew:1427,shbopomofo:12565,shchacyrillic:1097,sheenarabic:1588,sheenfinalarabic:65206,sheeninitialarabic:65207,sheenmedialarabic:65208,sheicoptic:995,sheqel:8362,sheqelhebrew:8362,sheva:1456,sheva115:1456,sheva15:1456,sheva22:1456,sheva2e:1456,shevahebrew:1456,shevanarrowhebrew:1456,shevaquarterhebrew:1456,shevawidehebrew:1456,shhacyrillic:1211,shimacoptic:1005,shin:1513,shindagesh:64329,shindageshhebrew:64329,shindageshshindot:64300,shindageshshindothebrew:64300,shindageshsindot:64301,shindageshsindothebrew:64301,shindothebrew:1473,shinhebrew:1513,shinshindot:64298,shinshindothebrew:64298,shinsindot:64299,shinsindothebrew:64299,shook:642,sigma:963,sigma1:962,sigmafinal:962,sigmalunatesymbolgreek:1010,sihiragana:12375,sikatakana:12471,sikatakanahalfwidth:65404,siluqhebrew:1469,siluqlefthebrew:1469,similar:8764,sindothebrew:1474,siosacirclekorean:12916,siosaparenkorean:12820,sioscieuckorean:12670,sioscirclekorean:12902,sioskiyeokkorean:12666,sioskorean:12613,siosnieunkorean:12667,siosparenkorean:12806,siospieupkorean:12669,siostikeutkorean:12668,six:54,sixarabic:1638,sixbengali:2540,sixcircle:9317,sixcircleinversesansserif:10127,sixdeva:2412,sixgujarati:2796,sixgurmukhi:2668,sixhackarabic:1638,sixhangzhou:12326,sixideographicparen:12837,sixinferior:8326,sixmonospace:65302,sixoldstyle:63286,sixparen:9337,sixperiod:9357,sixpersian:1782,sixroman:8565,sixsuperior:8310,sixteencircle:9327,sixteencurrencydenominatorbengali:2553,sixteenparen:9347,sixteenperiod:9367,sixthai:3670,slash:47,slashmonospace:65295,slong:383,slongdotaccent:7835,smileface:9786,smonospace:65363,sofpasuqhebrew:1475,softhyphen:173,softsigncyrillic:1100,sohiragana:12381,sokatakana:12477,sokatakanahalfwidth:65407,soliduslongoverlaycmb:824,solidusshortoverlaycmb:823,sorusithai:3625,sosalathai:3624,sosothai:3595,sosuathai:3626,space:32,spacehackarabic:32,spade:9824,spadesuitblack:9824,spadesuitwhite:9828,sparen:9390,squarebelowcmb:827,squarecc:13252,squarecm:13213,squarediagonalcrosshatchfill:9641,squarehorizontalfill:9636,squarekg:13199,squarekm:13214,squarekmcapital:13262,squareln:13265,squarelog:13266,squaremg:13198,squaremil:13269,squaremm:13212,squaremsquared:13217,squareorthogonalcrosshatchfill:9638,squareupperlefttolowerrightfill:9639,squareupperrighttolowerleftfill:9640,squareverticalfill:9637,squarewhitewithsmallblack:9635,srsquare:13275,ssabengali:2487,ssadeva:2359,ssagujarati:2743,ssangcieuckorean:12617,ssanghieuhkorean:12677,ssangieungkorean:12672,ssangkiyeokkorean:12594,ssangnieunkorean:12645,ssangpieupkorean:12611,ssangsioskorean:12614,ssangtikeutkorean:12600,ssuperior:63218,sterling:163,sterlingmonospace:65505,strokelongoverlaycmb:822,strokeshortoverlaycmb:821,subset:8834,subsetnotequal:8842,subsetorequal:8838,succeeds:8827,suchthat:8715,suhiragana:12377,sukatakana:12473,sukatakanahalfwidth:65405,sukunarabic:1618,summation:8721,sun:9788,superset:8835,supersetnotequal:8843,supersetorequal:8839,svsquare:13276,syouwaerasquare:13180,t:116,tabengali:2468,tackdown:8868,tackleft:8867,tadeva:2340,tagujarati:2724,tagurmukhi:2596,taharabic:1591,tahfinalarabic:65218,tahinitialarabic:65219,tahiragana:12383,tahmedialarabic:65220,taisyouerasquare:13181,takatakana:12479,takatakanahalfwidth:65408,tatweelarabic:1600,tau:964,tav:1514,tavdages:64330,tavdagesh:64330,tavdageshhebrew:64330,tavhebrew:1514,tbar:359,tbopomofo:12554,tcaron:357,tccurl:680,tcedilla:355,tcheharabic:1670,tchehfinalarabic:64379,tchehinitialarabic:64380,tchehmedialarabic:64381,tcircle:9443,tcircumflexbelow:7793,tcommaaccent:355,tdieresis:7831,tdotaccent:7787,tdotbelow:7789,tecyrillic:1090,tedescendercyrillic:1197,teharabic:1578,tehfinalarabic:65174,tehhahinitialarabic:64674,tehhahisolatedarabic:64524,tehinitialarabic:65175,tehiragana:12390,tehjeeminitialarabic:64673,tehjeemisolatedarabic:64523,tehmarbutaarabic:1577,tehmarbutafinalarabic:65172,tehmedialarabic:65176,tehmeeminitialarabic:64676,tehmeemisolatedarabic:64526,tehnoonfinalarabic:64627,tekatakana:12486,tekatakanahalfwidth:65411,telephone:8481,telephoneblack:9742,telishagedolahebrew:1440,telishaqetanahebrew:1449,tencircle:9321,tenideographicparen:12841,tenparen:9341,tenperiod:9361,tenroman:8569,tesh:679,tet:1496,tetdagesh:64312,tetdageshhebrew:64312,tethebrew:1496,tetsecyrillic:1205,tevirhebrew:1435,tevirlefthebrew:1435,thabengali:2469,thadeva:2341,thagujarati:2725,thagurmukhi:2597,thalarabic:1584,thalfinalarabic:65196,thanthakhatlowleftthai:63640,thanthakhatlowrightthai:63639,thanthakhatthai:3660,thanthakhatupperleftthai:63638,theharabic:1579,thehfinalarabic:65178,thehinitialarabic:65179,thehmedialarabic:65180,thereexists:8707,therefore:8756,theta:952,theta1:977,thetasymbolgreek:977,thieuthacirclekorean:12921,thieuthaparenkorean:12825,thieuthcirclekorean:12907,thieuthkorean:12620,thieuthparenkorean:12811,thirteencircle:9324,thirteenparen:9344,thirteenperiod:9364,thonangmonthothai:3601,thook:429,thophuthaothai:3602,thorn:254,thothahanthai:3607,thothanthai:3600,thothongthai:3608,thothungthai:3606,thousandcyrillic:1154,thousandsseparatorarabic:1644,thousandsseparatorpersian:1644,three:51,threearabic:1635,threebengali:2537,threecircle:9314,threecircleinversesansserif:10124,threedeva:2409,threeeighths:8540,threegujarati:2793,threegurmukhi:2665,threehackarabic:1635,threehangzhou:12323,threeideographicparen:12834,threeinferior:8323,threemonospace:65299,threenumeratorbengali:2550,threeoldstyle:63283,threeparen:9334,threeperiod:9354,threepersian:1779,threequarters:190,threequartersemdash:63198,threeroman:8562,threesuperior:179,threethai:3667,thzsquare:13204,tihiragana:12385,tikatakana:12481,tikatakanahalfwidth:65409,tikeutacirclekorean:12912,tikeutaparenkorean:12816,tikeutcirclekorean:12898,tikeutkorean:12599,tikeutparenkorean:12802,tilde:732,tildebelowcmb:816,tildecmb:771,tildecomb:771,tildedoublecmb:864,tildeoperator:8764,tildeoverlaycmb:820,tildeverticalcmb:830,timescircle:8855,tipehahebrew:1430,tipehalefthebrew:1430,tippigurmukhi:2672,titlocyrilliccmb:1155,tiwnarmenian:1407,tlinebelow:7791,tmonospace:65364,toarmenian:1385,tohiragana:12392,tokatakana:12488,tokatakanahalfwidth:65412,tonebarextrahighmod:741,tonebarextralowmod:745,tonebarhighmod:742,tonebarlowmod:744,tonebarmidmod:743,tonefive:445,tonesix:389,tonetwo:424,tonos:900,tonsquare:13095,topatakthai:3599,tortoiseshellbracketleft:12308,tortoiseshellbracketleftsmall:65117,tortoiseshellbracketleftvertical:65081,tortoiseshellbracketright:12309,tortoiseshellbracketrightsmall:65118,tortoiseshellbracketrightvertical:65082,totaothai:3605,tpalatalhook:427,tparen:9391,trademark:8482,trademarksans:63722,trademarkserif:63195,tretroflexhook:648,triagdn:9660,triaglf:9668,triagrt:9658,triagup:9650,ts:678,tsadi:1510,tsadidagesh:64326,tsadidageshhebrew:64326,tsadihebrew:1510,tsecyrillic:1094,tsere:1461,tsere12:1461,tsere1e:1461,tsere2b:1461,tserehebrew:1461,tserenarrowhebrew:1461,tserequarterhebrew:1461,tserewidehebrew:1461,tshecyrillic:1115,tsuperior:63219,ttabengali:2463,ttadeva:2335, -ttagujarati:2719,ttagurmukhi:2591,tteharabic:1657,ttehfinalarabic:64359,ttehinitialarabic:64360,ttehmedialarabic:64361,tthabengali:2464,tthadeva:2336,tthagujarati:2720,tthagurmukhi:2592,tturned:647,tuhiragana:12388,tukatakana:12484,tukatakanahalfwidth:65410,tusmallhiragana:12387,tusmallkatakana:12483,tusmallkatakanahalfwidth:65391,twelvecircle:9323,twelveparen:9343,twelveperiod:9363,twelveroman:8571,twentycircle:9331,twentyhangzhou:21316,twentyparen:9351,twentyperiod:9371,two:50,twoarabic:1634,twobengali:2536,twocircle:9313,twocircleinversesansserif:10123,twodeva:2408,twodotenleader:8229,twodotleader:8229,twodotleadervertical:65072,twogujarati:2792,twogurmukhi:2664,twohackarabic:1634,twohangzhou:12322,twoideographicparen:12833,twoinferior:8322,twomonospace:65298,twonumeratorbengali:2549,twooldstyle:63282,twoparen:9333,twoperiod:9353,twopersian:1778,tworoman:8561,twostroke:443,twosuperior:178,twothai:3666,twothirds:8532,u:117,uacute:250,ubar:649,ubengali:2441,ubopomofo:12584,ubreve:365,ucaron:468,ucircle:9444,ucircumflex:251,ucircumflexbelow:7799,ucyrillic:1091,udattadeva:2385,udblacute:369,udblgrave:533,udeva:2313,udieresis:252,udieresisacute:472,udieresisbelow:7795,udieresiscaron:474,udieresiscyrillic:1265,udieresisgrave:476,udieresismacron:470,udotbelow:7909,ugrave:249,ugujarati:2697,ugurmukhi:2569,uhiragana:12358,uhookabove:7911,uhorn:432,uhornacute:7913,uhorndotbelow:7921,uhorngrave:7915,uhornhookabove:7917,uhorntilde:7919,uhungarumlaut:369,uhungarumlautcyrillic:1267,uinvertedbreve:535,ukatakana:12454,ukatakanahalfwidth:65395,ukcyrillic:1145,ukorean:12636,umacron:363,umacroncyrillic:1263,umacrondieresis:7803,umatragurmukhi:2625,umonospace:65365,underscore:95,underscoredbl:8215,underscoremonospace:65343,underscorevertical:65075,underscorewavy:65103,union:8746,universal:8704,uogonek:371,uparen:9392,upblock:9600,upperdothebrew:1476,upsilon:965,upsilondieresis:971,upsilondieresistonos:944,upsilonlatin:650,upsilontonos:973,uptackbelowcmb:797,uptackmod:724,uragurmukhi:2675,uring:367,ushortcyrillic:1118,usmallhiragana:12357,usmallkatakana:12453,usmallkatakanahalfwidth:65385,ustraightcyrillic:1199,ustraightstrokecyrillic:1201,utilde:361,utildeacute:7801,utildebelow:7797,uubengali:2442,uudeva:2314,uugujarati:2698,uugurmukhi:2570,uumatragurmukhi:2626,uuvowelsignbengali:2498,uuvowelsigndeva:2370,uuvowelsigngujarati:2754,uvowelsignbengali:2497,uvowelsigndeva:2369,uvowelsigngujarati:2753,v:118,vadeva:2357,vagujarati:2741,vagurmukhi:2613,vakatakana:12535,vav:1493,vavdagesh:64309,vavdagesh65:64309,vavdageshhebrew:64309,vavhebrew:1493,vavholam:64331,vavholamhebrew:64331,vavvavhebrew:1520,vavyodhebrew:1521,vcircle:9445,vdotbelow:7807,vecyrillic:1074,veharabic:1700,vehfinalarabic:64363,vehinitialarabic:64364,vehmedialarabic:64365,vekatakana:12537,venus:9792,verticalbar:124,verticallineabovecmb:781,verticallinebelowcmb:809,verticallinelowmod:716,verticallinemod:712,vewarmenian:1406,vhook:651,vikatakana:12536,viramabengali:2509,viramadeva:2381,viramagujarati:2765,visargabengali:2435,visargadeva:2307,visargagujarati:2691,vmonospace:65366,voarmenian:1400,voicediterationhiragana:12446,voicediterationkatakana:12542,voicedmarkkana:12443,voicedmarkkanahalfwidth:65438,vokatakana:12538,vparen:9393,vtilde:7805,vturned:652,vuhiragana:12436,vukatakana:12532,w:119,wacute:7811,waekorean:12633,wahiragana:12431,wakatakana:12527,wakatakanahalfwidth:65436,wakorean:12632,wasmallhiragana:12430,wasmallkatakana:12526,wattosquare:13143,wavedash:12316,wavyunderscorevertical:65076,wawarabic:1608,wawfinalarabic:65262,wawhamzaabovearabic:1572,wawhamzaabovefinalarabic:65158,wbsquare:13277,wcircle:9446,wcircumflex:373,wdieresis:7813,wdotaccent:7815,wdotbelow:7817,wehiragana:12433,weierstrass:8472,wekatakana:12529,wekorean:12638,weokorean:12637,wgrave:7809,whitebullet:9702,whitecircle:9675,whitecircleinverse:9689,whitecornerbracketleft:12302,whitecornerbracketleftvertical:65091,whitecornerbracketright:12303,whitecornerbracketrightvertical:65092,whitediamond:9671,whitediamondcontainingblacksmalldiamond:9672,whitedownpointingsmalltriangle:9663,whitedownpointingtriangle:9661,whiteleftpointingsmalltriangle:9667,whiteleftpointingtriangle:9665,whitelenticularbracketleft:12310,whitelenticularbracketright:12311,whiterightpointingsmalltriangle:9657,whiterightpointingtriangle:9655,whitesmallsquare:9643,whitesmilingface:9786,whitesquare:9633,whitestar:9734,whitetelephone:9743,whitetortoiseshellbracketleft:12312,whitetortoiseshellbracketright:12313,whiteuppointingsmalltriangle:9653,whiteuppointingtriangle:9651,wihiragana:12432,wikatakana:12528,wikorean:12639,wmonospace:65367,wohiragana:12434,wokatakana:12530,wokatakanahalfwidth:65382,won:8361,wonmonospace:65510,wowaenthai:3623,wparen:9394,wring:7832,wsuperior:695,wturned:653,wynn:447,x:120,xabovecmb:829,xbopomofo:12562,xcircle:9447,xdieresis:7821,xdotaccent:7819,xeharmenian:1389,xi:958,xmonospace:65368,xparen:9395,xsuperior:739,y:121,yaadosquare:13134,yabengali:2479,yacute:253,yadeva:2351,yaekorean:12626,yagujarati:2735,yagurmukhi:2607,yahiragana:12420,yakatakana:12516,yakatakanahalfwidth:65428,yakorean:12625,yamakkanthai:3662,yasmallhiragana:12419,yasmallkatakana:12515,yasmallkatakanahalfwidth:65388,yatcyrillic:1123,ycircle:9448,ycircumflex:375,ydieresis:255,ydotaccent:7823,ydotbelow:7925,yeharabic:1610,yehbarreearabic:1746,yehbarreefinalarabic:64431,yehfinalarabic:65266,yehhamzaabovearabic:1574,yehhamzaabovefinalarabic:65162,yehhamzaaboveinitialarabic:65163,yehhamzaabovemedialarabic:65164,yehinitialarabic:65267,yehmedialarabic:65268,yehmeeminitialarabic:64733,yehmeemisolatedarabic:64600,yehnoonfinalarabic:64660,yehthreedotsbelowarabic:1745,yekorean:12630,yen:165,yenmonospace:65509,yeokorean:12629,yeorinhieuhkorean:12678,yerahbenyomohebrew:1450,yerahbenyomolefthebrew:1450,yericyrillic:1099,yerudieresiscyrillic:1273,yesieungkorean:12673,yesieungpansioskorean:12675,yesieungsioskorean:12674,yetivhebrew:1434,ygrave:7923,yhook:436,yhookabove:7927,yiarmenian:1397,yicyrillic:1111,yikorean:12642,yinyang:9775,yiwnarmenian:1410,ymonospace:65369,yod:1497,yoddagesh:64313,yoddageshhebrew:64313,yodhebrew:1497,yodyodhebrew:1522,yodyodpatahhebrew:64287,yohiragana:12424,yoikorean:12681,yokatakana:12520,yokatakanahalfwidth:65430,yokorean:12635,yosmallhiragana:12423,yosmallkatakana:12519,yosmallkatakanahalfwidth:65390,yotgreek:1011,yoyaekorean:12680,yoyakorean:12679,yoyakthai:3618,yoyingthai:3597,yparen:9396,ypogegrammeni:890,ypogegrammenigreekcmb:837,yr:422,yring:7833,ysuperior:696,ytilde:7929,yturned:654,yuhiragana:12422,yuikorean:12684,yukatakana:12518,yukatakanahalfwidth:65429,yukorean:12640,yusbigcyrillic:1131,yusbigiotifiedcyrillic:1133,yuslittlecyrillic:1127,yuslittleiotifiedcyrillic:1129,yusmallhiragana:12421,yusmallkatakana:12517,yusmallkatakanahalfwidth:65389,yuyekorean:12683,yuyeokorean:12682,yyabengali:2527,yyadeva:2399,z:122,zaarmenian:1382,zacute:378,zadeva:2395,zagurmukhi:2651,zaharabic:1592,zahfinalarabic:65222,zahinitialarabic:65223,zahiragana:12374,zahmedialarabic:65224,zainarabic:1586,zainfinalarabic:65200,zakatakana:12470,zaqefgadolhebrew:1429,zaqefqatanhebrew:1428,zarqahebrew:1432,zayin:1494,zayindagesh:64310,zayindageshhebrew:64310,zayinhebrew:1494,zbopomofo:12567,zcaron:382,zcircle:9449,zcircumflex:7825,zcurl:657,zdot:380,zdotaccent:380,zdotbelow:7827,zecyrillic:1079,zedescendercyrillic:1177,zedieresiscyrillic:1247,zehiragana:12380,zekatakana:12476,zero:48,zeroarabic:1632,zerobengali:2534,zerodeva:2406,zerogujarati:2790,zerogurmukhi:2662,zerohackarabic:1632,zeroinferior:8320,zeromonospace:65296,zerooldstyle:63280,zeropersian:1776,zerosuperior:8304,zerothai:3664,zerowidthjoiner:65279,zerowidthnonjoiner:8204,zerowidthspace:8203,zeta:950,zhbopomofo:12563,zhearmenian:1386,zhebrevecyrillic:1218,zhecyrillic:1078,zhedescendercyrillic:1175,zhedieresiscyrillic:1245,zihiragana:12376,zikatakana:12472,zinorhebrew:1454,zlinebelow:7829,zmonospace:65370,zohiragana:12382,zokatakana:12478,zparen:9397,zretroflexhook:656,zstroke:438,zuhiragana:12378,zukatakana:12474,".notdef":0},Ac={space:32,a1:9985,a2:9986,a202:9987,a3:9988,a4:9742,a5:9990,a119:9991,a118:9992,a117:9993,a11:9755,a12:9758,a13:9996,a14:9997,a15:9998,a16:9999,a105:1e4,a17:10001,a18:10002,a19:10003,a20:10004,a21:10005,a22:10006,a23:10007,a24:10008,a25:10009,a26:10010,a27:10011,a28:10012,a6:10013,a7:10014,a8:10015,a9:10016,a10:10017,a29:10018,a30:10019,a31:10020,a32:10021,a33:10022,a34:10023,a35:9733,a36:10025,a37:10026,a38:10027,a39:10028,a40:10029,a41:10030,a42:10031,a43:10032,a44:10033,a45:10034,a46:10035,a47:10036,a48:10037,a49:10038,a50:10039,a51:10040,a52:10041,a53:10042,a54:10043,a55:10044,a56:10045,a57:10046,a58:10047,a59:10048,a60:10049,a61:10050,a62:10051,a63:10052,a64:10053,a65:10054,a66:10055,a67:10056,a68:10057,a69:10058,a70:10059,a71:9679,a72:10061,a73:9632,a74:10063,a203:10064,a75:10065,a204:10066,a76:9650,a77:9660,a78:9670,a79:10070,a81:9687,a82:10072,a83:10073,a84:10074,a97:10075,a98:10076,a99:10077,a100:10078,a101:10081,a102:10082,a103:10083,a104:10084,a106:10085,a107:10086,a108:10087,a112:9827,a111:9830,a110:9829,a109:9824,a120:9312,a121:9313,a122:9314,a123:9315,a124:9316,a125:9317,a126:9318,a127:9319,a128:9320,a129:9321,a130:10102,a131:10103,a132:10104,a133:10105,a134:10106,a135:10107,a136:10108,a137:10109,a138:10110,a139:10111,a140:10112,a141:10113,a142:10114,a143:10115,a144:10116,a145:10117,a146:10118,a147:10119,a148:10120,a149:10121,a150:10122,a151:10123,a152:10124,a153:10125,a154:10126,a155:10127,a156:10128,a157:10129,a158:10130,a159:10131,a160:10132,a161:8594,a163:8596,a164:8597,a196:10136,a165:10137,a192:10138,a166:10139,a167:10140,a168:10141,a169:10142,a170:10143,a171:10144,a172:10145,a173:10146,a162:10147,a174:10148,a175:10149,a176:10150,a177:10151,a178:10152,a179:10153,a193:10154,a180:10155,a199:10156,a181:10157,a200:10158,a182:10159,a201:10161,a183:10162,a184:10163,a197:10164,a185:10165,a194:10166,a198:10167,a186:10168,a195:10169,a187:10170,a188:10171,a189:10172,a190:10173,a191:10174,a89:10088,a90:10089,a93:10090,a94:10091,a91:10092,a92:10093,a205:10094,a85:10095,a206:10096,a86:10097,a87:10098,a88:10099,a95:10100,a96:10101,".notdef":0},Bc=function(){function d(a,b,c,d){if(d instanceof Sc&&d.isNativelyDecodable(b,c)){var e=d.dict,f=e.get("ColorSpace","CS");f=Xa.parse(f,b,c);var g=f.numComps,h=a.sendWithPromise("JpegDecode",[d.getIR(),g]);return h.then(function(a){var b=a.data;return new Mc(b,0,b.length,d.dict)})}return Promise.resolve(d)}function f(a,b,c,d){return a=b+a*c,0>a?0:a>d?d:a}function g(b,d,e,f,h,i,j){this.image=e;var k=e.dict;if(k.has("Filter")){var l=k.get("Filter").name;if("JPXDecode"===l){var m=new hd;m.parseImageProperties(e.stream),e.stream.reset(),e.bitsPerComponent=m.bitsPerComponent,e.numComps=m.componentsCount}else"JBIG2Decode"===l&&(e.bitsPerComponent=1,e.numComps=1)}this.width=k.get("Width","W"),this.height=k.get("Height","H"),(this.width<1||this.height<1)&&c("Invalid image width: "+this.width+" or height: "+this.height),this.interpolate=k.get("Interpolate","I")||!1,this.imageMask=k.get("ImageMask","IM")||!1,this.matte=k.get("Matte")||!1;var n=e.bitsPerComponent;if(n||(n=k.get("BitsPerComponent","BPC"),n||(this.imageMask?n=1:c("Bits per component missing in image: "+this.imageMask))),this.bpc=n,!this.imageMask){var o=k.get("ColorSpace","CS");if(!o)switch(a("JPX images (which do not require color spaces)"),e.numComps){case 1:o=ya.get("DeviceGray");break;case 3:o=ya.get("DeviceRGB");break;case 4:o=ya.get("DeviceCMYK");break;default:c("JPX images with "+this.numComps+" color components not supported.")}this.colorSpace=Xa.parse(o,b,d),this.numComps=this.colorSpace.numComps}if(this.decode=k.get("Decode","D"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode)||j&&!Xa.isDefaultDecode(this.decode,1))){this.needsDecode=!0;var p=(1<=b?new Uint8Array(o):16>=b?new Uint16Array(o):new Uint32Array(o),q=e/g,r=f/h,s=0,t=new Uint16Array(g),u=e*d;for(1!==j&&(j=0),l=0;g>l;l++)t[l]=Math.floor(l*q)*d;if(1===d)for(k=0;h>k;k++)for(m=Math.floor(k*r)*u,l=0;g>l;l++)n=m+t[l],p[s++]=a[n];else if(3===d)for(k=0;h>k;k++)for(m=Math.floor(k*r)*u,l=0;g>l;l++)n=m+t[l],p[s++]=a[n++],p[s++]=a[n++],p[s++]=a[n++],s+=j;return p},g.createMask=function(a,b,c,d,e){var f,g,h=(b+7>>3)*c,i=a.byteLength,j=h===i;if(!d||e&&!j)if(e)for(f=new Uint8Array(h),f.set(a),g=i;h>g;g++)f[g]=255;else f=new Uint8Array(i),f.set(a);else f=a;if(e)for(g=0;i>g;g++)f[g]=~f[g];return{data:f,width:b,height:c}},g.prototype={get drawWidth(){return Math.max(this.width,this.smask&&this.smask.width||0,this.mask&&this.mask.width||0)},get drawHeight(){return Math.max(this.height,this.smask&&this.smask.height||0,this.mask&&this.mask.height||0)},decodeBuffer:function(a){var b,c,d=this.bpc,e=this.numComps,g=this.decodeAddends,h=this.decodeCoefficients,i=(1<b;b++)for(var k=0;e>k;k++)a[j]=f(a[j],g[k],h[k],i),j++}else for(b=0,c=a.length;c>b;b++)a[b]=+!a[b]},getComponents:function(a){var b=this.bpc;if(8===b)return a;var c,d,e=this.width,f=this.height,g=this.numComps,h=e*f*g,i=0,j=8>=b?new Uint8Array(h):16>=b?new Uint16Array(h):new Uint32Array(h),k=e*g,l=(1<q;q++){for(o=m+(-8&k),p=m+k;o>m;)d=a[i++],j[m]=d>>7&1,j[m+1]=d>>6&1,j[m+2]=d>>5&1,j[m+3]=d>>4&1,j[m+4]=d>>3&1,j[m+5]=d>>2&1,j[m+6]=d>>1&1,j[m+7]=1&d,m+=8;if(p>m)for(d=a[i++],n=128;p>m;)j[m++]=+!!(d&n),n>>=1}else{var r=0;for(d=0,m=0,c=h;c>m;++m){for(m%k===0&&(d=0,r=0);b>r;)d=d<<8|a[i++],r+=8;var s=r-b,t=d>>s;j[m]=0>t?0:t>l?l:t,d&=(1<k;++k)h[k]=255-h[k];(i!==b||j!==d)&&(h=g.resize(h,o.bpc,1,i,j,b,d))}else if(C(o)){h=new Uint8Array(b*d);var p=this.numComps;for(k=0,l=b*d;l>k;++k){var q=0,r=k*p;for(m=0;p>m;++m){var s=f[r+m],t=2*m;if(so[t+1]){q=255;break}}h[k]=q}}else c("Unknown mask format.");if(h)for(k=0,m=3,l=b*e;l>k;++k,m+=4)a[m]=h[k];else for(k=0,m=3,l=b*e;l>k;++k,m+=4)a[m]=255},undoPreblend:function(a,b,c){var d=this.smask&&this.smask.matte;if(d)for(var e,f,g,h=this.colorSpace.getRgb(d,0),i=h[0],j=h[1],k=h[2],l=b*c*4,m=0;l>m;m+=4){var n=a[m+3];if(0!==n){var o=255/n;e=(a[m]-i)*o+i,f=(a[m+1]-j)*o+j,g=(a[m+2]-k)*o+k,a[m]=0>=e?0:e>=255?255:0|e,a[m+1]=0>=f?0:f>=255?255:0|f,a[m+2]=0>=g?0:g>=255?255:0|g}else a[m]=255,a[m+1]=255,a[m+2]=255}},createImageData:function(a){var b,c=this.drawWidth,d=this.drawHeight,f={width:c,height:d},g=this.numComps,h=this.width,i=this.height,j=this.bpc,k=h*g*j+7>>3;if(!a){var l;if("DeviceGray"===this.colorSpace.name&&1===j?l=V.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==j||this.needsDecode||(l=V.RGB_24BPP),l&&!this.smask&&!this.mask&&c===h&&d===i){if(f.kind=l,b=this.getImageBytes(i*k),this.image instanceof Oc)f.data=b;else{var m=new Uint8Array(b.length);m.set(b),f.data=m}if(this.needsDecode){e(l===V.GRAYSCALE_1BPP);for(var n=f.data,o=0,p=n.length;p>o;o++)n[o]^=255}return f}if(this.image instanceof Sc&&!this.smask&&!this.mask&&("DeviceGray"===this.colorSpace.name||"DeviceRGB"===this.colorSpace.name||"DeviceCMYK"===this.colorSpace.name))return f.kind=V.RGB_24BPP,f.data=this.getImageBytes(i*k,c,d,!0),f}b=this.getImageBytes(i*k);var q,r,s=0|b.length/k*d/i,t=this.getComponents(b);return a||this.smask||this.mask?(f.kind=V.RGBA_32BPP,f.data=new Uint8Array(c*d*4),q=1,r=!0,this.fillOpacity(f.data,c,d,s,t)):(f.kind=V.RGB_24BPP,f.data=new Uint8Array(c*d*3),q=0,r=!1),this.needsDecode&&this.decodeBuffer(t),this.colorSpace.fillRgb(f.data,h,i,c,d,s,j,t,q),r&&this.undoPreblend(f.data,c,s),f},fillGrayBuffer:function(a){var b=this.numComps;1!==b&&c("Reading gray scale from a color image: "+b);var d,e,f=this.width,g=this.height,h=this.bpc,i=f*b*h+7>>3,j=this.getImageBytes(g*i),k=this.getComponents(j);if(1!==h){this.needsDecode&&this.decodeBuffer(k),e=f*g;var l=255/((1<d;++d)a[d]=l*k[d]|0}else if(e=f*g,this.needsDecode)for(d=0;e>d;++d)a[d]=k[d]-1&255;else for(d=0;e>d;++d)a[d]=255&-k[d]},getImageBytes:function(a,b,c,d){return this.image.reset(),this.image.drawWidth=b||this.width,this.image.drawHeight=c||this.height,this.image.forceRGB=!!d,this.image.getBytes(a)}},g}(),Cc={Courier:600,"Courier-Bold":600,"Courier-BoldOblique":600,"Courier-Oblique":600,Helvetica:{space:278,exclam:278,quotedbl:355,numbersign:556,dollar:556,percent:889,ampersand:667,quoteright:222,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:278,semicolon:278,less:584,equal:584,greater:584,question:556,at:1015,A:667,B:667,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:500,K:667,L:556,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:278,backslash:278,bracketright:278,asciicircum:469,underscore:556,quoteleft:222,a:556,b:556,c:500,d:556,e:556,f:278,g:556,h:556,i:222,j:222,k:500,l:222,m:833,n:556,o:556,p:556,q:556,r:333,s:500,t:278,u:556,v:500,w:722,x:500,y:500,z:500,braceleft:334,bar:260,braceright:334,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:191,quotedblleft:333,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:500,fl:500,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:537,bullet:350,quotesinglbase:222,quotedblbase:333,quotedblright:333,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:556,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:222,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:556,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:667,aacute:556,Ucircumflex:722,yacute:500,scommaaccent:500,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:500,aring:556,Ncommaaccent:722,lacute:222,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:500,scedilla:500,iacute:278,lozenge:471,Rcaron:722,Gcommaaccent:778,ucircumflex:556,acircumflex:556,Amacron:667,rcaron:333,ccedilla:500,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:643,Umacron:722,uring:556,threesuperior:333,Ograve:778,Agrave:667,Abreve:667,multiply:584,uacute:556,Tcaron:611,partialdiff:476,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:500,nacute:556,umacron:556,Ncaron:722,Iacute:278,plusminus:584,brokenbar:260,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:333,omacron:556,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:222,tcaron:317,eogonek:556,Uogonek:722,Aacute:667,Adieresis:667,egrave:556,zacute:500,iogonek:222,Oacute:778,oacute:556,amacron:556,sacute:500,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:556,twosuperior:333,Odieresis:778,mu:556,igrave:278,ohungarumlaut:556,Eogonek:667,dcroat:556,threequarters:834,Scedilla:667,lcaron:299,Kcommaaccent:667,Lacute:556,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:556,onehalf:834,lessequal:549,ocircumflex:556,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:556,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:556,Ccaron:722,ugrave:556,radical:453,Dcaron:722,rcommaaccent:333,Ntilde:722,otilde:556,Rcommaaccent:722,Lcommaaccent:556,Atilde:667,Aogonek:667,Aring:667,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:500,minus:584,Icircumflex:278,ncaron:556,tcommaaccent:278,logicalnot:584,odieresis:556,udieresis:556,notequal:549,gcommaaccent:556,eth:556,zcaron:500,ncommaaccent:556,onesuperior:333,imacron:278,Euro:556},"Helvetica-Bold":{space:278,exclam:333,quotedbl:474,numbersign:556,dollar:556,percent:889,ampersand:722,quoteright:278,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:333,semicolon:333,less:584,equal:584,greater:584,question:611,at:975,A:722,B:722,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:556,K:722,L:611,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:584,underscore:556,quoteleft:278,a:556,b:611,c:556,d:611,e:556,f:333,g:611,h:611,i:278,j:278,k:556,l:278,m:889,n:611,o:611,p:611,q:611,r:389,s:556,t:333,u:611,v:556,w:778,x:556,y:556,z:500,braceleft:389,bar:280,braceright:389,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:238,quotedblleft:500,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:611,fl:611,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:556,bullet:350,quotesinglbase:278,quotedblbase:500,quotedblright:500,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:611,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:278,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:611,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:722,aacute:556,Ucircumflex:722,yacute:556,scommaaccent:556,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:611,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:556,aring:556,Ncommaaccent:722,lacute:278,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:556,scedilla:556,iacute:278,lozenge:494,Rcaron:722,Gcommaaccent:778,ucircumflex:611,acircumflex:556,Amacron:722,rcaron:389,ccedilla:556,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:743,Umacron:722,uring:611,threesuperior:333,Ograve:778,Agrave:722,Abreve:722,multiply:584,uacute:611,Tcaron:611,partialdiff:494,ydieresis:556,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:556,nacute:611,umacron:611,Ncaron:722,Iacute:278,plusminus:584,brokenbar:280,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:389,omacron:611,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:278,tcaron:389,eogonek:556,Uogonek:722,Aacute:722,Adieresis:722,egrave:556,zacute:500,iogonek:278,Oacute:778,oacute:611,amacron:556,sacute:556,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:611,twosuperior:333,Odieresis:778,mu:611,igrave:278,ohungarumlaut:611,Eogonek:667,dcroat:611,threequarters:834,Scedilla:667,lcaron:400,Kcommaaccent:722,Lacute:611,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:611,onehalf:834,lessequal:549,ocircumflex:611,ntilde:611,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:611,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:611,Ccaron:722,ugrave:611,radical:549,Dcaron:722,rcommaaccent:389,Ntilde:722,otilde:611,Rcommaaccent:722,Lcommaaccent:611,Atilde:722,Aogonek:722,Aring:722,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:556,minus:584,Icircumflex:278,ncaron:611,tcommaaccent:333,logicalnot:584,odieresis:611,udieresis:611,notequal:549,gcommaaccent:611,eth:611,zcaron:500,ncommaaccent:611,onesuperior:333,imacron:278,Euro:556},"Helvetica-BoldOblique":{space:278,exclam:333,quotedbl:474,numbersign:556,dollar:556,percent:889,ampersand:722,quoteright:278,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:333,semicolon:333,less:584,equal:584,greater:584,question:611,at:975,A:722,B:722,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:556,K:722,L:611,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:584,underscore:556,quoteleft:278,a:556,b:611,c:556,d:611,e:556,f:333,g:611,h:611,i:278,j:278,k:556,l:278,m:889,n:611,o:611,p:611,q:611,r:389,s:556,t:333,u:611,v:556,w:778,x:556,y:556,z:500,braceleft:389,bar:280,braceright:389,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:238,quotedblleft:500,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:611,fl:611,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:556,bullet:350,quotesinglbase:278,quotedblbase:500,quotedblright:500,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:611,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:278,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:611,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:722,aacute:556,Ucircumflex:722,yacute:556,scommaaccent:556,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:611,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:556,aring:556,Ncommaaccent:722,lacute:278,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:556,scedilla:556,iacute:278,lozenge:494,Rcaron:722,Gcommaaccent:778,ucircumflex:611,acircumflex:556,Amacron:722,rcaron:389,ccedilla:556,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:743,Umacron:722,uring:611,threesuperior:333,Ograve:778,Agrave:722,Abreve:722,multiply:584,uacute:611,Tcaron:611,partialdiff:494,ydieresis:556,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:556,nacute:611,umacron:611,Ncaron:722,Iacute:278,plusminus:584,brokenbar:280,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:389,omacron:611,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:278,tcaron:389,eogonek:556,Uogonek:722,Aacute:722,Adieresis:722,egrave:556,zacute:500,iogonek:278,Oacute:778,oacute:611,amacron:556,sacute:556,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:611,twosuperior:333,Odieresis:778,mu:611,igrave:278,ohungarumlaut:611,Eogonek:667,dcroat:611,threequarters:834,Scedilla:667,lcaron:400,Kcommaaccent:722,Lacute:611,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:611,onehalf:834,lessequal:549,ocircumflex:611,ntilde:611,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:611,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:611,Ccaron:722,ugrave:611,radical:549,Dcaron:722,rcommaaccent:389,Ntilde:722,otilde:611,Rcommaaccent:722,Lcommaaccent:611,Atilde:722,Aogonek:722,Aring:722,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:556,minus:584,Icircumflex:278,ncaron:611,tcommaaccent:333,logicalnot:584,odieresis:611,udieresis:611,notequal:549,gcommaaccent:611,eth:611,zcaron:500,ncommaaccent:611,onesuperior:333,imacron:278,Euro:556},"Helvetica-Oblique":{space:278,exclam:278,quotedbl:355,numbersign:556,dollar:556,percent:889,ampersand:667,quoteright:222,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:278,semicolon:278,less:584,equal:584,greater:584,question:556,at:1015,A:667,B:667,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:500,K:667,L:556,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:278,backslash:278,bracketright:278,asciicircum:469,underscore:556,quoteleft:222,a:556,b:556,c:500,d:556,e:556,f:278,g:556,h:556,i:222,j:222,k:500,l:222,m:833,n:556,o:556,p:556,q:556,r:333,s:500,t:278,u:556,v:500,w:722,x:500,y:500,z:500,braceleft:334,bar:260,braceright:334,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:191,quotedblleft:333,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:500,fl:500,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:537,bullet:350,quotesinglbase:222,quotedblbase:333,quotedblright:333,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:556,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:222,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:556,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:667,aacute:556,Ucircumflex:722,yacute:500,scommaaccent:500,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:500,aring:556,Ncommaaccent:722,lacute:222,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:500,scedilla:500,iacute:278,lozenge:471,Rcaron:722,Gcommaaccent:778,ucircumflex:556,acircumflex:556,Amacron:667,rcaron:333,ccedilla:500,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:643,Umacron:722,uring:556,threesuperior:333,Ograve:778,Agrave:667,Abreve:667,multiply:584,uacute:556,Tcaron:611,partialdiff:476,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:500,nacute:556,umacron:556,Ncaron:722,Iacute:278,plusminus:584,brokenbar:260,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:333,omacron:556,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:222,tcaron:317,eogonek:556,Uogonek:722,Aacute:667,Adieresis:667,egrave:556,zacute:500,iogonek:222,Oacute:778,oacute:556,amacron:556,sacute:500,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:556,twosuperior:333,Odieresis:778,mu:556,igrave:278,ohungarumlaut:556,Eogonek:667,dcroat:556,threequarters:834,Scedilla:667,lcaron:299,Kcommaaccent:667,Lacute:556,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:556,onehalf:834,lessequal:549,ocircumflex:556,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:556,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:556,Ccaron:722,ugrave:556,radical:453,Dcaron:722,rcommaaccent:333,Ntilde:722,otilde:556,Rcommaaccent:722,Lcommaaccent:556,Atilde:667,Aogonek:667,Aring:667,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:500,minus:584,Icircumflex:278,ncaron:556,tcommaaccent:278,logicalnot:584,odieresis:556,udieresis:556,notequal:549,gcommaaccent:556,eth:556,zcaron:500,ncommaaccent:556,onesuperior:333,imacron:278,Euro:556},Symbol:{space:250,exclam:333,universal:713,numbersign:500,existential:549,percent:833,ampersand:778,suchthat:439,parenleft:333,parenright:333,asteriskmath:500, -plus:549,comma:250,minus:549,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:278,semicolon:278,less:549,equal:549,greater:549,question:444,congruent:549,Alpha:722,Beta:667,Chi:722,Delta:612,Epsilon:611,Phi:763,Gamma:603,Eta:722,Iota:333,theta1:631,Kappa:722,Lambda:686,Mu:889,Nu:722,Omicron:722,Pi:768,Theta:741,Rho:556,Sigma:592,Tau:611,Upsilon:690,sigma1:439,Omega:768,Xi:645,Psi:795,Zeta:611,bracketleft:333,therefore:863,bracketright:333,perpendicular:658,underscore:500,radicalex:500,alpha:631,beta:549,chi:549,delta:494,epsilon:439,phi:521,gamma:411,eta:603,iota:329,phi1:603,kappa:549,lambda:549,mu:576,nu:521,omicron:549,pi:549,theta:521,rho:549,sigma:603,tau:439,upsilon:576,omega1:713,omega:686,xi:493,psi:686,zeta:494,braceleft:480,bar:200,braceright:480,similar:549,Euro:750,Upsilon1:620,minute:247,lessequal:549,fraction:167,infinity:713,florin:500,club:753,diamond:753,heart:753,spade:753,arrowboth:1042,arrowleft:987,arrowup:603,arrowright:987,arrowdown:603,degree:400,plusminus:549,second:411,greaterequal:549,multiply:549,proportional:713,partialdiff:494,bullet:460,divide:549,notequal:549,equivalence:549,approxequal:549,ellipsis:1e3,arrowvertex:603,arrowhorizex:1e3,carriagereturn:658,aleph:823,Ifraktur:686,Rfraktur:795,weierstrass:987,circlemultiply:768,circleplus:768,emptyset:823,intersection:768,union:768,propersuperset:713,reflexsuperset:713,notsubset:713,propersubset:713,reflexsubset:713,element:713,notelement:713,angle:768,gradient:713,registerserif:790,copyrightserif:790,trademarkserif:890,product:823,radical:549,dotmath:250,logicalnot:713,logicaland:603,logicalor:603,arrowdblboth:1042,arrowdblleft:987,arrowdblup:603,arrowdblright:987,arrowdbldown:603,lozenge:494,angleleft:329,registersans:790,copyrightsans:790,trademarksans:786,summation:713,parenlefttp:384,parenleftex:384,parenleftbt:384,bracketlefttp:384,bracketleftex:384,bracketleftbt:384,bracelefttp:494,braceleftmid:494,braceleftbt:494,braceex:494,angleright:329,integral:274,integraltp:686,integralex:686,integralbt:686,parenrighttp:384,parenrightex:384,parenrightbt:384,bracketrighttp:384,bracketrightex:384,bracketrightbt:384,bracerighttp:494,bracerightmid:494,bracerightbt:494,apple:790},"Times-Roman":{space:250,exclam:333,quotedbl:408,numbersign:500,dollar:500,percent:833,ampersand:778,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:564,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:278,semicolon:278,less:564,equal:564,greater:564,question:444,at:921,A:722,B:667,C:667,D:722,E:611,F:556,G:722,H:722,I:333,J:389,K:722,L:611,M:889,N:722,O:722,P:556,Q:722,R:667,S:556,T:611,U:722,V:722,W:944,X:722,Y:722,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:469,underscore:500,quoteleft:333,a:444,b:500,c:444,d:500,e:444,f:333,g:500,h:500,i:278,j:278,k:500,l:278,m:778,n:500,o:500,p:500,q:500,r:333,s:389,t:278,u:500,v:500,w:722,x:500,y:500,z:444,braceleft:480,bar:200,braceright:480,asciitilde:541,exclamdown:333,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:180,quotedblleft:444,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:556,fl:556,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:453,bullet:350,quotesinglbase:333,quotedblbase:444,quotedblright:444,guillemotright:500,ellipsis:1e3,perthousand:1e3,questiondown:444,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:889,ordfeminine:276,Lslash:611,Oslash:722,OE:889,ordmasculine:310,ae:667,dotlessi:278,lslash:278,oslash:500,oe:722,germandbls:500,Idieresis:333,eacute:444,abreve:444,uhungarumlaut:500,ecaron:444,Ydieresis:722,divide:564,Yacute:722,Acircumflex:722,aacute:444,Ucircumflex:722,yacute:500,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:444,Uacute:722,uogonek:500,Edieresis:611,Dcroat:722,commaaccent:250,copyright:760,Emacron:611,ccaron:444,aring:444,Ncommaaccent:722,lacute:278,agrave:444,Tcommaaccent:611,Cacute:667,atilde:444,Edotaccent:611,scaron:389,scedilla:389,iacute:278,lozenge:471,Rcaron:667,Gcommaaccent:722,ucircumflex:500,acircumflex:444,Amacron:722,rcaron:333,ccedilla:444,Zdotaccent:611,Thorn:556,Omacron:722,Racute:667,Sacute:556,dcaron:588,Umacron:722,uring:500,threesuperior:300,Ograve:722,Agrave:722,Abreve:722,multiply:564,uacute:500,Tcaron:611,partialdiff:476,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:611,adieresis:444,edieresis:444,cacute:444,nacute:500,umacron:500,Ncaron:722,Iacute:333,plusminus:564,brokenbar:200,registered:760,Gbreve:722,Idotaccent:333,summation:600,Egrave:611,racute:333,omacron:500,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:667,lcommaaccent:278,tcaron:326,eogonek:444,Uogonek:722,Aacute:722,Adieresis:722,egrave:444,zacute:444,iogonek:278,Oacute:722,oacute:500,amacron:444,sacute:389,idieresis:278,Ocircumflex:722,Ugrave:722,Delta:612,thorn:500,twosuperior:300,Odieresis:722,mu:500,igrave:278,ohungarumlaut:500,Eogonek:611,dcroat:500,threequarters:750,Scedilla:556,lcaron:344,Kcommaaccent:722,Lacute:611,trademark:980,edotaccent:444,Igrave:333,Imacron:333,Lcaron:611,onehalf:750,lessequal:549,ocircumflex:500,ntilde:500,Uhungarumlaut:722,Eacute:611,emacron:444,gbreve:500,onequarter:750,Scaron:556,Scommaaccent:556,Ohungarumlaut:722,degree:400,ograve:500,Ccaron:667,ugrave:500,radical:453,Dcaron:722,rcommaaccent:333,Ntilde:722,otilde:500,Rcommaaccent:667,Lcommaaccent:611,Atilde:722,Aogonek:722,Aring:722,Otilde:722,zdotaccent:444,Ecaron:611,Iogonek:333,kcommaaccent:500,minus:564,Icircumflex:333,ncaron:500,tcommaaccent:278,logicalnot:564,odieresis:500,udieresis:500,notequal:549,gcommaaccent:500,eth:500,zcaron:444,ncommaaccent:500,onesuperior:300,imacron:278,Euro:500},"Times-Bold":{space:250,exclam:333,quotedbl:555,numbersign:500,dollar:500,percent:1e3,ampersand:833,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:570,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:333,semicolon:333,less:570,equal:570,greater:570,question:500,at:930,A:722,B:667,C:722,D:722,E:667,F:611,G:778,H:778,I:389,J:500,K:778,L:667,M:944,N:722,O:778,P:611,Q:778,R:722,S:556,T:667,U:722,V:722,W:1e3,X:722,Y:722,Z:667,bracketleft:333,backslash:278,bracketright:333,asciicircum:581,underscore:500,quoteleft:333,a:500,b:556,c:444,d:556,e:444,f:333,g:500,h:556,i:278,j:333,k:556,l:278,m:833,n:556,o:500,p:556,q:556,r:444,s:389,t:333,u:556,v:500,w:722,x:500,y:500,z:444,braceleft:394,bar:220,braceright:394,asciitilde:520,exclamdown:333,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:278,quotedblleft:500,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:556,fl:556,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:540,bullet:350,quotesinglbase:333,quotedblbase:500,quotedblright:500,guillemotright:500,ellipsis:1e3,perthousand:1e3,questiondown:500,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:300,Lslash:667,Oslash:778,OE:1e3,ordmasculine:330,ae:722,dotlessi:278,lslash:278,oslash:500,oe:722,germandbls:556,Idieresis:389,eacute:444,abreve:500,uhungarumlaut:556,ecaron:444,Ydieresis:722,divide:570,Yacute:722,Acircumflex:722,aacute:500,Ucircumflex:722,yacute:500,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:500,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:747,Emacron:667,ccaron:444,aring:500,Ncommaaccent:722,lacute:278,agrave:500,Tcommaaccent:667,Cacute:722,atilde:500,Edotaccent:667,scaron:389,scedilla:389,iacute:278,lozenge:494,Rcaron:722,Gcommaaccent:778,ucircumflex:556,acircumflex:500,Amacron:722,rcaron:444,ccedilla:444,Zdotaccent:667,Thorn:611,Omacron:778,Racute:722,Sacute:556,dcaron:672,Umacron:722,uring:556,threesuperior:300,Ograve:778,Agrave:722,Abreve:722,multiply:570,uacute:556,Tcaron:667,partialdiff:494,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:500,edieresis:444,cacute:444,nacute:556,umacron:556,Ncaron:722,Iacute:389,plusminus:570,brokenbar:220,registered:747,Gbreve:778,Idotaccent:389,summation:600,Egrave:667,racute:444,omacron:500,Zacute:667,Zcaron:667,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:278,tcaron:416,eogonek:444,Uogonek:722,Aacute:722,Adieresis:722,egrave:444,zacute:444,iogonek:278,Oacute:778,oacute:500,amacron:500,sacute:389,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:556,twosuperior:300,Odieresis:778,mu:556,igrave:278,ohungarumlaut:500,Eogonek:667,dcroat:556,threequarters:750,Scedilla:556,lcaron:394,Kcommaaccent:778,Lacute:667,trademark:1e3,edotaccent:444,Igrave:389,Imacron:389,Lcaron:667,onehalf:750,lessequal:549,ocircumflex:500,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:444,gbreve:500,onequarter:750,Scaron:556,Scommaaccent:556,Ohungarumlaut:778,degree:400,ograve:500,Ccaron:722,ugrave:556,radical:549,Dcaron:722,rcommaaccent:444,Ntilde:722,otilde:500,Rcommaaccent:722,Lcommaaccent:667,Atilde:722,Aogonek:722,Aring:722,Otilde:778,zdotaccent:444,Ecaron:667,Iogonek:389,kcommaaccent:556,minus:570,Icircumflex:389,ncaron:556,tcommaaccent:333,logicalnot:570,odieresis:500,udieresis:556,notequal:549,gcommaaccent:500,eth:500,zcaron:444,ncommaaccent:556,onesuperior:300,imacron:278,Euro:500},"Times-BoldItalic":{space:250,exclam:389,quotedbl:555,numbersign:500,dollar:500,percent:833,ampersand:778,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:570,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:333,semicolon:333,less:570,equal:570,greater:570,question:500,at:832,A:667,B:667,C:667,D:722,E:667,F:667,G:722,H:778,I:389,J:500,K:667,L:611,M:889,N:722,O:722,P:611,Q:722,R:667,S:556,T:611,U:722,V:667,W:889,X:667,Y:611,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:570,underscore:500,quoteleft:333,a:500,b:500,c:444,d:500,e:444,f:333,g:500,h:556,i:278,j:278,k:500,l:278,m:778,n:556,o:500,p:500,q:500,r:389,s:389,t:278,u:556,v:444,w:667,x:500,y:444,z:389,braceleft:348,bar:220,braceright:348,asciitilde:570,exclamdown:389,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:278,quotedblleft:500,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:556,fl:556,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:500,bullet:350,quotesinglbase:333,quotedblbase:500,quotedblright:500,guillemotright:500,ellipsis:1e3,perthousand:1e3,questiondown:500,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:944,ordfeminine:266,Lslash:611,Oslash:722,OE:944,ordmasculine:300,ae:722,dotlessi:278,lslash:278,oslash:500,oe:722,germandbls:500,Idieresis:389,eacute:444,abreve:500,uhungarumlaut:556,ecaron:444,Ydieresis:611,divide:570,Yacute:611,Acircumflex:667,aacute:500,Ucircumflex:722,yacute:444,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:500,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:747,Emacron:667,ccaron:444,aring:500,Ncommaaccent:722,lacute:278,agrave:500,Tcommaaccent:611,Cacute:667,atilde:500,Edotaccent:667,scaron:389,scedilla:389,iacute:278,lozenge:494,Rcaron:667,Gcommaaccent:722,ucircumflex:556,acircumflex:500,Amacron:667,rcaron:389,ccedilla:444,Zdotaccent:611,Thorn:611,Omacron:722,Racute:667,Sacute:556,dcaron:608,Umacron:722,uring:556,threesuperior:300,Ograve:722,Agrave:667,Abreve:667,multiply:570,uacute:556,Tcaron:611,partialdiff:494,ydieresis:444,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:500,edieresis:444,cacute:444,nacute:556,umacron:556,Ncaron:722,Iacute:389,plusminus:570,brokenbar:220,registered:747,Gbreve:722,Idotaccent:389,summation:600,Egrave:667,racute:389,omacron:500,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:667,lcommaaccent:278,tcaron:366,eogonek:444,Uogonek:722,Aacute:667,Adieresis:667,egrave:444,zacute:389,iogonek:278,Oacute:722,oacute:500,amacron:500,sacute:389,idieresis:278,Ocircumflex:722,Ugrave:722,Delta:612,thorn:500,twosuperior:300,Odieresis:722,mu:576,igrave:278,ohungarumlaut:500,Eogonek:667,dcroat:500,threequarters:750,Scedilla:556,lcaron:382,Kcommaaccent:667,Lacute:611,trademark:1e3,edotaccent:444,Igrave:389,Imacron:389,Lcaron:611,onehalf:750,lessequal:549,ocircumflex:500,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:444,gbreve:500,onequarter:750,Scaron:556,Scommaaccent:556,Ohungarumlaut:722,degree:400,ograve:500,Ccaron:667,ugrave:556,radical:549,Dcaron:722,rcommaaccent:389,Ntilde:722,otilde:500,Rcommaaccent:667,Lcommaaccent:611,Atilde:667,Aogonek:667,Aring:667,Otilde:722,zdotaccent:389,Ecaron:667,Iogonek:389,kcommaaccent:500,minus:606,Icircumflex:389,ncaron:556,tcommaaccent:278,logicalnot:606,odieresis:500,udieresis:556,notequal:549,gcommaaccent:500,eth:500,zcaron:389,ncommaaccent:556,onesuperior:300,imacron:278,Euro:500},"Times-Italic":{space:250,exclam:333,quotedbl:420,numbersign:500,dollar:500,percent:833,ampersand:778,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:675,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:333,semicolon:333,less:675,equal:675,greater:675,question:500,at:920,A:611,B:611,C:667,D:722,E:611,F:611,G:722,H:722,I:333,J:444,K:667,L:556,M:833,N:667,O:722,P:611,Q:722,R:611,S:500,T:556,U:722,V:611,W:833,X:611,Y:556,Z:556,bracketleft:389,backslash:278,bracketright:389,asciicircum:422,underscore:500,quoteleft:333,a:500,b:500,c:444,d:500,e:444,f:278,g:500,h:500,i:278,j:278,k:444,l:278,m:722,n:500,o:500,p:500,q:500,r:389,s:389,t:278,u:500,v:444,w:667,x:444,y:444,z:389,braceleft:400,bar:275,braceright:400,asciitilde:541,exclamdown:389,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:214,quotedblleft:556,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:500,fl:500,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:523,bullet:350,quotesinglbase:333,quotedblbase:556,quotedblright:556,guillemotright:500,ellipsis:889,perthousand:1e3,questiondown:500,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:889,AE:889,ordfeminine:276,Lslash:556,Oslash:722,OE:944,ordmasculine:310,ae:667,dotlessi:278,lslash:278,oslash:500,oe:667,germandbls:500,Idieresis:333,eacute:444,abreve:500,uhungarumlaut:500,ecaron:444,Ydieresis:556,divide:675,Yacute:556,Acircumflex:611,aacute:500,Ucircumflex:722,yacute:444,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:500,Uacute:722,uogonek:500,Edieresis:611,Dcroat:722,commaaccent:250,copyright:760,Emacron:611,ccaron:444,aring:500,Ncommaaccent:667,lacute:278,agrave:500,Tcommaaccent:556,Cacute:667,atilde:500,Edotaccent:611,scaron:389,scedilla:389,iacute:278,lozenge:471,Rcaron:611,Gcommaaccent:722,ucircumflex:500,acircumflex:500,Amacron:611,rcaron:389,ccedilla:444,Zdotaccent:556,Thorn:611,Omacron:722,Racute:611,Sacute:500,dcaron:544,Umacron:722,uring:500,threesuperior:300,Ograve:722,Agrave:611,Abreve:611,multiply:675,uacute:500,Tcaron:556,partialdiff:476,ydieresis:444,Nacute:667,icircumflex:278,Ecircumflex:611,adieresis:500,edieresis:444,cacute:444,nacute:500,umacron:500,Ncaron:667,Iacute:333,plusminus:675,brokenbar:275,registered:760,Gbreve:722,Idotaccent:333,summation:600,Egrave:611,racute:389,omacron:500,Zacute:556,Zcaron:556,greaterequal:549,Eth:722,Ccedilla:667,lcommaaccent:278,tcaron:300,eogonek:444,Uogonek:722,Aacute:611,Adieresis:611,egrave:444,zacute:389,iogonek:278,Oacute:722,oacute:500,amacron:500,sacute:389,idieresis:278,Ocircumflex:722,Ugrave:722,Delta:612,thorn:500,twosuperior:300,Odieresis:722,mu:500,igrave:278,ohungarumlaut:500,Eogonek:611,dcroat:500,threequarters:750,Scedilla:500,lcaron:300,Kcommaaccent:667,Lacute:556,trademark:980,edotaccent:444,Igrave:333,Imacron:333,Lcaron:611,onehalf:750,lessequal:549,ocircumflex:500,ntilde:500,Uhungarumlaut:722,Eacute:611,emacron:444,gbreve:500,onequarter:750,Scaron:500,Scommaaccent:500,Ohungarumlaut:722,degree:400,ograve:500,Ccaron:667,ugrave:500,radical:453,Dcaron:722,rcommaaccent:389,Ntilde:667,otilde:500,Rcommaaccent:611,Lcommaaccent:556,Atilde:611,Aogonek:611,Aring:611,Otilde:722,zdotaccent:389,Ecaron:611,Iogonek:333,kcommaaccent:444,minus:675,Icircumflex:333,ncaron:500,tcommaaccent:278,logicalnot:675,odieresis:500,udieresis:500,notequal:549,gcommaaccent:500,eth:500,zcaron:389,ncommaaccent:500,onesuperior:300,imacron:278,Euro:500},ZapfDingbats:{space:278,a1:974,a2:961,a202:974,a3:980,a4:719,a5:789,a119:790,a118:791,a117:690,a11:960,a12:939,a13:549,a14:855,a15:911,a16:933,a105:911,a17:945,a18:974,a19:755,a20:846,a21:762,a22:761,a23:571,a24:677,a25:763,a26:760,a27:759,a28:754,a6:494,a7:552,a8:537,a9:577,a10:692,a29:786,a30:788,a31:788,a32:790,a33:793,a34:794,a35:816,a36:823,a37:789,a38:841,a39:823,a40:833,a41:816,a42:831,a43:923,a44:744,a45:723,a46:749,a47:790,a48:792,a49:695,a50:776,a51:768,a52:792,a53:759,a54:707,a55:708,a56:682,a57:701,a58:826,a59:815,a60:789,a61:789,a62:707,a63:687,a64:696,a65:689,a66:786,a67:787,a68:713,a69:791,a70:785,a71:791,a72:873,a73:761,a74:762,a203:762,a75:759,a204:759,a76:892,a77:892,a78:788,a79:784,a81:438,a82:138,a83:277,a84:415,a97:392,a98:392,a99:668,a100:668,a89:390,a90:390,a93:317,a94:317,a91:276,a92:276,a205:509,a85:509,a206:410,a86:410,a87:234,a88:234,a95:334,a96:334,a101:732,a102:544,a103:544,a104:910,a106:667,a107:760,a108:760,a112:776,a111:595,a110:694,a109:626,a120:788,a121:788,a122:788,a123:788,a124:788,a125:788,a126:788,a127:788,a128:788,a129:788,a130:788,a131:788,a132:788,a133:788,a134:788,a135:788,a136:788,a137:788,a138:788,a139:788,a140:788,a141:788,a142:788,a143:788,a144:788,a145:788,a146:788,a147:788,a148:788,a149:788,a150:788,a151:788,a152:788,a153:788,a154:788,a155:788,a156:788,a157:788,a158:788,a159:788,a160:894,a161:838,a163:1016,a164:458,a196:748,a165:924,a192:748,a166:918,a167:927,a168:928,a169:928,a170:834,a171:873,a172:828,a173:924,a162:924,a174:917,a175:930,a176:931,a177:463,a178:883,a179:836,a193:836,a180:867,a199:867,a181:696,a200:696,a182:874,a201:874,a183:760,a184:946,a197:771,a185:865,a194:771,a198:888,a186:967,a195:888,a187:831,a188:873,a189:927,a190:970,a191:918}},Dc={},Ec=1e3,Fc=function(){function d(a,b,c){this.lexer=a,this.allowStreams=b,this.xref=c,this.imageCache={},this.refill()}return d.prototype={refill:function(){this.buf1=this.lexer.getObj(),this.buf2=this.lexer.getObj()},shift:function(){A(this.buf2,"ID")?(this.buf1=this.buf2,this.buf2=null):(this.buf1=this.buf2,this.buf2=this.lexer.getObj())},tryShift:function(){try{return this.shift(),!0}catch(a){if(a instanceof ja)throw a;return!1}},getObj:function(b){var d=this.buf1;if(this.shift(),d instanceof za)switch(d.cmd){case"BI":return this.makeInlineImage(b);case"[":for(var e=[];!A(this.buf1,"]")&&!R(this.buf1);)e.push(this.getObj(b));return R(this.buf1)&&c("End of file inside array"),this.shift(),e;case"<<":for(var f=new Aa(this.xref);!A(this.buf1,">>")&&!R(this.buf1);)if(z(this.buf1)){var g=this.buf1.name;if(this.shift(),R(this.buf1))break;f.set(g,this.getObj(b))}else a("Malformed dictionary: key must be a name object"),this.shift();return R(this.buf1)&&c("End of file inside dictionary"),A(this.buf2,"stream")?this.allowStreams?this.makeStream(f,b):f:(this.shift(),f);default:return d}if(w(d)){var h=d;if(w(this.buf1)&&A(this.buf2,"R")){var i=new Ba(h,this.buf1);return this.shift(),this.shift(),i}return h}if(y(d)){var j=d;return b&&(j=b.decryptString(j)),j}return d},findDefaultInlineStreamEnd:function(a){for(var b,c,d,f,g=69,h=73,i=32,j=10,k=13,l=a.pos,m=0;-1!==(b=a.getByte());)if(0===m)m=b===g?1:0;else if(1===m)m=b===h?2:0;else if(e(2===m),b===i||b===j||b===k){for(d=5,f=a.peekBytes(d),c=0;d>c;c++)if(b=f[c],b!==j&&b!==k&&(i>b||b>127)){m=0;break}if(2===m)break}else m=0;return a.pos-4-l},findDCTDecodeInlineStreamEnd:function(a){for(var c,d,e,f=a.pos,g=!1;-1!==(c=a.getByte());)if(255===c){switch(a.getByte()){case 0:break;case 255:a.skip(-1);break;case 217:g=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:d=a.getUint16(),d>2?a.skip(d-2):a.skip(-2)}if(g)break}return e=a.pos-f,-1===c?(b("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),a.skip(-e),this.findDefaultInlineStreamEnd(a)):(this.inlineStreamSkipEI(a),e)},findASCII85DecodeInlineStreamEnd:function(a){for(var c,d,e=126,f=62,g=a.pos;-1!==(c=a.getByte());)if(c===e&&a.peekByte()===f){a.skip();break}return d=a.pos-g,-1===c?(b("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),a.skip(-d),this.findDefaultInlineStreamEnd(a)):(this.inlineStreamSkipEI(a),d)},findASCIIHexDecodeInlineStreamEnd:function(a){for(var c,d,e=62,f=a.pos;-1!==(c=a.getByte())&&c!==e;);return d=a.pos-f,-1===c?(b("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),a.skip(-d),this.findDefaultInlineStreamEnd(a)):(this.inlineStreamSkipEI(a),d)},inlineStreamSkipEI:function(a){for(var b,c=69,d=73,e=0;-1!==(b=a.getByte());)if(0===e)e=b===c?1:0;else if(1===e)e=b===d?2:0;else if(2===e)break},makeInlineImage:function(a){for(var b=this.lexer,d=b.stream,e=new Aa(this.xref);!A(this.buf1,"ID")&&!R(this.buf1);){z(this.buf1)||c("Dictionary key must be a name object");var f=this.buf1.name;if(this.shift(),R(this.buf1))break;e.set(f,this.getObj(a))}var g,h=e.get("Filter","F");z(h)?g=h.name:C(h)&&z(h[0])&&(g=h[0].name);var i,j,k,l=d.pos;i="DCTDecode"===g||"DCT"===g?this.findDCTDecodeInlineStreamEnd(d):"ASCII85Decide"===g||"A85"===g?this.findASCII85DecodeInlineStreamEnd(d):"ASCIIHexDecode"===g||"AHx"===g?this.findASCIIHexDecodeInlineStreamEnd(d):this.findDefaultInlineStreamEnd(d);var m,n=d.makeSubStream(l,i,e);if(Ec>i){var o=n.getBytes();n.reset();var p=1,q=0;for(j=0,k=o.length;k>j;++j)p+=255&o[j],q+=p;if(m=q%65521<<16|p%65521,this.imageCache.adler32===m)return this.buf2=za.get("EI"),this.shift(),this.imageCache[m].reset(),this.imageCache[m]}return a&&(n=a.createStream(n,i)),n=this.filter(n,e,i),n.dict=e,void 0!==m&&(n.cacheKey="inline_"+i+"_"+m,this.imageCache[m]=n),this.buf2=za.get("EI"),this.shift(),n},makeStream:function(b,d){var e=this.lexer,f=e.stream;e.skipToNextLine();var g=f.pos-1,h=b.get("Length");if(w(h)||(a("Bad "+h+" attribute in stream"),h=0),f.pos=g+h,e.nextChar(),this.tryShift()&&A(this.buf2,"endstream"))this.shift();else{f.pos=g;for(var i,j,k=2048,l=9,m=[101,110,100,115,116,114,101,97,109],n=0,o=!1;f.pos=q)break;for(o=!1,i=0,j=0;q>i;i++){var r=p[i];if(r!==m[j])i-=j,j=0;else if(j++,j>=l){i++,o=!0;break}}if(o){n+=i-l,f.pos+=i-l;break}n+=q,f.pos+=q}o||c("Missing endstream"),h=n,e.nextChar(),this.shift(),this.shift()}return this.shift(),f=f.makeSubStream(g,h,b),d&&(f=d.createStream(f,h)),f=this.filter(f,b,h),f.dict=b,f},filter:function(a,b,d){var e=b.get("Filter","F"),f=b.get("DecodeParms","DP");if(z(e))return this.makeFilter(a,e.name,d,f);var g=d;if(C(e))for(var h=e,i=f,j=0,k=h.length;k>j;++j)e=h[j],z(e)||c("Bad filter name: "+e),f=null,C(i)&&j in i&&(f=i[j]),a=this.makeFilter(a,e.name,g,f),g=null;return a},makeFilter:function(a,c,d,e){if(0===a.dict.get("Length")&&!d)return b('Empty "'+c+'" stream.'),new _c(a);try{e&&this.xref&&(e=this.xref.fetchIfRef(e));var f=this.xref.stats.streamTypes;if("FlateDecode"===c||"Fl"===c)return f[Y.FLATE]=!0,e?new Rc(new Qc(a,d),d,e):new Qc(a,d);if("LZWDecode"===c||"LZW"===c){f[Y.LZW]=!0;var g=1;return e?(e.has("EarlyChange")&&(g=e.get("EarlyChange")),new Rc(new $c(a,d,g),d,e)):new $c(a,d,g)}return"DCTDecode"===c||"DCT"===c?(f[Y.DCT]=!0,new Sc(a,d,a.dict,this.xref)):"JPXDecode"===c||"JPX"===c?(f[Y.JPX]=!0,new Tc(a,d,a.dict)):"ASCII85Decode"===c||"A85"===c?(f[Y.A85]=!0,new Wc(a,d)):"ASCIIHexDecode"===c||"AHx"===c?(f[Y.AHX]=!0,new Xc(a,d)):"CCITTFaxDecode"===c||"CCF"===c?(f[Y.CCF]=!0,new Zc(a,d,e)):"RunLengthDecode"===c||"RL"===c?(f[Y.RL]=!0,new Yc(a,d)):"JBIG2Decode"===c?(f[Y.JBIG]=!0,new Uc(a,d,a.dict)):(b('filter "'+c+'" not supported yet'),a)}catch(h){if(h instanceof ja)throw h;return b('Invalid stream: "'+h+'"'),new _c(a)}}},d}(),Gc=function(){function a(a,b){this.stream=a,this.nextChar(),this.strBuf=[],this.knownCommands=b}function d(a){return a>=48&&57>=a?15&a:a>=65&&70>=a||a>=97&&102>=a?(15&a)+9:-1}a.isSpace=function(a){return 32===a||9===a||13===a||10===a};var e=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];return a.prototype={nextChar:function(){return this.currentChar=this.stream.getByte()},peekChar:function(){return this.stream.peekByte()},getNumber:function(){var a=this.currentChar,d=!1,e=0,f=1;if(45===a?(f=-1,a=this.nextChar(),45===a&&(a=this.nextChar())):43===a&&(a=this.nextChar()),46===a&&(e=10,a=this.nextChar()),48>a||a>57)return c("Invalid number: "+String.fromCharCode(a)),0;for(var g=a-48,h=0,i=1;(a=this.nextChar())>=0;)if(a>=48&&57>=a){var j=a-48;d?h=10*h+j:(0!==e&&(e*=10),g=10*g+j)}else if(46===a){if(0!==e)break;e=1}else if(45===a)b("Badly formated number");else{if(69!==a&&101!==a)break;if(a=this.peekChar(),43===a||45===a)i=45===a?-1:1,this.nextChar();else if(48>a||a>57)break;d=!0}return 0!==e&&(g/=e),d&&(g*=Math.pow(10,i*h)),f*g},getString:function(){var a=1,c=!1,d=this.strBuf;d.length=0;for(var e=this.nextChar();;){var f=!1;switch(0|e){case-1:b("Unterminated string"),c=!0;break;case 40:++a,d.push("(");break;case 41:0===--a?(this.nextChar(),c=!0):d.push(")");break;case 92:switch(e=this.nextChar()){case-1:b("Unterminated string"),c=!0;break;case 110:d.push("\n");break;case 114:d.push("\r");break;case 116:d.push(" ");break;case 98:d.push("\b");break;case 102:d.push("\f");break;case 92:case 40:case 41:d.push(String.fromCharCode(e));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:var g=15&e;e=this.nextChar(),f=!0,e>=48&&55>=e&&(g=(g<<3)+(15&e),e=this.nextChar(),e>=48&&55>=e&&(f=!1,g=(g<<3)+(15&e))),d.push(String.fromCharCode(g));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:d.push(String.fromCharCode(e))}break;default:d.push(String.fromCharCode(e))}if(c)break;f||(e=this.nextChar())}return d.join("")},getName:function(){var a,f=this.strBuf;for(f.length=0;(a=this.nextChar())>=0&&!e[a];)if(35===a){a=this.nextChar();var g=d(a);if(-1!==g){var h=d(this.nextChar());-1===h&&c("Illegal digit in hex char in name: "+h),f.push(String.fromCharCode(g<<4|h))}else f.push("#",String.fromCharCode(a))}else f.push(String.fromCharCode(a));return f.length>127&&b("name token is longer than allowed by the spec: "+f.length),ya.get(f.join(""))},getHexString:function(){var a=this.strBuf;a.length=0;for(var c,f,g=this.currentChar,h=!0;;){if(0>g){b("Unterminated hex string");break}if(62===g){this.nextChar();break}if(1!==e[g]){if(h){if(c=d(g),-1===c){b('Ignoring invalid character "'+g+'" in hex string'),g=this.nextChar();continue}}else{if(f=d(g),-1===f){b('Ignoring invalid character "'+g+'" in hex string'),g=this.nextChar();continue}a.push(String.fromCharCode(c<<4|f))}h=!h,g=this.nextChar()}else g=this.nextChar()}return a.join("")},getObj:function(){for(var a=!1,b=this.currentChar;;){if(0>b)return Dc;if(a)(10===b||13===b)&&(a=!1);else if(37===b)a=!0;else if(1!==e[b])break;b=this.nextChar()}switch(0|b){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),za.get("[");case 93:return this.nextChar(),za.get("]");case 60:return b=this.nextChar(),60===b?(this.nextChar(),za.get("<<")):this.getHexString();case 62:return b=this.nextChar(),62===b?(this.nextChar(),za.get(">>")):za.get(">");case 123:return this.nextChar(),za.get("{");case 125:return this.nextChar(),za.get("}");case 41:c("Illegal character: "+b)}for(var d=String.fromCharCode(b),f=this.knownCommands,g=f&&void 0!==f[d];(b=this.nextChar())>=0&&!e[b];){var h=d+String.fromCharCode(b);if(g&&void 0===f[h])break;128===d.length&&c("Command token too long: "+d.length),d=h,g=f&&void 0!==f[d]}return"true"===d?!0:"false"===d?!1:"null"===d?null:za.get(d)},skipToNextLine:function(){for(var a=this.currentChar;a>=0;){if(13===a){a=this.nextChar(),10===a&&this.nextChar();break}if(10===a){this.nextChar();break}a=this.nextChar()}}},a}(),Hc={create:function(a){function b(a,b){var c=j.get(a);if(w(c)&&(b?c>=0:c>0))return c;throw new Error('The "'+a+'" parameter in the linearization dictionary is invalid.')}function c(){var a,b,c=j.get("H");if(C(c)&&(2===(a=c.length)||4===a)){for(var d=0;a>d;d++)if(!(w(b=c[d])&&b>0))throw new Error("Hint ("+d+") in the linearization dictionary is invalid.");return c}throw new Error("Hint array in the linearization dictionary is invalid.")}var d,e,f=new Fc(new Gc(a),!1,null),g=f.getObj(),h=f.getObj(),i=f.getObj(),j=f.getObj();if(!(w(g)&&w(h)&&A(i,"obj")&&B(j)&&x(d=j.get("Linearized"))&&d>0))return null;if((e=b("L"))!==a.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:e,hints:c(),objectNumberFirst:b("O"),endFirst:b("E"),numPages:b("N"),mainXRefEntriesOffset:b("T"),pageFirst:j.has("P")?b("P",!0):0}}},Ic=function(){function a(a){this.lexer=a,this.operators=[],this.token=null,this.prev=null}return a.prototype={nextToken:function(){this.prev=this.token,this.token=this.lexer.getToken()},accept:function(a){return this.token.type===a?(this.nextToken(),!0):!1},expect:function(a){return this.accept(a)?!0:void c("Unexpected symbol: found "+this.token.type+" expected "+a+".")},parse:function(){return this.nextToken(),this.expect(Jc.LBRACE),this.parseBlock(),this.expect(Jc.RBRACE),this.operators},parseBlock:function(){for(;;)if(this.accept(Jc.NUMBER))this.operators.push(this.prev.value);else if(this.accept(Jc.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(Jc.LBRACE))return;this.parseCondition()}},parseCondition:function(){var a=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(Jc.RBRACE),this.accept(Jc.IF))this.operators[a]=this.operators.length,this.operators[a+1]="jz";else if(this.accept(Jc.LBRACE)){var b=this.operators.length;this.operators.push(null,null);var d=this.operators.length;this.parseBlock(),this.expect(Jc.RBRACE),this.expect(Jc.IFELSE),this.operators[b]=this.operators.length,this.operators[b+1]="j",this.operators[a]=d,this.operators[a+1]="jz"}else c("PS Function: error parsing conditional.")}},a}(),Jc={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5},Kc=function(){function a(a,b){this.type=a,this.value=b}var b={};return a.getOperator=function(c){var d=b[c];return d?d:b[c]=new a(Jc.OPERATOR,c)},a.LBRACE=new a(Jc.LBRACE,"{"),a.RBRACE=new a(Jc.RBRACE,"}"),a.IF=new a(Jc.IF,"IF"),a.IFELSE=new a(Jc.IFELSE,"IFELSE"),a}(),Lc=function(){function a(a){this.stream=a,this.nextChar(),this.strBuf=[]}return a.prototype={nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){for(var a=!1,b=this.currentChar;;){ -if(0>b)return Dc;if(a)(10===b||13===b)&&(a=!1);else if(37===b)a=!0;else if(!Gc.isSpace(b))break;b=this.nextChar()}switch(0|b){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new Kc(Jc.NUMBER,this.getNumber());case 123:return this.nextChar(),Kc.LBRACE;case 125:return this.nextChar(),Kc.RBRACE}var c=this.strBuf;for(c.length=0,c[0]=String.fromCharCode(b);(b=this.nextChar())>=0&&(b>=65&&90>=b||b>=97&&122>=b);)c.push(String.fromCharCode(b));var d=c.join("");switch(d.toLowerCase()){case"if":return Kc.IF;case"ifelse":return Kc.IFELSE;default:return Kc.getOperator(d)}},getNumber:function(){var a=this.currentChar,b=this.strBuf;for(b.length=0,b[0]=String.fromCharCode(a);(a=this.nextChar())>=0&&(a>=48&&57>=a||45===a||46===a);)b.push(String.fromCharCode(a));var d=parseFloat(b.join(""));return isNaN(d)&&c("Invalid floating point number: "+d),d}},a}(),Mc=function(){function a(a,b,c,d){this.bytes=a instanceof Uint8Array?a:new Uint8Array(a),this.start=b||0,this.pos=this.start,this.end=b+c||this.bytes.length,this.dict=d}return a.prototype={get length(){return this.end-this.start},get isEmpty(){return 0===this.length},getByte:function(){return this.pos>=this.end?-1:this.bytes[this.pos++]},getUint16:function(){var a=this.getByte(),b=this.getByte();return-1===a||-1===b?-1:(a<<8)+b},getInt32:function(){var a=this.getByte(),b=this.getByte(),c=this.getByte(),d=this.getByte();return(a<<24)+(b<<16)+(c<<8)+d},getBytes:function(a){var b=this.bytes,c=this.pos,d=this.end;if(!a)return b.subarray(c,d);var e=c+a;return e>d&&(e=d),this.pos=e,b.subarray(c,e)},peekByte:function(){var a=this.getByte();return this.pos--,a},peekBytes:function(a){var b=this.getBytes(a);return this.pos-=b.length,b},skip:function(a){a||(a=1),this.pos+=a},reset:function(){this.pos=this.start},moveStart:function(){this.start=this.pos},makeSubStream:function(b,c,d){return new a(this.bytes.buffer,b,c,d)},isStream:!0},a}(),Nc=function(){function a(a){for(var b=a.length,c=new Uint8Array(b),d=0;b>d;++d)c[d]=a.charCodeAt(d);Mc.call(this,c)}return a.prototype=Mc.prototype,a}(),Oc=function(){function a(a){if(this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=b,this.minBufferLength=512,a)for(;this.minBufferLengthc;)c*=2;var d=new Uint8Array(c);return d.set(b),this.buffer=d},getByte:function(){for(var a=this.pos;this.bufferLength<=a;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]},getUint16:function(){var a=this.getByte(),b=this.getByte();return-1===a||-1===b?-1:(a<<8)+b},getInt32:function(){var a=this.getByte(),b=this.getByte(),c=this.getByte(),d=this.getByte();return(a<<24)+(b<<16)+(c<<8)+d},getBytes:function(a){var b,c=this.pos;if(a){for(this.ensureBuffer(c+a),b=c+a;!this.eof&&this.bufferLengthd&&(b=d)}else{for(;!this.eof;)this.readBlock();b=this.bufferLength}return this.pos=b,this.buffer.subarray(c,b)},peekByte:function(){var a=this.getByte();return this.pos--,a},peekBytes:function(a){var b=this.getBytes(a);return this.pos-=b.length,b},makeSubStream:function(a,b,c){for(var d=a+b;this.bufferLength<=d&&!this.eof;)this.readBlock();return new Mc(this.buffer,a,b,c)},skip:function(a){a||(a=1),this.pos+=a},reset:function(){this.pos=0},getBaseStreams:function(){return this.str&&this.str.getBaseStreams?this.str.getBaseStreams():[]}},a}(),Pc=function(){function a(a){this.streams=a,Oc.call(this,null)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a=this.streams;if(0===a.length)return void(this.eof=!0);var b=a.shift(),c=b.getBytes(),d=this.bufferLength,e=d+c.length,f=this.ensureBuffer(e);f.set(c,d),this.bufferLength=e},a.prototype.getBaseStreams=function(){for(var a=[],b=0,c=this.streams.length;c>b;b++){var d=this.streams[b];d.getBaseStreams&&na.appendToArray(a,d.getBaseStreams())}return a},a}(),Qc=function(){function a(a,b){this.str=a,this.dict=a.dict;var d=a.getByte(),e=a.getByte();(-1===d||-1===e)&&c("Invalid header in flate stream: "+d+", "+e),8!==(15&d)&&c("Unknown compression method in flate stream: "+d+", "+e),((d<<8)+e)%31!==0&&c("Bad FCHECK in flate stream: "+d+", "+e),32&e&&c("FDICT bit set in flate stream: "+d+", "+e),this.codeSize=0,this.codeBuf=0,Oc.call(this,b)}var b=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),e=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),f=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],g=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];return a.prototype=Object.create(Oc.prototype),a.prototype.getBits=function(a){for(var b,d=this.str,e=this.codeSize,f=this.codeBuf;a>e;)-1===(b=d.getByte())&&c("Bad encoding in flate stream"),f|=b<>a,this.codeSize=e-=a,b},a.prototype.getCode=function(a){for(var b,d=this.str,e=a[0],f=a[1],g=this.codeSize,h=this.codeBuf;f>g&&-1!==(b=d.getByte());)h|=b<>16,k=65535&i;return(1>j||j>g)&&c("Bad encoding in flate stream"),this.codeBuf=h>>j,this.codeSize=g-j,k},a.prototype.generateHuffmanTable=function(a){var b,c=a.length,d=0;for(b=0;c>b;++b)a[b]>d&&(d=a[b]);for(var e=1<=g;++g,h<<=1,i<<=1)for(var j=0;c>j;++j)if(a[j]===g){var k=0,l=h;for(b=0;g>b;++b)k=k<<1|1&l,l>>=1;for(b=k;e>b;b+=i)f[b]=g<<16|j;++h}return[f,d]},a.prototype.readBlock=function(){var a,h,i=this.str,j=this.getBits(3);if(1&j&&(this.eof=!0),j>>=1,0!==j){var k,l;if(1===j)k=f,l=g;else if(2===j){var m,n=this.getBits(5)+257,o=this.getBits(5)+1,p=this.getBits(4)+4,q=new Uint8Array(b.length);for(m=0;p>m;++m)q[b[m]]=this.getBits(3);var r=this.generateHuffmanTable(q);h=0,m=0;for(var s,t,u,v=n+o,w=new Uint8Array(v);v>m;){var x=this.getCode(r);if(16===x)s=2,t=3,u=h;else if(17===x)s=3,t=3,u=h=0;else{if(18!==x){w[m++]=h=x;continue}s=7,t=11,u=h=0}for(var y=this.getBits(s)+t;y-- >0;)w[m++]=u}k=this.generateHuffmanTable(w.subarray(0,n)),l=this.generateHuffmanTable(w.subarray(n,v))}else c("Unknown block type in flate stream");a=this.buffer;for(var z=a?a.length:0,A=this.bufferLength;;){var B=this.getCode(k);if(256>B)A+1>=z&&(a=this.ensureBuffer(A+1),z=a.length),a[A++]=B;else{if(256===B)return void(this.bufferLength=A);B-=257,B=d[B];var C=B>>16;C>0&&(C=this.getBits(C)),h=(65535&B)+C,B=this.getCode(l),B=e[B],C=B>>16,C>0&&(C=this.getBits(C));var D=(65535&B)+C;A+h>=z&&(a=this.ensureBuffer(A+h),z=a.length);for(var E=0;h>E;++E,++A)a[A]=a[A-D]}}}else{var F;-1===(F=i.getByte())&&c("Bad block header in flate stream");var G=F;-1===(F=i.getByte())&&c("Bad block header in flate stream"),G|=F<<8,-1===(F=i.getByte())&&c("Bad block header in flate stream");var H=F;-1===(F=i.getByte())&&c("Bad block header in flate stream"),H|=F<<8,H===(65535&~G)||0===G&&0===H||c("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var I=this.bufferLength;a=this.ensureBuffer(I+G);var J=I+G;if(this.bufferLength=J,0===G)-1===i.peekByte()&&(this.eof=!0);else for(var K=I;J>K;++K){if(-1===(F=i.getByte())){this.eof=!0;break}a[K]=F}}},a}(),Rc=function(){function a(a,b,d){var e=this.predictor=d.get("Predictor")||1;if(1>=e)return a;2!==e&&(10>e||e>15)&&c("Unsupported predictor: "+e),2===e?this.readBlock=this.readBlockTiff:this.readBlock=this.readBlockPng,this.str=a,this.dict=a.dict;var f=this.colors=d.get("Colors")||1,g=this.bits=d.get("BitsPerComponent")||8,h=this.columns=d.get("Columns")||1;return this.pixBytes=f*g+7>>3,this.rowBytes=h*f*g+7>>3,Oc.call(this,b),this}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlockTiff=function(){var a=this.rowBytes,b=this.bufferLength,c=this.ensureBuffer(b+a),d=this.bits,e=this.colors,f=this.str.getBytes(a);if(this.eof=!f.length,!this.eof){var g,h=0,i=0,j=0,k=0,l=b;if(1===d)for(g=0;a>g;++g){var m=f[g];h=h<<8|m,c[l++]=255&(m^h>>e),h&=65535}else if(8===d){for(g=0;e>g;++g)c[l++]=f[g];for(;a>g;++g)c[l]=c[l-e]+f[g],l++}else{var n=new Uint8Array(e+1),o=(1<g;++g)for(var s=0;e>s;++s)d>j&&(h=h<<8|255&f[p++],j+=8),n[s]=n[s]+(h>>j-d)&o,j-=d,i=i<=8&&(c[q++]=i>>k-8&255,k-=8);k>0&&(c[q++]=(i<<8-k)+(h&(1<<8-k)-1))}this.bufferLength+=a}},a.prototype.readBlockPng=function(){var a=this.rowBytes,b=this.pixBytes,d=this.str.getByte(),e=this.str.getBytes(a);if(this.eof=!e.length,!this.eof){var f=this.bufferLength,g=this.ensureBuffer(f+a),h=g.subarray(f-a,f);0===h.length&&(h=new Uint8Array(a));var i,j,k,l=f;switch(d){case 0:for(i=0;a>i;++i)g[l++]=e[i];break;case 1:for(i=0;b>i;++i)g[l++]=e[i];for(;a>i;++i)g[l]=g[l-b]+e[i]&255,l++;break;case 2:for(i=0;a>i;++i)g[l++]=h[i]+e[i]&255;break;case 3:for(i=0;b>i;++i)g[l++]=(h[i]>>1)+e[i];for(;a>i;++i)g[l]=(h[i]+g[l-b]>>1)+e[i]&255,l++;break;case 4:for(i=0;b>i;++i)j=h[i],k=e[i],g[l++]=j+k;for(;a>i;++i){j=h[i];var m=h[i-b],n=g[l-b],o=n+j-m,p=o-n;0>p&&(p=-p);var q=o-j;0>q&&(q=-q);var r=o-m;0>r&&(r=-r),k=e[i],q>=p&&r>=p?g[l++]=n+k:r>=q?g[l++]=j+k:g[l++]=m+k}break;default:c("Unsupported predictor: "+d)}this.bufferLength+=a}},a}(),Sc=function(){function a(a,b,c,d){for(var e;-1!==(e=a.getByte());)if(255===e){a.skip(-1);break}this.stream=a,this.maybeLength=b,this.dict=c,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),Object.defineProperty(a.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),a.prototype.ensureBuffer=function(a){if(!this.bufferLength)try{var b=new gd;if(this.forceRGB&&this.dict&&C(this.dict.get("Decode"))){for(var d=this.dict.get("Decode"),e=this.dict.get("BitsPerComponent")||8,f=d.length,g=new Int32Array(f),h=!1,i=(1<j;j+=2)g[j]=256*(d[j+1]-d[j])|0,g[j+1]=d[j]*i|0,(256!==g[j]||0!==g[j+1])&&(h=!0);h&&(b.decodeTransform=g)}b.parse(this.bytes);var k=b.getData(this.drawWidth,this.drawHeight,this.forceRGB);this.buffer=k,this.bufferLength=k.length,this.eof=!0}catch(l){c("JPEG error: "+l)}},a.prototype.getBytes=function(a){return this.ensureBuffer(),this.buffer},a.prototype.getIR=function(){return PDFJS.createObjectURL(this.bytes,"image/jpeg")},a.prototype.isNativelySupported=function(a,b){var c=Xa.parse(this.dict.get("ColorSpace","CS"),a,b);return("DeviceGray"===c.name||"DeviceRGB"===c.name)&&c.isDefaultDecode(this.dict.get("Decode","D"))},a.prototype.isNativelyDecodable=function(a,b){var c=Xa.parse(this.dict.get("ColorSpace","CS"),a,b);return(1===c.numComps||3===c.numComps)&&c.isDefaultDecode(this.dict.get("Decode","D"))},a}(),Tc=function(){function a(a,b,c){this.stream=a,this.maybeLength=b,this.dict=c,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),Object.defineProperty(a.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),a.prototype.ensureBuffer=function(a){if(!this.bufferLength){var b=new hd;b.parse(this.bytes);var c=b.width,d=b.height,e=b.componentsCount,f=b.tiles.length;if(1===f)this.buffer=b.tiles[0].items;else{for(var g=new Uint8Array(c*d*e),h=0;f>h;h++)for(var i=b.tiles[h],j=i.width,k=i.height,l=i.left,m=i.top,n=i.items,o=0,p=(c*m+l)*e,q=c*e,r=j*e,s=0;k>s;s++){var t=n.subarray(o,o+r);g.set(t,p),o+=r,p+=q}this.buffer=g}this.bufferLength=this.buffer.length,this.eof=!0}},a}(),Uc=function(){function a(a,b,c){this.stream=a,this.maybeLength=b,this.dict=c,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),Object.defineProperty(a.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),a.prototype.ensureBuffer=function(a){if(!this.bufferLength){var c=new id,d=[],e=this.dict.xref,f=e.fetchIfRef(this.dict.get("DecodeParms"));if(C(f)&&(f.length>1&&b("JBIG2 - 'DecodeParms' array with multiple elements not supported."),f=e.fetchIfRef(f[0])),f&&f.has("JBIG2Globals")){var g=f.get("JBIG2Globals"),h=g.getBytes();d.push({data:h,start:0,end:h.length})}d.push({data:this.bytes,start:0,end:this.bytes.length});for(var i=c.parseChunks(d),j=i.length,k=0;j>k;k++)i[k]^=255;this.buffer=i,this.bufferLength=j,this.eof=!0}},a}(),Vc=function(){function a(a,b,c){this.str=a,this.dict=a.dict,this.decrypt=c,this.nextChunk=null,this.initialized=!1,Oc.call(this,b)}var b=512;return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a;if(this.initialized?a=this.nextChunk:(a=this.str.getBytes(b),this.initialized=!0),!a||0===a.length)return void(this.eof=!0);this.nextChunk=this.str.getBytes(b);var c=this.nextChunk&&this.nextChunk.length>0,d=this.decrypt;a=d(a,!c);var e,f=this.bufferLength,g=a.length,h=this.ensureBuffer(f+g);for(e=0;g>e;e++)h[f++]=a[e];this.bufferLength=f},a}(),Wc=function(){function a(a,b){this.str=a,this.dict=a.dict,this.input=new Uint8Array(5),b&&(b=.8*b),Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){for(var a=126,b=122,c=-1,d=this.str,e=d.getByte();Gc.isSpace(e);)e=d.getByte();if(e===c||e===a)return void(this.eof=!0);var f,g,h=this.bufferLength;if(e===b){for(f=this.ensureBuffer(h+4),g=0;4>g;++g)f[h+g]=0;this.bufferLength+=4}else{var i=this.input;for(i[0]=e,g=1;5>g;++g){for(e=d.getByte();Gc.isSpace(e);)e=d.getByte();if(i[g]=e,e===c||e===a)break}if(f=this.ensureBuffer(h+g-1),this.bufferLength+=g-1,5>g){for(;5>g;++g)i[g]=117;this.eof=!0}var j=0;for(g=0;5>g;++g)j=85*j+(i[g]-33);for(g=3;g>=0;--g)f[h+g]=255&j,j>>=8}},a}(),Xc=function(){function a(a,b){this.str=a,this.dict=a.dict,this.firstDigit=-1,b&&(b=.5*b),Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a=8e3,b=this.str.getBytes(a);if(!b.length)return void(this.eof=!0);for(var c=b.length+1>>1,d=this.ensureBuffer(this.bufferLength+c),e=this.bufferLength,f=this.firstDigit,g=0,h=b.length;h>g;g++){var i,j=b[g];if(j>=48&&57>=j)i=15&j;else{if(!(j>=65&&70>=j||j>=97&&102>=j)){if(62===j){this.eof=!0;break}continue}i=(15&j)+9}0>f?f=i:(d[e++]=f<<4|i,f=-1)}f>=0&&this.eof&&(d[e++]=f<<4,f=-1),this.firstDigit=f,this.bufferLength=e},a}(),Yc=function(){function a(a,b){this.str=a,this.dict=a.dict,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a=this.str.getBytes(2);if(!a||a.length<2||128===a[0])return void(this.eof=!0);var b,c=this.bufferLength,d=a[0];if(128>d){if(b=this.ensureBuffer(c+d+1),b[c++]=a[1],d>0){var e=this.str.getBytes(d);b.set(e,c),c+=d}}else{d=257-d;var f=a[1];b=this.ensureBuffer(c+d+1);for(var g=0;d>g;g++)b[c++]=f}this.bufferLength=c},a}(),Zc=function(){function b(a,b,c){this.str=a,this.dict=a.dict,c=c||Aa.empty,this.encoding=c.get("K")||0,this.eoline=c.get("EndOfLine")||!1,this.byteAlign=c.get("EncodedByteAlign")||!1,this.columns=c.get("Columns")||1728,this.rows=c.get("Rows")||0;var d=c.get("EndOfBlock");(null===d||void 0===d)&&(d=!0),this.eoblock=d,this.black=c.get("BlackIs1")||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0;for(var e;0===(e=this.lookBits(12));)this.eatBits(1);1===e&&this.eatBits(12),this.encoding>0&&(this.nextLine2D=!this.lookBits(1),this.eatBits(1)),Oc.call(this,b)}var c=-2,d=0,e=1,f=2,g=3,h=4,i=5,j=6,k=7,l=8,m=[[-1,-1],[-1,-1],[7,l],[7,k],[6,j],[6,j],[6,i],[6,i],[4,d],[4,d],[4,d],[4,d],[4,d],[4,d],[4,d],[4,d],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f]],n=[[-1,-1],[12,c],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],o=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],p=[[-1,-1],[-1,-1],[12,c],[12,c],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],q=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],r=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];return b.prototype=Object.create(Oc.prototype),b.prototype.readBlock=function(){for(;!this.eof;){var a=this.lookChar();this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=a}},b.prototype.addPixels=function(b,c){var d=this.codingLine,e=this.codingPos;b>d[e]&&(b>this.columns&&(a("row is wrong length"),this.err=!0,b=this.columns),1&e^c&&++e,d[e]=b),this.codingPos=e},b.prototype.addPixelsNeg=function(b,c){var d=this.codingLine,e=this.codingPos;if(b>d[e])b>this.columns&&(a("row is wrong length"),this.err=!0,b=this.columns),1&e^c&&++e,d[e]=b;else if(bb&&(a("invalid code"),this.err=!0,b=0);e>0&&b=64);do s+=t=this.getWhiteCode();while(t>=64)}else{do r+=t=this.getWhiteCode();while(t>=64);do s+=t=this.getBlackCode();while(t>=64)}for(this.addPixels(p[this.codingPos]+r,c),p[this.codingPos]0?--b:++b;o[b]<=p[this.codingPos]&&o[b]0?--b:++b;o[b]<=p[this.codingPos]&&o[b]0?--b:++b;o[b]<=p[this.codingPos]&&o[b]=64)}else do r+=t=this.getWhiteCode();while(t>=64);this.addPixels(p[this.codingPos]+r,c),c^=1}var u=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(r=this.lookBits(12),this.eoline)for(;r!==Dc&&1!==r;)this.eatBits(1),r=this.lookBits(12);else for(;0===r;)this.eatBits(1),r=this.lookBits(12);1===r?(this.eatBits(12),u=!0):r===Dc&&(this.eof=!0)}else this.eof=!0;if(!this.eof&&this.encoding>0&&(this.nextLine2D=!this.lookBits(1),this.eatBits(1)),this.eoblock&&u&&this.byteAlign){if(r=this.lookBits(12),1===r){if(this.eatBits(12),this.encoding>0&&(this.lookBits(1),this.eatBits(1)),this.encoding>=0)for(n=0;4>n;++n)r=this.lookBits(12),1!==r&&a("bad rtc code: "+r),this.eatBits(12),this.encoding>0&&(this.lookBits(1),this.eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(r=this.lookBits(13),r===Dc)return this.eof=!0,null;if(r>>1===1)break;this.eatBits(1)}this.eatBits(12),this.encoding>0&&(this.eatBits(1),this.nextLine2D=!(1&r))}p[0]>0?this.outputBits=p[this.codingPos=0]:this.outputBits=p[this.codingPos=1],this.row++}var v;if(this.outputBits>=8)v=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&p[this.codingPos]m?(v<<=m,1&this.codingPos||(v|=255>>8-m),this.outputBits-=m,m=0):(v<<=this.outputBits,1&this.codingPos||(v|=255>>8-this.outputBits),m-=this.outputBits,this.outputBits=0,p[this.codingPos]0&&(v<<=m,m=0));while(m)}return this.black&&(v^=255),v},b.prototype.findTableCode=function(a,b,c,d){for(var e=d||0,f=a;b>=f;++f){var g=this.lookBits(f);if(g===Dc)return[!0,1,!1];if(b>f&&(g<<=b-f),!e||g>=e){var h=c[g-e];if(h[0]===f)return this.eatBits(f),[!0,h[1],!0]}}return[!1,0,!1]},b.prototype.getTwoDimCode=function(){var b,c=0;if(this.eoblock){if(c=this.lookBits(7),b=m[c],b&&b[0]>0)return this.eatBits(b[0]),b[1]}else{var d=this.findTableCode(1,7,m);if(d[0]&&d[2])return d[1]}return a("Bad two dim code"),Dc},b.prototype.getWhiteCode=function(){var b,c=0;if(this.eoblock){if(c=this.lookBits(12),c===Dc)return 1;if(b=c>>5===0?n[c]:o[c>>3],b[0]>0)return this.eatBits(b[0]),b[1]}else{var d=this.findTableCode(1,9,o);if(d[0])return d[1];if(d=this.findTableCode(11,12,n),d[0])return d[1]}return a("bad white code"),this.eatBits(1),1},b.prototype.getBlackCode=function(){var b,c;if(this.eoblock){if(b=this.lookBits(13),b===Dc)return 1;if(c=b>>7===0?p[b]:b>>9===0&&b>>7!==0?q[(b>>1)-64]:r[b>>7],c[0]>0)return this.eatBits(c[0]),c[1]}else{var d=this.findTableCode(2,6,r);if(d[0])return d[1];if(d=this.findTableCode(7,12,q,64),d[0])return d[1];if(d=this.findTableCode(10,13,p), -d[0])return d[1]}return a("bad black code"),this.eatBits(1),1},b.prototype.lookBits=function(a){for(var b;this.inputBits>16-a;this.inputBuf=(this.inputBuf<<8)+b,this.inputBits+=8}return this.inputBuf>>this.inputBits-a&65535>>16-a},b.prototype.eatBits=function(a){(this.inputBits-=a)<0&&(this.inputBits=0)},b}(),$c=function(){function a(a,b,c){this.str=a,this.dict=a.dict,this.cachedData=0,this.bitsCached=0;for(var d=4096,e={earlyChange:c,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(d),dictionaryLengths:new Uint16Array(d),dictionaryPrevCodes:new Uint16Array(d),currentSequence:new Uint8Array(d),currentSequenceLength:0},f=0;256>f;++f)e.dictionaryValues[f]=f,e.dictionaryLengths[f]=1;this.lzwState=e,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBits=function(a){for(var b=this.bitsCached,c=this.cachedData;a>b;){var d=this.str.getByte();if(-1===d)return this.eof=!0,null;c=c<<8|d,b+=8}return this.bitsCached=b-=a,this.cachedData=c,this.lastCode=null,c>>>b&(1<a;a++){var t=this.readBits(m),u=p>0;if(256>t)o[0]=t,p=1;else{if(!(t>=258)){if(256===t){m=9,i=258,p=0;continue}this.eof=!0,delete this.lzwState;break}if(i>t)for(p=k[t],b=p-1,c=t;b>=0;b--)o[b]=j[c],c=l[c];else o[p++]=o[0]}if(u&&(l[i]=n,k[i]=k[n]+1,j[i]=o[0],i++,m=i+h&i+h-1?m:0|Math.min(Math.log(i+h)/.6931471805599453+1,12)),n=t,q+=p,q>e){do e+=f;while(q>e);s=this.ensureBuffer(this.bufferLength+e)}for(b=0;p>b;b++)s[r++]=o[b]}g.nextCode=i,g.codeLength=m,g.prevCode=n,g.currentSequenceLength=p,this.bufferLength=r}},a}(),_c=function(){function a(){Mc.call(this,new Uint8Array(0))}return a.prototype=Mc.prototype,a}(),ad=function(){function a(a){this.name=a,this.terminated=!1,this._capability=G()}return a.prototype={get finished(){return this._capability.promise},finish:function(){this._capability.resolve()},terminate:function(){this.terminated=!0},ensureNotTerminated:function(){if(this.terminated)throw new Error("Worker task was terminated")}},a}(),bd=PDFJS.WorkerMessageHandler={setup:function(c){function d(){if(j)throw new Error("Worker was terminated")}function e(a){l.push(a)}function f(a){a.finish();var b=l.indexOf(a);l.splice(b,1)}function g(a){var b=G(),c=function(){var a=i.ensureDoc("numPages"),c=i.ensureDoc("fingerprint"),e=i.ensureXRef("encrypt");Promise.all([a,c,e]).then(function(a){var c={numPages:a[0],fingerprint:a[1],encrypted:!!a[2]};b.resolve(c)},d)},d=function(a){b.reject(a)};return i.ensureDoc("checkHeader",[]).then(function(){i.ensureDoc("parseStartXRef",[]).then(function(){i.ensureDoc("parse",[a]).then(c,d)},d)},d),b.promise}function h(a){var d,e=G(),f=a.source,g=a.disableRange;if(f.data){try{d=new ua(f.data,f.password),e.resolve(d)}catch(h){e.reject(h)}return e.promise}if(f.chunkedViewerLoading){try{d=new va(f,c),e.resolve(d)}catch(h){e.reject(h)}return e.promise}var i=new pa(f.url,{httpHeaders:f.httpHeaders,withCredentials:f.withCredentials}),j=[],l=i.requestFull({onHeadersReceived:function(){if(!g){var a=i.getRequestXhr(l);if("bytes"===a.getResponseHeader("Accept-Ranges")){var b=a.getResponseHeader("Content-Encoding")||"identity";if("identity"===b){var h=a.getResponseHeader("Content-Length");if(h=parseInt(h,10),w(h)&&(f.length=h,!(2*sa>=h))){i.isStreamingRequest(l)?f.disableAutoFetch=!0:i.abortRequest(l);try{d=new va(f,c),e.resolve(d)}catch(j){e.reject(j)}k=null}}}}},onProgressiveData:f.disableStream?null:function(a){return d?void d.sendProgressiveData(a):void j.push(a)},onDone:function(a){if(!d){var c;if(null===a){var g=0,h=0;j.forEach(function(a){g+=a.byteLength}),f.length&&g!==f.length&&b("reported HTTP length is different from actual");var i=new Uint8Array(g);j.forEach(function(a){i.set(new Uint8Array(a),h),h+=a.byteLength}),c=i.buffer}else c=a.chunk;try{d=new ua(c,f.password),e.resolve(d)}catch(l){e.reject(l)}k=null}},onError:function(a){var b;404===a?(b=new ga('Missing PDF "'+f.url+'".'),c.send("MissingPDF",b)):(b=new ha("Unexpected server response ("+a+') while retrieving PDF "'+f.url+'".',a),c.send("UnexpectedResponse",b)),k=null},onProgress:function(a){c.send("DocProgress",{loaded:a.loaded,total:a.lengthComputable?a.total:f.length})}});return k=function(){i.abortRequest(l)},e.promise}var i,j=!1,k=null,l=[];c.on("test",function(a){if(!(a instanceof Uint8Array))return void c.send("test",!1);var b=255===a[0];c.postMessageTransfers=b;var d=new XMLHttpRequest,e="response"in d;try{d.responseType}catch(f){e=!1}return e?void c.send("test",{supportTypedArray:!0,supportTransfers:b}):void c.send("test",!1)}),c.on("GetDocRequest",function(a){var b=function(a){d(),c.send("GetDoc",{pdfInfo:a})},e=function(a){a instanceof da?a.code===ca.NEED_PASSWORD?c.send("NeedPassword",a):a.code===ca.INCORRECT_PASSWORD&&c.send("IncorrectPassword",a):a instanceof fa?c.send("InvalidPDF",a):a instanceof ga?c.send("MissingPDF",a):a instanceof ha?c.send("UnexpectedResponse",a):c.send("UnknownError",new ea(a.message,a.toString()))};d(),PDFJS.maxImageSize=void 0===a.maxImageSize?-1:a.maxImageSize,PDFJS.disableFontFace=a.disableFontFace,PDFJS.disableCreateObjectURL=a.disableCreateObjectURL,PDFJS.verbosity=a.verbosity,PDFJS.cMapUrl=void 0===a.cMapUrl?null:a.cMapUrl,PDFJS.cMapPacked=a.cMapPacked===!0,h(a).then(function(a){if(j)throw a.terminate(),new Error("Worker was terminated");i=a,c.send("PDFManagerReady",null),i.onLoadedStream().then(function(a){c.send("DataLoaded",{length:a.bytes.byteLength})})}).then(function f(){d(),g(!1).then(b,function(a){return d(),a instanceof ka?(i.requestLoadedStream(),void i.onLoadedStream().then(function(){d(),g(!0).then(b,e)})):(a instanceof da&&i.passwordChanged().then(f),void e(a))},e)},e)}),c.on("GetPage",function(a){return i.getPage(a.pageIndex).then(function(a){var b=i.ensure(a,"rotate"),c=i.ensure(a,"ref"),d=i.ensure(a,"view");return Promise.all([b,c,d]).then(function(a){return{rotate:a[0],ref:a[1],view:a[2]}})})}),c.on("GetPageIndex",function(a){var b=new Ba(a.ref.num,a.ref.gen),c=i.pdfDocument.catalog;return c.getPageIndex(b)}),c.on("GetDestinations",function(a){return i.ensureCatalog("destinations")}),c.on("GetDestination",function(a){return i.ensureCatalog("getDestination",[a.id])}),c.on("GetAttachments",function(a){return i.ensureCatalog("attachments")}),c.on("GetJavaScript",function(a){return i.ensureCatalog("javaScript")}),c.on("GetOutline",function(a){return i.ensureCatalog("documentOutline")}),c.on("GetMetadata",function(a){return Promise.all([i.ensureDoc("documentInfo"),i.ensureCatalog("metadata")])}),c.on("GetData",function(a){return i.requestLoadedStream(),i.onLoadedStream().then(function(a){return a.bytes})}),c.on("GetStats",function(a){return i.pdfDocument.xref.stats}),c.on("UpdatePassword",function(a){i.updatePassword(a)}),c.on("GetAnnotations",function(a){return i.getPage(a.pageIndex).then(function(a){return i.ensure(a,"getAnnotationsData",[])})}),c.on("RenderPageRequest",function(b){var d=b.pageIndex;i.getPage(d).then(function(g){var h=new ad("RenderPageRequest: page "+d);e(h);var i=d+1,j=Date.now();g.getOperatorList(c,h,b.intent).then(function(b){f(h),a("page="+i+" - getOperatorList: time="+(Date.now()-j)+"ms, len="+b.fnArray.length)},function(a){if(f(h),!h.terminated){var d,e="worker.js: while trying to getPage() and getOperatorList()";d="string"==typeof a?{message:a,stack:e}:"object"==typeof a?{message:a.message||a.toString(),stack:a.stack||e}:{message:"Unknown exception type: "+typeof a,stack:e},c.send("PageError",{pageNum:i,error:d,intent:b.intent})}})})},this),c.on("GetTextContent",function(b){var c=b.pageIndex;return i.getPage(c).then(function(b){var d=new ad("GetTextContent: page "+c);e(d);var g=c+1,h=Date.now();return b.extractTextContent(d).then(function(b){return f(d),a("text indexing: page="+g+" - time="+(Date.now()-h)+"ms"),b},function(a){if(f(d),!d.terminated)throw a})})}),c.on("Cleanup",function(a){return i.cleanup()}),c.on("Terminate",function(a){j=!0,i&&(i.terminate(),i=null),k&&k();var b=[];return l.forEach(function(a){b.push(a.finished),a.terminate()}),Promise.all(b).then(function(){})})}},cd={},dd={log:function(){var a=Array.prototype.slice.call(arguments);S.postMessage({action:"console_log",data:a})},error:function(){var a=Array.prototype.slice.call(arguments);throw S.postMessage({action:"console_error",data:a}),"pdf.js execution error"},time:function(a){cd[a]=Date.now()},timeEnd:function(a){var b=cd[a];b||c("Unknown timer name "+a),this.log("Timer:",a,Date.now()-b)}};if("undefined"==typeof window){"console"in S||(S.console=dd),PDFJS.UnsupportedManager.listen(function(a){S.postMessage({action:"_unsupported_feature",data:a})});var ed=new H("worker_processor",this);bd.setup(ed)}var fd=function(){function a(a,b,c){this.data=a,this.bp=b,this.dataEnd=c,this.chigh=a[b],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}var b=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];return a.prototype={byteIn:function(){var a=this.data,b=this.bp;if(255===a[b]){var c=a[b+1];c>143?(this.clow+=65280,this.ct=8):(b++,this.clow+=a[b]<<9,this.ct=7,this.bp=b)}else b++,this.clow+=b65535&&(this.chigh+=this.clow>>16,this.clow&=65535)},readBit:function(a,c){var d,e=a[c]>>1,f=1&a[c],g=b[e],h=g.qe,i=this.a-h;if(this.chighi?(i=h,d=f,e=g.nmps):(i=h,d=1^f,1===g.switchFlag&&(f=d),e=g.nlps);else{if(this.chigh-=h,0!==(32768&i))return this.a=i,f;h>i?(d=1^f,1===g.switchFlag&&(f=d),e=g.nlps):(d=f,e=g.nmps)}do 0===this.ct&&this.byteIn(),i<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--;while(0===(32768&i));return this.a=i,a[c]=e<<1|f,d}},a}(),gd=function(){function a(){}function b(a,b){for(var c,d,e=0,f=[],g=16;g>0&&!a[g-1];)g--;f.push({children:[],index:0});var h,i=f[0];for(c=0;g>c;c++){for(d=0;d0;)i=f.pop();for(i.index++,f.push(i);f.length<=c;)f.push(h={children:[],index:0}),i.children[i.index]=h.children,i=h;e++}g>c+1&&(f.push(h={children:[],index:0}),i.children[i.index]=h.children,i=h)}return f[0].children}function c(a,b,c){return 64*((a.blocksPerLine+1)*b+c)}function d(a,b,d,e,f,g,i,j,k){function l(){if(H>0)return H--,G>>H&1;if(G=a[b++],255===G){var c=a[b++];if(c)throw"unexpected marker: "+(G<<8|c).toString(16)}return H=7,G>>>7}function m(a){for(var b=a;;){if(b=b[l()],"number"==typeof b)return b;if("object"!=typeof b)throw"invalid huffman sequence"}}function n(a){for(var b=0;a>0;)b=b<<1|l(),a--;return b}function o(a){if(1===a)return 1===l()?1:-1;var b=n(a);return b>=1<e;){var f=m(a.huffmanTableAC),g=15&f,i=f>>4;if(0!==g){e+=i;var j=h[e];a.blockData[b+j]=o(g),e++}else{if(15>i)break;e+=16}}}function q(a,b){var c=m(a.huffmanTableDC),d=0===c?0:o(c)<0)return void I--;for(var c=g,d=i;d>=c;){var e=m(a.huffmanTableAC),f=15&e,j=e>>4;if(0!==f){c+=j;var l=h[c];a.blockData[b+l]=o(f)*(1<j){I=n(j)+(1<=e;){var p=h[e];switch(J){case 0:if(d=m(a.huffmanTableAC),c=15&d,j=d>>4,0===c)15>j?(I=n(j)+(1<N;){for(y=0;K>y;y++)e[y].pred=0;if(I=0,1===K)for(x=e[0],B=0;f>B;B++)v(x,C,N),N++;else for(B=0;f>B;B++){for(y=0;K>y;y++)for(x=e[y],O=x.h,P=x.v,z=0;P>z;z++)for(A=0;O>A;A++)u(x,C,N,z,A);N++}if(H=0,L=a[b]<<8|a[b+1],65280>=L)throw"marker was not found";if(!(L>=65488&&65495>=L))break;b+=2}return b-F}function e(a,b,c){for(var d,e,f,g,h,q,r,s,t,u,v,w,x,y,z,A,B,C=a.quantizationTable,D=a.blockData,E=0;64>E;E+=8)t=D[b+E],u=D[b+E+1],v=D[b+E+2],w=D[b+E+3],x=D[b+E+4],y=D[b+E+5],z=D[b+E+6],A=D[b+E+7],t*=C[E],0!==(u|v|w|x|y|z|A)?(u*=C[E+1],v*=C[E+2],w*=C[E+3],x*=C[E+4],y*=C[E+5],z*=C[E+6],A*=C[E+7],d=o*t+128>>8,e=o*x+128>>8,f=v,g=z,h=p*(u-A)+128>>8,s=p*(u+A)+128>>8,q=w<<4,r=y<<4,d=d+e+1>>1,e=d-e,B=f*n+g*m+128>>8,f=f*m-g*n+128>>8,g=B,h=h+r+1>>1,r=h-r,s=s+q+1>>1,q=s-q,d=d+g+1>>1,g=d-g,e=e+f+1>>1,f=e-f,B=h*l+s*k+2048>>12,h=h*k-s*l+2048>>12,s=B,B=q*j+r*i+2048>>12,q=q*i-r*j+2048>>12,r=B,c[E]=d+s,c[E+7]=d-s,c[E+1]=e+r,c[E+6]=e-r,c[E+2]=f+q,c[E+5]=f-q,c[E+3]=g+h,c[E+4]=g-h):(B=o*t+512>>10,c[E]=B,c[E+1]=B,c[E+2]=B,c[E+3]=B,c[E+4]=B,c[E+5]=B,c[E+6]=B,c[E+7]=B);for(var F=0;8>F;++F)t=c[F],u=c[F+8],v=c[F+16],w=c[F+24],x=c[F+32],y=c[F+40],z=c[F+48],A=c[F+56],0!==(u|v|w|x|y|z|A)?(d=o*t+2048>>12,e=o*x+2048>>12,f=v,g=z,h=p*(u-A)+2048>>12,s=p*(u+A)+2048>>12,q=w,r=y,d=(d+e+1>>1)+4112,e=d-e,B=f*n+g*m+2048>>12,f=f*m-g*n+2048>>12,g=B,h=h+r+1>>1,r=h-r,s=s+q+1>>1,q=s-q,d=d+g+1>>1,g=d-g,e=e+f+1>>1,f=e-f,B=h*l+s*k+2048>>12,h=h*k-s*l+2048>>12,s=B,B=q*j+r*i+2048>>12,q=q*i-r*j+2048>>12,r=B,t=d+s,A=d-s,u=e+r,z=e-r,v=f+q,y=f-q,w=g+h,x=g-h,t=16>t?0:t>=4080?255:t>>4,u=16>u?0:u>=4080?255:u>>4,v=16>v?0:v>=4080?255:v>>4,w=16>w?0:w>=4080?255:w>>4,x=16>x?0:x>=4080?255:x>>4,y=16>y?0:y>=4080?255:y>>4,z=16>z?0:z>=4080?255:z>>4,A=16>A?0:A>=4080?255:A>>4,D[b+F]=t,D[b+F+8]=u,D[b+F+16]=v,D[b+F+24]=w,D[b+F+32]=x,D[b+F+40]=y,D[b+F+48]=z,D[b+F+56]=A):(B=o*t+8192>>14,B=-2040>B?0:B>=2024?255:B+2056>>4,D[b+F]=B,D[b+F+8]=B,D[b+F+16]=B,D[b+F+24]=B,D[b+F+32]=B,D[b+F+40]=B,D[b+F+48]=B,D[b+F+56]=B)}function f(a,b){for(var d=b.blocksPerLine,f=b.blocksPerColumn,g=new Int16Array(64),h=0;f>h;h++)for(var i=0;d>i;i++){var j=c(b,h,i);e(b,j,g)}return b.blockData}function g(a){return 0>=a?0:a>=255?255:a}var h=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),i=4017,j=799,k=3406,l=2276,m=1567,n=3784,o=5793,p=2896;return a.prototype={parse:function(a){function c(){var b=a[k]<<8|a[k+1];return k+=2,b}function e(){var b=c(),d=a.subarray(k,k+b-2);return k+=d.length,d}function g(a){for(var b=Math.ceil(a.samplesPerLine/8/a.maxH),c=Math.ceil(a.scanLines/8/a.maxV),d=0;dk;){var y=a[k++],z=new Uint16Array(64);if(y>>4===0)for(s=0;64>s;s++)v=h[s],z[v]=a[k++];else{if(y>>4!==1)throw"DQT: invalid table spec";for(s=0;64>s;s++)v=h[s],z[v]=c()}n[15&y]=z}break;case 65472:case 65473:case 65474:if(i)throw"Only single frame JPEGs supported";c(),i={},i.extended=65473===q,i.progressive=65474===q,i.precision=a[k++],i.scanLines=c(),i.samplesPerLine=c(),i.components=[],i.componentIds={};var A,B=a[k++],C=0,D=0;for(r=0;B>r;r++){A=a[k];var E=a[k+1]>>4,F=15&a[k+1];E>C&&(C=E),F>D&&(D=F);var G=a[k+2];t=i.components.push({h:E,v:F,quantizationTable:n[G]}),i.componentIds[A]=t-1,k+=3}i.maxH=C,i.maxV=D,g(i);break;case 65476:var H=c();for(r=2;H>r;){var I=a[k++],J=new Uint8Array(16),K=0;for(s=0;16>s;s++,k++)K+=J[s]=a[k];var L=new Uint8Array(K);for(s=0;K>s;s++,k++)L[s]=a[k];r+=17+K,(I>>4===0?p:o)[15&I]=b(J,L)}break;case 65501:c(),j=c();break;case 65498:var M,N=(c(),a[k++]),O=[];for(r=0;N>r;r++){var P=i.componentIds[a[k++]];M=i.components[P];var Q=a[k++];M.huffmanTableDC=p[Q>>4],M.huffmanTableAC=o[15&Q],O.push(M)}var R=a[k++],S=a[k++],T=a[k++],U=d(a,k,i,O,j,R,S,T>>4,15&T);k+=U;break;case 65535:255!==a[k]&&k--;break;default:if(255===a[k-3]&&a[k-2]>=192&&a[k-2]<=254){k-=3;break}throw"unknown JPEG marker "+q.toString(16)}q=c()}for(this.width=i.samplesPerLine,this.height=i.scanLines,this.jfif=l,this.adobe=m,this.components=[],r=0;ri;i++){for(c=this.components[i],d=c.scaleX*n,e=c.scaleY*o,p=i,m=c.output,f=c.blocksPerLine+1<<3,g=0;a>g;g++)j=0|g*d,t[g]=(j&u)<<3|7&j;for(h=0;b>h;h++)for(j=0|h*e,l=f*(j&u)|(7&j)<<3,g=0;a>g;g++)s[p]=m[l+t[g]],p+=q}var v=this.decodeTransform;if(v)for(i=0;r>i;)for(j=0,k=0;q>j;j++,i++,k+=2)s[i]=(s[i]*v[k]>>8)+v[k+1];return s},_isColorConversionNeeded:function(){return this.adobe&&this.adobe.transformCode?!0:3===this.numComponents?!0:!1},_convertYccToRgb:function(a){for(var b,c,d,e=0,f=a.length;f>e;e+=3)b=a[e],c=a[e+1],d=a[e+2],a[e]=g(b-179.456+1.402*d),a[e+1]=g(b+135.459-.344*c-.714*d),a[e+2]=g(b-226.816+1.772*c);return a},_convertYcckToRgb:function(a){for(var b,c,d,e,f=0,h=0,i=a.length;i>h;h+=4){b=a[h],c=a[h+1],d=a[h+2],e=a[h+3];var j=-122.67195406894+c*(-660635669420364e-19*c+.000437130475926232*d-54080610064599e-18*b+.00048449797120281*e-.154362151871126)+d*(-.000957964378445773*d+.000817076911346625*b-.00477271405408747*e+1.53380253221734)+b*(.000961250184130688*b-.00266257332283933*e+.48357088451265)+e*(-.000336197177618394*e+.484791561490776),k=107.268039397724+c*(219927104525741e-19*c-.000640992018297945*d+.000659397001245577*b+.000426105652938837*e-.176491792462875)+d*(-.000778269941513683*d+.00130872261408275*b+.000770482631801132*e-.151051492775562)+b*(.00126935368114843*b-.00265090189010898*e+.25802910206845)+e*(-.000318913117588328*e-.213742400323665),l=-20.810012546947+c*(-.000570115196973677*c-263409051004589e-19*d+.0020741088115012*b-.00288260236853442*e+.814272968359295)+d*(-153496057440975e-19*d-.000132689043961446*b+.000560833691242812*e-.195152027534049)+b*(.00174418132927582*b-.00255243321439347*e+.116935020465145)+e*(-.000343531996510555*e+.24165260232407);a[f++]=g(j),a[f++]=g(k),a[f++]=g(l)}return a},_convertYcckToCmyk:function(a){for(var b,c,d,e=0,f=a.length;f>e;e+=4)b=a[e],c=a[e+1],d=a[e+2],a[e]=g(434.456-b-1.402*d),a[e+1]=g(119.541-b+.344*c+.714*d),a[e+2]=g(481.816-b-1.772*c);return a},_convertCmykToRgb:function(a){for(var b,c,d,e,f=0,g=-16581375,h=1/255/255,i=0,j=a.length;j>i;i+=4){b=a[i],c=a[i+1],d=a[i+2],e=a[i+3];var k=b*(-4.387332384609988*b+54.48615194189176*c+18.82290502165302*d+212.25662451639585*e-72734.4411664936)+c*(1.7149763477362134*c-5.6096736904047315*d-17.873870861415444*e-1401.7366389350734)+d*(-2.5217340131683033*d-21.248923337353073*e+4465.541406466231)-e*(21.86122147463605*e+48317.86113160301),l=b*(8.841041422036149*b+60.118027045597366*c+6.871425592049007*d+31.159100130055922*e-20220.756542821975)+c*(-15.310361306967817*c+17.575251261109482*d+131.35250912493976*e-48691.05921601825)+d*(4.444339102852739*d+9.8632861493405*e-6341.191035517494)-e*(20.737325471181034*e+47890.15695978492),m=b*(.8842522430003296*b+8.078677503112928*c+30.89978309703729*d-.23883238689178934*e-3616.812083916688)+c*(10.49593273432072*c+63.02378494754052*d+50.606957656360734*e-28620.90484698408)+d*(.03296041114873217*d+115.60384449646641*e-49363.43385999684)-e*(22.33816807309886*e+45932.16563550634);a[f++]=k>=0?255:g>=k?0:255+k*h|0,a[f++]=l>=0?255:g>=l?0:255+l*h|0,a[f++]=m>=0?255:g>=m?0:255+m*h|0}return a},getData:function(a,b,c){if(this.numComponents>4)throw"Unsupported color mode";var d=this._getLinearizedBlockData(a,b);if(3===this.numComponents)return this._convertYccToRgb(d);if(4===this.numComponents){if(this._isColorConversionNeeded())return c?this._convertYcckToRgb(d):this._convertYcckToCmyk(d);if(c)return this._convertCmykToRgb(d)}return d}},a}(),hd=function(){function c(){this.failOnCorruptedImage=!1}function d(a,b){a.x0=Math.ceil(b.XOsiz/a.XRsiz),a.x1=Math.ceil(b.Xsiz/a.XRsiz),a.y0=Math.ceil(b.YOsiz/a.YRsiz),a.y1=Math.ceil(b.Ysiz/a.YRsiz),a.width=a.x1-a.x0,a.height=a.y1-a.y0}function e(a,b){for(var c,d=a.SIZ,e=[],f=Math.ceil((d.Xsiz-d.XTOsiz)/d.XTsiz),g=Math.ceil((d.Ysiz-d.YTOsiz)/d.YTsiz),h=0;g>h;h++)for(var i=0;f>i;i++)c={},c.tx0=Math.max(d.XTOsiz+i*d.XTsiz,d.XOsiz),c.ty0=Math.max(d.YTOsiz+h*d.YTsiz,d.YOsiz),c.tx1=Math.min(d.XTOsiz+(i+1)*d.XTsiz,d.Xsiz),c.ty1=Math.min(d.YTOsiz+(h+1)*d.YTsiz,d.Ysiz),c.width=c.tx1-c.tx0,c.height=c.ty1-c.ty0,c.components=[],e.push(c);a.tiles=e;for(var j=d.Csiz,k=0,l=j;l>k;k++)for(var m=b[k],n=0,o=e.length;o>n;n++){var p={};c=e[n],p.tcx0=Math.ceil(c.tx0/m.XRsiz),p.tcy0=Math.ceil(c.ty0/m.YRsiz),p.tcx1=Math.ceil(c.tx1/m.XRsiz),p.tcy1=Math.ceil(c.ty1/m.YRsiz),p.width=p.tcx1-p.tcx0,p.height=p.tcy1-p.tcy0,c.components[k]=p}}function f(a,b,c){var d=b.codingStyleParameters,e={};return d.entropyCoderWithCustomPrecincts?(e.PPx=d.precinctsSizes[c].PPx,e.PPy=d.precinctsSizes[c].PPy):(e.PPx=15,e.PPy=15),e.xcb_=c>0?Math.min(d.xcb,e.PPx-1):Math.min(d.xcb,e.PPx),e.ycb_=c>0?Math.min(d.ycb,e.PPy-1):Math.min(d.ycb,e.PPy),e}function g(a,b,c){var d=1<b.trx0?Math.ceil(b.trx1/d)-Math.floor(b.trx0/d):0,j=b.try1>b.try0?Math.ceil(b.try1/e)-Math.floor(b.try0/e):0,k=i*j;b.precinctParameters={precinctWidth:d,precinctHeight:e,numprecinctswide:i,numprecinctshigh:j,numprecincts:k,precinctWidthInSubband:g,precinctHeightInSubband:h}}function h(a,b,c){var d,e,f,g,h=c.xcb_,i=c.ycb_,j=1<>h,m=b.tby0>>i,n=b.tbx1+j-1>>h,o=b.tby1+k-1>>i,p=b.resolution.precinctParameters,q=[],r=[];for(e=m;o>e;e++)for(d=l;n>d;d++){f={cbx:d,cby:e,tbx0:j*d,tby0:k*e,tbx1:j*(d+1),tby1:k*(e+1)},f.tbx0_=Math.max(b.tbx0,f.tbx0),f.tby0_=Math.max(b.tby0,f.tby0),f.tbx1_=Math.min(b.tbx1,f.tbx1),f.tby1_=Math.min(b.tby1,f.tby1);var s=Math.floor((f.tbx0_-b.tbx0)/p.precinctWidthInSubband),t=Math.floor((f.tby0_-b.tby0)/p.precinctHeightInSubband);if(g=s+t*p.numprecinctswide,f.precinctNumber=g,f.subbandType=b.type,f.Lblock=3,!(f.tbx1_<=f.tbx0_||f.tby1_<=f.tby0_)){q.push(f);var u=r[g];void 0!==u?(du.cbxMax&&(u.cbxMax=d),eu.cbyMax&&(u.cbyMax=e)):r[g]=u={cbxMin:d,cbyMin:e,cbxMax:d,cbyMax:e},f.precinct=u}}b.codeblockParameters={codeblockWidth:h,codeblockHeight:i,numcodeblockwide:n-l+1,numcodeblockhigh:o-m+1},b.codeblocks=q,b.precincts=r}function i(a,b,c){for(var d=[],e=a.subbands,f=0,g=e.length;g>f;f++)for(var h=e[f],i=h.codeblocks,j=0,k=i.length;k>j;j++){var l=i[j];l.precinctNumber===b&&d.push(l)}return{layerNumber:c,codeblocks:d}}function j(a){for(var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=0,h=0;f>h;h++)g=Math.max(g,d.components[h].codingStyleParameters.decompositionLevelsCount);var j=0,k=0,l=0,m=0;this.nextPacket=function(){for(;e>j;j++){for(;g>=k;k++){for(;f>l;l++){var a=d.components[l];if(!(k>a.codingStyleParameters.decompositionLevelsCount)){for(var b=a.resolutions[k],c=b.precinctParameters.numprecincts;c>m;){var h=i(b,m,j);return m++,h}m=0}}l=0}k=0}throw new Error("JPX Error: Out of packets")}}function k(a){for(var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=0,h=0;f>h;h++)g=Math.max(g,d.components[h].codingStyleParameters.decompositionLevelsCount);var j=0,k=0,l=0,m=0;this.nextPacket=function(){for(;g>=j;j++){for(;e>k;k++){for(;f>l;l++){var a=d.components[l];if(!(j>a.codingStyleParameters.decompositionLevelsCount)){for(var b=a.resolutions[j],c=b.precinctParameters.numprecincts;c>m;){var h=i(b,m,k);return m++,h}m=0}}l=0}k=0}throw new Error("JPX Error: Out of packets")}}function m(a){var b,c,d,e,f=a.SIZ,g=a.currentTile.index,h=a.tiles[g],j=h.codingStyleDefaultParameters.layersCount,k=f.Csiz,l=0;for(d=0;k>d;d++){var m=h.components[d];l=Math.max(l,m.codingStyleParameters.decompositionLevelsCount)}var n=new Int32Array(l+1);for(c=0;l>=c;++c){var o=0;for(d=0;k>d;++d){var p=h.components[d].resolutions;c=c;c++){for(;ed;d++){var a=h.components[d];if(!(c>a.codingStyleParameters.decompositionLevelsCount)){var f=a.resolutions[c],g=f.precinctParameters.numprecincts;if(!(e>=g)){for(;j>b;){var m=i(f,e,b);return b++,m}b=0}}}d=0}e=0}throw new Error("JPX Error: Out of packets")}}function p(a){var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=s(d),h=g,j=0,k=0,l=0,m=0,n=0;this.nextPacket=function(){for(;nl;l++){for(var a=d.components[l],b=a.codingStyleParameters.decompositionLevelsCount;b>=k;k++){var c=a.resolutions[k],o=g.components[l].resolutions[k],p=r(m,n,o,h,c);if(null!==p){for(;e>j;){var q=i(c,p,j);return j++,q}j=0}}k=0}l=0}m=0}throw new Error("JPX Error: Out of packets")}}function q(a){var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=s(d),h=0,j=0,k=0,l=0,m=0;this.nextPacket=function(){for(;f>k;++k){for(var a=d.components[k],b=g.components[k],c=a.codingStyleParameters.decompositionLevelsCount;m=j;j++){var n=a.resolutions[j],o=b.resolutions[j],p=r(l,m,o,b,n);if(null!==p){for(;e>h;){var q=i(n,p,h);return h++,q}h=0}}j=0}l=0}m=0}throw new Error("JPX Error: Out of packets")}}function r(a,b,c,d,e){var f=a*d.minWidth,g=b*d.minHeight;if(f%c.width!==0||g%c.height!==0)return null;var h=g/c.width*e.precinctParameters.numprecinctswide;return f/c.height+h}function s(a){for(var b=a.components.length,c=Number.MAX_VALUE,d=Number.MAX_VALUE,e=0,f=0,g=new Array(b),h=0;b>h;h++){for(var i=a.components[h],j=i.codingStyleParameters.decompositionLevelsCount,k=new Array(j+1),l=Number.MAX_VALUE,m=Number.MAX_VALUE,n=0,o=0,p=1,q=j;q>=0;--q){var r=i.resolutions[q],s=p*r.precinctParameters.precinctWidth,t=p*r.precinctParameters.precinctHeight;l=Math.min(l,s),m=Math.min(m,t),n=Math.max(n,r.precinctParameters.numprecinctswide),o=Math.max(o,r.precinctParameters.numprecinctshigh),k[q]={width:s,height:t},p<<=1}c=Math.min(c,l),d=Math.min(d,m),e=Math.max(e,n),f=Math.max(f,o),g[h]={resolutions:k,minWidth:l,minHeight:m,maxNumWide:n,maxNumHigh:o}}return{components:g,minWidth:c,minHeight:d,maxNumWide:e,maxNumHigh:f}}function t(a){for(var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=b.Csiz,i=0;e>i;i++){for(var l=d.components[i],n=l.codingStyleParameters.decompositionLevelsCount,o=[],r=[],s=0;n>=s;s++){var t=f(a,l,s),u={},v=1<m;){var d=b[c+k];k++,n?(j=j<<7|d,m+=7,n=!1):(j=j<<8|d,m+=8),255===d&&(n=!0)}return m-=a,j>>>m&(1<a?a+3:(a=e(5),31>a?a+6:(a=e(7),a+37))}for(var j,k=0,m=0,n=!1,o=a.currentTile.index,p=a.tiles[o],q=a.COD.sopMarkerUsed,r=a.COD.ephMarkerUsed,s=p.packetsIterator;d>k;){h(),q&&f(145)&&g(4);var t=s.nextPacket();if(e(1)){for(var u,v=t.layerNumber,w=[],x=0,y=t.codeblocks.length;y>x;x++){u=t.codeblocks[x];var z,C=u.precinct,D=u.cbx-C.cbxMin,E=u.cby-C.cbyMin,F=!1,G=!1;if(void 0!==u.included)F=!!e(1);else{C=u.precinct;var H,I;if(void 0!==C.inclusionTree)H=C.inclusionTree;else{var J=C.cbxMax-C.cbxMin+1,K=C.cbyMax-C.cbyMin+1; -H=new B(J,K,v),I=new A(J,K),C.inclusionTree=H,C.zeroBitPlanesTree=I}if(H.reset(D,E,v))for(;;){if(!e(1)){H.incrementValue(v);break}if(z=!H.nextLevel()){u.included=!0,F=G=!0;break}}}if(F){if(G){for(I=C.zeroBitPlanesTree,I.reset(D,E);;)if(e(1)){if(z=!I.nextLevel())break}else I.incrementValue();u.zeroBitPlanes=I.value}for(var L=i();e(1);)u.Lblock++;var M=l(L),N=(1<L?M-1:M)+u.Lblock,O=e(N);w.push({codeblock:u,codingpasses:L,dataLength:O})}}for(h(),r&&f(146);w.length>0;){var P=w.shift();u=P.codeblock,void 0===u.data&&(u.data=[]),u.data.push({data:b,start:c+k,end:c+k+P.dataLength,codingpasses:P.codingpasses}),k+=P.dataLength}}}return k}function v(a,b,c,d,e,f,g,h){for(var i=d.tbx0,j=d.tby0,k=d.tbx1-d.tbx0,l=d.codeblocks,m="H"===d.type.charAt(0)?1:0,n="H"===d.type.charAt(1)?b:0,o=0,p=l.length;p>o;++o){var q=l[o],r=q.tbx1_-q.tbx0_,s=q.tby1_-q.tby0_;if(0!==r&&0!==s&&void 0!==q.data){var t,u;t=new C(r,s,q.subbandType,q.zeroBitPlanes,f),u=2;var v,w,x,y=q.data,z=0,A=0;for(v=0,w=y.length;w>v;v++)x=y[v],z+=x.end-x.start,A+=x.codingpasses;var B=new Uint8Array(z),D=0;for(v=0,w=y.length;w>v;v++){x=y[v];var E=x.data.subarray(x.start,x.end);B.set(E,D),D+=E.length}var F=new fd(B,0,z);for(t.setDecoder(F),v=0;A>v;v++){switch(u){case 0:t.runSignificancePropogationPass();break;case 1:t.runMagnitudeRefinementPass();break;case 2:t.runCleanupPass(),h&&t.checkSegmentationSymbol()}u=(u+1)%3}var G,H,I,J=q.tbx0_-i+(q.tby0_-j)*k,K=t.coefficentsSign,L=t.coefficentsMagnitude,M=t.bitsDecoded,N=g?0:.5;D=0;var O="LL"!==d.type;for(v=0;s>v;v++){var P=J/k|0,Q=2*P*(b-k)+m+n;for(G=0;r>G;G++){if(H=L[D],0!==H){H=(H+N)*e,0!==K[D]&&(H=-H),I=M[D];var R=O?Q+(J<<1):J;g&&I>=f?a[R]=H:a[R]=H*(1<=q;q++){for(var r=d.resolutions[q],s=r.trx1-r.trx0,t=r.try1-r.try0,u=new Float32Array(s*t),w=0,x=r.subbands.length;x>w;w++){var y,A;i?(y=h[p].mu,A=h[p].epsilon,p++):(y=h[0].mu,A=h[0].epsilon+(q>0?1-q:0));var B=r.subbands[w],C=z[B.type],D=m?1:Math.pow(2,l+C-A)*(1+y/2048),G=j+A-1;v(u,s,t,B,D,G,m,k)}o.push({width:s,height:t,items:u})}var H=n.calculate(o,d.tcx0,d.tcy0);return{left:d.tcx0,top:d.tcy0,width:H.width,height:H.height,items:H.items}}function x(a){for(var b=a.SIZ,c=a.components,d=b.Csiz,e=[],f=0,g=a.tiles.length;g>f;f++){var h,i=a.tiles[f],j=[];for(h=0;d>h;h++)j[h]=w(a,i,h);var k,l,m,n,o,p,q,r,s,t,u,v,x,y,z,A=j[0],B=new Uint8Array(A.items.length*d),C={left:A.left,top:A.top,width:A.width,height:A.height,items:B},D=0;if(i.codingStyleDefaultParameters.multipleComponentTransform){var E=4===d,F=j[0].items,G=j[1].items,H=j[2].items,I=E?j[3].items:null;k=c[0].precision-8,l=(128<p;p++,D+=K)r=F[p]+l,s=G[p],t=H[p],v=r-(t+s>>2),u=v+t,x=v+s,B[D++]=0>=u?0:u>=m?255:u>>k,B[D++]=0>=v?0:v>=m?255:v>>k,B[D++]=0>=x?0:x>=m?255:x>>k;else for(p=0;q>p;p++,D+=K)r=F[p]+l,s=G[p],t=H[p],u=r+1.402*t,v=r-.34413*s-.71414*t,x=r+1.772*s,B[D++]=0>=u?0:u>=m?255:u>>k,B[D++]=0>=v?0:v>=m?255:v>>k,B[D++]=0>=x?0:x>=m?255:x>>k;if(E)for(p=0,D=3;q>p;p++,D+=4)y=I[p],B[D]=n>=y?0:y>=o?255:y+l>>k}else for(h=0;d>h;h++){var L=j[h].items;for(k=c[h].precision-8,l=(128<p;p++)z=L[p],B[D]=n>=z?0:z>=m?255:z+l>>k,D+=d}e.push(C)}return e}function y(a,b){for(var c=a.SIZ,d=c.Csiz,e=a.tiles[b],f=0;d>f;f++){var g=e.components[f],h=void 0!==a.currentTile.QCC[f]?a.currentTile.QCC[f]:a.currentTile.QCD;g.quantizationParameters=h;var i=void 0!==a.currentTile.COC[f]?a.currentTile.COC[f]:a.currentTile.COD;g.codingStyleParameters=i}e.codingStyleDefaultParameters=a.currentTile.COD}var z={LL:0,LH:1,HL:1,HH:2};c.prototype={parse:function(c){var d=n(c,0);if(65359===d)return void this.parseCodestream(c,0,c.length);for(var e=0,f=c.length;f>e;){var g=8,h=o(c,e),i=o(c,e+4);if(e+=g,1===h&&(h=4294967296*o(c,e)+o(c,e+4),e+=8,g+=8),0===h&&(h=f-e+g),g>h)throw new Error("JPX Error: Invalid box field size");var j=h-g,k=!0;switch(i){case 1785737832:k=!1;break;case 1668246642:var l=c[e];c[e+1],c[e+2];if(1===l){var m=o(c,e+3);switch(m){case 16:case 17:case 18:break;default:b("Unknown colorspace "+m)}}else 2===l&&a("ICC profile not supported");break;case 1785737827:this.parseCodestream(c,e,e+j);break;case 1783636e3:218793738!==o(c,e)&&b("Invalid JP2 signature");break;case 1783634458:case 1718909296:case 1920099697:case 1919251232:case 1768449138:break;default:var p=String.fromCharCode(i>>24&255,i>>16&255,i>>8&255,255&i);b("Unsupported header type "+i+" ("+p+")")}k&&(e+=j)}},parseImageProperties:function(a){for(var b=a.getByte();b>=0;){var c=b;b=a.getByte();var d=c<<8|b;if(65361===d){a.skip(4);var e=a.getInt32()>>>0,f=a.getInt32()>>>0,g=a.getInt32()>>>0,h=a.getInt32()>>>0;a.skip(16);var i=a.getUint16();return this.width=e-g,this.height=f-h,this.componentsCount=i,void(this.bitsPerComponent=8)}}throw new Error("JPX Error: No size marker found in JPX stream")},parseCodestream:function(a,c,f){var g={};try{for(var h=!1,i=c;f>i+1;){var j=n(a,i);i+=2;var k,l,m,p,q,r,s=0;switch(j){case 65359:g.mainHeader=!0;break;case 65497:break;case 65361:s=n(a,i);var v={};v.Xsiz=o(a,i+4),v.Ysiz=o(a,i+8),v.XOsiz=o(a,i+12),v.YOsiz=o(a,i+16),v.XTsiz=o(a,i+20),v.YTsiz=o(a,i+24),v.XTOsiz=o(a,i+28),v.YTOsiz=o(a,i+32);var w=n(a,i+36);v.Csiz=w;var z=[];k=i+38;for(var A=0;w>A;A++){var B={precision:(127&a[k])+1,isSigned:!!(128&a[k]),XRsiz:a[k+1],YRsiz:a[k+1]};d(B,v),z.push(B)}g.SIZ=v,g.components=z,e(g,z),g.QCC=[],g.COC=[];break;case 65372:s=n(a,i);var C={};switch(k=i+2,l=a[k++],31&l){case 0:p=8,q=!0;break;case 1:p=16,q=!1;break;case 2:p=16,q=!0;break;default:throw new Error("JPX Error: Invalid SQcd value "+l)}for(C.noQuantization=8===p,C.scalarExpounded=q,C.guardBits=l>>5,m=[];s+i>k;){var D={};8===p?(D.epsilon=a[k++]>>3,D.mu=0):(D.epsilon=a[k]>>3,D.mu=(7&a[k])<<8|a[k+1],k+=2),m.push(D)}C.SPqcds=m,g.mainHeader?g.QCD=C:(g.currentTile.QCD=C,g.currentTile.QCC=[]);break;case 65373:s=n(a,i);var E={};k=i+2;var F;switch(g.SIZ.Csiz<257?F=a[k++]:(F=n(a,k),k+=2),l=a[k++],31&l){case 0:p=8,q=!0;break;case 1:p=16,q=!1;break;case 2:p=16,q=!0;break;default:throw new Error("JPX Error: Invalid SQcd value "+l)}for(E.noQuantization=8===p,E.scalarExpounded=q,E.guardBits=l>>5,m=[];s+i>k;)D={},8===p?(D.epsilon=a[k++]>>3,D.mu=0):(D.epsilon=a[k]>>3,D.mu=(7&a[k])<<8|a[k+1],k+=2),m.push(D);E.SPqcds=m,g.mainHeader?g.QCC[F]=E:g.currentTile.QCC[F]=E;break;case 65362:s=n(a,i);var G={};k=i+2;var H=a[k++];G.entropyCoderWithCustomPrecincts=!!(1&H),G.sopMarkerUsed=!!(2&H),G.ephMarkerUsed=!!(4&H),G.progressionOrder=a[k++],G.layersCount=n(a,k),k+=2,G.multipleComponentTransform=a[k++],G.decompositionLevelsCount=a[k++],G.xcb=(15&a[k++])+2,G.ycb=(15&a[k++])+2;var I=a[k++];if(G.selectiveArithmeticCodingBypass=!!(1&I),G.resetContextProbabilities=!!(2&I),G.terminationOnEachCodingPass=!!(4&I),G.verticalyStripe=!!(8&I),G.predictableTermination=!!(16&I),G.segmentationSymbolUsed=!!(32&I),G.reversibleTransformation=a[k++],G.entropyCoderWithCustomPrecincts){for(var J=[];s+i>k;){var K=a[k++];J.push({PPx:15&K,PPy:K>>4})}G.precinctsSizes=J}var L=[];if(G.selectiveArithmeticCodingBypass&&L.push("selectiveArithmeticCodingBypass"),G.resetContextProbabilities&&L.push("resetContextProbabilities"),G.terminationOnEachCodingPass&&L.push("terminationOnEachCodingPass"),G.verticalyStripe&&L.push("verticalyStripe"),G.predictableTermination&&L.push("predictableTermination"),L.length>0)throw h=!0,new Error("JPX Error: Unsupported COD options ("+L.join(", ")+")");g.mainHeader?g.COD=G:(g.currentTile.COD=G,g.currentTile.COC=[]);break;case 65424:s=n(a,i),r={},r.index=n(a,i+2),r.length=o(a,i+4),r.dataEnd=r.length+i-2,r.partIndex=a[i+8],r.partsCount=a[i+9],g.mainHeader=!1,0===r.partIndex&&(r.COD=g.COD,r.COC=g.COC.slice(0),r.QCD=g.QCD,r.QCC=g.QCC.slice(0)),g.currentTile=r;break;case 65427:r=g.currentTile,0===r.partIndex&&(y(g,r.index),t(g)),s=r.dataEnd-i,u(g,a,i,s);break;case 65365:case 65367:case 65368:case 65380:s=n(a,i);break;case 65363:throw new Error("JPX Error: Codestream code 0xFF53 (COC) is not implemented");default:throw new Error("JPX Error: Unknown codestream code: "+j.toString(16))}i+=s}}catch(M){if(h||this.failOnCorruptedImage)throw M;b("Trying to recover from "+M.message)}this.tiles=x(g),this.width=g.SIZ.Xsiz-g.SIZ.XOsiz,this.height=g.SIZ.Ysiz-g.SIZ.YOsiz,this.componentsCount=g.SIZ.Csiz}};var A=function(){function a(a,b){var c=l(Math.max(a,b))+1;this.levels=[];for(var d=0;c>d;d++){var e={width:a,height:b,items:[]};this.levels.push(e),a=Math.ceil(a/2),b=Math.ceil(b/2)}}return a.prototype={reset:function(a,b){for(var c,d=0,e=0;d>=1,b>>=1,d++}d--,c=this.levels[d],c.items[c.index]=e,this.currentLevel=d,delete this.value},incrementValue:function(){var a=this.levels[this.currentLevel];a.items[a.index]++},nextLevel:function(){var a=this.currentLevel,b=this.levels[a],c=b.items[b.index];return a--,0>a?(this.value=c,!1):(this.currentLevel=a,b=this.levels[a],b.items[b.index]=c,!0)}},a}(),B=function(){function a(a,b,c){var d=l(Math.max(a,b))+1;this.levels=[];for(var e=0;d>e;e++){for(var f=new Uint8Array(a*b),g=0,h=f.length;h>g;g++)f[g]=c;var i={width:a,height:b,items:f};this.levels.push(i),a=Math.ceil(a/2),b=Math.ceil(b/2)}}return a.prototype={reset:function(a,b,c){for(var d=0;dc)return this.currentLevel=d,this.propagateValues(),!1;a>>=1,b>>=1,d++}return this.currentLevel=d-1,!0},incrementValue:function(a){var b=this.levels[this.currentLevel];b.items[b.index]=a+1,this.propagateValues()},propagateValues:function(){for(var a=this.currentLevel,b=this.levels[a],c=b.items[b.index];--a>=0;)b=this.levels[a],b.items[b.index]=c},nextLevel:function(){var a=this.currentLevel,b=this.levels[a],c=b.items[b.index];return b.items[b.index]=255,a--,0>a?!1:(this.currentLevel=a,b=this.levels[a],b.items[b.index]=c,!0)}},a}(),C=function(){function a(a,b,c,g,h){this.width=a,this.height=b,this.contextLabelTable="HH"===c?f:"HL"===c?e:d;var i=a*b;this.neighborsSignificance=new Uint8Array(i),this.coefficentsSign=new Uint8Array(i),this.coefficentsMagnitude=h>14?new Uint32Array(i):h>6?new Uint16Array(i):new Uint8Array(i),this.processingFlags=new Uint8Array(i);var j=new Uint8Array(i);if(0!==g)for(var k=0;i>k;k++)j[k]=g;this.bitsDecoded=j,this.reset()}var b=17,c=18,d=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),e=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),f=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);return a.prototype={setDecoder:function(a){this.decoder=a},reset:function(){this.contexts=new Int8Array(19),this.contexts[0]=8,this.contexts[b]=92,this.contexts[c]=6},setNeighborsSignificance:function(a,b,c){var d,e=this.neighborsSignificance,f=this.width,g=this.height,h=b>0,i=f>b+1;a>0&&(d=c-f,h&&(e[d-1]+=16),i&&(e[d+1]+=16),e[d]+=4),g>a+1&&(d=c+f,h&&(e[d-1]+=16),i&&(e[d+1]+=16),e[d]+=4),h&&(e[c-1]+=1),i&&(e[c+1]+=1),e[c]|=128},runSignificancePropogationPass:function(){for(var a=this.decoder,b=this.width,c=this.height,d=this.coefficentsMagnitude,e=this.coefficentsSign,f=this.neighborsSignificance,g=this.processingFlags,h=this.contexts,i=this.contextLabelTable,j=this.bitsDecoded,k=-2,l=1,m=2,n=0;c>n;n+=4)for(var o=0;b>o;o++)for(var p=n*b+o,q=0;4>q;q++,p+=b){var r=n+q;if(r>=c)break;if(g[p]&=k,!d[p]&&f[p]){var s=i[f[p]],t=a.readBit(h,s);if(t){var u=this.decodeSignBit(r,o,p);e[p]=u,d[p]=1,this.setNeighborsSignificance(r,o,p),g[p]|=m}j[p]++,g[p]|=l}}},decodeSignBit:function(a,b,c){var d,e,f,g,h,i,j=this.width,k=this.height,l=this.coefficentsMagnitude,m=this.coefficentsSign;g=b>0&&0!==l[c-1],j>b+1&&0!==l[c+1]?(f=m[c+1],g?(e=m[c-1],d=1-f-e):d=1-f-f):g?(e=m[c-1],d=1-e-e):d=0;var n=3*d;return g=a>0&&0!==l[c-j],k>a+1&&0!==l[c+j]?(f=m[c+j],g?(e=m[c-j],d=1-f-e+n):d=1-f-f+n):g?(e=m[c-j],d=1-e-e+n):d=n,d>=0?(h=9+d,i=this.decoder.readBit(this.contexts,h)):(h=9-d,i=1^this.decoder.readBit(this.contexts,h)),i},runMagnitudeRefinementPass:function(){for(var a,b=this.decoder,c=this.width,d=this.height,e=this.coefficentsMagnitude,f=this.neighborsSignificance,g=this.contexts,h=this.bitsDecoded,i=this.processingFlags,j=1,k=2,l=c*d,m=4*c,n=0;l>n;n=a){a=Math.min(l,n+m);for(var o=0;c>o;o++)for(var p=n+o;a>p;p+=c)if(e[p]&&0===(i[p]&j)){var q=16;if(0!==(i[p]&k)){i[p]^=k;var r=127&f[p];q=0===r?15:14}var s=b.readBit(g,q);e[p]=e[p]<<1|s,h[p]++,i[p]|=j}}},runCleanupPass:function(){for(var a,d=this.decoder,e=this.width,f=this.height,g=this.neighborsSignificance,h=this.coefficentsMagnitude,i=this.coefficentsSign,j=this.contexts,k=this.contextLabelTable,l=this.bitsDecoded,m=this.processingFlags,n=1,o=2,p=e,q=2*e,r=3*e,s=0;f>s;s=a){a=Math.min(s+4,f);for(var t=s*e,u=f>s+3,v=0;e>v;v++){var w,x=t+v,y=u&&0===m[x]&&0===m[x+p]&&0===m[x+q]&&0===m[x+r]&&0===g[x]&&0===g[x+p]&&0===g[x+q]&&0===g[x+r],z=0,A=x,B=s;if(y){var C=d.readBit(j,c);if(!C){l[x]++,l[x+p]++,l[x+q]++,l[x+r]++;continue}z=d.readBit(j,b)<<1|d.readBit(j,b),0!==z&&(B=s+z,A+=z*e),w=this.decodeSignBit(B,v,A),i[A]=w,h[A]=1,this.setNeighborsSignificance(B,v,A),m[A]|=o,A=x;for(var D=s;B>=D;D++,A+=e)l[A]++;z++}for(B=s+z;a>B;B++,A+=e)if(!h[A]&&0===(m[A]&n)){var E=k[g[A]],F=d.readBit(j,E);1===F&&(w=this.decodeSignBit(B,v,A),i[A]=w,h[A]=1,this.setNeighborsSignificance(B,v,A),m[A]|=o),l[A]++}}}},checkSegmentationSymbol:function(){var a=this.decoder,c=this.contexts,d=a.readBit(c,b)<<3|a.readBit(c,b)<<2|a.readBit(c,b)<<1|a.readBit(c,b);if(10!==d)throw new Error("JPX Error: Invalid segmentation symbol")}},a}(),D=function(){function a(){}return a.prototype.calculate=function(a,b,c){for(var d=a[0],e=1,f=a.length;f>e;e++)d=this.iterate(d,a[e],b,c);return d},a.prototype.extend=function(a,b,c){var d=b-1,e=b+1,f=b+c-2,g=b+c;a[d--]=a[e++],a[g++]=a[f--],a[d--]=a[e++],a[g++]=a[f--],a[d--]=a[e++],a[g++]=a[f--],a[d]=a[e],a[g]=a[f]},a.prototype.iterate=function(a,b,c,d){var e,f,g,h,i,j,k=a.width,l=a.height,m=a.items,n=b.width,o=b.height,p=b.items;for(g=0,e=0;l>e;e++)for(h=2*e*n,f=0;k>f;f++,g++,h+=2)p[h]=m[g];m=a.items=null;var q=4,r=new Float32Array(n+2*q);if(1===n){if(0!==(1&c))for(j=0,g=0;o>j;j++,g+=n)p[g]*=.5}else for(j=0,g=0;o>j;j++,g+=n)r.set(p.subarray(g,g+n),q),this.extend(r,q,n),this.filter(r,q,n),p.set(r.subarray(q,q+n),g);var s=16,t=[];for(e=0;s>e;e++)t.push(new Float32Array(o+2*q));var u,v=0;if(a=q+o,1===o){if(0!==(1&d))for(i=0;n>i;i++)p[i]*=.5}else for(i=0;n>i;i++){if(0===v){for(s=Math.min(n-i,s),g=i,h=q;a>h;g+=n,h++)for(u=0;s>u;u++)t[u][h]=p[g+u];v=s}v--;var w=t[v];if(this.extend(w,q,o),this.filter(w,q,o),0===v)for(g=i-s+1,h=q;a>h;g+=n,h++)for(u=0;s>u;u++)p[g+u]=t[u][h]}return{width:n,height:o,items:p}},a}(),E=function(){function a(){D.call(this)}return a.prototype=Object.create(D.prototype),a.prototype.filter=function(a,b,c){var d=c>>1;b=0|b;var e,f,g,h,i=-1.586134342059924,j=-.052980118572961,k=.882911075530934,l=.443506852043971,m=1.230174104914001,n=1/m;for(e=b-3,f=d+4;f--;e+=2)a[e]*=n;for(e=b-2,g=l*a[e-1],f=d+3;f--&&(h=l*a[e+1],a[e]=m*a[e]-g-h,f--);e+=2)e+=2,g=l*a[e+1],a[e]=m*a[e]-g-h;for(e=b-1,g=k*a[e-1],f=d+2;f--&&(h=k*a[e+1],a[e]-=g+h,f--);e+=2)e+=2,g=k*a[e+1],a[e]-=g+h;for(e=b,g=j*a[e-1],f=d+1;f--&&(h=j*a[e+1],a[e]-=g+h,f--);e+=2)e+=2,g=j*a[e+1],a[e]-=g+h;if(0!==d)for(e=b+1,g=i*a[e-1],f=d;f--&&(h=i*a[e+1],a[e]-=g+h,f--);e+=2)e+=2,g=i*a[e+1],a[e]-=g+h},a}(),F=function(){function a(){D.call(this)}return a.prototype=Object.create(D.prototype),a.prototype.filter=function(a,b,c){var d=c>>1;b=0|b;var e,f;for(e=b,f=d+1;f--;e+=2)a[e]-=a[e-1]+a[e+1]+2>>2;for(e=b+1,f=d;f--;e+=2)a[e]+=a[e-1]+a[e+1]>>1},a}();return c}(),id=function(){function a(){}function b(a,b,c){this.data=a,this.start=b,this.end=c}function d(a,b,c){function d(a){for(var b=0,d=0;a>d;d++){var g=c.readBit(e,f);f=256>f?f<<1|g:511&(f<<1|g)|256,b=b<<1|g}return b>>>0}var e=a.getContexts(b),f=1,g=d(1),h=d(1)?d(1)?d(1)?d(1)?d(1)?d(32)+4436:d(12)+340:d(8)+84:d(6)+20:d(4)+4:d(2);return 0===g?h:h>0?-h:null}function e(a,b,c){for(var d=a.getContexts("IAID"),e=1,f=0;c>f;f++){var g=b.readBit(d,e);e=e<<1|g}return 31>c?e&(1<e;e++)for(h=m[e]=new Uint8Array(a),i=1>e?h:m[e-1],j=2>e?h:m[e-2],d=j[0]<<13|j[1]<<12|j[2]<<11|i[0]<<7|i[1]<<6|i[2]<<5|i[3]<<4,f=0;a>f;f++)h[f]=g=k.readBit(l,d),d=(d&n)<<1|(a>f+3?j[f+3]<<11:0)|(a>f+4?i[f+4]<<4:0)|g;return m}function h(a,b,d,e,g,h,i,j){if(a&&c("JBIG2 error: MMR encoding is not supported"),0===e&&!h&&!g&&4===i.length&&3===i[0].x&&-1===i[0].y&&-3===i[1].x&&-1===i[1].y&&2===i[2].x&&-2===i[2].y&&-2===i[3].x&&-2===i[3].y)return f(b,d,j);var k=!!h,l=y[e].concat(i);l.sort(function(a,b){return a.y-b.y||a.x-b.x});var m,n,o=l.length,p=new Int8Array(o),q=new Int8Array(o),r=[],s=0,t=0,u=0,v=0;for(n=0;o>n;n++)p[n]=l[n].x,q[n]=l[n].y,t=Math.min(t,l[n].x),u=Math.max(u,l[n].x),v=Math.min(v,l[n].y),o-1>n&&l[n].y===l[n+1].y&&l[n].x===l[n+1].x-1?s|=1<m;m++)n=r[m],x[m]=l[n].x,z[m]=l[n].y,B[m]=1<R;R++){if(g){var S=N.readBit(O,K);if(P^=S){M.push(L);continue}}for(L=new Uint8Array(L),M.push(L),C=0;b>C;C++)if(k&&h[R][C])L[C]=0;else{if(C>=H&&J>C&&R>=I)for(Q=Q<<1&s,n=0;w>n;n++)D=R+z[n],E=C+x[n],F=M[D][E],F&&(F=B[n],Q|=F);else for(Q=0,G=o-1,n=0;o>n;n++,G--)E=C+p[n],E>=0&&b>E&&(D=R+q[n],D>=0&&(F=M[D][E],F&&(Q|=F<l;l++)n[l]=k[l].x,o[l]=k[l].y;var p=z[d].reference;0===d&&(p=p.concat([i[1]]));var q=p.length,r=new Int32Array(q),s=new Int32Array(q);for(l=0;q>l;l++)r[l]=p[l].x,s[l]=p[l].y;for(var t=e[0].length,u=e.length,v=B[d],w=[],x=j.decoder,y=j.contextCache.getContexts("GR"),A=0,C=0;b>C;C++){if(h){var D=x.readBit(y,v);A^=D,A&&c("JBIG2 error: prediction is not supported")}var E=new Uint8Array(a);w.push(E);for(var F=0;a>F;F++){var G,H,I=0;for(l=0;m>l;l++)G=C+o[l],H=F+n[l],0>G||0>H||H>=a?I<<=1:I=I<<1|w[G][H];for(l=0;q>l;l++)G=C+s[l]+g,H=F+r[l]+f,0>G||G>=u||0>H||H>=t?I<<=1:I=I<<1|e[G][H];var J=x.readBit(y,I);E[F]=J}}return w}function j(a,b,f,g,j,m,n,o,p,q,r){a&&c("JBIG2 error: huffman is not supported");for(var s=[],t=0,u=l(f.length+g),v=r.decoder,w=r.contextCache;s.length1)B=k(a,b,y,t,0,C,1,f.concat(s),u,0,0,1,0,m,p,q,r);else{var D=e(w,v,u),E=d(w,"IARDX",v),F=d(w,"IARDY",v),G=DM;M++)I[M]&&H.push(f[M]);for(var O=0;g>O;M++,O++)I[M]&&H.push(s[O]);return H}function k(a,b,f,g,h,j,k,l,m,n,o,p,q,r,s,t,u){a&&c("JBIG2 error: huffman is not supported");var v,w,x=[];for(v=0;g>v;v++){if(w=new Uint8Array(f),h)for(var y=0;f>y;y++)w[y]=h;x.push(w)}var z=u.decoder,A=u.contextCache,B=-d(A,"IADT",z),C=0;for(v=0;j>v;){var D=d(A,"IADT",z);B+=D;var E=d(A,"IAFS",z);C+=E;for(var F=C;;){var G=1===k?0:d(A,"IAIT",z),H=k*B+G,I=e(A,z,m),J=b&&d(A,"IARI",z),K=l[I],L=K[0].length,M=K.length;if(J){var N=d(A,"IARDW",z),O=d(A,"IARDH",z),P=d(A,"IARDX",z),Q=d(A,"IARDY",z);L+=N,M+=O,K=i(L,M,s,K,(N>>1)+P,(O>>1)+Q,!1,t,u)}var R,S,T,U=H-(1&p?0:M),V=F-(2&p?L:0);if(n){for(R=0;M>R;R++)if(w=x[V+R]){T=K[R];var W=Math.min(f-U,L);switch(q){case 0:for(S=0;W>S;S++)w[U+S]|=T[S];break;case 2:for(S=0;W>S;S++)w[U+S]^=T[S];break;default:c("JBIG2 error: operator "+q+" is not supported")}}F+=M-1}else{for(S=0;M>S;S++)if(w=x[U+S])switch(T=K[S],q){case 0:for(R=0;L>R;R++)w[V+R]|=T[R];break;case 2:for(R=0;L>R;R++)w[V+R]^=T[R];break;default:c("JBIG2 error: operator "+q+" is not supported")}F+=L-1}v++;var X=d(A,"IADS",z);if(null===X)break;F+=X+o}}return x}function p(a,b){var d={};d.number=o(a,b);var e=a[b+4],f=63&e;x[f]||c("JBIG2 error: invalid segment type: "+f),d.type=f,d.typeName=x[f],d.deferredNonRetain=!!(128&e);var g=!!(64&e),h=a[b+5],i=h>>5&7,j=[31&h],k=b+6;if(7===h){i=536870911&o(a,k-1),k+=3;var l=i+7>>3;for(j[0]=a[k++];--l>0;)j.push(a[k++])}else(5===h||6===h)&&c("JBIG2 error: invalid referred-to flags");d.retainBits=j;var m,p,q=d.number<=256?1:d.number<=65536?2:4,s=[];for(m=0;i>m;m++){var t=1===q?a[k]:2===q?n(a,k):o(a,k);s.push(t),k+=q}if(d.referredTo=s,g?(d.pageAssociation=o(a,k),k+=4):d.pageAssociation=a[k++],d.length=o(a,k),k+=4,4294967295===d.length)if(38===f){var u=r(a,k),v=a[k+C],w=!!(1&v),y=6,z=new Uint8Array(y);for(w||(z[0]=255,z[1]=172),z[2]=u.height>>>24&255,z[3]=u.height>>16&255,z[4]=u.height>>8&255,z[5]=255&u.height,m=k,p=a.length;p>m;m++){for(var A=0;y>A&&z[A]===a[m+A];)A++;if(A===y){d.length=m+y;break}}4294967295===d.length&&c("JBIG2 error: segment end was not found")}else c("JBIG2 error: invalid unknown segment length");return d.headerEnd=k,d}function q(a,b,c,d){for(var e=[],f=c;d>f;){var g=p(b,f);f=g.headerEnd;var h={header:g,data:b};if(a.randomAccess||(h.start=f,f+=g.length,h.end=f),e.push(h),51===g.type)break}if(a.randomAccess)for(var i=0,j=e.length;j>i;i++)e[i].start=f,f+=e[i].header.length,e[i].end=f;return e}function r(a,b){return{width:o(a,b),height:o(a,b+4),x:o(a,b+8),y:o(a,b+12),combinationOperator:7&a[b+16]}}function s(a,b){var d,e,f,g,h=a.header,i=a.data,j=a.start,k=a.end;switch(h.type){case 0:var l={},p=n(i,j);if(l.huffman=!!(1&p),l.refinement=!!(2&p),l.huffmanDHSelector=p>>2&3,l.huffmanDWSelector=p>>4&3,l.bitmapSizeSelector=p>>6&1,l.aggregationInstancesSelector=p>>7&1,l.bitmapCodingContextUsed=!!(256&p),l.bitmapCodingContextRetained=!!(512&p),l.template=p>>10&3,l.refinementTemplate=p>>12&1,j+=2,!l.huffman){for(g=0===l.template?4:1,e=[],f=0;g>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;l.at=e}if(l.refinement&&!l.refinementTemplate){for(e=[],f=0;2>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;l.refinementAt=e}l.numberOfExportedSymbols=o(i,j),j+=4,l.numberOfNewSymbols=o(i,j),j+=4,d=[l,h.number,h.referredTo,i,j,k];break;case 6:case 7:var q={};q.info=r(i,j),j+=C;var s=n(i,j);if(j+=2,q.huffman=!!(1&s),q.refinement=!!(2&s),q.stripSize=1<<(s>>2&3),q.referenceCorner=s>>4&3,q.transposed=!!(64&s),q.combinationOperator=s>>7&3,q.defaultPixelValue=s>>9&1,q.dsOffset=s<<17>>27,q.refinementTemplate=s>>15&1,q.huffman){var t=n(i,j);j+=2,q.huffmanFS=3&t,q.huffmanDS=t>>2&3,q.huffmanDT=t>>4&3,q.huffmanRefinementDW=t>>6&3,q.huffmanRefinementDH=t>>8&3,q.huffmanRefinementDX=t>>10&3,q.huffmanRefinementDY=t>>12&3,q.huffmanRefinementSizeSelector=!!(14&t)}if(q.refinement&&!q.refinementTemplate){for(e=[],f=0;2>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;q.refinementAt=e}q.numberOfSymbolInstances=o(i,j),j+=4,q.huffman&&c("JBIG2 error: huffman is not supported"),d=[q,h.referredTo,i,j,k];break;case 38:case 39:var u={};u.info=r(i,j),j+=C;var v=i[j++];if(u.mmr=!!(1&v),u.template=v>>1&3,u.prediction=!!(8&v),!u.mmr){for(g=0===u.template?4:1,e=[],f=0;g>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;u.at=e}d=[u,i,j,k];break;case 48:var w={width:o(i,j),height:o(i,j+4),resolutionX:o(i,j+8),resolutionY:o(i,j+12)};4294967295===w.height&&delete w.height;var x=i[j+16];n(i,j+17);w.lossless=!!(1&x),w.refinement=!!(2&x),w.defaultPixelValue=x>>2&1,w.combinationOperator=x>>3&3,w.requiresBuffer=!!(32&x),w.combinationOperatorOverride=!!(64&x),d=[w];break;case 49:break;case 50:break;case 51:break;case 62:break;default:c("JBIG2 error: segment type "+h.typeName+"("+h.type+") is not implemented")}var y="on"+h.typeName;y in b&&b[y].apply(b,d)}function t(a,b){for(var c=0,d=a.length;d>c;c++)s(a[c],b)}function u(a){for(var b=new v,c=0,d=a.length;d>c;c++){var e=a[c],f=q({},e.data,e.start,e.end);t(f,b)}return b.buffer}function v(){}function w(){}a.prototype={getContexts:function(a){return a in this?this[a]:this[a]=new Int8Array(65536)}},b.prototype={get decoder(){var a=new fd(this.data,this.start,this.end);return g(this,"decoder",a)},get contextCache(){var b=new a;return g(this,"contextCache",b)}};var x=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"patternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],y=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],z=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],A=[39717,1941,229,405],B=[32,8],C=17;return v.prototype={onPageInformation:function(a){this.currentPageInfo=a;var b=a.width+7>>3,c=new Uint8Array(b*a.height);if(a.defaultPixelValue)for(var d=0,e=c.length;e>d;d++)c[d]=255;this.buffer=c},drawBitmap:function(a,b){var d,e,f,g,h=this.currentPageInfo,i=a.width,j=a.height,k=h.width+7>>3,l=h.combinationOperatorOverride?a.combinationOperator:h.combinationOperator,m=this.buffer,n=128>>(7&a.x),o=a.y*k+(a.x>>3);switch(l){case 0:for(d=0;j>d;d++){for(f=n,g=o,e=0;i>e;e++)b[d][e]&&(m[g]|=f),f>>=1,f||(f=128,g++);o+=k}break;case 2:for(d=0;j>d;d++){for(f=n,g=o,e=0;i>e;e++)b[d][e]&&(m[g]^=f),f>>=1,f||(f=128,g++);o+=k}break;default:c("JBIG2 error: operator "+l+" is not supported")}},onImmediateGenericRegion:function(a,c,d,e){var f=a.info,g=new b(c,d,e),i=h(a.mmr,f.width,f.height,a.template,a.prediction,null,a.at,g);this.drawBitmap(f,i)},onImmediateLosslessGenericRegion:function(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function(a,d,e,f,g,h){var i;a.huffman&&c("JBIG2 error: huffman is not supported");var k=this.symbols;k||(this.symbols=k={});for(var l=[],m=0,n=e.length;n>m;m++)l=l.concat(k[e[m]]);var o=new b(f,g,h);k[d]=j(a.huffman,a.refinement,l,a.numberOfNewSymbols,a.numberOfExportedSymbols,i,a.template,a.at,a.refinementTemplate,a.refinementAt,o)},onImmediateTextRegion:function(a,c,d,e,f){for(var g,h=a.info,i=this.symbols,j=[],m=0,n=c.length;n>m;m++)j=j.concat(i[c[m]]);var o=l(j.length),p=new b(d,e,f),q=k(a.huffman,a.refinement,h.width,h.height,a.defaultPixelValue,a.numberOfSymbolInstances,a.stripSize,j,o,a.transposed,a.dsOffset,a.referenceCorner,a.combinationOperator,g,a.refinementTemplate,a.refinementAt,p);this.drawBitmap(h,q)},onImmediateLosslessTextRegion:function(){this.onImmediateTextRegion.apply(this,arguments)}},w.prototype={parseChunks:function(a){return u(a)}},w}(),jd=(PDFJS.bidi=function(){function a(a){return 0!==(1&a)}function b(a){return 0===(1&a)}function c(a,b,c){for(var d=b,e=a.length;e>d;++d)if(a[d]!==c)return d;return d}function d(a,b,c,d){for(var e=b;c>e;++e)a[e]=d}function e(a,b,c){for(var d=b,e=c-1;e>d;++d,--e){var f=a[d];a[d]=a[e],a[e]=f}}function f(a,b,c){return{str:a,dir:c?"ttb":b?"ltr":"rtl"}}function g(g,l,m){var n=!0,o=g.length;if(0===o||m)return f(g,n,m);j.length=o,k.length=o;var p,q,r=0;for(p=0;o>p;++p){j[p]=g.charAt(p);var s=g.charCodeAt(p),t="L";255>=s?t=h[s]:s>=1424&&1524>=s?t="R":s>=1536&&1791>=s?t=i[255&s]:s>=1792&&2220>=s&&(t="AL"),("R"===t||"AL"===t||"AN"===t)&&r++,k[p]=t}if(0===r)return n=!0,f(g,n);-1===l&&(.3>o/r?(n=!0,l=0):(n=!1,l=1));var u=[];for(p=0;o>p;++p)u[p]=l;var v=a(l)?"R":"L",w=v,x=w,y=w;for(p=0;o>p;++p)"NSM"===k[p]?k[p]=y:y=k[p];y=w;var z;for(p=0;o>p;++p)z=k[p],"EN"===z?k[p]="AL"===y?"AN":"EN":("R"===z||"L"===z||"AL"===z)&&(y=z);for(p=0;o>p;++p)z=k[p],"AL"===z&&(k[p]="R");for(p=1;o-1>p;++p)"ES"===k[p]&&"EN"===k[p-1]&&"EN"===k[p+1]&&(k[p]="EN"),"CS"!==k[p]||"EN"!==k[p-1]&&"AN"!==k[p-1]||k[p+1]!==k[p-1]||(k[p]=k[p-1]);for(p=0;o>p;++p)if("EN"===k[p]){var A;for(A=p-1;A>=0&&"ET"===k[A];--A)k[A]="EN";for(A=p+1;o>A&&"ET"===k[A];--A)k[A]="EN"}for(p=0;o>p;++p)z=k[p],("WS"===z||"ES"===z||"ET"===z||"CS"===z)&&(k[p]="ON");for(y=w,p=0;o>p;++p)z=k[p],"EN"===z?k[p]="L"===y?"L":"EN":("R"===z||"L"===z)&&(y=z);for(p=0;o>p;++p)if("ON"===k[p]){var B=c(k,p+1,"ON"),C=w;p>0&&(C=k[p-1]);var D=x;o>B+1&&(D=k[B+1]),"L"!==C&&(C="R"),"L"!==D&&(D="R"),C===D&&d(k,p,B,C),p=B-1}for(p=0;o>p;++p)"ON"===k[p]&&(k[p]=v);for(p=0;o>p;++p)z=k[p],b(u[p])?"R"===z?u[p]+=1:("AN"===z||"EN"===z)&&(u[p]+=2):("L"===z||"AN"===z||"EN"===z)&&(u[p]+=1);var E,F=-1,G=99;for(p=0,q=u.length;q>p;++p)E=u[p],E>F&&(F=E),G>E&&a(E)&&(G=E);for(E=F;E>=G;--E){var H=-1;for(p=0,q=u.length;q>p;++p)u[p]=0&&(e(j,H,p),H=-1):0>H&&(H=p);H>=0&&e(j,H,u.length)}for(p=0,q=j.length;q>p;++p){var I=j[p];("<"===I||">"===I)&&(j[p]="")}return f(j.join(""),n)}var h=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ON","CS","ON","CS","ON","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ON","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","ON","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],i=["AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL"],j=[],k=[]; -return g}(),function(a){function b(a){var b=3285377520;this.h1=a?4294967295&a:b,this.h2=a?4294967295&a:b}var c=4294901760,d=65535,e=!1;try{new Uint32Array(new Uint8Array(5).buffer,0,1)}catch(f){e=!0}return b.prototype={update:function(a){var b,f=e;if("string"==typeof a){var g=new Uint8Array(2*a.length),h=0;for(b=0;b=i?g[h++]=i:(g[h++]=i>>>8,g[h++]=255&i)}}else if(a instanceof Uint8Array)g=a,h=g.length;else{if(!("object"==typeof a&&"length"in a))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");g=a,h=g.length,f=!0}var j=h>>2,k=h-4*j,l=f?new la(g,j):new Uint32Array(g.buffer,0,j),m=0,n=0,o=this.h1,p=this.h2,q=3432918353,r=461845907,s=q&d,t=r&d;for(b=0;j>b;b++)1&b?(m=l[b],m=m*q&c|m*s&d,m=m<<15|m>>>17,m=m*r&c|m*t&d,o^=m,o=o<<13|o>>>19,o=5*o+3864292196):(n=l[b],n=n*q&c|n*s&d,n=n<<15|n>>>17,n=n*r&c|n*t&d,p^=n,p=p<<13|p>>>19,p=5*p+3864292196);switch(m=0,k){case 3:m^=g[4*j+2]<<16;case 2:m^=g[4*j+1]<<8;case 1:m^=g[4*j],m=m*q&c|m*s&d,m=m<<15|m>>>17,m=m*r&c|m*t&d,1&j?o^=m:p^=m}return this.h1=o,this.h2=p,this},hexdigest:function(){var a=this.h1,b=this.h2;a^=b>>>1,a=3981806797*a&c|36045*a&d,b=4283543511*b&c|(2950163797*(b<<16|a>>>16)&c)>>>16,a^=b>>>1,a=444984403*a&c|60499*a&d,b=3301882366*b&c|(3120437893*(b<<16|a>>>16)&c)>>>16,a^=b>>>1;for(var e=0,f=[a,b],g="";e>>0).toString(16);h.length<8;)h="0"+h;g+=h}return g}},b}())}.call("undefined"==typeof window?this:window),PDFJS.workerSrc||"undefined"==typeof document||(PDFJS.workerSrc=function(){"use strict";var a=document.body||document.getElementsByTagName("head")[0],b=a.lastChild.src;return b&&b.replace(/\.js$/i,".worker.js")}()),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;hc;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('
    ');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('
  • '),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")});var f=e.filter("[aria-selected=true]");f.length>0?f.first().trigger("mouseenter"):e.first().trigger("mouseenter")})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&d.setClasses()}),b.on("unselect",function(){b.isOpen()&&d.setClasses()}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-d.$results.scrollTop()+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html(''),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('
      '),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('
    • ×
    • ');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e0||0===c.length)){var d=a('×');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ç ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ç¢":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","ï¼¢":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","ï¼£":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","È»":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","ï¼¥":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ç´":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ä ":"G","Ǧ":"G","Ä¢":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","â±µ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","Ä°":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Ä®":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ä´":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ä¿":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ä»":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","â±¢":"L","â± ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","ï¼­":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","â±®":"M","Ɯ":"M","Ⓝ":"N","ï¼®":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","È ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","È®":"O","È°":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Æ ":"O","Ờ":"O","Ớ":"O","á» ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Æ¢":"OI","Ꝏ":"OO","È¢":"OU","Ⓟ":"P","ï¼°":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","â±£":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","ï¼±":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","ï¼²":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","ï¼³":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","á¹ ":"S","Å ":"S","Ṧ":"S","á¹¢":"S","Ṩ":"S","Ș":"S","Ş":"S","â±¾":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","ï¼´":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Å¢":"T","á¹°":"T","á¹®":"T","Ŧ":"T","Ƭ":"T","Æ®":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","ï¼µ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Å®":"U","Å°":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","á»®":"U","Ử":"U","á»°":"U","Ụ":"U","á¹²":"U","Ų":"U","Ṷ":"U","á¹´":"U","Ʉ":"U","Ⓥ":"V","V":"V","á¹¼":"V","á¹¾":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","ï¼·":"W","Ẁ":"W","Ẃ":"W","Å´":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","â±²":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","ï¼¹":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","á»´":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Å»":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","Ç¡":"a","ä":"a","ǟ":"a","ả":"a","Ã¥":"a","Ç»":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","â±¥":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","Ç£":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","È©":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","Ä¡":"g","ǧ":"g","Ä£":"g","Ç¥":"g","É ":"g","ꞡ":"g","áµ¹":"g","ꝿ":"g","ⓗ":"h","h":"h","Ä¥":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","É¥":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","Ä©":"i","Ä«":"i","Ä­":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","Ç°":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","Ç©":"k","ḳ":"k","Ä·":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","Å¿":"l","ł":"l","ƚ":"l","É«":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","È­":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","È«":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","Æ¡":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","Ç«":"o","Ç­":"o","ø":"o","Ç¿":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","Æ£":"oi","È£":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","Æ¥":"p","áµ½":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","á¹¥":"s","ŝ":"s","ṡ":"s","Å¡":"s","ṧ":"s","á¹£":"s","ṩ":"s","ș":"s","ş":"s","È¿":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","Å¥":"t","á¹­":"t","ț":"t","Å£":"t","á¹±":"t","ṯ":"t","ŧ":"t","Æ­":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","Å©":"u","á¹¹":"u","Å«":"u","á¹»":"u","Å­":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","Æ°":"u","ừ":"u","ứ":"u","ữ":"u","á»­":"u","á»±":"u","ụ":"u","á¹³":"u","ų":"u","á¹·":"u","á¹µ":"u","ʉ":"u","ⓥ":"v","v":"v","á¹½":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","â±³":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","Å·":"y","ỹ":"y","ȳ":"y","ẏ":"y", -"ÿ":"y","á»·":"y","ẙ":"y","ỵ":"y","Æ´":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","È¥":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Î¥","Ϋ":"Î¥","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},l,j),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");if(void 0!==f&&(this.createTag=f),b.call(this,c,d),a.isArray(e))for(var g=0;g0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('
    • '),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a(""),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=(this.$container.position(),this.$container.offset());f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.topf.bottom+h.height,l={left:f.left,top:g.bottom};if("static"!==this.$dropdownParent[0].style.position){var m=this.$dropdownParent.offset();l.top-=m.top,l.left-=m.left}c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this._sync=c.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",b._sync,!1)},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a(''); -return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d;return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2.");var e=Array.prototype.slice.call(arguments,1);d=c[b].apply(c,e)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c}),angular.module("sprintf",[]).filter("sprintf",function(){return function(){return sprintf.apply(null,arguments)}}).filter("fmt",["$filter",function(a){return a("sprintf")}]).filter("vsprintf",function(){return function(a,b){return vsprintf(a,b)}}).filter("vfmt",["$filter",function(a){return a("vsprintf")}]),function(a,b){"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a():b.rangy=a()}(function(){function a(a,b){var c=typeof a[b];return c==u||!(c!=t||!a[b])||"unknown"==c}function b(a,b){return!(typeof a[b]!=t||!a[b])}function c(a,b){return typeof a[b]!=v}function d(a){return function(b,c){for(var d=c.length;d--;)if(!a(b,c[d]))return!1;return!0}}function e(a){return a&&A(a,z)&&C(a,y)}function f(a){return b(a,"body")?a.body:a.getElementsByTagName("body")[0]}function g(b){typeof console!=v&&a(console,"log")&&console.log(b)}function h(a,b){F&&b?alert(a):g(a)}function i(a){H.initialized=!0,H.supported=!1,h("Rangy is not supported in this environment. Reason: "+a,H.config.alertOnFail)}function j(a){h("Rangy warning: "+a,H.config.alertOnWarn)}function k(a){return a.message||a.description||String(a)}function l(){if(F&&!H.initialized){var b,c=!1,d=!1;a(document,"createRange")&&(b=document.createRange(),A(b,x)&&C(b,w)&&(c=!0));var h=f(document);if(!h||"body"!=h.nodeName.toLowerCase())return void i("No body element found");if(h&&a(h,"createTextRange")&&(b=h.createTextRange(),e(b)&&(d=!0)),!c&&!d)return void i("Neither Range nor TextRange are available");H.initialized=!0,H.features={implementsDomRange:c,implementsTextRange:d};var j,l;for(var m in E)(j=E[m])instanceof p&&j.init(j,H);for(var n=0,o=K.length;o>n;++n)try{K[n](H)}catch(q){l="Rangy init listener threw an exception. Continuing. Detail: "+k(q),g(l)}}}function m(a,b,c){c&&(a+=" in module "+c.name),H.warn("DEPRECATED: "+a+" is deprecated. Please use "+b+" instead.")}function n(a,b,c,d){a[b]=function(){return m(b,c,d),a[c].apply(a,G.toArray(arguments))}}function o(a){a=a||window,l();for(var b=0,c=L.length;c>b;++b)L[b](a)}function p(a,b,c){this.name=a,this.dependencies=b,this.initialized=!1,this.supported=!1,this.initializer=c}function q(a,b,c){var d=new p(a,b,function(b){if(!b.initialized){b.initialized=!0;try{c(H,b),b.supported=!0}catch(d){var e="Module '"+a+"' failed to load: "+k(d);g(e),d.stack&&g(d.stack)}}});return E[a]=d,d}function r(){}function s(){}var t="object",u="function",v="undefined",w=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],x=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],y=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],z=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],A=d(a),B=d(b),C=d(c),D=[].forEach?function(a,b){a.forEach(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)b(a[c],c)},E={},F=typeof window!=v&&typeof document!=v,G={isHostMethod:a,isHostObject:b,isHostProperty:c,areHostMethods:A,areHostObjects:B,areHostProperties:C,isTextRange:e,getBody:f,forEach:D},H={version:"1.3.0",initialized:!1,isBrowser:F,supported:!0,util:G,features:{},modules:E,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==v?!0:rangyAutoInitialize}};H.fail=i,H.warn=j;var I;({}).hasOwnProperty?(G.extend=I=function(a,b,c){var d,e;for(var f in b)b.hasOwnProperty(f)&&(d=a[f],e=b[f],c&&null!==d&&"object"==typeof d&&null!==e&&"object"==typeof e&&I(d,e,!0),a[f]=e);return b.hasOwnProperty("toString")&&(a.toString=b.toString),a},G.createOptions=function(a,b){var c={};return I(c,b),a&&I(c,a),c}):i("hasOwnProperty not supported"),F||i("Rangy can only run in a browser"),function(){var a;if(F){var b=document.createElement("div");b.appendChild(document.createElement("span"));var c=[].slice;try{1==c.call(b.childNodes,0)[0].nodeType&&(a=function(a){return c.call(a,0)})}catch(d){}}a||(a=function(a){for(var b=[],c=0,d=a.length;d>c;++c)b[c]=a[c];return b}),G.toArray=a}();var J;F&&(a(document,"addEventListener")?J=function(a,b,c){a.addEventListener(b,c,!1)}:a(document,"attachEvent")?J=function(a,b,c){a.attachEvent("on"+b,c)}:i("Document does not have required addEventListener or attachEvent method"),G.addListener=J);var K=[];G.deprecationNotice=m,G.createAliasForDeprecatedMethod=n,H.init=l,H.addInitListener=function(a){H.initialized?a(H):K.push(a)};var L=[];H.addShimListener=function(a){L.push(a)},F&&(H.shim=H.createMissingNativeApi=o,n(H,"createMissingNativeApi","shim")),p.prototype={init:function(){for(var a,b,c=this.dependencies||[],d=0,e=c.length;e>d;++d){if(b=c[d],a=E[b],!(a&&a instanceof p))throw new Error("required module '"+b+"' not found");if(a.init(),!a.supported)throw new Error("required module '"+b+"' not supported")}this.initializer(this)},fail:function(a){throw this.initialized=!0,this.supported=!1,new Error(a)},warn:function(a){H.warn("Module "+this.name+": "+a)},deprecationNotice:function(a,b){H.warn("DEPRECATED: "+a+" in module "+this.name+" is deprecated. Please use "+b+" instead")},createError:function(a){return new Error("Error in Rangy "+this.name+" module: "+a)}},H.createModule=function(a){var b,c;2==arguments.length?(b=arguments[1],c=[]):(b=arguments[2],c=arguments[1]);var d=q(a,c,b);H.initialized&&H.supported&&d.init()},H.createCoreModule=function(a,b,c){q(a,b,c)},H.RangePrototype=r,H.rangePrototype=new r,H.selectionPrototype=new s,H.createCoreModule("DomUtil",[],function(a,b){function c(a){var b;return typeof a.namespaceURI==F||null===(b=a.namespaceURI)||"http://www.w3.org/1999/xhtml"==b}function d(a){var b=a.parentNode;return 1==b.nodeType?b:null}function e(a){for(var b=0;a=a.previousSibling;)++b;return b}function f(a){switch(a.nodeType){case 7:case 10:return 0;case 3:case 8:return a.length;default:return a.childNodes.length}}function g(a,b){var c,d=[];for(c=a;c;c=c.parentNode)d.push(c);for(c=b;c;c=c.parentNode)if(K(d,c))return c;return null}function h(a,b,c){for(var d=c?b:b.parentNode;d;){if(d===a)return!0;d=d.parentNode}return!1}function i(a,b){return h(a,b,!0)}function j(a,b,c){for(var d,e=c?a:a.parentNode;e;){if(d=e.parentNode,d===b)return e;e=d}return null}function k(a){var b=a.nodeType;return 3==b||4==b||8==b}function l(a){if(!a)return!1;var b=a.nodeType;return 3==b||8==b}function m(a,b){var c=b.nextSibling,d=b.parentNode;return c?d.insertBefore(a,c):d.appendChild(a),a}function n(a,b,c){var d=a.cloneNode(!1);if(d.deleteData(0,b),a.deleteData(b,a.length-b),m(d,a),c)for(var f,g=0;f=c[g++];)f.node==a&&f.offset>b?(f.node=d,f.offset-=b):f.node==a.parentNode&&f.offset>e(a)&&++f.offset;return d}function o(a){if(9==a.nodeType)return a;if(typeof a.ownerDocument!=F)return a.ownerDocument;if(typeof a.document!=F)return a.document;if(a.parentNode)return o(a.parentNode);throw b.createError("getDocument: no document found for node")}function p(a){var c=o(a);if(typeof c.defaultView!=F)return c.defaultView;if(typeof c.parentWindow!=F)return c.parentWindow;throw b.createError("Cannot get a window object for node")}function q(a){if(typeof a.contentDocument!=F)return a.contentDocument;if(typeof a.contentWindow!=F)return a.contentWindow.document;throw b.createError("getIframeDocument: No Document object found for iframe element")}function r(a){if(typeof a.contentWindow!=F)return a.contentWindow;if(typeof a.contentDocument!=F)return a.contentDocument.defaultView;throw b.createError("getIframeWindow: No Window object found for iframe element")}function s(a){return a&&G.isHostMethod(a,"setTimeout")&&G.isHostObject(a,"document")}function t(a,b,c){var d;if(a?G.isHostProperty(a,"nodeType")?d=1==a.nodeType&&"iframe"==a.tagName.toLowerCase()?q(a):o(a):s(a)&&(d=a.document):d=document,!d)throw b.createError(c+"(): Parameter must be a Window object or DOM node");return d}function u(a){for(var b;b=a.parentNode;)a=b;return a}function v(a,c,d,f){var h,i,k,l,m;if(a==d)return c===f?0:f>c?-1:1;if(h=j(d,a,!0))return c<=e(h)?-1:1;if(h=j(a,d,!0))return e(h)[index:"+e(a)+",length:"+a.childNodes.length+"]["+(a.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return a.nodeName}function y(a){for(var b,c=o(a).createDocumentFragment();b=a.firstChild;)c.appendChild(b);return c}function z(a,b,c){var d=H(a),e=a.createElement("div");e.contentEditable=""+!!c,b&&(e.innerHTML=b);var f=d.firstChild;return f?d.insertBefore(e,f):d.appendChild(e),e}function A(a){return a.parentNode.removeChild(a)}function B(a){this.root=a,this._next=a}function C(a){return new B(a)}function D(a,b){this.node=a,this.offset=b}function E(a){this.code=this[a],this.codeName=a,this.message="DOMException: "+this.codeName}var F="undefined",G=a.util,H=G.getBody;G.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||b.fail("document missing a Node creation method"),G.isHostMethod(document,"getElementsByTagName")||b.fail("document missing getElementsByTagName method");var I=document.createElement("div");G.areHostMethods(I,["insertBefore","appendChild","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"]))||b.fail("Incomplete Element implementation"),G.isHostProperty(I,"innerHTML")||b.fail("Element is missing innerHTML property");var J=document.createTextNode("test");G.areHostMethods(J,["splitText","deleteData","insertData","appendData","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"])||!G.areHostProperties(J,["data"]))||b.fail("Incomplete Text Node implementation");var K=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1},L=!1;!function(){var b=document.createElement("b");b.innerHTML="1";var c=b.firstChild;b.innerHTML="
      ",L=w(c),a.features.crashyTextNodes=L}();var M;typeof window.getComputedStyle!=F?M=function(a,b){return p(a).getComputedStyle(a,null)[b]}:typeof document.documentElement.currentStyle!=F?M=function(a,b){return a.currentStyle?a.currentStyle[b]:""}:b.fail("No means of obtaining computed style properties found"),B.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var a,b,c=this._current=this._next;if(this._current)if(a=c.firstChild)this._next=a;else{for(b=null;c!==this.root&&!(b=c.nextSibling);)c=c.parentNode;this._next=b}return this._current},detach:function(){this._current=this._next=this.root=null}},D.prototype={equals:function(a){return!!a&&this.node===a.node&&this.offset==a.offset},inspect:function(){return"[DomPosition("+x(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},E.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},E.prototype.toString=function(){return this.message},a.dom={arrayContains:K,isHtmlNamespace:c,parentElement:d,getNodeIndex:e,getNodeLength:f,getCommonAncestor:g,isAncestorOf:h,isOrIsAncestorOf:i,getClosestAncestorIn:j,isCharacterDataNode:k,isTextOrCommentNode:l,insertAfter:m,splitDataNode:n,getDocument:o,getWindow:p,getIframeWindow:r,getIframeDocument:q,getBody:H,isWindow:s,getContentDocument:t,getRootContainer:u,comparePoints:v,isBrokenNode:w,inspectNode:x,getComputedStyleProperty:M,createTestElement:z,removeNode:A,fragmentFromNodeChildren:y,createIterator:C,DomPosition:D},a.DOMException=E}),H.createCoreModule("DomRange",["DomUtil"],function(a,b){function c(a,b){return 3!=a.nodeType&&(P(a,b.startContainer)||P(a,b.endContainer))}function d(a){return a.document||Q(a.startContainer)}function e(a){return W(a.startContainer)}function f(a){return new L(a.parentNode,O(a))}function g(a){return new L(a.parentNode,O(a)+1)}function h(a,b,c){var d=11==a.nodeType?a.firstChild:a;return N(b)?c==b.length?J.insertAfter(a,b):b.parentNode.insertBefore(a,0==c?b:S(b,c)):c>=b.childNodes.length?b.appendChild(a):b.insertBefore(a,b.childNodes[c]),d}function i(a,b,c){if(z(a),z(b),d(b)!=d(a))throw new M("WRONG_DOCUMENT_ERR");var e=R(a.startContainer,a.startOffset,b.endContainer,b.endOffset),f=R(a.endContainer,a.endOffset,b.startContainer,b.startOffset);return c?0>=e&&f>=0:0>e&&f>0}function j(a){for(var b,c,e,f=d(a.range).createDocumentFragment();c=a.next();){if(b=a.isPartiallySelectedSubtree(),c=c.cloneNode(!b),b&&(e=a.getSubtreeIterator(),c.appendChild(j(e)),e.detach()),10==c.nodeType)throw new M("HIERARCHY_REQUEST_ERR");f.appendChild(c)}return f}function k(a,b,c){var d,e;c=c||{stop:!1};for(var f,g;f=a.next();)if(a.isPartiallySelectedSubtree()){if(b(f)===!1)return void(c.stop=!0);if(g=a.getSubtreeIterator(),k(g,b,c),g.detach(),c.stop)return}else for(d=J.createIterator(f);e=d.next();)if(b(e)===!1)return void(c.stop=!0)}function l(a){for(var b;a.next();)a.isPartiallySelectedSubtree()?(b=a.getSubtreeIterator(),l(b),b.detach()):a.remove()}function m(a){for(var b,c,e=d(a.range).createDocumentFragment();b=a.next();){if(a.isPartiallySelectedSubtree()?(b=b.cloneNode(!1),c=a.getSubtreeIterator(),b.appendChild(m(c)),c.detach()):a.remove(),10==b.nodeType)throw new M("HIERARCHY_REQUEST_ERR");e.appendChild(b)}return e}function n(a,b,c){var d,e=!(!b||!b.length),f=!!c;e&&(d=new RegExp("^("+b.join("|")+")$"));var g=[];return k(new p(a,!1),function(b){if((!e||d.test(b.nodeType))&&(!f||c(b))){var h=a.startContainer;if(b!=h||!N(h)||a.startOffset!=h.length){var i=a.endContainer;b==i&&N(i)&&0==a.endOffset||g.push(b)}}}),g}function o(a){var b="undefined"==typeof a.getName?"Range":a.getName();return"["+b+"("+J.inspectNode(a.startContainer)+":"+a.startOffset+", "+J.inspectNode(a.endContainer)+":"+a.endOffset+")]"}function p(a,b){if(this.range=a,this.clonePartiallySelectedTextNodes=b,!a.collapsed){this.sc=a.startContainer,this.so=a.startOffset,this.ec=a.endContainer,this.eo=a.endOffset;var c=a.commonAncestorContainer;this.sc===this.ec&&N(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==c||N(this.sc)?T(this.sc,c,!0):this.sc.childNodes[this.so],this._last=this.ec!==c||N(this.ec)?T(this.ec,c,!0):this.ec.childNodes[this.eo-1])}}function q(a){return function(b,c){for(var d,e=c?b:b.parentNode;e;){if(d=e.nodeType,V(a,d))return e;e=e.parentNode}return null}}function r(a,b){if(ea(a,b))throw new M("INVALID_NODE_TYPE_ERR")}function s(a,b){if(!V(b,a.nodeType))throw new M("INVALID_NODE_TYPE_ERR")}function t(a,b){if(0>b||b>(N(a)?a.length:a.childNodes.length))throw new M("INDEX_SIZE_ERR")}function u(a,b){if(ca(a,!0)!==ca(b,!0))throw new M("WRONG_DOCUMENT_ERR")}function v(a){if(da(a,!0))throw new M("NO_MODIFICATION_ALLOWED_ERR")}function w(a,b){if(!a)throw new M(b)}function x(a,b){return b<=(N(a)?a.length:a.childNodes.length)}function y(a){return!!a.startContainer&&!!a.endContainer&&!(X&&(J.isBrokenNode(a.startContainer)||J.isBrokenNode(a.endContainer)))&&W(a.startContainer)==W(a.endContainer)&&x(a.startContainer,a.startOffset)&&x(a.endContainer,a.endOffset)}function z(a){if(!y(a))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+a.inspect()+")")}function A(a,b){z(a);var c=a.startContainer,d=a.startOffset,e=a.endContainer,f=a.endOffset,g=c===e;N(e)&&f>0&&f0&&d=O(c)&&f++,d=0),a.setStartAndEnd(c,d,e,f)}function B(a){z(a);var b=a.commonAncestorContainer.parentNode.cloneNode(!1);return b.appendChild(a.cloneContents()),b.innerHTML}function C(a){a.START_TO_START=ka,a.START_TO_END=la,a.END_TO_END=ma,a.END_TO_START=na,a.NODE_BEFORE=oa,a.NODE_AFTER=pa,a.NODE_BEFORE_AND_AFTER=qa,a.NODE_INSIDE=ra}function D(a){C(a),C(a.prototype)}function E(a,b){return function(){z(this);var c,d,e=this.startContainer,f=this.startOffset,h=this.commonAncestorContainer,i=new p(this,!0);e!==h&&(c=T(e,h,!0),d=g(c),e=d.node,f=d.offset),k(i,v),i.reset();var j=a(i);return i.detach(),b(this,e,f,e,f),j}}function F(b,d){function e(a,b){return function(c){s(c,Z),s(W(c),$);var d=(a?f:g)(c);(b?h:i)(this,d.node,d.offset)}}function h(a,b,c){var e=a.endContainer,f=a.endOffset;(b!==a.startContainer||c!==a.startOffset)&&((W(b)!=W(e)||1==R(b,c,e,f))&&(e=b,f=c),d(a,b,c,e,f))}function i(a,b,c){var e=a.startContainer,f=a.startOffset;(b!==a.endContainer||c!==a.endOffset)&&((W(b)!=W(e)||-1==R(b,c,e,f))&&(e=b,f=c),d(a,e,f,b,c))}var j=function(){};j.prototype=a.rangePrototype,b.prototype=new j,K.extend(b.prototype,{setStart:function(a,b){r(a,!0),t(a,b),h(this,a,b)},setEnd:function(a,b){r(a,!0),t(a,b),i(this,a,b)},setStartAndEnd:function(){var a=arguments,b=a[0],c=a[1],e=b,f=c;switch(a.length){case 3:f=a[2];break;case 4:e=a[2],f=a[3]}d(this,b,c,e,f)},setBoundary:function(a,b,c){this["set"+(c?"Start":"End")](a,b)},setStartBefore:e(!0,!0),setStartAfter:e(!1,!0),setEndBefore:e(!0,!1),setEndAfter:e(!1,!1),collapse:function(a){z(this),a?d(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):d(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(a){r(a,!0),d(this,a,0,a,U(a))},selectNode:function(a){r(a,!1),s(a,Z);var b=f(a),c=g(a);d(this,b.node,b.offset,c.node,c.offset)},extractContents:E(m,d),deleteContents:E(l,d),canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},splitBoundaries:function(){A(this)},splitBoundariesPreservingPositions:function(a){A(this,a)},normalizeBoundaries:function(){z(this);var a,b=this.startContainer,c=this.startOffset,e=this.endContainer,f=this.endOffset,g=function(a){var b=a.nextSibling;b&&b.nodeType==a.nodeType&&(e=a,f=a.length,a.appendData(b.data),Y(b))},h=function(a){var d=a.previousSibling;if(d&&d.nodeType==a.nodeType){b=a;var g=a.length;if(c=d.length,a.insertData(0,d.data),Y(d),b==e)f+=c,e=b;else if(e==a.parentNode){var h=O(a);f==h?(e=a,f=g):f>h&&f--}}},i=!0;if(N(e))f==e.length?g(e):0==f&&(a=e.previousSibling,a&&a.nodeType==e.nodeType&&(f=a.length,b==e&&(i=!1),a.appendData(e.data),Y(e),e=a));else{if(f>0){var j=e.childNodes[f-1];j&&N(j)&&g(j)}i=!this.collapsed}if(i){if(N(b))0==c?h(b):c==b.length&&(a=b.nextSibling,a&&a.nodeType==b.nodeType&&(e==a&&(e=b,f+=b.length),b.appendData(a.data),Y(a)));else if(cx",ga=3==fa.firstChild.nodeType}catch(ha){}a.features.htmlParsingConforms=ga;var ia=ga?function(a){var b=this.startContainer,c=Q(b);if(!b)throw new M("INVALID_STATE_ERR");var d=null;return 1==b.nodeType?d=b:N(b)&&(d=J.parentElement(b)),d=null===d||"HTML"==d.nodeName&&J.isHtmlNamespace(Q(d).documentElement)&&J.isHtmlNamespace(d)?c.createElement("body"):d.cloneNode(!1),d.innerHTML=a,J.fragmentFromNodeChildren(d)}:function(a){var b=d(this),c=b.createElement("body");return c.innerHTML=a,J.fragmentFromNodeChildren(c)},ja=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ka=0,la=1,ma=2,na=3,oa=0,pa=1,qa=2,ra=3;K.extend(a.rangePrototype,{compareBoundaryPoints:function(a,b){z(this),u(this.startContainer,b.startContainer);var c,d,e,f,g=a==na||a==ka?"start":"end",h=a==la||a==ka?"start":"end";return c=this[g+"Container"],d=this[g+"Offset"],e=b[h+"Container"],f=b[h+"Offset"],R(c,d,e,f)},insertNode:function(a){if(z(this),s(a,aa),v(this.startContainer),P(a,this.startContainer))throw new M("HIERARCHY_REQUEST_ERR");var b=h(a,this.startContainer,this.startOffset);this.setStartBefore(b)},cloneContents:function(){z(this);var a,b;if(this.collapsed)return d(this).createDocumentFragment();if(this.startContainer===this.endContainer&&N(this.startContainer))return a=this.startContainer.cloneNode(!0),a.data=a.data.slice(this.startOffset,this.endOffset),b=d(this).createDocumentFragment(),b.appendChild(a),b;var c=new p(this,!0);return a=j(c),c.detach(),a},canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},surroundContents:function(a){if(s(a,ba),!this.canSurroundContents())throw new M("INVALID_STATE_ERR");var b=this.extractContents();if(a.hasChildNodes())for(;a.lastChild;)a.removeChild(a.lastChild);h(a,this.startContainer,this.startOffset),a.appendChild(b),this.selectNode(a)},cloneRange:function(){z(this);for(var a,b=new I(d(this)),c=ja.length;c--;)a=ja[c],b[a]=this[a];return b},toString:function(){z(this);var a=this.startContainer;if(a===this.endContainer&&N(a))return 3==a.nodeType||4==a.nodeType?a.data.slice(this.startOffset,this.endOffset):"";var b=[],c=new p(this,!0);return k(c,function(a){(3==a.nodeType||4==a.nodeType)&&b.push(a.data)}),c.detach(),b.join("")},compareNode:function(a){z(this);var b=a.parentNode,c=O(a);if(!b)throw new M("NOT_FOUND_ERR");var d=this.comparePoint(b,c),e=this.comparePoint(b,c+1);return 0>d?e>0?qa:oa:e>0?pa:ra},comparePoint:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)<0?-1:R(a,b,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:ia,toHtml:function(){return B(this)},intersectsNode:function(a,b){if(z(this),W(a)!=e(this))return!1;var c=a.parentNode,d=O(a);if(!c)return!0;var f=R(c,d,this.endContainer,this.endOffset),g=R(c,d+1,this.startContainer,this.startOffset);return b?0>=f&&g>=0:0>f&&g>0},isPointInRange:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)>=0&&R(a,b,this.endContainer,this.endOffset)<=0},intersectsRange:function(a){return i(this,a,!1)},intersectsOrTouchesRange:function(a){return i(this,a,!0)},intersection:function(a){if(this.intersectsRange(a)){var b=R(this.startContainer,this.startOffset,a.startContainer,a.startOffset),c=R(this.endContainer,this.endOffset,a.endContainer,a.endOffset),d=this.cloneRange();return-1==b&&d.setStart(a.startContainer,a.startOffset),1==c&&d.setEnd(a.endContainer,a.endOffset),d}return null},union:function(a){if(this.intersectsOrTouchesRange(a)){var b=this.cloneRange();return-1==R(a.startContainer,a.startOffset,this.startContainer,this.startOffset)&&b.setStart(a.startContainer,a.startOffset),1==R(a.endContainer,a.endOffset,this.endContainer,this.endOffset)&&b.setEnd(a.endContainer,a.endOffset),b}throw new M("Ranges do not intersect")},containsNode:function(a,b){return b?this.intersectsNode(a,!1):this.compareNode(a)==ra},containsNodeContents:function(a){return this.comparePoint(a,0)>=0&&this.comparePoint(a,U(a))<=0},containsRange:function(a){var b=this.intersection(a);return null!==b&&a.equals(b)},containsNodeText:function(a){var b=this.cloneRange();b.selectNode(a);var c=b.getNodes([3]);if(c.length>0){b.setStart(c[0],0);var d=c.pop();return b.setEnd(d,d.length),this.containsRange(b)}return this.containsNodeContents(a)},getNodes:function(a,b){return z(this),n(this,a,b)},getDocument:function(){return d(this)},collapseBefore:function(a){this.setEndBefore(a),this.collapse(!1)},collapseAfter:function(a){this.setStartAfter(a),this.collapse(!0)},getBookmark:function(b){var c=d(this),e=a.createRange(c);b=b||J.getBody(c),e.selectNodeContents(b);var f=this.intersection(e),g=0,h=0;return f&&(e.setEnd(f.startContainer,f.startOffset),g=e.toString().length,h=g+f.toString().length),{start:g,end:h,containerNode:b}},moveToBookmark:function(a){var b=a.containerNode,c=0;this.setStart(b,0),this.collapse(!0);for(var d,e,f,g,h=[b],i=!1,j=!1;!j&&(d=h.pop());)if(3==d.nodeType)e=c+d.length,!i&&a.start>=c&&a.start<=e&&(this.setStart(d,a.start-c),i=!0),i&&a.end>=c&&a.end<=e&&(this.setEnd(d,a.end-c),j=!0),c=e;else for(g=d.childNodes,f=g.length;f--;)h.push(g[f])},getName:function(){return"DomRange"},equals:function(a){return I.rangesEqual(this,a)},isValid:function(){return y(this)},inspect:function(){return o(this)},detach:function(){}}),F(I,H),K.extend(I,{rangeProperties:ja,RangeIterator:p,copyComparisonConstants:D,createPrototypeRange:F,inspect:o,toHtml:B,getRangeDocument:d,rangesEqual:function(a,b){return a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===b.endOffset}}),a.DomRange=I}),H.createCoreModule("WrappedRange",["DomRange"],function(a,b){var c,d,e=a.dom,f=a.util,g=e.DomPosition,h=a.DomRange,i=e.getBody,j=e.getContentDocument,k=e.isCharacterDataNode;if(a.features.implementsDomRange&&!function(){function d(a){for(var b,c=m.length;c--;)b=m[c],a[b]=a.nativeRange[b];a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset}function g(a,b,c,d,e){var f=a.startContainer!==b||a.startOffset!=c,g=a.endContainer!==d||a.endOffset!=e,h=!a.equals(a.nativeRange);(f||g||h)&&(a.setEnd(d,e),a.setStart(b,c))}var k,l,m=h.rangeProperties;c=function(a){if(!a)throw b.createError("WrappedRange: Range must be specified");this.nativeRange=a,d(this)},h.createPrototypeRange(c,g),k=c.prototype,k.selectNode=function(a){this.nativeRange.selectNode(a),d(this)},k.cloneContents=function(){return this.nativeRange.cloneContents()},k.surroundContents=function(a){this.nativeRange.surroundContents(a),d(this)},k.collapse=function(a){this.nativeRange.collapse(a),d(this)},k.cloneRange=function(){return new c(this.nativeRange.cloneRange())},k.refresh=function(){d(this)},k.toString=function(){return this.nativeRange.toString()};var n=document.createTextNode("test");i(document).appendChild(n);var o=document.createRange();o.setStart(n,0),o.setEnd(n,0);try{o.setStart(n,1),k.setStart=function(a,b){this.nativeRange.setStart(a,b),d(this)},k.setEnd=function(a,b){this.nativeRange.setEnd(a,b),d(this)},l=function(a){return function(b){this.nativeRange[a](b),d(this)}}}catch(p){k.setStart=function(a,b){try{this.nativeRange.setStart(a,b)}catch(c){this.nativeRange.setEnd(a,b),this.nativeRange.setStart(a,b)}d(this)},k.setEnd=function(a,b){try{this.nativeRange.setEnd(a,b)}catch(c){this.nativeRange.setStart(a,b),this.nativeRange.setEnd(a,b)}d(this)},l=function(a,b){return function(c){try{this.nativeRange[a](c)}catch(e){this.nativeRange[b](c),this.nativeRange[a](c)}d(this)}}}k.setStartBefore=l("setStartBefore","setEndBefore"),k.setStartAfter=l("setStartAfter","setEndAfter"),k.setEndBefore=l("setEndBefore","setStartBefore"),k.setEndAfter=l("setEndAfter","setStartAfter"),k.selectNodeContents=function(a){this.setStartAndEnd(a,0,e.getNodeLength(a))},o.selectNodeContents(n),o.setEnd(n,3);var q=document.createRange();q.selectNodeContents(n),q.setEnd(n,4),q.setStart(n,2),-1==o.compareBoundaryPoints(o.START_TO_END,q)&&1==o.compareBoundaryPoints(o.END_TO_START,q)?k.compareBoundaryPoints=function(a,b){return b=b.nativeRange||b,a==b.START_TO_END?a=b.END_TO_START:a==b.END_TO_START&&(a=b.START_TO_END),this.nativeRange.compareBoundaryPoints(a,b)}:k.compareBoundaryPoints=function(a,b){return this.nativeRange.compareBoundaryPoints(a,b.nativeRange||b)};var r=document.createElement("div");r.innerHTML="123";var s=r.firstChild,t=i(document);t.appendChild(r),o.setStart(s,1),o.setEnd(s,2),o.deleteContents(),"13"==s.data&&(k.deleteContents=function(){this.nativeRange.deleteContents(),d(this)},k.extractContents=function(){var a=this.nativeRange.extractContents();return d(this),a}),t.removeChild(r),t=null,f.isHostMethod(o,"createContextualFragment")&&(k.createContextualFragment=function(a){return this.nativeRange.createContextualFragment(a)}),i(document).removeChild(n),k.getName=function(){return"WrappedRange"},a.WrappedRange=c,a.createNativeRange=function(a){return a=j(a,b,"createNativeRange"),a.createRange()}}(),a.features.implementsTextRange){var l=function(a){var b=a.parentElement(),c=a.duplicate();c.collapse(!0);var d=c.parentElement();c=a.duplicate(),c.collapse(!1);var f=c.parentElement(),g=d==f?d:e.getCommonAncestor(d,f);return g==b?g:e.getCommonAncestor(b,g)},m=function(a){return 0==a.compareEndPoints("StartToEnd",a)},n=function(a,b,c,d,f){var h=a.duplicate();h.collapse(c);var i=h.parentElement();if(e.isOrIsAncestorOf(b,i)||(i=b),!i.canHaveHTML){var j=new g(i.parentNode,e.getNodeIndex(i));return{boundaryPosition:j,nodeInfo:{nodeIndex:j.offset,containerElement:j.node}}}var l=e.getDocument(i).createElement("span"); -l.parentNode&&e.removeNode(l);for(var m,n,o,p,q,r=c?"StartToStart":"StartToEnd",s=f&&f.containerElement==i?f.nodeIndex:0,t=i.childNodes.length,u=t,v=u;;){if(v==t?i.appendChild(l):i.insertBefore(l,i.childNodes[v]),h.moveToElementText(l),m=h.compareEndPoints(r,a),0==m||s==u)break;if(-1==m){if(u==s+1)break;s=v}else u=u==s+1?s:v;v=Math.floor((s+u)/2),i.removeChild(l)}if(q=l.nextSibling,-1==m&&q&&k(q)){h.setEndPoint(c?"EndToStart":"EndToEnd",a);var w;if(/[\r\n]/.test(q.data)){var x=h.duplicate(),y=x.text.replace(/\r\n/g,"\r").length;for(w=x.moveStart("character",y);-1==(m=x.compareEndPoints("StartToEnd",x));)w++,x.moveStart("character",1)}else w=h.text.length;p=new g(q,w)}else n=(d||!c)&&l.previousSibling,o=(d||c)&&l.nextSibling,p=o&&k(o)?new g(o,0):n&&k(n)?new g(n,n.data.length):new g(i,e.getNodeIndex(l));return e.removeNode(l),{boundaryPosition:p,nodeInfo:{nodeIndex:v,containerElement:i}}},o=function(a,b){var c,d,f,g,h=a.offset,j=e.getDocument(a.node),l=i(j).createTextRange(),m=k(a.node);return m?(c=a.node,d=c.parentNode):(g=a.node.childNodes,c=hb;++b)if(!C.isAncestorOf(a[0],a[b]))return!1;return!0}function m(a){var c=a.getNodes();if(!l(c))throw b.createError("getSingleElementFromRange: range "+a.inspect()+" did not consist of a single element");return c[0]}function n(a){return!!a&&"undefined"!=typeof a.text}function o(a,b){var c=new G(b);a._ranges=[c],h(a,c,!1),a.rangeCount=1,a.isCollapsed=c.collapsed}function p(b){if(b._ranges.length=0,"None"==b.docSelection.type)j(b);else{var c=b.docSelection.createRange();if(n(c))o(b,c);else{b.rangeCount=c.length;for(var d,e=L(c.item(0)),f=0;fh;++h)g.add(d.item(h));try{g.add(e)}catch(j){throw b.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}g.select(),p(a)}function r(a,b,c){this.nativeSelection=a,this.docSelection=b,this._ranges=[],this.win=c,this.refresh()}function s(a){a.win=a.anchorNode=a.focusNode=a._ranges=null,a.rangeCount=a.anchorOffset=a.focusOffset=0,a.detached=!0}function t(a,b){for(var c,d,e=ba.length;e--;)if(c=ba[e],d=c.selection,"deleteAll"==b)s(d);else if(c.win==a)return"delete"==b?(ba.splice(e,1),!0):d;return"deleteAll"==b&&(ba.length=0),null}function u(a,c){for(var d,e=L(c[0].startContainer),f=M(e).createControlRange(),g=0,h=c.length;h>g;++g){d=m(c[g]);try{f.add(d)}catch(i){throw b.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}f.select(),p(a)}function v(a,b){if(a.win.document!=L(b))throw new H("WRONG_DOCUMENT_ERR")}function w(b){return function(c,d){var e;this.rangeCount?(e=this.getRangeAt(0),e["set"+(b?"Start":"End")](c,d)):(e=a.createRange(this.win.document),e.setStartAndEnd(c,d)),this.setSingleRange(e,this.isBackward())}}function x(a){var b=[],c=new I(a.anchorNode,a.anchorOffset),d=new I(a.focusNode,a.focusOffset),e="function"==typeof a.getName?a.getName():"Selection";if("undefined"!=typeof a.rangeCount)for(var f=0,g=a.rangeCount;g>f;++f)b[f]=F.inspect(a.getRangeAt(f));return"["+e+"(Ranges: "+b.join(", ")+")(anchor: "+c.inspect()+", focus: "+d.inspect()+"]"}a.config.checkSelectionRanges=!0;var y,z,A="boolean",B="number",C=a.dom,D=a.util,E=D.isHostMethod,F=a.DomRange,G=a.WrappedRange,H=a.DOMException,I=C.DomPosition,J=a.features,K="Control",L=C.getDocument,M=C.getBody,N=F.rangesEqual,O=E(window,"getSelection"),P=D.isHostObject(document,"selection");J.implementsWinGetSelection=O,J.implementsDocSelection=P;var Q=P&&(!O||a.config.preferTextRange);if(Q)y=f,a.isSelectionValid=function(a){var b=d(a,"isSelectionValid").document,c=b.selection;return"None"!=c.type||L(c.createRange().parentElement())==b};else{if(!O)return b.fail("Neither document.selection or window.getSelection() detected."),!1;y=e,a.isSelectionValid=function(){return!0}}a.getNativeSelection=y;var R=y();if(!R)return b.fail("Native selection was null (possibly issue 138?)"),!1;var S=a.createNativeRange(document),T=M(document),U=D.areHostProperties(R,["anchorNode","focusNode","anchorOffset","focusOffset"]);J.selectionHasAnchorAndFocus=U;var V=E(R,"extend");J.selectionHasExtend=V;var W=typeof R.rangeCount==B;J.selectionHasRangeCount=W;var X=!1,Y=!0,Z=V?function(b,c){var d=F.getRangeDocument(c),e=a.createRange(d);e.collapseToPoint(c.endContainer,c.endOffset),b.addRange(k(e)),b.extend(c.startContainer,c.startOffset)}:null;D.areHostMethods(R,["addRange","getRangeAt","removeAllRanges"])&&typeof R.rangeCount==B&&J.implementsDomRange&&!function(){var b=window.getSelection();if(b){for(var c=b.rangeCount,d=c>1,e=[],f=g(b),h=0;c>h;++h)e[h]=b.getRangeAt(h);var i=C.createTestElement(document,"",!1),j=i.appendChild(document.createTextNode("   ")),k=document.createRange();if(k.setStart(j,1),k.collapse(!0),b.removeAllRanges(),b.addRange(k),Y=1==b.rangeCount,b.removeAllRanges(),!d){var l=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(l&&parseInt(l[1])>=36)X=!1;else{var m=k.cloneRange();k.setStart(j,0),m.setEnd(j,3),m.setStart(j,2),b.addRange(k),b.addRange(m),X=2==b.rangeCount}}for(C.removeNode(i),b.removeAllRanges(),h=0;c>h;++h)0==h&&f?Z?Z(b,e[h]):(a.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),b.addRange(e[h])):b.addRange(e[h])}}(),J.selectionSupportsMultipleRanges=X,J.collapsedNonEditableSelectionsSupported=Y;var $,_=!1;T&&E(T,"createControlRange")&&($=T.createControlRange(),D.areHostProperties($,["item","add"])&&(_=!0)),J.implementsControlRange=_,z=U?function(a){return a.anchorNode===a.focusNode&&a.anchorOffset===a.focusOffset}:function(a){return a.rangeCount?a.getRangeAt(a.rangeCount-1).collapsed:!1};var aa;E(R,"getRangeAt")?aa=function(a,b){try{return a.getRangeAt(b)}catch(c){return null}}:U&&(aa=function(b){var c=L(b.anchorNode),d=a.createRange(c);return d.setStartAndEnd(b.anchorNode,b.anchorOffset,b.focusNode,b.focusOffset),d.collapsed!==this.isCollapsed&&d.setStartAndEnd(b.focusNode,b.focusOffset,b.anchorNode,b.anchorOffset),d}),r.prototype=a.selectionPrototype;var ba=[],ca=function(a){if(a&&a instanceof r)return a.refresh(),a;a=d(a,"getNativeSelection");var b=t(a),c=y(a),e=P?f(a):null;return b?(b.nativeSelection=c,b.docSelection=e,b.refresh()):(b=new r(c,e,a),ba.push({win:a,selection:b})),b};a.getSelection=ca,D.createAliasForDeprecatedMethod(a,"getIframeSelection","getSelection");var da=r.prototype;if(!Q&&U&&D.areHostMethods(R,["removeAllRanges","addRange"])){da.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),j(this)};var ea=function(a,b){Z(a.nativeSelection,b),a.refresh()};W?da.addRange=function(b,d){if(_&&P&&this.docSelection.type==K)q(this,b);else if(c(d)&&V)ea(this,b);else{var e;X?e=this.rangeCount:(this.removeAllRanges(),e=0);var f=k(b).cloneRange();try{this.nativeSelection.addRange(f)}catch(g){}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==e+1){if(a.config.checkSelectionRanges){var i=aa(this.nativeSelection,this.rangeCount-1);i&&!N(i,b)&&(b=new G(i))}this._ranges[this.rangeCount-1]=b,h(this,b,ha(this.nativeSelection)),this.isCollapsed=z(this)}else this.refresh()}}:da.addRange=function(a,b){c(b)&&V?ea(this,a):(this.nativeSelection.addRange(k(a)),this.refresh())},da.setRanges=function(a){if(_&&P&&a.length>1)u(this,a);else{this.removeAllRanges();for(var b=0,c=a.length;c>b;++b)this.addRange(a[b])}}}else{if(!(E(R,"empty")&&E(S,"select")&&_&&Q))return b.fail("No means of selecting a Range or TextRange was found"),!1;da.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var a;if(this.anchorNode)a=L(this.anchorNode);else if(this.docSelection.type==K){var b=this.docSelection.createRange();b.length&&(a=L(b.item(0)))}if(a){var c=M(a).createTextRange();c.select(),this.docSelection.empty()}}}catch(d){}j(this)},da.addRange=function(b){this.docSelection.type==K?q(this,b):(a.WrappedTextRange.rangeToTextRange(b).select(),this._ranges[0]=b,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,h(this,b,!1))},da.setRanges=function(a){this.removeAllRanges();var b=a.length;b>1?u(this,a):b&&this.addRange(a[0])}}da.getRangeAt=function(a){if(0>a||a>=this.rangeCount)throw new H("INDEX_SIZE_ERR");return this._ranges[a].cloneRange()};var fa;if(Q)fa=function(b){var c;a.isSelectionValid(b.win)?c=b.docSelection.createRange():(c=M(b.win.document).createTextRange(),c.collapse(!0)),b.docSelection.type==K?p(b):n(c)?o(b,c):j(b)};else if(E(R,"getRangeAt")&&typeof R.rangeCount==B)fa=function(b){if(_&&P&&b.docSelection.type==K)p(b);else if(b._ranges.length=b.rangeCount=b.nativeSelection.rangeCount,b.rangeCount){for(var c=0,d=b.rangeCount;d>c;++c)b._ranges[c]=new a.WrappedRange(b.nativeSelection.getRangeAt(c));h(b,b._ranges[b.rangeCount-1],ha(b.nativeSelection)),b.isCollapsed=z(b)}else j(b)};else{if(!U||typeof R.isCollapsed!=A||typeof S.collapsed!=A||!J.implementsDomRange)return b.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;fa=function(a){var b,c=a.nativeSelection;c.anchorNode?(b=aa(c,0),a._ranges=[b],a.rangeCount=1,i(a),a.isCollapsed=z(a)):j(a)}}da.refresh=function(a){var b=a?this._ranges.slice(0):null,c=this.anchorNode,d=this.anchorOffset;if(fa(this),a){var e=b.length;if(e!=this._ranges.length)return!0;if(this.anchorNode!=c||this.anchorOffset!=d)return!0;for(;e--;)if(!N(b[e],this._ranges[e]))return!0;return!1}};var ga=function(a,b){var c=a.getAllRanges();a.removeAllRanges();for(var d=0,e=c.length;e>d;++d)N(b,c[d])||a.addRange(c[d]);a.rangeCount||j(a)};_&&P?da.removeRange=function(a){if(this.docSelection.type==K){for(var b,c=this.docSelection.createRange(),d=m(a),e=L(c.item(0)),f=M(e).createControlRange(),g=!1,h=0,i=c.length;i>h;++h)b=c.item(h),b!==d||g?f.add(c.item(h)):g=!0;f.select(),p(this)}else ga(this,a)}:da.removeRange=function(a){ga(this,a)};var ha;!Q&&U&&J.implementsDomRange?(ha=g,da.isBackward=function(){return ha(this)}):ha=da.isBackward=function(){return!1},da.isBackwards=da.isBackward,da.toString=function(){for(var a=[],b=0,c=this.rangeCount;c>b;++b)a[b]=""+this._ranges[b];return a.join("")},da.collapse=function(b,c){v(this,b);var d=a.createRange(b);d.collapseToPoint(b,c),this.setSingleRange(d),this.isCollapsed=!0},da.collapseToStart=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[0];this.collapse(a.startContainer,a.startOffset)},da.collapseToEnd=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[this.rangeCount-1];this.collapse(a.endContainer,a.endOffset)},da.selectAllChildren=function(b){v(this,b);var c=a.createRange(b);c.selectNodeContents(b),this.setSingleRange(c)},da.deleteFromDocument=function(){if(_&&P&&this.docSelection.type==K){for(var a,b=this.docSelection.createRange();b.length;)a=b.item(0),b.remove(a),C.removeNode(a);this.refresh()}else if(this.rangeCount){var c=this.getAllRanges();if(c.length){this.removeAllRanges();for(var d=0,e=c.length;e>d;++d)c[d].deleteContents();this.addRange(c[e-1])}}},da.eachRange=function(a,b){for(var c=0,d=this._ranges.length;d>c;++c)if(a(this.getRangeAt(c)))return b},da.getAllRanges=function(){var a=[];return this.eachRange(function(b){a.push(b)}),a},da.setSingleRange=function(a,b){this.removeAllRanges(),this.addRange(a,b)},da.callMethodOnEachRange=function(a,b){var c=[];return this.eachRange(function(d){c.push(d[a].apply(d,b||[]))}),c},da.setStart=w(!0),da.setEnd=w(!1),a.rangePrototype.select=function(a){ca(this.getDocument()).setSingleRange(this,a)},da.changeEachRange=function(a){var b=[],c=this.isBackward();this.eachRange(function(c){a(c),b.push(c)}),this.removeAllRanges(),c&&1==b.length?this.addRange(b[0],"backward"):this.setRanges(b)},da.containsNode=function(a,b){return this.eachRange(function(c){return c.containsNode(a,b)},!0)||!1},da.getBookmark=function(a){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[a])}},da.moveToBookmark=function(b){for(var c,d,e=[],f=0;c=b.rangeBookmarks[f++];)d=a.createRange(this.win),d.moveToBookmark(c),e.push(d);b.backward?this.setSingleRange(e[0],"backward"):this.setRanges(e)},da.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},da.restoreRanges=function(a){this.removeAllRanges();for(var b,c=0;b=a.ranges[c];++c)this.addRange(b,a.backward&&0==c)},da.toHtml=function(){var a=[];return this.eachRange(function(b){a.push(F.toHtml(b))}),a.join("")},J.implementsTextRange&&(da.getNativeTextRange=function(){var c;if(c=this.docSelection){var d=c.createRange();if(n(d))return d;throw b.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return a.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw b.createError("getNativeTextRange: selection contains no range")}),da.getName=function(){return"WrappedSelection"},da.inspect=function(){return x(this)},da.detach=function(){t(this.win,"delete"),s(this)},r.detachAll=function(){t(null,"deleteAll")},r.inspect=x,r.isDirectionBackward=c,a.Selection=r,a.selectionPrototype=da,a.addShimListener(function(a){"undefined"==typeof a.getSelection&&(a.getSelection=function(){return ca(a)}),a=null})});var M=!1,N=function(a){M||(M=!0,!H.initialized&&H.config.autoInitialize&&l())};return F&&("complete"==document.readyState?N():(a(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",N,!1),J(window,"load",N))),H},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("ClassApplier",["WrappedSelection"],function(a,b){function c(a,b){for(var c in a)if(a.hasOwnProperty(c)&&b(c,a[c])===!1)return!1;return!0}function d(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function e(a,b){return!!a&&new RegExp("(?:^|\\s)"+b+"(?:\\s|$)").test(a)}function f(a,b){if("object"==typeof a.classList)return a.classList.contains(b);var c="string"==typeof a.className,d=c?a.className:a.getAttribute("class");return e(d,b)}function g(a,b){if("object"==typeof a.classList)a.classList.add(b);else{var c="string"==typeof a.className,d=c?a.className:a.getAttribute("class");d?e(d,b)||(d+=" "+b):d=b,c?a.className=d:a.setAttribute("class",d)}}function h(a){var b="string"==typeof a.className;return b?a.className:a.getAttribute("class")}function j(a){return a&&a.split(/\s+/).sort().join(" ")}function k(a){return j(h(a))}function l(a,b){return k(a)==k(b)}function m(a,b){for(var c=b.split(/\s+/),e=0,g=c.length;g>e;++e)if(!f(a,d(c[e])))return!1;return!0}function n(a){var b=a.parentNode;return b&&1==b.nodeType&&!/^(textarea|style|script|select|iframe)$/i.test(b.nodeName)}function o(a,b,c,d,e){var f=a.node,g=a.offset,h=f,i=g;f==d&&g>e&&++i,f!=b||g!=c&&g!=c+1||(h=d,i+=e-c),f==b&&g>c+1&&--i,a.node=h,a.offset=i}function p(a,b,c){a.node==b&&a.offset>c&&--a.offset}function q(a,b,c,d){-1==c&&(c=b.childNodes.length);var e=a.parentNode,f=L.getNodeIndex(a);P(d,function(a){o(a,e,f,b,c)}),b.childNodes.length==c?b.appendChild(a):b.insertBefore(a,b.childNodes[c])}function r(a,b){var c=a.parentNode,d=L.getNodeIndex(a);P(b,function(a){p(a,c,d)}),L.removeNode(a)}function s(a,b,c,d,e){for(var f,g=[];f=a.firstChild;)q(f,b,c++,e),g.push(f);return d&&r(a,e),g}function t(a,b){return s(a,a.parentNode,L.getNodeIndex(a),!0,b)}function u(a,b){var c=a.cloneRange();c.selectNodeContents(b);var d=c.intersection(a),e=d?d.toString():"";return""!=e}function v(a){for(var b,c=a.getNodes([3]),d=0;(b=c[d])&&!u(a,b);)++d;for(var e=c.length-1;(b=c[e])&&!u(a,b);)--e;return c.slice(d,e+1)}function w(a,b){if(a.attributes.length!=b.attributes.length)return!1;for(var c,d,e,f=0,g=a.attributes.length;g>f;++f)if(c=a.attributes[f],e=c.name,"class"!=e){if(d=b.attributes.getNamedItem(e),null===c!=(null===d))return!1;if(c.specified!=d.specified)return!1;if(c.specified&&c.nodeValue!==d.nodeValue)return!1}return!0}function x(a,b){for(var c,d=0,e=a.attributes.length;e>d;++d)if(c=a.attributes[d].name,(!b||!N(b,c))&&a.attributes[d].specified&&"class"!=c)return!0;return!1}function y(a){var b;return a&&1==a.nodeType&&((b=a.parentNode)&&9==b.nodeType&&"on"==b.designMode||U(a)&&!U(a.parentNode))}function z(a){return(U(a)||1!=a.nodeType&&U(a.parentNode))&&!y(a)}function A(a){return a&&1==a.nodeType&&!V.test(T(a,"display"))}function B(a){if(0==a.data.length)return!0;if(W.test(a.data))return!1;var b=T(a.parentNode,"whiteSpace");switch(b){case"pre":case"pre-wrap":case"-moz-pre-wrap":return!1;case"pre-line":if(/[\r\n]/.test(a.data))return!1}return A(a.previousSibling)||A(a.nextSibling)}function C(a){var b,c,d=[];for(b=0;c=a[b++];)d.push(new M(c.startContainer,c.startOffset),new M(c.endContainer,c.endOffset));return d}function D(a,b){for(var c,d,e,f=0,g=a.length;g>f;++f)c=a[f],d=b[2*f],e=b[2*f+1],c.setStartAndEnd(d.node,d.offset,e.node,e.offset)}function E(a,b){return L.isCharacterDataNode(a)?0==b?!!a.previousSibling:b==a.length?!!a.nextSibling:!0:b>0&&bg;++g)"*"==e[g]?k.applyToAnyTagName=!0:k.tagNames.push(e[g].toLowerCase());else k.tagNames=[k.elementTagName]}function K(a,b,c){return new J(a,b,c)}var L=a.dom,M=L.DomPosition,N=L.arrayContains,O=a.util,P=O.forEach,Q="span",R=O.isHostMethod(document,"createElementNS"),S=function(){function a(a,b,c){return b&&c?" ":""}return function(b,c){if("object"==typeof b.classList)b.classList.remove(c);else{var d="string"==typeof b.className,e=d?b.className:b.getAttribute("class");e=e.replace(new RegExp("(^|\\s)"+c+"(\\s|$)"),a),d?b.className=e:b.setAttribute("class",e)}}}(),T=L.getComputedStyleProperty,U=function(){var a=document.createElement("div");return"boolean"==typeof a.isContentEditable?function(a){return a&&1==a.nodeType&&a.isContentEditable}:function(a){return a&&1==a.nodeType&&"false"!=a.contentEditable?"true"==a.contentEditable||U(a.parentNode):!1}}(),V=/^inline(-block|-table)?$/i,W=/[^\r\n\t\f \u200B]/,X=H(!1),Y=H(!0);I.prototype={doMerge:function(a){var b=this.textNodes,c=b[0];if(b.length>1){var d,e=L.getNodeIndex(c),f=[],g=0;P(b,function(b,h){d=b.parentNode,h>0&&(d.removeChild(b),d.hasChildNodes()||L.removeNode(d),a&&P(a,function(a){a.node==b&&(a.node=c,a.offset+=g),a.node==d&&a.offset>e&&(--a.offset,a.offset==e+1&&hi;++i)e=g[i],f=c.getSelfOrAncestorWithClass(e),f&&c.isModifiable(e)&&c.undoToAncestor(f,d);a.setStartAndEnd(g[0],0,h,h.length),c.normalize&&c.postApply(g,a,d,!0),D(b,d)}var k=c.getEmptyElements(a);P(k,function(a){S(a,c.className)})},undoToRanges:function(a){for(var b=a.length;b--;)this.undoToRange(a[b],a);return a},undoToSelection:function(b){var c=a.getSelection(b),d=a.getSelection(b).getAllRanges();this.undoToRanges(d),c.setRanges(d)},isAppliedToRange:function(a){if(a.collapsed||""==a.toString())return!!this.getSelfOrAncestorWithClass(a.commonAncestorContainer);var b=a.getNodes([3]);if(b.length)for(var c,d=0;c=b[d++];)if(!this.isIgnorableWhiteSpaceNode(c)&&u(a,c)&&this.isModifiable(c)&&!this.getSelfOrAncestorWithClass(c))return!1;return!0},isAppliedToRanges:function(a){var b=a.length;if(0==b)return!1;for(;b--;)if(!this.isAppliedToRange(a[b]))return!1;return!0},isAppliedToSelection:function(b){var c=a.getSelection(b);return this.isAppliedToRanges(c.getAllRanges())},toggleRange:function(a){this.isAppliedToRange(a)?this.undoToRange(a):this.applyToRange(a)},toggleSelection:function(a){this.isAppliedToSelection(a)?this.undoToSelection(a):this.applyToSelection(a)},getElementsWithClassIntersectingRange:function(a){var b=[],c=this;return a.getNodes([3],function(a){var d=c.getSelfOrAncestorWithClass(a);d&&!N(b,d)&&b.push(d)}),b},detach:function(){}},J.util={hasClass:f,addClass:g,removeClass:S,getClass:h,hasSameClasses:l,hasAllClasses:m,replaceWithOwnChildren:t,elementsHaveSameNonClassAttributes:w,elementHasNonClassAttributes:x,splitNodeAt:F,isEditableElement:U,isEditingHost:y,isEditable:z},a.CssClassApplier=a.ClassApplier=J,a.createClassApplier=K,O.createAliasForDeprecatedMethod(a,"createCssClassApplier","createClassApplier",b)}),a},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("Highlighter",["ClassApplier"],function(a,b){function c(a,b){return a.characterRange.start-b.characterRange.start}function d(a,b){return b?a.getElementById(b):m(a)}function e(a,b){this.type=a,this.converterCreator=b}function f(a,b){q[a]=new e(a,b)}function g(a){var b=q[a];if(b instanceof e)return b.create();throw new Error("Highlighter type '"+a+"' is not valid")}function h(a,b){this.start=a,this.end=b}function i(a,b,c,d,e,f){e?(this.id=e,p=Math.max(p,e+1)):this.id=p++,this.characterRange=b,this.doc=a,this.classApplier=c,this.converter=d,this.containerElementId=f||null,this.applied=!1}function j(a,b){b=b||"textContent",this.doc=a||document,this.classAppliers={},this.highlights=[],this.converter=g(b)}var k=a.dom,l=k.arrayContains,m=k.getBody,n=a.util.createOptions,o=a.util.forEach,p=1,q={};e.prototype.create=function(){var a=this.converterCreator();return a.type=this.type,a},a.registerHighlighterType=f,h.prototype={intersects:function(a){return this.starta.start},isContiguousWith:function(a){return this.start==a.end||this.end==a.start},union:function(a){return new h(Math.min(this.start,a.start),Math.max(this.end,a.end)); -},intersection:function(a){return new h(Math.max(this.start,a.start),Math.min(this.end,a.end))},getComplements:function(a){var b=[];if(this.start>=a.start){if(this.end<=a.end)return[];b.push(new h(a.end,this.end))}else b.push(new h(this.start,Math.min(this.end,a.start))),this.end>a.end&&b.push(new h(a.end,this.end));return b},toString:function(){return"[CharacterRange("+this.start+", "+this.end+")]"}},h.fromCharacterRange=function(a){return new h(a.start,a.end)};var r={rangeToCharacterRange:function(a,b){var c=a.getBookmark(b);return new h(c.start,c.end)},characterRangeToRange:function(b,c,d){var e=a.createRange(b);return e.moveToBookmark({start:c.start,end:c.end,containerNode:d}),e},serializeSelection:function(a,b){for(var c=a.getAllRanges(),d=c.length,e=[],f=1==d&&a.isBackward(),g=0,h=c.length;h>g;++g)e[g]={characterRange:this.rangeToCharacterRange(c[g],b),backward:f};return e},restoreSelection:function(a,b,c){a.removeAllRanges();for(var d,e,f,g=a.win.document,h=0,i=b.length;i>h;++h)e=b[h],f=e.characterRange,d=this.characterRangeToRange(g,e.characterRange,c),a.addRange(d,e.backward)}};f("textContent",function(){return r}),f("TextRange",function(){var b;return function(){if(!b){var c=a.modules.TextRange;if(!c)throw new Error("TextRange module is missing.");if(!c.supported)throw new Error("TextRange module is present but not supported.");b={rangeToCharacterRange:function(a,b){return h.fromCharacterRange(a.toCharacterRange(b))},characterRangeToRange:function(b,c,d){var e=a.createRange(b);return e.selectCharacters(d,c.start,c.end),e},serializeSelection:function(a,b){return a.saveCharacterRanges(b)},restoreSelection:function(a,b,c){a.restoreCharacterRanges(c,b)}}}return b}}()),i.prototype={getContainerElement:function(){return d(this.doc,this.containerElementId)},getRange:function(){return this.converter.characterRangeToRange(this.doc,this.characterRange,this.getContainerElement())},fromRange:function(a){this.characterRange=this.converter.rangeToCharacterRange(a,this.getContainerElement())},getText:function(){return this.getRange().toString()},containsElement:function(a){return this.getRange().containsNodeContents(a.firstChild)},unapply:function(){this.classApplier.undoToRange(this.getRange()),this.applied=!1},apply:function(){this.classApplier.applyToRange(this.getRange()),this.applied=!0},getHighlightElements:function(){return this.classApplier.getElementsWithClassIntersectingRange(this.getRange())},toString:function(){return"[Highlight(ID: "+this.id+", class: "+this.classApplier.className+", character range: "+this.characterRange.start+" - "+this.characterRange.end+")]"}},j.prototype={addClassApplier:function(a){this.classAppliers[a.className]=a},getHighlightForElement:function(a){for(var b=this.highlights,c=0,d=b.length;d>c;++c)if(b[c].containsElement(a))return b[c];return null},removeHighlights:function(a){for(var b,c=0,d=this.highlights.length;d>c;++c)b=this.highlights[c],l(a,b)&&(b.unapply(),this.highlights.splice(c--,1))},removeAllHighlights:function(){this.removeHighlights(this.highlights)},getIntersectingHighlights:function(a){var b=[],c=this.highlights;return o(a,function(a){o(c,function(c){a.intersectsRange(c.getRange())&&!l(b,c)&&b.push(c)})}),b},highlightCharacterRanges:function(b,c,d){var e,f,g,j=this.highlights,k=this.converter,l=this.doc,m=[],p=b?this.classAppliers[b]:null;d=n(d,{containerElementId:null,exclusive:!0});var q,r,s,t=d.containerElementId,u=d.exclusive;t&&(q=this.doc.getElementById(t),q&&(r=a.createRange(this.doc),r.selectNodeContents(q),s=new h(0,r.toString().length)));var v,w,x,y,z,A;for(e=0,f=c.length;f>e;++e)if(v=c[e],z=[],s&&(v=v.intersection(s)),v.start!=v.end){for(g=0;g0},serialize:function(a){var b,d,e,f,h=this,i=h.highlights;return i.sort(c),a=n(a,{serializeHighlightText:!1,type:h.converter.type}),b=a.type,e=b!=h.converter.type,e&&(f=g(b)),d=["type:"+b],o(i,function(b){var c,g=b.characterRange;e&&(c=b.getContainerElement(),g=f.rangeToCharacterRange(h.converter.characterRangeToRange(h.doc,g,c),c));var i=[g.start,g.end,b.id,b.classApplier.className,b.containerElementId];a.serializeHighlightText&&i.push(b.getText()),d.push(i.join("$"))}),d.join("|")},deserialize:function(a){var b,c,e,f=a.split("|"),j=[],k=f[0],l=!1;if(!k||!(b=/^type:(\w+)$/.exec(k)))throw new Error("Serialized highlights are invalid.");c=b[1],c!=this.converter.type&&(e=g(c),l=!0),f.shift();for(var m,n,o,p,q,r,s=f.length;s-- >0;){if(r=f[s].split("$"),o=new h(+r[0],+r[1]),p=r[4]||null,l&&(q=d(this.doc,p),o=this.converter.rangeToCharacterRange(e.characterRangeToRange(this.doc,o,q),q)),m=this.classAppliers[r[3]],!m)throw new Error("No class applier found for class '"+r[3]+"'");n=new i(this.doc,o,m,this.converter,parseInt(r[2]),p),n.apply(),j.push(n)}this.highlights=j}},a.Highlighter=j,a.createHighlighter=function(a,b){return new j(a,b)}}),a},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("SaveRestore",["WrappedRange"],function(a,b){function c(a,b){return(b||document).getElementById(a)}function d(a,b){var c,d="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),e=o.getDocument(a.startContainer),f=a.cloneRange();return f.collapse(b),c=e.createElement("span"),c.id=d,c.style.lineHeight="0",c.style.display="none",c.className="rangySelectionBoundary",c.appendChild(e.createTextNode(r)),f.insertNode(c),c}function e(a,d,e,f){var g=c(e,a);g?(d[f?"setStartBefore":"setEndBefore"](g),p(g)):b.warn("Marker element has been removed. Cannot restore selection.")}function f(a,b){return b.compareBoundaryPoints(a.START_TO_START,a)}function g(b,c){var e,f,g=a.DomRange.getRangeDocument(b),h=b.toString(),i=q(c);return b.collapsed?(f=d(b,!1),{document:g,markerId:f.id,collapsed:!0}):(f=d(b,!1),e=d(b,!0),{document:g,startMarkerId:e.id,endMarkerId:f.id,collapsed:!1,backward:i,toString:function(){return"original text: '"+h+"', new text: '"+b.toString()+"'"}})}function h(d,f){var g=d.document;"undefined"==typeof f&&(f=!0);var h=a.createRange(g);if(d.collapsed){var i=c(d.markerId,g);if(i){i.style.display="inline";var j=i.previousSibling;j&&3==j.nodeType?(p(i),h.collapseToPoint(j,j.length)):(h.collapseBefore(i),p(i))}else b.warn("Marker element has been removed. Cannot restore selection.")}else e(g,h,d.startMarkerId,!0),e(g,h,d.endMarkerId,!1);return f&&h.normalizeBoundaries(),h}function i(b,d){var e,h,i=[],j=q(d);b=b.slice(0),b.sort(f);for(var k=0,l=b.length;l>k;++k)i[k]=g(b[k],j);for(k=l-1;k>=0;--k)e=b[k],h=a.DomRange.getRangeDocument(e),e.collapsed?e.collapseAfter(c(i[k].markerId,h)):(e.setEndBefore(c(i[k].endMarkerId,h)),e.setStartAfter(c(i[k].startMarkerId,h)));return i}function j(c){if(!a.isSelectionValid(c))return b.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var d=a.getSelection(c),e=d.getAllRanges(),f=1==e.length&&d.isBackward(),g=i(e,f);return f?d.setSingleRange(e[0],f):d.setRanges(e),{win:c,rangeInfos:g,restored:!1}}function k(a){for(var b=[],c=a.length,d=c-1;d>=0;d--)b[d]=h(a[d],!0);return b}function l(b,c){if(!b.restored){var d=b.rangeInfos,e=a.getSelection(b.win),f=k(d),g=d.length;1==g&&c&&a.features.selectionHasExtend&&d[0].backward?(e.removeAllRanges(),e.addRange(f[0],!0)):e.setRanges(f),b.restored=!0}}function m(a,b){var d=c(b,a);d&&p(d)}function n(a){for(var b,c=a.rangeInfos,d=0,e=c.length;e>d;++d)b=c[d],b.collapsed?m(a.doc,b.markerId):(m(a.doc,b.startMarkerId),m(a.doc,b.endMarkerId))}var o=a.dom,p=o.removeNode,q=a.Selection.isDirectionBackward,r="\ufeff";a.util.extend(a,{saveRange:g,restoreRange:h,saveRanges:i,restoreRanges:k,saveSelection:j,restoreSelection:l,removeMarkerElement:m,removeMarkers:n})}),a},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("Serializer",["WrappedSelection"],function(a,b){function c(a){return a.replace(//g,">")}function d(a,b){b=b||[];var e=a.nodeType,f=a.childNodes,g=f.length,h=[e,a.nodeName,g].join(":"),i="",j="";switch(e){case 3:i=c(a.nodeValue);break;case 8:i="";break;default:i="<"+h+">",j=""}i&&b.push(i);for(var k=0;g>k;++k)d(f[k],b);return j&&b.push(j),b}function e(a){var b=d(a).join("");return s(b).toString(16)}function f(a,b,c){var d=[],e=a;for(c=c||t.getDocument(a).documentElement;e&&e!=c;)d.push(t.getNodeIndex(e,!0)),e=e.parentNode;return d.join("/")+":"+b}function g(a,c,d){c||(c=(d||document).documentElement);for(var e,f=a.split(":"),g=c,h=f[0]?f[0].split("/"):[],i=h.length;i--;){if(e=parseInt(h[i],10),!(eg;++g)f[g]=h(e[g],c,d);return f.join("|")}function l(b,c,d){c?d=d||t.getWindow(c):(d=d||window,c=d.document.documentElement);for(var e=b.split("|"),f=a.getSelection(d),g=[],h=0,j=e.length;j>h;++h)g[h]=i(e[h],c,d.document);return f.setRanges(g),f}function m(a,b,c){var d;b?d=c?c.document:t.getDocument(b):(c=c||window,b=c.document.documentElement);for(var e=a.split("|"),f=0,g=e.length;g>f;++f)if(!j(e[f],b,d))return!1;return!0}function n(a){for(var b,c,d=a.split(/[;,]/),e=0,f=d.length;f>e;++e)if(b=d[e].split("="),b[0].replace(/^\s+/,"")==v&&(c=b[1]))return decodeURIComponent(c.replace(/\s+$/,""));return null}function o(a){a=a||window;var b=n(a.document.cookie);b&&l(b,a.doc)}function p(b,c){b=b||window,c="object"==typeof c?c:{};var d=c.expires?";expires="+c.expires.toUTCString():"",e=c.path?";path="+c.path:"",f=c.domain?";domain="+c.domain:"",g=c.secure?";secure":"",h=k(a.getSelection(b));b.document.cookie=encodeURIComponent(v)+"="+encodeURIComponent(h)+d+e+f+g}var q="undefined",r=a.util;(typeof encodeURIComponent==q||typeof decodeURIComponent==q)&&b.fail("encodeURIComponent and/or decodeURIComponent method is missing");var s=function(){function a(a){for(var b,c=[],d=0,e=a.length;e>d;++d)b=a.charCodeAt(d),128>b?c.push(b):2048>b?c.push(b>>6|192,63&b|128):c.push(b>>12|224,b>>6&63|128,63&b|128);return c}function b(){for(var a,b,c=[],d=0;256>d;++d){for(b=d,a=8;a--;)1==(1&b)?b=b>>>1^3988292384:b>>>=1;c[d]=b>>>0}return c}function c(){return d||(d=b()),d}var d=null;return function(b){for(var d,e=a(b),f=-1,g=c(),h=0,i=e.length;i>h;++h)d=255&(f^e[h]),f=f>>>8^g[d];return(-1^f)>>>0}}(),t=a.dom,u=/^([^,]+),([^,\{]+)(\{([^}]+)\})?$/,v="rangySerializedSelection";r.extend(a,{serializePosition:f,deserializePosition:g,serializeRange:h,deserializeRange:i,canDeserializeRange:j,serializeSelection:k,deserializeSelection:l,canDeserializeSelection:m,restoreSelectionFromCookie:o,saveSelectionCookie:p,getElementChecksum:e,nodeToInfoString:d}),r.crc32=s}),a},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("TextRange",["WrappedSelection"],function(a,b){function c(a,b){function c(a,b,c){h.push({start:a,end:b,isWord:c})}for(var d,e,f,g=a.join(""),h=[],i=0;d=b.wordRegex.exec(g);){if(e=d.index,f=e+d[0].length,e>i&&c(i,e,!1),b.includeTrailingSpace)for(;$.test(a[f]);)++f;c(e,f,!0),i=f}return ie;++e)c[e].token=d;return d}function e(a,b,c){for(var e,f=c(a,b),g=[],h=0;e=f[h++];)g.push(d(a,e));return g}function f(a){var b=a||"",c="string"==typeof b?b.split(""):b;return c.sort(function(a,b){return a.charCodeAt(0)-b.charCodeAt(0)}),c.join("").replace(/(.)\1+/g,"$1")}function g(a){var b,c;return a?(b=a.language||_,c={},U(c,ia[b]||ia[_]),U(c,a),c):ia[_]}function h(a,b){var c=V(a,b);return b.hasOwnProperty("wordOptions")&&(c.wordOptions=g(c.wordOptions)),b.hasOwnProperty("characterOptions")&&(c.characterOptions=V(c.characterOptions,ga)),c}function i(a,b){var c=na(a,"display",b),d=a.tagName.toLowerCase();return"block"==c&&fa&&oa.hasOwnProperty(d)?oa[d]:c}function j(a){for(var b=o(a),c=0,d=b.length;d>c;++c)if(1==b[c].nodeType&&"none"==i(b[c]))return!0;return!1}function k(a){var b;return 3==a.nodeType&&(b=a.parentNode)&&"hidden"==na(b,"visibility")}function l(a){return a&&(1==a.nodeType&&!/^(inline(-block|-table)?|none)$/.test(i(a))||9==a.nodeType||11==a.nodeType)}function m(a){return S.isCharacterDataNode(a)||!/^(area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param)$/i.test(a.nodeName)}function n(a){for(var b=[];a.parentNode;)b.unshift(a.parentNode),a=a.parentNode;return b}function o(a){return n(a).concat([a])}function p(a){for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}function q(a,b){return!b&&a.hasChildNodes()?a.firstChild:p(a)}function r(a){var b=a.previousSibling;if(b){for(a=b;a.hasChildNodes();)a=a.lastChild;return a}var c=a.parentNode;return c&&1==c.nodeType?c:null}function s(a){if(!a||3!=a.nodeType)return!1;var b=a.data;if(""===b)return!0;var c=a.parentNode;if(!c||1!=c.nodeType)return!1;var d=na(a.parentNode,"whiteSpace");return/^[\t\n\r ]+$/.test(b)&&/^(normal|nowrap)$/.test(d)||/^[\t\r ]+$/.test(b)&&"pre-line"==d}function t(a){if(""===a.data)return!0;if(!s(a))return!1;var b=a.parentNode;return b?j(a)?!0:!1:!0}function u(a){var b=a.nodeType;return 7==b||8==b||j(a)||/^(script|style)$/i.test(a.nodeName)||k(a)||t(a)}function v(a,b){var c=a.nodeType;return 7==c||8==c||1==c&&"none"==i(a,b)}function w(){this.store={}}function x(a,b,c){return function(d){var e=this.cache;if(e.hasOwnProperty(a))return pa++,e[a];qa++;var f=b.call(this,c?this[c]:this,d);return e[a]=f,f}}function y(a,b){this.node=a,this.session=b,this.cache=new w,this.positions=new w}function z(a,b){this.offset=b,this.nodeWrapper=a,this.node=a.node,this.session=a.session,this.cache=new w}function A(){return"[Position("+S.inspectNode(this.node)+":"+this.offset+")]"}function B(){return D(),Da=new Ea}function C(){return Da||B()}function D(){Da&&Da.detach(),Da=null}function E(a,c,d,e){function f(){var a=null;return c?(a=h,i||(h=h.previousVisible(),i=!h||d&&h.equals(d))):i||(a=h=h.nextVisible(),i=!h||d&&h.equals(d)),i&&(h=null),a}d&&(c?u(d.node)&&(d=a.previousVisible()):u(d.node)&&(d=d.nextVisible()));var g,h=a,i=!1,j=!1;return{next:function(){if(j)return j=!1,g;for(var a,b;a=f();)if(b=a.getCharacter(e))return g=a,a;return null},rewind:function(){if(!g)throw b.createError("createCharacterIterator: cannot rewind. Only one position can be rewound.");j=!0},dispose:function(){a=d=null}}}function F(a,b,c){function d(a){for(var b,c,d=[],e=a?f:g,h=!1,i=!1;b=e.next();){if(c=b.character,Z.test(c))i&&(i=!1,h=!0);else{if(h){e.rewind();break}i=!0}d.push(b)}return d}var f=E(a,!1,null,b),g=E(a,!0,null,b),h=c.tokenizer,i=d(!0),j=d(!1).reverse(),k=e(j.concat(i),c,h),l=i.length?k.slice(Fa(k,i[0].token)):[],m=j.length?k.slice(0,Fa(k,j.pop().token)+1):[];return{nextEndToken:function(){for(var a,b;1==l.length&&!(a=l[0]).isWord&&(b=d(!0)).length>0;)l=e(a.chars.concat(b),c,h);return l.shift()},previousStartToken:function(){for(var a,b;1==m.length&&!(a=m[0]).isWord&&(b=d(!1)).length>0;)m=e(b.reverse().concat(a.chars),c,h);return m.pop()},dispose:function(){f.dispose(),g.dispose(),l=m=null}}}function G(a,b,c,d,e){var f,g,h,i,j=0,k=a,l=Math.abs(c);if(0!==c){var m=0>c;switch(b){case Q:for(g=E(a,m,null,d);(f=g.next())&&l>j;)++j,k=f;h=f,g.dispose();break;case R:for(var n=F(a,d,e),o=m?n.previousStartToken:n.nextEndToken;(i=o())&&l>j;)i.isWord&&(++j,k=m?i.chars[0]:i.chars[i.chars.length-1]);break;default:throw new Error("movePositionBy: unit '"+b+"' not implemented")}m?(k=k.previousVisible(),j=-j):k&&k.isLeadingSpace&&!k.isTrailingSpace&&(b==R&&(g=E(a,!1,null,d),h=g.next(),g.dispose()),h&&(k=h.previousVisible()))}return{position:k,unitsMoved:j}}function H(a,b,c,d){var e=a.getRangeBoundaryPosition(b,!0),f=a.getRangeBoundaryPosition(b,!1),g=d?f:e,h=d?e:f;return E(g,!!d,h,c)}function I(a,b,c){for(var d,e=[],f=H(a,b,c);d=f.next();)e.push(d);return f.dispose(),e}function J(b,c,d){var e=a.createRange(b.node);return e.setStartAndEnd(b.node,b.offset,c.node,c.offset),!e.expand("word",{wordOptions:d})}function K(a,b,c,d,e){function f(a,b){var c=p[a].previousVisible(),d=p[b-1],f=!e.wholeWordsOnly||J(c,d,e.wordOptions);return{startPos:c,endPos:d,valid:f}}for(var g,h,i,j,k,l,m=aa(e.direction),n=E(a,m,a.session.getRangeBoundaryPosition(d,m),e.characterOptions),o="",p=[],q=null;g=n.next();)if(h=g.character,c||e.caseSensitive||(h=h.toLowerCase()),m?(p.unshift(g),o=h+o):(p.push(g),o+=h),c){if(k=b.exec(o))if(i=k.index,j=i+k[0].length,l){if(!m&&j0){q=f(i,j);break}}else l=!0}else if(-1!=(i=o.indexOf(b))){q=f(i,i+b.length);break}return l&&(q=f(i,j)),n.dispose(),q}function L(a){return function(){var b=!!Da,c=C(),d=[c].concat(T.toArray(arguments)),e=a.apply(this,d);return b||D(),e}}function M(a,b){return L(function(c,d,e,f){typeof e==P&&(e=d,d=Q),f=h(f,ka);var g=a;b&&(g=e>=0,this.collapse(!g));var i=G(c.getRangeBoundaryPosition(this,g),d,e,f.characterOptions,f.wordOptions),j=i.position;return this[g?"setStart":"setEnd"](j.node,j.offset),i.unitsMoved})}function N(a){return L(function(b,c){c=V(c,ga);for(var d,e=H(b,this,c,!a),f=0;(d=e.next())&&Z.test(d.character);)++f;e.dispose();var g=f>0;return g&&this[a?"moveStart":"moveEnd"]("character",a?f:-f,{characterOptions:c}),g})}function O(a){return L(function(b,c){var d=!1;return this.changeEachRange(function(b){d=b[a](c)||d}),d})}var P="undefined",Q="character",R="word",S=a.dom,T=a.util,U=T.extend,V=T.createOptions,W=S.getBody,X=/^[ \t\f\r\n]+$/,Y=/^[ \t\f\r]+$/,Z=/^[\t-\r \u0085\u00A0\u1680\u180E\u2000-\u200B\u2028\u2029\u202F\u205F\u3000]+$/,$=/^[\t \u00A0\u1680\u180E\u2000-\u200B\u202F\u205F\u3000]+$/,_="en",aa=a.Selection.isDirectionBackward,ba=!1,ca=!1,da=!1,ea=!0;!function(){var b=S.createTestElement(document,"

      1

      ",!0),c=b.firstChild,d=a.getSelection();d.collapse(c.lastChild,2),d.setStart(c.firstChild,0),ba=1==(""+d).length,b.innerHTML="1
      ",d.collapse(b,2),d.setStart(b.firstChild,0),ca=1==(""+d).length,b.innerHTML="1

      1

      ",d.collapse(b,2),d.setStart(b.firstChild,0),da=1==(""+d).length,S.removeNode(b),d.removeAllRanges()}();var fa,ga={includeBlockContentTrailingSpace:!0,includeSpaceBeforeBr:!0,includeSpaceBeforeBlock:!0,includePreLineTrailingSpace:!0,ignoreCharacters:""},ha={includeBlockContentTrailingSpace:!ea,includeSpaceBeforeBr:!ca,includeSpaceBeforeBlock:!da,includePreLineTrailingSpace:!0},ia={en:{wordRegex:/[a-z0-9]+('[a-z0-9]+)*/gi,includeTrailingSpace:!1,tokenizer:c}},ja={caseSensitive:!1,withinRange:null,wholeWordsOnly:!1,wrap:!1,direction:"forward",wordOptions:null,characterOptions:null},ka={wordOptions:null,characterOptions:null},la={wordOptions:null,characterOptions:null,trim:!1,trimStart:!0,trimEnd:!0},ma={wordOptions:null,characterOptions:null,direction:"forward"},na=S.getComputedStyleProperty;!function(){var a=document.createElement("table"),b=W(document);b.appendChild(a),fa="block"==na(a,"display"),b.removeChild(a)}();var oa={table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell"};w.prototype={get:function(a){return this.store.hasOwnProperty(a)?this.store[a]:null},set:function(a,b){return this.store[a]=b}};var pa=0,qa=0,ra={getPosition:function(a){var b=this.positions;return b.get(a)||b.set(a,new z(this,a))},toString:function(){return"[NodeWrapper("+S.inspectNode(this.node)+")]"}};y.prototype=ra;var sa="EMPTY",ta="NON_SPACE",ua="UNCOLLAPSIBLE_SPACE",va="COLLAPSIBLE_SPACE",wa="TRAILING_SPACE_BEFORE_BLOCK",xa="TRAILING_SPACE_IN_BLOCK",ya="TRAILING_SPACE_BEFORE_BR",za="PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK",Aa="TRAILING_LINE_BREAK_AFTER_BR",Ba="INCLUDED_TRAILING_LINE_BREAK_AFTER_BR";U(ra,{isCharacterDataNode:x("isCharacterDataNode",S.isCharacterDataNode,"node"),getNodeIndex:x("nodeIndex",S.getNodeIndex,"node"),getLength:x("nodeLength",S.getNodeLength,"node"),containsPositions:x("containsPositions",m,"node"),isWhitespace:x("isWhitespace",s,"node"),isCollapsedWhitespace:x("isCollapsedWhitespace",t,"node"),getComputedDisplay:x("computedDisplay",i,"node"),isCollapsed:x("collapsed",u,"node"),isIgnored:x("ignored",v,"node"),next:x("nextPos",q,"node"),previous:x("previous",r,"node"),getTextNodeInfo:x("textNodeInfo",function(a){var b=null,c=!1,d=na(a.parentNode,"whiteSpace"),e="pre-line"==d;return e?(b=Y,c=!0):("normal"==d||"nowrap"==d)&&(b=X,c=!0),{node:a,text:a.data,spaceRegex:b,collapseSpaces:c,preLine:e}},"node"),hasInnerText:x("hasInnerText",function(a,b){for(var c=this.session,d=c.getPosition(a.parentNode,this.getNodeIndex()+1),e=c.getPosition(a,0),f=b?d:e,g=b?e:d;f!==g;){if(f.prepopulateChar(),f.isDefinitelyNonEmpty())return!0;f=b?f.previousVisible():f.nextVisible()}return!1},"node"),isRenderedBlock:x("isRenderedBlock",function(a){for(var b=a.getElementsByTagName("br"),c=0,d=b.length;d>c;++c)if(!u(b[c]))return!0;return this.hasInnerText()},"node"),getTrailingSpace:x("trailingSpace",function(a){if("br"==a.tagName.toLowerCase())return"";switch(this.getComputedDisplay()){case"inline":for(var b=a.lastChild;b;){if(!v(b))return 1==b.nodeType?this.session.getNodeWrapper(b).getTrailingSpace():"";b=b.previousSibling}break;case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":break;case"table-cell":return" ";default:return this.isRenderedBlock(!0)?"\n":""}return""},"node"),getLeadingSpace:x("leadingSpace",function(a){switch(this.getComputedDisplay()){case"inline":case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":case"table-cell":break;default:return this.isRenderedBlock(!1)?"\n":""}return""},"node")});var Ca={character:"",characterType:sa,isBr:!1,prepopulateChar:function(){var a=this;if(!a.prepopulatedChar){var b=a.node,c=a.offset,d="",e=sa,f=!1;if(c>0)if(3==b.nodeType){var g=b.data,h=g.charAt(c-1),i=a.nodeWrapper.getTextNodeInfo(),j=i.spaceRegex;i.collapseSpaces?j.test(h)?c>1&&j.test(g.charAt(c-2))||(i.preLine&&"\n"===g.charAt(c)?(d=" ",e=za):(d=" ",e=va)):(d=h,e=ta,f=!0):(d=h,e=ua,f=!0)}else{var k=b.childNodes[c-1];if(k&&1==k.nodeType&&!u(k)&&("br"==k.tagName.toLowerCase()?(d="\n",a.isBr=!0,e=va,f=!1):a.checkForTrailingSpace=!0),!d){var l=b.childNodes[c];l&&1==l.nodeType&&!u(l)&&(a.checkForLeadingSpace=!0)}}a.prepopulatedChar=!0,a.character=d,a.characterType=e,a.isCharInvariant=f}},isDefinitelyNonEmpty:function(){var a=this.characterType;return a==ta||a==ua},resolveLeadingAndTrailingSpaces:function(){if(this.prepopulatedChar||this.prepopulateChar(),this.checkForTrailingSpace){var a=this.session.getNodeWrapper(this.node.childNodes[this.offset-1]).getTrailingSpace();a&&(this.isTrailingSpace=!0,this.character=a,this.characterType=va),this.checkForTrailingSpace=!1}if(this.checkForLeadingSpace){var b=this.session.getNodeWrapper(this.node.childNodes[this.offset]).getLeadingSpace();b&&(this.isLeadingSpace=!0,this.character=b,this.characterType=va),this.checkForLeadingSpace=!1}},getPrecedingUncollapsedPosition:function(a){for(var b,c=this;c=c.previousVisible();)if(b=c.getCharacter(a),""!==b)return c;return null},getCharacter:function(a){function b(){return n||(k=o.getPrecedingUncollapsedPosition(a),n=!0),k}this.resolveLeadingAndTrailingSpaces();var c,d=this.character,e=f(a.ignoreCharacters),g=""!==d&&e.indexOf(d)>-1;if(this.isCharInvariant)return c=g?"":d;var h=["character",a.includeSpaceBeforeBr,a.includeBlockContentTrailingSpace,a.includePreLineTrailingSpace,e].join("_"),i=this.cache.get(h);if(null!==i)return i;var j,k,l="",m=this.characterType==va,n=!1,o=this;return m&&(this.type==Ba?l="\n":" "==d&&(!b()||k.isTrailingSpace||"\n"==k.character||" "==k.character&&k.characterType==va)||("\n"==d&&this.isLeadingSpace?b()&&"\n"!=k.character&&(l="\n"):(j=this.nextUncollapsed(),j&&(j.isBr?this.type=ya:j.isTrailingSpace&&"\n"==j.character?this.type=xa:j.isLeadingSpace&&"\n"==j.character&&(this.type=wa),"\n"==j.character?(this.type!=ya||a.includeSpaceBeforeBr)&&(this.type!=wa||a.includeSpaceBeforeBlock)&&(this.type==xa&&j.isTrailingSpace&&!a.includeBlockContentTrailingSpace||(this.type!=za||j.type!=ta||a.includePreLineTrailingSpace)&&("\n"==d?j.isTrailingSpace?this.isTrailingSpace||this.isBr&&(j.type=Aa,b()&&k.isLeadingSpace&&!k.isTrailingSpace&&"\n"==k.character?j.character="":j.type=Ba):l="\n":" "==d&&(l=" "))):l=d)))),e.indexOf(l)>-1&&(l=""),this.cache.set(h,l),l},equals:function(a){return!!a&&this.node===a.node&&this.offset===a.offset},inspect:A,toString:function(){return this.character}};z.prototype=Ca,U(Ca,{next:x("nextPos",function(a){var b=a.nodeWrapper,c=a.node,d=a.offset,e=b.session;if(!c)return null;var f,g,h;return d==b.getLength()?(f=c.parentNode,g=f?b.getNodeIndex()+1:0):b.isCharacterDataNode()?(f=c,g=d+1):(h=c.childNodes[d],e.getNodeWrapper(h).containsPositions()?(f=h,g=0):(f=c,g=d+1)),f?e.getPosition(f,g):null}),previous:x("previous",function(a){var b,c,d,e=a.nodeWrapper,f=a.node,g=a.offset,h=e.session;return 0==g?(b=f.parentNode,c=b?e.getNodeIndex():0):e.isCharacterDataNode()?(b=f,c=g-1):(d=f.childNodes[g-1],h.getNodeWrapper(d).containsPositions()?(b=d,c=S.getNodeLength(d)):(b=f,c=g-1)),b?h.getPosition(b,c):null}),nextVisible:x("nextVisible",function(a){var b=a.next();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex()+1)),e}),nextUncollapsed:x("nextUncollapsed",function(a){for(var b=a;b=b.nextVisible();)if(b.resolveLeadingAndTrailingSpaces(),""!==b.character)return b;return null}),previousVisible:x("previousVisible",function(a){var b=a.previous();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex())),e})});var Da=null,Ea=function(){function a(a){var b=new w;return{get:function(c){var d=b.get(c[a]);if(d)for(var e,f=0;e=d[f++];)if(e.node===c)return e;return null},set:function(c){var d=c.node[a],e=b.get(d)||b.set(d,[]);e.push(c)}}}function b(){this.initCaches()}var c=T.isHostProperty(document.documentElement,"uniqueID");return b.prototype={initCaches:function(){this.elementCache=c?function(){var a=new w;return{get:function(b){return a.get(b.uniqueID)},set:function(b){a.set(b.node.uniqueID,b)}}}():a("tagName"),this.textNodeCache=a("data"),this.otherNodeCache=a("nodeName")},getNodeWrapper:function(a){var b;switch(a.nodeType){case 1:b=this.elementCache;break;case 3:b=this.textNodeCache;break;default:b=this.otherNodeCache}var c=b.get(a);return c||(c=new y(a,this),b.set(c)),c},getPosition:function(a,b){return this.getNodeWrapper(a).getPosition(b)},getRangeBoundaryPosition:function(a,b){var c=b?"start":"end";return this.getPosition(a[c+"Container"],a[c+"Offset"])},detach:function(){this.elementCache=this.textNodeCache=this.otherNodeCache=null}},b}();U(S,{nextNode:q,previousNode:r});var Fa=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)if(a[c]===b)return c;return-1};U(a.rangePrototype,{moveStart:M(!0,!1),moveEnd:M(!1,!1),move:M(!0,!0),trimStart:N(!0),trimEnd:N(!1),trim:L(function(a,b){var c=this.trimStart(b),d=this.trimEnd(b);return c||d}),expand:L(function(a,b,c){var d=!1;c=h(c,la);var e=c.characterOptions;if(b||(b=Q),b==R){var f,g,i=c.wordOptions,j=a.getRangeBoundaryPosition(this,!0),k=a.getRangeBoundaryPosition(this,!1),l=F(j,e,i),m=l.nextEndToken(),n=m.chars[0].previousVisible();if(this.collapsed)f=m;else{var o=F(k,e,i);f=o.previousStartToken()}return g=f.chars[f.chars.length-1],n.equals(j)||(this.setStart(n.node,n.offset),d=!0),g&&!g.equals(k)&&(this.setEnd(g.node,g.offset),d=!0),c.trim&&(c.trimStart&&(d=this.trimStart(e)||d),c.trimEnd&&(d=this.trimEnd(e)||d)),d}return this.moveEnd(Q,1,c)}),text:L(function(a,b){return this.collapsed?"":I(a,this,V(b,ga)).join("")}),selectCharacters:L(function(a,b,c,d,e){var f={characterOptions:e};b||(b=W(this.getDocument())),this.selectNodeContents(b),this.collapse(!0),this.moveStart("character",c,f),this.collapse(!0),this.moveEnd("character",d-c,f)}),toCharacterRange:L(function(a,b,c){b||(b=W(this.getDocument()));var d,e,f=b.parentNode,g=S.getNodeIndex(b),h=-1==S.comparePoints(this.startContainer,this.endContainer,f,g),i=this.cloneRange();return h?(i.setStartAndEnd(this.startContainer,this.startOffset,f,g),d=-i.text(c).length):(i.setStartAndEnd(f,g,this.startContainer,this.startOffset),d=i.text(c).length),e=d+this.text(c).length,{start:d,end:e}}),findText:L(function(b,c,d){d=h(d,ja),d.wholeWordsOnly&&(d.wordOptions.includeTrailingSpace=!1);var e=aa(d.direction),f=d.withinRange;f||(f=a.createRange(),f.selectNodeContents(this.getDocument()));var g=c,i=!1;"string"==typeof g?d.caseSensitive||(g=g.toLowerCase()):i=!0;var j=b.getRangeBoundaryPosition(this,!e),k=f.comparePoint(j.node,j.offset);-1===k?j=b.getRangeBoundaryPosition(f,!0):1===k&&(j=b.getRangeBoundaryPosition(f,!1));for(var l,m=j,n=!1;;)if(l=K(m,g,i,f,d)){if(l.valid)return this.setStartAndEnd(l.startPos.node,l.startPos.offset,l.endPos.node,l.endPos.offset),!0;m=e?l.startPos:l.endPos}else{if(!d.wrap||n)return!1; -f=f.cloneRange(),m=b.getRangeBoundaryPosition(f,!e),f.setBoundary(j.node,j.offset,e),n=!0}}),pasteHtml:function(a){if(this.deleteContents(),a){var b=this.createContextualFragment(a),c=b.lastChild;this.insertNode(b),this.collapseAfter(c)}}}),U(a.selectionPrototype,{expand:L(function(a,b,c){this.changeEachRange(function(a){a.expand(b,c)})}),move:L(function(a,b,c,d){var e=0;if(this.focusNode){this.collapse(this.focusNode,this.focusOffset);var f=this.getRangeAt(0);d||(d={}),d.characterOptions=V(d.characterOptions,ha),e=f.move(b,c,d),this.setSingleRange(f)}return e}),trimStart:O("trimStart"),trimEnd:O("trimEnd"),trim:O("trim"),selectCharacters:L(function(b,c,d,e,f,g){var h=a.createRange(c);h.selectCharacters(c,d,e,g),this.setSingleRange(h,f)}),saveCharacterRanges:L(function(a,b,c){for(var d=this.getAllRanges(),e=d.length,f=[],g=1==e&&this.isBackward(),h=0,i=d.length;i>h;++h)f[h]={characterRange:d[h].toCharacterRange(b,c),backward:g,characterOptions:c};return f}),restoreCharacterRanges:L(function(b,c,d){this.removeAllRanges();for(var e,f,g,h=0,i=d.length;i>h;++h)f=d[h],g=f.characterRange,e=a.createRange(c),e.selectCharacters(c,g.start,g.end,f.characterOptions),this.addRange(e,f.backward)}),text:L(function(a,b){for(var c=[],d=0,e=this.rangeCount;e>d;++d)c[d]=this.getRangeAt(d).text(b);return c.join("")})}),a.innerText=function(b,c){var d=a.createRange(b);d.selectNodeContents(b);var e=d.text(c);return e},a.createWordIterator=function(a,b,c){var d=C();c=h(c,ma);var e=d.getPosition(a,b),f=F(e,c.characterOptions,c.wordOptions),g=aa(c.direction);return{next:function(){return g?f.previousStartToken():f.nextEndToken()},dispose:function(){f.dispose(),this.next=function(){}}}},a.noMutation=function(a){var b=C();a(b),D()},a.noMutation.createEntryPointFunction=L,a.textRange={isBlockNode:l,isCollapsedWhitespaceNode:t,createPosition:L(function(a,b,c){return a.getPosition(b,c)})}}),a},this),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="textAngular"),function(){"use strict";var a={ie:function(){for(var a,b=3,c=document.createElement("div"),d=c.getElementsByTagName("i");c.innerHTML="",d[0];);return b>4?b:a}(),webkit:/AppleWebKit\/([\d.]+)/i.test(navigator.userAgent)},b=!1;a.webkit&&(document.addEventListener("mousedown",function(a){var c=a||window.event,d=c.target;if(b&&null!==d){for(var e=!1,f=d;null!==f&&"html"!==f.tagName.toLowerCase()&&!e;)e="true"===f.contentEditable,f=f.parentNode;e||(document.getElementById("textAngular-editableFix-010203040506070809").setSelectionRange(0,0),d.focus(),d.select&&d.select())}b=!1},!1),angular.element(document).ready(function(){angular.element(document.body).append(angular.element(''))}));var c=/^(address|article|aside|audio|blockquote|canvas|dd|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|noscript|ol|output|p|pre|section|table|tfoot|ul|video)$/i,d=/^(ul|li|ol)$/i,e=/^(address|article|aside|audio|blockquote|canvas|dd|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|noscript|ol|output|p|pre|section|table|tfoot|ul|video|li)$/i;String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var f,g,h,i,j,k;if(a.ie>8||void 0===a.ie){for(var l=document.styleSheets,m=0;m
      ");return d[0].innerHTML=c,angular.forEach(a,function(a){var c=[];a.selector&&""!==a.selector?c=d.find(a.selector):a.customAttribute&&""!==a.customAttribute&&(c=b.getByAttribute(d,a.customAttribute)),angular.forEach(c,function(b){b=angular.element(b),a.selector&&""!==a.selector&&a.customAttribute&&""!==a.customAttribute?void 0!==b.attr(a.customAttribute)&&a.renderLogic(b):a.renderLogic(b)})}),d[0].innerHTML}}]).factory("taFixChrome",function(){var a=function(a){if(!a||!angular.isString(a)||a.length<=0)return a;for(var b,c,d,e=/<([^>\/]+?)style=("([^"]+)"|'([^']+)')([^>]*)>/gi,f="",g=0;b=e.exec(a);)c=b[3]||b[4],c&&c.match(/line-height: 1.[0-9]{3,12};|color: inherit; line-height: 1.1;/i)&&(c=c.replace(/( |)font-family: inherit;|( |)line-height: 1.[0-9]{3,12};|( |)color: inherit;/gi,""),d="<"+b[1].trim(),c.trim().length>0&&(d+=" style="+b[2].substring(0,1)+c+b[2].substring(0,1)),d+=b[5].trim()+">",f+=a.substring(g,b.index)+d,g=b.index+b[0].length);return f+=a.substring(g),g>0?f.replace(/(.*?)<\/span>(|)/gi,"$1"):a};return a}).factory("taSanitize",["$sanitize",function(a){function b(a,b){for(var c,d=0,e=0,f=/<[^>]*>/gi;c=f.exec(a);)if(e=c.index,"/"===c[0].substr(1,1)){if(0===d)break;d--}else d++;return b+a.substring(0,e)+angular.element(b)[0].outerHTML.substring(b.length)+a.substring(e)}function c(a){if(!a||!angular.isString(a)||a.length<=0)return a;for(var d,f,g,h,i,k,l=/<([^>\/]+?)style=("([^"]+)"|'([^']+)')([^>]*)>/gi,m="",n="",o=0;f=l.exec(a);){h=f[3]||f[4];var p=new RegExp(j,"i");if(angular.isString(h)&&p.test(h)){i="";for(var q=new RegExp(j,"ig");g=q.exec(h);)for(d=0;d");k=c(a.substring(o,f.index)),n+=m.length>0?b(k,m):k,h=h.replace(new RegExp(j,"ig"),""),n+="<"+f[1].trim(),h.length>0&&(n+=' style="'+h+'"'),n+=f[5]+">",o=f.index+f[0].length,m=i}}return n+=m.length>0?b(a.substring(o),m):a.substring(o)}function d(a){if(!a||!angular.isString(a)||a.length<=0)return a;for(var b,c=/<([^>\/]+?)align=("([^"]+)"|'([^']+)')([^>]*)>/gi,d="",e=0;b=c.exec(a);){d+=a.substring(e,b.index),e=b.index+b[0].length;var f="<"+b[1]+b[5];/style=("([^"]+)"|'([^']+)')/gi.test(f)?f=f.replace(/style=("([^"]+)"|'([^']+)')/i,'style="$2$3 text-align:'+(b[3]||b[4])+';"'):f+=' style="text-align:'+(b[3]||b[4])+';"',f+=">",d+=f}return d+a.substring(e)}for(var e=[{property:"font-weight",values:["bold"],tag:"b"},{property:"font-style",values:["italic"],tag:"i"}],f=[],g=0;g0&&(h+="|"),h+=e[g].values[i];h+=");)",f.push(h)}var j="("+f.join("|")+")";return function(b,e,f){if(!f)try{b=c(b)}catch(g){}b=d(b);var h;try{h=a(b),f&&(h=b)}catch(g){h=e||""}var i,j=h.match(/(]*>.*?<\/pre[^>]*>)/gi),k=h.replace(/(&#(9|10);)*/gi,""),l=/]*>.*?<\/pre[^>]*>/gi,m=0,n=0;for(h="";null!==(i=l.exec(k))&&m=0;e--)d=angular.element("<"+c+">"+f[e].innerHTML+""),b.after(d);b.remove(),a.setSelectionToElementEnd(d[0])},g=function(b){/()$/i.test(b.innerHTML.trim())?a.setSelectionBeforeElement(angular.element(b).find("br")[0]):a.setSelectionToElementEnd(b)},h=function(a,b){var c=angular.element("<"+b+">"+a[0].innerHTML+"");a.after(c),a.remove(),g(c.find("li")[0])},i=function(a,c,d){for(var e="",f=0;f"+a[f].innerHTML+"";var h=angular.element("<"+d+">"+e+"");c.after(h),c.remove(),g(h.find("li")[0])};return function(g,j){return g=b(g),function(k,l,m,n){var o,p,q,r,s,t,u,v=angular.element("<"+g+">");try{u=a.getSelectionElement()}catch(w){}var x=angular.element(u);if(void 0!==u){var y=u.tagName.toLowerCase();if("insertorderedlist"===k.toLowerCase()||"insertunorderedlist"===k.toLowerCase()){var z=b("insertorderedlist"===k.toLowerCase()?"ol":"ul");if(y===z)return f(x,g);if("li"===y&&x.parent()[0].tagName.toLowerCase()===z&&1===x.parent().children().length)return f(x.parent(),g);if("li"===y&&x.parent()[0].tagName.toLowerCase()!==z&&1===x.parent().children().length)return h(x.parent(),z);if(y.match(c)&&!x.hasClass("ta-bind")){if("ol"===y||"ul"===y)return h(x,z);var A=!1;return angular.forEach(x.children(),function(a){a.tagName.match(c)&&(A=!0)}),A?i(x.children(),x,z):i([angular.element("
      "+u.innerHTML+"
      ")[0]],x,z)}if(y.match(c)){if(r=a.getOnlySelectedElements(),0===r.length)p=angular.element("<"+z+">
    • "+u.innerHTML+"
    • "),x.html(""),x.append(p);else{if(1===r.length&&("ol"===r[0].tagName.toLowerCase()||"ul"===r[0].tagName.toLowerCase()))return r[0].tagName.toLowerCase()===z?f(angular.element(r[0]),g):h(angular.element(r[0]),z);q="";var B=[];for(o=0;o"+C[0].innerHTML+"":C[0].childNodes[0].innerHTML,B.unshift(C)}p=angular.element("<"+z+">"+q+""),B.pop().replaceWith(p),angular.forEach(B,function(a){a.remove()})}return void a.setSelectionToElementEnd(p[0])}}else{if("formatblock"===k.toLowerCase()){for(t=m.toLowerCase().replace(/[<>]/gi,""),"default"===t.trim()&&(t=g,m="<"+g+">"),p="li"===y?x.parent():x;!p[0].tagName||!p[0].tagName.match(c)&&!p.parent().attr("contenteditable");)p=p.parent(),y=(p[0].tagName||"").toLowerCase();if(y===t){r=p.children();var D=!1;for(o=0;o=0;o--)r[o].parentNode&&r[o].parentNode.removeChild(r[o])}else for(o=0;o"),v[0].innerHTML=F[o].outerHTML,F[o]=v[0]),E.parent()[0].insertBefore(F[o],E[0]);E.remove()}return void a.setSelectionToElementEnd(p[0])}if("createlink"===k.toLowerCase()){var G='
      ',H="",I=a.getSelection();if(I.collapsed)a.insertHtml(G+m+H,j);else if(rangy.getSelection().getRangeAt(0).canSurroundContents()){var J=angular.element(G+H)[0];rangy.getSelection().getRangeAt(0).surroundContents(J)}return}if("inserthtml"===k.toLowerCase())return void a.insertHtml(m,j)}}try{e[0].execCommand(k,l,m)}catch(w){}}}}]).service("taSelection",["$window","$document","taDOM",function(a,b,d){var f=b[0],g=a.rangy,h=function(a,b){return a.tagName&&a.tagName.match(/^br$/i)&&0===b&&!a.previousSibling?{element:a.parentNode,offset:0}:{element:a,offset:b}},i={getSelection:function(){var a=g.getSelection().getRangeAt(0),b=a.commonAncestorContainer,c={start:h(a.startContainer,a.startOffset),end:h(a.endContainer,a.endOffset),collapsed:a.collapsed};return b=3===b.nodeType?b.parentNode:b,b.parentNode===c.start.element||b.parentNode===c.end.element?c.container=b.parentNode:c.container=b,c},getOnlySelectedElements:function(){var a=g.getSelection().getRangeAt(0),b=a.commonAncestorContainer;return b=3===b.nodeType?b.parentNode:b,a.getNodes([1],function(a){return a.parentNode===b})},getSelectionElement:function(){return i.getSelection().container},setSelection:function(a,b,c){var d=g.createRange();d.setStart(a,b),d.setEnd(a,c),g.getSelection().setSingleRange(d)},setSelectionBeforeElement:function(a){var b=g.createRange();b.selectNode(a),b.collapse(!0),g.getSelection().setSingleRange(b)},setSelectionAfterElement:function(a){var b=g.createRange();b.selectNode(a),b.collapse(!1),g.getSelection().setSingleRange(b)},setSelectionToElementStart:function(a){var b=g.createRange();b.selectNodeContents(a),b.collapse(!0),g.getSelection().setSingleRange(b)},setSelectionToElementEnd:function(a){var b=g.createRange();b.selectNodeContents(a),b.collapse(!1),a.childNodes&&a.childNodes[a.childNodes.length-1]&&"br"===a.childNodes[a.childNodes.length-1].nodeName&&(b.startOffset=b.endOffset=b.startOffset-1),g.getSelection().setSingleRange(b)},insertHtml:function(a,b){var h,j,k,l,m,n,o,p=angular.element("
      "+a+"
      "),q=g.getSelection().getRangeAt(0),r=f.createDocumentFragment(),s=p[0].childNodes,t=!0;if(s.length>0){for(l=[],k=0;k)$/i.test(q.startContainer.innerHTML)&&q.selectNode(q.startContainer)}else t=!0,n=r=f.createTextNode(a);if(t)q.deleteContents();else if(q.collapsed&&q.startContainer!==b)if(q.startContainer.innerHTML&&q.startContainer.innerHTML.match(/^<[^>]*>$/i))h=q.startContainer,1===q.startOffset?(q.setStartAfter(h),q.setEndAfter(h)):(q.setStartBefore(h),q.setEndBefore(h));else{if(3===q.startContainer.nodeType&&q.startContainer.parentNode!==b)for(h=q.startContainer.parentNode,j=h.cloneNode(),d.splitNodes(h.childNodes,h,j,q.startContainer,q.startOffset);!e.test(h.nodeName);){angular.element(h).after(j),h=h.parentNode;var v=j;j=h.cloneNode(),d.splitNodes(h.childNodes,h,j,v)}else h=q.startContainer,j=h.cloneNode(),d.splitNodes(h.childNodes,h,j,void 0,void 0,q.startOffset);if(angular.element(h).after(j),q.setStartAfter(h),q.setEndAfter(h),/^(|)$/i.test(h.innerHTML.trim())&&(q.setStartBefore(h),q.setEndBefore(h),angular.element(h).remove()),/^(|)$/i.test(j.innerHTML.trim())&&angular.element(j).remove(),"li"===h.nodeName.toLowerCase()){for(o=f.createDocumentFragment(),m=0;m"),d.transferChildNodes(r.childNodes[m],p[0]),d.transferNodeAttributes(r.childNodes[m],p[0]),o.appendChild(p[0]);r=o,n&&(n=r.childNodes[r.childNodes.length-1],n=n.childNodes[n.childNodes.length-1])}}else q.deleteContents();q.insertNode(r),n&&i.setSelectionToElementEnd(n)}};return i}]).service("taDOM",function(){var a={getByAttribute:function(b,c){var d=[],e=b.children();return e.length&&angular.forEach(e,function(b){d=d.concat(a.getByAttribute(angular.element(b),c))}),void 0!==b.attr(c)&&d.push(b),d},transferChildNodes:function(a,b){for(b.innerHTML="";a.childNodes.length>0;)b.appendChild(a.childNodes[0]);return b},splitNodes:function(b,c,d,e,f,g){if(!e&&isNaN(g))throw new Error("taDOM.splitNodes requires a splitNode or splitIndex");for(var h=document.createDocumentFragment(),i=document.createDocumentFragment(),j=0;b.length>0&&(isNaN(g)||g!==j)&&b[0]!==e;)h.appendChild(b[0]),j++;for(!isNaN(f)&&f>=0&&b[0]&&(h.appendChild(document.createTextNode(b[0].nodeValue.substring(0,f))),b[0].nodeValue=b[0].nodeValue.substring(f));b.length>0;)i.appendChild(b[0]);a.transferChildNodes(h,c),a.transferChildNodes(i,d)},transferNodeAttributes:function(a,b){for(var c=0;c");return b.html(a),b.text().length<=e}}}}).directive("taMinText",function(){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){var e=parseInt(a.$eval(c.taMinText));if(isNaN(e))throw"Min text must be an integer";c.$observe("taMinText",function(a){if(e=parseInt(a),isNaN(e))throw"Min text must be an integer";d.$dirty&&d.$validate()}),d.$validators.taMinText=function(a){var b=angular.element("
      ");return b.html(a),!b.text().length||b.text().length>=e}}}}),angular.module("textAngular.taBind",["textAngular.factories","textAngular.DOM"]).service("_taBlankTest",[function(){var a=/<(a|abbr|acronym|bdi|bdo|big|cite|code|del|dfn|img|ins|kbd|label|map|mark|q|ruby|rp|rt|s|samp|time|tt|var)[^>]*(>|$)/i;return function(b){return function(c){if(!c)return!0;var d,e=/(^[^<]|>)[^<]/i.exec(c);return e?d=e.index:(c=c.toString().replace(/="[^"]*"/i,"").replace(/="[^"]*"/i,"").replace(/="[^"]*"/i,"").replace(/="[^"]*"/i,""),d=c.indexOf(">")),c=c.trim().substring(d,d+100),/^[^<>]+$/i.test(c)?!1:0===c.length||c===b||/^>(\s| )*<\/[^>]+>$/gi.test(c)?!0:/>\s*[^\s<]/i.test(c)||a.test(c)?!1:!0}}}]).directive("taButton",[function(){return{link:function(a,b,c){b.attr("unselectable","on"),b.on("mousedown",function(a,b){return b&&angular.extend(a,b),a.preventDefault(),!1})}}}]).directive("taBind",["taSanitize","$timeout","$window","$document","taFixChrome","taBrowserTag","taSelection","taSelectableElements","taApplyCustomRenderers","taOptions","_taBlankTest","$parse","taDOM","textAngularManager",function(d,f,i,j,k,l,m,o,p,q,r,s,t,u){return{priority:2,require:["ngModel","?ngModelOptions"],link:function(l,v,w,x){function y(a){var b;return R.forEach(function(c){if(c.keyCode===a.keyCode){var d=(a.metaKey?O:0)+(a.ctrlKey?N:0)+(a.shiftKey?Q:0)+(a.altKey?P:0);if(c.forbiddenModifiers&d)return;c.mustHaveModifiers.every(function(a){return d&a})&&(b=c.specialKey)}}),b}var z,A,B,C,D=x[0],E=x[1]||{},F=void 0!==v.attr("contenteditable")&&v.attr("contenteditable"),G=F||"textarea"===v[0].tagName.toLowerCase()||"input"===v[0].tagName.toLowerCase(),H=!1,I=!1,J=!1,K=w.taUnsafeSanitizer||q.disableSanitizer,L=/^(9|19|20|27|33|34|35|36|37|38|39|40|45|112|113|114|115|116|117|118|119|120|121|122|123|144|145)$/i,M=/^(8|13|32|46|59|61|107|109|173|186|187|188|189|190|191|192|219|220|221|222)$/i,N=1,O=2,P=4,Q=8,R=[{specialKey:"UndoKey",forbiddenModifiers:P+Q,mustHaveModifiers:[O+N],keyCode:90},{specialKey:"RedoKey",forbiddenModifiers:P,mustHaveModifiers:[O+N,Q],keyCode:90},{specialKey:"RedoKey",forbiddenModifiers:P+Q,mustHaveModifiers:[O+N],keyCode:89},{specialKey:"TabKey",forbiddenModifiers:O+Q+P+N,mustHaveModifiers:[],keyCode:9},{specialKey:"ShiftTabKey",forbiddenModifiers:O+P+N,mustHaveModifiers:[Q],keyCode:9}];void 0===w.taDefaultWrap&&(w.taDefaultWrap="p"),""===w.taDefaultWrap?(B="",C=void 0===a.ie?"

      ":a.ie>=11?"


      ":a.ie<=8?"

       

      ":"

       

      "):(B=void 0===a.ie||a.ie>=11?"<"+w.taDefaultWrap+">
      ":a.ie<=8?"<"+w.taDefaultWrap.toUpperCase()+">":"<"+w.taDefaultWrap+">",C=void 0===a.ie||a.ie>=11?"<"+w.taDefaultWrap+">
      ":a.ie<=8?"<"+w.taDefaultWrap.toUpperCase()+"> ":"<"+w.taDefaultWrap+"> "),E.$options||(E.$options={});var S=r(C),T=function(a){if(S(a))return a;var b=angular.element("
      "+a+"
      ");if(0===b.children().length)a="<"+w.taDefaultWrap+">"+a+"";else{var d,e=b[0].childNodes,f=!1;for(d=0;d";else if("#text"===h){var i=g.textContent;a+=i.trim()?"<"+w.taDefaultWrap+">"+i+"":i}else if(h.match(c))a+=g.outerHTML;else{var j=g.outerHTML||g.nodeValue;a+=""!==j.trim()?"<"+w.taDefaultWrap+">"+j+"":j}}else a="<"+w.taDefaultWrap+">"+a+""}return a};w.taPaste&&(A=s(w.taPaste)),v.addClass("ta-bind");var U;l["$undoManager"+(w.id||"")]=D.$undoManager={_stack:[],_index:0,_max:1e3,push:function(a){return"undefined"==typeof a||null===a||"undefined"!=typeof this.current()&&null!==this.current()&&a===this.current()?a:(this._indexthis._max&&this._stack.shift(),this._index=this._stack.length-1,a)},undo:function(){return this.setToIndex(this._index-1)},redo:function(){return this.setToIndex(this._index+1)},setToIndex:function(a){return 0>a||a>this._stack.length-1?void 0:(this._index=a,this.current())},current:function(){return this._stack[this._index]}};var V,W=l["$undoTaBind"+(w.id||"")]=function(){if(!H&&F){var a=D.$undoManager.undo();"undefined"!=typeof a&&null!==a&&(ka(a),Z(a,!1),V&&f.cancel(V),V=f(function(){v[0].focus(),m.setSelectionToElementEnd(v[0])},1))}},X=l["$redoTaBind"+(w.id||"")]=function(){if(!H&&F){var a=D.$undoManager.redo();"undefined"!=typeof a&&null!==a&&(ka(a),Z(a,!1),V&&f.cancel(V),V=f(function(){v[0].focus(),m.setSelectionToElementEnd(v[0])},1))}},Y=function(){if(F)return v[0].innerHTML;if(G)return v.val();throw"textAngular Error: attempting to update non-editable taBind"},Z=function(a,b,c){J=c||!1,("undefined"==typeof b||null===b)&&(b=F),("undefined"==typeof a||null===a)&&(a=Y()),S(a)?(""!==D.$viewValue&&D.$setViewValue(""),b&&""!==D.$undoManager.current()&&D.$undoManager.push("")):(ja(),D.$viewValue!==a&&(D.$setViewValue(a),b&&D.$undoManager.push(a))),D.$render()};l["updateTaBind"+(w.id||"")]=function(){H||Z(void 0,void 0,!0)};var $=function(a){return D.$oldViewValue=d(k(a),D.$oldViewValue,K)};if(v.attr("required")&&(D.$validators.required=function(a,b){return!S(a||b)}),D.$parsers.push($),D.$parsers.unshift(T),D.$formatters.push($),D.$formatters.unshift(T),D.$formatters.unshift(function(a){return D.$undoManager.push(a||"")}),G)if(l.events={},F){var _=!1,aa=function(a){if(a&&a.trim().length){if(a.match(/class=["']*Mso(Normal|List)/i)){var b=a.match(/([\s\S]*?)/i);b=b?b[1]:a,b=b.replace(/[\s\S]*?<\/o:p>/gi,"").replace(/class=(["']|)MsoNormal(["']|)/gi,"");var c=angular.element("
      "+b+"
      "),e=angular.element("
      "),g={element:null,lastIndent:[],lastLi:null,isUl:!1};g.lastIndent.peek=function(){var a=this.length;return a>0?this[a-1]:void 0};for(var h=function(a){g.isUl=a,g.element=angular.element(a?"
        ":"
          "),g.lastIndent=[],g.lastIndent.peek=function(){var a=this.length;return a>0?this[a-1]:void 0},g.lastLevelMatch=null},i=0;i<=c[0].childNodes.length;i++)if(c[0].childNodes[i]&&"#text"!==c[0].childNodes[i].nodeName&&"p"===c[0].childNodes[i].tagName.toLowerCase()){var j=angular.element(c[0].childNodes[i]),k=(j.attr("class")||"").match(/MsoList(Bullet|Number|Paragraph)(CxSp(First|Middle|Last)|)/i);if(k){if(j[0].childNodes.length<2||j[0].childNodes[1].childNodes.length<1)continue;var n="bullet"===k[1].toLowerCase()||"number"!==k[1].toLowerCase()&&!(/^[^0-9a-z<]*[0-9a-z]+[^0-9a-z<>]]":"
            "),g.lastLi.append(g.element);else if(null!=g.lastIndent.peek()&&g.lastIndent.peek()>p){for(;null!=g.lastIndent.peek()&&g.lastIndent.peek()>p;)if("li"!==g.element.parent()[0].tagName.toLowerCase()){if(!/[uo]l/i.test(g.element.parent()[0].tagName.toLowerCase()))break;g.element=g.element.parent(),g.lastIndent.pop()}else g.element=g.element.parent();g.isUl="ul"===g.element[0].tagName.toLowerCase(),n!==g.isUl&&(h(n),e.append(g.element))}g.lastLevelMatch=q,p!==g.lastIndent.peek()&&g.lastIndent.push(p),g.lastLi=angular.element("
          1. "),g.element.append(g.lastLi),g.lastLi.html(j.html().replace(/[\s\S]*?/gi,"")),j.remove()}else h(!1),e.append(j)}var r=function(a){a=angular.element(a);for(var b=a[0].childNodes.length-1;b>=0;b--)a.after(a[0].childNodes[b]);a.remove()};angular.forEach(e.find("span"),function(a){a.removeAttribute("lang"),a.attributes.length<=0&&r(a)}),angular.forEach(e.find("font"),r),a=e.html()}else{if(a=a.replace(/<(|\/)meta[^>]*?>/gi,""),a.match(/<[^>]*?(ta-bind)[^>]*?>/)){if(a.match(/<[^>]*?(text-angular)[^>]*?>/)){var s=angular.element("
            "+a+"
            ");s.find("textarea").remove();for(var u=t.getByAttribute(s,"ta-bind"),w=0;w',"")}}else a.match(/^.<\/span>/gi)||(a=a.replace(/<(|\/)span[^>]*?>/gi,"")));a=a.replace(/
            ]*?>/gi,"").replace(/( | )<\/span>/gi," ")}//i.test(a)&&/(|).*/i.test(a)===!1&&(a=a.replace(/.*<\/li(\s.*)?>/i,"
              $&
            ")),a=a.replace(/^[ |\u00A0]+/gm,function(a){for(var b="",c=0;c").replace(/\t/g,"    "),A&&(a=A(l,{$html:a})||a),a=d(a,"",K),m.insertHtml(a,v[0]),f(function(){D.$setViewValue(Y()),_=!1,v.removeClass("processing-paste")},0)}else _=!1,v.removeClass("processing-paste")};v.on("paste",l.events.paste=function(a,b){if(b&&angular.extend(a,b),H||_)return a.stopPropagation(),a.preventDefault(),!1;_=!0,v.addClass("processing-paste");var c,d=(a.originalEvent||a).clipboardData;if(d&&d.getData&&d.types.length>0){for(var e="",g=0;g
      ');j.find("body").append(k),k[0].focus(),f(function(){i.rangy.restoreSelection(h),aa(k[0].innerHTML),v[0].focus(),k.remove()},0)}),v.on("cut",l.events.cut=function(a){H?a.preventDefault():f(function(){D.$setViewValue(Y())},0)}),v.on("keydown",l.events.keydown=function(a,b){b&&angular.extend(a,b),a.specialKey=y(a);var c;if(q.keyMappings.forEach(function(b){a.specialKey===b.commandKeyCode&&(a.specialKey=void 0),b.testForKey(a)&&(c=b.commandKeyCode),("UndoKey"===b.commandKeyCode||"RedoKey"===b.commandKeyCode)&&(b.enablePropagation||a.preventDefault())}),"undefined"!=typeof c&&(a.specialKey=c),"undefined"==typeof a.specialKey||"UndoKey"===a.specialKey&&"RedoKey"===a.specialKey||(a.preventDefault(),u.sendKeyCommand(l,a)),!H&&("UndoKey"===a.specialKey&&(W(),a.preventDefault()),"RedoKey"===a.specialKey&&(X(),a.preventDefault()),13===a.keyCode&&!a.shiftKey)){var d,f=m.getSelectionElement();if(!f.tagName.match(e))return;var g=angular.element(B);if(/^$/i.test(f.innerHTML.trim())&&"blockquote"===f.parentNode.tagName.toLowerCase()&&!f.nextSibling){d=angular.element(f);var h=d.parent();h.after(g),d.remove(),0===h.children().length&&h.remove(),m.setSelectionToElementStart(g[0]),a.preventDefault()}else/^<[^>]+><\/[^>]+>$/i.test(f.innerHTML.trim())&&"blockquote"===f.tagName.toLowerCase()&&(d=angular.element(f),d.after(g),d.remove(),m.setSelectionToElementStart(g[0]),a.preventDefault())}});var ba;if(v.on("keyup",l.events.keyup=function(a,b){if(b&&angular.extend(a,b),9===a.keyCode){var c=m.getSelection();return void(c.start.element===v[0]&&v.children().length&&m.setSelectionToElementStart(v.children()[0]))}if(U&&f.cancel(U),!H&&!L.test(a.keyCode)){if(""!==B&&13===a.keyCode&&!a.shiftKey){for(var d=m.getSelectionElement();!d.tagName.match(e)&&d!==v[0];)d=d.parentNode;if(d.tagName.toLowerCase()!==w.taDefaultWrap&&"li"!==d.tagName.toLowerCase()&&(""===d.innerHTML.trim()||"
      "===d.innerHTML.trim())){var g=angular.element(B);angular.element(d).replaceWith(g),m.setSelectionToElementStart(g[0])}}var h=Y();""!==B&&""===h.trim()?(ka(B),m.setSelectionToElementStart(v.children()[0])):"<"!==h.substring(0,1)&&""!==w.taDefaultWrap;var i=z!==a.keyCode&&M.test(a.keyCode);ba&&f.cancel(ba),ba=f(function(){Z(h,i,!0)},E.$options.debounce||400),i||(U=f(function(){D.$undoManager.push(h)},250)),z=a.keyCode}}),v.on("blur",l.events.blur=function(){I=!1,H?(J=!0,D.$render()):Z(void 0,void 0,!0)}),w.placeholder&&(a.ie>8||void 0===a.ie)){var ca;if(!w.id)throw"textAngular Error: An unique ID is required for placeholders to work";ca=g("#"+w.id+".placeholder-text:before",'content: "'+w.placeholder+'"'),l.$on("$destroy",function(){h(ca)})}v.on("focus",l.events.focus=function(){I=!0,v.removeClass("placeholder-text"),ja()}),v.on("mouseup",l.events.mouseup=function(){var a=m.getSelection();a.start.element===v[0]&&v.children().length&&m.setSelectionToElementStart(v.children()[0])}),v.on("mousedown",l.events.mousedown=function(a,b){b&&angular.extend(a,b),a.stopPropagation()})}else{v.on("change blur",l.events.change=l.events.blur=function(){H||D.$setViewValue(Y())}),v.on("keydown",l.events.keydown=function(a,b){if(b&&angular.extend(a,b),9===a.keyCode){var c=this.selectionStart,d=this.selectionEnd,e=v.val();if(a.shiftKey){var f=e.lastIndexOf("\n",c),g=e.lastIndexOf(" ",c);-1!==g&&g>=f&&(v.val(e.substring(0,g)+e.substring(g+1)),this.selectionStart=this.selectionEnd=c-1)}else v.val(e.substring(0,c)+" "+e.substring(d)),this.selectionStart=this.selectionEnd=c+1;a.preventDefault()}});var da=function(a,b){for(var c="",d=0;b>d;d++)c+=a;return c},ea=function(a,b,c){for(var d=0;d"):"#text"===e?void(c+=d.textContent):void(d.outerHTML&&(c+="ul"===e||"ol"===e?"\n"+fa(d,b):"\n"+da(" ",b)+d.outerHTML))}),c+="\n"+da(" ",b-1)+a.outerHTML.substring(a.outerHTML.lastIndexOf("<"))};D.$formatters.unshift(function(a){var b=angular.element("
      "+a+"
      ")[0].childNodes;return b.length>0&&(a="",ea(b,function(b,c){var d=c.nodeName.toLowerCase();return"#comment"===d?void(a+=""):"#text"===d?void(a+=c.textContent):void(c.outerHTML&&(a.length>0&&(a+="\n"), -a+="ul"===d||"ol"===d?""+fa(c,0):""+c.outerHTML))})),a})}var ga,ha=function(a){return l.$emit("ta-element-select",this),a.preventDefault(),!1},ia=function(a,b){if(b&&angular.extend(a,b),!n&&!H){n=!0;var c;c=a.originalEvent?a.originalEvent.dataTransfer:a.dataTransfer,l.$emit("ta-drop-event",this,a,c),f(function(){n=!1,Z(void 0,void 0,!0)},100)}},ja=l["reApplyOnSelectorHandlers"+(w.id||"")]=function(){H||angular.forEach(o,function(a){v.find(a).off("click",ha).on("click",ha)})},ka=function(a){v[0].innerHTML=a},la=!1;D.$render=function(){if(!la){la=!0;var a=D.$viewValue||"";J||(F&&I&&(v.removeClass("placeholder-text"),ga&&f.cancel(ga),ga=f(function(){I||(v[0].focus(),m.setSelectionToElementEnd(v.children()[v.children().length-1])),ga=void 0},1)),F?(ka(w.placeholder?""===a?B:a:""===a?B:a),H?v.off("drop",ia):(ja(),v.on("drop",ia))):"textarea"!==v[0].tagName.toLowerCase()&&"input"!==v[0].tagName.toLowerCase()?ka(p(a)):v.val(a)),F&&w.placeholder&&(""===a?I?v.removeClass("placeholder-text"):v.addClass("placeholder-text"):v.removeClass("placeholder-text")),la=J=!1}},w.taReadonly&&(H=l.$eval(w.taReadonly),H?(v.addClass("ta-readonly"),("textarea"===v[0].tagName.toLowerCase()||"input"===v[0].tagName.toLowerCase())&&v.attr("disabled","disabled"),void 0!==v.attr("contenteditable")&&v.attr("contenteditable")&&v.removeAttr("contenteditable")):(v.removeClass("ta-readonly"),"textarea"===v[0].tagName.toLowerCase()||"input"===v[0].tagName.toLowerCase()?v.removeAttr("disabled"):F&&v.attr("contenteditable","true")),l.$watch(w.taReadonly,function(a,b){b!==a&&(a?(v.addClass("ta-readonly"),("textarea"===v[0].tagName.toLowerCase()||"input"===v[0].tagName.toLowerCase())&&v.attr("disabled","disabled"),void 0!==v.attr("contenteditable")&&v.attr("contenteditable")&&v.removeAttr("contenteditable"),angular.forEach(o,function(a){v.find(a).on("click",ha)}),v.off("drop",ia)):(v.removeClass("ta-readonly"),"textarea"===v[0].tagName.toLowerCase()||"input"===v[0].tagName.toLowerCase()?v.removeAttr("disabled"):F&&v.attr("contenteditable","true"),angular.forEach(o,function(a){v.find(a).off("click",ha)}),v.on("drop",ia)),H=a)})),F&&!H&&(angular.forEach(o,function(a){v.find(a).on("click",ha)}),v.on("drop",ia),v.on("blur",function(){a.webkit&&(b=!0)}))}}}]);var n=!1,o=angular.module("textAngular",["ngSanitize","textAngularSetup","textAngular.factories","textAngular.DOM","textAngular.validators","textAngular.taBind"]);o.config([function(){angular.forEach(taTools,function(a,b){delete taTools[b]})}]),o.run([function(){if("function"==typeof define&&define.amd)define(function(a){window.rangy=a("rangy"),window.rangy.saveSelection=a("rangy/lib/rangy-selectionsaverestore")});else if("function"==typeof require&&"undefined"!=typeof module&&"object"==typeof exports)window.rangy=require("rangy"),window.rangy.saveSelection=require("rangy/lib/rangy-selectionsaverestore");else{if(!window.rangy)throw"rangy-core.js and rangy-selectionsaverestore.js are required for textAngular to work correctly, rangy-core is not yet loaded.";if(window.rangy.init(),!window.rangy.saveSelection)throw"rangy-selectionsaverestore.js is required for textAngular to work correctly."}}]),o.directive("textAngular",["$compile","$timeout","taOptions","taSelection","taExecCommand","textAngularManager","$window","$document","$animate","$log","$q","$parse",function(a,b,c,d,e,f,g,h,i,j,k,l){return{require:"?ngModel",scope:{},restrict:"EA",priority:2,link:function(m,n,o,p){var q,r,s,t,u,v,w,x,y,z,A,B=o.serial?o.serial:Math.floor(1e16*Math.random());m._name=o.name?o.name:"textAngularEditor"+B;var C=function(a,c,d){b(function(){var b=function(){a.off(c,b),d.apply(this,arguments)};a.on(c,b)},100)};if(y=e(o.taDefaultWrap),angular.extend(m,angular.copy(c),{wrapSelection:function(a,b,c){"undo"===a.toLowerCase()?m["$undoTaBindtaTextElement"+B]():"redo"===a.toLowerCase()?m["$redoTaBindtaTextElement"+B]():(y(a,!1,b,m.defaultTagAttributes),c&&m["reApplyOnSelectorHandlerstaTextElement"+B](),m.displayElements.text[0].focus())},showHtml:m.$eval(o.taShowHtml)||!1}),o.taFocussedClass&&(m.classes.focussed=o.taFocussedClass),o.taTextEditorClass&&(m.classes.textEditor=o.taTextEditorClass),o.taHtmlEditorClass&&(m.classes.htmlEditor=o.taHtmlEditorClass),o.taDefaultTagAttributes)try{angular.extend(m.defaultTagAttributes,angular.fromJson(o.taDefaultTagAttributes))}catch(D){j.error(D)}o.taTextEditorSetup&&(m.setup.textEditorSetup=m.$parent.$eval(o.taTextEditorSetup)),o.taHtmlEditorSetup&&(m.setup.htmlEditorSetup=m.$parent.$eval(o.taHtmlEditorSetup)),o.taFileDrop?m.fileDropHandler=m.$parent.$eval(o.taFileDrop):m.fileDropHandler=m.defaultFileDropHandler,w=n[0].innerHTML,n[0].innerHTML="",m.displayElements={forminput:angular.element(""),html:angular.element(""),text:angular.element("
      "),scrollWindow:angular.element("
      "),popover:angular.element('
      '),popoverArrow:angular.element('
      '),popoverContainer:angular.element('
      '),resize:{overlay:angular.element('
      '),background:angular.element('
      '),anchors:[angular.element('
      '),angular.element('
      '),angular.element('
      '),angular.element('
      ')],info:angular.element('
      ')}},m.displayElements.popover.append(m.displayElements.popoverArrow),m.displayElements.popover.append(m.displayElements.popoverContainer),m.displayElements.scrollWindow.append(m.displayElements.popover),m.displayElements.popover.on("mousedown",function(a,b){return b&&angular.extend(a,b),a.preventDefault(),!1}),m.showPopover=function(a){m.displayElements.popover.css("display","block"),m.reflowPopover(a),i.addClass(m.displayElements.popover,"in"),C(h.find("body"),"click keyup",function(){m.hidePopover()})},m.reflowPopover=function(a){m.displayElements.text[0].offsetHeight-51>a[0].offsetTop?(m.displayElements.popover.css("top",a[0].offsetTop+a[0].offsetHeight+m.displayElements.scrollWindow[0].scrollTop+"px"),m.displayElements.popover.removeClass("top").addClass("bottom")):(m.displayElements.popover.css("top",a[0].offsetTop-54+m.displayElements.scrollWindow[0].scrollTop+"px"),m.displayElements.popover.removeClass("bottom").addClass("top"));var b=m.displayElements.text[0].offsetWidth-m.displayElements.popover[0].offsetWidth,c=a[0].offsetLeft+a[0].offsetWidth/2-m.displayElements.popover[0].offsetWidth/2;m.displayElements.popover.css("left",Math.max(0,Math.min(b,c))+"px"),m.displayElements.popoverArrow.css("margin-left",Math.min(c,Math.max(0,c-b))-11+"px")},m.hidePopover=function(){m.displayElements.popover.css("display",""),m.displayElements.popoverContainer.attr("style",""),m.displayElements.popoverContainer.attr("class","popover-content"),m.displayElements.popover.removeClass("in")},m.displayElements.resize.overlay.append(m.displayElements.resize.background),angular.forEach(m.displayElements.resize.anchors,function(a){m.displayElements.resize.overlay.append(a)}),m.displayElements.resize.overlay.append(m.displayElements.resize.info),m.displayElements.scrollWindow.append(m.displayElements.resize.overlay),m.reflowResizeOverlay=function(a){a=angular.element(a)[0],m.displayElements.resize.overlay.css({display:"block",left:a.offsetLeft-5+"px",top:a.offsetTop-5+"px",width:a.offsetWidth+10+"px",height:a.offsetHeight+10+"px"}),m.displayElements.resize.info.text(a.offsetWidth+" x "+a.offsetHeight)},m.showResizeOverlay=function(a){var b=h.find("body");z=function(c){var d={width:parseInt(a.attr("width")),height:parseInt(a.attr("height")),x:c.clientX,y:c.clientY};(void 0===d.width||isNaN(d.width))&&(d.width=a[0].offsetWidth),(void 0===d.height||isNaN(d.height))&&(d.height=a[0].offsetHeight),m.hidePopover();var e=d.height/d.width,f=function(b){function c(a){return Math.round(Math.max(0,a))}var f={x:Math.max(0,d.width+(b.clientX-d.x)),y:Math.max(0,d.height+(b.clientY-d.y))},g=void 0!==o.taResizeForceAspectRatio,h=o.taResizeMaintainAspectRatio,i=g||h&&!b.shiftKey;if(i){var j=f.y/f.x;f.x=e>j?f.x:f.y/e,f.y=e>j?f.x*e:f.y}var k=angular.element(a);k.css("height",c(f.y)+"px"),k.css("width",c(f.x)+"px"),m.reflowResizeOverlay(a)};b.on("mousemove",f),C(b,"mouseup",function(c){c.preventDefault(),c.stopPropagation(),b.off("mousemove",f),m.showPopover(a)}),c.stopPropagation(),c.preventDefault()},m.displayElements.resize.anchors[3].off("mousedown"),m.displayElements.resize.anchors[3].on("mousedown",z),m.reflowResizeOverlay(a),C(b,"click",function(){m.hideResizeOverlay()})},m.hideResizeOverlay=function(){m.displayElements.resize.anchors[3].off("mousedown",z),m.displayElements.resize.overlay.css("display","")},m.setup.htmlEditorSetup(m.displayElements.html),m.setup.textEditorSetup(m.displayElements.text),m.displayElements.html.attr({id:"taHtmlElement"+B,"ng-show":"showHtml","ta-bind":"ta-bind","ng-model":"html","ng-model-options":n.attr("ng-model-options")}),m.displayElements.text.attr({id:"taTextElement"+B,contentEditable:"true","ta-bind":"ta-bind","ng-model":"html","ng-model-options":n.attr("ng-model-options")}),m.displayElements.scrollWindow.attr({"ng-hide":"showHtml"}),o.taDefaultWrap&&m.displayElements.text.attr("ta-default-wrap",o.taDefaultWrap),o.taUnsafeSanitizer&&(m.displayElements.text.attr("ta-unsafe-sanitizer",o.taUnsafeSanitizer),m.displayElements.html.attr("ta-unsafe-sanitizer",o.taUnsafeSanitizer)),m.displayElements.scrollWindow.append(m.displayElements.text),n.append(m.displayElements.scrollWindow),n.append(m.displayElements.html),m.displayElements.forminput.attr("name",m._name),n.append(m.displayElements.forminput),o.tabindex&&(n.removeAttr("tabindex"),m.displayElements.text.attr("tabindex",o.tabindex),m.displayElements.html.attr("tabindex",o.tabindex)),o.placeholder&&(m.displayElements.text.attr("placeholder",o.placeholder),m.displayElements.html.attr("placeholder",o.placeholder)),o.taDisabled&&(m.displayElements.text.attr("ta-readonly","disabled"),m.displayElements.html.attr("ta-readonly","disabled"),m.disabled=m.$parent.$eval(o.taDisabled),m.$parent.$watch(o.taDisabled,function(a){m.disabled=a,m.disabled?n.addClass(m.classes.disabled):n.removeClass(m.classes.disabled)})),o.taPaste&&(m._pasteHandler=function(a){return l(o.taPaste)(m.$parent,{$html:a})},m.displayElements.text.attr("ta-paste","_pasteHandler($html)")),a(m.displayElements.scrollWindow)(m),a(m.displayElements.html)(m),m.updateTaBindtaTextElement=m["updateTaBindtaTextElement"+B],m.updateTaBindtaHtmlElement=m["updateTaBindtaHtmlElement"+B],n.addClass("ta-root"),m.displayElements.scrollWindow.addClass("ta-text ta-editor "+m.classes.textEditor),m.displayElements.html.addClass("ta-html ta-editor "+m.classes.htmlEditor),m._actionRunning=!1;var E=!1;if(m.startAction=function(){return m._actionRunning=!0,E=g.rangy.saveSelection(),function(){E&&g.rangy.restoreSelection(E)}},m.endAction=function(){m._actionRunning=!1,E&&(m.showHtml?m.displayElements.html[0].focus():m.displayElements.text[0].focus(),g.rangy.removeMarkers(E)),E=!1,m.updateSelectedStyles(),m.showHtml||m["updateTaBindtaTextElement"+B]()},u=function(){m.focussed=!0,n.addClass(m.classes.focussed),x.focus(),n.triggerHandler("focus")},m.displayElements.html.on("focus",u),m.displayElements.text.on("focus",u),v=function(a){return m._actionRunning||h[0].activeElement===m.displayElements.html[0]||h[0].activeElement===m.displayElements.text[0]||(n.removeClass(m.classes.focussed),x.unfocus(),b(function(){m._bUpdateSelectedStyles=!1,n.triggerHandler("blur"),m.focussed=!1},0)),a.preventDefault(),!1},m.displayElements.html.on("blur",v),m.displayElements.text.on("blur",v),m.displayElements.text.on("paste",function(a){n.triggerHandler("paste",a)}),m.queryFormatBlockState=function(a){return!m.showHtml&&a.toLowerCase()===h[0].queryCommandValue("formatBlock").toLowerCase()},m.queryCommandState=function(a){return m.showHtml?"":h[0].queryCommandState(a)},m.switchView=function(){m.showHtml=!m.showHtml,i.enabled(!1,m.displayElements.html),i.enabled(!1,m.displayElements.text),m.showHtml?b(function(){return i.enabled(!0,m.displayElements.html),i.enabled(!0,m.displayElements.text),m.displayElements.html[0].focus()},100):b(function(){return i.enabled(!0,m.displayElements.html),i.enabled(!0,m.displayElements.text),m.displayElements.text[0].focus()},100)},o.ngModel){var F=!0;p.$render=function(){if(F){F=!1;var a=m.$parent.$eval(o.ngModel);void 0!==a&&null!==a||!w||""===w||p.$setViewValue(w)}m.displayElements.forminput.val(p.$viewValue),m.html=p.$viewValue||""},n.attr("required")&&(p.$validators.required=function(a,b){var c=a||b;return!(!c||""===c.trim())})}else m.displayElements.forminput.val(w),m.html=w;if(m.$watch("html",function(a,b){a!==b&&(o.ngModel&&p.$viewValue!==a&&p.$setViewValue(a),m.displayElements.forminput.val(a))}),o.taTargetToolbars)x=f.registerEditor(m._name,m,o.taTargetToolbars.split(","));else{var G=angular.element('
      ');o.taToolbar&&G.attr("ta-toolbar",o.taToolbar),o.taToolbarClass&&G.attr("ta-toolbar-class",o.taToolbarClass),o.taToolbarGroupClass&&G.attr("ta-toolbar-group-class",o.taToolbarGroupClass),o.taToolbarButtonClass&&G.attr("ta-toolbar-button-class",o.taToolbarButtonClass),o.taToolbarActiveButtonClass&&G.attr("ta-toolbar-active-button-class",o.taToolbarActiveButtonClass),o.taFocussedClass&&G.attr("ta-focussed-class",o.taFocussedClass),n.prepend(G),a(G)(m.$parent),x=f.registerEditor(m._name,m,["textAngularToolbar"+B])}m.$on("$destroy",function(){f.unregisterEditor(m._name),angular.element(window).off("blur")}),m.$on("ta-element-select",function(a,b){x.triggerElementSelect(a,b)&&m["reApplyOnSelectorHandlerstaTextElement"+B]()}),m.$on("ta-drop-event",function(a,c,d,e){m.displayElements.text[0].focus(),e&&e.files&&e.files.length>0?(angular.forEach(e.files,function(a){try{k.when(m.fileDropHandler(a,m.wrapSelection)||m.fileDropHandler!==m.defaultFileDropHandler&&k.when(m.defaultFileDropHandler(a,m.wrapSelection))).then(function(){m["updateTaBindtaTextElement"+B]()})}catch(b){j.error(b)}}),d.preventDefault(),d.stopPropagation()):b(function(){m["updateTaBindtaTextElement"+B]()},0)}),m._bUpdateSelectedStyles=!1,angular.element(window).on("blur",function(){m._bUpdateSelectedStyles=!1,m.focussed=!1}),m.updateSelectedStyles=function(){var a;A&&b.cancel(A),void 0!==(a=d.getSelectionElement())&&a.parentNode!==m.displayElements.text[0]?x.updateSelectedStyles(angular.element(a)):x.updateSelectedStyles(),m._bUpdateSelectedStyles&&(A=b(m.updateSelectedStyles,200))},q=function(){return m.focussed?void(m._bUpdateSelectedStyles||(m._bUpdateSelectedStyles=!0,m.$apply(function(){m.updateSelectedStyles()}))):void(m._bUpdateSelectedStyles=!1)},m.displayElements.html.on("keydown",q),m.displayElements.text.on("keydown",q),r=function(){m._bUpdateSelectedStyles=!1},m.displayElements.html.on("keyup",r),m.displayElements.text.on("keyup",r),s=function(a,b){b&&angular.extend(a,b),m.$apply(function(){return x.sendKeyCommand(a)?(m._bUpdateSelectedStyles||m.updateSelectedStyles(),a.preventDefault(),!1):void 0})},m.displayElements.html.on("keypress",s),m.displayElements.text.on("keypress",s),t=function(){m._bUpdateSelectedStyles=!1,m.$apply(function(){m.updateSelectedStyles()})},m.displayElements.html.on("mouseup",t),m.displayElements.text.on("mouseup",t)}}}]),o.service("textAngularManager",["taToolExecuteAction","taTools","taRegisterTool",function(a,b,c){var d={},e={};return{registerEditor:function(c,f,g){if(!c||""===c)throw"textAngular Error: An editor requires a name";if(!f)throw"textAngular Error: An editor requires a scope";if(e[c])throw'textAngular Error: An Editor with name "'+c+'" already exists';var h=[];return angular.forEach(g,function(a){d[a]&&h.push(d[a])}),e[c]={scope:f,toolbars:g,_registerToolbar:function(a){this.toolbars.indexOf(a.name)>=0&&h.push(a)},editorFunctions:{disable:function(){angular.forEach(h,function(a){a.disabled=!0})},enable:function(){angular.forEach(h,function(a){a.disabled=!1})},focus:function(){angular.forEach(h,function(a){a._parent=f,a.disabled=!1,a.focussed=!0,f.focussed=!0})},unfocus:function(){angular.forEach(h,function(a){a.disabled=!0,a.focussed=!1}),f.focussed=!1},updateSelectedStyles:function(a){angular.forEach(h,function(b){angular.forEach(b.tools,function(c){c.activeState&&(b._parent=f,c.active=c.activeState(a))})})},sendKeyCommand:function(c){var d=!1;return(c.ctrlKey||c.metaKey||c.specialKey)&&angular.forEach(b,function(b,e){if(b.commandKeyCode&&(b.commandKeyCode===c.which||b.commandKeyCode===c.specialKey))for(var g=0;g0)for(var k=0;k"),b&&b["class"]?d.addClass(b["class"]):d.addClass(g.classes.toolbarButton),d.attr("name",c.name),d.attr("ta-button","ta-button"),d.attr("ng-disabled","isDisabled()"),d.attr("tabindex","-1"),d.attr("ng-click","executeAction()"),d.attr("ng-class","displayActiveToolClass(active)"),b&&b.tooltiptext&&d.attr("title",b.tooltiptext),b&&!b.display&&!c._display&&(d[0].innerHTML="",b.buttontext&&(d[0].innerHTML=b.buttontext),b.iconclass)){var e=angular.element(""),f=d[0].innerHTML;e.addClass(b.iconclass),d[0].innerHTML="",d.append(e),f&&""!==f&&d.append(" "+f)}return c._lastToolDefinition=angular.copy(b),a(d)(c)};g.tools={},g._parent={disabled:!0,showHtml:!1,queryFormatBlockState:function(){return!1},queryCommandState:function(){return!1}};var k={$window:f,$editor:function(){return g._parent},isDisabled:function(){return"function"!=typeof this.$eval("disabled")&&this.$eval("disabled")||this.$eval("disabled()")||"html"!==this.name&&this.$editor().showHtml||this.$parent.disabled||this.$editor().disabled},displayActiveToolClass:function(a){return a?g.classes.toolbarButtonActive:""},executeAction:e};angular.forEach(g.toolbar,function(a){var b=angular.element("
      ");b.addClass(g.classes.toolbarGroup),angular.forEach(a,function(a){g.tools[a]=angular.extend(g.$new(!0),d[a],k,{name:a}),g.tools[a].$element=j(d[a],g.tools[a]),b.append(g.tools[a].$element)}),h.append(b)}),g.updateToolDisplay=function(a,b,c){var d=g.tools[a];if(d){if(d._lastToolDefinition&&!c&&(b=angular.extend({},d._lastToolDefinition,b)),null===b.buttontext&&null===b.iconclass&&null===b.display)throw'textAngular Error: Tool Definition for updating "'+a+'" does not have a valid display/iconclass/buttontext value';null===b.buttontext&&delete b.buttontext,null===b.iconclass&&delete b.iconclass,null===b.display&&delete b.display;var e=j(b,d);d.$element.replaceWith(e),d.$element=e}},g.addTool=function(a,b,c,e){g.tools[a]=angular.extend(g.$new(!0),d[a],k,{name:a}),g.tools[a].$element=j(d[a],g.tools[a]);var f;void 0===c&&(c=g.toolbar.length-1),f=angular.element(h.children()[c]),void 0===e?(f.append(g.tools[a].$element),g.toolbar[c][g.toolbar[c].length-1]=a):(f.children().eq(e).after(g.tools[a].$element),g.toolbar[c][e]=a)},b.registerToolbar(g),g.$on("$destroy",function(){b.unregisterToolbar(g.name)})}}}])}(),function(a,b,c){"use strict";function d(){this.$get=["$$sanitizeUri",function(a){return function(b){"undefined"!=typeof arguments[1]&&(arguments[1].version="taSanitize");var c=[];return g(b,l(c,function(b,c){return!/^unsafe/.test(a(b,c))})),c.join("")}}]}function e(a){var c=[],d=l(c,b.noop);return d.chars(a),c.join("")}function f(a){var b,c={},d=a.split(",");for(b=0;b=0&&k[f]!=d;f--);if(f>=0){for(e=k.length-1;e>=f;e--)c.end&&c.end(k[e]);k.length=f}}"string"!=typeof a&&(a=null===a||"undefined"==typeof a?"":""+a);var f,g,i,j,k=[],l=a;for(k.last=function(){return k[k.length-1]};a;){if(j="",g=!0,k.last()&&G[k.last()])a=a.replace(new RegExp("([^]*)<\\s*\\/\\s*"+k.last()+"[^>]*>","i"),function(a,b){return b=b.replace(s,"$1").replace(v,"$1"),c.chars&&c.chars(h(b)),""}),e("",k.last());else{if(y.test(a)){if(i=a.match(y)){i[0];c.whitespace&&c.whitespace(i[0]),a=a.replace(i[0],""),g=!1}}else t.test(a)?(i=a.match(t),i&&(c.comment&&c.comment(i[1]),a=a.replace(i[0],""),g=!1)):u.test(a)?(i=a.match(u),i&&(a=a.replace(i[0],""),g=!1)):r.test(a)?(i=a.match(o),i&&(a=a.substring(i[0].length),i[0].replace(o,e),g=!1)):q.test(a)&&(i=a.match(n),i?(i[4]&&(a=a.substring(i[0].length),i[0].replace(n,d)),g=!1):(j+="<",a=a.substring(1)));g&&(f=a.indexOf("<"),j+=0>f?a:a.substring(0,f),a=0>f?"":a.substring(f),c.chars&&c.chars(h(j)))}if(a==l)throw m("badparse","The sanitizer was unable to parse the following block of html: {0}",a);l=a}e()}function h(a){if(!a)return"";var b=N.exec(a),c=b[1],d=b[3],e=b[2];return e&&(M.innerHTML=e.replace(/=b||173==b||b>=1536&&1540>=b||1807==b||6068==b||6069==b||b>=8204&&8207>=b||b>=8232&&8239>=b||b>=8288&&8303>=b||65279==b||b>=65520&&65535>=b?"&#"+b+";":a}).replace(//g,">")}function j(a){var c="",d=a.split(";");return b.forEach(d,function(a){var d=a.split(":");if(2==d.length){var e=O(b.lowercase(d[0])),a=O(b.lowercase(d[1]));(("color"===e||"background-color"===e)&&(a.match(/^rgb\([0-9%,\. ]*\)$/i)||a.match(/^rgba\([0-9%,\. ]*\)$/i)||a.match(/^hsl\([0-9%,\. ]*\)$/i)||a.match(/^hsla\([0-9%,\. ]*\)$/i)||a.match(/^#[0-9a-f]{3,6}$/i)||a.match(/^[a-z]*$/i))||"text-align"===e&&("left"===a||"right"===a||"center"===a||"justify"===a)||"float"===e&&("left"===a||"right"===a||"none"===a)||("width"===e||"height"===e)&&a.match(/[0-9\.]*(px|em|rem|%)/)||"direction"===e&&a.match(/^ltr|rtl|initial|inherit$/))&&(c+=e+": "+a+";")}}),c}function k(a,b,c,d){return"img"===a&&b["ta-insert-video"]&&("ta-insert-video"===c||"allowfullscreen"===c||"frameborder"===c||"contenteditable"===c&&"false"===d)?!0:!1}function l(a,c){var d=!1,e=b.bind(a,a.push);return{start:function(a,f,g){a=b.lowercase(a),!d&&G[a]&&(d=a),d||H[a]!==!0||(e("<"),e(a),b.forEach(f,function(d,g){var h=b.lowercase(g),l="img"===a&&"src"===h||"background"===h;("style"===h&&""!==(d=j(d))||k(a,f,h,d)||L[h]===!0&&(I[h]!==!0||c(d,l)))&&(e(" "),e(g),e('="'),e(i(d)),e('"'))}),e(g?"/>":">"))},comment:function(a){e(a)},whitespace:function(a){e(i(a))},end:function(a){a=b.lowercase(a),d||H[a]!==!0||(e("")),a==d&&(d=!1)},chars:function(a){d||e(i(a))}}}var m=b.$$minErr("$sanitize"),n=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,o=/^<\/\s*([\w:-]+)[^>]*>/,p=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,q=/^/g,t=/(^)/,u=/]*?)>/i,v=//g,w=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,x=/([^\#-~| |!])/g,y=/^(\s+)/,z=f("area,br,col,hr,img,wbr,input"),A=f("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),B=f("rp,rt"),C=b.extend({},B,A),D=b.extend({},A,f("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),E=b.extend({},B,f("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),F=f("animate,animateColor,animateMotion,animateTransform,circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,set,stop,svg,switch,text,title,tspan,use"),G=f("script,style"),H=b.extend({},z,D,E,C,F),I=f("background,cite,href,longdesc,src,usemap,xlink:href"),J=f("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,id,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width"),K=f("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,attributeName,attributeType,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan"),L=b.extend({},I,K,J),M=document.createElement("pre"),N=/^(\s*)([\s\S]*?)(\s*)$/,O=function(){return String.prototype.trim?function(a){return b.isString(a)?a.trim():a}:function(a){return b.isString(a)?a.replace(/^\s\s*/,"").replace(/\s\s*$/,""):a}}();b.module("ngSanitize",[]).provider("$sanitize",d),b.module("ngSanitize").filter("linky",["$sanitize",function(a){var c=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"”’]/,d=/^mailto:/;return function(f,g){function h(a){a&&n.push(e(a))}function i(a,c){n.push("'),h(c),n.push("")}if(!f)return f;for(var j,k,l,m=f,n=[];j=m.match(c);)k=j[0],j[2]||j[4]||(k=(j[3]?"http://":"mailto:")+k),l=j.index,h(m.substr(0,l)),i(k,j[0].replace(d,"")),m=m.substring(l+j[0].length);return h(m),a(n.join(""))}}])}(window,window.angular);var taTools={};angular.module("textAngularSetup",[]).constant("taRegisterTool",registerTextAngularTool).value("taTools",taTools).value("taOptions",{forceTextAngularSanitize:!0,keyMappings:[],toolbar:[["h1","h2","h3","h4","h5","h6","p","pre","quote"],["bold","italics","underline","strikeThrough","ul","ol","redo","undo","clear"],["justifyLeft","justifyCenter","justifyRight","justifyFull","indent","outdent"],["html","insertImage","insertLink","insertVideo","wordcount","charcount"]],classes:{focussed:"focussed",toolbar:"btn-toolbar",toolbarGroup:"btn-group",toolbarButton:"btn btn-default",toolbarButtonActive:"active",disabled:"disabled",textEditor:"form-control",htmlEditor:"form-control"},defaultTagAttributes:{a:{target:""}},setup:{textEditorSetup:function(a){},htmlEditorSetup:function(a){}},defaultFileDropHandler:function(a,b){var c=new FileReader;return"image"===a.type.substring(0,5)?(c.onload=function(){ -""!==c.result&&b("insertImage",c.result,!0)},c.readAsDataURL(a),!0):!1}}).value("taSelectableElements",["a","img"]).value("taCustomRenderers",[{selector:"img",customAttribute:"ta-insert-video",renderLogic:function(a){var b=angular.element(""),c=a.prop("attributes");angular.forEach(c,function(a){b.attr(a.name,a.value)}),b.attr("src",b.attr("ta-insert-video")),a.replaceWith(b)}}]).value("taTranslations",{html:{tooltip:"Toggle html / Rich Text"},heading:{tooltip:"Heading "},p:{tooltip:"Paragraph"},pre:{tooltip:"Preformatted text"},ul:{tooltip:"Unordered List"},ol:{tooltip:"Ordered List"},quote:{tooltip:"Quote/unquote selection or paragraph"},undo:{tooltip:"Undo"},redo:{tooltip:"Redo"},bold:{tooltip:"Bold"},italic:{tooltip:"Italic"},underline:{tooltip:"Underline"},strikeThrough:{tooltip:"Strikethrough"},justifyLeft:{tooltip:"Align text left"},justifyRight:{tooltip:"Align text right"},justifyFull:{tooltip:"Justify text"},justifyCenter:{tooltip:"Center"},indent:{tooltip:"Increase indent"},outdent:{tooltip:"Decrease indent"},clear:{tooltip:"Clear formatting"},insertImage:{dialogPrompt:"Please enter an image URL to insert",tooltip:"Insert image",hotkey:"the - possibly language dependent hotkey ... for some future implementation"},insertVideo:{tooltip:"Insert video",dialogPrompt:"Please enter a youtube URL to embed"},insertLink:{tooltip:"Insert / edit link",dialogPrompt:"Please enter a URL to insert"},editLink:{reLinkButton:{tooltip:"Relink"},unLinkButton:{tooltip:"Unlink"},targetToggle:{buttontext:"Open in New Window"}},wordcount:{tooltip:"Display words Count"},charcount:{tooltip:"Display characters Count"}}).factory("taToolFunctions",["$window","taTranslations",function(a,b){return{imgOnSelectAction:function(a,b,c){var d=function(){c.updateTaBindtaTextElement(),c.hidePopover()};a.preventDefault(),c.displayElements.popover.css("width","375px");var e=c.displayElements.popoverContainer;e.empty();var f=angular.element('
      '),g=angular.element('');g.on("click",function(a){a.preventDefault(),b.css({width:"100%",height:""}),d()});var h=angular.element('');h.on("click",function(a){a.preventDefault(),b.css({width:"50%",height:""}),d()});var i=angular.element('');i.on("click",function(a){a.preventDefault(),b.css({width:"25%",height:""}),d()});var j=angular.element('');j.on("click",function(a){a.preventDefault(),b.css({width:"",height:""}),d()}),f.append(g),f.append(h),f.append(i),f.append(j),e.append(f),f=angular.element('
      ');var k=angular.element('');k.on("click",function(a){a.preventDefault(),b.css("float","left"),b.css("cssFloat","left"),b.css("styleFloat","left"),d()});var l=angular.element('');l.on("click",function(a){a.preventDefault(),b.css("float","right"),b.css("cssFloat","right"),b.css("styleFloat","right"),d()});var m=angular.element('');m.on("click",function(a){a.preventDefault(),b.css("float",""),b.css("cssFloat",""),b.css("styleFloat",""),d()}),f.append(k),f.append(m),f.append(l),e.append(f),f=angular.element('
      ');var n=angular.element('');n.on("click",function(a){a.preventDefault(),b.remove(),d()}),f.append(n),e.append(f),c.showPopover(b),c.showResizeOverlay(b)},aOnSelectAction:function(c,d,e){c.preventDefault(),e.displayElements.popover.css("width","436px");var f=e.displayElements.popoverContainer;f.empty(),f.css("line-height","28px");var g=angular.element(''+d.attr("href")+"");g.css({display:"inline-block","max-width":"200px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap","vertical-align":"middle"}),f.append(g);var h=angular.element('
      '),i=angular.element('');i.on("click",function(c){c.preventDefault();var f=a.prompt(b.insertLink.dialogPrompt,d.attr("href"));f&&""!==f&&"http://"!==f&&(d.attr("href",f),e.updateTaBindtaTextElement()),e.hidePopover()}),h.append(i);var j=angular.element('');j.on("click",function(a){a.preventDefault(),d.replaceWith(d.contents()),e.updateTaBindtaTextElement(),e.hidePopover()}),h.append(j);var k=angular.element('");"_blank"===d.attr("target")&&k.addClass("active"),k.on("click",function(a){a.preventDefault(),d.attr("target","_blank"===d.attr("target")?"":"_blank"),k.toggleClass("active"),e.updateTaBindtaTextElement()}),h.append(k),f.append(h),e.showPopover(d)},extractYoutubeVideoId:function(a){var b=/(?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/i,c=a.match(b);return c&&c[1]||null}}}]).run(["taRegisterTool","$window","taTranslations","taSelection","taToolFunctions","$sanitize","taOptions",function(a,b,c,d,e,f,g){var h={};if(f("",h),g.forceTextAngularSanitize===!0&&"taSanitize"!==h.version)throw angular.$$minErr("textAngular")("textAngularSetup","The textAngular-sanitize provider has been replaced by another -- have you included angular-sanitize by mistake?");a("html",{iconclass:"fa fa-code",tooltiptext:c.html.tooltip,action:function(){this.$editor().switchView()},activeState:function(){return this.$editor().showHtml}});var i=function(a){return function(){return this.$editor().queryFormatBlockState(a)}},j=function(){return this.$editor().wrapSelection("formatBlock","<"+this.name.toUpperCase()+">")};angular.forEach(["h1","h2","h3","h4","h5","h6"],function(b){a(b.toLowerCase(),{buttontext:b.toUpperCase(),tooltiptext:c.heading.tooltip+b.charAt(1),action:j,activeState:i(b.toLowerCase())})}),a("p",{buttontext:"P",tooltiptext:c.p.tooltip,action:function(){return this.$editor().wrapSelection("formatBlock","

      ")},activeState:function(){return this.$editor().queryFormatBlockState("p")}}),a("pre",{buttontext:"pre",tooltiptext:c.pre.tooltip,action:function(){return this.$editor().wrapSelection("formatBlock","

      ")},activeState:function(){return this.$editor().queryFormatBlockState("pre")}}),a("ul",{iconclass:"fa fa-list-ul",tooltiptext:c.ul.tooltip,action:function(){return this.$editor().wrapSelection("insertUnorderedList",null)},activeState:function(){return this.$editor().queryCommandState("insertUnorderedList")}}),a("ol",{iconclass:"fa fa-list-ol",tooltiptext:c.ol.tooltip,action:function(){return this.$editor().wrapSelection("insertOrderedList",null)},activeState:function(){return this.$editor().queryCommandState("insertOrderedList")}}),a("quote",{iconclass:"fa fa-quote-right",tooltiptext:c.quote.tooltip,action:function(){return this.$editor().wrapSelection("formatBlock","
      ")},activeState:function(){return this.$editor().queryFormatBlockState("blockquote")}}),a("undo",{iconclass:"fa fa-undo",tooltiptext:c.undo.tooltip,action:function(){return this.$editor().wrapSelection("undo",null)}}),a("redo",{iconclass:"fa fa-repeat",tooltiptext:c.redo.tooltip,action:function(){return this.$editor().wrapSelection("redo",null)}}),a("bold",{iconclass:"fa fa-bold",tooltiptext:c.bold.tooltip,action:function(){return this.$editor().wrapSelection("bold",null)},activeState:function(){return this.$editor().queryCommandState("bold")},commandKeyCode:98}),a("justifyLeft",{iconclass:"fa fa-align-left",tooltiptext:c.justifyLeft.tooltip,action:function(){return this.$editor().wrapSelection("justifyLeft",null)},activeState:function(a){if(a&&"#document"===a.nodeName)return!1;var b=!1;return a&&(b="left"===a.css("text-align")||"left"===a.attr("align")||"right"!==a.css("text-align")&&"center"!==a.css("text-align")&&"justify"!==a.css("text-align")&&!this.$editor().queryCommandState("justifyRight")&&!this.$editor().queryCommandState("justifyCenter")&&!this.$editor().queryCommandState("justifyFull")),b=b||this.$editor().queryCommandState("justifyLeft")}}),a("justifyRight",{iconclass:"fa fa-align-right",tooltiptext:c.justifyRight.tooltip,action:function(){return this.$editor().wrapSelection("justifyRight",null)},activeState:function(a){if(a&&"#document"===a.nodeName)return!1;var b=!1;return a&&(b="right"===a.css("text-align")),b=b||this.$editor().queryCommandState("justifyRight")}}),a("justifyFull",{iconclass:"fa fa-align-justify",tooltiptext:c.justifyFull.tooltip,action:function(){return this.$editor().wrapSelection("justifyFull",null)},activeState:function(a){var b=!1;return a&&(b="justify"===a.css("text-align")),b=b||this.$editor().queryCommandState("justifyFull")}}),a("justifyCenter",{iconclass:"fa fa-align-center",tooltiptext:c.justifyCenter.tooltip,action:function(){return this.$editor().wrapSelection("justifyCenter",null)},activeState:function(a){if(a&&"#document"===a.nodeName)return!1;var b=!1;return a&&(b="center"===a.css("text-align")),b=b||this.$editor().queryCommandState("justifyCenter")}}),a("indent",{iconclass:"fa fa-indent",tooltiptext:c.indent.tooltip,action:function(){return this.$editor().wrapSelection("indent",null)},activeState:function(){return this.$editor().queryFormatBlockState("blockquote")},commandKeyCode:"TabKey"}),a("outdent",{iconclass:"fa fa-outdent",tooltiptext:c.outdent.tooltip,action:function(){return this.$editor().wrapSelection("outdent",null)},activeState:function(){return!1},commandKeyCode:"ShiftTabKey"}),a("italics",{iconclass:"fa fa-italic",tooltiptext:c.italic.tooltip,action:function(){return this.$editor().wrapSelection("italic",null)},activeState:function(){return this.$editor().queryCommandState("italic")},commandKeyCode:105}),a("underline",{iconclass:"fa fa-underline",tooltiptext:c.underline.tooltip,action:function(){return this.$editor().wrapSelection("underline",null)},activeState:function(){return this.$editor().queryCommandState("underline")},commandKeyCode:117}),a("strikeThrough",{iconclass:"fa fa-strikethrough",tooltiptext:c.strikeThrough.tooltip,action:function(){return this.$editor().wrapSelection("strikeThrough",null)},activeState:function(){return document.queryCommandState("strikeThrough")}}),a("clear",{iconclass:"fa fa-ban",tooltiptext:c.clear.tooltip,action:function(a,b){var c;this.$editor().wrapSelection("removeFormat",null);var e=angular.element(d.getSelectionElement()),f=function(a){a=angular.element(a);var b=a;angular.forEach(a.children(),function(a){var c=angular.element("

      ");c.html(angular.element(a).html()),b.after(c),b=c}),a.remove()};if(angular.forEach(e.find("ul"),f),angular.forEach(e.find("ol"),f),"li"===e[0].tagName.toLowerCase()){var g=e[0].parentNode.childNodes,h=[],i=[],j=!1;for(c=0;c

      ");if(l.html(angular.element(e[0]).html()),0===h.length||0===i.length)0===i.length?k.after(l):k[0].parentNode.insertBefore(l[0],k[0]),0===h.length&&0===i.length?k.remove():angular.element(e[0]).remove();else{var m=angular.element("<"+k[0].tagName+">"),n=angular.element("<"+k[0].tagName+">");for(c=0;c';return this.$editor().wrapSelection("insertHTML",f,!0)}},onElementSelect:{element:"img",onlyWithAttrs:["ta-insert-video"],action:e.imgOnSelectAction}}),a("insertLink",{tooltiptext:c.insertLink.tooltip,iconclass:"fa fa-link",action:function(){var a;return a=b.prompt(c.insertLink.dialogPrompt,"http://"),a&&""!==a&&"http://"!==a?this.$editor().wrapSelection("createLink",a,!0):void 0},activeState:function(a){return a?"A"===a[0].tagName:!1},onElementSelect:{element:"a",action:e.aOnSelectAction}}),a("wordcount",{display:'
      Words:
      ',disabled:!0,wordcount:0,activeState:function(){var a=this.$editor().displayElements.text,b=a[0].innerHTML||"",c=0;return""!==b.replace(/\s*<[^>]*?>\s*/g,"")&&(c=b.replace(/<\/?(b|i|em|strong|span|u|strikethrough|a|img|small|sub|sup|label)( [^>*?])?>/gi,"").replace(/(<[^>]*?>\s*<[^>]*?>)/gi," ").replace(/(<[^>]*?>)/gi,"").replace(/\s+/gi," ").match(/\S+/g).length),this.wordcount=c,this.$editor().wordcount=c,!1}}),a("charcount",{display:'
      Characters:
      ',disabled:!0,charcount:0,activeState:function(){var a=this.$editor().displayElements.text,b=a[0].innerText||a[0].textContent,c=b.replace(/(\r\n|\n|\r)/gm,"").replace(/^\s+/g," ").replace(/\s+$/g," ").length;return this.charcount=c,this.$editor().charcount=c,!1}})}]),angular.module("ui.navbar",["ui.bootstrap","template/navbar-ul.html","template/navbar-li.html"]).directive("tree",function(){return{restrict:"E",replace:!0,scope:{tree:"="},templateUrl:"template/navbar-ul.html"}}).directive("leaf",["$compile",function(a){return{restrict:"E",replace:!0,scope:{leaf:"="},templateUrl:"template/navbar-li.html",link:function(b,c,d){if(angular.isArray(b.leaf.subtree)){c.append('');for(var e=c.parent(),f=!1;e.length>0&&!f;)e.hasClass("navbar-right")&&(f=!0),e=e.parent();f?c.addClass("dropdown-submenu-right"):c.addClass("dropdown-submenu"),a(c.contents())(b)}}}}]),angular.module("template/navbar-li.html",[]).run(["$templateCache",function(a){a.put("template/navbar-li.html",'
    • \n {{leaf.name}}\n
    • ')}]),angular.module("template/navbar-ul.html",[]).run(["$templateCache",function(a){a.put("template/navbar-ul.html","")}]),function(){"use strict";var a={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,COMMAND:91,MAP:{91:"COMMAND",8:"BACKSPACE",9:"TAB",13:"ENTER",16:"SHIFT",17:"CTRL",18:"ALT",19:"PAUSEBREAK",20:"CAPSLOCK",27:"ESC",32:"SPACE",33:"PAGE_UP",34:"PAGE_DOWN",35:"END",36:"HOME",37:"LEFT",38:"UP",39:"RIGHT",40:"DOWN",43:"+",44:"PRINTSCREEN",45:"INSERT",46:"DELETE",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NUMLOCK",145:"SCROLLLOCK",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},isControl:function(b){var c=b.which;switch(c){case a.COMMAND:case a.SHIFT:case a.CTRL:case a.ALT:return!0}return b.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a},isVerticalMovement:function(b){return~[a.UP,a.DOWN].indexOf(b)},isHorizontalMovement:function(b){return~[a.LEFT,a.RIGHT,a.BACKSPACE,a.DELETE].indexOf(b)}};void 0===angular.element.prototype.querySelectorAll&&(angular.element.prototype.querySelectorAll=function(a){return angular.element(this[0].querySelectorAll(a))}),void 0===angular.element.prototype.closest&&(angular.element.prototype.closest=function(a){for(var b=this[0],c=b.matches||b.webkitMatchesSelector||b.mozMatchesSelector||b.msMatchesSelector;b;){if(c.bind(b)(a))return b;b=b.parentElement}return!1});var b=0,c=angular.module("ui.select",[]).constant("uiSelectConfig",{theme:"bootstrap",searchEnabled:!0,sortable:!1,placeholder:"",refreshDelay:1e3,closeOnSelect:!0,dropdownPosition:"auto",generateId:function(){return b++},appendToBody:!1}).service("uiSelectMinErr",function(){var a=angular.$$minErr("ui.select");return function(){var b=a.apply(this,arguments),c=b.message.replace(new RegExp("\nhttp://errors.angularjs.org/.*"),"");return new Error(c)}}).directive("uisTranscludeAppend",function(){return{link:function(a,b,c,d,e){e(a,function(a){b.append(a)})}}}).filter("highlight",function(){function a(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(b,c){return c&&b?b.replace(new RegExp(a(c),"gi"),'$&'):b}}).factory("uisOffset",["$document","$window",function(a,b){return function(c){var d=c[0].getBoundingClientRect();return{width:d.width||c.prop("offsetWidth"),height:d.height||c.prop("offsetHeight"),top:d.top+(b.pageYOffset||a[0].documentElement.scrollTop),left:d.left+(b.pageXOffset||a[0].documentElement.scrollLeft)}}}]);c.directive("uiSelectChoices",["uiSelectConfig","uisRepeatParser","uiSelectMinErr","$compile",function(a,b,c,d){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(b){var c=b.parent().attr("theme")||a.theme;return c+"/choices.tpl.html"},compile:function(e,f){if(!f.repeat)throw c("repeat","Expected 'repeat' expression.");return function(e,f,g,h,i){var j=g.groupBy,k=g.groupFilter;if(h.parseRepeatAttr(g.repeat,j,k),h.disableChoiceExpression=g.uiDisableChoice,h.onHighlightCallback=g.onHighlight,h.dropdownPosition=g.position?g.position.toLowerCase():a.dropdownPosition,j){var l=f.querySelectorAll(".ui-select-choices-group");if(1!==l.length)throw c("rows","Expected 1 .ui-select-choices-group but got '{0}'.",l.length);l.attr("ng-repeat",b.getGroupNgRepeatExpression())}var m=f.querySelectorAll(".ui-select-choices-row");if(1!==m.length)throw c("rows","Expected 1 .ui-select-choices-row but got '{0}'.",m.length);m.attr("ng-repeat",h.parserResult.repeatExpression(j)).attr("ng-if","$select.open").attr("ng-click","$select.select("+h.parserResult.itemName+",false,$event)");var n=f.querySelectorAll(".ui-select-choices-row-inner");if(1!==n.length)throw c("rows","Expected 1 .ui-select-choices-row-inner but got '{0}'.",n.length);n.attr("uis-transclude-append",""),d(f,i)(e),e.$watch("$select.search",function(a){a&&!h.open&&h.multiple&&h.activate(!1,!0),h.activeIndex=h.tagging.isActivated?-1:0,h.refresh(g.refresh)}),g.$observe("refreshDelay",function(){var b=e.$eval(g.refreshDelay);h.refreshDelay=void 0!==b?b:a.refreshDelay})}}}}]),c.controller("uiSelectCtrl",["$scope","$element","$timeout","$filter","uisRepeatParser","uiSelectMinErr","uiSelectConfig","$parse",function(b,c,d,e,f,g,h,i){function j(){(n.resetSearchInput||void 0===n.resetSearchInput&&h.resetSearchInput)&&(n.search=o,n.selected&&n.items.length&&!n.multiple&&(n.activeIndex=n.items.indexOf(n.selected)))}function k(a,b){var c,d,e=[];for(c=0;c0||0===n.search.length&&n.tagging.isActivated&&n.activeIndex>-1)&&n.activeIndex--;break;case a.TAB:(!n.multiple||n.open)&&n.select(n.items[n.activeIndex],!0);break;case a.ENTER:n.open&&(n.tagging.isActivated||n.activeIndex>=0)?n.select(n.items[n.activeIndex]):n.activate(!1,!0);break;case a.ESC:n.close();break;default:c=!1}return c}function m(){var a=c.querySelectorAll(".ui-select-choices-content"),b=a.querySelectorAll(".ui-select-choices-row");if(b.length<1)throw g("choices","Expected multiple .ui-select-choices-row but got '{0}'.",b.length);if(!(n.activeIndex<0)){var d=b[n.activeIndex],e=d.offsetTop+d.clientHeight-a[0].scrollTop,f=a[0].offsetHeight;e>f?a[0].scrollTop+=e-f:e=n.items.length?0:n.activeIndex,-1===n.activeIndex&&n.taggingLabel!==!1&&(n.activeIndex=0),d(function(){n.search=a||n.search,n.searchInput[0].focus(),!n.tagging.isActivated&&n.items.length>1&&m()}))},n.findGroupByName=function(a){return n.groups&&n.groups.filter(function(b){return b.name===a})[0]},n.parseRepeatAttr=function(a,c,d){function e(a){var e=b.$eval(c);if(n.groups=[],angular.forEach(a,function(a){var b=angular.isFunction(e)?e(a):a[e],c=n.findGroupByName(b);c?c.items.push(a):n.groups.push({name:b,items:[a]})}),d){var f=b.$eval(d);angular.isFunction(f)?n.groups=f(n.groups):angular.isArray(f)&&(n.groups=k(n.groups,f))}n.items=[],n.groups.forEach(function(a){n.items=n.items.concat(a.items)})}function h(a){n.items=a}n.setItemsFn=c?e:h,n.parserResult=f.parse(a),n.isGrouped=!!c,n.itemProperty=n.parserResult.itemName;var j=n.parserResult.source,l=function(){var a=j(b);b.$uisSource=Object.keys(a).map(function(b){var c={};return c[n.parserResult.keyName]=b,c.value=a[b],c})};n.parserResult.keyName&&(l(),n.parserResult.source=i("$uisSource"+n.parserResult.filters),b.$watch(j,function(a,b){a!==b&&l()},!0)),n.refreshItems=function(a){a=a||n.parserResult.source(b);var c=n.selected;if(n.isEmpty()||angular.isArray(c)&&!c.length||!n.removeSelected)n.setItemsFn(a);else if(void 0!==a){var d=a.filter(function(a){return c&&c.indexOf(a)<0});n.setItemsFn(d)}("auto"===n.dropdownPosition||"up"===n.dropdownPosition)&&b.calculateDropdownPos()},b.$watchCollection(n.parserResult.source,function(a){if(void 0===a||null===a)n.items=[];else{if(!angular.isArray(a))throw g("items","Expected an array but got '{0}'.",a);n.refreshItems(a),n.ngModel.$modelValue=null}})};var p;n.refresh=function(a){void 0!==a&&(p&&d.cancel(p),p=d(function(){b.$eval(a)},n.refreshDelay))},n.isActive=function(a){if(!n.open)return!1;var b=n.items.indexOf(a[n.itemProperty]),c=b===n.activeIndex;return!c||0>b&&n.taggingLabel!==!1||0>b&&n.taggingLabel===!1?!1:(c&&!angular.isUndefined(n.onHighlightCallback)&&a.$eval(n.onHighlightCallback),c)},n.isDisabled=function(a){if(n.open){var b,c=n.items.indexOf(a[n.itemProperty]),d=!1;return c>=0&&!angular.isUndefined(n.disableChoiceExpression)&&(b=n.items[c],d=!!a.$eval(n.disableChoiceExpression),b._uiSelectChoiceDisabled=d),d}},n.select=function(a,c,e){if(void 0===a||!a._uiSelectChoiceDisabled){if(!n.items&&!n.search)return;if(!a||!a._uiSelectChoiceDisabled){if(n.tagging.isActivated){if(n.taggingLabel===!1)if(n.activeIndex<0){if(a=void 0!==n.tagging.fct?n.tagging.fct(n.search):n.search,!a||angular.equals(n.items[0],a))return}else a=n.items[n.activeIndex];else if(0===n.activeIndex){if(void 0===a)return;if(void 0!==n.tagging.fct&&"string"==typeof a){if(a=n.tagging.fct(n.search),!a)return}else"string"==typeof a&&(a=a.replace(n.taggingLabel,"").trim())}if(n.selected&&angular.isArray(n.selected)&&n.selected.filter(function(b){return angular.equals(b,a)}).length>0)return void n.close(c)}b.$broadcast("uis:select",a);var f={};f[n.parserResult.itemName]=a,d(function(){n.onSelectCallback(b,{$item:a,$model:n.parserResult.modelMapper(b,f)})}),n.closeOnSelect&&n.close(c),e&&"click"===e.type&&(n.clickTriggeredSelect=!0)}}},n.close=function(a){n.open&&(n.ngModel&&n.ngModel.$setTouched&&n.ngModel.$setTouched(),j(),n.open=!1,b.$broadcast("uis:close",a))},n.setFocus=function(){n.focus||n.focusInput[0].focus()},n.clear=function(a){n.select(void 0),a.stopPropagation(),d(function(){n.focusser[0].focus()},0,!1)},n.toggle=function(a){n.open?(n.close(),a.preventDefault(),a.stopPropagation()):n.activate()},n.isLocked=function(a,b){var c,d=n.selected[b];return d&&!angular.isUndefined(n.lockChoiceExpression)&&(c=!!a.$eval(n.lockChoiceExpression),d._uiSelectChoiceLocked=c),c};var q=null;n.sizeSearchInput=function(){var a=n.searchInput[0],c=n.searchInput.parent().parent()[0],e=function(){return c.clientWidth*!!a.offsetParent},f=function(b){if(0===b)return!1;var c=b-a.offsetLeft-10;return 50>c&&(c=b),n.searchInput.css("width",c+"px"),!0};n.searchInput.css("width","10px"),d(function(){null!==q||f(e())||(q=b.$watch(e,function(a){f(a)&&(q(),q=null)}))})},n.searchInput.on("keydown",function(c){var e=c.which;b.$apply(function(){var b=!1;if((n.items.length>0||n.tagging.isActivated)&&(l(e),n.taggingTokens.isActivated)){for(var f=0;f0&&(b=!0);b&&d(function(){n.searchInput.triggerHandler("tagged");var b=n.search.replace(a.MAP[c.keyCode],"").trim();n.tagging.fct&&(b=n.tagging.fct(b)),b&&n.select(b,!0)})}}),a.isVerticalMovement(e)&&n.items.length>0&&m(),(e===a.ENTER||e===a.ESC)&&(c.preventDefault(),c.stopPropagation())}),n.searchInput.on("paste",function(a){var b=a.originalEvent.clipboardData.getData("text/plain");if(b&&b.length>0&&n.taggingTokens.isActivated&&n.tagging.fct){var c=b.split(n.taggingTokens.tokens[0]);c&&c.length>0&&(angular.forEach(c,function(a){var b=n.tagging.fct(a);b&&n.select(b,!0)}),a.preventDefault(),a.stopPropagation())}}),n.searchInput.on("tagged",function(){d(function(){j()})}),b.$on("$destroy",function(){n.searchInput.off("keyup keydown tagged blur paste")})}]),c.directive("uiSelect",["$document","uiSelectConfig","uiSelectMinErr","uisOffset","$compile","$parse","$timeout",function(a,b,c,d,e,f,g){return{restrict:"EA",templateUrl:function(a,c){var d=c.theme||b.theme;return d+(angular.isDefined(c.multiple)?"/select-multiple.tpl.html":"/select.tpl.html")},replace:!0,transclude:!0,require:["uiSelect","^ngModel"],scope:!0,controller:"uiSelectCtrl",controllerAs:"$select",compile:function(e,h){return angular.isDefined(h.multiple)?e.append("").removeAttr("multiple"):e.append(""),h.inputId&&(e.querySelectorAll("input.ui-select-search")[0].id=h.inputId),function(e,h,i,j,k){function l(a){if(o.open){var b=!1;if(b=window.jQuery?window.jQuery.contains(h[0],a.target):h[0].contains(a.target),!b&&!o.clickTriggeredSelect){var c=["input","button","textarea"],d=angular.element(a.target).controller("uiSelect"),f=d&&d!==o;f||(f=~c.indexOf(a.target.tagName.toLowerCase())),o.close(f),e.$digest()}o.clickTriggeredSelect=!1}}function m(){var b=d(h);r=angular.element('
      '),r[0].style.width=b.width+"px",r[0].style.height=b.height+"px",h.after(r),s=h[0].style.width,a.find("body").append(h),h[0].style.position="absolute",h[0].style.left=b.left+"px",h[0].style.top=b.top+"px",h[0].style.width=b.width+"px"}function n(){null!==r&&(r.replaceWith(h),r=null,h[0].style.position="",h[0].style.left="",h[0].style.top="",h[0].style.width=s)}var o=j[0],p=j[1];o.generatedId=b.generateId(),o.baseTitle=i.title||"Select box",o.focusserTitle=o.baseTitle+" focus",o.focusserId="focusser-"+o.generatedId,o.closeOnSelect=function(){return angular.isDefined(i.closeOnSelect)?f(i.closeOnSelect)():b.closeOnSelect}(),o.onSelectCallback=f(i.onSelect),o.onRemoveCallback=f(i.onRemove),o.limit=angular.isDefined(i.limit)?parseInt(i.limit,10):void 0,o.ngModel=p,o.choiceGrouped=function(a){return o.isGrouped&&a&&a.name},i.tabindex&&i.$observe("tabindex",function(a){o.focusInput.attr("tabindex",a),h.removeAttr("tabindex")}),e.$watch("searchEnabled",function(){var a=e.$eval(i.searchEnabled);o.searchEnabled=void 0!==a?a:b.searchEnabled}),e.$watch("sortable",function(){var a=e.$eval(i.sortable);o.sortable=void 0!==a?a:b.sortable}),i.$observe("disabled",function(){o.disabled=void 0!==i.disabled?i.disabled:!1}),i.$observe("resetSearchInput",function(){var a=e.$eval(i.resetSearchInput);o.resetSearchInput=void 0!==a?a:!0}),i.$observe("tagging",function(){if(void 0!==i.tagging){var a=e.$eval(i.tagging);o.tagging={isActivated:!0,fct:a!==!0?a:void 0}}else o.tagging={isActivated:!1,fct:void 0}}),i.$observe("taggingLabel",function(){void 0!==i.tagging&&("false"===i.taggingLabel?o.taggingLabel=!1:o.taggingLabel=void 0!==i.taggingLabel?i.taggingLabel:"(new)")}),i.$observe("taggingTokens",function(){if(void 0!==i.tagging){var a=void 0!==i.taggingTokens?i.taggingTokens.split("|"):[",","ENTER"];o.taggingTokens={isActivated:!0,tokens:a}}}),angular.isDefined(i.autofocus)&&g(function(){o.setFocus()}),angular.isDefined(i.focusOn)&&e.$on(i.focusOn,function(){g(function(){o.setFocus()})}),a.on("click",l),e.$on("$destroy",function(){a.off("click",l)}),k(e,function(a){var b=angular.element("
      ").append(a),d=b.querySelectorAll(".ui-select-match");if(d.removeAttr("ui-select-match"),d.removeAttr("data-ui-select-match"),1!==d.length)throw c("transcluded","Expected 1 .ui-select-match but got '{0}'.",d.length);h.querySelectorAll(".ui-select-match").replaceWith(d);var e=b.querySelectorAll(".ui-select-choices");if(e.removeAttr("ui-select-choices"),e.removeAttr("data-ui-select-choices"),1!==e.length)throw c("transcluded","Expected 1 .ui-select-choices but got '{0}'.",e.length);h.querySelectorAll(".ui-select-choices").replaceWith(e)});var q=e.$eval(i.appendToBody);(void 0!==q?q:b.appendToBody)&&(e.$watch("$select.open",function(a){a?m():n()}),e.$on("$destroy",function(){n()}));var r=null,s="",t=null,u="direction-up"; -e.$watch("$select.open",function(){("auto"===o.dropdownPosition||"up"===o.dropdownPosition)&&e.calculateDropdownPos()});var v=function(a,b){a=a||d(h),b=b||d(t),t[0].style.position="absolute",t[0].style.top=-1*b.height+"px",h.addClass(u)},w=function(a,b){h.removeClass(u),a=a||d(h),b=b||d(t),t[0].style.position="",t[0].style.top=""};e.calculateDropdownPos=function(){if(o.open){if(t=angular.element(h).querySelectorAll(".ui-select-dropdown"),0===t.length)return;t[0].style.opacity=0,g(function(){if("up"===o.dropdownPosition)v(b,c);else{h.removeClass(u);var b=d(h),c=d(t),e=a[0].documentElement.scrollTop||a[0].body.scrollTop;b.top+b.height+c.height>e+a[0].documentElement.clientHeight?v(b,c):w(b,c)}t[0].style.opacity=1})}else{if(null===t||0===t.length)return;t[0].style.position="",t[0].style.top="",h.removeClass(u)}}}}}}]),c.directive("uiSelectMatch",["uiSelectConfig",function(a){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(b){var c=b.parent().attr("theme")||a.theme,d=b.parent().attr("multiple");return c+(d?"/match-multiple.tpl.html":"/match.tpl.html")},link:function(b,c,d,e){function f(a){e.allowClear=angular.isDefined(a)?""===a?!0:"true"===a.toLowerCase():!1}e.lockChoiceExpression=d.uiLockChoice,d.$observe("placeholder",function(b){e.placeholder=void 0!==b?b:a.placeholder}),d.$observe("allowClear",f),f(d.allowClear),e.multiple&&e.sizeSearchInput()}}}]),c.directive("uiSelectMultiple",["uiSelectMinErr","$timeout",function(b,c){return{restrict:"EA",require:["^uiSelect","^ngModel"],controller:["$scope","$timeout",function(a,b){var c,d=this,e=a.$select;a.$evalAsync(function(){c=a.ngModel}),d.activeMatchIndex=-1,d.updateModel=function(){c.$setViewValue(Date.now()),d.refreshComponent()},d.refreshComponent=function(){e.refreshItems(),e.sizeSearchInput()},d.removeChoice=function(c){var f=e.selected[c];if(!f._uiSelectChoiceLocked){var g={};g[e.parserResult.itemName]=f,e.selected.splice(c,1),d.activeMatchIndex=-1,e.sizeSearchInput(),b(function(){e.onRemoveCallback(a,{$item:f,$model:e.parserResult.modelMapper(a,g)})}),d.updateModel()}},d.getPlaceholder=function(){return e.selected&&e.selected.length?void 0:e.placeholder}}],controllerAs:"$selectMultiple",link:function(d,e,f,g){function h(a){return angular.isNumber(a.selectionStart)?a.selectionStart:a.value.length}function i(b){function c(){switch(b){case a.LEFT:return~n.activeMatchIndex?k:g;case a.RIGHT:return~n.activeMatchIndex&&i!==g?j:(l.activate(),!1);case a.BACKSPACE:return~n.activeMatchIndex?(n.removeChoice(i),k):g;case a.DELETE:return~n.activeMatchIndex?(n.removeChoice(n.activeMatchIndex),i):!1}}var d=h(l.searchInput[0]),e=l.selected.length,f=0,g=e-1,i=n.activeMatchIndex,j=n.activeMatchIndex+1,k=n.activeMatchIndex-1,m=i;return d>0||l.search.length&&b==a.RIGHT?!1:(l.close(),m=c(),l.selected.length&&m!==!1?n.activeMatchIndex=Math.min(g,Math.max(f,m)):n.activeMatchIndex=-1,!0)}function j(a){if(void 0===a||void 0===l.search)return!1;var b=a.filter(function(a){return void 0===l.search.toUpperCase()||void 0===a?!1:a.toUpperCase()===l.search.toUpperCase()}).length>0;return b}function k(a,b){var c=-1;if(angular.isArray(a))for(var d=angular.copy(a),e=0;e=0;e--)b={},b[l.parserResult.itemName]=l.selected[e],a=l.parserResult.modelMapper(d,b),c.unshift(a);return c}),m.$formatters.unshift(function(a){var b,c=l.parserResult.source(d,{$select:{search:""}}),e={};if(!c)return a;var f=[],g=function(a,c){if(a&&a.length){for(var g=a.length-1;g>=0;g--){if(e[l.parserResult.itemName]=a[g],b=l.parserResult.modelMapper(d,e),l.parserResult.trackByExp){var h=/\.(.+)/.exec(l.parserResult.trackByExp);if(h.length>0&&b[h[1]]==c[h[1]])return f.unshift(a[g]),!0}if(angular.equals(b,c))return f.unshift(a[g]),!0}return!1}};if(!a)return f;for(var h=a.length-1;h>=0;h--)g(l.selected,a[h])||g(c,a[h])||f.unshift(a[h]);return f}),d.$watchCollection(function(){return m.$modelValue},function(a,b){b!=a&&(m.$modelValue=null,n.refreshComponent())}),m.$render=function(){if(!angular.isArray(m.$viewValue)){if(!angular.isUndefined(m.$viewValue)&&null!==m.$viewValue)throw b("multiarr","Expected model value to be array but got '{0}'",m.$viewValue);l.selected=[]}l.selected=m.$viewValue,d.$evalAsync()},d.$on("uis:select",function(a,b){l.selected.length>=l.limit||(l.selected.push(b),n.updateModel())}),d.$on("uis:activate",function(){n.activeMatchIndex=-1}),d.$watch("$select.disabled",function(a,b){b&&!a&&l.sizeSearchInput()}),l.searchInput.on("keydown",function(b){var c=b.which;d.$apply(function(){var d=!1;a.isHorizontalMovement(c)&&(d=i(c)),d&&c!=a.TAB&&(b.preventDefault(),b.stopPropagation())})}),l.searchInput.on("keyup",function(b){if(a.isVerticalMovement(b.which)||d.$evalAsync(function(){l.activeIndex=l.taggingLabel===!1?-1:0}),l.tagging.isActivated&&l.search.length>0){if(b.which===a.TAB||a.isControl(b)||a.isFunctionKey(b)||b.which===a.ESC||a.isVerticalMovement(b.which))return;if(l.activeIndex=l.taggingLabel===!1?-1:0,l.taggingLabel===!1)return;var c,e,f,g,h=angular.copy(l.items),i=angular.copy(l.items),m=!1,n=-1;if(void 0!==l.tagging.fct){if(f=l.$filter("filter")(h,{isTag:!0}),f.length>0&&(g=f[0]),h.length>0&&g&&(m=!0,h=h.slice(1,h.length),i=i.slice(1,i.length)),c=l.tagging.fct(l.search),c.isTag=!0,i.filter(function(a){return angular.equals(a,l.tagging.fct(l.search))}).length>0)return;c.isTag=!0}else{if(f=l.$filter("filter")(h,function(a){return a.match(l.taggingLabel)}),f.length>0&&(g=f[0]),e=h[0],void 0!==e&&h.length>0&&g&&(m=!0,h=h.slice(1,h.length),i=i.slice(1,i.length)),c=l.search+" "+l.taggingLabel,k(l.selected,l.search)>-1)return;if(j(i.concat(l.selected)))return void(m&&(h=i,d.$evalAsync(function(){l.activeIndex=0,l.items=h})));if(j(i))return void(m&&(l.items=i.slice(1,i.length)))}m&&(n=k(l.selected,c)),n>-1?h=h.slice(n+1,h.length-1):(h=[],h.push(c),h=h.concat(i)),d.$evalAsync(function(){l.activeIndex=0,l.items=h})}}),l.searchInput.on("blur",function(){c(function(){n.activeMatchIndex=-1})})}}}]),c.directive("uiSelectSingle",["$timeout","$compile",function(b,c){return{restrict:"EA",require:["^uiSelect","^ngModel"],link:function(d,e,f,g){var h=g[0],i=g[1];i.$parsers.unshift(function(a){var b,c={};return c[h.parserResult.itemName]=a,b=h.parserResult.modelMapper(d,c)}),i.$formatters.unshift(function(a){var b,c=h.parserResult.source(d,{$select:{search:""}}),e={};if(c){var f=function(c){return e[h.parserResult.itemName]=c,b=h.parserResult.modelMapper(d,e),b==a};if(h.selected&&f(h.selected))return h.selected;for(var g=c.length-1;g>=0;g--)if(f(c[g]))return c[g]}return a}),d.$watch("$select.selected",function(a){i.$viewValue!==a&&i.$setViewValue(a)}),i.$render=function(){h.selected=i.$viewValue},d.$on("uis:select",function(a,b){h.selected=b}),d.$on("uis:close",function(a,c){b(function(){h.focusser.prop("disabled",!1),c||h.focusser[0].focus()},0,!1)}),d.$on("uis:activate",function(){j.prop("disabled",!0)});var j=angular.element("");c(j)(d),h.focusser=j,h.focusInput=j,e.parent().append(j),j.bind("focus",function(){d.$evalAsync(function(){h.focus=!0})}),j.bind("blur",function(){d.$evalAsync(function(){h.focus=!1})}),j.bind("keydown",function(b){return b.which===a.BACKSPACE?(b.preventDefault(),b.stopPropagation(),h.select(void 0),void d.$apply()):void(b.which===a.TAB||a.isControl(b)||a.isFunctionKey(b)||b.which===a.ESC||((b.which==a.DOWN||b.which==a.UP||b.which==a.ENTER||b.which==a.SPACE)&&(b.preventDefault(),b.stopPropagation(),h.activate()),d.$digest()))}),j.bind("keyup input",function(b){b.which===a.TAB||a.isControl(b)||a.isFunctionKey(b)||b.which===a.ESC||b.which==a.ENTER||b.which===a.BACKSPACE||(h.activate(j.val()),j.val(""),d.$digest())})}}}]),c.directive("uiSelectSort",["$timeout","uiSelectConfig","uiSelectMinErr",function(a,b,c){return{require:"^uiSelect",link:function(b,d,e,f){if(null===b[e.uiSelectSort])throw c("sort","Expected a list to sort");var g=angular.extend({axis:"horizontal"},b.$eval(e.uiSelectSortOptions)),h=g.axis,i="dragging",j="dropping",k="dropping-before",l="dropping-after";b.$watch(function(){return f.sortable},function(a){a?d.attr("draggable",!0):d.removeAttr("draggable")}),d.on("dragstart",function(a){d.addClass(i),(a.dataTransfer||a.originalEvent.dataTransfer).setData("text/plain",b.$index)}),d.on("dragend",function(){d.removeClass(i)});var m,n=function(a,b){this.splice(b,0,this.splice(a,1)[0])},o=function(a){a.preventDefault();var b="vertical"===h?a.offsetY||a.layerY||(a.originalEvent?a.originalEvent.offsetY:0):a.offsetX||a.layerX||(a.originalEvent?a.originalEvent.offsetX:0);b
    • '),a.put("bootstrap/match-multiple.tpl.html",' × '),a.put("bootstrap/match.tpl.html",'
      {{$select.placeholder}}
      '),a.put("bootstrap/select-multiple.tpl.html",''),a.put("bootstrap/select.tpl.html",''),a.put("selectize/choices.tpl.html",'
      '),a.put("selectize/match.tpl.html",'
      '),a.put("selectize/select.tpl.html",'
      '),a.put("select2/choices.tpl.html",'
      '),a.put("select2/match-multiple.tpl.html",'
    • '),a.put("select2/match.tpl.html",'{{$select.placeholder}} '),a.put("select2/select-multiple.tpl.html",'
      '),a.put("select2/select.tpl.html",'
      ')}]),function(){window.WebComponents=window.WebComponents||{flags:{}};var a="webcomponents.js",b=document.querySelector('script[src*="'+a+'"]'),c={};if(!c.noOpts){if(location.search.slice(1).split("&").forEach(function(a){var b,d=a.split("=");d[0]&&(b=d[0].match(/wc-(.+)/))&&(c[b[1]]=d[1]||!0)}),b)for(var d,e=0;d=b.attributes[e];e++)"src"!==d.name&&(c[d.name]=d.value||!0);if(c.log&&c.log.split){var f=c.log.split(",");c.log={},f.forEach(function(a){c.log[a]=!0})}else c.log={}}c.shadow=c.shadow||c.shadowdom||c.polyfill,"native"===c.shadow?c.shadow=!1:c.shadow=c.shadow||!HTMLElement.prototype.createShadowRoot,c.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=c.register),WebComponents.flags=c}(),WebComponents.flags.shadow&&("undefined"==typeof WeakMap&&!function(){var a=Object.defineProperty,b=Date.now()%1e9,c=function(){this.name="__st"+(1e9*Math.random()>>>0)+(b++ +"__")};c.prototype={set:function(b,c){var d=b[this.name];return d&&d[0]===b?d[1]=c:a(b,this.name,{value:[b,c],writable:!0}),this},get:function(a){var b;return(b=a[this.name])&&b[0]===a?b[1]:void 0},"delete":function(a){var b=a[this.name];return b&&b[0]===a?(b[0]=b[1]=void 0,!0):!1},has:function(a){var b=a[this.name];return b?b[0]===a:!1}},window.WeakMap=c}(),window.ShadowDOMPolyfill={},function(a){"use strict";function b(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var a=new Function("return true;");return a()}catch(b){return!1}}function c(a){if(!a)throw new Error("Assertion failed")}function d(a,b){for(var c=N(b),d=0;dj;j++)i[j]=new Array(h),i[j][0]=j;for(var k=0;h>k;k++)i[0][k]=k;for(var j=1;g>j;j++)for(var k=1;h>k;k++)if(this.equals(a[b+k-1],d[e+j-1]))i[j][k]=i[j-1][k-1];else{var l=i[j-1][k]+1,m=i[j][k-1]+1;i[j][k]=m>l?l:m}return i},spliceOperationsFromEditDistances:function(a){for(var b=a.length-1,c=a[0].length-1,h=a[b][c],i=[];b>0||c>0;)if(0!=b)if(0!=c){var j,k=a[b-1][c-1],l=a[b-1][c],m=a[b][c-1];j=m>l?k>l?l:k:k>m?m:k,j==k?(k==h?i.push(d):(i.push(e),h=k),b--,c--):j==l?(i.push(g),b--,h=l):(i.push(f),c--,h=m)}else i.push(g),b--;else i.push(f),c--;return i.reverse(),i},calcSplices:function(a,c,h,i,j,k){var l=0,m=0,n=Math.min(h-c,k-j);if(0==c&&0==j&&(l=this.sharedPrefix(a,i,n)),h==a.length&&k==i.length&&(m=this.sharedSuffix(a,i,n-l)),c+=l,j+=l,h-=m,k-=m,h-c==0&&k-j==0)return[];if(c==h){for(var o=b(c,[],0);k>j;)o.removed.push(i[j++]);return[o]}if(j==k)return[b(c,[],h-c)];for(var p=this.spliceOperationsFromEditDistances(this.calcEditDistances(a,c,h,i,j,k)),o=void 0,q=[],r=c,s=j,t=0;td;d++)if(!this.equals(a[d],b[d]))return d;return c},sharedSuffix:function(a,b,c){for(var d=a.length,e=b.length,f=0;c>f&&this.equals(a[--d],b[--e]);)f++;return f},calculateSplices:function(a,b){return this.calcSplices(a,0,a.length,b,0,b.length)},equals:function(a,b){return a===b}},a.ArraySplice=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(){g=!1;var a=f.slice(0);f=[];for(var b=0;b0){for(var k=0;k0&&d.length>0;){var f=c.pop(),g=d.pop();if(f!==g)break;e=f}return e}function k(a,b,c){b instanceof T.Window&&(b=b.document);var e,f=M(b),g=M(c),h=d(c,a),e=j(f,g);e||(e=g.root);for(var i=e;i;i=i.parent)for(var k=0;k0;f--)if(!s(b[f],a,e,b,d))return!1;return!0}function q(a,b,c,d){var e=fa,f=b[0]||c;return s(f,a,e,b,d)}function r(a,b,c,d){for(var e=ga,f=1;f0&&s(c,a,e,b,d)}function s(a,b,c,d,e){var f=U.get(a);if(!f)return!0;var g=e||h(d,a);if(g===a){if(c===ea)return!0;c===ga&&(c=fa)}else if(c===ga&&!b.bubbles)return!0;if("relatedTarget"in b){var i=R(b),j=i.relatedTarget;if(j){if(j instanceof Object&&j.addEventListener){var l=S(j),m=k(b,a,l);if(m===g)return!0}else m=null;Z.set(b,m)}}$.set(b,c);var n=b.type,o=!1;X.set(b,g),Y.set(b,a),f.depth++;for(var p=0,q=f.length;q>p;p++){var r=f[p];if(r.removed)o=!0;else if(!(r.type!==n||!r.capture&&c===ea||r.capture&&c===ga))try{if("function"==typeof r.handler?r.handler.call(a,b):r.handler.handleEvent(b),aa.get(b))return!1}catch(s){K||(K=s)}}if(f.depth--,o&&0===f.depth){var t=f.slice();f.length=0;for(var p=0;pd;d++)b[d]=g(a[d]);return b.length=e,b}function e(a,b){a.prototype[b]=function(){return d(f(this)[b].apply(f(this),arguments))}}var f=a.unsafeUnwrap,g=a.wrap,h={enumerable:!1};c.prototype={item:function(a){return this[a]}},b(c.prototype,"item"),a.wrappers.NodeList=c,a.addWrapNodeListMethod=e,a.wrapNodeList=d}(window.ShadowDOMPolyfill),function(a){"use strict";a.wrapHTMLCollection=a.wrapNodeList,a.wrappers.HTMLCollection=a.wrappers.NodeList}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){A(a instanceof w)}function c(a){var b=new y;return b[0]=a,b.length=1,b}function d(a,b,c){C(b,"childList",{removedNodes:c,previousSibling:a.previousSibling,nextSibling:a.nextSibling})}function e(a,b){C(a,"childList",{removedNodes:b})}function f(a,b,d,e){if(a instanceof DocumentFragment){var f=h(a);P=!0;for(var g=f.length-1;g>=0;g--)a.removeChild(f[g]),f[g].parentNode_=b;P=!1;for(var g=0;ge;e++)d.appendChild(K(b[e]));return d}function q(a){if(void 0!==a.firstChild_)for(var b=a.firstChild_;b;){var c=b;b=b.nextSibling_,c.parentNode_=c.previousSibling_=c.nextSibling_=void 0}a.firstChild_=a.lastChild_=void 0}function r(a){if(a.invalidateShadowRenderer()){for(var b=a.firstChild;b;){A(b.parentNode===a);var c=b.nextSibling,d=K(b),e=d.parentNode;e&&X.call(e,d),b.previousSibling_=b.nextSibling_=b.parentNode_=null,b=c}a.firstChild_=a.lastChild_=null}else for(var c,f=K(a),g=f.firstChild;g;)c=g.nextSibling,X.call(f,g),g=c}function s(a){var b=a.parentNode;return b&&b.invalidateShadowRenderer()}function t(a){for(var b,c=0;ch;h++)f=t(b[h]),!e&&(g=r(f).root)&&g instanceof a.wrappers.ShadowRoot||(d[c++]=f);return c}function c(a){return String(a).replace(/\/deep\/|::shadow|>>>/g," ")}function d(a){return String(a).replace(/:host\(([^\s]+)\)/g,"$1").replace(/([^\s]):host/g,"$1").replace(":host","*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g," ")}function e(a,b){for(var c,d=a.firstElementChild;d;){if(d.matches(b))return d;if(c=e(d,b))return c;d=d.nextElementSibling}return null}function f(a,b){return a.matches(b)}function g(a,b,c){var d=a.localName;return d===b||d===c&&a.namespaceURI===E}function h(){return!0}function i(a,b,c){return a.localName===c}function j(a,b){return a.namespaceURI===b}function k(a,b,c){return a.namespaceURI===b&&a.localName===c}function l(a,b,c,d,e,f){for(var g=a.firstElementChild;g;)d(g,e,f)&&(c[b++]=g),b=l(g,b,c,d,e,f),g=g.nextElementSibling;return b}function m(c,d,e,f,g){var h,i=s(this),j=r(this).root;if(j instanceof a.wrappers.ShadowRoot)return l(this,d,e,c,f,null);if(i instanceof C)h=x.call(i,f);else{if(!(i instanceof D))return l(this,d,e,c,f,null);h=w.call(i,f)}return b(h,d,e,g)}function n(c,d,e,f,g){var h,i=s(this),j=r(this).root;if(j instanceof a.wrappers.ShadowRoot)return l(this,d,e,c,f,g);if(i instanceof C)h=z.call(i,f,g);else{if(!(i instanceof D))return l(this,d,e,c,f,g);h=y.call(i,f,g)}return b(h,d,e,!1)}function o(c,d,e,f,g){var h,i=s(this),j=r(this).root;if(j instanceof a.wrappers.ShadowRoot)return l(this,d,e,c,f,g);if(i instanceof C)h=B.call(i,f,g);else{if(!(i instanceof D))return l(this,d,e,c,f,g);h=A.call(i,f,g)}return b(h,d,e,!1)}var p=a.wrappers.HTMLCollection,q=a.wrappers.NodeList,r=a.getTreeScope,s=a.unsafeUnwrap,t=a.wrap,u=document.querySelector,v=document.documentElement.querySelector,w=document.querySelectorAll,x=document.documentElement.querySelectorAll,y=document.getElementsByTagName,z=document.documentElement.getElementsByTagName,A=document.getElementsByTagNameNS,B=document.documentElement.getElementsByTagNameNS,C=window.Element,D=window.HTMLDocument||window.Document,E="http://www.w3.org/1999/xhtml",F={querySelector:function(b){var d=c(b),f=d!==b;b=d;var g,h=s(this),i=r(this).root;if(i instanceof a.wrappers.ShadowRoot)return e(this,b);if(h instanceof C)g=t(v.call(h,b));else{if(!(h instanceof D))return e(this,b);g=t(u.call(h,b))}return g&&!f&&(i=r(g).root)&&i instanceof a.wrappers.ShadowRoot?e(this,b):g},querySelectorAll:function(a){var b=c(a),d=b!==a;a=b;var e=new q;return e.length=m.call(this,f,0,e,a,d),e}},G={matches:function(b){return b=d(b),a.originalMatches.call(s(this),b)}},H={getElementsByTagName:function(a){var b=new p,c="*"===a?h:g;return b.length=n.call(this,c,0,b,a,a.toLowerCase()),b},getElementsByClassName:function(a){return this.querySelectorAll("."+a)},getElementsByTagNameNS:function(a,b){var c=new p,d=null;return d="*"===a?"*"===b?h:i:"*"===b?j:k,c.length=o.call(this,d,0,c,a||null,b),c}};a.GetElementsByInterface=H,a.SelectorsInterface=F,a.MatchesInterface=G}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){for(;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}function c(a){for(;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}var d=a.wrappers.NodeList,e={get firstElementChild(){return b(this.firstChild)},get lastElementChild(){return c(this.lastChild)},get childElementCount(){for(var a=0,b=this.firstElementChild;b;b=b.nextElementSibling)a++;return a},get children(){for(var a=new d,b=0,c=this.firstElementChild;c;c=c.nextElementSibling)a[b++]=c;return a.length=b,a},remove:function(){var a=this.parentNode;a&&a.removeChild(this)}},f={get nextElementSibling(){return b(this.nextSibling)},get previousElementSibling(){return c(this.previousSibling)}},g={getElementById:function(a){return/[ \t\n\r\f]/.test(a)?null:this.querySelector('[id="'+a+'"]')}};a.ChildNodeInterface=f,a.NonElementParentNodeInterface=g,a.ParentNodeInterface=e}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}var c=a.ChildNodeInterface,d=a.wrappers.Node,e=a.enqueueMutation,f=a.mixin,g=a.registerWrapper,h=a.unsafeUnwrap,i=window.CharacterData;b.prototype=Object.create(d.prototype),f(b.prototype,{get nodeValue(){return this.data},set nodeValue(a){this.data=a},get textContent(){return this.data},set textContent(a){this.data=a},get data(){return h(this).data},set data(a){var b=h(this).data;e(this,"characterData",{oldValue:b}),h(this).data=a}}),f(b.prototype,c),g(i,b,document.createTextNode("")),a.wrappers.CharacterData=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){return a>>>0}function c(a){d.call(this,a)}var d=a.wrappers.CharacterData,e=(a.enqueueMutation,a.mixin),f=a.registerWrapper,g=window.Text;c.prototype=Object.create(d.prototype),e(c.prototype,{splitText:function(a){a=b(a);var c=this.data;if(a>c.length)throw new Error("IndexSizeError");var d=c.slice(0,a),e=c.slice(a);this.data=d;var f=this.ownerDocument.createTextNode(e);return this.parentNode&&this.parentNode.insertBefore(f,this.nextSibling),f}}),f(g,c,document.createTextNode("")),a.wrappers.Text=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){return f(a).getAttribute("class")}function c(a,b){g(a,"attributes",{name:"class",namespace:null,oldValue:b})}function d(b){a.invalidateRendererBasedOnAttribute(b,"class")}function e(a,e,f){var g=a.ownerElement_;if(null==g)return e.apply(a,f);var h=b(g),i=e.apply(a,f);return b(g)!==h&&(c(g,h),d(g)),i}if(!window.DOMTokenList)return void console.warn("Missing DOMTokenList prototype, please include a compatible classList polyfill such as http://goo.gl/uTcepH.");var f=a.unsafeUnwrap,g=a.enqueueMutation,h=DOMTokenList.prototype.add;DOMTokenList.prototype.add=function(){e(this,h,arguments)};var i=DOMTokenList.prototype.remove;DOMTokenList.prototype.remove=function(){e(this,i,arguments)};var j=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(){return e(this,j,arguments)}}(window.ShadowDOMPolyfill),function(a){"use strict";function b(b,c){var d=b.parentNode;if(d&&d.shadowRoot){var e=a.getRendererForHost(d);e.dependsOnAttribute(c)&&e.invalidate()}}function c(a,b,c){k(a,"attributes",{name:b,namespace:null,oldValue:c})}function d(a){g.call(this,a)}var e=a.ChildNodeInterface,f=a.GetElementsByInterface,g=a.wrappers.Node,h=a.ParentNodeInterface,i=a.SelectorsInterface,j=a.MatchesInterface,k=(a.addWrapNodeListMethod,a.enqueueMutation),l=a.mixin,m=(a.oneOf,a.registerWrapper),n=a.unsafeUnwrap,o=a.wrappers,p=window.Element,q=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(a){return p.prototype[a]}),r=q[0],s=p.prototype[r],t=new WeakMap;d.prototype=Object.create(g.prototype),l(d.prototype,{createShadowRoot:function(){var b=new o.ShadowRoot(this);n(this).polymerShadowRoot_=b;var c=a.getRendererForHost(this);return c.invalidate(),b},get shadowRoot(){return n(this).polymerShadowRoot_||null},setAttribute:function(a,d){var e=n(this).getAttribute(a);n(this).setAttribute(a,d),c(this,a,e),b(this,a)},removeAttribute:function(a){var d=n(this).getAttribute(a);n(this).removeAttribute(a),c(this,a,d),b(this,a)},get classList(){var a=t.get(this);if(!a){if(a=n(this).classList,!a)return;a.ownerElement_=this,t.set(this,a)}return a},get className(){return n(this).className},set className(a){this.setAttribute("class",a)},get id(){return n(this).id},set id(a){this.setAttribute("id",a)}}),q.forEach(function(a){"matches"!==a&&(d.prototype[a]=function(a){return this.matches(a)})}),p.prototype.webkitCreateShadowRoot&&(d.prototype.webkitCreateShadowRoot=d.prototype.createShadowRoot),l(d.prototype,e),l(d.prototype,f),l(d.prototype,h),l(d.prototype,i),l(d.prototype,j),m(p,d,document.createElementNS(null,"x")),a.invalidateRendererBasedOnAttribute=b,a.matchesNames=q,a.originalMatches=s,a.wrappers.Element=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){switch(a){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}}function c(a){return a.replace(B,b)}function d(a){return a.replace(C,b)}function e(a){for(var b={},c=0;c"):i+">"+h(a)+"";case Node.TEXT_NODE:var l=a.data;return b&&E[b.localName]?l:d(l);case Node.COMMENT_NODE:return"";default:throw console.error(a),new Error("not implemented")}}function h(a){a instanceof A.HTMLTemplateElement&&(a=a.content);for(var b="",c=a.firstChild;c;c=c.nextSibling)b+=g(c,a);return b}function i(a,b,c){var d=c||"div";a.textContent="";var e=y(a.ownerDocument.createElement(d));e.innerHTML=b;for(var f;f=e.firstChild;)a.appendChild(z(f))}function j(a){p.call(this,a)}function k(a,b){var c=y(a.cloneNode(!1));c.innerHTML=b;for(var d,e=y(document.createDocumentFragment());d=c.firstChild;)e.appendChild(d);return z(e)}function l(b){return function(){return a.renderAllPending(),x(this)[b]}}function m(a){q(j,a,l(a))}function n(b){Object.defineProperty(j.prototype,b,{get:l(b),set:function(c){a.renderAllPending(),x(this)[b]=c},configurable:!0,enumerable:!0})}function o(b){Object.defineProperty(j.prototype,b,{value:function(){return a.renderAllPending(),x(this)[b].apply(x(this),arguments)},configurable:!0,enumerable:!0})}var p=a.wrappers.Element,q=a.defineGetter,r=a.enqueueMutation,s=a.mixin,t=a.nodesWereAdded,u=a.nodesWereRemoved,v=a.registerWrapper,w=a.snapshotNodeList,x=a.unsafeUnwrap,y=a.unwrap,z=a.wrap,A=a.wrappers,B=/[&\u00A0"]/g,C=/[&\u00A0<>]/g,D=e(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),E=e(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),F="http://www.w3.org/1999/xhtml",G=/MSIE/.test(navigator.userAgent),H=window.HTMLElement,I=window.HTMLTemplateElement;j.prototype=Object.create(p.prototype),s(j.prototype,{get innerHTML(){return h(this)},set innerHTML(a){if(G&&E[this.localName])return void(this.textContent=a);var b=w(this.childNodes);this.invalidateShadowRenderer()?this instanceof A.HTMLTemplateElement?i(this.content,a):i(this,a,this.tagName):!I&&this instanceof A.HTMLTemplateElement?i(this.content,a):x(this).innerHTML=a;var c=w(this.childNodes);r(this,"childList",{addedNodes:c,removedNodes:b}),u(b),t(c,this)},get outerHTML(){return g(this,this.parentNode)},set outerHTML(a){var b=this.parentNode;if(b){b.invalidateShadowRenderer();var c=k(b,a);b.replaceChild(c,this)}},insertAdjacentHTML:function(a,b){var c,d;switch(String(a).toLowerCase()){case"beforebegin":c=this.parentNode,d=this;break;case"afterend":c=this.parentNode,d=this.nextSibling;break;case"afterbegin":c=this,d=this.firstChild;break;case"beforeend":c=this,d=null;break;default:return}var e=k(c,b);c.insertBefore(e,d)},get hidden(){return this.hasAttribute("hidden")},set hidden(a){a?this.setAttribute("hidden",""):this.removeAttribute("hidden")}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(m),["scrollLeft","scrollTop"].forEach(n),["focus","getBoundingClientRect","getClientRects","scrollIntoView"].forEach(o),v(H,j,document.createElement("b")),a.wrappers.HTMLElement=j,a.getInnerHTML=h,a.setInnerHTML=i}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.unsafeUnwrap,g=a.wrap,h=window.HTMLCanvasElement;b.prototype=Object.create(c.prototype),d(b.prototype,{getContext:function(){var a=f(this).getContext.apply(f(this),arguments);return a&&g(a)}}),e(h,b,document.createElement("canvas")),a.wrappers.HTMLCanvasElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=window.HTMLContentElement;b.prototype=Object.create(c.prototype),d(b.prototype,{constructor:b,get select(){return this.getAttribute("select")},set select(a){this.setAttribute("select",a)},setAttribute:function(a,b){c.prototype.setAttribute.call(this,a,b),"select"===String(a).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),f&&e(f,b),a.wrappers.HTMLContentElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrapHTMLCollection,g=a.unwrap,h=window.HTMLFormElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get elements(){return f(g(this).elements)}}),e(h,b,document.createElement("form")),a.wrappers.HTMLFormElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}function c(a,b){if(!(this instanceof c))throw new TypeError("DOM object constructor cannot be called as a function.");var e=f(document.createElement("img"));d.call(this,e),g(e,this),void 0!==a&&(e.width=a),void 0!==b&&(e.height=b)}var d=a.wrappers.HTMLElement,e=a.registerWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLImageElement;b.prototype=Object.create(d.prototype),e(h,b,document.createElement("img")),c.prototype=b.prototype,a.wrappers.HTMLImageElement=b,a.wrappers.Image=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=(a.mixin,a.wrappers.NodeList,a.registerWrapper),e=window.HTMLShadowElement;b.prototype=Object.create(c.prototype),b.prototype.constructor=b,e&&d(e,b),a.wrappers.HTMLShadowElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){if(!a.defaultView)return a;var b=l.get(a);if(!b){for(b=a.implementation.createHTMLDocument("");b.lastChild;)b.removeChild(b.lastChild); -l.set(a,b)}return b}function c(a){for(var c,d=b(a.ownerDocument),e=i(d.createDocumentFragment());c=a.firstChild;)e.appendChild(c);return e}function d(a){if(e.call(this,a),!m){var b=c(a);k.set(this,j(b))}}var e=a.wrappers.HTMLElement,f=a.mixin,g=a.registerWrapper,h=a.unsafeUnwrap,i=a.unwrap,j=a.wrap,k=new WeakMap,l=new WeakMap,m=window.HTMLTemplateElement;d.prototype=Object.create(e.prototype),f(d.prototype,{constructor:d,get content(){return m?j(h(this).content):k.get(this)}}),m&&g(m,d),a.wrappers.HTMLTemplateElement=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.registerWrapper,e=window.HTMLMediaElement;e&&(b.prototype=Object.create(c.prototype),d(e,b,document.createElement("audio")),a.wrappers.HTMLMediaElement=b)}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}function c(a){if(!(this instanceof c))throw new TypeError("DOM object constructor cannot be called as a function.");var b=f(document.createElement("audio"));d.call(this,b),g(b,this),b.setAttribute("preload","auto"),void 0!==a&&b.setAttribute("src",a)}var d=a.wrappers.HTMLMediaElement,e=a.registerWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLAudioElement;h&&(b.prototype=Object.create(d.prototype),e(h,b,document.createElement("audio")),c.prototype=b.prototype,a.wrappers.HTMLAudioElement=b,a.wrappers.Audio=c)}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){return a.replace(/\s+/g," ").trim()}function c(a){e.call(this,a)}function d(a,b,c,f){if(!(this instanceof d))throw new TypeError("DOM object constructor cannot be called as a function.");var g=i(document.createElement("option"));e.call(this,g),h(g,this),void 0!==a&&(g.text=a),void 0!==b&&g.setAttribute("value",b),c===!0&&g.setAttribute("selected",""),g.selected=f===!0}var e=a.wrappers.HTMLElement,f=a.mixin,g=a.registerWrapper,h=a.rewrap,i=a.unwrap,j=a.wrap,k=window.HTMLOptionElement;c.prototype=Object.create(e.prototype),f(c.prototype,{get text(){return b(this.textContent)},set text(a){this.textContent=b(String(a))},get form(){return j(i(this).form)}}),g(k,c,document.createElement("option")),d.prototype=c.prototype,a.wrappers.HTMLOptionElement=c,a.wrappers.Option=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.unwrap,g=a.wrap,h=window.HTMLSelectElement;b.prototype=Object.create(c.prototype),d(b.prototype,{add:function(a,b){"object"==typeof b&&(b=f(b)),f(this).add(f(a),b)},remove:function(a){return void 0===a?void c.prototype.remove.call(this):("object"==typeof a&&(a=f(a)),void f(this).remove(a))},get form(){return g(f(this).form)}}),e(h,b,document.createElement("select")),a.wrappers.HTMLSelectElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.unwrap,g=a.wrap,h=a.wrapHTMLCollection,i=window.HTMLTableElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get caption(){return g(f(this).caption)},createCaption:function(){return g(f(this).createCaption())},get tHead(){return g(f(this).tHead)},createTHead:function(){return g(f(this).createTHead())},createTFoot:function(){return g(f(this).createTFoot())},get tFoot(){return g(f(this).tFoot)},get tBodies(){return h(f(this).tBodies)},createTBody:function(){return g(f(this).createTBody())},get rows(){return h(f(this).rows)},insertRow:function(a){return g(f(this).insertRow(a))}}),e(i,b,document.createElement("table")),a.wrappers.HTMLTableElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrapHTMLCollection,g=a.unwrap,h=a.wrap,i=window.HTMLTableSectionElement;b.prototype=Object.create(c.prototype),d(b.prototype,{constructor:b,get rows(){return f(g(this).rows)},insertRow:function(a){return h(g(this).insertRow(a))}}),e(i,b,document.createElement("thead")),a.wrappers.HTMLTableSectionElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrapHTMLCollection,g=a.unwrap,h=a.wrap,i=window.HTMLTableRowElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get cells(){return f(g(this).cells)},insertCell:function(a){return h(g(this).insertCell(a))}}),e(i,b,document.createElement("tr")),a.wrappers.HTMLTableRowElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){switch(a.localName){case"content":return new c(a);case"shadow":return new e(a);case"template":return new f(a)}d.call(this,a)}var c=a.wrappers.HTMLContentElement,d=a.wrappers.HTMLElement,e=a.wrappers.HTMLShadowElement,f=a.wrappers.HTMLTemplateElement,g=(a.mixin,a.registerWrapper),h=window.HTMLUnknownElement;b.prototype=Object.create(d.prototype),g(h,b),a.wrappers.HTMLUnknownElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.Element,d=a.wrappers.HTMLElement,e=a.registerWrapper,f=(a.defineWrapGetter,a.unsafeUnwrap),g=a.wrap,h=a.mixin,i="http://www.w3.org/2000/svg",j=window.SVGElement,k=document.createElementNS(i,"title");if(!("classList"in k)){var l=Object.getOwnPropertyDescriptor(c.prototype,"classList");Object.defineProperty(d.prototype,"classList",l),delete c.prototype.classList}b.prototype=Object.create(c.prototype),h(b.prototype,{get ownerSVGElement(){return g(f(this).ownerSVGElement)}}),e(j,b,document.createElementNS(i,"title")),a.wrappers.SVGElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){m.call(this,a)}var c=a.mixin,d=a.registerWrapper,e=a.unwrap,f=a.wrap,g=window.SVGUseElement,h="http://www.w3.org/2000/svg",i=f(document.createElementNS(h,"g")),j=document.createElementNS(h,"use"),k=i.constructor,l=Object.getPrototypeOf(k.prototype),m=l.constructor;b.prototype=Object.create(l),"instanceRoot"in j&&c(b.prototype,{get instanceRoot(){return f(e(this).instanceRoot)},get animatedInstanceRoot(){return f(e(this).animatedInstanceRoot)}}),d(g,b,j),a.wrappers.SVGUseElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.EventTarget,d=a.mixin,e=a.registerWrapper,f=a.unsafeUnwrap,g=a.wrap,h=window.SVGElementInstance;h&&(b.prototype=Object.create(c.prototype),d(b.prototype,{get correspondingElement(){return g(f(this).correspondingElement)},get correspondingUseElement(){return g(f(this).correspondingUseElement)},get parentNode(){return g(f(this).parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return g(f(this).firstChild)},get lastChild(){return g(f(this).lastChild)},get previousSibling(){return g(f(this).previousSibling)},get nextSibling(){return g(f(this).nextSibling)}}),e(h,b),a.wrappers.SVGElementInstance=b)}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){e(a,this)}var c=a.mixin,d=a.registerWrapper,e=a.setWrapper,f=a.unsafeUnwrap,g=a.unwrap,h=a.unwrapIfNeeded,i=a.wrap,j=window.CanvasRenderingContext2D;c(b.prototype,{get canvas(){return i(f(this).canvas)},drawImage:function(){arguments[0]=h(arguments[0]),f(this).drawImage.apply(f(this),arguments)},createPattern:function(){return arguments[0]=g(arguments[0]),f(this).createPattern.apply(f(this),arguments)}}),d(j,b,document.createElement("canvas").getContext("2d")),a.wrappers.CanvasRenderingContext2D=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){f(a,this)}var c=a.addForwardingProperties,d=a.mixin,e=a.registerWrapper,f=a.setWrapper,g=a.unsafeUnwrap,h=a.unwrapIfNeeded,i=a.wrap,j=window.WebGLRenderingContext;if(j){d(b.prototype,{get canvas(){return i(g(this).canvas)},texImage2D:function(){arguments[5]=h(arguments[5]),g(this).texImage2D.apply(g(this),arguments)},texSubImage2D:function(){arguments[6]=h(arguments[6]),g(this).texSubImage2D.apply(g(this),arguments)}});var k=Object.getPrototypeOf(j.prototype);k!==Object.prototype&&c(k,b.prototype);var l=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};e(j,b,l),a.wrappers.WebGLRenderingContext=b}}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.Node,d=a.GetElementsByInterface,e=a.NonElementParentNodeInterface,f=a.ParentNodeInterface,g=a.SelectorsInterface,h=a.mixin,i=a.registerObject,j=a.registerWrapper,k=window.DocumentFragment;b.prototype=Object.create(c.prototype),h(b.prototype,f),h(b.prototype,g),h(b.prototype,d),h(b.prototype,e),j(k,b,document.createDocumentFragment()),a.wrappers.DocumentFragment=b;var l=i(document.createComment(""));a.wrappers.Comment=l}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b=l(k(a).ownerDocument.createDocumentFragment());c.call(this,b),i(b,this);var e=a.shadowRoot;o.set(this,e),this.treeScope_=new d(this,g(e||a)),n.set(this,a)}var c=a.wrappers.DocumentFragment,d=a.TreeScope,e=a.elementFromPoint,f=a.getInnerHTML,g=a.getTreeScope,h=a.mixin,i=a.rewrap,j=a.setInnerHTML,k=a.unsafeUnwrap,l=a.unwrap,m=a.wrap,n=new WeakMap,o=new WeakMap;b.prototype=Object.create(c.prototype),h(b.prototype,{constructor:b,get innerHTML(){return f(this)},set innerHTML(a){j(this,a),this.invalidateShadowRenderer()},get olderShadowRoot(){return o.get(this)||null},get host(){return n.get(this)||null},invalidateShadowRenderer:function(){return n.get(this).invalidateShadowRenderer()},elementFromPoint:function(a,b){return e(this,this.ownerDocument,a,b)},getSelection:function(){return document.getSelection()},get activeElement(){var a=l(this).ownerDocument.activeElement;if(!a||!a.nodeType)return null;var b=m(a);if(b===this.host)return null;for(;!this.contains(b)&&!this.host.contains(b);){for(;b.parentNode;)b=b.parentNode;if(!b.host)return null;b=b.host}return b}}),a.wrappers.ShadowRoot=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b=l(a).root;return b instanceof n?b.host:null}function c(b,c){if(b.shadowRoot){c=Math.min(b.childNodes.length-1,c);var d=b.childNodes[c];if(d){var e=a.getDestinationInsertionPoints(d);if(e.length>0){var f=e[0].parentNode;f.nodeType==Node.ELEMENT_NODE&&(b=f)}}}return b}function d(a){return a=k(a),b(a)||a}function e(a){g(a,this)}var f=a.registerWrapper,g=a.setWrapper,h=a.unsafeUnwrap,i=a.unwrap,j=a.unwrapIfNeeded,k=a.wrap,l=a.getTreeScope,m=window.Range,n=a.wrappers.ShadowRoot;e.prototype={get startContainer(){return d(h(this).startContainer)},get endContainer(){return d(h(this).endContainer)},get commonAncestorContainer(){return d(h(this).commonAncestorContainer)},setStart:function(a,b){a=c(a,b),h(this).setStart(j(a),b)},setEnd:function(a,b){a=c(a,b),h(this).setEnd(j(a),b)},setStartBefore:function(a){h(this).setStartBefore(j(a))},setStartAfter:function(a){h(this).setStartAfter(j(a))},setEndBefore:function(a){h(this).setEndBefore(j(a))},setEndAfter:function(a){h(this).setEndAfter(j(a))},selectNode:function(a){h(this).selectNode(j(a))},selectNodeContents:function(a){h(this).selectNodeContents(j(a))},compareBoundaryPoints:function(a,b){return h(this).compareBoundaryPoints(a,i(b))},extractContents:function(){return k(h(this).extractContents())},cloneContents:function(){return k(h(this).cloneContents())},insertNode:function(a){h(this).insertNode(j(a))},surroundContents:function(a){h(this).surroundContents(j(a))},cloneRange:function(){return k(h(this).cloneRange())},isPointInRange:function(a,b){return h(this).isPointInRange(j(a),b)},comparePoint:function(a,b){return h(this).comparePoint(j(a),b)},intersectsNode:function(a){return h(this).intersectsNode(j(a))},toString:function(){return h(this).toString()}},m.prototype.createContextualFragment&&(e.prototype.createContextualFragment=function(a){return k(h(this).createContextualFragment(a))}),f(window.Range,e,document.createRange()),a.wrappers.Range=e}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){a.previousSibling_=a.previousSibling,a.nextSibling_=a.nextSibling,a.parentNode_=a.parentNode}function c(c,e,f){var g=H(c),h=H(e),i=f?H(f):null;if(d(e),b(e),f)c.firstChild===f&&(c.firstChild_=f),f.previousSibling_=f.previousSibling;else{c.lastChild_=c.lastChild,c.lastChild===c.firstChild&&(c.firstChild_=c.firstChild);var j=I(g.lastChild);j&&(j.nextSibling_=j.nextSibling)}a.originalInsertBefore.call(g,h,i)}function d(c){var d=H(c),e=d.parentNode;if(e){var f=I(e);b(c),c.previousSibling&&(c.previousSibling.nextSibling_=c),c.nextSibling&&(c.nextSibling.previousSibling_=c),f.lastChild===c&&(f.lastChild_=c),f.firstChild===c&&(f.firstChild_=c),a.originalRemoveChild.call(e,d)}}function e(a){K.set(a,[])}function f(a){var b=K.get(a);return b||K.set(a,b=[]),b}function g(a){for(var b=[],c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d;return b}function h(){for(var a=0;ap;p++){var q=I(f[k++]);h.get(q)||d(q)}for(var r=n.addedCount,s=f[k]&&I(f[k]),p=0;r>p;p++){var t=e[j++],u=t.node;c(b,u,s),h.set(u,!0),t.sync(h)}l+=r}for(var m=l;m=0;e--){var f=d[e],g=p(f);if(g){var h=f.olderShadowRoot;h&&(c=o(h));for(var i=0;i=0;k--)j=Object.create(j);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(a){var b=e[a];b&&(j[a]=function(){E(this)instanceof d||A(this),b.apply(E(this),arguments)})});var l={prototype:j};f&&(l["extends"]=f),d.prototype=e,d.prototype.constructor=d,a.constructorTable.set(j,d),a.nativePrototypeTable.set(e,j);L.call(D(this),b,l);return d},v([window.HTMLDocument||window.Document],["registerElement"])}v([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),v([window.HTMLBodyElement,window.HTMLHeadElement,window.HTMLHtmlElement],w),v([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","createTreeWalker","elementFromPoint","getElementById","getElementsByName","getSelection"]),x(b.prototype,j),x(b.prototype,l),x(b.prototype,o),x(b.prototype,m),x(b.prototype,{get implementation(){var a=G.get(this);return a?a:(a=new g(D(this).implementation),G.set(this,a),a)},get defaultView(){return E(D(this).defaultView)}}),y(window.Document,b,document.implementation.createHTMLDocument("")),window.HTMLDocument&&y(window.HTMLDocument,b),F([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]);var M=document.implementation.createDocument;g.prototype.createDocument=function(){return arguments[2]=D(arguments[2]),E(M.apply(C(this),arguments))},h(g,"createDocumentType"),h(g,"createHTMLDocument"),i(g,"hasFeature"),y(window.DOMImplementation,g),v([window.DOMImplementation],["createDocument","createDocumentType","createHTMLDocument","hasFeature"]),a.adoptNodeNoRemove=d,a.wrappers.DOMImplementation=g,a.wrappers.Document=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.EventTarget,d=a.wrappers.Selection,e=a.mixin,f=a.registerWrapper,g=a.renderAllPending,h=a.unwrap,i=a.unwrapIfNeeded,j=a.wrap,k=window.Window,l=window.getComputedStyle,m=window.getDefaultComputedStyle,n=window.getSelection;b.prototype=Object.create(c.prototype),k.prototype.getComputedStyle=function(a,b){return j(this||window).getComputedStyle(i(a),b)},m&&(k.prototype.getDefaultComputedStyle=function(a,b){return j(this||window).getDefaultComputedStyle(i(a),b)}),k.prototype.getSelection=function(){return j(this||window).getSelection()},delete window.getComputedStyle,delete window.getDefaultComputedStyle,delete window.getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(a){k.prototype[a]=function(){var b=j(this||window);return b[a].apply(b,arguments)},delete window[a]}),e(b.prototype,{getComputedStyle:function(a,b){return g(),l.call(h(this),i(a),b)},getSelection:function(){return g(),new d(n.call(h(this)))},get document(){return j(h(this).document)}}),m&&(b.prototype.getDefaultComputedStyle=function(a,b){return g(),m.call(h(this),i(a),b)}),f(k,b,window),a.wrappers.Window=b}(window.ShadowDOMPolyfill),function(a){"use strict";var b=a.unwrap,c=window.DataTransfer||window.Clipboard,d=c.prototype.setDragImage;d&&(c.prototype.setDragImage=function(a,c,e){d.call(this,b(a),c,e)})}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b;b=a instanceof f?a:new f(a&&e(a)),d(b,this)}var c=a.registerWrapper,d=a.setWrapper,e=a.unwrap,f=window.FormData;f&&(c(f,b,new f),a.wrappers.FormData=b)}(window.ShadowDOMPolyfill),function(a){"use strict";var b=a.unwrapIfNeeded,c=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(a){return c.call(this,b(a))}}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b=c[a],d=window[b];if(d){var e=document.createElement(a),f=e.constructor;window[b]=f}}var c=(a.isWrapperFor,{a:"HTMLAnchorElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",base:"HTMLBaseElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",content:"HTMLContentElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",del:"HTMLModElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",head:"HTMLHeadElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",shadow:"HTMLShadowElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(c).forEach(b),Object.getOwnPropertyNames(a.wrappers).forEach(function(b){window[b]=a.wrappers[b]})}(window.ShadowDOMPolyfill),function(a){function b(a,b){var c="";return Array.prototype.forEach.call(a,function(a){c+=a.textContent+"\n\n"}),b||(c=c.replace(l,"")),c}function c(a){var b=document.createElement("style");return b.textContent=a,b}function d(a){var b=c(a);document.head.appendChild(b);var d=[];if(b.sheet)try{d=b.sheet.cssRules}catch(e){}else console.warn("sheet not found",b);return b.parentNode.removeChild(b),d}function e(){D.initialized=!0,document.body.appendChild(D);var a=D.contentDocument,b=a.createElement("base");b.href=document.baseURI,a.head.appendChild(b)}function f(a){D.initialized||e(),document.body.appendChild(D),a(D.contentDocument),document.body.removeChild(D)}function g(a,b){if(b){var e;if(a.match("@import")&&F){var g=c(a);f(function(a){a.head.appendChild(g.impl),e=Array.prototype.slice.call(g.sheet.cssRules,0),b(e)})}else e=d(a),b(e)}}function h(a){a&&j().appendChild(document.createTextNode(a))}function i(a,b){var d=c(a);d.setAttribute(b,""),d.setAttribute(H,""),document.head.appendChild(d)}function j(){return E||(E=document.createElement("style"),E.setAttribute(H,""),E[H]=!0),E}var k={strictStyling:!1,registry:{},shimStyling:function(a,c,d){var e=this.prepareRoot(a,c,d),f=this.isTypeExtension(d),g=this.makeScopeSelector(c,f),h=b(e,!0);h=this.scopeCssText(h,g),a&&(a.shimmedStyle=h),this.addCssToDocument(h,c)},shimStyle:function(a,b){return this.shimCssText(a.textContent,b)},shimCssText:function(a,b){return a=this.insertDirectives(a),this.scopeCssText(a,b)},makeScopeSelector:function(a,b){return a?b?"[is="+a+"]":a:""},isTypeExtension:function(a){return a&&a.indexOf("-")<0},prepareRoot:function(a,b,c){var d=this.registerRoot(a,b,c);return this.replaceTextInStyles(d.rootStyles,this.insertDirectives),this.removeStyles(a,d.rootStyles),this.strictStyling&&this.applyScopeToContent(a,b),d.scopeStyles},removeStyles:function(a,b){for(var c,d=0,e=b.length;e>d&&(c=b[d]);d++)c.parentNode.removeChild(c)},registerRoot:function(a,b,c){var d=this.registry[b]={root:a,name:b,extendsName:c},e=this.findStyles(a);d.rootStyles=e,d.scopeStyles=d.rootStyles;var f=this.registry[d.extendsName];return f&&(d.scopeStyles=f.scopeStyles.concat(d.scopeStyles)),d},findStyles:function(a){if(!a)return[];var b=a.querySelectorAll("style");return Array.prototype.filter.call(b,function(a){return!a.hasAttribute(I)})},applyScopeToContent:function(a,b){a&&(Array.prototype.forEach.call(a.querySelectorAll("*"),function(a){a.setAttribute(b,"")}),Array.prototype.forEach.call(a.querySelectorAll("template"),function(a){this.applyScopeToContent(a.content,b)},this))},insertDirectives:function(a){return a=this.insertPolyfillDirectivesInCssText(a),this.insertPolyfillRulesInCssText(a)},insertPolyfillDirectivesInCssText:function(a){return a=a.replace(m,function(a,b){return b.slice(0,-2)+"{"}),a.replace(n,function(a,b){return b+" {"})},insertPolyfillRulesInCssText:function(a){return a=a.replace(o,function(a,b){return b.slice(0,-1)}),a.replace(p,function(a,b,c,d){var e=a.replace(b,"").replace(c,"");return d+e})},scopeCssText:function(a,b){var c=this.extractUnscopedRulesFromCssText(a);if(a=this.insertPolyfillHostInCssText(a),a=this.convertColonHost(a),a=this.convertColonHostContext(a),a=this.convertShadowDOMSelectors(a),b){var a,d=this;g(a,function(c){a=d.scopeRules(c,b)})}return a=a+"\n"+c,a.trim()},extractUnscopedRulesFromCssText:function(a){for(var b,c="";b=q.exec(a);)c+=b[1].slice(0,-1)+"\n\n";for(;b=r.exec(a);)c+=b[0].replace(b[2],"").replace(b[1],b[3])+"\n\n"; -return c},convertColonHost:function(a){return this.convertColonRule(a,v,this.colonHostPartReplacer)},convertColonHostContext:function(a){return this.convertColonRule(a,w,this.colonHostContextPartReplacer)},convertColonRule:function(a,b,c){return a.replace(b,function(a,b,d,e){if(b=A,d){for(var f,g=d.split(","),h=[],i=0,j=g.length;j>i&&(f=g[i]);i++)f=f.trim(),h.push(c(b,f,e));return h.join(",")}return b+e})},colonHostContextPartReplacer:function(a,b,c){return b.match(s)?this.colonHostPartReplacer(a,b,c):a+b+c+", "+b+" "+a+c},colonHostPartReplacer:function(a,b,c){return a+b.replace(s,"")+c},convertShadowDOMSelectors:function(a){for(var b=0;b","+","~"],d=a,e="["+b+"]";return c.forEach(function(a){var b=d.split(a);d=b.map(function(a){var b=a.trim().replace(B,"");return b&&c.indexOf(b)<0&&b.indexOf(e)<0&&(a=b.replace(/([^:]*)(:*)(.*)/,"$1"+e+"$2$3")),a}).join(a)}),d},insertPolyfillHostInCssText:function(a){return a.replace(z,t).replace(y,s)},propertiesFromRule:function(a){var b=a.style.cssText;a.style.content&&!a.style.content.match(/['"]+|attr/)&&(b=b.replace(/content:[^;]*;/g,"content: '"+a.style.content+"';"));var c=a.style;for(var d in c)"initial"===c[d]&&(b+=d+": initial; ");return b},replaceTextInStyles:function(a,b){a&&b&&(a instanceof Array||(a=[a]),Array.prototype.forEach.call(a,function(a){a.textContent=b.call(this,a.textContent)},this))},addCssToDocument:function(a,b){a.match("@import")?i(a,b):h(a)}},l=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,m=/\/\*\s*@polyfill ([^*]*\*+([^\/*][^*]*\*+)*\/)([^{]*?){/gim,n=/polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,o=/\/\*\s@polyfill-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim,p=/(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,q=/\/\*\s@polyfill-unscoped-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim,r=/(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,s="-shadowcsshost",t="-shadowcsscontext",u=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",v=new RegExp("("+s+u,"gim"),w=new RegExp("("+t+u,"gim"),x="([>\\s~+[.,{:][\\s\\S]*)?$",y=/\:host/gim,z=/\:host-context/gim,A=s+"-no-combinator",B=new RegExp(s,"gim"),C=(new RegExp(t,"gim"),[/>>>/g,/::shadow/g,/::content/g,/\/deep\//g,/\/shadow\//g,/\/shadow-deep\//g,/\^\^/g,/\^/g]),D=document.createElement("iframe");D.style.display="none";var E,F=navigator.userAgent.match("Chrome"),G="shim-shadowdom",H="shim-shadowdom-css",I="no-shim";if(window.ShadowDOMPolyfill){h("style { display: none !important; }\n");var J=ShadowDOMPolyfill.wrap(document),K=J.querySelector("head");K.insertBefore(j(),K.childNodes[0]),document.addEventListener("DOMContentLoaded",function(){a.urlResolver;if(window.HTMLImports&&!HTMLImports.useNative){var b="link[rel=stylesheet]["+G+"]",c="style["+G+"]";HTMLImports.importer.documentPreloadSelectors+=","+b,HTMLImports.importer.importsPreloadSelectors+=","+b,HTMLImports.parser.documentSelectors=[HTMLImports.parser.documentSelectors,b,c].join(",");var d=HTMLImports.parser.parseGeneric;HTMLImports.parser.parseGeneric=function(a){if(!a[H]){var b=a.__importElement||a;if(!b.hasAttribute(G))return void d.call(this,a);a.__resource&&(b=a.ownerDocument.createElement("style"),b.textContent=a.__resource),HTMLImports.path.resolveUrlsInStyle(b,a.href),b.textContent=k.shimStyle(b),b.removeAttribute(G,""),b.setAttribute(H,""),b[H]=!0,b.parentNode!==K&&(a.parentNode===K?K.replaceChild(b,a):this.addElementToDocument(b)),b.__importParsed=!0,this.markParsingComplete(a),this.parseNext()}};var e=HTMLImports.parser.hasResource;HTMLImports.parser.hasResource=function(a){return"link"===a.localName&&"stylesheet"===a.rel&&a.hasAttribute(G)?a.__resource:e.call(this,a)}}})}a.ShadowCSS=k}(window.WebComponents)),function(a){window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(a){return a}}(window.WebComponents),function(a){"use strict";function b(a){return void 0!==m[a]}function c(){h.call(this),this._isInvalid=!0}function d(a){return""==a&&c.call(this),a.toLowerCase()}function e(a){var b=a.charCodeAt(0);return b>32&&127>b&&-1==[34,35,60,62,63,96].indexOf(b)?a:encodeURIComponent(a)}function f(a){var b=a.charCodeAt(0);return b>32&&127>b&&-1==[34,35,60,62,96].indexOf(b)?a:encodeURIComponent(a)}function g(a,g,h){function i(a){t.push(a)}var j=g||"scheme start",k=0,l="",r=!1,s=!1,t=[];a:for(;(a[k-1]!=o||0==k)&&!this._isInvalid;){var u=a[k];switch(j){case"scheme start":if(!u||!p.test(u)){if(g){i("Invalid scheme.");break a}l="",j="no scheme";continue}l+=u.toLowerCase(),j="scheme";break;case"scheme":if(u&&q.test(u))l+=u.toLowerCase();else{if(":"!=u){if(g){if(o==u)break a;i("Code point not allowed in scheme: "+u);break a}l="",k=0,j="no scheme";continue}if(this._scheme=l,l="",g)break a;b(this._scheme)&&(this._isRelative=!0),j="file"==this._scheme?"relative":this._isRelative&&h&&h._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==u?(this._query="?",j="query"):"#"==u?(this._fragment="#",j="fragment"):o!=u&&" "!=u&&"\n"!=u&&"\r"!=u&&(this._schemeData+=e(u));break;case"no scheme":if(h&&b(h._scheme)){j="relative";continue}i("Missing scheme."),c.call(this);break;case"relative or authority":if("/"!=u||"/"!=a[k+1]){i("Expected /, got: "+u),j="relative";continue}j="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=h._scheme),o==u){this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query,this._username=h._username,this._password=h._password;break a}if("/"==u||"\\"==u)"\\"==u&&i("\\ is an invalid code point."),j="relative slash";else if("?"==u)this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query="?",this._username=h._username,this._password=h._password,j="query";else{if("#"!=u){var v=a[k+1],w=a[k+2];("file"!=this._scheme||!p.test(u)||":"!=v&&"|"!=v||o!=w&&"/"!=w&&"\\"!=w&&"?"!=w&&"#"!=w)&&(this._host=h._host,this._port=h._port,this._username=h._username,this._password=h._password,this._path=h._path.slice(),this._path.pop()),j="relative path";continue}this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query,this._fragment="#",this._username=h._username,this._password=h._password,j="fragment"}break;case"relative slash":if("/"!=u&&"\\"!=u){"file"!=this._scheme&&(this._host=h._host,this._port=h._port,this._username=h._username,this._password=h._password),j="relative path";continue}"\\"==u&&i("\\ is an invalid code point."),j="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=u){i("Expected '/', got: "+u),j="authority ignore slashes";continue}j="authority second slash";break;case"authority second slash":if(j="authority ignore slashes","/"!=u){i("Expected '/', got: "+u);continue}break;case"authority ignore slashes":if("/"!=u&&"\\"!=u){j="authority";continue}i("Expected authority, got: "+u);break;case"authority":if("@"==u){r&&(i("@ already seen."),l+="%40"),r=!0;for(var x=0;x0){var e=c[d-1],f=n(e,a);if(f)return void(c[d-1]=f)}else b(this.observer);c[d]=a},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(a){var b=this.options;b.attributes&&a.addEventListener("DOMAttrModified",this,!0),b.characterData&&a.addEventListener("DOMCharacterDataModified",this,!0),b.childList&&a.addEventListener("DOMNodeInserted",this,!0),(b.childList||b.subtree)&&a.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(a){var b=this.options;b.attributes&&a.removeEventListener("DOMAttrModified",this,!0),b.characterData&&a.removeEventListener("DOMCharacterDataModified",this,!0),b.childList&&a.removeEventListener("DOMNodeInserted",this,!0),(b.childList||b.subtree)&&a.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(a){if(a!==this.target){this.addListeners_(a),this.transientObservedNodes.push(a);var b=q.get(a);b||q.set(a,b=[]),b.push(this)}},removeTransientObservers:function(){var a=this.transientObservedNodes;this.transientObservedNodes=[],a.forEach(function(a){this.removeListeners_(a);for(var b=q.get(a),c=0;cn&&(m=h[n]);n++)g(m)?(k.push(this),i++,c()):(m.addEventListener("load",d),m.addEventListener("error",f));else c()}function g(a){return l?a.__loaded||a["import"]&&"loading"!==a["import"].readyState:a.__importParsed}function h(a){for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)i(b)&&j(b)}function i(a){return"link"===a.localName&&"import"===a.rel}function j(a){var b=a["import"];b?e({target:a}):(a.addEventListener("load",e),a.addEventListener("error",e))}var k="import",l=Boolean(k in document.createElement("link")),m=Boolean(window.ShadowDOMPolyfill),n=function(a){return m?window.ShadowDOMPolyfill.wrapIfNeeded(a):a},o=n(document),p={get:function(){var a=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return n(a)},configurable:!0};Object.defineProperty(document,"_currentScript",p),Object.defineProperty(o,"_currentScript",p);var q=/Trident/.test(navigator.userAgent),r=q?"complete":"interactive",s="readystatechange";l&&(new MutationObserver(function(a){for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)b.addedNodes&&h(b.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var a,b=document.querySelectorAll("link[rel=import]"),c=0,d=b.length;d>c&&(a=b[c]);c++)j(a)}()),b(function(a){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var b=o.createEvent("CustomEvent");b.initCustomEvent("HTMLImportsLoaded",!0,!0,a),o.dispatchEvent(b)}),a.IMPORT_LINK_TYPE=k,a.useNative=l,a.rootDocument=o,a.whenReady=b,a.isIE=q}(window.HTMLImports),function(a){var b=[],c=function(a){b.push(a)},d=function(){b.forEach(function(b){b(a)})};a.addModule=c,a.initializeModules=d}(window.HTMLImports),window.HTMLImports.addModule(function(a){var b=/(url\()([^)]*)(\))/g,c=/(@import[\s]+(?!url\())([^;]*)(;)/g,d={resolveUrlsInStyle:function(a,b){var c=a.ownerDocument,d=c.createElement("a");return a.textContent=this.resolveUrlsInCssText(a.textContent,b,d),a},resolveUrlsInCssText:function(a,d,e){var f=this.replaceUrls(a,e,d,b);return f=this.replaceUrls(f,e,d,c)},replaceUrls:function(a,b,c,d){return a.replace(d,function(a,d,e,f){var g=e.replace(/["']/g,"");return c&&(g=new URL(g,c).href),b.href=g,g=b.href,d+"'"+g+"'"+f})}};a.path=d}),window.HTMLImports.addModule(function(a){var b={async:!0,ok:function(a){return a.status>=200&&a.status<300||304===a.status||0===a.status},load:function(c,d,e){var f=new XMLHttpRequest;return(a.flags.debug||a.flags.bust)&&(c+="?"+Math.random()),f.open("GET",c,b.async),f.addEventListener("readystatechange",function(a){if(4===f.readyState){var c=null;try{var g=f.getResponseHeader("Location");g&&(c="/"===g.substr(0,1)?location.origin+g:g)}catch(a){console.error(a.message)}d.call(e,!b.ok(f)&&f,f.response||f.responseText,c)}}),f.send(),f},loadDocument:function(a,b,c){this.load(a,b,c).responseType="document"}};a.xhr=b}),window.HTMLImports.addModule(function(a){var b=a.xhr,c=a.flags,d=function(a,b){this.cache={},this.onload=a,this.oncomplete=b,this.inflight=0,this.pending={}};d.prototype={addNodes:function(a){this.inflight+=a.length;for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)this.require(b);this.checkDone()},addNode:function(a){this.inflight++,this.require(a),this.checkDone()},require:function(a){var b=a.src||a.href;a.__nodeUrl=b,this.dedupe(b,a)||this.fetch(b,a)},dedupe:function(a,b){if(this.pending[a])return this.pending[a].push(b),!0;return this.cache[a]?(this.onload(a,b,this.cache[a]),this.tail(),!0):(this.pending[a]=[b],!1)},fetch:function(a,d){if(c.load&&console.log("fetch",a,d),a)if(a.match(/^data:/)){var e=a.split(","),f=e[0],g=e[1];g=f.indexOf(";base64")>-1?atob(g):decodeURIComponent(g),setTimeout(function(){this.receive(a,d,null,g)}.bind(this),0)}else{var h=function(b,c,e){this.receive(a,d,b,c,e)}.bind(this);b.load(a,h)}else setTimeout(function(){this.receive(a,d,{error:"href must be specified"},null)}.bind(this),0)},receive:function(a,b,c,d,e){this.cache[a]=d;for(var f,g=this.pending[a],h=0,i=g.length;i>h&&(f=g[h]);h++)this.onload(a,f,d,c,e),this.tail();this.pending[a]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},a.Loader=d}),window.HTMLImports.addModule(function(a){var b=function(a){this.addCallback=a,this.mo=new MutationObserver(this.handler.bind(this))};b.prototype={handler:function(a){for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)"childList"===b.type&&b.addedNodes.length&&this.addedNodes(b.addedNodes)},addedNodes:function(a){this.addCallback&&this.addCallback(a);for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)b.children&&b.children.length&&this.addedNodes(b.children)},observe:function(a){this.mo.observe(a,{childList:!0,subtree:!0})}},a.Observer=b}),window.HTMLImports.addModule(function(a){function b(a){return"link"===a.localName&&a.rel===k}function c(a){var b=d(a);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(b)}function d(a){return a.textContent+e(a)}function e(a){var b=a.ownerDocument;b.__importedScripts=b.__importedScripts||0;var c=a.ownerDocument.baseURI,d=b.__importedScripts?"-"+b.__importedScripts:"";return b.__importedScripts++,"\n//# sourceURL="+c+d+".js\n"}function f(a){var b=a.ownerDocument.createElement("style");return b.textContent=a.textContent,g.resolveUrlsInStyle(b),b}var g=a.path,h=a.rootDocument,i=a.flags,j=a.isIE,k=a.IMPORT_LINK_TYPE,l="link[rel="+k+"]",m={documentSelectors:l,importsSelectors:[l,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var a=this.nextToParse();a&&this.parse(a)},parse:function(a){if(this.isParsed(a))return void(i.parse&&console.log("[%s] is already parsed",a.localName));var b=this[this.map[a.localName]];b&&(this.markParsing(a),b.call(this,a))},parseDynamic:function(a,b){this.dynamicElements.push(a),b||this.parseNext()},markParsing:function(a){i.parse&&console.log("parsing",a),this.parsingElement=a},markParsingComplete:function(a){a.__importParsed=!0,this.markDynamicParsingComplete(a),a.__importElement&&(a.__importElement.__importParsed=!0,this.markDynamicParsingComplete(a.__importElement)),this.parsingElement=null,i.parse&&console.log("completed",a)},markDynamicParsingComplete:function(a){var b=this.dynamicElements.indexOf(a);b>=0&&this.dynamicElements.splice(b,1)},parseImport:function(a){if(a["import"]=a.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(a),a["import"]&&(a["import"].__importParsed=!0),this.markParsingComplete(a),a.__resource&&!a.__error?a.dispatchEvent(new CustomEvent("load",{bubbles:!1})):a.dispatchEvent(new CustomEvent("error",{bubbles:!1})),a.__pending)for(var b;a.__pending.length;)b=a.__pending.shift(),b&&b({target:a});this.parseNext()},parseLink:function(a){b(a)?this.parseImport(a):(a.href=a.href,this.parseGeneric(a))},parseStyle:function(a){var b=a;a=f(a),b.__appliedElement=a,a.__importElement=b,this.parseGeneric(a)},parseGeneric:function(a){this.trackElement(a),this.addElementToDocument(a)},rootImportForElement:function(a){for(var b=a;b.ownerDocument.__importLink;)b=b.ownerDocument.__importLink;return b},addElementToDocument:function(a){var b=this.rootImportForElement(a.__importElement||a);b.parentNode.insertBefore(a,b)},trackElement:function(a,b){var c=this,d=function(e){a.removeEventListener("load",d),a.removeEventListener("error",d),b&&b(e),c.markParsingComplete(a),c.parseNext()};if(a.addEventListener("load",d),a.addEventListener("error",d),j&&"style"===a.localName){var e=!1;if(-1==a.textContent.indexOf("@import"))e=!0;else if(a.sheet){e=!0;for(var f,g=a.sheet.cssRules,h=g?g.length:0,i=0;h>i&&(f=g[i]);i++)f.type===CSSRule.IMPORT_RULE&&(e=e&&Boolean(f.styleSheet))}e&&setTimeout(function(){a.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(b){var d=document.createElement("script");d.__importElement=b,d.src=b.src?b.src:c(b),a.currentScript=b,this.trackElement(d,function(b){d.parentNode&&d.parentNode.removeChild(d),a.currentScript=null}),this.addElementToDocument(d)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(h)||this.nextToParseDynamic())},nextToParseInDoc:function(a,c){if(a&&this._mayParse.indexOf(a)<0){this._mayParse.push(a);for(var d,e=a.querySelectorAll(this.parseSelectorsForNode(a)),f=0,g=e.length;g>f&&(d=e[f]);f++)if(!this.isParsed(d))return this.hasResource(d)?b(d)?this.nextToParseInDoc(d.__doc,d):d:void 0}return c},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(a){var b=a.ownerDocument||a;return b===h?this.documentSelectors:this.importsSelectors},isParsed:function(a){return a.__importParsed},needsDynamicParsing:function(a){return this.dynamicElements.indexOf(a)>=0},hasResource:function(a){return b(a)&&void 0===a.__doc?!1:!0}};a.parser=m,a.IMPORT_SELECTOR=l}),window.HTMLImports.addModule(function(a){function b(a){return c(a,g)}function c(a,b){return"link"===a.localName&&a.getAttribute("rel")===b}function d(a){return!!Object.getOwnPropertyDescriptor(a,"baseURI")}function e(a,b){var c=document.implementation.createHTMLDocument(g);c._URL=b;var e=c.createElement("base");e.setAttribute("href",b),c.baseURI||d(c)||Object.defineProperty(c,"baseURI",{value:b});var f=c.createElement("meta");return f.setAttribute("charset","utf-8"),c.head.appendChild(f),c.head.appendChild(e),c.body.innerHTML=a,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(c),c}var f=a.flags,g=a.IMPORT_LINK_TYPE,h=a.IMPORT_SELECTOR,i=a.rootDocument,j=a.Loader,k=a.Observer,l=a.parser,m={documents:{},documentPreloadSelectors:h,importsPreloadSelectors:[h].join(","),loadNode:function(a){n.addNode(a)},loadSubtree:function(a){var b=this.marshalNodes(a);n.addNodes(b)},marshalNodes:function(a){return a.querySelectorAll(this.loadSelectorsForNode(a))},loadSelectorsForNode:function(a){var b=a.ownerDocument||a;return b===i?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(a,c,d,g,h){if(f.load&&console.log("loaded",a,c),c.__resource=d,c.__error=g,b(c)){var i=this.documents[a];void 0===i&&(i=g?null:e(d,h||a),i&&(i.__importLink=c,this.bootDocument(i)),this.documents[a]=i),c.__doc=i}l.parseNext()},bootDocument:function(a){this.loadSubtree(a),this.observer.observe(a),l.parseNext()},loadedAll:function(){l.parseNext()}},n=new j(m.loaded.bind(m),m.loadedAll.bind(m));if(m.observer=new k,!document.baseURI){var o={get:function(){var a=document.querySelector("base");return a?a.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",o),Object.defineProperty(i,"baseURI",o)}a.importer=m,a.importLoader=n}),window.HTMLImports.addModule(function(a){var b=a.parser,c=a.importer,d={added:function(a){for(var d,e,f,g,h=0,i=a.length;i>h&&(g=a[h]);h++)d||(d=g.ownerDocument,e=b.isParsed(d)),f=this.shouldLoadNode(g),f&&c.loadNode(g),this.shouldParseNode(g)&&e&&b.parseDynamic(g,f)},shouldLoadNode:function(a){return 1===a.nodeType&&e.call(a,c.loadSelectorsForNode(a))},shouldParseNode:function(a){return 1===a.nodeType&&e.call(a,b.parseSelectorsForNode(a))}};c.observer.addCallback=d.added.bind(d);var e=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(a){function b(){window.HTMLImports.importer.bootDocument(d)}var c=a.initializeModules;a.isIE;if(!a.useNative){c();var d=a.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?b():document.addEventListener("DOMContentLoaded",b); -}}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(a){var b=a.flags,c=[],d=function(a){c.push(a)},e=function(){c.forEach(function(b){b(a)})};a.addModule=d,a.initializeModules=e,a.hasNative=Boolean(document.registerElement),a.isIE=/Trident/.test(navigator.userAgent),a.useNative=!b.register&&a.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(a){function b(a,b){c(a,function(a){return b(a)?!0:void d(a,b)}),d(a,b)}function c(a,b,d){var e=a.firstElementChild;if(!e)for(e=a.firstChild;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;for(;e;)b(e,d)!==!0&&c(e,b,d),e=e.nextElementSibling;return null}function d(a,c){for(var d=a.shadowRoot;d;)b(d,c),d=d.olderShadowRoot}function e(a,b){f(a,b,[])}function f(a,b,c){if(a=window.wrap(a),!(c.indexOf(a)>=0)){c.push(a);for(var d,e=a.querySelectorAll("link[rel="+g+"]"),h=0,i=e.length;i>h&&(d=e[h]);h++)d["import"]&&f(d["import"],b,c);b(a)}}var g=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";a.forDocumentTree=e,a.forSubtree=b}),window.CustomElements.addModule(function(a){function b(a,b){return c(a,b)||d(a,b)}function c(b,c){return a.upgrade(b,c)?!0:void(c&&g(b))}function d(a,b){t(a,function(a){return c(a,b)?!0:void 0})}function e(a){x.push(a),w||(w=!0,setTimeout(f))}function f(){w=!1;for(var a,b=x,c=0,d=b.length;d>c&&(a=b[c]);c++)a();x=[]}function g(a){v?e(function(){h(a)}):h(a)}function h(a){a.__upgraded__&&!a.__attached&&(a.__attached=!0,a.attachedCallback&&a.attachedCallback())}function i(a){j(a),t(a,function(a){j(a)})}function j(a){v?e(function(){k(a)}):k(a)}function k(a){a.__upgraded__&&a.__attached&&(a.__attached=!1,a.detachedCallback&&a.detachedCallback())}function l(a){for(var b=a,c=window.wrap(document);b;){if(b==c)return!0;b=b.parentNode||b.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&b.host}}function m(a){if(a.shadowRoot&&!a.shadowRoot.__watched){s.dom&&console.log("watching shadow-root for: ",a.localName);for(var b=a.shadowRoot;b;)p(b),b=b.olderShadowRoot}}function n(a,c){if(s.dom){var d=c[0];if(d&&"childList"===d.type&&d.addedNodes&&d.addedNodes){for(var e=d.addedNodes[0];e&&e!==document&&!e.host;)e=e.parentNode;var f=e&&(e.URL||e._URL||e.host&&e.host.localName)||"";f=f.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",c.length,f||"")}var g=l(a);c.forEach(function(a){"childList"===a.type&&(y(a.addedNodes,function(a){a.localName&&b(a,g)}),y(a.removedNodes,function(a){a.localName&&i(a)}))}),s.dom&&console.groupEnd()}function o(a){for(a=window.wrap(a),a||(a=window.wrap(document));a.parentNode;)a=a.parentNode;var b=a.__observer;b&&(n(a,b.takeRecords()),f())}function p(a){if(!a.__observer){var b=new MutationObserver(n.bind(this,a));b.observe(a,{childList:!0,subtree:!0}),a.__observer=b}}function q(a){a=window.wrap(a),s.dom&&console.group("upgradeDocument: ",a.baseURI.split("/").pop());var c=a===window.wrap(document);b(a,c),p(a),s.dom&&console.groupEnd()}function r(a){u(a,q)}var s=a.flags,t=a.forSubtree,u=a.forDocumentTree,v=window.MutationObserver._isPolyfilled&&s["throttle-attached"];a.hasPolyfillMutations=v,a.hasThrottledAttached=v;var w=!1,x=[],y=Array.prototype.forEach.call.bind(Array.prototype.forEach),z=Element.prototype.createShadowRoot;z&&(Element.prototype.createShadowRoot=function(){var a=z.call(this);return window.CustomElements.watchShadow(this),a}),a.watchShadow=m,a.upgradeDocumentTree=r,a.upgradeDocument=q,a.upgradeSubtree=d,a.upgradeAll=b,a.attached=g,a.takeRecords=o}),window.CustomElements.addModule(function(a){function b(b,d){if("template"===b.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(b),!b.__upgraded__&&b.nodeType===Node.ELEMENT_NODE){var e=b.getAttribute("is"),f=a.getRegisteredDefinition(b.localName)||a.getRegisteredDefinition(e);if(f&&(e&&f.tag==b.localName||!e&&!f["extends"]))return c(b,f,d)}}function c(b,c,e){return g.upgrade&&console.group("upgrade:",b.localName),c.is&&b.setAttribute("is",c.is),d(b,c),b.__upgraded__=!0,f(b),e&&a.attached(b),a.upgradeSubtree(b,e),g.upgrade&&console.groupEnd(),b}function d(a,b){Object.__proto__?a.__proto__=b.prototype:(e(a,b.prototype,b["native"]),a.__proto__=b.prototype)}function e(a,b,c){for(var d={},e=b;e!==c&&e!==HTMLElement.prototype;){for(var f,g=Object.getOwnPropertyNames(e),h=0;f=g[h];h++)d[f]||(Object.defineProperty(a,f,Object.getOwnPropertyDescriptor(e,f)),d[f]=1);e=Object.getPrototypeOf(e)}}function f(a){a.createdCallback&&a.createdCallback()}var g=a.flags;a.upgrade=b,a.upgradeWithDefinition=c,a.implementPrototype=d}),window.CustomElements.addModule(function(a){function b(b,d){var i=d||{};if(!b)throw new Error("document.registerElement: first argument `name` must not be empty");if(b.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(b)+"'.");if(e(b))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(b)+"'. The type name is invalid.");if(j(b))throw new Error("DuplicateDefinitionError: a type with name '"+String(b)+"' is already registered");return i.prototype||(i.prototype=Object.create(HTMLElement.prototype)),i.__name=b.toLowerCase(),i.lifecycle=i.lifecycle||{},i.ancestry=f(i["extends"]),g(i),h(i),c(i.prototype),k(i.__name,i),i.ctor=l(i),i.ctor.prototype=i.prototype,i.prototype.constructor=i.ctor,a.ready&&r(document),i.ctor}function c(a){if(!a.setAttribute._polyfilled){var b=a.setAttribute;a.setAttribute=function(a,c){d.call(this,a,c,b)};var c=a.removeAttribute;a.removeAttribute=function(a){d.call(this,a,null,c)},a.setAttribute._polyfilled=!0}}function d(a,b,c){a=a.toLowerCase();var d=this.getAttribute(a);c.apply(this,arguments);var e=this.getAttribute(a);this.attributeChangedCallback&&e!==d&&this.attributeChangedCallback(a,d,e)}function e(a){for(var b=0;b=0&&u(d,HTMLElement),d)}function o(a,b){var c=a[b];a[b]=function(){var a=c.apply(this,arguments);return s(a),a}}var p,q=a.isIE,r=a.upgradeDocumentTree,s=a.upgradeAll,t=a.upgradeWithDefinition,u=a.implementPrototype,v=a.useNative,w=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],x={},y="http://www.w3.org/1999/xhtml",z=document.createElement.bind(document),A=document.createElementNS.bind(document);p=Object.__proto__||v?function(a,b){return a instanceof b}:function(a,b){if(a instanceof b)return!0;for(var c=a;c;){if(c===b.prototype)return!0;c=c.__proto__}return!1},o(Node.prototype,"cloneNode"),o(document,"importNode"),q&&!function(){var a=document.importNode;document.importNode=function(){var b=a.apply(document,arguments);if(b.nodeType==b.DOCUMENT_FRAGMENT_NODE){var c=document.createDocumentFragment();return c.appendChild(b),c}return b}}(),document.registerElement=b,document.createElement=n,document.createElementNS=m,a.registry=x,a["instanceof"]=p,a.reservedTagList=w,a.getRegisteredDefinition=j,document.register=document.registerElement}),function(a){function b(){f(window.wrap(document)),window.CustomElements.ready=!0;var a=window.requestAnimationFrame||function(a){setTimeout(a,16)};a(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var c=a.useNative,d=a.initializeModules;a.isIE;if(c){var e=function(){};a.watchShadow=e,a.upgrade=e,a.upgradeAll=e,a.upgradeDocumentTree=e,a.upgradeSubtree=e,a.takeRecords=e,a["instanceof"]=function(a,b){return a instanceof b}}else d();var f=a.upgradeDocumentTree,g=a.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(a){return a}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(a){a["import"]&&g(wrap(a["import"]))}),"complete"===document.readyState||a.flags.eager)b();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var h=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(h,b)}else b()}(window.CustomElements),function(a){Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();return d.push.apply(d,arguments),b.apply(a,d)}})}(window.WebComponents),function(a){var b=document.createElement("style");b.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var c=document.querySelector("head");c.insertBefore(b,c.firstChild)}(window.WebComponents),function(a){window.Platform=a}(window.WebComponents),angular.module("ngAudio",[]).directive("ngAudio",["$compile","$q","ngAudio",function(a,b,c){return{restrict:"AEC",scope:{volume:"=",start:"=",currentTime:"=",loop:"=",clickPlay:"=",disablePreload:"="},controller:["$scope","$attrs","$element","$timeout",function(a,b,d,e){function f(){g=c.load(b.ngAudio,a),a.$audio=g,g.unbind()}var g;a.disablePreload||f(),d.on("click",function(){a.clickPlay!==!1&&(a.disablePreload&&f(),g.audio.play(),g.volume=a.volume||g.volume,g.loop=a.loop,g.currentTime=a.start||0,e(function(){g.play()},5))}),d.on("$destroy",function(){g.destroy()})}]}}]).directive("ngAudioHover",["$compile","$q","ngAudio",function(a,b,c){return{restrict:"AEC",controller:["$scope","$attrs","$element","$timeout",function(a,b,d,e){var f=c.load(b.ngAudioHover,a);d.on("mouseover rollover hover",function(){f.audio.play(),f.volume=b.volumeHover||f.volume,f.loop=b.loop,f.currentTime=b.startHover||0}),d.on("$destroy",function(){f.destroy()})}]}}]).service("localAudioFindingService",["$q",function(a){this.find=function(b){var c=a.defer(),d=document.getElementById(b);return d?c.resolve(d):c.reject(b),c.promise}}]).service("remoteAudioFindingService",["$q",function(a){this.find=function(b){var c=a.defer(),d=new Audio;return d.addEventListener("error",function(){c.reject()}),d.addEventListener("loadstart",function(){c.resolve(d)}),setTimeout(function(){d.src=b},1),c.promise}}]).service("cleverAudioFindingService",["$q","localAudioFindingService","remoteAudioFindingService",function(a,b,c){this.find=function(d){var e=a.defer();return d=d.replace("|","/"),b.find(d).then(e.resolve,function(){return c.find(d)}).then(e.resolve,e.reject),e.promise}}]).value("ngAudioGlobals",{muting:!1,songmuting:!1,performance:25,unlock:!0}).factory("NgAudioObject",["cleverAudioFindingService","$rootScope","$interval","$timeout","ngAudioGlobals",function(a,b,c,d,e){return function(d,f){function g(){o.play(),o.pause(),window.removeEventListener("click",g)}function h(){w||(A&&c.cancel(A),l&&l(),k&&k(),w=!0)}function i(){w||(k=x.$watch(function(){return{volume:y.volume,currentTime:y.currentTime,progress:y.progress,muting:y.muting,loop:y.loop,playbackRate:y.playbackRate}},function(a,b){a.currentTime!==b.currentTime&&y.setCurrentTime(a.currentTime),a.progress!==b.progress&&y.setProgress(a.progress),a.volume!==b.volume&&y.setVolume(a.volume),a.playbackRate!==b.playbackRate&&y.setPlaybackRate(a.playbackRate),n=a.loop,a.muting!==b.muting&&y.setMuting(a.muting)},!0))}function j(){k&&k(),o&&(u||e.isMuting?o.volume=0:o.volume=void 0!==y.volume?y.volume:1,p&&(o.play(),p=!1),r&&(o.pause(),o.currentTime=0,r=!1),q&&(o.pause(),q=!1),s&&(o.playbackRate=t,s=!1),m&&(o.volume=m,m=void 0),v&&(y.currentTime=o.currentTime,y.duration=o.duration,y.remaining=o.duration-o.currentTime,y.progress=o.currentTime/o.duration,y.paused=o.paused,y.src=o.src,y.currentTime>=y.duration&&z.forEach(function(a){a(y)}),n&&y.currentTime>=y.duration&&(n!==!0&&(n--,y.loop--),y.setCurrentTime(0),y.play())),u||e.isMuting||(y.volume=o.volume),y.audio=o),i()}var k,l,m,n,o,p=!1,q=!1,r=!1,s=!1,t=!1,u=!1,v=!0,w=!1,x=f||b,y=this;this.id=d,this.safeId=d.replace("/","|"),this.loop=0,this.unbind=function(){v=!1},this.play=function(){return p=!0,this};var z=[];this.complete=function(a){z.push(a)},this.pause=function(){q=!0},this.restart=function(){r=!0},this.stop=function(){this.restart()},this.setVolume=function(a){m=a},this.setPlaybackRate=function(a){t=a,s=!0},this.setMuting=function(a){u=a},this.setProgress=function(a){o&&o.duration&&isFinite(a)&&(o.currentTime=o.duration*a)},this.setCurrentTime=function(a){o&&o.duration&&(o.currentTime=a)},this.destroy=h,x.$on("$destroy",function(){h()}),a.find(d).then(function(a){o=a,e.unlock&&(window.addEventListener("click",g),o.addEventListener("playing",function(){window.removeEventListener("click",g)})),o.addEventListener("canplay",function(){y.canPlay=!0})},function(a){y.error=!0,console.warn(a)});var A=c(j,e.performance);l=x.$watch(function(){return e.performance},function(){c.cancel(A),A=c(j,e.performance)})}}]).service("ngAudio",["NgAudioObject","ngAudioGlobals",function(a,b){this.play=function(b,c){var d=new a(b,c);return d.play(),d},this.load=function(b,c){return new a(b,c)},this.mute=function(){b.muting=!0},this.unmute=function(){b.muting=!1},this.toggleMute=function(){b.muting=!b.muting},this.setUnlock=function(a){b.unlock=a}}]).filter("trackTime",function(){return function(a){var b=Math.floor(0|a),c="",d=0,e=0,f=0;return b>3599?(d=Math.floor(b/3600),e=Math.floor((b-3600*d)/60),f=b-(60*e+3600*d),1==d.toString().length&&(d="0"+Math.floor(b/3600).toString()),1==e.toString().length&&(e="0"+Math.floor((b-3600*d)/60).toString()),1==f.toString().length&&(f="0"+(b-(60*e+3600*d)).toString()),c=d+":"+e+":"+f):b>59?(e=Math.floor(b/60),f=b-60*e,1==e.toString().length&&(e="0"+Math.floor(b/60).toString()),1==f.toString().length&&(f="0"+(b-60*e).toString()),c=e+":"+f):(f=b,1==f.toString().length&&(f="0"+b.toString()),c=b+"s"),"function"==typeof Number.isNaN&&Number.isNaN(c),c}}),function(){"use strict";angular.module("ngEmoticons",["ngSanitize"]).filter("emoticons",["$sce",function(a){var b=[{text:":)","class":"smiley",code:"e60a"},{text:":D","class":"happy",code:"e608"},{text:":d","class":"happy",code:"e608"},{text:":(","class":"sad",code:"e60e"},{text:":/","class":"wondering",code:"e620"},{text:":P","class":"tongue",code:"e60c"},{text:":p","class":"tongue",code:"e60c"},{text:"3:)","class":"evil",code:"e618"},{text:"(^)","class":"thumbsup2",code:"e607"},{text:";)","class":"wink",code:"e610"},{text:":o","class":"shocked",code:"e61a"},{text:"-_-","class":"neutral",code:"e61e"},{text:"(y)","class":"thumbs-up",code:"e606"},{text:":*","class":"heart",code:"e604"},{text:"<3","class":"heart",code:"e604"},{text:"<3","class":"heart",code:"e604"},{text:"</3","class":"heart-broken",code:"e605"},{text:"&#x'+a.code+"")}),c.join(" ")}function h(a){var b=/((href|src)=["']|)(\b(https?|ftp|file):\/\/[-A-Z0-9+()&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,c=a.replace(b,function(a){return''+a+""});return c}function i(a){var b=new RegExp(":("+c.join("|")+"):","g");return a.replace(b,function(a,b){return""})}var j={link:!0,linkTarget:"_self"};return f(j,e),void 0!==d&&null!==d?"object"==typeof d?d:(d=g(d),d=i(d),j.link&&(d=h(d)),a.trustAsHtml(d)):void 0}}]).directive("ngEmoticons",["$filter","$sce","$http","$timeout","$templateCache",function(a,b,c,d,e){var f="",g='
      {{video.description}}
      {{video.views}} {{video.likes}}
      ';return e.put(f,g),{restrict:"AE",scope:!0,templateUrl:function(a,b){return b.emoticonsTemplateUrl||f},link:function(e,f,g){function h(a){return angular.forEach(arguments,function(b){b!==a&&angular.forEach(b,function(b,c){a[c]&&a[c].constructor&&a[c].constructor===Object?h(a[c],b):a[c]=b})}),a}var i=e.$eval(g.emoticonsData),j=e.$eval(g.emoticonsOptions);e.video={},e.image={},e.pdf={},e.audio={};var k={link:!0,linkTarget:"_self",pdf:{embed:!0},image:{embed:!1},audio:{embed:!0},code:{highlight:!0,lineNumbers:!1},basicVideo:!1,video:{embed:!1,width:null,height:null,ytTheme:"dark",details:!1,thumbnailQuality:"medium",ytAuthKey:null}};h(k,j),String.prototype.trunc=function(a,b){var c=this.length>a,d=c?this.substr(0,a-1):this;return d=b&&c?d.substr(0,d.lastIndexOf(" ")):d,c?d+"...":d};var l={calcDimensions:function(a){var b={width:null,height:null};return b.width=a.video.width,b.height=a.video.height,a.video.height&&a.video.width?b:a.video.height?(b.width=a.video.height/390*640,b):a.video.width?(b.height=b.width/640*390,b):(b.width=640,b.height=390,b)},embed:function(a,d){var f=/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com(?:\/embed\/|\/v\/|\/watch\?v=|\/ytscreeningroom\?v=|\/feeds\/api\/videos\/|\/user\S*[^\w\-\s]|\S*[^\w\-\s]))([\w\-]{11})[?=&+%\w-]*/gi;if(a.match(f)){var g=this.calcDimensions(d);return e.video.id=RegExp.$1,d.video.details?c.get("https://www.googleapis.com/youtube/v3/videos?id="+RegExp.$1+"&key="+d.video.ytAuthKey+"&part=snippet,statistics").success(function(a){var c=a.items[0];e.video.host="youtube",e.video.title=c.snippet.title,e.video.thumbnail=c.snippet.thumbnails.medium.url,e.video.description=c.snippet.description.trunc(250,!0).replace(/\n/g," ").replace(/ /g," "),e.video.rawDescription=c.snippet.description,e.video.views=c.statistics.viewCount,e.video.likes=c.statistics.likeCount,e.video.uploader=c.snippet.channelTitle,e.video.uploaderPage="https://www.youtube.com/channel/"+c.snippet.channelId,e.video.uploadDate=c.snippet.publishedAt,e.video.url=b.trustAsResourceUrl("https://www.youtube.com/watch?v="+c.id),e.video.embedSrc=b.trustAsResourceUrl("https://www.youtube.com/embed/"+e.video.id+"?autoplay=1"), -e.video.width=g.width,e.video.height=g.height}):(e.video.width=g.width,e.video.height=g.height,e.video.host="youtube",e.video.embedSrc=b.trustAsResourceUrl("https://www.youtube.com/embed/"+RegExp.$1+"?autoplay=0")),a}var h=/https?:\/\/(?:www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)*/gi;if(a.match(h)){var i=this.calcDimensions(d);e.video.id=RegExp.$3,d.video.details?c.get("https://vimeo.com/api/v2/video/"+RegExp.$3+".json").success(function(a){e.video.host="vimeo",e.video.title=a[0].title,e.video.rawDescription=a[0].description.replace(/\n/g,"
      ").replace(/ /g,"
      "),e.video.description=a[0].description.replace(/((<|<)br\s*\/*(>|>)\r\n)/g," ").trunc(250,!0),e.video.thumbnail=a[0].thumbnail_medium,e.video.views=a[0].stats_number_of_plays,e.video.likes=a[0].stats_number_of_likes,e.video.uploader=a[0].user_name,e.video.uploaderPage=a[0].user_url,e.video.uploadDate=a[0].uploadDate,e.video.url=a[0].url,e.video.embedSrc=b.trustAsResourceUrl("//player.vimeo.com/video/"+a[0].id+"?title=0&byline=0&portrait=0&autoplay=1"),e.video.width=i.width,e.video.height=i.height}):(e.video.width=i.width,e.video.height=i.height,e.video.host="vimeo",e.video.embedSrc=b.trustAsResourceUrl("//player.vimeo.com/video/"+RegExp.$3+"?title=0&byline=0&portrait=0&autoplay=0"))}return a},embedBasic:function(a){var c=/((?:https?):\/\/\S*\.(?:ogv|webm|mp4))/gi;return a.match(c)&&(e.video.basic=b.trustAsResourceUrl(RegExp.$1)),a}},m={embed:function(a){var c=/((?:https?):\/\/\S*\.(?:wav|mp3|ogg))/gi;return a.match(c)&&(e.audio.url=b.trustAsResourceUrl(RegExp.$1)),a}},n={embed:function(a){var b=/((?:https?):\/\/\S*\.(?:gif|jpg|jpeg|tiff|png|svg|webp))/gi;return a.match(b)&&(e.image.url=RegExp.$1),a}},o={encodeCode:function(a){return a=a.replace(/\&/gm,"&"),a=a.replace(//gm,">")},getCode:function(a){var b=this;return a=a.replace(/(`+)(\s|[a-z]+)\s*([\s\S]*?[^`])\s*\1(?!`)/gm,function(a,c,d,e){var f=e;return f=f.replace(/^([ \t]*)/g,""),f=f.replace(/[ \t]*$/g,""),f=b.encodeCode(f),f=f.replace(/:\/\//g,"~P"),'
      '+f+"
      "})}},p={embed:function(a){var c=/((?:https?):\/\/\S*\.(?:pdf|PDF))/gi;return a.match(c)&&(e.pdf.url=b.trustAsResourceUrl(RegExp.$1)),a}};if(k.code.highlight){if(!window.hljs)throw"hlsj (Highlight JS is not defined.";i=o.getCode(i),d(function(){hljs.initHighlighting(),k.code.lineNumbers&&angular.element(".ne-code").each(function(){var a=1,b=$(this).text().split("\n").length,c=$("
        ").addClass("pre-numbering");for(angular.element(this).addClass("has-numbering").parent().append(c),a;b>=a;a++)c.append(angular.element("
      • ").text(a))})},0)}var q=a("emoticons")(i,k).$$unwrapTrustedValue();if(k.video.embed){if(!k.video.ytAuthKey)throw"Youtube authentication key is required to get data from youtube.";q=l.embed(q,k)}k.basicVideo&&(q=l.embedBasic(q)),k.audio.embed&&(q=m.embed(q)),k.image.embed&&(q=n.embed(q)),k.pdf.embed&&(q=p.embed(q)),e.neText=b.trustAsHtml(q)}}}]).directive("neHljs",["$timeout",function(a){return{restrict:"AE",link:function(b,c){a(function(){c.find(".ne-code").each(function(){hljs.highlightBlock(this)})},0)}}}])}(),function(a){"undefined"!=typeof exports?a(exports):(window.hljs=a({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return window.hljs}))}(function(a){function b(a){return a.replace(/&/gm,"&").replace(//gm,">")}function c(a){return a.nodeName.toLowerCase()}function d(a,b){var c=a&&a.exec(b);return c&&0==c.index}function e(a){return/^(no-?highlight|plain|text)$/i.test(a)}function f(a){var b,c,d,f=a.className+" ";if(f+=a.parentNode?a.parentNode.className:"",c=/\blang(?:uage)?-([\w-]+)\b/i.exec(f))return u(c[1])?c[1]:"no-highlight";for(f=f.split(/\s+/),b=0,d=f.length;d>b;b++)if(u(f[b])||e(f[b]))return f[b]}function g(a,b){var c,d={};for(c in a)d[c]=a[c];if(b)for(c in b)d[c]=b[c];return d}function h(a){var b=[];return function d(a,e){for(var f=a.firstChild;f;f=f.nextSibling)3==f.nodeType?e+=f.nodeValue.length:1==f.nodeType&&(b.push({event:"start",offset:e,node:f}),e=d(f,e),c(f).match(/br|hr|img|input/)||b.push({event:"stop",offset:e,node:f}));return e}(a,0),b}function i(a,d,e){function f(){return a.length&&d.length?a[0].offset!=d[0].offset?a[0].offset"}function h(a){k+=""}function i(a){("start"==a.event?g:h)(a.node)}for(var j=0,k="",l=[];a.length||d.length;){var m=f();if(k+=b(e.substr(j,m[0].offset-j)),j=m[0].offset,m==a){l.reverse().forEach(h);do i(m.splice(0,1)[0]),m=f();while(m==a&&m.length&&m[0].offset==j);l.reverse().forEach(g)}else"start"==m[0].event?l.push(m[0].node):l.pop(),i(m.splice(0,1)[0])}return k+b(e.substr(j))}function j(a){function b(a){return a&&a.source||a}function c(c,d){return new RegExp(b(c),"m"+(a.case_insensitive?"i":"")+(d?"g":""))}function d(e,f){if(!e.compiled){if(e.compiled=!0,e.keywords=e.keywords||e.beginKeywords,e.keywords){var h={},i=function(b,c){a.case_insensitive&&(c=c.toLowerCase()),c.split(" ").forEach(function(a){var c=a.split("|");h[c[0]]=[b,c[1]?Number(c[1]):1]})};"string"==typeof e.keywords?i("keyword",e.keywords):Object.keys(e.keywords).forEach(function(a){i(a,e.keywords[a])}),e.keywords=h}e.lexemesRe=c(e.lexemes||/\b\w+\b/,!0),f&&(e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")\\b"),e.begin||(e.begin=/\B|\b/),e.beginRe=c(e.begin),e.end||e.endsWithParent||(e.end=/\B|\b/),e.end&&(e.endRe=c(e.end)),e.terminator_end=b(e.end)||"",e.endsWithParent&&f.terminator_end&&(e.terminator_end+=(e.end?"|":"")+f.terminator_end)),e.illegal&&(e.illegalRe=c(e.illegal)),void 0===e.relevance&&(e.relevance=1),e.contains||(e.contains=[]);var j=[];e.contains.forEach(function(a){a.variants?a.variants.forEach(function(b){j.push(g(a,b))}):j.push("self"==a?e:a)}),e.contains=j,e.contains.forEach(function(a){d(a,e)}),e.starts&&d(e.starts,f);var k=e.contains.map(function(a){return a.beginKeywords?"\\.?("+a.begin+")\\.?":a.begin}).concat([e.terminator_end,e.illegal]).map(b).filter(Boolean);e.terminators=k.length?c(k.join("|"),!0):{exec:function(){return null}}}}d(a)}function k(a,c,e,f){function g(a,b){for(var c=0;c";return f+=a+'">',f+b+g}function o(){if(!y.keywords)return b(B);var a="",c=0;y.lexemesRe.lastIndex=0;for(var d=y.lexemesRe.exec(B);d;){a+=b(B.substr(c,d.index-c));var e=m(y,d);e?(C+=e[1],a+=n(e[0],b(d[0]))):a+=b(d[0]),c=y.lexemesRe.lastIndex,d=y.lexemesRe.exec(B)}return a+b(B.substr(c))}function p(){var a="string"==typeof y.subLanguage;if(a&&!w[y.subLanguage])return b(B);var c=a?k(y.subLanguage,B,!0,z[y.subLanguage]):l(B,y.subLanguage.length?y.subLanguage:void 0);return y.relevance>0&&(C+=c.relevance),a&&(z[y.subLanguage]=c.top),n(c.language,c.value,!1,!0)}function q(){return void 0!==y.subLanguage?p():o()}function r(a,c){var d=a.className?n(a.className,"",!0):"";a.returnBegin?(A+=d,B=""):a.excludeBegin?(A+=b(c)+d,B=""):(A+=d,B=c),y=Object.create(a,{parent:{value:y}})}function s(a,c){if(B+=a,void 0===c)return A+=q(),0;var d=g(c,y);if(d)return A+=q(),r(d,c),d.returnBegin?0:c.length;var e=h(y,c);if(e){var f=y;f.returnEnd||f.excludeEnd||(B+=c),A+=q();do y.className&&(A+=""),C+=y.relevance,y=y.parent;while(y!=e.parent);return f.excludeEnd&&(A+=b(c)),B="",e.starts&&r(e.starts,""),f.returnEnd?0:c.length}if(i(c,y))throw new Error('Illegal lexeme "'+c+'" for mode "'+(y.className||"")+'"');return B+=c,c.length||1}var t=u(a);if(!t)throw new Error('Unknown language: "'+a+'"');j(t);var x,y=f||t,z={},A="";for(x=y;x!=t;x=x.parent)x.className&&(A=n(x.className,"",!0)+A);var B="",C=0;try{for(var D,E,F=0;;){if(y.terminators.lastIndex=F,D=y.terminators.exec(c),!D)break;E=s(c.substr(F,D.index-F),D[0]),F=D.index+E}for(s(c.substr(F)),x=y;x.parent;x=x.parent)x.className&&(A+="");return{relevance:C,value:A,language:a,top:y}}catch(G){if(-1!=G.message.indexOf("Illegal"))return{relevance:0,value:b(c)};throw G}}function l(a,c){c=c||v.languages||Object.keys(w);var d={relevance:0,value:b(a)},e=d;return c.forEach(function(b){if(u(b)){var c=k(b,a,!1);c.language=b,c.relevance>e.relevance&&(e=c),c.relevance>d.relevance&&(e=d,d=c)}}),e.language&&(d.second_best=e),d}function m(a){return v.tabReplace&&(a=a.replace(/^((<[^>]+>|\t)+)/gm,function(a,b){return b.replace(/\t/g,v.tabReplace)})),v.useBR&&(a=a.replace(/\n/g,"
        ")),a}function n(a,b,c){var d=b?x[b]:c,e=[a.trim()];return a.match(/\bhljs\b/)||e.push("hljs"),-1===a.indexOf(d)&&e.push(d),e.join(" ").trim()}function o(a){var b=f(a);if(!e(b)){var c;v.useBR?(c=document.createElementNS("http://www.w3.org/1999/xhtml","div"),c.innerHTML=a.innerHTML.replace(/\n/g,"").replace(//g,"\n")):c=a;var d=c.textContent,g=b?k(b,d,!0):l(d),j=h(c);if(j.length){var o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML=g.value,g.value=i(j,h(o),d)}g.value=m(g.value),a.innerHTML=g.value,a.className=n(a.className,b,g.language),a.result={language:g.language,re:g.relevance},g.second_best&&(a.second_best={language:g.second_best.language,re:g.second_best.relevance})}}function p(a){v=g(v,a)}function q(){if(!q.called){q.called=!0;var a=document.querySelectorAll("pre code");Array.prototype.forEach.call(a,o)}}function r(){addEventListener("DOMContentLoaded",q,!1),addEventListener("load",q,!1)}function s(b,c){var d=w[b]=c(a);d.aliases&&d.aliases.forEach(function(a){x[a]=b})}function t(){return Object.keys(w)}function u(a){return a=(a||"").toLowerCase(),w[a]||w[x[a]]}var v={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},w={},x={};return a.highlight=k,a.highlightAuto=l,a.fixMarkup=m,a.highlightBlock=o,a.configure=p,a.initHighlighting=q,a.initHighlightingOnLoad=r,a.registerLanguage=s,a.listLanguages=t,a.getLanguage=u,a.inherit=g,a.IDENT_RE="[a-zA-Z]\\w*",a.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",a.NUMBER_RE="\\b\\d+(\\.\\d+)?",a.C_NUMBER_RE="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",a.BINARY_NUMBER_RE="\\b(0b[01]+)",a.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",a.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},a.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[a.BACKSLASH_ESCAPE]},a.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[a.BACKSLASH_ESCAPE]},a.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},a.COMMENT=function(b,c,d){var e=a.inherit({className:"comment",begin:b,end:c,contains:[]},d||{});return e.contains.push(a.PHRASAL_WORDS_MODE),e.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),e},a.C_LINE_COMMENT_MODE=a.COMMENT("//","$"),a.C_BLOCK_COMMENT_MODE=a.COMMENT("/\\*","\\*/"),a.HASH_COMMENT_MODE=a.COMMENT("#","$"),a.NUMBER_MODE={className:"number",begin:a.NUMBER_RE,relevance:0},a.C_NUMBER_MODE={className:"number",begin:a.C_NUMBER_RE,relevance:0},a.BINARY_NUMBER_MODE={className:"number",begin:a.BINARY_NUMBER_RE,relevance:0},a.CSS_NUMBER_MODE={className:"number",begin:a.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},a.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[a.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[a.BACKSLASH_ESCAPE]}]},a.TITLE_MODE={className:"title",begin:a.IDENT_RE,relevance:0},a.UNDERSCORE_TITLE_MODE={className:"title",begin:a.UNDERSCORE_IDENT_RE,relevance:0},a.registerLanguage("1c",function(a){var b="[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*",c="возврат дата для если и или иначе иначеесли исключение конецесли конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл число экспорт",d="ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц разделительстрок разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо сигнал симв символтабуляции создатьобъект сокрл сокрлп сокрп сообщить состояние сохранитьзначение сред статусвозврата стрдлина стрзаменить стрколичествострок стрполучитьстроку стрчисловхождений сформироватьпозициюдокумента счетпокоду текущаядата текущеевремя типзначения типзначениястр удалитьобъекты установитьтана установитьтапо фиксшаблон формат цел шаблон",e={className:"dquote",begin:'""'},f={className:"string",begin:'"',end:'"|$',contains:[e]},g={className:"string",begin:"\\|",end:'"|$',contains:[e]};return{case_insensitive:!0,lexemes:b,keywords:{keyword:c,built_in:d},contains:[a.C_LINE_COMMENT_MODE,a.NUMBER_MODE,f,g,{className:"function",begin:"(процедура|функция)",end:"$",lexemes:b,keywords:"процедура функция",contains:[a.inherit(a.TITLE_MODE,{begin:b}),{className:"tail",endsWithParent:!0,contains:[{className:"params",begin:"\\(",end:"\\)",lexemes:b,keywords:"знач",contains:[f,g]},{className:"export",begin:"экспорт",endsWithParent:!0,lexemes:b,keywords:"экспорт",contains:[a.C_LINE_COMMENT_MODE]}]},a.C_LINE_COMMENT_MODE]},{className:"preprocessor",begin:"#",end:"$"},{className:"date",begin:"'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'"}]}}),a.registerLanguage("accesslog",function(a){return{contains:[{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+\\b",relevance:0},{className:"string",begin:'"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)',end:'"',keywords:"GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE",illegal:"\\n",relevance:10},{className:"string",begin:/\[/,end:/\]/,illegal:"\\n"},{className:"string",begin:'"',end:'"',illegal:"\\n"}]}}),a.registerLanguage("actionscript",function(a){var b="[a-zA-Z_$][a-zA-Z0-9_$]*",c="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",d={className:"rest_arg",begin:"[.]{3}",end:b,relevance:10};return{aliases:["as"],keywords:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.C_NUMBER_MODE,{className:"package",beginKeywords:"package",end:"{",contains:[a.TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},a.TITLE_MODE]},{className:"preprocessor",beginKeywords:"import include",end:";"},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[a.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,d]},{className:"type",begin:":",end:c,relevance:10}]}],illegal:/#/}}),a.registerLanguage("apache",function(a){var b={className:"number",begin:"[\\$%]\\d+"};return{aliases:["apacheconf"],case_insensitive:!0,contains:[a.HASH_COMMENT_MODE,{className:"tag",begin:""},{className:"keyword",begin:/\w+/,relevance:0,keywords:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all"},contains:[{className:"sqbracket",begin:"\\s\\[",end:"\\]$"},{className:"cbracket",begin:"[\\$%]\\{",end:"\\}",contains:["self",b]},b,a.QUOTE_STRING_MODE]}}],illegal:/\S/}}),a.registerLanguage("applescript",function(a){var b=a.inherit(a.QUOTE_STRING_MODE,{illegal:""}),c={className:"params",begin:"\\(",end:"\\)",contains:["self",a.C_NUMBER_MODE,b]},d=a.COMMENT("--","$"),e=a.COMMENT("\\(\\*","\\*\\)",{contains:["self",d]}),f=[d,e,a.HASH_COMMENT_MODE];return{aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",constant:"AppleScript false linefeed return pi quote result space tab true",type:"alias application boolean class constant date file integer list number real record string text",command:"activate beep count delay launch log offset read round run say summarize write",property:"character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},contains:[b,a.C_NUMBER_MODE,{className:"type",begin:"\\bPOSIX file\\b"},{className:"command",begin:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{className:"constant",begin:"\\b(text item delimiters|current application|missing value)\\b"},{className:"keyword",begin:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{className:"property",begin:"\\b(POSIX path|(date|time) string|quoted form)\\b"},{className:"function_start",beginKeywords:"on",illegal:"[${=;\\n]",contains:[a.UNDERSCORE_TITLE_MODE,c]}].concat(f),illegal:"//|->|=>|\\[\\["}}),a.registerLanguage("armasm",function(a){return{case_insensitive:!0,aliases:["arm"],lexemes:"\\.?"+a.IDENT_RE,keywords:{literal:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 ",preprocessor:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @ "},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?",end:"\\s"},a.COMMENT("[;@]","$",{relevance:0}),a.C_BLOCK_COMMENT_MODE,a.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"label",variants:[{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"[=#]\\w+"}],relevance:0}]}}),a.registerLanguage("xml",function(a){var b="[A-Za-z0-9\\._:-]+",c={begin:/<\?(php)?(?!\w)/,end:/\?>/,subLanguage:"php"},d={endsWithParent:!0,illegal:/]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],case_insensitive:!0,contains:[{className:"doctype",begin:"",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},a.COMMENT("",{relevance:10}),{className:"cdata",begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{className:"tag",begin:"|$)",end:">",keywords:{title:"style"},contains:[d],starts:{end:"",returnEnd:!0,subLanguage:"css"}},{className:"tag",begin:"|$)",end:">",keywords:{title:"script"},contains:[d],starts:{end:"",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars"]}},c,{className:"pi",begin:/<\?\w+/,end:/\?>/,relevance:10},{className:"tag",begin:"",contains:[{className:"title",begin:/[^ \/><\n\t]+/,relevance:0},d]}]}}),a.registerLanguage("asciidoc",function(a){return{aliases:["adoc"],contains:[a.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),a.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"header",begin:"^(={1,5}) .+?( \\1)?$",relevance:10},{className:"header",begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$",relevance:10},{className:"attribute",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"attribute",begin:"^\\[.+?\\]$",relevance:0},{className:"blockquote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},{className:"bullet",begin:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{className:"label",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},{className:"strong",begin:"\\B\\*(?![\\*\\s])",end:"(\\n{2}|\\*)",contains:[{begin:"\\\\*\\w",relevance:0}]},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0},{className:"emphasis",begin:"_(?![_\\s])",end:"(\\n{2}|_)",relevance:0},{className:"smartquote",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},{className:"horizontal_rule",begin:"^'{3,}[ \\t]*$",relevance:10},{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link_url",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"link_label",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}),a.registerLanguage("aspectj",function(a){var b="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else extends implements break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws privileged aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization staticinitialization withincode target within execution getWithinTypeName handler thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents warning error soft precedence thisAspectInstance",c="get set args call";return{keywords:b,illegal:/<\/|#/,contains:[a.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"aspect",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[{beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},a.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:b+" "+c,excludeEnd:!1}]},{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/,excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[a.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:b,illegal:/["\[\]]/,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",keywords:b+" "+c},a.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,returnBegin:!0,end:/[{;=]/,keywords:b,excludeEnd:!0,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0,keywords:b,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},a.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"}]}}),a.registerLanguage("autohotkey",function(a){var b={className:"escape",begin:"`[\\s\\S]"},c=a.COMMENT(";","$",{relevance:0}),d=[{className:"built_in",begin:"A_[a-zA-Z0-9]+"},{className:"built_in",beginKeywords:"ComSpec Clipboard ClipboardAll ErrorLevel"}];return{case_insensitive:!0,keywords:{keyword:"Break Continue Else Gosub If Loop Return While",literal:"A true false NOT AND OR"},contains:d.concat([b,a.inherit(a.QUOTE_STRING_MODE,{contains:[b]}),c,{className:"number",begin:a.NUMBER_RE,relevance:0},{className:"var_expand",begin:"%",end:"%",illegal:"\\n",contains:[b]},{className:"label",contains:[b],variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{begin:",\\s*,",relevance:10}])}}),a.registerLanguage("autoit",function(a){var b="ByRef Case Const ContinueCase ContinueLoop Default Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",c="True False And Null Not Or",d="Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Opt Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown TCPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend UDPShutdown UDPStartup VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitActive WinWaitClose WinWaitNotActive Array1DToHistogram ArrayAdd ArrayBinarySearch ArrayColDelete ArrayColInsert ArrayCombinations ArrayConcatenate ArrayDelete ArrayDisplay ArrayExtract ArrayFindAll ArrayInsert ArrayMax ArrayMaxIndex ArrayMin ArrayMinIndex ArrayPermute ArrayPop ArrayPush ArrayReverse ArraySearch ArrayShuffle ArraySort ArraySwap ArrayToClip ArrayToString ArrayTranspose ArrayTrim ArrayUnique Assert ChooseColor ChooseFont ClipBoard_ChangeChain ClipBoard_Close ClipBoard_CountFormats ClipBoard_Empty ClipBoard_EnumFormats ClipBoard_FormatStr ClipBoard_GetData ClipBoard_GetDataEx ClipBoard_GetFormatName ClipBoard_GetOpenWindow ClipBoard_GetOwner ClipBoard_GetPriorityFormat ClipBoard_GetSequenceNumber ClipBoard_GetViewer ClipBoard_IsFormatAvailable ClipBoard_Open ClipBoard_RegisterFormat ClipBoard_SetData ClipBoard_SetDataEx ClipBoard_SetViewer ClipPutFile ColorConvertHSLtoRGB ColorConvertRGBtoHSL ColorGetBlue ColorGetCOLORREF ColorGetGreen ColorGetRed ColorGetRGB ColorSetCOLORREF ColorSetRGB Crypt_DecryptData Crypt_DecryptFile Crypt_DeriveKey Crypt_DestroyKey Crypt_EncryptData Crypt_EncryptFile Crypt_GenRandom Crypt_HashData Crypt_HashFile Crypt_Shutdown Crypt_Startup DateAdd DateDayOfWeek DateDaysInMonth DateDiff DateIsLeapYear DateIsValid DateTimeFormat DateTimeSplit DateToDayOfWeek DateToDayOfWeekISO DateToDayValue DateToMonth Date_Time_CompareFileTime Date_Time_DOSDateTimeToArray Date_Time_DOSDateTimeToFileTime Date_Time_DOSDateTimeToStr Date_Time_DOSDateToArray Date_Time_DOSDateToStr Date_Time_DOSTimeToArray Date_Time_DOSTimeToStr Date_Time_EncodeFileTime Date_Time_EncodeSystemTime Date_Time_FileTimeToArray Date_Time_FileTimeToDOSDateTime Date_Time_FileTimeToLocalFileTime Date_Time_FileTimeToStr Date_Time_FileTimeToSystemTime Date_Time_GetFileTime Date_Time_GetLocalTime Date_Time_GetSystemTime Date_Time_GetSystemTimeAdjustment Date_Time_GetSystemTimeAsFileTime Date_Time_GetSystemTimes Date_Time_GetTickCount Date_Time_GetTimeZoneInformation Date_Time_LocalFileTimeToFileTime Date_Time_SetFileTime Date_Time_SetLocalTime Date_Time_SetSystemTime Date_Time_SetSystemTimeAdjustment Date_Time_SetTimeZoneInformation Date_Time_SystemTimeToArray Date_Time_SystemTimeToDateStr Date_Time_SystemTimeToDateTimeStr Date_Time_SystemTimeToFileTime Date_Time_SystemTimeToTimeStr Date_Time_SystemTimeToTzSpecificLocalTime Date_Time_TzSpecificLocalTimeToSystemTime DayValueToDate DebugBugReportEnv DebugCOMError DebugOut DebugReport DebugReportEx DebugReportVar DebugSetup Degree EventLog__Backup EventLog__Clear EventLog__Close EventLog__Count EventLog__DeregisterSource EventLog__Full EventLog__Notify EventLog__Oldest EventLog__Open EventLog__OpenBackup EventLog__Read EventLog__RegisterSource EventLog__Report Excel_BookAttach Excel_BookClose Excel_BookList Excel_BookNew Excel_BookOpen Excel_BookOpenText Excel_BookSave Excel_BookSaveAs Excel_Close Excel_ColumnToLetter Excel_ColumnToNumber Excel_ConvertFormula Excel_Export Excel_FilterGet Excel_FilterSet Excel_Open Excel_PictureAdd Excel_Print Excel_RangeCopyPaste Excel_RangeDelete Excel_RangeFind Excel_RangeInsert Excel_RangeLinkAddRemove Excel_RangeRead Excel_RangeReplace Excel_RangeSort Excel_RangeValidate Excel_RangeWrite Excel_SheetAdd Excel_SheetCopyMove Excel_SheetDelete Excel_SheetList FileCountLines FileCreate FileListToArray FileListToArrayRec FilePrint FileReadToArray FileWriteFromArray FileWriteLog FileWriteToLine FTP_Close FTP_Command FTP_Connect FTP_DecodeInternetStatus FTP_DirCreate FTP_DirDelete FTP_DirGetCurrent FTP_DirPutContents FTP_DirSetCurrent FTP_FileClose FTP_FileDelete FTP_FileGet FTP_FileGetSize FTP_FileOpen FTP_FilePut FTP_FileRead FTP_FileRename FTP_FileTimeLoHiToStr FTP_FindFileClose FTP_FindFileFirst FTP_FindFileNext FTP_GetLastResponseInfo FTP_ListToArray FTP_ListToArray2D FTP_ListToArrayEx FTP_Open FTP_ProgressDownload FTP_ProgressUpload FTP_SetStatusCallback GDIPlus_ArrowCapCreate GDIPlus_ArrowCapDispose GDIPlus_ArrowCapGetFillState GDIPlus_ArrowCapGetHeight GDIPlus_ArrowCapGetMiddleInset GDIPlus_ArrowCapGetWidth GDIPlus_ArrowCapSetFillState GDIPlus_ArrowCapSetHeight GDIPlus_ArrowCapSetMiddleInset GDIPlus_ArrowCapSetWidth GDIPlus_BitmapApplyEffect GDIPlus_BitmapApplyEffectEx GDIPlus_BitmapCloneArea GDIPlus_BitmapConvertFormat GDIPlus_BitmapCreateApplyEffect GDIPlus_BitmapCreateApplyEffectEx GDIPlus_BitmapCreateDIBFromBitmap GDIPlus_BitmapCreateFromFile GDIPlus_BitmapCreateFromGraphics GDIPlus_BitmapCreateFromHBITMAP GDIPlus_BitmapCreateFromHICON GDIPlus_BitmapCreateFromHICON32 GDIPlus_BitmapCreateFromMemory GDIPlus_BitmapCreateFromResource GDIPlus_BitmapCreateFromScan0 GDIPlus_BitmapCreateFromStream GDIPlus_BitmapCreateHBITMAPFromBitmap GDIPlus_BitmapDispose GDIPlus_BitmapGetHistogram GDIPlus_BitmapGetHistogramEx GDIPlus_BitmapGetHistogramSize GDIPlus_BitmapGetPixel GDIPlus_BitmapLockBits GDIPlus_BitmapSetPixel GDIPlus_BitmapUnlockBits GDIPlus_BrushClone GDIPlus_BrushCreateSolid GDIPlus_BrushDispose GDIPlus_BrushGetSolidColor GDIPlus_BrushGetType GDIPlus_BrushSetSolidColor GDIPlus_ColorMatrixCreate GDIPlus_ColorMatrixCreateGrayScale GDIPlus_ColorMatrixCreateNegative GDIPlus_ColorMatrixCreateSaturation GDIPlus_ColorMatrixCreateScale GDIPlus_ColorMatrixCreateTranslate GDIPlus_CustomLineCapClone GDIPlus_CustomLineCapCreate GDIPlus_CustomLineCapDispose GDIPlus_CustomLineCapGetStrokeCaps GDIPlus_CustomLineCapSetStrokeCaps GDIPlus_Decoders GDIPlus_DecodersGetCount GDIPlus_DecodersGetSize GDIPlus_DrawImageFX GDIPlus_DrawImageFXEx GDIPlus_DrawImagePoints GDIPlus_EffectCreate GDIPlus_EffectCreateBlur GDIPlus_EffectCreateBrightnessContrast GDIPlus_EffectCreateColorBalance GDIPlus_EffectCreateColorCurve GDIPlus_EffectCreateColorLUT GDIPlus_EffectCreateColorMatrix GDIPlus_EffectCreateHueSaturationLightness GDIPlus_EffectCreateLevels GDIPlus_EffectCreateRedEyeCorrection GDIPlus_EffectCreateSharpen GDIPlus_EffectCreateTint GDIPlus_EffectDispose GDIPlus_EffectGetParameters GDIPlus_EffectSetParameters GDIPlus_Encoders GDIPlus_EncodersGetCLSID GDIPlus_EncodersGetCount GDIPlus_EncodersGetParamList GDIPlus_EncodersGetParamListSize GDIPlus_EncodersGetSize GDIPlus_FontCreate GDIPlus_FontDispose GDIPlus_FontFamilyCreate GDIPlus_FontFamilyCreateFromCollection GDIPlus_FontFamilyDispose GDIPlus_FontFamilyGetCellAscent GDIPlus_FontFamilyGetCellDescent GDIPlus_FontFamilyGetEmHeight GDIPlus_FontFamilyGetLineSpacing GDIPlus_FontGetHeight GDIPlus_FontPrivateAddFont GDIPlus_FontPrivateAddMemoryFont GDIPlus_FontPrivateCollectionDispose GDIPlus_FontPrivateCreateCollection GDIPlus_GraphicsClear GDIPlus_GraphicsCreateFromHDC GDIPlus_GraphicsCreateFromHWND GDIPlus_GraphicsDispose GDIPlus_GraphicsDrawArc GDIPlus_GraphicsDrawBezier GDIPlus_GraphicsDrawClosedCurve GDIPlus_GraphicsDrawClosedCurve2 GDIPlus_GraphicsDrawCurve GDIPlus_GraphicsDrawCurve2 GDIPlus_GraphicsDrawEllipse GDIPlus_GraphicsDrawImage GDIPlus_GraphicsDrawImagePointsRect GDIPlus_GraphicsDrawImageRect GDIPlus_GraphicsDrawImageRectRect GDIPlus_GraphicsDrawLine GDIPlus_GraphicsDrawPath GDIPlus_GraphicsDrawPie GDIPlus_GraphicsDrawPolygon GDIPlus_GraphicsDrawRect GDIPlus_GraphicsDrawString GDIPlus_GraphicsDrawStringEx GDIPlus_GraphicsFillClosedCurve GDIPlus_GraphicsFillClosedCurve2 GDIPlus_GraphicsFillEllipse GDIPlus_GraphicsFillPath GDIPlus_GraphicsFillPie GDIPlus_GraphicsFillPolygon GDIPlus_GraphicsFillRect GDIPlus_GraphicsFillRegion GDIPlus_GraphicsGetCompositingMode GDIPlus_GraphicsGetCompositingQuality GDIPlus_GraphicsGetDC GDIPlus_GraphicsGetInterpolationMode GDIPlus_GraphicsGetSmoothingMode GDIPlus_GraphicsGetTransform GDIPlus_GraphicsMeasureCharacterRanges GDIPlus_GraphicsMeasureString GDIPlus_GraphicsReleaseDC GDIPlus_GraphicsResetClip GDIPlus_GraphicsResetTransform GDIPlus_GraphicsRestore GDIPlus_GraphicsRotateTransform GDIPlus_GraphicsSave GDIPlus_GraphicsScaleTransform GDIPlus_GraphicsSetClipPath GDIPlus_GraphicsSetClipRect GDIPlus_GraphicsSetClipRegion GDIPlus_GraphicsSetCompositingMode GDIPlus_GraphicsSetCompositingQuality GDIPlus_GraphicsSetInterpolationMode GDIPlus_GraphicsSetPixelOffsetMode GDIPlus_GraphicsSetSmoothingMode GDIPlus_GraphicsSetTextRenderingHint GDIPlus_GraphicsSetTransform GDIPlus_GraphicsTransformPoints GDIPlus_GraphicsTranslateTransform GDIPlus_HatchBrushCreate GDIPlus_HICONCreateFromBitmap GDIPlus_ImageAttributesCreate GDIPlus_ImageAttributesDispose GDIPlus_ImageAttributesSetColorKeys GDIPlus_ImageAttributesSetColorMatrix GDIPlus_ImageDispose GDIPlus_ImageGetDimension GDIPlus_ImageGetFlags GDIPlus_ImageGetGraphicsContext GDIPlus_ImageGetHeight GDIPlus_ImageGetHorizontalResolution GDIPlus_ImageGetPixelFormat GDIPlus_ImageGetRawFormat GDIPlus_ImageGetThumbnail GDIPlus_ImageGetType GDIPlus_ImageGetVerticalResolution GDIPlus_ImageGetWidth GDIPlus_ImageLoadFromFile GDIPlus_ImageLoadFromStream GDIPlus_ImageResize GDIPlus_ImageRotateFlip GDIPlus_ImageSaveToFile GDIPlus_ImageSaveToFileEx GDIPlus_ImageSaveToStream GDIPlus_ImageScale GDIPlus_LineBrushCreate GDIPlus_LineBrushCreateFromRect GDIPlus_LineBrushCreateFromRectWithAngle GDIPlus_LineBrushGetColors GDIPlus_LineBrushGetRect GDIPlus_LineBrushMultiplyTransform GDIPlus_LineBrushResetTransform GDIPlus_LineBrushSetBlend GDIPlus_LineBrushSetColors GDIPlus_LineBrushSetGammaCorrection GDIPlus_LineBrushSetLinearBlend GDIPlus_LineBrushSetPresetBlend GDIPlus_LineBrushSetSigmaBlend GDIPlus_LineBrushSetTransform GDIPlus_MatrixClone GDIPlus_MatrixCreate GDIPlus_MatrixDispose GDIPlus_MatrixGetElements GDIPlus_MatrixInvert GDIPlus_MatrixMultiply GDIPlus_MatrixRotate GDIPlus_MatrixScale GDIPlus_MatrixSetElements GDIPlus_MatrixShear GDIPlus_MatrixTransformPoints GDIPlus_MatrixTranslate GDIPlus_PaletteInitialize GDIPlus_ParamAdd GDIPlus_ParamInit GDIPlus_ParamSize GDIPlus_PathAddArc GDIPlus_PathAddBezier GDIPlus_PathAddClosedCurve GDIPlus_PathAddClosedCurve2 GDIPlus_PathAddCurve GDIPlus_PathAddCurve2 GDIPlus_PathAddCurve3 GDIPlus_PathAddEllipse GDIPlus_PathAddLine GDIPlus_PathAddLine2 GDIPlus_PathAddPath GDIPlus_PathAddPie GDIPlus_PathAddPolygon GDIPlus_PathAddRectangle GDIPlus_PathAddString GDIPlus_PathBrushCreate GDIPlus_PathBrushCreateFromPath GDIPlus_PathBrushGetCenterPoint GDIPlus_PathBrushGetFocusScales GDIPlus_PathBrushGetPointCount GDIPlus_PathBrushGetRect GDIPlus_PathBrushGetWrapMode GDIPlus_PathBrushMultiplyTransform GDIPlus_PathBrushResetTransform GDIPlus_PathBrushSetBlend GDIPlus_PathBrushSetCenterColor GDIPlus_PathBrushSetCenterPoint GDIPlus_PathBrushSetFocusScales GDIPlus_PathBrushSetGammaCorrection GDIPlus_PathBrushSetLinearBlend GDIPlus_PathBrushSetPresetBlend GDIPlus_PathBrushSetSigmaBlend GDIPlus_PathBrushSetSurroundColor GDIPlus_PathBrushSetSurroundColorsWithCount GDIPlus_PathBrushSetTransform GDIPlus_PathBrushSetWrapMode GDIPlus_PathClone GDIPlus_PathCloseFigure GDIPlus_PathCreate GDIPlus_PathCreate2 GDIPlus_PathDispose GDIPlus_PathFlatten GDIPlus_PathGetData GDIPlus_PathGetFillMode GDIPlus_PathGetLastPoint GDIPlus_PathGetPointCount GDIPlus_PathGetPoints GDIPlus_PathGetWorldBounds GDIPlus_PathIsOutlineVisiblePoint GDIPlus_PathIsVisiblePoint GDIPlus_PathIterCreate GDIPlus_PathIterDispose GDIPlus_PathIterGetSubpathCount GDIPlus_PathIterNextMarkerPath GDIPlus_PathIterNextSubpathPath GDIPlus_PathIterRewind GDIPlus_PathReset GDIPlus_PathReverse GDIPlus_PathSetFillMode GDIPlus_PathSetMarker GDIPlus_PathStartFigure GDIPlus_PathTransform GDIPlus_PathWarp GDIPlus_PathWiden GDIPlus_PathWindingModeOutline GDIPlus_PenCreate GDIPlus_PenCreate2 GDIPlus_PenDispose GDIPlus_PenGetAlignment GDIPlus_PenGetColor GDIPlus_PenGetCustomEndCap GDIPlus_PenGetDashCap GDIPlus_PenGetDashStyle GDIPlus_PenGetEndCap GDIPlus_PenGetMiterLimit GDIPlus_PenGetWidth GDIPlus_PenSetAlignment GDIPlus_PenSetColor GDIPlus_PenSetCustomEndCap GDIPlus_PenSetDashCap GDIPlus_PenSetDashStyle GDIPlus_PenSetEndCap GDIPlus_PenSetLineCap GDIPlus_PenSetLineJoin GDIPlus_PenSetMiterLimit GDIPlus_PenSetStartCap GDIPlus_PenSetWidth GDIPlus_RectFCreate GDIPlus_RegionClone GDIPlus_RegionCombinePath GDIPlus_RegionCombineRect GDIPlus_RegionCombineRegion GDIPlus_RegionCreate GDIPlus_RegionCreateFromPath GDIPlus_RegionCreateFromRect GDIPlus_RegionDispose GDIPlus_RegionGetBounds GDIPlus_RegionGetHRgn GDIPlus_RegionTransform GDIPlus_RegionTranslate GDIPlus_Shutdown GDIPlus_Startup GDIPlus_StringFormatCreate GDIPlus_StringFormatDispose GDIPlus_StringFormatGetMeasurableCharacterRangeCount GDIPlus_StringFormatSetAlign GDIPlus_StringFormatSetLineAlign GDIPlus_StringFormatSetMeasurableCharacterRanges GDIPlus_TextureCreate GDIPlus_TextureCreate2 GDIPlus_TextureCreateIA GetIP GUICtrlAVI_Close GUICtrlAVI_Create GUICtrlAVI_Destroy GUICtrlAVI_IsPlaying GUICtrlAVI_Open GUICtrlAVI_OpenEx GUICtrlAVI_Play GUICtrlAVI_Seek GUICtrlAVI_Show GUICtrlAVI_Stop GUICtrlButton_Click GUICtrlButton_Create GUICtrlButton_Destroy GUICtrlButton_Enable GUICtrlButton_GetCheck GUICtrlButton_GetFocus GUICtrlButton_GetIdealSize GUICtrlButton_GetImage GUICtrlButton_GetImageList GUICtrlButton_GetNote GUICtrlButton_GetNoteLength GUICtrlButton_GetSplitInfo GUICtrlButton_GetState GUICtrlButton_GetText GUICtrlButton_GetTextMargin GUICtrlButton_SetCheck GUICtrlButton_SetDontClick GUICtrlButton_SetFocus GUICtrlButton_SetImage GUICtrlButton_SetImageList GUICtrlButton_SetNote GUICtrlButton_SetShield GUICtrlButton_SetSize GUICtrlButton_SetSplitInfo GUICtrlButton_SetState GUICtrlButton_SetStyle GUICtrlButton_SetText GUICtrlButton_SetTextMargin GUICtrlButton_Show GUICtrlComboBoxEx_AddDir GUICtrlComboBoxEx_AddString GUICtrlComboBoxEx_BeginUpdate GUICtrlComboBoxEx_Create GUICtrlComboBoxEx_CreateSolidBitMap GUICtrlComboBoxEx_DeleteString GUICtrlComboBoxEx_Destroy GUICtrlComboBoxEx_EndUpdate GUICtrlComboBoxEx_FindStringExact GUICtrlComboBoxEx_GetComboBoxInfo GUICtrlComboBoxEx_GetComboControl GUICtrlComboBoxEx_GetCount GUICtrlComboBoxEx_GetCurSel GUICtrlComboBoxEx_GetDroppedControlRect GUICtrlComboBoxEx_GetDroppedControlRectEx GUICtrlComboBoxEx_GetDroppedState GUICtrlComboBoxEx_GetDroppedWidth GUICtrlComboBoxEx_GetEditControl GUICtrlComboBoxEx_GetEditSel GUICtrlComboBoxEx_GetEditText GUICtrlComboBoxEx_GetExtendedStyle GUICtrlComboBoxEx_GetExtendedUI GUICtrlComboBoxEx_GetImageList GUICtrlComboBoxEx_GetItem GUICtrlComboBoxEx_GetItemEx GUICtrlComboBoxEx_GetItemHeight GUICtrlComboBoxEx_GetItemImage GUICtrlComboBoxEx_GetItemIndent GUICtrlComboBoxEx_GetItemOverlayImage GUICtrlComboBoxEx_GetItemParam GUICtrlComboBoxEx_GetItemSelectedImage GUICtrlComboBoxEx_GetItemText GUICtrlComboBoxEx_GetItemTextLen GUICtrlComboBoxEx_GetList GUICtrlComboBoxEx_GetListArray GUICtrlComboBoxEx_GetLocale GUICtrlComboBoxEx_GetLocaleCountry GUICtrlComboBoxEx_GetLocaleLang GUICtrlComboBoxEx_GetLocalePrimLang GUICtrlComboBoxEx_GetLocaleSubLang GUICtrlComboBoxEx_GetMinVisible GUICtrlComboBoxEx_GetTopIndex GUICtrlComboBoxEx_GetUnicode GUICtrlComboBoxEx_InitStorage GUICtrlComboBoxEx_InsertString GUICtrlComboBoxEx_LimitText GUICtrlComboBoxEx_ReplaceEditSel GUICtrlComboBoxEx_ResetContent GUICtrlComboBoxEx_SetCurSel GUICtrlComboBoxEx_SetDroppedWidth GUICtrlComboBoxEx_SetEditSel GUICtrlComboBoxEx_SetEditText GUICtrlComboBoxEx_SetExtendedStyle GUICtrlComboBoxEx_SetExtendedUI GUICtrlComboBoxEx_SetImageList GUICtrlComboBoxEx_SetItem GUICtrlComboBoxEx_SetItemEx GUICtrlComboBoxEx_SetItemHeight GUICtrlComboBoxEx_SetItemImage GUICtrlComboBoxEx_SetItemIndent GUICtrlComboBoxEx_SetItemOverlayImage GUICtrlComboBoxEx_SetItemParam GUICtrlComboBoxEx_SetItemSelectedImage GUICtrlComboBoxEx_SetMinVisible GUICtrlComboBoxEx_SetTopIndex GUICtrlComboBoxEx_SetUnicode GUICtrlComboBoxEx_ShowDropDown GUICtrlComboBox_AddDir GUICtrlComboBox_AddString GUICtrlComboBox_AutoComplete GUICtrlComboBox_BeginUpdate GUICtrlComboBox_Create GUICtrlComboBox_DeleteString GUICtrlComboBox_Destroy GUICtrlComboBox_EndUpdate GUICtrlComboBox_FindString GUICtrlComboBox_FindStringExact GUICtrlComboBox_GetComboBoxInfo GUICtrlComboBox_GetCount GUICtrlComboBox_GetCueBanner GUICtrlComboBox_GetCurSel GUICtrlComboBox_GetDroppedControlRect GUICtrlComboBox_GetDroppedControlRectEx GUICtrlComboBox_GetDroppedState GUICtrlComboBox_GetDroppedWidth GUICtrlComboBox_GetEditSel GUICtrlComboBox_GetEditText GUICtrlComboBox_GetExtendedUI GUICtrlComboBox_GetHorizontalExtent GUICtrlComboBox_GetItemHeight GUICtrlComboBox_GetLBText GUICtrlComboBox_GetLBTextLen GUICtrlComboBox_GetList GUICtrlComboBox_GetListArray GUICtrlComboBox_GetLocale GUICtrlComboBox_GetLocaleCountry GUICtrlComboBox_GetLocaleLang GUICtrlComboBox_GetLocalePrimLang GUICtrlComboBox_GetLocaleSubLang GUICtrlComboBox_GetMinVisible GUICtrlComboBox_GetTopIndex GUICtrlComboBox_InitStorage GUICtrlComboBox_InsertString GUICtrlComboBox_LimitText GUICtrlComboBox_ReplaceEditSel GUICtrlComboBox_ResetContent GUICtrlComboBox_SelectString GUICtrlComboBox_SetCueBanner GUICtrlComboBox_SetCurSel GUICtrlComboBox_SetDroppedWidth GUICtrlComboBox_SetEditSel GUICtrlComboBox_SetEditText GUICtrlComboBox_SetExtendedUI GUICtrlComboBox_SetHorizontalExtent GUICtrlComboBox_SetItemHeight GUICtrlComboBox_SetMinVisible GUICtrlComboBox_SetTopIndex GUICtrlComboBox_ShowDropDown GUICtrlDTP_Create GUICtrlDTP_Destroy GUICtrlDTP_GetMCColor GUICtrlDTP_GetMCFont GUICtrlDTP_GetMonthCal GUICtrlDTP_GetRange GUICtrlDTP_GetRangeEx GUICtrlDTP_GetSystemTime GUICtrlDTP_GetSystemTimeEx GUICtrlDTP_SetFormat GUICtrlDTP_SetMCColor GUICtrlDTP_SetMCFont GUICtrlDTP_SetRange GUICtrlDTP_SetRangeEx GUICtrlDTP_SetSystemTime GUICtrlDTP_SetSystemTimeEx GUICtrlEdit_AppendText GUICtrlEdit_BeginUpdate GUICtrlEdit_CanUndo GUICtrlEdit_CharFromPos GUICtrlEdit_Create GUICtrlEdit_Destroy GUICtrlEdit_EmptyUndoBuffer GUICtrlEdit_EndUpdate GUICtrlEdit_Find GUICtrlEdit_FmtLines GUICtrlEdit_GetCueBanner GUICtrlEdit_GetFirstVisibleLine GUICtrlEdit_GetLimitText GUICtrlEdit_GetLine GUICtrlEdit_GetLineCount GUICtrlEdit_GetMargins GUICtrlEdit_GetModify GUICtrlEdit_GetPasswordChar GUICtrlEdit_GetRECT GUICtrlEdit_GetRECTEx GUICtrlEdit_GetSel GUICtrlEdit_GetText GUICtrlEdit_GetTextLen GUICtrlEdit_HideBalloonTip GUICtrlEdit_InsertText GUICtrlEdit_LineFromChar GUICtrlEdit_LineIndex GUICtrlEdit_LineLength GUICtrlEdit_LineScroll GUICtrlEdit_PosFromChar GUICtrlEdit_ReplaceSel GUICtrlEdit_Scroll GUICtrlEdit_SetCueBanner GUICtrlEdit_SetLimitText GUICtrlEdit_SetMargins GUICtrlEdit_SetModify GUICtrlEdit_SetPasswordChar GUICtrlEdit_SetReadOnly GUICtrlEdit_SetRECT GUICtrlEdit_SetRECTEx GUICtrlEdit_SetRECTNP GUICtrlEdit_SetRectNPEx GUICtrlEdit_SetSel GUICtrlEdit_SetTabStops GUICtrlEdit_SetText GUICtrlEdit_ShowBalloonTip GUICtrlEdit_Undo GUICtrlHeader_AddItem GUICtrlHeader_ClearFilter GUICtrlHeader_ClearFilterAll GUICtrlHeader_Create GUICtrlHeader_CreateDragImage GUICtrlHeader_DeleteItem GUICtrlHeader_Destroy GUICtrlHeader_EditFilter GUICtrlHeader_GetBitmapMargin GUICtrlHeader_GetImageList GUICtrlHeader_GetItem GUICtrlHeader_GetItemAlign GUICtrlHeader_GetItemBitmap GUICtrlHeader_GetItemCount GUICtrlHeader_GetItemDisplay GUICtrlHeader_GetItemFlags GUICtrlHeader_GetItemFormat GUICtrlHeader_GetItemImage GUICtrlHeader_GetItemOrder GUICtrlHeader_GetItemParam GUICtrlHeader_GetItemRect GUICtrlHeader_GetItemRectEx GUICtrlHeader_GetItemText GUICtrlHeader_GetItemWidth GUICtrlHeader_GetOrderArray GUICtrlHeader_GetUnicodeFormat GUICtrlHeader_HitTest GUICtrlHeader_InsertItem GUICtrlHeader_Layout GUICtrlHeader_OrderToIndex GUICtrlHeader_SetBitmapMargin GUICtrlHeader_SetFilterChangeTimeout GUICtrlHeader_SetHotDivider GUICtrlHeader_SetImageList GUICtrlHeader_SetItem GUICtrlHeader_SetItemAlign GUICtrlHeader_SetItemBitmap GUICtrlHeader_SetItemDisplay GUICtrlHeader_SetItemFlags GUICtrlHeader_SetItemFormat GUICtrlHeader_SetItemImage GUICtrlHeader_SetItemOrder GUICtrlHeader_SetItemParam GUICtrlHeader_SetItemText GUICtrlHeader_SetItemWidth GUICtrlHeader_SetOrderArray GUICtrlHeader_SetUnicodeFormat GUICtrlIpAddress_ClearAddress GUICtrlIpAddress_Create GUICtrlIpAddress_Destroy GUICtrlIpAddress_Get GUICtrlIpAddress_GetArray GUICtrlIpAddress_GetEx GUICtrlIpAddress_IsBlank GUICtrlIpAddress_Set GUICtrlIpAddress_SetArray GUICtrlIpAddress_SetEx GUICtrlIpAddress_SetFocus GUICtrlIpAddress_SetFont GUICtrlIpAddress_SetRange GUICtrlIpAddress_ShowHide GUICtrlListBox_AddFile GUICtrlListBox_AddString GUICtrlListBox_BeginUpdate GUICtrlListBox_ClickItem GUICtrlListBox_Create GUICtrlListBox_DeleteString GUICtrlListBox_Destroy GUICtrlListBox_Dir GUICtrlListBox_EndUpdate GUICtrlListBox_FindInText GUICtrlListBox_FindString GUICtrlListBox_GetAnchorIndex GUICtrlListBox_GetCaretIndex GUICtrlListBox_GetCount GUICtrlListBox_GetCurSel GUICtrlListBox_GetHorizontalExtent GUICtrlListBox_GetItemData GUICtrlListBox_GetItemHeight GUICtrlListBox_GetItemRect GUICtrlListBox_GetItemRectEx GUICtrlListBox_GetListBoxInfo GUICtrlListBox_GetLocale GUICtrlListBox_GetLocaleCountry GUICtrlListBox_GetLocaleLang GUICtrlListBox_GetLocalePrimLang GUICtrlListBox_GetLocaleSubLang GUICtrlListBox_GetSel GUICtrlListBox_GetSelCount GUICtrlListBox_GetSelItems GUICtrlListBox_GetSelItemsText GUICtrlListBox_GetText GUICtrlListBox_GetTextLen GUICtrlListBox_GetTopIndex GUICtrlListBox_InitStorage GUICtrlListBox_InsertString GUICtrlListBox_ItemFromPoint GUICtrlListBox_ReplaceString GUICtrlListBox_ResetContent GUICtrlListBox_SelectString GUICtrlListBox_SelItemRange GUICtrlListBox_SelItemRangeEx GUICtrlListBox_SetAnchorIndex GUICtrlListBox_SetCaretIndex GUICtrlListBox_SetColumnWidth GUICtrlListBox_SetCurSel GUICtrlListBox_SetHorizontalExtent GUICtrlListBox_SetItemData GUICtrlListBox_SetItemHeight GUICtrlListBox_SetLocale GUICtrlListBox_SetSel GUICtrlListBox_SetTabStops GUICtrlListBox_SetTopIndex GUICtrlListBox_Sort GUICtrlListBox_SwapString GUICtrlListBox_UpdateHScroll GUICtrlListView_AddArray GUICtrlListView_AddColumn GUICtrlListView_AddItem GUICtrlListView_AddSubItem GUICtrlListView_ApproximateViewHeight GUICtrlListView_ApproximateViewRect GUICtrlListView_ApproximateViewWidth GUICtrlListView_Arrange GUICtrlListView_BeginUpdate GUICtrlListView_CancelEditLabel GUICtrlListView_ClickItem GUICtrlListView_CopyItems GUICtrlListView_Create GUICtrlListView_CreateDragImage GUICtrlListView_CreateSolidBitMap GUICtrlListView_DeleteAllItems GUICtrlListView_DeleteColumn GUICtrlListView_DeleteItem GUICtrlListView_DeleteItemsSelected GUICtrlListView_Destroy GUICtrlListView_DrawDragImage GUICtrlListView_EditLabel GUICtrlListView_EnableGroupView GUICtrlListView_EndUpdate GUICtrlListView_EnsureVisible GUICtrlListView_FindInText GUICtrlListView_FindItem GUICtrlListView_FindNearest GUICtrlListView_FindParam GUICtrlListView_FindText GUICtrlListView_GetBkColor GUICtrlListView_GetBkImage GUICtrlListView_GetCallbackMask GUICtrlListView_GetColumn GUICtrlListView_GetColumnCount GUICtrlListView_GetColumnOrder GUICtrlListView_GetColumnOrderArray GUICtrlListView_GetColumnWidth GUICtrlListView_GetCounterPage GUICtrlListView_GetEditControl GUICtrlListView_GetExtendedListViewStyle GUICtrlListView_GetFocusedGroup GUICtrlListView_GetGroupCount GUICtrlListView_GetGroupInfo GUICtrlListView_GetGroupInfoByIndex GUICtrlListView_GetGroupRect GUICtrlListView_GetGroupViewEnabled GUICtrlListView_GetHeader GUICtrlListView_GetHotCursor GUICtrlListView_GetHotItem GUICtrlListView_GetHoverTime GUICtrlListView_GetImageList GUICtrlListView_GetISearchString GUICtrlListView_GetItem GUICtrlListView_GetItemChecked GUICtrlListView_GetItemCount GUICtrlListView_GetItemCut GUICtrlListView_GetItemDropHilited GUICtrlListView_GetItemEx GUICtrlListView_GetItemFocused GUICtrlListView_GetItemGroupID GUICtrlListView_GetItemImage GUICtrlListView_GetItemIndent GUICtrlListView_GetItemParam GUICtrlListView_GetItemPosition GUICtrlListView_GetItemPositionX GUICtrlListView_GetItemPositionY GUICtrlListView_GetItemRect GUICtrlListView_GetItemRectEx GUICtrlListView_GetItemSelected GUICtrlListView_GetItemSpacing GUICtrlListView_GetItemSpacingX GUICtrlListView_GetItemSpacingY GUICtrlListView_GetItemState GUICtrlListView_GetItemStateImage GUICtrlListView_GetItemText GUICtrlListView_GetItemTextArray GUICtrlListView_GetItemTextString GUICtrlListView_GetNextItem GUICtrlListView_GetNumberOfWorkAreas GUICtrlListView_GetOrigin GUICtrlListView_GetOriginX GUICtrlListView_GetOriginY GUICtrlListView_GetOutlineColor GUICtrlListView_GetSelectedColumn GUICtrlListView_GetSelectedCount GUICtrlListView_GetSelectedIndices GUICtrlListView_GetSelectionMark GUICtrlListView_GetStringWidth GUICtrlListView_GetSubItemRect GUICtrlListView_GetTextBkColor GUICtrlListView_GetTextColor GUICtrlListView_GetToolTips GUICtrlListView_GetTopIndex GUICtrlListView_GetUnicodeFormat GUICtrlListView_GetView GUICtrlListView_GetViewDetails GUICtrlListView_GetViewLarge GUICtrlListView_GetViewList GUICtrlListView_GetViewRect GUICtrlListView_GetViewSmall GUICtrlListView_GetViewTile GUICtrlListView_HideColumn GUICtrlListView_HitTest GUICtrlListView_InsertColumn GUICtrlListView_InsertGroup GUICtrlListView_InsertItem GUICtrlListView_JustifyColumn GUICtrlListView_MapIDToIndex GUICtrlListView_MapIndexToID GUICtrlListView_RedrawItems GUICtrlListView_RegisterSortCallBack GUICtrlListView_RemoveAllGroups GUICtrlListView_RemoveGroup GUICtrlListView_Scroll GUICtrlListView_SetBkColor GUICtrlListView_SetBkImage GUICtrlListView_SetCallBackMask GUICtrlListView_SetColumn GUICtrlListView_SetColumnOrder GUICtrlListView_SetColumnOrderArray GUICtrlListView_SetColumnWidth GUICtrlListView_SetExtendedListViewStyle GUICtrlListView_SetGroupInfo GUICtrlListView_SetHotItem GUICtrlListView_SetHoverTime GUICtrlListView_SetIconSpacing GUICtrlListView_SetImageList GUICtrlListView_SetItem GUICtrlListView_SetItemChecked GUICtrlListView_SetItemCount GUICtrlListView_SetItemCut GUICtrlListView_SetItemDropHilited GUICtrlListView_SetItemEx GUICtrlListView_SetItemFocused GUICtrlListView_SetItemGroupID GUICtrlListView_SetItemImage GUICtrlListView_SetItemIndent GUICtrlListView_SetItemParam GUICtrlListView_SetItemPosition GUICtrlListView_SetItemPosition32 GUICtrlListView_SetItemSelected GUICtrlListView_SetItemState GUICtrlListView_SetItemStateImage GUICtrlListView_SetItemText GUICtrlListView_SetOutlineColor GUICtrlListView_SetSelectedColumn GUICtrlListView_SetSelectionMark GUICtrlListView_SetTextBkColor GUICtrlListView_SetTextColor GUICtrlListView_SetToolTips GUICtrlListView_SetUnicodeFormat GUICtrlListView_SetView GUICtrlListView_SetWorkAreas GUICtrlListView_SimpleSort GUICtrlListView_SortItems GUICtrlListView_SubItemHitTest GUICtrlListView_UnRegisterSortCallBack GUICtrlMenu_AddMenuItem GUICtrlMenu_AppendMenu GUICtrlMenu_CalculatePopupWindowPosition GUICtrlMenu_CheckMenuItem GUICtrlMenu_CheckRadioItem GUICtrlMenu_CreateMenu GUICtrlMenu_CreatePopup GUICtrlMenu_DeleteMenu GUICtrlMenu_DestroyMenu GUICtrlMenu_DrawMenuBar GUICtrlMenu_EnableMenuItem GUICtrlMenu_FindItem GUICtrlMenu_FindParent GUICtrlMenu_GetItemBmp GUICtrlMenu_GetItemBmpChecked GUICtrlMenu_GetItemBmpUnchecked GUICtrlMenu_GetItemChecked GUICtrlMenu_GetItemCount GUICtrlMenu_GetItemData GUICtrlMenu_GetItemDefault GUICtrlMenu_GetItemDisabled GUICtrlMenu_GetItemEnabled GUICtrlMenu_GetItemGrayed GUICtrlMenu_GetItemHighlighted GUICtrlMenu_GetItemID GUICtrlMenu_GetItemInfo GUICtrlMenu_GetItemRect GUICtrlMenu_GetItemRectEx GUICtrlMenu_GetItemState GUICtrlMenu_GetItemStateEx GUICtrlMenu_GetItemSubMenu GUICtrlMenu_GetItemText GUICtrlMenu_GetItemType GUICtrlMenu_GetMenu GUICtrlMenu_GetMenuBackground GUICtrlMenu_GetMenuBarInfo GUICtrlMenu_GetMenuContextHelpID GUICtrlMenu_GetMenuData GUICtrlMenu_GetMenuDefaultItem GUICtrlMenu_GetMenuHeight GUICtrlMenu_GetMenuInfo GUICtrlMenu_GetMenuStyle GUICtrlMenu_GetSystemMenu GUICtrlMenu_InsertMenuItem GUICtrlMenu_InsertMenuItemEx GUICtrlMenu_IsMenu GUICtrlMenu_LoadMenu GUICtrlMenu_MapAccelerator GUICtrlMenu_MenuItemFromPoint GUICtrlMenu_RemoveMenu GUICtrlMenu_SetItemBitmaps GUICtrlMenu_SetItemBmp GUICtrlMenu_SetItemBmpChecked GUICtrlMenu_SetItemBmpUnchecked GUICtrlMenu_SetItemChecked GUICtrlMenu_SetItemData GUICtrlMenu_SetItemDefault GUICtrlMenu_SetItemDisabled GUICtrlMenu_SetItemEnabled GUICtrlMenu_SetItemGrayed GUICtrlMenu_SetItemHighlighted GUICtrlMenu_SetItemID GUICtrlMenu_SetItemInfo GUICtrlMenu_SetItemState GUICtrlMenu_SetItemSubMenu GUICtrlMenu_SetItemText GUICtrlMenu_SetItemType GUICtrlMenu_SetMenu GUICtrlMenu_SetMenuBackground GUICtrlMenu_SetMenuContextHelpID GUICtrlMenu_SetMenuData GUICtrlMenu_SetMenuDefaultItem GUICtrlMenu_SetMenuHeight GUICtrlMenu_SetMenuInfo GUICtrlMenu_SetMenuStyle GUICtrlMenu_TrackPopupMenu GUICtrlMonthCal_Create GUICtrlMonthCal_Destroy GUICtrlMonthCal_GetCalendarBorder GUICtrlMonthCal_GetCalendarCount GUICtrlMonthCal_GetColor GUICtrlMonthCal_GetColorArray GUICtrlMonthCal_GetCurSel GUICtrlMonthCal_GetCurSelStr GUICtrlMonthCal_GetFirstDOW GUICtrlMonthCal_GetFirstDOWStr GUICtrlMonthCal_GetMaxSelCount GUICtrlMonthCal_GetMaxTodayWidth GUICtrlMonthCal_GetMinReqHeight GUICtrlMonthCal_GetMinReqRect GUICtrlMonthCal_GetMinReqRectArray GUICtrlMonthCal_GetMinReqWidth GUICtrlMonthCal_GetMonthDelta GUICtrlMonthCal_GetMonthRange GUICtrlMonthCal_GetMonthRangeMax GUICtrlMonthCal_GetMonthRangeMaxStr GUICtrlMonthCal_GetMonthRangeMin GUICtrlMonthCal_GetMonthRangeMinStr GUICtrlMonthCal_GetMonthRangeSpan GUICtrlMonthCal_GetRange GUICtrlMonthCal_GetRangeMax GUICtrlMonthCal_GetRangeMaxStr GUICtrlMonthCal_GetRangeMin GUICtrlMonthCal_GetRangeMinStr GUICtrlMonthCal_GetSelRange GUICtrlMonthCal_GetSelRangeMax GUICtrlMonthCal_GetSelRangeMaxStr GUICtrlMonthCal_GetSelRangeMin GUICtrlMonthCal_GetSelRangeMinStr GUICtrlMonthCal_GetToday GUICtrlMonthCal_GetTodayStr GUICtrlMonthCal_GetUnicodeFormat GUICtrlMonthCal_HitTest GUICtrlMonthCal_SetCalendarBorder GUICtrlMonthCal_SetColor GUICtrlMonthCal_SetCurSel GUICtrlMonthCal_SetDayState GUICtrlMonthCal_SetFirstDOW GUICtrlMonthCal_SetMaxSelCount GUICtrlMonthCal_SetMonthDelta GUICtrlMonthCal_SetRange GUICtrlMonthCal_SetSelRange GUICtrlMonthCal_SetToday GUICtrlMonthCal_SetUnicodeFormat GUICtrlRebar_AddBand GUICtrlRebar_AddToolBarBand GUICtrlRebar_BeginDrag GUICtrlRebar_Create GUICtrlRebar_DeleteBand GUICtrlRebar_Destroy GUICtrlRebar_DragMove GUICtrlRebar_EndDrag GUICtrlRebar_GetBandBackColor GUICtrlRebar_GetBandBorders GUICtrlRebar_GetBandBordersEx GUICtrlRebar_GetBandChildHandle GUICtrlRebar_GetBandChildSize GUICtrlRebar_GetBandCount GUICtrlRebar_GetBandForeColor GUICtrlRebar_GetBandHeaderSize GUICtrlRebar_GetBandID GUICtrlRebar_GetBandIdealSize GUICtrlRebar_GetBandLength GUICtrlRebar_GetBandLParam GUICtrlRebar_GetBandMargins GUICtrlRebar_GetBandMarginsEx GUICtrlRebar_GetBandRect GUICtrlRebar_GetBandRectEx GUICtrlRebar_GetBandStyle GUICtrlRebar_GetBandStyleBreak GUICtrlRebar_GetBandStyleChildEdge GUICtrlRebar_GetBandStyleFixedBMP GUICtrlRebar_GetBandStyleFixedSize GUICtrlRebar_GetBandStyleGripperAlways GUICtrlRebar_GetBandStyleHidden GUICtrlRebar_GetBandStyleHideTitle GUICtrlRebar_GetBandStyleNoGripper GUICtrlRebar_GetBandStyleTopAlign GUICtrlRebar_GetBandStyleUseChevron GUICtrlRebar_GetBandStyleVariableHeight GUICtrlRebar_GetBandText GUICtrlRebar_GetBarHeight GUICtrlRebar_GetBarInfo GUICtrlRebar_GetBKColor GUICtrlRebar_GetColorScheme GUICtrlRebar_GetRowCount GUICtrlRebar_GetRowHeight GUICtrlRebar_GetTextColor GUICtrlRebar_GetToolTips GUICtrlRebar_GetUnicodeFormat GUICtrlRebar_HitTest GUICtrlRebar_IDToIndex GUICtrlRebar_MaximizeBand GUICtrlRebar_MinimizeBand GUICtrlRebar_MoveBand GUICtrlRebar_SetBandBackColor GUICtrlRebar_SetBandForeColor GUICtrlRebar_SetBandHeaderSize GUICtrlRebar_SetBandID GUICtrlRebar_SetBandIdealSize GUICtrlRebar_SetBandLength GUICtrlRebar_SetBandLParam GUICtrlRebar_SetBandStyle GUICtrlRebar_SetBandStyleBreak GUICtrlRebar_SetBandStyleChildEdge GUICtrlRebar_SetBandStyleFixedBMP GUICtrlRebar_SetBandStyleFixedSize GUICtrlRebar_SetBandStyleGripperAlways GUICtrlRebar_SetBandStyleHidden GUICtrlRebar_SetBandStyleHideTitle GUICtrlRebar_SetBandStyleNoGripper GUICtrlRebar_SetBandStyleTopAlign GUICtrlRebar_SetBandStyleUseChevron GUICtrlRebar_SetBandStyleVariableHeight GUICtrlRebar_SetBandText GUICtrlRebar_SetBarInfo GUICtrlRebar_SetBKColor GUICtrlRebar_SetColorScheme GUICtrlRebar_SetTextColor GUICtrlRebar_SetToolTips GUICtrlRebar_SetUnicodeFormat GUICtrlRebar_ShowBand GUICtrlRichEdit_AppendText GUICtrlRichEdit_AutoDetectURL GUICtrlRichEdit_CanPaste GUICtrlRichEdit_CanPasteSpecial GUICtrlRichEdit_CanRedo GUICtrlRichEdit_CanUndo GUICtrlRichEdit_ChangeFontSize GUICtrlRichEdit_Copy GUICtrlRichEdit_Create GUICtrlRichEdit_Cut GUICtrlRichEdit_Deselect GUICtrlRichEdit_Destroy GUICtrlRichEdit_EmptyUndoBuffer GUICtrlRichEdit_FindText GUICtrlRichEdit_FindTextInRange GUICtrlRichEdit_GetBkColor GUICtrlRichEdit_GetCharAttributes GUICtrlRichEdit_GetCharBkColor GUICtrlRichEdit_GetCharColor GUICtrlRichEdit_GetCharPosFromXY GUICtrlRichEdit_GetCharPosOfNextWord GUICtrlRichEdit_GetCharPosOfPreviousWord GUICtrlRichEdit_GetCharWordBreakInfo GUICtrlRichEdit_GetFirstCharPosOnLine GUICtrlRichEdit_GetFont GUICtrlRichEdit_GetLineCount GUICtrlRichEdit_GetLineLength GUICtrlRichEdit_GetLineNumberFromCharPos GUICtrlRichEdit_GetNextRedo GUICtrlRichEdit_GetNextUndo GUICtrlRichEdit_GetNumberOfFirstVisibleLine GUICtrlRichEdit_GetParaAlignment GUICtrlRichEdit_GetParaAttributes GUICtrlRichEdit_GetParaBorder GUICtrlRichEdit_GetParaIndents GUICtrlRichEdit_GetParaNumbering GUICtrlRichEdit_GetParaShading GUICtrlRichEdit_GetParaSpacing GUICtrlRichEdit_GetParaTabStops GUICtrlRichEdit_GetPasswordChar GUICtrlRichEdit_GetRECT GUICtrlRichEdit_GetScrollPos GUICtrlRichEdit_GetSel GUICtrlRichEdit_GetSelAA GUICtrlRichEdit_GetSelText GUICtrlRichEdit_GetSpaceUnit GUICtrlRichEdit_GetText GUICtrlRichEdit_GetTextInLine GUICtrlRichEdit_GetTextInRange GUICtrlRichEdit_GetTextLength GUICtrlRichEdit_GetVersion GUICtrlRichEdit_GetXYFromCharPos GUICtrlRichEdit_GetZoom GUICtrlRichEdit_GotoCharPos GUICtrlRichEdit_HideSelection GUICtrlRichEdit_InsertText GUICtrlRichEdit_IsModified GUICtrlRichEdit_IsTextSelected GUICtrlRichEdit_Paste GUICtrlRichEdit_PasteSpecial GUICtrlRichEdit_PauseRedraw GUICtrlRichEdit_Redo GUICtrlRichEdit_ReplaceText GUICtrlRichEdit_ResumeRedraw GUICtrlRichEdit_ScrollLineOrPage GUICtrlRichEdit_ScrollLines GUICtrlRichEdit_ScrollToCaret GUICtrlRichEdit_SetBkColor GUICtrlRichEdit_SetCharAttributes GUICtrlRichEdit_SetCharBkColor GUICtrlRichEdit_SetCharColor GUICtrlRichEdit_SetEventMask GUICtrlRichEdit_SetFont GUICtrlRichEdit_SetLimitOnText GUICtrlRichEdit_SetModified GUICtrlRichEdit_SetParaAlignment GUICtrlRichEdit_SetParaAttributes GUICtrlRichEdit_SetParaBorder GUICtrlRichEdit_SetParaIndents GUICtrlRichEdit_SetParaNumbering GUICtrlRichEdit_SetParaShading GUICtrlRichEdit_SetParaSpacing GUICtrlRichEdit_SetParaTabStops GUICtrlRichEdit_SetPasswordChar GUICtrlRichEdit_SetReadOnly GUICtrlRichEdit_SetRECT GUICtrlRichEdit_SetScrollPos GUICtrlRichEdit_SetSel GUICtrlRichEdit_SetSpaceUnit GUICtrlRichEdit_SetTabStops GUICtrlRichEdit_SetText GUICtrlRichEdit_SetUndoLimit GUICtrlRichEdit_SetZoom GUICtrlRichEdit_StreamFromFile GUICtrlRichEdit_StreamFromVar GUICtrlRichEdit_StreamToFile GUICtrlRichEdit_StreamToVar GUICtrlRichEdit_Undo GUICtrlSlider_ClearSel GUICtrlSlider_ClearTics GUICtrlSlider_Create GUICtrlSlider_Destroy GUICtrlSlider_GetBuddy GUICtrlSlider_GetChannelRect GUICtrlSlider_GetChannelRectEx GUICtrlSlider_GetLineSize GUICtrlSlider_GetLogicalTics GUICtrlSlider_GetNumTics GUICtrlSlider_GetPageSize GUICtrlSlider_GetPos GUICtrlSlider_GetRange GUICtrlSlider_GetRangeMax GUICtrlSlider_GetRangeMin GUICtrlSlider_GetSel GUICtrlSlider_GetSelEnd GUICtrlSlider_GetSelStart GUICtrlSlider_GetThumbLength GUICtrlSlider_GetThumbRect GUICtrlSlider_GetThumbRectEx GUICtrlSlider_GetTic GUICtrlSlider_GetTicPos GUICtrlSlider_GetToolTips GUICtrlSlider_GetUnicodeFormat GUICtrlSlider_SetBuddy GUICtrlSlider_SetLineSize GUICtrlSlider_SetPageSize GUICtrlSlider_SetPos GUICtrlSlider_SetRange GUICtrlSlider_SetRangeMax GUICtrlSlider_SetRangeMin GUICtrlSlider_SetSel GUICtrlSlider_SetSelEnd GUICtrlSlider_SetSelStart GUICtrlSlider_SetThumbLength GUICtrlSlider_SetTic GUICtrlSlider_SetTicFreq GUICtrlSlider_SetTipSide GUICtrlSlider_SetToolTips GUICtrlSlider_SetUnicodeFormat GUICtrlStatusBar_Create GUICtrlStatusBar_Destroy GUICtrlStatusBar_EmbedControl GUICtrlStatusBar_GetBorders GUICtrlStatusBar_GetBordersHorz GUICtrlStatusBar_GetBordersRect GUICtrlStatusBar_GetBordersVert GUICtrlStatusBar_GetCount GUICtrlStatusBar_GetHeight GUICtrlStatusBar_GetIcon GUICtrlStatusBar_GetParts GUICtrlStatusBar_GetRect GUICtrlStatusBar_GetRectEx GUICtrlStatusBar_GetText GUICtrlStatusBar_GetTextFlags GUICtrlStatusBar_GetTextLength GUICtrlStatusBar_GetTextLengthEx GUICtrlStatusBar_GetTipText GUICtrlStatusBar_GetUnicodeFormat GUICtrlStatusBar_GetWidth GUICtrlStatusBar_IsSimple GUICtrlStatusBar_Resize GUICtrlStatusBar_SetBkColor GUICtrlStatusBar_SetIcon GUICtrlStatusBar_SetMinHeight GUICtrlStatusBar_SetParts GUICtrlStatusBar_SetSimple GUICtrlStatusBar_SetText GUICtrlStatusBar_SetTipText GUICtrlStatusBar_SetUnicodeFormat GUICtrlStatusBar_ShowHide GUICtrlTab_ActivateTab GUICtrlTab_ClickTab GUICtrlTab_Create GUICtrlTab_DeleteAllItems GUICtrlTab_DeleteItem GUICtrlTab_DeselectAll GUICtrlTab_Destroy GUICtrlTab_FindTab GUICtrlTab_GetCurFocus GUICtrlTab_GetCurSel GUICtrlTab_GetDisplayRect GUICtrlTab_GetDisplayRectEx GUICtrlTab_GetExtendedStyle GUICtrlTab_GetImageList GUICtrlTab_GetItem GUICtrlTab_GetItemCount GUICtrlTab_GetItemImage GUICtrlTab_GetItemParam GUICtrlTab_GetItemRect GUICtrlTab_GetItemRectEx GUICtrlTab_GetItemState GUICtrlTab_GetItemText GUICtrlTab_GetRowCount GUICtrlTab_GetToolTips GUICtrlTab_GetUnicodeFormat GUICtrlTab_HighlightItem GUICtrlTab_HitTest GUICtrlTab_InsertItem GUICtrlTab_RemoveImage GUICtrlTab_SetCurFocus GUICtrlTab_SetCurSel GUICtrlTab_SetExtendedStyle GUICtrlTab_SetImageList GUICtrlTab_SetItem GUICtrlTab_SetItemImage GUICtrlTab_SetItemParam GUICtrlTab_SetItemSize GUICtrlTab_SetItemState GUICtrlTab_SetItemText GUICtrlTab_SetMinTabWidth GUICtrlTab_SetPadding GUICtrlTab_SetToolTips GUICtrlTab_SetUnicodeFormat GUICtrlToolbar_AddBitmap GUICtrlToolbar_AddButton GUICtrlToolbar_AddButtonSep GUICtrlToolbar_AddString GUICtrlToolbar_ButtonCount GUICtrlToolbar_CheckButton GUICtrlToolbar_ClickAccel GUICtrlToolbar_ClickButton GUICtrlToolbar_ClickIndex GUICtrlToolbar_CommandToIndex GUICtrlToolbar_Create GUICtrlToolbar_Customize GUICtrlToolbar_DeleteButton GUICtrlToolbar_Destroy GUICtrlToolbar_EnableButton GUICtrlToolbar_FindToolbar GUICtrlToolbar_GetAnchorHighlight GUICtrlToolbar_GetBitmapFlags GUICtrlToolbar_GetButtonBitmap GUICtrlToolbar_GetButtonInfo GUICtrlToolbar_GetButtonInfoEx GUICtrlToolbar_GetButtonParam GUICtrlToolbar_GetButtonRect GUICtrlToolbar_GetButtonRectEx GUICtrlToolbar_GetButtonSize GUICtrlToolbar_GetButtonState GUICtrlToolbar_GetButtonStyle GUICtrlToolbar_GetButtonText GUICtrlToolbar_GetColorScheme GUICtrlToolbar_GetDisabledImageList GUICtrlToolbar_GetExtendedStyle GUICtrlToolbar_GetHotImageList GUICtrlToolbar_GetHotItem GUICtrlToolbar_GetImageList GUICtrlToolbar_GetInsertMark GUICtrlToolbar_GetInsertMarkColor GUICtrlToolbar_GetMaxSize GUICtrlToolbar_GetMetrics GUICtrlToolbar_GetPadding GUICtrlToolbar_GetRows GUICtrlToolbar_GetString GUICtrlToolbar_GetStyle GUICtrlToolbar_GetStyleAltDrag GUICtrlToolbar_GetStyleCustomErase GUICtrlToolbar_GetStyleFlat GUICtrlToolbar_GetStyleList GUICtrlToolbar_GetStyleRegisterDrop GUICtrlToolbar_GetStyleToolTips GUICtrlToolbar_GetStyleTransparent GUICtrlToolbar_GetStyleWrapable GUICtrlToolbar_GetTextRows GUICtrlToolbar_GetToolTips GUICtrlToolbar_GetUnicodeFormat GUICtrlToolbar_HideButton GUICtrlToolbar_HighlightButton GUICtrlToolbar_HitTest GUICtrlToolbar_IndexToCommand GUICtrlToolbar_InsertButton GUICtrlToolbar_InsertMarkHitTest GUICtrlToolbar_IsButtonChecked GUICtrlToolbar_IsButtonEnabled GUICtrlToolbar_IsButtonHidden GUICtrlToolbar_IsButtonHighlighted GUICtrlToolbar_IsButtonIndeterminate GUICtrlToolbar_IsButtonPressed GUICtrlToolbar_LoadBitmap GUICtrlToolbar_LoadImages GUICtrlToolbar_MapAccelerator GUICtrlToolbar_MoveButton GUICtrlToolbar_PressButton GUICtrlToolbar_SetAnchorHighlight GUICtrlToolbar_SetBitmapSize GUICtrlToolbar_SetButtonBitMap GUICtrlToolbar_SetButtonInfo GUICtrlToolbar_SetButtonInfoEx GUICtrlToolbar_SetButtonParam GUICtrlToolbar_SetButtonSize GUICtrlToolbar_SetButtonState GUICtrlToolbar_SetButtonStyle GUICtrlToolbar_SetButtonText GUICtrlToolbar_SetButtonWidth GUICtrlToolbar_SetCmdID GUICtrlToolbar_SetColorScheme GUICtrlToolbar_SetDisabledImageList GUICtrlToolbar_SetDrawTextFlags GUICtrlToolbar_SetExtendedStyle GUICtrlToolbar_SetHotImageList GUICtrlToolbar_SetHotItem GUICtrlToolbar_SetImageList GUICtrlToolbar_SetIndent GUICtrlToolbar_SetIndeterminate GUICtrlToolbar_SetInsertMark GUICtrlToolbar_SetInsertMarkColor GUICtrlToolbar_SetMaxTextRows GUICtrlToolbar_SetMetrics GUICtrlToolbar_SetPadding GUICtrlToolbar_SetParent GUICtrlToolbar_SetRows GUICtrlToolbar_SetStyle GUICtrlToolbar_SetStyleAltDrag GUICtrlToolbar_SetStyleCustomErase GUICtrlToolbar_SetStyleFlat GUICtrlToolbar_SetStyleList GUICtrlToolbar_SetStyleRegisterDrop GUICtrlToolbar_SetStyleToolTips GUICtrlToolbar_SetStyleTransparent GUICtrlToolbar_SetStyleWrapable GUICtrlToolbar_SetToolTips GUICtrlToolbar_SetUnicodeFormat GUICtrlToolbar_SetWindowTheme GUICtrlTreeView_Add GUICtrlTreeView_AddChild GUICtrlTreeView_AddChildFirst GUICtrlTreeView_AddFirst GUICtrlTreeView_BeginUpdate GUICtrlTreeView_ClickItem GUICtrlTreeView_Create GUICtrlTreeView_CreateDragImage GUICtrlTreeView_CreateSolidBitMap GUICtrlTreeView_Delete GUICtrlTreeView_DeleteAll GUICtrlTreeView_DeleteChildren GUICtrlTreeView_Destroy GUICtrlTreeView_DisplayRect GUICtrlTreeView_DisplayRectEx GUICtrlTreeView_EditText GUICtrlTreeView_EndEdit GUICtrlTreeView_EndUpdate GUICtrlTreeView_EnsureVisible GUICtrlTreeView_Expand GUICtrlTreeView_ExpandedOnce GUICtrlTreeView_FindItem GUICtrlTreeView_FindItemEx GUICtrlTreeView_GetBkColor GUICtrlTreeView_GetBold GUICtrlTreeView_GetChecked GUICtrlTreeView_GetChildCount GUICtrlTreeView_GetChildren GUICtrlTreeView_GetCount GUICtrlTreeView_GetCut GUICtrlTreeView_GetDropTarget GUICtrlTreeView_GetEditControl GUICtrlTreeView_GetExpanded GUICtrlTreeView_GetFirstChild GUICtrlTreeView_GetFirstItem GUICtrlTreeView_GetFirstVisible GUICtrlTreeView_GetFocused GUICtrlTreeView_GetHeight GUICtrlTreeView_GetImageIndex GUICtrlTreeView_GetImageListIconHandle GUICtrlTreeView_GetIndent GUICtrlTreeView_GetInsertMarkColor GUICtrlTreeView_GetISearchString GUICtrlTreeView_GetItemByIndex GUICtrlTreeView_GetItemHandle GUICtrlTreeView_GetItemParam GUICtrlTreeView_GetLastChild GUICtrlTreeView_GetLineColor GUICtrlTreeView_GetNext GUICtrlTreeView_GetNextChild GUICtrlTreeView_GetNextSibling GUICtrlTreeView_GetNextVisible GUICtrlTreeView_GetNormalImageList GUICtrlTreeView_GetParentHandle GUICtrlTreeView_GetParentParam GUICtrlTreeView_GetPrev GUICtrlTreeView_GetPrevChild GUICtrlTreeView_GetPrevSibling GUICtrlTreeView_GetPrevVisible GUICtrlTreeView_GetScrollTime GUICtrlTreeView_GetSelected GUICtrlTreeView_GetSelectedImageIndex GUICtrlTreeView_GetSelection GUICtrlTreeView_GetSiblingCount GUICtrlTreeView_GetState GUICtrlTreeView_GetStateImageIndex GUICtrlTreeView_GetStateImageList GUICtrlTreeView_GetText GUICtrlTreeView_GetTextColor GUICtrlTreeView_GetToolTips GUICtrlTreeView_GetTree GUICtrlTreeView_GetUnicodeFormat GUICtrlTreeView_GetVisible GUICtrlTreeView_GetVisibleCount GUICtrlTreeView_HitTest GUICtrlTreeView_HitTestEx GUICtrlTreeView_HitTestItem GUICtrlTreeView_Index GUICtrlTreeView_InsertItem GUICtrlTreeView_IsFirstItem GUICtrlTreeView_IsParent GUICtrlTreeView_Level GUICtrlTreeView_SelectItem GUICtrlTreeView_SelectItemByIndex GUICtrlTreeView_SetBkColor GUICtrlTreeView_SetBold GUICtrlTreeView_SetChecked GUICtrlTreeView_SetCheckedByIndex GUICtrlTreeView_SetChildren GUICtrlTreeView_SetCut GUICtrlTreeView_SetDropTarget GUICtrlTreeView_SetFocused GUICtrlTreeView_SetHeight GUICtrlTreeView_SetIcon GUICtrlTreeView_SetImageIndex GUICtrlTreeView_SetIndent GUICtrlTreeView_SetInsertMark GUICtrlTreeView_SetInsertMarkColor GUICtrlTreeView_SetItemHeight GUICtrlTreeView_SetItemParam GUICtrlTreeView_SetLineColor GUICtrlTreeView_SetNormalImageList GUICtrlTreeView_SetScrollTime GUICtrlTreeView_SetSelected GUICtrlTreeView_SetSelectedImageIndex GUICtrlTreeView_SetState GUICtrlTreeView_SetStateImageIndex GUICtrlTreeView_SetStateImageList GUICtrlTreeView_SetText GUICtrlTreeView_SetTextColor GUICtrlTreeView_SetToolTips GUICtrlTreeView_SetUnicodeFormat GUICtrlTreeView_Sort GUIImageList_Add GUIImageList_AddBitmap GUIImageList_AddIcon GUIImageList_AddMasked GUIImageList_BeginDrag GUIImageList_Copy GUIImageList_Create GUIImageList_Destroy GUIImageList_DestroyIcon GUIImageList_DragEnter GUIImageList_DragLeave GUIImageList_DragMove GUIImageList_Draw GUIImageList_DrawEx GUIImageList_Duplicate GUIImageList_EndDrag GUIImageList_GetBkColor GUIImageList_GetIcon GUIImageList_GetIconHeight GUIImageList_GetIconSize GUIImageList_GetIconSizeEx GUIImageList_GetIconWidth GUIImageList_GetImageCount GUIImageList_GetImageInfoEx GUIImageList_Remove GUIImageList_ReplaceIcon GUIImageList_SetBkColor GUIImageList_SetIconSize GUIImageList_SetImageCount GUIImageList_Swap GUIScrollBars_EnableScrollBar GUIScrollBars_GetScrollBarInfoEx GUIScrollBars_GetScrollBarRect GUIScrollBars_GetScrollBarRGState GUIScrollBars_GetScrollBarXYLineButton GUIScrollBars_GetScrollBarXYThumbBottom GUIScrollBars_GetScrollBarXYThumbTop GUIScrollBars_GetScrollInfo GUIScrollBars_GetScrollInfoEx GUIScrollBars_GetScrollInfoMax GUIScrollBars_GetScrollInfoMin GUIScrollBars_GetScrollInfoPage GUIScrollBars_GetScrollInfoPos GUIScrollBars_GetScrollInfoTrackPos GUIScrollBars_GetScrollPos GUIScrollBars_GetScrollRange GUIScrollBars_Init GUIScrollBars_ScrollWindow GUIScrollBars_SetScrollInfo GUIScrollBars_SetScrollInfoMax GUIScrollBars_SetScrollInfoMin GUIScrollBars_SetScrollInfoPage GUIScrollBars_SetScrollInfoPos GUIScrollBars_SetScrollRange GUIScrollBars_ShowScrollBar GUIToolTip_Activate GUIToolTip_AddTool GUIToolTip_AdjustRect GUIToolTip_BitsToTTF GUIToolTip_Create GUIToolTip_Deactivate GUIToolTip_DelTool GUIToolTip_Destroy GUIToolTip_EnumTools GUIToolTip_GetBubbleHeight GUIToolTip_GetBubbleSize GUIToolTip_GetBubbleWidth GUIToolTip_GetCurrentTool GUIToolTip_GetDelayTime GUIToolTip_GetMargin GUIToolTip_GetMarginEx GUIToolTip_GetMaxTipWidth GUIToolTip_GetText GUIToolTip_GetTipBkColor GUIToolTip_GetTipTextColor GUIToolTip_GetTitleBitMap GUIToolTip_GetTitleText GUIToolTip_GetToolCount GUIToolTip_GetToolInfo GUIToolTip_HitTest GUIToolTip_NewToolRect GUIToolTip_Pop GUIToolTip_PopUp GUIToolTip_SetDelayTime GUIToolTip_SetMargin GUIToolTip_SetMaxTipWidth GUIToolTip_SetTipBkColor GUIToolTip_SetTipTextColor GUIToolTip_SetTitle GUIToolTip_SetToolInfo GUIToolTip_SetWindowTheme GUIToolTip_ToolExists GUIToolTip_ToolToArray GUIToolTip_TrackActivate GUIToolTip_TrackPosition GUIToolTip_Update GUIToolTip_UpdateTipText HexToString IEAction IEAttach IEBodyReadHTML IEBodyReadText IEBodyWriteHTML IECreate IECreateEmbedded IEDocGetObj IEDocInsertHTML IEDocInsertText IEDocReadHTML IEDocWriteHTML IEErrorNotify IEFormElementCheckBoxSelect IEFormElementGetCollection IEFormElementGetObjByName IEFormElementGetValue IEFormElementOptionSelect IEFormElementRadioSelect IEFormElementSetValue IEFormGetCollection IEFormGetObjByName IEFormImageClick IEFormReset IEFormSubmit IEFrameGetCollection IEFrameGetObjByName IEGetObjById IEGetObjByName IEHeadInsertEventScript IEImgClick IEImgGetCollection IEIsFrameSet IELinkClickByIndex IELinkClickByText IELinkGetCollection IELoadWait IELoadWaitTimeout IENavigate IEPropertyGet IEPropertySet IEQuit IETableGetCollection IETableWriteToArray IETagNameAllGetCollection IETagNameGetCollection IE_Example IE_Introduction IE_VersionInfo INetExplorerCapable INetGetSource INetMail INetSmtpMail IsPressed MathCheckDiv Max MemGlobalAlloc MemGlobalFree MemGlobalLock MemGlobalSize MemGlobalUnlock MemMoveMemory MemVirtualAlloc MemVirtualAllocEx MemVirtualFree MemVirtualFreeEx Min MouseTrap NamedPipes_CallNamedPipe NamedPipes_ConnectNamedPipe NamedPipes_CreateNamedPipe NamedPipes_CreatePipe NamedPipes_DisconnectNamedPipe NamedPipes_GetNamedPipeHandleState NamedPipes_GetNamedPipeInfo NamedPipes_PeekNamedPipe NamedPipes_SetNamedPipeHandleState NamedPipes_TransactNamedPipe NamedPipes_WaitNamedPipe Net_Share_ConnectionEnum Net_Share_FileClose Net_Share_FileEnum Net_Share_FileGetInfo Net_Share_PermStr Net_Share_ResourceStr Net_Share_SessionDel Net_Share_SessionEnum Net_Share_SessionGetInfo Net_Share_ShareAdd Net_Share_ShareCheck Net_Share_ShareDel Net_Share_ShareEnum Net_Share_ShareGetInfo Net_Share_ShareSetInfo Net_Share_StatisticsGetSvr Net_Share_StatisticsGetWrk Now NowCalc NowCalcDate NowDate NowTime PathFull PathGetRelative PathMake PathSplit ProcessGetName ProcessGetPriority Radian ReplaceStringInFile RunDos ScreenCapture_Capture ScreenCapture_CaptureWnd ScreenCapture_SaveImage ScreenCapture_SetBMPFormat ScreenCapture_SetJPGQuality ScreenCapture_SetTIFColorDepth ScreenCapture_SetTIFCompression Security__AdjustTokenPrivileges Security__CreateProcessWithToken Security__DuplicateTokenEx Security__GetAccountSid Security__GetLengthSid Security__GetTokenInformation Security__ImpersonateSelf Security__IsValidSid Security__LookupAccountName Security__LookupAccountSid Security__LookupPrivilegeValue Security__OpenProcessToken Security__OpenThreadToken Security__OpenThreadTokenEx Security__SetPrivilege Security__SetTokenInformation Security__SidToStringSid Security__SidTypeStr Security__StringSidToSid SendMessage SendMessageA SetDate SetTime Singleton SoundClose SoundLength SoundOpen SoundPause SoundPlay SoundPos SoundResume SoundSeek SoundStatus SoundStop SQLite_Changes SQLite_Close SQLite_Display2DResult SQLite_Encode SQLite_ErrCode SQLite_ErrMsg SQLite_Escape SQLite_Exec SQLite_FastEncode SQLite_FastEscape SQLite_FetchData SQLite_FetchNames SQLite_GetTable SQLite_GetTable2d SQLite_LastInsertRowID SQLite_LibVersion SQLite_Open SQLite_Query SQLite_QueryFinalize SQLite_QueryReset SQLite_QuerySingleRow SQLite_SafeMode SQLite_SetTimeout SQLite_Shutdown SQLite_SQLiteExe SQLite_Startup SQLite_TotalChanges StringBetween StringExplode StringInsert StringProper StringRepeat StringTitleCase StringToHex TCPIpToName TempFile TicksToTime Timer_Diff Timer_GetIdleTime Timer_GetTimerID Timer_Init Timer_KillAllTimers Timer_KillTimer Timer_SetTimer TimeToTicks VersionCompare viClose viExecCommand viFindGpib viGpibBusReset viGTL viInteractiveControl viOpen viSetAttribute viSetTimeout WeekNumberISO WinAPI_AbortPath WinAPI_ActivateKeyboardLayout WinAPI_AddClipboardFormatListener WinAPI_AddFontMemResourceEx WinAPI_AddFontResourceEx WinAPI_AddIconOverlay WinAPI_AddIconTransparency WinAPI_AddMRUString WinAPI_AdjustBitmap WinAPI_AdjustTokenPrivileges WinAPI_AdjustWindowRectEx WinAPI_AlphaBlend WinAPI_AngleArc WinAPI_AnimateWindow WinAPI_Arc WinAPI_ArcTo WinAPI_ArrayToStruct WinAPI_AssignProcessToJobObject WinAPI_AssocGetPerceivedType WinAPI_AssocQueryString WinAPI_AttachConsole WinAPI_AttachThreadInput WinAPI_BackupRead WinAPI_BackupReadAbort WinAPI_BackupSeek WinAPI_BackupWrite WinAPI_BackupWriteAbort WinAPI_Beep WinAPI_BeginBufferedPaint WinAPI_BeginDeferWindowPos WinAPI_BeginPaint WinAPI_BeginPath WinAPI_BeginUpdateResource WinAPI_BitBlt WinAPI_BringWindowToTop WinAPI_BroadcastSystemMessage WinAPI_BrowseForFolderDlg WinAPI_BufferedPaintClear WinAPI_BufferedPaintInit WinAPI_BufferedPaintSetAlpha WinAPI_BufferedPaintUnInit WinAPI_CallNextHookEx WinAPI_CallWindowProc WinAPI_CallWindowProcW WinAPI_CascadeWindows WinAPI_ChangeWindowMessageFilterEx WinAPI_CharToOem WinAPI_ChildWindowFromPointEx WinAPI_ClientToScreen WinAPI_ClipCursor WinAPI_CloseDesktop WinAPI_CloseEnhMetaFile WinAPI_CloseFigure WinAPI_CloseHandle WinAPI_CloseThemeData WinAPI_CloseWindow WinAPI_CloseWindowStation WinAPI_CLSIDFromProgID WinAPI_CoInitialize WinAPI_ColorAdjustLuma WinAPI_ColorHLSToRGB WinAPI_ColorRGBToHLS WinAPI_CombineRgn WinAPI_CombineTransform WinAPI_CommandLineToArgv WinAPI_CommDlgExtendedError WinAPI_CommDlgExtendedErrorEx WinAPI_CompareString WinAPI_CompressBitmapBits WinAPI_CompressBuffer WinAPI_ComputeCrc32 WinAPI_ConfirmCredentials WinAPI_CopyBitmap WinAPI_CopyCursor WinAPI_CopyEnhMetaFile WinAPI_CopyFileEx WinAPI_CopyIcon WinAPI_CopyImage WinAPI_CopyRect WinAPI_CopyStruct WinAPI_CoTaskMemAlloc WinAPI_CoTaskMemFree WinAPI_CoTaskMemRealloc WinAPI_CoUninitialize WinAPI_Create32BitHBITMAP WinAPI_Create32BitHICON WinAPI_CreateANDBitmap WinAPI_CreateBitmap WinAPI_CreateBitmapIndirect WinAPI_CreateBrushIndirect WinAPI_CreateBuffer WinAPI_CreateBufferFromStruct WinAPI_CreateCaret WinAPI_CreateColorAdjustment WinAPI_CreateCompatibleBitmap WinAPI_CreateCompatibleBitmapEx WinAPI_CreateCompatibleDC WinAPI_CreateDesktop WinAPI_CreateDIB WinAPI_CreateDIBColorTable WinAPI_CreateDIBitmap WinAPI_CreateDIBSection WinAPI_CreateDirectory WinAPI_CreateDirectoryEx WinAPI_CreateEllipticRgn WinAPI_CreateEmptyIcon WinAPI_CreateEnhMetaFile WinAPI_CreateEvent WinAPI_CreateFile WinAPI_CreateFileEx WinAPI_CreateFileMapping WinAPI_CreateFont WinAPI_CreateFontEx WinAPI_CreateFontIndirect WinAPI_CreateGUID WinAPI_CreateHardLink WinAPI_CreateIcon WinAPI_CreateIconFromResourceEx WinAPI_CreateIconIndirect WinAPI_CreateJobObject WinAPI_CreateMargins WinAPI_CreateMRUList WinAPI_CreateMutex WinAPI_CreateNullRgn WinAPI_CreateNumberFormatInfo WinAPI_CreateObjectID WinAPI_CreatePen WinAPI_CreatePoint WinAPI_CreatePolygonRgn WinAPI_CreateProcess WinAPI_CreateProcessWithToken WinAPI_CreateRect WinAPI_CreateRectEx WinAPI_CreateRectRgn WinAPI_CreateRectRgnIndirect WinAPI_CreateRoundRectRgn WinAPI_CreateSemaphore WinAPI_CreateSize WinAPI_CreateSolidBitmap WinAPI_CreateSolidBrush WinAPI_CreateStreamOnHGlobal WinAPI_CreateString WinAPI_CreateSymbolicLink WinAPI_CreateTransform WinAPI_CreateWindowEx WinAPI_CreateWindowStation WinAPI_DecompressBuffer WinAPI_DecryptFile WinAPI_DeferWindowPos WinAPI_DefineDosDevice WinAPI_DefRawInputProc WinAPI_DefSubclassProc WinAPI_DefWindowProc WinAPI_DefWindowProcW WinAPI_DeleteDC WinAPI_DeleteEnhMetaFile WinAPI_DeleteFile WinAPI_DeleteObject WinAPI_DeleteObjectID WinAPI_DeleteVolumeMountPoint WinAPI_DeregisterShellHookWindow WinAPI_DestroyCaret WinAPI_DestroyCursor WinAPI_DestroyIcon WinAPI_DestroyWindow WinAPI_DeviceIoControl WinAPI_DisplayStruct WinAPI_DllGetVersion WinAPI_DllInstall WinAPI_DllUninstall WinAPI_DPtoLP WinAPI_DragAcceptFiles WinAPI_DragFinish WinAPI_DragQueryFileEx WinAPI_DragQueryPoint WinAPI_DrawAnimatedRects WinAPI_DrawBitmap WinAPI_DrawEdge WinAPI_DrawFocusRect WinAPI_DrawFrameControl WinAPI_DrawIcon WinAPI_DrawIconEx WinAPI_DrawLine WinAPI_DrawShadowText WinAPI_DrawText WinAPI_DrawThemeBackground WinAPI_DrawThemeEdge WinAPI_DrawThemeIcon WinAPI_DrawThemeParentBackground WinAPI_DrawThemeText WinAPI_DrawThemeTextEx WinAPI_DuplicateEncryptionInfoFile WinAPI_DuplicateHandle WinAPI_DuplicateTokenEx WinAPI_DwmDefWindowProc WinAPI_DwmEnableBlurBehindWindow WinAPI_DwmEnableComposition WinAPI_DwmExtendFrameIntoClientArea WinAPI_DwmGetColorizationColor WinAPI_DwmGetColorizationParameters WinAPI_DwmGetWindowAttribute WinAPI_DwmInvalidateIconicBitmaps WinAPI_DwmIsCompositionEnabled WinAPI_DwmQueryThumbnailSourceSize WinAPI_DwmRegisterThumbnail WinAPI_DwmSetColorizationParameters WinAPI_DwmSetIconicLivePreviewBitmap WinAPI_DwmSetIconicThumbnail WinAPI_DwmSetWindowAttribute WinAPI_DwmUnregisterThumbnail WinAPI_DwmUpdateThumbnailProperties WinAPI_DWordToFloat WinAPI_DWordToInt WinAPI_EjectMedia WinAPI_Ellipse WinAPI_EmptyWorkingSet WinAPI_EnableWindow WinAPI_EncryptFile WinAPI_EncryptionDisable WinAPI_EndBufferedPaint WinAPI_EndDeferWindowPos WinAPI_EndPaint WinAPI_EndPath WinAPI_EndUpdateResource WinAPI_EnumChildProcess WinAPI_EnumChildWindows WinAPI_EnumDesktops WinAPI_EnumDesktopWindows WinAPI_EnumDeviceDrivers WinAPI_EnumDisplayDevices WinAPI_EnumDisplayMonitors WinAPI_EnumDisplaySettings WinAPI_EnumDllProc WinAPI_EnumFiles WinAPI_EnumFileStreams WinAPI_EnumFontFamilies WinAPI_EnumHardLinks WinAPI_EnumMRUList WinAPI_EnumPageFiles WinAPI_EnumProcessHandles WinAPI_EnumProcessModules WinAPI_EnumProcessThreads WinAPI_EnumProcessWindows WinAPI_EnumRawInputDevices WinAPI_EnumResourceLanguages WinAPI_EnumResourceNames WinAPI_EnumResourceTypes WinAPI_EnumSystemGeoID WinAPI_EnumSystemLocales WinAPI_EnumUILanguages WinAPI_EnumWindows WinAPI_EnumWindowsPopup WinAPI_EnumWindowStations WinAPI_EnumWindowsTop WinAPI_EqualMemory WinAPI_EqualRect WinAPI_EqualRgn WinAPI_ExcludeClipRect WinAPI_ExpandEnvironmentStrings WinAPI_ExtCreatePen WinAPI_ExtCreateRegion WinAPI_ExtFloodFill WinAPI_ExtractIcon WinAPI_ExtractIconEx WinAPI_ExtSelectClipRgn WinAPI_FatalAppExit WinAPI_FatalExit WinAPI_FileEncryptionStatus WinAPI_FileExists WinAPI_FileIconInit WinAPI_FileInUse WinAPI_FillMemory WinAPI_FillPath WinAPI_FillRect WinAPI_FillRgn WinAPI_FindClose WinAPI_FindCloseChangeNotification WinAPI_FindExecutable WinAPI_FindFirstChangeNotification WinAPI_FindFirstFile WinAPI_FindFirstFileName WinAPI_FindFirstStream WinAPI_FindNextChangeNotification WinAPI_FindNextFile WinAPI_FindNextFileName WinAPI_FindNextStream WinAPI_FindResource WinAPI_FindResourceEx WinAPI_FindTextDlg WinAPI_FindWindow WinAPI_FlashWindow WinAPI_FlashWindowEx WinAPI_FlattenPath WinAPI_FloatToDWord WinAPI_FloatToInt WinAPI_FlushFileBuffers WinAPI_FlushFRBuffer WinAPI_FlushViewOfFile WinAPI_FormatDriveDlg WinAPI_FormatMessage WinAPI_FrameRect WinAPI_FrameRgn WinAPI_FreeLibrary WinAPI_FreeMemory WinAPI_FreeMRUList WinAPI_FreeResource WinAPI_GdiComment WinAPI_GetActiveWindow WinAPI_GetAllUsersProfileDirectory WinAPI_GetAncestor WinAPI_GetApplicationRestartSettings WinAPI_GetArcDirection WinAPI_GetAsyncKeyState WinAPI_GetBinaryType WinAPI_GetBitmapBits WinAPI_GetBitmapDimension WinAPI_GetBitmapDimensionEx WinAPI_GetBkColor WinAPI_GetBkMode WinAPI_GetBoundsRect WinAPI_GetBrushOrg WinAPI_GetBufferedPaintBits WinAPI_GetBufferedPaintDC WinAPI_GetBufferedPaintTargetDC WinAPI_GetBufferedPaintTargetRect WinAPI_GetBValue WinAPI_GetCaretBlinkTime WinAPI_GetCaretPos WinAPI_GetCDType WinAPI_GetClassInfoEx WinAPI_GetClassLongEx WinAPI_GetClassName WinAPI_GetClientHeight WinAPI_GetClientRect WinAPI_GetClientWidth WinAPI_GetClipboardSequenceNumber WinAPI_GetClipBox WinAPI_GetClipCursor WinAPI_GetClipRgn WinAPI_GetColorAdjustment WinAPI_GetCompressedFileSize WinAPI_GetCompression WinAPI_GetConnectedDlg WinAPI_GetCurrentDirectory WinAPI_GetCurrentHwProfile WinAPI_GetCurrentObject WinAPI_GetCurrentPosition WinAPI_GetCurrentProcess WinAPI_GetCurrentProcessExplicitAppUserModelID WinAPI_GetCurrentProcessID WinAPI_GetCurrentThemeName WinAPI_GetCurrentThread WinAPI_GetCurrentThreadId WinAPI_GetCursor WinAPI_GetCursorInfo WinAPI_GetDateFormat WinAPI_GetDC WinAPI_GetDCEx WinAPI_GetDefaultPrinter WinAPI_GetDefaultUserProfileDirectory WinAPI_GetDesktopWindow WinAPI_GetDeviceCaps WinAPI_GetDeviceDriverBaseName WinAPI_GetDeviceDriverFileName WinAPI_GetDeviceGammaRamp WinAPI_GetDIBColorTable WinAPI_GetDIBits WinAPI_GetDiskFreeSpaceEx WinAPI_GetDlgCtrlID WinAPI_GetDlgItem WinAPI_GetDllDirectory WinAPI_GetDriveBusType WinAPI_GetDriveGeometryEx WinAPI_GetDriveNumber WinAPI_GetDriveType WinAPI_GetDurationFormat WinAPI_GetEffectiveClientRect WinAPI_GetEnhMetaFile WinAPI_GetEnhMetaFileBits WinAPI_GetEnhMetaFileDescription WinAPI_GetEnhMetaFileDimension WinAPI_GetEnhMetaFileHeader WinAPI_GetErrorMessage WinAPI_GetErrorMode WinAPI_GetExitCodeProcess WinAPI_GetExtended WinAPI_GetFileAttributes WinAPI_GetFileID WinAPI_GetFileInformationByHandle WinAPI_GetFileInformationByHandleEx WinAPI_GetFilePointerEx WinAPI_GetFileSizeEx WinAPI_GetFileSizeOnDisk WinAPI_GetFileTitle WinAPI_GetFileType WinAPI_GetFileVersionInfo WinAPI_GetFinalPathNameByHandle WinAPI_GetFinalPathNameByHandleEx WinAPI_GetFocus WinAPI_GetFontMemoryResourceInfo WinAPI_GetFontName WinAPI_GetFontResourceInfo WinAPI_GetForegroundWindow WinAPI_GetFRBuffer WinAPI_GetFullPathName WinAPI_GetGeoInfo WinAPI_GetGlyphOutline WinAPI_GetGraphicsMode WinAPI_GetGuiResources WinAPI_GetGUIThreadInfo WinAPI_GetGValue WinAPI_GetHandleInformation WinAPI_GetHGlobalFromStream WinAPI_GetIconDimension WinAPI_GetIconInfo WinAPI_GetIconInfoEx WinAPI_GetIdleTime WinAPI_GetKeyboardLayout WinAPI_GetKeyboardLayoutList WinAPI_GetKeyboardState WinAPI_GetKeyboardType WinAPI_GetKeyNameText WinAPI_GetKeyState WinAPI_GetLastActivePopup WinAPI_GetLastError WinAPI_GetLastErrorMessage WinAPI_GetLayeredWindowAttributes WinAPI_GetLocaleInfo WinAPI_GetLogicalDrives WinAPI_GetMapMode WinAPI_GetMemorySize WinAPI_GetMessageExtraInfo WinAPI_GetModuleFileNameEx WinAPI_GetModuleHandle WinAPI_GetModuleHandleEx WinAPI_GetModuleInformation WinAPI_GetMonitorInfo WinAPI_GetMousePos WinAPI_GetMousePosX WinAPI_GetMousePosY WinAPI_GetMUILanguage WinAPI_GetNumberFormat WinAPI_GetObject WinAPI_GetObjectID WinAPI_GetObjectInfoByHandle WinAPI_GetObjectNameByHandle WinAPI_GetObjectType WinAPI_GetOpenFileName WinAPI_GetOutlineTextMetrics WinAPI_GetOverlappedResult WinAPI_GetParent WinAPI_GetParentProcess WinAPI_GetPerformanceInfo WinAPI_GetPEType WinAPI_GetPhysicallyInstalledSystemMemory WinAPI_GetPixel WinAPI_GetPolyFillMode WinAPI_GetPosFromRect WinAPI_GetPriorityClass WinAPI_GetProcAddress WinAPI_GetProcessAffinityMask WinAPI_GetProcessCommandLine WinAPI_GetProcessFileName WinAPI_GetProcessHandleCount WinAPI_GetProcessID WinAPI_GetProcessIoCounters WinAPI_GetProcessMemoryInfo WinAPI_GetProcessName WinAPI_GetProcessShutdownParameters WinAPI_GetProcessTimes WinAPI_GetProcessUser WinAPI_GetProcessWindowStation WinAPI_GetProcessWorkingDirectory WinAPI_GetProfilesDirectory WinAPI_GetPwrCapabilities WinAPI_GetRawInputBuffer WinAPI_GetRawInputBufferLength WinAPI_GetRawInputData WinAPI_GetRawInputDeviceInfo WinAPI_GetRegionData WinAPI_GetRegisteredRawInputDevices WinAPI_GetRegKeyNameByHandle WinAPI_GetRgnBox WinAPI_GetROP2 WinAPI_GetRValue WinAPI_GetSaveFileName WinAPI_GetShellWindow WinAPI_GetStartupInfo WinAPI_GetStdHandle WinAPI_GetStockObject WinAPI_GetStretchBltMode WinAPI_GetString WinAPI_GetSysColor WinAPI_GetSysColorBrush WinAPI_GetSystemDefaultLangID WinAPI_GetSystemDefaultLCID WinAPI_GetSystemDefaultUILanguage WinAPI_GetSystemDEPPolicy WinAPI_GetSystemInfo WinAPI_GetSystemMetrics WinAPI_GetSystemPowerStatus WinAPI_GetSystemTimes WinAPI_GetSystemWow64Directory WinAPI_GetTabbedTextExtent WinAPI_GetTempFileName WinAPI_GetTextAlign WinAPI_GetTextCharacterExtra WinAPI_GetTextColor WinAPI_GetTextExtentPoint32 WinAPI_GetTextFace WinAPI_GetTextMetrics WinAPI_GetThemeAppProperties WinAPI_GetThemeBackgroundContentRect WinAPI_GetThemeBackgroundExtent WinAPI_GetThemeBackgroundRegion WinAPI_GetThemeBitmap WinAPI_GetThemeBool WinAPI_GetThemeColor WinAPI_GetThemeDocumentationProperty WinAPI_GetThemeEnumValue WinAPI_GetThemeFilename WinAPI_GetThemeFont WinAPI_GetThemeInt WinAPI_GetThemeMargins WinAPI_GetThemeMetric WinAPI_GetThemePartSize WinAPI_GetThemePosition WinAPI_GetThemePropertyOrigin WinAPI_GetThemeRect WinAPI_GetThemeString WinAPI_GetThemeSysBool WinAPI_GetThemeSysColor WinAPI_GetThemeSysColorBrush WinAPI_GetThemeSysFont WinAPI_GetThemeSysInt WinAPI_GetThemeSysSize WinAPI_GetThemeSysString WinAPI_GetThemeTextExtent WinAPI_GetThemeTextMetrics WinAPI_GetThemeTransitionDuration WinAPI_GetThreadDesktop WinAPI_GetThreadErrorMode WinAPI_GetThreadLocale WinAPI_GetThreadUILanguage WinAPI_GetTickCount WinAPI_GetTickCount64 WinAPI_GetTimeFormat WinAPI_GetTopWindow WinAPI_GetUDFColorMode WinAPI_GetUpdateRect WinAPI_GetUpdateRgn WinAPI_GetUserDefaultLangID WinAPI_GetUserDefaultLCID WinAPI_GetUserDefaultUILanguage WinAPI_GetUserGeoID WinAPI_GetUserObjectInformation WinAPI_GetVersion WinAPI_GetVersionEx WinAPI_GetVolumeInformation WinAPI_GetVolumeInformationByHandle WinAPI_GetVolumeNameForVolumeMountPoint WinAPI_GetWindow WinAPI_GetWindowDC WinAPI_GetWindowDisplayAffinity WinAPI_GetWindowExt WinAPI_GetWindowFileName WinAPI_GetWindowHeight WinAPI_GetWindowInfo WinAPI_GetWindowLong WinAPI_GetWindowOrg WinAPI_GetWindowPlacement WinAPI_GetWindowRect WinAPI_GetWindowRgn WinAPI_GetWindowRgnBox WinAPI_GetWindowSubclass WinAPI_GetWindowText WinAPI_GetWindowTheme WinAPI_GetWindowThreadProcessId WinAPI_GetWindowWidth WinAPI_GetWorkArea WinAPI_GetWorldTransform WinAPI_GetXYFromPoint WinAPI_GlobalMemoryStatus WinAPI_GradientFill WinAPI_GUIDFromString WinAPI_GUIDFromStringEx WinAPI_HashData WinAPI_HashString WinAPI_HiByte WinAPI_HideCaret WinAPI_HiDWord WinAPI_HiWord WinAPI_InflateRect WinAPI_InitMUILanguage WinAPI_InProcess WinAPI_IntersectClipRect WinAPI_IntersectRect WinAPI_IntToDWord WinAPI_IntToFloat WinAPI_InvalidateRect WinAPI_InvalidateRgn WinAPI_InvertANDBitmap WinAPI_InvertColor WinAPI_InvertRect WinAPI_InvertRgn WinAPI_IOCTL WinAPI_IsAlphaBitmap WinAPI_IsBadCodePtr WinAPI_IsBadReadPtr WinAPI_IsBadStringPtr WinAPI_IsBadWritePtr WinAPI_IsChild WinAPI_IsClassName WinAPI_IsDoorOpen WinAPI_IsElevated WinAPI_IsHungAppWindow WinAPI_IsIconic WinAPI_IsInternetConnected WinAPI_IsLoadKBLayout WinAPI_IsMemory WinAPI_IsNameInExpression WinAPI_IsNetworkAlive WinAPI_IsPathShared WinAPI_IsProcessInJob WinAPI_IsProcessorFeaturePresent WinAPI_IsRectEmpty WinAPI_IsThemeActive WinAPI_IsThemeBackgroundPartiallyTransparent WinAPI_IsThemePartDefined WinAPI_IsValidLocale WinAPI_IsWindow WinAPI_IsWindowEnabled WinAPI_IsWindowUnicode WinAPI_IsWindowVisible WinAPI_IsWow64Process WinAPI_IsWritable WinAPI_IsZoomed WinAPI_Keybd_Event WinAPI_KillTimer WinAPI_LineDDA WinAPI_LineTo WinAPI_LoadBitmap WinAPI_LoadCursor WinAPI_LoadCursorFromFile WinAPI_LoadIcon WinAPI_LoadIconMetric WinAPI_LoadIconWithScaleDown WinAPI_LoadImage WinAPI_LoadIndirectString WinAPI_LoadKeyboardLayout WinAPI_LoadLibrary WinAPI_LoadLibraryEx WinAPI_LoadMedia WinAPI_LoadResource WinAPI_LoadShell32Icon WinAPI_LoadString WinAPI_LoadStringEx WinAPI_LoByte WinAPI_LocalFree WinAPI_LockDevice WinAPI_LockFile WinAPI_LockResource WinAPI_LockWindowUpdate WinAPI_LockWorkStation WinAPI_LoDWord WinAPI_LongMid WinAPI_LookupIconIdFromDirectoryEx WinAPI_LoWord WinAPI_LPtoDP WinAPI_MAKELANGID WinAPI_MAKELCID WinAPI_MakeLong WinAPI_MakeQWord WinAPI_MakeWord WinAPI_MapViewOfFile WinAPI_MapVirtualKey WinAPI_MaskBlt WinAPI_MessageBeep WinAPI_MessageBoxCheck WinAPI_MessageBoxIndirect WinAPI_MirrorIcon WinAPI_ModifyWorldTransform WinAPI_MonitorFromPoint WinAPI_MonitorFromRect WinAPI_MonitorFromWindow WinAPI_Mouse_Event WinAPI_MoveFileEx WinAPI_MoveMemory WinAPI_MoveTo WinAPI_MoveToEx WinAPI_MoveWindow WinAPI_MsgBox WinAPI_MulDiv WinAPI_MultiByteToWideChar WinAPI_MultiByteToWideCharEx WinAPI_NtStatusToDosError WinAPI_OemToChar WinAPI_OffsetClipRgn WinAPI_OffsetPoints WinAPI_OffsetRect WinAPI_OffsetRgn WinAPI_OffsetWindowOrg WinAPI_OpenDesktop WinAPI_OpenFileById WinAPI_OpenFileDlg WinAPI_OpenFileMapping WinAPI_OpenIcon WinAPI_OpenInputDesktop WinAPI_OpenJobObject WinAPI_OpenMutex WinAPI_OpenProcess WinAPI_OpenProcessToken WinAPI_OpenSemaphore WinAPI_OpenThemeData WinAPI_OpenWindowStation WinAPI_PageSetupDlg WinAPI_PaintDesktop WinAPI_PaintRgn WinAPI_ParseURL WinAPI_ParseUserName WinAPI_PatBlt WinAPI_PathAddBackslash WinAPI_PathAddExtension WinAPI_PathAppend WinAPI_PathBuildRoot WinAPI_PathCanonicalize WinAPI_PathCommonPrefix WinAPI_PathCompactPath WinAPI_PathCompactPathEx WinAPI_PathCreateFromUrl WinAPI_PathFindExtension WinAPI_PathFindFileName WinAPI_PathFindNextComponent WinAPI_PathFindOnPath WinAPI_PathGetArgs WinAPI_PathGetCharType WinAPI_PathGetDriveNumber WinAPI_PathIsContentType WinAPI_PathIsDirectory WinAPI_PathIsDirectoryEmpty WinAPI_PathIsExe WinAPI_PathIsFileSpec WinAPI_PathIsLFNFileSpec WinAPI_PathIsRelative WinAPI_PathIsRoot WinAPI_PathIsSameRoot WinAPI_PathIsSystemFolder WinAPI_PathIsUNC WinAPI_PathIsUNCServer WinAPI_PathIsUNCServerShare WinAPI_PathMakeSystemFolder WinAPI_PathMatchSpec WinAPI_PathParseIconLocation WinAPI_PathRelativePathTo WinAPI_PathRemoveArgs WinAPI_PathRemoveBackslash WinAPI_PathRemoveExtension WinAPI_PathRemoveFileSpec WinAPI_PathRenameExtension WinAPI_PathSearchAndQualify WinAPI_PathSkipRoot WinAPI_PathStripPath WinAPI_PathStripToRoot WinAPI_PathToRegion WinAPI_PathUndecorate WinAPI_PathUnExpandEnvStrings WinAPI_PathUnmakeSystemFolder WinAPI_PathUnquoteSpaces WinAPI_PathYetAnotherMakeUniqueName WinAPI_PickIconDlg WinAPI_PlayEnhMetaFile WinAPI_PlaySound WinAPI_PlgBlt WinAPI_PointFromRect WinAPI_PolyBezier WinAPI_PolyBezierTo WinAPI_PolyDraw WinAPI_Polygon WinAPI_PostMessage WinAPI_PrimaryLangId WinAPI_PrintDlg WinAPI_PrintDlgEx WinAPI_PrintWindow WinAPI_ProgIDFromCLSID WinAPI_PtInRect WinAPI_PtInRectEx WinAPI_PtInRegion WinAPI_PtVisible WinAPI_QueryDosDevice WinAPI_QueryInformationJobObject WinAPI_QueryPerformanceCounter WinAPI_QueryPerformanceFrequency WinAPI_RadialGradientFill WinAPI_ReadDirectoryChanges WinAPI_ReadFile WinAPI_ReadProcessMemory WinAPI_Rectangle WinAPI_RectInRegion WinAPI_RectIsEmpty WinAPI_RectVisible WinAPI_RedrawWindow WinAPI_RegCloseKey WinAPI_RegConnectRegistry WinAPI_RegCopyTree WinAPI_RegCopyTreeEx WinAPI_RegCreateKey WinAPI_RegDeleteEmptyKey WinAPI_RegDeleteKey WinAPI_RegDeleteKeyValue WinAPI_RegDeleteTree WinAPI_RegDeleteTreeEx WinAPI_RegDeleteValue WinAPI_RegDisableReflectionKey WinAPI_RegDuplicateHKey WinAPI_RegEnableReflectionKey WinAPI_RegEnumKey WinAPI_RegEnumValue WinAPI_RegFlushKey WinAPI_RegisterApplicationRestart WinAPI_RegisterClass WinAPI_RegisterClassEx WinAPI_RegisterHotKey WinAPI_RegisterPowerSettingNotification WinAPI_RegisterRawInputDevices WinAPI_RegisterShellHookWindow WinAPI_RegisterWindowMessage WinAPI_RegLoadMUIString WinAPI_RegNotifyChangeKeyValue WinAPI_RegOpenKey WinAPI_RegQueryInfoKey WinAPI_RegQueryLastWriteTime WinAPI_RegQueryMultipleValues WinAPI_RegQueryReflectionKey WinAPI_RegQueryValue WinAPI_RegRestoreKey WinAPI_RegSaveKey WinAPI_RegSetValue WinAPI_ReleaseCapture WinAPI_ReleaseDC WinAPI_ReleaseMutex WinAPI_ReleaseSemaphore WinAPI_ReleaseStream WinAPI_RemoveClipboardFormatListener WinAPI_RemoveDirectory WinAPI_RemoveFontMemResourceEx WinAPI_RemoveFontResourceEx WinAPI_RemoveWindowSubclass WinAPI_ReOpenFile WinAPI_ReplaceFile WinAPI_ReplaceTextDlg WinAPI_ResetEvent WinAPI_RestartDlg WinAPI_RestoreDC WinAPI_RGB WinAPI_RotatePoints WinAPI_RoundRect WinAPI_SaveDC WinAPI_SaveFileDlg WinAPI_SaveHBITMAPToFile WinAPI_SaveHICONToFile WinAPI_ScaleWindowExt WinAPI_ScreenToClient WinAPI_SearchPath WinAPI_SelectClipPath WinAPI_SelectClipRgn WinAPI_SelectObject WinAPI_SendMessageTimeout WinAPI_SetActiveWindow WinAPI_SetArcDirection WinAPI_SetBitmapBits WinAPI_SetBitmapDimensionEx WinAPI_SetBkColor WinAPI_SetBkMode WinAPI_SetBoundsRect WinAPI_SetBrushOrg WinAPI_SetCapture WinAPI_SetCaretBlinkTime WinAPI_SetCaretPos WinAPI_SetClassLongEx WinAPI_SetColorAdjustment WinAPI_SetCompression WinAPI_SetCurrentDirectory WinAPI_SetCurrentProcessExplicitAppUserModelID WinAPI_SetCursor WinAPI_SetDCBrushColor WinAPI_SetDCPenColor WinAPI_SetDefaultPrinter WinAPI_SetDeviceGammaRamp WinAPI_SetDIBColorTable WinAPI_SetDIBits WinAPI_SetDIBitsToDevice WinAPI_SetDllDirectory WinAPI_SetEndOfFile WinAPI_SetEnhMetaFileBits WinAPI_SetErrorMode WinAPI_SetEvent WinAPI_SetFileAttributes WinAPI_SetFileInformationByHandleEx WinAPI_SetFilePointer WinAPI_SetFilePointerEx WinAPI_SetFileShortName WinAPI_SetFileValidData WinAPI_SetFocus WinAPI_SetFont WinAPI_SetForegroundWindow WinAPI_SetFRBuffer WinAPI_SetGraphicsMode WinAPI_SetHandleInformation WinAPI_SetInformationJobObject WinAPI_SetKeyboardLayout WinAPI_SetKeyboardState WinAPI_SetLastError WinAPI_SetLayeredWindowAttributes WinAPI_SetLocaleInfo WinAPI_SetMapMode WinAPI_SetMessageExtraInfo WinAPI_SetParent WinAPI_SetPixel WinAPI_SetPolyFillMode WinAPI_SetPriorityClass WinAPI_SetProcessAffinityMask WinAPI_SetProcessShutdownParameters WinAPI_SetProcessWindowStation WinAPI_SetRectRgn WinAPI_SetROP2 WinAPI_SetSearchPathMode WinAPI_SetStretchBltMode WinAPI_SetSysColors WinAPI_SetSystemCursor WinAPI_SetTextAlign WinAPI_SetTextCharacterExtra WinAPI_SetTextColor WinAPI_SetTextJustification WinAPI_SetThemeAppProperties WinAPI_SetThreadDesktop WinAPI_SetThreadErrorMode WinAPI_SetThreadExecutionState WinAPI_SetThreadLocale WinAPI_SetThreadUILanguage WinAPI_SetTimer WinAPI_SetUDFColorMode WinAPI_SetUserGeoID WinAPI_SetUserObjectInformation WinAPI_SetVolumeMountPoint WinAPI_SetWindowDisplayAffinity WinAPI_SetWindowExt WinAPI_SetWindowLong WinAPI_SetWindowOrg WinAPI_SetWindowPlacement WinAPI_SetWindowPos WinAPI_SetWindowRgn WinAPI_SetWindowsHookEx WinAPI_SetWindowSubclass WinAPI_SetWindowText WinAPI_SetWindowTheme WinAPI_SetWinEventHook WinAPI_SetWorldTransform WinAPI_SfcIsFileProtected WinAPI_SfcIsKeyProtected WinAPI_ShellAboutDlg WinAPI_ShellAddToRecentDocs WinAPI_ShellChangeNotify WinAPI_ShellChangeNotifyDeregister WinAPI_ShellChangeNotifyRegister WinAPI_ShellCreateDirectory WinAPI_ShellEmptyRecycleBin WinAPI_ShellExecute WinAPI_ShellExecuteEx WinAPI_ShellExtractAssociatedIcon WinAPI_ShellExtractIcon WinAPI_ShellFileOperation WinAPI_ShellFlushSFCache WinAPI_ShellGetFileInfo WinAPI_ShellGetIconOverlayIndex WinAPI_ShellGetImageList WinAPI_ShellGetKnownFolderIDList WinAPI_ShellGetKnownFolderPath WinAPI_ShellGetLocalizedName WinAPI_ShellGetPathFromIDList WinAPI_ShellGetSetFolderCustomSettings WinAPI_ShellGetSettings WinAPI_ShellGetSpecialFolderLocation WinAPI_ShellGetSpecialFolderPath WinAPI_ShellGetStockIconInfo WinAPI_ShellILCreateFromPath WinAPI_ShellNotifyIcon WinAPI_ShellNotifyIconGetRect WinAPI_ShellObjectProperties WinAPI_ShellOpenFolderAndSelectItems WinAPI_ShellOpenWithDlg WinAPI_ShellQueryRecycleBin WinAPI_ShellQueryUserNotificationState WinAPI_ShellRemoveLocalizedName WinAPI_ShellRestricted WinAPI_ShellSetKnownFolderPath WinAPI_ShellSetLocalizedName WinAPI_ShellSetSettings WinAPI_ShellStartNetConnectionDlg WinAPI_ShellUpdateImage WinAPI_ShellUserAuthenticationDlg WinAPI_ShellUserAuthenticationDlgEx WinAPI_ShortToWord WinAPI_ShowCaret WinAPI_ShowCursor WinAPI_ShowError WinAPI_ShowLastError WinAPI_ShowMsg WinAPI_ShowOwnedPopups WinAPI_ShowWindow WinAPI_ShutdownBlockReasonCreate WinAPI_ShutdownBlockReasonDestroy WinAPI_ShutdownBlockReasonQuery WinAPI_SizeOfResource WinAPI_StretchBlt WinAPI_StretchDIBits WinAPI_StrFormatByteSize WinAPI_StrFormatByteSizeEx WinAPI_StrFormatKBSize WinAPI_StrFromTimeInterval WinAPI_StringFromGUID WinAPI_StringLenA WinAPI_StringLenW WinAPI_StrLen WinAPI_StrokeAndFillPath WinAPI_StrokePath WinAPI_StructToArray WinAPI_SubLangId WinAPI_SubtractRect WinAPI_SwapDWord WinAPI_SwapQWord WinAPI_SwapWord WinAPI_SwitchColor WinAPI_SwitchDesktop WinAPI_SwitchToThisWindow WinAPI_SystemParametersInfo WinAPI_TabbedTextOut WinAPI_TerminateJobObject WinAPI_TerminateProcess WinAPI_TextOut WinAPI_TileWindows WinAPI_TrackMouseEvent WinAPI_TransparentBlt WinAPI_TwipsPerPixelX WinAPI_TwipsPerPixelY WinAPI_UnhookWindowsHookEx WinAPI_UnhookWinEvent WinAPI_UnionRect WinAPI_UnionStruct WinAPI_UniqueHardwareID WinAPI_UnloadKeyboardLayout WinAPI_UnlockFile WinAPI_UnmapViewOfFile WinAPI_UnregisterApplicationRestart WinAPI_UnregisterClass WinAPI_UnregisterHotKey WinAPI_UnregisterPowerSettingNotification WinAPI_UpdateLayeredWindow WinAPI_UpdateLayeredWindowEx WinAPI_UpdateLayeredWindowIndirect WinAPI_UpdateResource WinAPI_UpdateWindow WinAPI_UrlApplyScheme WinAPI_UrlCanonicalize WinAPI_UrlCombine WinAPI_UrlCompare WinAPI_UrlCreateFromPath WinAPI_UrlFixup WinAPI_UrlGetPart WinAPI_UrlHash WinAPI_UrlIs WinAPI_UserHandleGrantAccess WinAPI_ValidateRect WinAPI_ValidateRgn WinAPI_VerQueryRoot WinAPI_VerQueryValue WinAPI_VerQueryValueEx WinAPI_WaitForInputIdle WinAPI_WaitForMultipleObjects WinAPI_WaitForSingleObject WinAPI_WideCharToMultiByte WinAPI_WidenPath WinAPI_WindowFromDC WinAPI_WindowFromPoint WinAPI_WordToShort WinAPI_Wow64EnableWow64FsRedirection WinAPI_WriteConsole WinAPI_WriteFile WinAPI_WriteProcessMemory WinAPI_ZeroMemory WinNet_AddConnection WinNet_AddConnection2 WinNet_AddConnection3 WinNet_CancelConnection WinNet_CancelConnection2 WinNet_CloseEnum WinNet_ConnectionDialog WinNet_ConnectionDialog1 WinNet_DisconnectDialog WinNet_DisconnectDialog1 WinNet_EnumResource WinNet_GetConnection WinNet_GetConnectionPerformance WinNet_GetLastError WinNet_GetNetworkInformation WinNet_GetProviderName WinNet_GetResourceInformation WinNet_GetResourceParent WinNet_GetUniversalName WinNet_GetUser WinNet_OpenEnum WinNet_RestoreConnection WinNet_UseConnection Word_Create Word_DocAdd Word_DocAttach Word_DocClose Word_DocExport Word_DocFind Word_DocFindReplace Word_DocGet Word_DocLinkAdd Word_DocLinkGet Word_DocOpen Word_DocPictureAdd Word_DocPrint Word_DocRangeSet Word_DocSave Word_DocSaveAs Word_DocTableRead Word_DocTableWrite Word_Quit",e={ +function $notificationProvider(){function a(a,c,d){function e(c,d){function f(){d=angular.extend({focusWindowOnClick:!0},b.options||{},d);try{g.baseNotification=new a.Notification(c,d)}catch(e){return}d.delay&&setTimeout(angular.bind(g,g.close),d.delay),d.focusWindowOnClick&&g.$on("click",function(){a.focus()}),g._events.forEach(function(a){g.$on.apply(g,a)}),g._events=[]}if(!a.Notification)return!1;d=d||{};var g=this;return this._events=[],"granted"===a.Notification.permission?f():void("denied"!==a.Notification.permission&&e.requestPermission().then(f))}function f(a,b){return new e(a,b)}return e.prototype.$on=function(a,b){function d(){var a=arguments;c.$apply(function(){b.apply(e,a)})}var e=this;return this.baseNotification?(this.baseNotification.addEventListener(a,d),function(){this.baseNotification.removeListener(event,d)}):this._events.push([a,b])},e.prototype.close=function(){this.baseNotification&&this.baseNotification.close()},e.requestPermission=function(){return d(function(b,c){return a.Notification?void a.Notification.requestPermission(function(c){a.Notification.permission=a.Notification.permission||c,b(a.Notification.permission)}):c()})},f.requestPermission=e.requestPermission,f}var b=this;this.$get=["$window","$rootScope","$q",a],this.setOptions=function(a){this.options=a}}function wizardButtonDirective(a){angular.module("mgo-angular-wizard").directive(a,function(){return{restrict:"A",replace:!1,require:"^wizard",link:function(b,c,d,e){c.on("click",function(c){c.preventDefault(),b.$apply(function(){b.$eval(d[a]),e[a.replace("wz","").toLowerCase()]()})})}}})}function validElementString(a){try{return 0!==angular.element(a).length}catch(b){return!1}}function registerTextAngularTool(a,b){if(!a||""===a||taTools.hasOwnProperty(a))throw"textAngular Error: A unique name is required for a Tool Definition";if(b.display&&(""===b.display||!validElementString(b.display))||!b.display&&!b.buttontext&&!b.iconclass)throw'textAngular Error: Tool Definition for "'+a+'" does not have a valid display/iconclass/buttontext value';taTools[a]=b}if(function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b="length"in a&&a.length,c=_.type(a);return"function"===c||_.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ha.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=oa[a]={};return _.each(a.match(na)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ua,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:ta.test(c)?_.parseJSON(c):c}catch(e){}sa.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Ka.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)ra.set(a[c],"globalEval",!b||ra.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(ra.hasData(a)&&(f=ra.access(a),g=ra.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)_.event.add(b,e,j[e][c])}sa.hasData(a)&&(h=sa.access(a),i=_.extend({},h),sa.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ya.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Oa[a];return c||(c=t(a,b),"none"!==c&&c||(Na=(Na||_("':''),v=a(d.theme?'':''), +d.theme&&q?(x='"):d.theme?(x='"):x=q?'':'',w=a(x),r&&(d.theme?(w.css(p),w.addClass("ui-widget-content")):w.css(f)),d.theme||v.css(d.overlayCSS),v.css("position",q?"fixed":"absolute"),(k||d.forceIframe)&&u.css("opacity",0);var z=[u,v,w],A=a(q?"body":b);a.each(z,function(){this.appendTo(A)}),d.theme&&d.draggable&&a.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var B=m&&(!a.support.boxModel||a("object,embed",q?null:b).length>0);if(l||B){if(q&&d.allowBodyStretch&&a.support.boxModel&&a("html,body").css("height","100%"),(l||!a.support.boxModel)&&!q)var C=i(b,"borderTopWidth"),D=i(b,"borderLeftWidth"),E=C?"(0 - "+C+")":0,F=D?"(0 - "+D+")":0;a.each(z,function(a,b){var c=b[0].style;if(c.position="absolute",2>a)q?c.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+d.quirksmodeOffsetHack+') + "px"'):c.setExpression("height",'this.parentNode.offsetHeight + "px"'),q?c.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):c.setExpression("width",'this.parentNode.offsetWidth + "px"'),F&&c.setExpression("left",F),E&&c.setExpression("top",E);else if(d.centerY)q&&c.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),c.marginTop=0;else if(!d.centerY&&q){var e=d.css&&d.css.top?parseInt(d.css.top,10):0,f="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+e+') + "px"';c.setExpression("top",f)}})}if(r&&(d.theme?w.find(".ui-widget-content").append(r):w.append(r),(r.jquery||r.nodeType)&&a(r).show()),(k||d.forceIframe)&&d.showOverlay&&u.show(),d.fadeIn){var G=d.onBlock?d.onBlock:j,H=d.showOverlay&&!r?G:j,I=r?G:j;d.showOverlay&&v._fadeIn(d.fadeIn,H),r&&w._fadeIn(d.fadeIn,I)}else d.showOverlay&&v.show(),r&&w.show(),d.onBlock&&d.onBlock.bind(w)();if(e(1,b,d),q?(n=w[0],o=a(d.focusableElements,n),d.focusInput&&setTimeout(g,20)):h(w[0],d.centerX,d.centerY),d.timeout){var J=setTimeout(function(){q?a.unblockUI(d):a(b).unblock(d)},d.timeout);a(b).data("blockUI.timeout",J)}}}function c(b,c){var f,g=b==window,h=a(b),i=h.data("blockUI.history"),j=h.data("blockUI.timeout");j&&(clearTimeout(j),h.removeData("blockUI.timeout")),c=a.extend({},a.blockUI.defaults,c||{}),e(0,b,c),null===c.onUnblock&&(c.onUnblock=h.data("blockUI.onUnblock"),h.removeData("blockUI.onUnblock"));var k;k=g?a("body").children().filter(".blockUI").add("body > .blockUI"):h.find(">.blockUI"),c.cursorReset&&(k.length>1&&(k[1].style.cursor=c.cursorReset),k.length>2&&(k[2].style.cursor=c.cursorReset)),g&&(n=o=null),c.fadeOut?(f=k.length,k.stop().fadeOut(c.fadeOut,function(){0===--f&&d(k,i,c,b)})):d(k,i,c,b)}function d(b,c,d,e){var f=a(e);if(!f.data("blockUI.isBlocked")){b.each(function(a,b){this.parentNode&&this.parentNode.removeChild(this)}),c&&c.el&&(c.el.style.display=c.display,c.el.style.position=c.position,c.el.style.cursor="default",c.parent&&c.parent.appendChild(c.el),f.removeData("blockUI.history")),f.data("blockUI.static")&&f.css("position","static"),"function"==typeof d.onUnblock&&d.onUnblock(e,d);var g=a(document.body),h=g.width(),i=g[0].style.width;g.width(h-1).width(h),g[0].style.width=i}}function e(b,c,d){var e=c==window,g=a(c);if((b||(!e||n)&&(e||g.data("blockUI.isBlocked")))&&(g.data("blockUI.isBlocked",b),e&&d.bindEvents&&(!b||d.showOverlay))){var h="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";b?a(document).bind(h,d,f):a(document).unbind(h,f)}}function f(b){if("keydown"===b.type&&b.keyCode&&9==b.keyCode&&n&&b.data.constrainTabKey){var c=o,d=!b.shiftKey&&b.target===c[c.length-1],e=b.shiftKey&&b.target===c[0];if(d||e)return setTimeout(function(){g(e)},10),!1}var f=b.data,h=a(b.target);return h.hasClass("blockOverlay")&&f.onOverlayClick&&f.onOverlayClick(b),h.parents("div."+f.blockMsgClass).length>0?!0:0===h.parents().children().filter("div.blockUI").length}function g(a){if(o){var b=o[a===!0?o.length-1:0];b&&b.focus()}}function h(a,b,c){var d=a.parentNode,e=a.style,f=(d.offsetWidth-a.offsetWidth)/2-i(d,"borderLeftWidth"),g=(d.offsetHeight-a.offsetHeight)/2-i(d,"borderTopWidth");b&&(e.left=f>0?f+"px":"0"),c&&(e.top=g>0?g+"px":"0")}function i(b,c){return parseInt(a.css(b,c),10)||0}a.fn._fadeIn=a.fn.fadeIn;var j=a.noop||function(){},k=/MSIE/.test(navigator.userAgent),l=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),m=(document.documentMode||0,a.isFunction(document.createElement("div").style.setExpression));a.blockUI=function(a){b(window,a)},a.unblockUI=function(a){c(window,a)},a.growlUI=function(b,c,d,e){var f=a('
        ');b&&f.append("

        "+b+"

        "),c&&f.append("

        "+c+"

        "),void 0===d&&(d=3e3);var g=function(b){b=b||{},a.blockUI({message:f,fadeIn:"undefined"!=typeof b.fadeIn?b.fadeIn:700,fadeOut:"undefined"!=typeof b.fadeOut?b.fadeOut:1e3,timeout:"undefined"!=typeof b.timeout?b.timeout:d,centerY:!1,showOverlay:!1,onUnblock:e,css:a.blockUI.defaults.growlCSS})};g();f.css("opacity");f.mouseover(function(){g({fadeIn:0,timeout:3e4});var b=a(".blockMsg");b.stop(),b.fadeTo(300,1)}).mouseout(function(){a(".blockMsg").fadeOut(1e3)})},a.fn.block=function(c){if(this[0]===window)return a.blockUI(c),this;var d=a.extend({},a.blockUI.defaults,c||{});return this.each(function(){var b=a(this);d.ignoreIfBlocked&&b.data("blockUI.isBlocked")||b.unblock({fadeOut:0})}),this.each(function(){"static"==a.css(this,"position")&&(this.style.position="relative",a(this).data("blockUI.static",!0)),this.style.zoom=1,b(this,c)})},a.fn.unblock=function(b){return this[0]===window?(a.unblockUI(b),this):this.each(function(){c(this,b)})},a.blockUI.version=2.7,a.blockUI.defaults={message:"

        Please wait...

        ",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var n=null,o=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],a):a(jQuery)}(),function(a,b,c){var d=a();a.fn.dropdownHover=function(c){return"ontouchstart"in document?this:(d=d.add(this.parent()),this.each(function(){function e(a){b.clearTimeout(f),b.clearTimeout(g),g=b.setTimeout(function(){d.find(":focus").blur(),n.instantlyCloseOthers===!0&&d.removeClass("open"),b.clearTimeout(g),h.attr("aria-expanded","true"),i.addClass("open"),h.trigger(l)},n.hoverDelay)}var f,g,h=a(this),i=h.parent(),j={delay:500,hoverDelay:0,instantlyCloseOthers:!0},k={delay:a(this).data("delay"),hoverDelay:a(this).data("hover-delay"),instantlyCloseOthers:a(this).data("close-others")},l="show.bs.dropdown",m="hide.bs.dropdown",n=a.extend(!0,{},j,c,k);i.hover(function(a){return i.hasClass("open")||h.is(a.target)?void e(a):!0},function(){b.clearTimeout(g),f=b.setTimeout(function(){h.attr("aria-expanded","false"),i.removeClass("open"),h.trigger(m)},n.delay)}),h.hover(function(a){return i.hasClass("open")||i.is(a.target)?void e(a):!0}),i.find(".dropdown-submenu").each(function(){var c,d=a(this);d.hover(function(){b.clearTimeout(c),d.children(".dropdown-menu").show(),d.siblings().children(".dropdown-menu").hide()},function(){var a=d.children(".dropdown-menu");c=b.setTimeout(function(){a.hide()},n.delay)})})}))},a(document).ready(function(){a('[data-hover="dropdown"]').dropdownHover()})}(jQuery,window),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){"use strict";function b(b){var c=[{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}];return a.each(c,function(){b=b.replace(this.re,this.ch)}),b}function c(a){var b={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},c="(?:"+Object.keys(b).join("|")+")",d=new RegExp(c),e=new RegExp(c,"g"),f=null==a?"":""+a;return d.test(f)?f.replace(e,function(a){return b[a]}):f}function d(b,c){var d=arguments,f=b,g=c;[].shift.apply(d);var h,i=this.each(function(){var b=a(this);if(b.is("select")){var c=b.data("selectpicker"),i="object"==typeof f&&f;if(c){if(i)for(var j in i)i.hasOwnProperty(j)&&(c.options[j]=i[j])}else{var k=a.extend({},e.DEFAULTS,a.fn.selectpicker.defaults||{},b.data(),i);k.template=a.extend({},e.DEFAULTS.template,a.fn.selectpicker.defaults?a.fn.selectpicker.defaults.template:{},b.data().template,i.template),b.data("selectpicker",c=new e(this,k,g))}"string"==typeof f&&(h=c[f]instanceof Function?c[f].apply(c,d):c.options[f])}});return"undefined"!=typeof h?h:i}String.prototype.includes||!function(){var a={}.toString,b=function(){try{var a={},b=Object.defineProperty,c=b(a,a,a)&&b}catch(d){}return c}(),c="".indexOf,d=function(b){if(null==this)throw new TypeError;var d=String(this);if(b&&"[object RegExp]"==a.call(b))throw new TypeError;var e=d.length,f=String(b),g=f.length,h=arguments.length>1?arguments[1]:void 0,i=h?Number(h):0;i!=i&&(i=0);var j=Math.min(Math.max(i,0),e);return g+j>e?!1:-1!=c.call(d,f,i)};b?b(String.prototype,"includes",{value:d,configurable:!0,writable:!0}):String.prototype.includes=d}(),String.prototype.startsWith||!function(){var a=function(){try{var a={},b=Object.defineProperty,c=b(a,a,a)&&b}catch(d){}return c}(),b={}.toString,c=function(a){if(null==this)throw new TypeError;var c=String(this);if(a&&"[object RegExp]"==b.call(a))throw new TypeError;var d=c.length,e=String(a),f=e.length,g=arguments.length>1?arguments[1]:void 0,h=g?Number(g):0;h!=h&&(h=0);var i=Math.min(Math.max(h,0),d);if(f+i>d)return!1;for(var j=-1;++j'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1},e.prototype={constructor:e,init:function(){var b=this,c=this.$element.attr("id");this.$element.addClass("bs-select-hidden"),this.liObj={},this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newElement=this.createView(),this.$element.after(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(".dropdown-menu"),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.options.dropdownAlignRight&&this.$menu.addClass("dropdown-menu-right"),"undefined"!=typeof c&&(this.$button.attr("data-id",c),a('label[for="'+c+'"]').click(function(a){a.preventDefault(),b.$button.focus()})),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(a){b.$element.trigger("hide.bs.select",a)},"hidden.bs.dropdown":function(a){b.$element.trigger("hidden.bs.select",a)},"show.bs.dropdown":function(a){b.$element.trigger("show.bs.select",a)},"shown.bs.dropdown":function(a){b.$element.trigger("shown.bs.select",a)}}),setTimeout(function(){b.$element.trigger("loaded.bs.select")})},createDropdown:function(){var b=this.multiple?" show-tick":"",d=this.$element.parent().hasClass("input-group")?" input-group-btn":"",e=this.autofocus?" autofocus":"",f=this.options.header?'
        '+this.options.header+"
        ":"",g=this.options.liveSearch?'":"",h=this.multiple&&this.options.actionsBox?'
        ":"",i=this.multiple&&this.options.doneButton?'
        ":"",j='
        ";return a(j)},createView:function(){var a=this.createDropdown(),b=this.createLi();return a.find("ul")[0].innerHTML=b,a},reloadLi:function(){this.destroyLi();var a=this.createLi();this.$menuInner[0].innerHTML=a},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var d=this,e=[],f=0,g=document.createElement("option"),h=-1,i=function(a,b,c,d){return""+a+"
      • "},j=function(a,e,f,g){return'"+a+''};if(this.options.title&&!this.multiple&&(h--,!this.$element.find(".bs-title-option").length)){var k=this.$element[0];g.className="bs-title-option",g.appendChild(document.createTextNode(this.options.title)),g.value="",k.insertBefore(g,k.firstChild),void 0===a(k.options[k.selectedIndex]).attr("selected")&&(g.selected=!0)}return this.$element.find("option").each(function(b){var c=a(this);if(h++,!c.hasClass("bs-title-option")){var g=this.className||"",k=this.style.cssText,l=c.data("content")?c.data("content"):c.html(),m=c.data("tokens")?c.data("tokens"):null,n="undefined"!=typeof c.data("subtext")?''+c.data("subtext")+"":"",o="undefined"!=typeof c.data("icon")?' ':"",p=this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled;if(""!==o&&p&&(o=""+o+""),d.options.hideDisabled&&p)return void h--;if(c.data("content")||(l=o+''+l+n+""),"OPTGROUP"===this.parentNode.tagName&&c.data("divider")!==!0){var q=" "+this.parentNode.className||"";if(0===c.index()){f+=1;var r=this.parentNode.label,s="undefined"!=typeof c.parent().data("subtext")?''+c.parent().data("subtext")+"":"",t=c.parent().data("icon")?' ':"";r=t+''+r+s+"",0!==b&&e.length>0&&(h++,e.push(i("",null,"divider",f+"div"))),h++,e.push(i(r,null,"dropdown-header"+q,f))}e.push(i(j(l,"opt "+g+q,k,m),b,"",f))}else c.data("divider")===!0?e.push(i("",b,"divider")):c.data("hidden")===!0?e.push(i(j(l,g,k,m),b,"hidden is-hidden")):(this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName&&(h++,e.push(i("",null,"divider",f+"div"))),e.push(i(j(l,g,k,m),b)));d.liObj[b]=h}}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),e.join("")},findLis:function(){return null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(b){var c,d=this;b!==!1&&this.$element.find("option").each(function(a){var b=d.findLis().eq(d.liObj[a]);d.setDisabled(a,this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled,b),d.setSelected(a,this.selected,b)}),this.tabIndex();var e=this.$element.find("option").map(function(){if(this.selected){if(d.options.hideDisabled&&(this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled))return;var b,c=a(this),e=c.data("icon")&&d.options.showIcon?' ':"";return b=d.options.showSubtext&&c.data("subtext")&&!d.multiple?' '+c.data("subtext")+"":"","undefined"!=typeof c.attr("title")?c.attr("title"):c.data("content")&&d.options.showContent?c.data("content"):e+c.html()+b}}).toArray(),f=this.multiple?e.join(this.options.multipleSeparator):e[0];if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var g=this.options.selectedTextFormat.split(">");if(g.length>1&&e.length>g[1]||1==g.length&&e.length>=2){c=this.options.hideDisabled?", [disabled]":"";var h=this.$element.find("option").not('[data-divider="true"], [data-hidden="true"]'+c).length,i="function"==typeof this.options.countSelectedText?this.options.countSelectedText(e.length,h):this.options.countSelectedText;f=i.replace("{0}",e.length.toString()).replace("{1}",h.toString())}}void 0==this.options.title&&(this.options.title=this.$element.attr("title")),"static"==this.options.selectedTextFormat&&(f=this.options.title),f||(f="undefined"!=typeof this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",a.trim(f.replace(/<[^>]*>?/g,""))),this.$button.children(".filter-option").html(f),this.$element.trigger("rendered.bs.select")},setStyle:function(a,b){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var c=a?a:this.options.style;"add"==b?this.$button.addClass(c):"remove"==b?this.$button.removeClass(c):(this.$button.removeClass(this.options.style),this.$button.addClass(c))},liHeight:function(b){if(b||this.options.size!==!1&&!this.sizeInfo){var c=document.createElement("div"),d=document.createElement("div"),e=document.createElement("ul"),f=document.createElement("li"),g=document.createElement("li"),h=document.createElement("a"),i=document.createElement("span"),j=this.options.header&&this.$menu.find(".popover-title").length>0?this.$menu.find(".popover-title")[0].cloneNode(!0):null,k=this.options.liveSearch?document.createElement("div"):null,l=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,m=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;if(i.className="text",c.className=this.$menu[0].parentNode.className+" open",d.className="dropdown-menu open",e.className="dropdown-menu inner",f.className="divider",i.appendChild(document.createTextNode("Inner text")),h.appendChild(i),g.appendChild(h),e.appendChild(g),e.appendChild(f),j&&d.appendChild(j),k){var n=document.createElement("span");k.className="bs-searchbox",n.className="form-control",k.appendChild(n),d.appendChild(k)}l&&d.appendChild(l),d.appendChild(e),m&&d.appendChild(m),c.appendChild(d),document.body.appendChild(c);var o=h.offsetHeight,p=j?j.offsetHeight:0,q=k?k.offsetHeight:0,r=l?l.offsetHeight:0,s=m?m.offsetHeight:0,t=a(f).outerHeight(!0),u="function"==typeof getComputedStyle?getComputedStyle(d):!1,v=u?null:a(d),w=parseInt(u?u.paddingTop:v.css("paddingTop"))+parseInt(u?u.paddingBottom:v.css("paddingBottom"))+parseInt(u?u.borderTopWidth:v.css("borderTopWidth"))+parseInt(u?u.borderBottomWidth:v.css("borderBottomWidth")),x=w+parseInt(u?u.marginTop:v.css("marginTop"))+parseInt(u?u.marginBottom:v.css("marginBottom"))+2;document.body.removeChild(c),this.sizeInfo={liHeight:o,headerHeight:p,searchHeight:q,actionsHeight:r,doneButtonHeight:s,dividerHeight:t,menuPadding:w,menuExtras:x}}},setSize:function(){if(this.findLis(),this.liHeight(),this.options.header&&this.$menu.css("padding-top",0),this.options.size!==!1){var b,c,d,e,f=this,g=this.$menu,h=this.$menuInner,i=a(window),j=this.$newElement[0].offsetHeight,k=this.sizeInfo.liHeight,l=this.sizeInfo.headerHeight,m=this.sizeInfo.searchHeight,n=this.sizeInfo.actionsHeight,o=this.sizeInfo.doneButtonHeight,p=this.sizeInfo.dividerHeight,q=this.sizeInfo.menuPadding,r=this.sizeInfo.menuExtras,s=this.options.hideDisabled?".disabled":"",t=function(){d=f.$newElement.offset().top-i.scrollTop(),e=i.height()-d-j};if(t(),"auto"===this.options.size){var u=function(){var i,j=function(b,c){return function(d){return c?d.classList?d.classList.contains(b):a(d).hasClass(b):!(d.classList?d.classList.contains(b):a(d).hasClass(b))}},p=f.$menuInner[0].getElementsByTagName("li"),s=Array.prototype.filter?Array.prototype.filter.call(p,j("hidden",!1)):f.$lis.not(".hidden"),u=Array.prototype.filter?Array.prototype.filter.call(s,j("dropdown-header",!0)):s.filter(".dropdown-header");t(),b=e-r,f.options.container?(g.data("height")||g.data("height",g.height()),c=g.data("height")):c=g.height(),f.options.dropupAuto&&f.$newElement.toggleClass("dropup",d>e&&c>b-r),f.$newElement.hasClass("dropup")&&(b=d-r),i=s.length+u.length>3?3*k+r-2:0,g.css({"max-height":b+"px",overflow:"hidden","min-height":i+l+m+n+o+"px"}),h.css({"max-height":b-l-m-n-o-q+"px","overflow-y":"auto","min-height":Math.max(i-q,0)+"px"})};u(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",u),i.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",u)}else if(this.options.size&&"auto"!=this.options.size&&this.$lis.not(s).length>this.options.size){var v=this.$lis.not(".divider").not(s).children().slice(0,this.options.size).last().parent().index(),w=this.$lis.slice(0,v+1).filter(".divider").length;b=k*this.options.size+w*p+q,f.options.container?(g.data("height")||g.data("height",g.height()),c=g.data("height")):c=g.height(),f.options.dropupAuto&&this.$newElement.toggleClass("dropup",d>e&&c>b-r),g.css({"max-height":b+l+m+n+o+"px",overflow:"hidden","min-height":""}),h.css({"max-height":b-q+"px","overflow-y":"auto","min-height":""})}}},setWidth:function(){if("auto"===this.options.width){this.$menu.css("min-width","0");var a=this.$menu.parent().clone().appendTo("body"),b=this.options.container?this.$newElement.clone().appendTo("body"):a,c=a.children(".dropdown-menu").outerWidth(),d=b.css("width","auto").children("button").outerWidth();a.remove(),b.remove(),this.$newElement.css("width",Math.max(c,d)+"px")}else"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){this.$bsContainer=a('
        ');var b,c,d=this,e=function(a){d.$bsContainer.addClass(a.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",a.hasClass("dropup")),b=a.offset(),c=a.hasClass("dropup")?0:a[0].offsetHeight,d.$bsContainer.css({top:b.top+c,left:b.left,width:a[0].offsetWidth})};this.$newElement.on("click",function(){var b=a(this);d.isDisabled()||(e(b),d.$bsContainer.appendTo(d.options.container).toggleClass("open",!b.hasClass("open")).append(d.$menu))}),a(window).on("resize scroll",function(){e(d.$newElement)}),this.$element.on("hide.bs.select",function(){d.$menu.data("height",d.$menu.height()),d.$bsContainer.detach()})},setSelected:function(a,b,c){c||(c=this.findLis().eq(this.liObj[a])),c.toggleClass("selected",b)},setDisabled:function(a,b,c){c||(c=this.findLis().eq(this.liObj[a])),b?c.addClass("disabled").children("a").attr("href","#").attr("tabindex",-1):c.removeClass("disabled").children("a").removeAttr("href").attr("tabindex",0)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var a=this;this.isDisabled()?(this.$newElement.addClass("disabled"),this.$button.addClass("disabled").attr("tabindex",-1)):(this.$button.hasClass("disabled")&&(this.$newElement.removeClass("disabled"),this.$button.removeClass("disabled")),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex")),this.$button.click(function(){return!a.isDisabled()})},tabIndex:function(){this.$element.is("[tabindex]")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")))},clickListener:function(){var b=this,c=a(document);this.$newElement.on("touchstart.dropdown",".dropdown-menu",function(a){a.stopPropagation()}),c.data("spaceSelect",!1),this.$button.on("keyup",function(a){/(32)/.test(a.keyCode.toString(10))&&c.data("spaceSelect")&&(a.preventDefault(),c.data("spaceSelect",!1))}),this.$newElement.on("click",function(){b.setSize(),b.$element.on("shown.bs.select",function(){if(b.options.liveSearch||b.multiple){if(!b.multiple){var a=b.liObj[b.$element[0].selectedIndex];if("number"!=typeof a||b.options.size===!1)return;var c=b.$lis.eq(a)[0].offsetTop-b.$menuInner[0].offsetTop;c=c-b.$menuInner[0].offsetHeight/2+b.sizeInfo.liHeight/2,b.$menuInner[0].scrollTop=c}}else b.$menuInner.find(".selected a").focus()})}),this.$menuInner.on("click","li a",function(c){var d=a(this),e=d.parent().data("originalIndex"),f=b.$element.val(),g=b.$element.prop("selectedIndex");if(b.multiple&&c.stopPropagation(),c.preventDefault(),!b.isDisabled()&&!d.parent().hasClass("disabled")){var h=b.$element.find("option"),i=h.eq(e),j=i.prop("selected"),k=i.parent("optgroup"),l=b.options.maxOptions,m=k.data("maxOptions")||!1;if(b.multiple){if(i.prop("selected",!j),b.setSelected(e,!j),d.blur(),l!==!1||m!==!1){var n=l
        ');q[2]&&(r=r.replace("{var}",q[2][l>1?0:1]),s=s.replace("{var}",q[2][m>1?0:1])),i.prop("selected",!1),b.$menu.append(t),l&&n&&(t.append(a("
        "+r+"
        ")),b.$element.trigger("maxReached.bs.select")),m&&o&&(t.append(a("
        "+s+"
        ")),b.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){b.setSelected(e,!1)},10),t.delay(750).fadeOut(300,function(){a(this).remove()})}}}else h.prop("selected",!1),i.prop("selected",!0),b.$menuInner.find(".selected").removeClass("selected"),b.setSelected(e,!0);b.multiple?b.options.liveSearch&&b.$searchbox.focus():b.$button.focus(),(f!=b.$element.val()&&b.multiple||g!=b.$element.prop("selectedIndex")&&!b.multiple)&&(b.$element.triggerNative("change"),b.$element.trigger("changed.bs.select",[e,i.prop("selected"),j]))}}),this.$menu.on("click","li.disabled a, .popover-title, .popover-title :not(.close)",function(c){c.currentTarget==this&&(c.preventDefault(),c.stopPropagation(),b.options.liveSearch&&!a(c.target).hasClass("close")?b.$searchbox.focus():b.$button.focus())}),this.$menuInner.on("click",".divider, .dropdown-header",function(a){a.preventDefault(), +a.stopPropagation(),b.options.liveSearch?b.$searchbox.focus():b.$button.focus()}),this.$menu.on("click",".popover-title .close",function(){b.$button.click()}),this.$searchbox.on("click",function(a){a.stopPropagation()}),this.$menu.on("click",".actions-btn",function(c){b.options.liveSearch?b.$searchbox.focus():b.$button.focus(),c.preventDefault(),c.stopPropagation(),a(this).hasClass("bs-select-all")?b.selectAll():b.deselectAll(),b.$element.triggerNative("change")}),this.$element.change(function(){b.render(!1)})},liveSearchListener:function(){var d=this,e=a('
      • ');this.$newElement.on("click.dropdown.data-api touchstart.dropdown.data-api",function(){d.$menuInner.find(".active").removeClass("active"),d.$searchbox.val()&&(d.$searchbox.val(""),d.$lis.not(".is-hidden").removeClass("hidden"),e.parent().length&&e.remove()),d.multiple||d.$menuInner.find(".selected").addClass("active"),setTimeout(function(){d.$searchbox.focus()},10)}),this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",function(a){a.stopPropagation()}),this.$searchbox.on("input propertychange",function(){if(d.$searchbox.val()){var f=d.$lis.not(".is-hidden").removeClass("hidden").children("a");f=d.options.liveSearchNormalize?f.not(":a"+d._searchStyle()+'("'+b(d.$searchbox.val())+'")'):f.not(":"+d._searchStyle()+'("'+d.$searchbox.val()+'")'),f.parent().addClass("hidden"),d.$lis.filter(".dropdown-header").each(function(){var b=a(this),c=b.data("optgroup");0===d.$lis.filter("[data-optgroup="+c+"]").not(b).not(".hidden").length&&(b.addClass("hidden"),d.$lis.filter("[data-optgroup="+c+"div]").addClass("hidden"))});var g=d.$lis.not(".hidden");g.each(function(b){var c=a(this);c.hasClass("divider")&&(c.index()===g.first().index()||c.index()===g.last().index()||g.eq(b+1).hasClass("divider"))&&c.addClass("hidden")}),d.$lis.not(".hidden, .no-results").length?e.parent().length&&e.remove():(e.parent().length&&e.remove(),e.html(d.options.noneResultsText.replace("{0}",'"'+c(d.$searchbox.val())+'"')).show(),d.$menuInner.append(e))}else d.$lis.not(".is-hidden").removeClass("hidden"),e.parent().length&&e.remove();d.$lis.filter(".active").removeClass("active"),d.$searchbox.val()&&d.$lis.not(".hidden, .divider, .dropdown-header").eq(0).addClass("active").children("a").focus(),a(this).focus()})},_searchStyle:function(){var a={begins:"ibegins",startsWith:"ibegins"};return a[this.options.liveSearchStyle]||"icontains"},val:function(a){return"undefined"!=typeof a?(this.$element.val(a),this.render(),this.$element):this.$element.val()},changeAll:function(b){"undefined"==typeof b&&(b=!0),this.findLis();for(var c=this.$element.find("option"),d=this.$lis.not(".divider, .dropdown-header, .disabled, .hidden").toggleClass("selected",b),e=d.length,f=[],g=0;e>g;g++){var h=d[g].getAttribute("data-original-index");f[f.length]=c.eq(h)[0]}a(f).prop("selected",b),this.render(!1)},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},keydown:function(c){var d,e,f,g,h,i,j,k,l,m=a(this),n=m.is("input")?m.parent().parent():m.parent(),o=n.data("this"),p=":not(.disabled, .hidden, .dropdown-header, .divider)",q={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(o.options.liveSearch&&(n=m.parent().parent()),o.options.container&&(n=o.$menu),d=a("[role=menu] li",n),l=o.$menu.parent().hasClass("open"),!l&&(c.keyCode>=48&&c.keyCode<=57||c.keyCode>=96&&c.keyCode<=105||c.keyCode>=65&&c.keyCode<=90)&&(o.options.container?o.$newElement.trigger("click"):(o.setSize(),o.$menu.parent().addClass("open"),l=!0),o.$searchbox.focus()),o.options.liveSearch&&(/(^9$|27)/.test(c.keyCode.toString(10))&&l&&0===o.$menu.find(".active").length&&(c.preventDefault(),o.$menu.parent().removeClass("open"),o.options.container&&o.$newElement.removeClass("open"),o.$button.focus()),d=a("[role=menu] li"+p,n),m.val()||/(38|40)/.test(c.keyCode.toString(10))||0===d.filter(".active").length&&(d=o.$menuInner.find("li"),d=o.options.liveSearchNormalize?d.filter(":a"+o._searchStyle()+"("+b(q[c.keyCode])+")"):d.filter(":"+o._searchStyle()+"("+q[c.keyCode]+")"))),d.length){if(/(38|40)/.test(c.keyCode.toString(10)))e=d.index(d.find("a").filter(":focus").parent()),g=d.filter(p).first().index(),h=d.filter(p).last().index(),f=d.eq(e).nextAll(p).eq(0).index(),i=d.eq(e).prevAll(p).eq(0).index(),j=d.eq(f).prevAll(p).eq(0).index(),o.options.liveSearch&&(d.each(function(b){a(this).hasClass("disabled")||a(this).data("index",b)}),e=d.index(d.filter(".active")),g=d.first().data("index"),h=d.last().data("index"),f=d.eq(e).nextAll().eq(0).data("index"),i=d.eq(e).prevAll().eq(0).data("index"),j=d.eq(f).prevAll().eq(0).data("index")),k=m.data("prevIndex"),38==c.keyCode?(o.options.liveSearch&&e--,e!=j&&e>i&&(e=i),g>e&&(e=g),e==k&&(e=h)):40==c.keyCode&&(o.options.liveSearch&&e++,-1==e&&(e=0),e!=j&&f>e&&(e=f),e>h&&(e=h),e==k&&(e=g)),m.data("prevIndex",e),o.options.liveSearch?(c.preventDefault(),m.hasClass("dropdown-toggle")||(d.removeClass("active").eq(e).addClass("active").children("a").focus(),m.focus())):d.eq(e).children("a").focus();else if(!m.is("input")){var r,s,t=[];d.each(function(){a(this).hasClass("disabled")||a.trim(a(this).children("a").text().toLowerCase()).substring(0,1)==q[c.keyCode]&&t.push(a(this).index())}),r=a(document).data("keycount"),r++,a(document).data("keycount",r),s=a.trim(a(":focus").text().toLowerCase()).substring(0,1),s!=q[c.keyCode]?(r=1,a(document).data("keycount",r)):r>=t.length&&(a(document).data("keycount",0),r>t.length&&(r=1)),d.eq(t[r-1]).children("a").focus()}if((/(13|32)/.test(c.keyCode.toString(10))||/(^9$)/.test(c.keyCode.toString(10))&&o.options.selectOnTab)&&l){if(/(32)/.test(c.keyCode.toString(10))||c.preventDefault(),o.options.liveSearch)/(32)/.test(c.keyCode.toString(10))||(o.$menuInner.find(".active a").click(),m.focus());else{var u=a(":focus");u.click(),u.focus(),c.preventDefault(),a(document).data("spaceSelect",!0)}a(document).data("keycount",0)}(/(^9$|27)/.test(c.keyCode.toString(10))&&l&&(o.multiple||o.options.liveSearch)||/(27)/.test(c.keyCode.toString(10))&&!l)&&(o.$menu.parent().removeClass("open"),o.options.container&&o.$newElement.removeClass("open"),o.$button.focus())}},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement),this.options.container&&this.$menu.hide()},refresh:function(){this.$lis=null,this.liObj={},this.reloadLi(),this.render(),this.checkDisabled(),this.liHeight(!0),this.setStyle(),this.setWidth(),this.$lis&&this.$searchbox.trigger("propertychange"),this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};var f=a.fn.selectpicker;a.fn.selectpicker=d,a.fn.selectpicker.Constructor=e,a.fn.selectpicker.noConflict=function(){return a.fn.selectpicker=f,this},a(document).data("keycount",0).on("keydown.bs.select",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',e.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',function(a){a.stopPropagation()}),a(window).on("load.bs.select.data-api",function(){a(".selectpicker").each(function(){var b=a(this);d.call(b,b.data())})})}(a)}),angular.module("checklist-model",[]).directive("checklistModel",["$parse","$compile",function(a,b){function c(a,b,c){if(angular.isArray(a))for(var d=a.length;d--;)if(c(a[d],b))return!0;return!1}function d(a,b,d){return a=angular.isArray(a)?a:[],c(a,b,d)||a.push(b),a}function e(a,b,c){if(angular.isArray(a))for(var d=a.length;d--;)if(c(a[d],b)){a.splice(d,1);break}return a}function f(f,g,h){function i(a,b){f[h.ngModel]=c(a,n,o)}var j=h.checklistModel;h.$set("checklistModel",null),b(g)(f),h.$set("checklistModel",j);var k=a(j),l=k.assign,m=a(h.checklistChange),n=h.checklistValue?a(h.checklistValue)(f.$parent):h.value,o=angular.equals;if(h.hasOwnProperty("checklistComparator"))if("."==h.checklistComparator[0]){var p=h.checklistComparator.substring(1);o=function(a,b){return a[p]===b[p]}}else o=a(h.checklistComparator)(f.$parent);f.$watch(h.ngModel,function(a,b){if(a!==b){var c=k(f.$parent);angular.isFunction(l)&&(a===!0?l(f.$parent,d(c,n,o)):l(f.$parent,e(c,n,o))),m&&m(f)}}),angular.isFunction(f.$parent.$watchCollection)?f.$parent.$watchCollection(j,i):f.$parent.$watch(j,i,!0)}return{restrict:"A",priority:1e3,terminal:!0,scope:!0,compile:function(a,b){if(("INPUT"!==a[0].tagName||"checkbox"!==b.type)&&"MD-CHECKBOX"!==a[0].tagName&&!b.btnCheckbox)throw'checklist-model should be applied to `input[type="checkbox"]` or `md-checkbox`.';if(!b.checklistValue&&!b.value)throw"You should provide `value` or `checklist-value`.";return b.ngModel||b.$set("ngModel","checked"),f}}}]),function(a,b,c){"use strict";a.fn.backstretch=function(d,f){return d!==c&&0!==d.length||a.error("No images were supplied for Backstretch"),0===a(b).scrollTop()&&b.scrollTo(0,0),this.each(function(){var b=a(this),c=b.data("backstretch");if(c){if("string"==typeof d&&"function"==typeof c[d])return void c[d](f);f=a.extend(c.options,f),c.destroy(!0)}c=new e(this,d,f),b.data("backstretch",c)})},a.backstretch=function(b,c){return a("body").backstretch(b,c).data("backstretch")},a.expr[":"].backstretch=function(b){return a(b).data("backstretch")!==c},a.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5e3,fade:0};var d={wrap:{left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},img:{position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999}},e=function(c,e,g){this.options=a.extend({},a.fn.backstretch.defaults,g||{}),this.images=a.isArray(e)?e:[e],a.each(this.images,function(){a("")[0].src=this}),this.isBody=c===document.body,this.$container=a(c),this.$root=this.isBody?a(f?b:document):this.$container;var h=this.$container.children(".backstretch").first();if(this.$wrap=h.length?h:a('
        ').css(d.wrap).appendTo(this.$container),!this.isBody){var i=this.$container.css("position"),j=this.$container.css("zIndex");this.$container.css({position:"static"===i?"relative":i,zIndex:"auto"===j?0:j,background:"none"}),this.$wrap.css({zIndex:-999998})}this.$wrap.css({position:this.isBody&&f?"fixed":"absolute"}),this.index=0,this.show(this.index),a(b).on("resize.backstretch",a.proxy(this.resize,this)).on("orientationchange.backstretch",a.proxy(function(){this.isBody&&0===b.pageYOffset&&(b.scrollTo(0,1),this.resize())},this))};e.prototype={resize:function(){try{var a,c={left:0,top:0},d=this.isBody?this.$root.width():this.$root.innerWidth(),e=d,f=this.isBody?b.innerHeight?b.innerHeight:this.$root.height():this.$root.innerHeight(),g=e/this.$img.data("ratio");g>=f?(a=(g-f)/2,this.options.centeredY&&(c.top="-"+a+"px")):(g=f,e=g*this.$img.data("ratio"),a=(e-d)/2,this.options.centeredX&&(c.left="-"+a+"px")),this.$wrap.css({width:d,height:f}).find("img:not(.deleteable)").css({width:e,height:g}).css(c)}catch(h){}return this},show:function(b){if(!(Math.abs(b)>this.images.length-1)){var c=this,e=c.$wrap.find("img").addClass("deleteable"),f={relatedTarget:c.$container[0]};return c.$container.trigger(a.Event("backstretch.before",f),[c,b]),this.index=b,clearInterval(c.interval),c.$img=a("").css(d.img).bind("load",function(d){var g=this.width||a(d.target).width(),h=this.height||a(d.target).height();a(this).data("ratio",g/h),a(this).fadeIn(c.options.speed||c.options.fade,function(){e.remove(),c.paused||c.cycle(),a(["after","show"]).each(function(){c.$container.trigger(a.Event("backstretch."+this,f),[c,b])})}),c.resize()}).appendTo(c.$wrap),c.$img.attr("src",c.images[b]),c}},next:function(){return this.show(this.index1&&(clearInterval(this.interval),this.interval=setInterval(a.proxy(function(){this.paused||this.next()},this),this.options.duration)),this},destroy:function(c){a(b).off("resize.backstretch orientationchange.backstretch"),clearInterval(this.interval),c||this.$wrap.remove(),this.$container.removeData("backstretch")}};var f=function(){var a=navigator.userAgent,c=navigator.platform,d=a.match(/AppleWebKit\/([0-9]+)/),e=!!d&&d[1],f=a.match(/Fennec\/([0-9]+)/),g=!!f&&f[1],h=a.match(/Opera Mobi\/([0-9]+)/),i=!!h&&h[1],j=a.match(/MSIE ([0-9]+)/),k=!!j&&j[1];return!((c.indexOf("iPhone")>-1||c.indexOf("iPad")>-1||c.indexOf("iPod")>-1)&&e&&534>e||b.operamini&&"[object OperaMini]"==={}.toString.call(b.operamini)||h&&7458>i||a.indexOf("Android")>-1&&e&&533>e||g&&6>g||"palmGetResource"in b&&e&&534>e||a.indexOf("MeeGo")>-1&&a.indexOf("NokiaBrowser/8.5.0")>-1||k&&6>=k)}()}(jQuery,window),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}),function(a,b,c){function d(c){var d=b.console;f[c]||(f[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function e(b,c,e,f){if(Object.defineProperty)try{return void Object.defineProperty(b,c,{configurable:!0,enumerable:!0,get:function(){return d(f),e},set:function(a){d(f),e=a}})}catch(g){}a._definePropertyBroken=!0,b[c]=e}var f={};a.migrateWarnings=[],!a.migrateMute&&b.console&&b.console.log&&b.console.log("JQMIGRATE: Logging is active"),a.migrateTrace===c&&(a.migrateTrace=!0),a.migrateReset=function(){f={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&d("jQuery is not compatible with Quirks Mode");var g=a("",{size:1}).attr("size")&&a.attrFn,h=a.attr,i=a.attrHooks.value&&a.attrHooks.value.get||function(){return null},j=a.attrHooks.value&&a.attrHooks.value.set||function(){return c},k=/^(?:input|button)$/i,l=/^[238]$/,m=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,n=/^(?:checked|selected)$/i;e(a,"attrFn",g||{},"jQuery.attrFn is deprecated"),a.attr=function(b,e,f,i){var j=e.toLowerCase(),o=b&&b.nodeType;return i&&(h.length<4&&d("jQuery.fn.attr( props, pass ) is deprecated"),b&&!l.test(o)&&(g?e in g:a.isFunction(a.fn[e])))?a(b)[e](f):("type"===e&&f!==c&&k.test(b.nodeName)&&b.parentNode&&d("Can't change the 'type' of an input or button in IE 6/7/8"),!a.attrHooks[j]&&m.test(j)&&(a.attrHooks[j]={get:function(b,d){var e,f=a.prop(b,d);return f===!0||"boolean"!=typeof f&&(e=b.getAttributeNode(d))&&e.nodeValue!==!1?d.toLowerCase():c},set:function(b,c,d){var e;return c===!1?a.removeAttr(b,d):(e=a.propFix[d]||d,e in b&&(b[e]=!0),b.setAttribute(d,d.toLowerCase())),d}},n.test(j)&&d("jQuery.fn.attr('"+j+"') may use property instead of attribute")),h.call(a,b,e,f))},a.attrHooks.value={get:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?i.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value') no longer gets properties"),b in a?a.value:null)},set:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?j.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value', val) no longer sets properties"),void(a.value=b))}};var o,p,q=a.fn.init,r=a.parseJSON,s=/^([^<]*)(<[\w\W]+>)([^>]*)$/;a.fn.init=function(b,c,e){var f;return b&&"string"==typeof b&&!a.isPlainObject(c)&&(f=s.exec(a.trim(b)))&&f[0]&&("<"!==b.charAt(0)&&d("$(html) HTML strings must start with '<' character"),f[3]&&d("$(html) HTML text after last tag is ignored"),"#"===f[0].charAt(0)&&(d("HTML string cannot start with a '#' character"),a.error("JQMIGRATE: Invalid selector string (XSS)")),c&&c.context&&(c=c.context),a.parseHTML)?q.call(this,a.parseHTML(f[2],c,!0),c,e):q.apply(this,arguments)},a.fn.init.prototype=a.fn,a.parseJSON=function(a){return a||null===a?r.apply(this,arguments):(d("jQuery.parseJSON requires a valid JSON string"),null)},a.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a.browser||(o=a.uaMatch(navigator.userAgent),p={},o.browser&&(p[o.browser]=!0,p.version=o.version),p.chrome?p.webkit=!0:p.webkit&&(p.safari=!0),a.browser=p),e(a,"browser",a.browser,"jQuery.browser is deprecated"),a.sub=function(){function b(a,c){return new b.fn.init(a,c)}a.extend(!0,b,this),b.superclass=this,b.fn=b.prototype=this(),b.fn.constructor=b,b.sub=this.sub,b.fn.init=function(d,e){return e&&e instanceof a&&!(e instanceof b)&&(e=b(e)),a.fn.init.call(this,d,e,c)},b.fn.init.prototype=b.fn;var c=b(document);return d("jQuery.sub() is deprecated"),b},a.ajaxSetup({converters:{"text json":a.parseJSON}});var t=a.fn.data;a.fn.data=function(b){var e,f,g=this[0];return!g||"events"!==b||1!==arguments.length||(e=a.data(g,b),f=a._data(g,b),e!==c&&e!==f||f===c)?t.apply(this,arguments):(d("Use of jQuery.fn.data('events') is deprecated"),f)};var u=/\/(java|ecma)script/i,v=a.fn.andSelf||a.fn.addBack;a.fn.andSelf=function(){return d("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),v.apply(this,arguments)},a.clean||(a.clean=function(b,c,e,f){c=c||document,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,d("jQuery.clean() is deprecated");var g,h,i,j,k=[];if(a.merge(k,a.buildFragment(b,c).childNodes),e)for(i=function(a){return!a.type||u.test(a.type)?f?f.push(a.parentNode?a.parentNode.removeChild(a):a):e.appendChild(a):void 0},g=0;null!=(h=k[g]);g++)a.nodeName(h,"script")&&i(h)||(e.appendChild(h),"undefined"!=typeof h.getElementsByTagName&&(j=a.grep(a.merge([],h.getElementsByTagName("script")),i),k.splice.apply(k,[g+1,0].concat(j)),g+=j.length));return k});var w=a.event.add,x=a.event.remove,y=a.event.trigger,z=a.fn.toggle,A=a.fn.live,B=a.fn.die,C="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",D=new RegExp("\\b(?:"+C+")\\b"),E=/(?:^|\s)hover(\.\S+|)\b/,F=function(b){return"string"!=typeof b||a.event.special.hover?b:(E.test(b)&&d("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),b&&b.replace(E,"mouseenter$1 mouseleave$1"))};a.event.props&&"attrChange"!==a.event.props[0]&&a.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),a.event.dispatch&&e(a.event,"handle",a.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),a.event.add=function(a,b,c,e,f){a!==document&&D.test(b)&&d("AJAX events should be attached to document: "+b),w.call(this,a,F(b||""),c,e,f)},a.event.remove=function(a,b,c,d,e){x.call(this,a,F(b)||"",c,d,e)},a.fn.error=function(){var a=Array.prototype.slice.call(arguments,0);return d("jQuery.fn.error() is deprecated"),a.splice(0,0,"error"),arguments.length?this.bind.apply(this,a):(this.triggerHandler.apply(this,a),this)},a.fn.toggle=function(b,c){if(!a.isFunction(b)||!a.isFunction(c))return z.apply(this,arguments);d("jQuery.fn.toggle(handler, handler...) is deprecated");var e=arguments,f=b.guid||a.guid++,g=0,h=function(c){var d=(a._data(this,"lastToggle"+b.guid)||0)%g;return a._data(this,"lastToggle"+b.guid,d+1),c.preventDefault(),e[d].apply(this,arguments)||!1};for(h.guid=f;g").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."), +j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})}),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.fn.addBack=a.fn.addBack||a.fn.andSelf,a.fn.extend({actual:function(b,c){if(!this[b])throw'$.actual => The jQuery method "'+b+'" you called does not exist';var d,e,f={absolute:!1,clone:!1,includeMargin:!1,display:"block"},g=a.extend(f,c),h=this.eq(0);if(g.clone===!0)d=function(){var a="position: absolute !important; top: -1000 !important; ";h=h.clone().attr("style",a).appendTo("body")},e=function(){h.remove()};else{var i,j=[],k="";d=function(){i=h.parents().addBack().filter(":hidden"),k+="visibility: hidden !important; display: "+g.display+" !important; ",g.absolute===!0&&(k+="position: absolute !important; "),i.each(function(){var b=a(this),c=b.attr("style");j.push(c),b.attr("style",c?c+";"+k:k)})},e=function(){i.each(function(b){var c=a(this),d=j[b];void 0===d?c.removeAttr("style"):c.attr("style",d)})}}d();var l=/(outer)/.test(b)?h[b](g.includeMargin):h[b]();return e(),l}})}),function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return Hc.apply(null,arguments)}function b(a){Hc=a}function c(a){return"[object Array]"===Object.prototype.toString.call(a)}function d(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function e(a,b){var c,d=[];for(c=0;c0)for(c in Jc)d=Jc[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function n(b){m(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),Kc===!1&&(Kc=!0,a.updateOffset(this),Kc=!1)}function o(a){return a instanceof n||null!=a&&null!=a._isAMomentObject}function p(a){return 0>a?Math.ceil(a):Math.floor(a)}function q(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=p(b)),c}function r(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&q(a[d])!==q(b[d]))&&g++;return g+f}function s(){}function t(a){return a?a.toLowerCase().replace("_","-"):a}function u(a){for(var b,c,d,e,f=0;f0;){if(d=v(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&r(e,c,!0)>=b-1)break;b--}f++}return null}function v(a){var b=null;if(!Lc[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=Ic._abbr,require("./locale/"+a),w(b)}catch(c){}return Lc[a]}function w(a,b){var c;return a&&(c="undefined"==typeof b?y(a):x(a,b),c&&(Ic=c)),Ic._abbr}function x(a,b){return null!==b?(b.abbr=a,Lc[a]=Lc[a]||new s,Lc[a].set(b),w(a),Lc[a]):(delete Lc[a],null)}function y(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return Ic;if(!c(a)){if(b=v(a))return b;a=[a]}return u(a)}function z(a,b){var c=a.toLowerCase();Mc[c]=Mc[c+"s"]=Mc[b]=a}function A(a){return"string"==typeof a?Mc[a]||Mc[a.toLowerCase()]:void 0}function B(a){var b,c,d={};for(c in a)f(a,c)&&(b=A(c),b&&(d[b]=a[c]));return d}function C(b,c){return function(d){return null!=d?(E(this,b,d),a.updateOffset(this,c),this):D(this,b)}}function D(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function E(a,b,c){return a._d["set"+(a._isUTC?"UTC":"")+b](c)}function F(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else if(a=A(a),"function"==typeof this[a])return this[a](b);return this}function G(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function H(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Qc[a]=e),b&&(Qc[b[0]]=function(){return G(e.apply(this,arguments),b[1],b[2])}),c&&(Qc[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function I(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function J(a){var b,c,d=a.match(Nc);for(b=0,c=d.length;c>b;b++)Qc[d[b]]?d[b]=Qc[d[b]]:d[b]=I(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function K(a,b){return a.isValid()?(b=L(b,a.localeData()),Pc[b]=Pc[b]||J(b),Pc[b](a)):a.localeData().invalidDate()}function L(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Oc.lastIndex=0;d>=0&&Oc.test(a);)a=a.replace(Oc,c),Oc.lastIndex=0,d-=1;return a}function M(a){return"function"==typeof a&&"[object Function]"===Object.prototype.toString.call(a)}function N(a,b,c){dd[a]=M(b)?b:function(a){return a&&c?c:b}}function O(a,b){return f(dd,a)?dd[a](b._strict,b._locale):new RegExp(P(a))}function P(a){return a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=q(a)}),c=0;cd;d++){if(e=h([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function X(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),T(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function Y(b){return null!=b?(X(this,b),a.updateOffset(this,!0),this):D(this,"Month")}function Z(){return T(this.year(),this.month())}function $(a){var b,c=a._a;return c&&-2===j(a).overflow&&(b=c[gd]<0||c[gd]>11?gd:c[hd]<1||c[hd]>T(c[fd],c[gd])?hd:c[id]<0||c[id]>24||24===c[id]&&(0!==c[jd]||0!==c[kd]||0!==c[ld])?id:c[jd]<0||c[jd]>59?jd:c[kd]<0||c[kd]>59?kd:c[ld]<0||c[ld]>999?ld:-1,j(a)._overflowDayOfYear&&(fd>b||b>hd)&&(b=hd),j(a).overflow=b),a}function _(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function aa(a,b){var c=!0;return g(function(){return c&&(_(a+"\n"+(new Error).stack),c=!1),b.apply(this,arguments)},b)}function ba(a,b){od[a]||(_(b),od[a]=!0)}function ca(a){var b,c,d=a._i,e=pd.exec(d);if(e){for(j(a).iso=!0,b=0,c=qd.length;c>b;b++)if(qd[b][1].exec(d)){a._f=qd[b][0];break}for(b=0,c=rd.length;c>b;b++)if(rd[b][1].exec(d)){a._f+=(e[6]||" ")+rd[b][0];break}d.match(ad)&&(a._f+="Z"),va(a)}else a._isValid=!1}function da(b){var c=sd.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(ca(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}function ea(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function fa(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function ga(a){return ha(a)?366:365}function ha(a){return a%4===0&&a%100!==0||a%400===0}function ia(){return ha(this.year())}function ja(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=Da(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ka(a){return ja(a,this._week.dow,this._week.doy).week}function la(){return this._week.dow}function ma(){return this._week.doy}function na(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function oa(a){var b=ja(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function pa(a,b,c,d,e){var f,g=6+e-d,h=fa(a,0,1+g),i=h.getUTCDay();return e>i&&(i+=7),c=null!=c?1*c:e,f=1+g+7*(b-1)-i+c,{year:f>0?a:a-1,dayOfYear:f>0?f:ga(a-1)+f}}function qa(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function ra(a,b,c){return null!=a?a:null!=b?b:c}function sa(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function ta(a){var b,c,d,e,f=[];if(!a._d){for(d=sa(a),a._w&&null==a._a[hd]&&null==a._a[gd]&&ua(a),a._dayOfYear&&(e=ra(a._a[fd],d[fd]),a._dayOfYear>ga(e)&&(j(a)._overflowDayOfYear=!0),c=fa(e,0,a._dayOfYear),a._a[gd]=c.getUTCMonth(),a._a[hd]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[id]&&0===a._a[jd]&&0===a._a[kd]&&0===a._a[ld]&&(a._nextDay=!0,a._a[id]=0),a._d=(a._useUTC?fa:ea).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[id]=24)}}function ua(a){var b,c,d,e,f,g,h;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=ra(b.GG,a._a[fd],ja(Da(),1,4).year),d=ra(b.W,1),e=ra(b.E,1)):(f=a._locale._week.dow,g=a._locale._week.doy,c=ra(b.gg,a._a[fd],ja(Da(),f,g).year),d=ra(b.w,1),null!=b.d?(e=b.d,f>e&&++d):e=null!=b.e?b.e+f:f),h=pa(c,d,e,g,f),a._a[fd]=h.year,a._dayOfYear=h.dayOfYear}function va(b){if(b._f===a.ISO_8601)return void ca(b);b._a=[],j(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,k=0;for(e=L(b._f,b._locale).match(Nc)||[],c=0;c0&&j(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),k+=d.length),Qc[f]?(d?j(b).empty=!1:j(b).unusedTokens.push(f),S(f,d,b)):b._strict&&!d&&j(b).unusedTokens.push(f);j(b).charsLeftOver=i-k,h.length>0&&j(b).unusedInput.push(h),j(b).bigHour===!0&&b._a[id]<=12&&b._a[id]>0&&(j(b).bigHour=void 0),b._a[id]=wa(b._locale,b._a[id],b._meridiem),ta(b),$(b)}function wa(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function xa(a){var b,c,d,e,f;if(0===a._f.length)return j(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;ef)&&(d=f,c=b));g(a,c||b)}function ya(a){if(!a._d){var b=B(a._i);a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],ta(a)}}function za(a){var b=new n($(Aa(a)));return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function Aa(a){var b=a._i,e=a._f;return a._locale=a._locale||y(a._l),null===b||void 0===e&&""===b?l({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),o(b)?new n($(b)):(c(e)?xa(a):e?va(a):d(b)?a._d=b:Ba(a),a))}function Ba(b){var f=b._i;void 0===f?b._d=new Date:d(f)?b._d=new Date(+f):"string"==typeof f?da(b):c(f)?(b._a=e(f.slice(0),function(a){return parseInt(a,10)}),ta(b)):"object"==typeof f?ya(b):"number"==typeof f?b._d=new Date(f):a.createFromInputFallback(b)}function Ca(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,za(f)}function Da(a,b,c,d){return Ca(a,b,c,d,!1)}function Ea(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return Da();for(d=b[0],e=1;ea&&(a=-a,c="-"),c+G(~~(a/60),2)+b+G(~~a%60,2)})}function Ka(a){var b=(a||"").match(ad)||[],c=b[b.length-1]||[],d=(c+"").match(xd)||["-",0,0],e=+(60*d[1])+q(d[2]);return"+"===d[0]?e:-e}function La(b,c){var e,f;return c._isUTC?(e=c.clone(),f=(o(b)||d(b)?+b:+Da(b))-+e,e._d.setTime(+e._d+f),a.updateOffset(e,!1),e):Da(b).local()}function Ma(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Na(b,c){var d,e=this._offset||0;return null!=b?("string"==typeof b&&(b=Ka(b)),Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Ma(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?bb(this,Ya(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Ma(this)}function Oa(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Pa(a){return this.utcOffset(0,a)}function Qa(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Ma(this),"m")),this}function Ra(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ka(this._i)),this}function Sa(a){return a=a?Da(a).utcOffset():0,(this.utcOffset()-a)%60===0}function Ta(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ua(){if("undefined"!=typeof this._isDSTShifted)return this._isDSTShifted;var a={};if(m(a,this),a=Aa(a),a._a){var b=a._isUTC?h(a._a):Da(a._a);this._isDSTShifted=this.isValid()&&r(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Va(){return!this._isUTC}function Wa(){return this._isUTC}function Xa(){return this._isUTC&&0===this._offset}function Ya(a,b){var c,d,e,g=a,h=null;return Ia(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=yd.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:q(h[hd])*c,h:q(h[id])*c,m:q(h[jd])*c,s:q(h[kd])*c,ms:q(h[ld])*c}):(h=zd.exec(a))?(c="-"===h[1]?-1:1,g={y:Za(h[2],c),M:Za(h[3],c),d:Za(h[4],c),h:Za(h[5],c),m:Za(h[6],c),s:Za(h[7],c),w:Za(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=_a(Da(g.from),Da(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new Ha(g),Ia(a)&&f(a,"_locale")&&(d._locale=a._locale),d}function Za(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function $a(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function _a(a,b){var c;return b=La(b,a),a.isBefore(b)?c=$a(a,b):(c=$a(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function ab(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(ba(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Ya(c,d),bb(this,e,a),this}}function bb(b,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;e=null==e?!0:e,f&&b._d.setTime(+b._d+f*d),g&&E(b,"Date",D(b,"Date")+g*d),h&&X(b,D(b,"Month")+h*d),e&&a.updateOffset(b,g||h)}function cb(a,b){var c=a||Da(),d=La(c,this).startOf("day"),e=this.diff(d,"days",!0),f=-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse";return this.format(b&&b[f]||this.localeData().calendar(f,this,Da(c)))}function db(){return new n(this)}function eb(a,b){var c;return b=A("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=o(a)?a:Da(a),+this>+a):(c=o(a)?+a:+Da(a),c<+this.clone().startOf(b))}function fb(a,b){var c;return b=A("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=o(a)?a:Da(a),+a>+this):(c=o(a)?+a:+Da(a),+this.clone().endOf(b)b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function kb(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function lb(){var a=this.clone().utc();return 0b;b++)if(this._weekdaysParse[b]||(c=Da([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b}function Pb(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Kb(a,this.localeData()),this.add(a-b,"d")):b}function Qb(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function Rb(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)}function Sb(a,b){H(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function Tb(a,b){return b._meridiemParse}function Ub(a){return"p"===(a+"").toLowerCase().charAt(0); +}function Vb(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Wb(a,b){b[ld]=q(1e3*("0."+a))}function Xb(){return this._isUTC?"UTC":""}function Yb(){return this._isUTC?"Coordinated Universal Time":""}function Zb(a){return Da(1e3*a)}function $b(){return Da.apply(null,arguments).parseZone()}function _b(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.call(b,c):d}function ac(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function bc(){return this._invalidDate}function cc(a){return this._ordinal.replace("%d",a)}function dc(a){return a}function ec(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)}function fc(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)}function gc(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function hc(a,b,c,d){var e=y(),f=h().set(d,b);return e[c](f,a)}function ic(a,b,c,d,e){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return hc(a,b,c,e);var f,g=[];for(f=0;d>f;f++)g[f]=hc(a,f,c,e);return g}function jc(a,b){return ic(a,b,"months",12,"month")}function kc(a,b){return ic(a,b,"monthsShort",12,"month")}function lc(a,b){return ic(a,b,"weekdays",7,"day")}function mc(a,b){return ic(a,b,"weekdaysShort",7,"day")}function nc(a,b){return ic(a,b,"weekdaysMin",7,"day")}function oc(){var a=this._data;return this._milliseconds=Wd(this._milliseconds),this._days=Wd(this._days),this._months=Wd(this._months),a.milliseconds=Wd(a.milliseconds),a.seconds=Wd(a.seconds),a.minutes=Wd(a.minutes),a.hours=Wd(a.hours),a.months=Wd(a.months),a.years=Wd(a.years),this}function pc(a,b,c,d){var e=Ya(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function qc(a,b){return pc(this,a,b,1)}function rc(a,b){return pc(this,a,b,-1)}function sc(a){return 0>a?Math.floor(a):Math.ceil(a)}function tc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*sc(vc(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=p(f/1e3),i.seconds=a%60,b=p(a/60),i.minutes=b%60,c=p(b/60),i.hours=c%24,g+=p(c/24),e=p(uc(g)),h+=e,g-=sc(vc(e)),d=p(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function uc(a){return 4800*a/146097}function vc(a){return 146097*a/4800}function wc(a){var b,c,d=this._milliseconds;if(a=A(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+uc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(vc(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function xc(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12)}function yc(a){return function(){return this.as(a)}}function zc(a){return a=A(a),this[a+"s"]()}function Ac(a){return function(){return this._data[a]}}function Bc(){return p(this.days()/7)}function Cc(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function Dc(a,b,c){var d=Ya(a).abs(),e=ke(d.as("s")),f=ke(d.as("m")),g=ke(d.as("h")),h=ke(d.as("d")),i=ke(d.as("M")),j=ke(d.as("y")),k=e0,k[4]=c,Cc.apply(null,k)}function Ec(a,b){return void 0===le[a]?!1:void 0===b?le[a]:(le[a]=b,!0)}function Fc(a){var b=this.localeData(),c=Dc(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function Gc(){var a,b,c,d=me(this._milliseconds)/1e3,e=me(this._days),f=me(this._months);a=p(d/60),b=p(a/60),d%=60,a%=60,c=p(f/12),f%=12;var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var Hc,Ic,Jc=a.momentProperties=[],Kc=!1,Lc={},Mc={},Nc=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Oc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Pc={},Qc={},Rc=/\d/,Sc=/\d\d/,Tc=/\d{3}/,Uc=/\d{4}/,Vc=/[+-]?\d{6}/,Wc=/\d\d?/,Xc=/\d{1,3}/,Yc=/\d{1,4}/,Zc=/[+-]?\d{1,6}/,$c=/\d+/,_c=/[+-]?\d+/,ad=/Z|[+-]\d\d:?\d\d/gi,bd=/[+-]?\d+(\.\d{1,3})?/,cd=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,dd={},ed={},fd=0,gd=1,hd=2,id=3,jd=4,kd=5,ld=6;H("M",["MM",2],"Mo",function(){return this.month()+1}),H("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),H("MMMM",0,0,function(a){return this.localeData().months(this,a)}),z("month","M"),N("M",Wc),N("MM",Wc,Sc),N("MMM",cd),N("MMMM",cd),Q(["M","MM"],function(a,b){b[gd]=q(a)-1}),Q(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[gd]=e:j(c).invalidMonth=a});var md="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),nd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),od={};a.suppressDeprecationWarnings=!1;var pd=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,qd=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],rd=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],sd=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=aa("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),H(0,["YY",2],0,function(){return this.year()%100}),H(0,["YYYY",4],0,"year"),H(0,["YYYYY",5],0,"year"),H(0,["YYYYYY",6,!0],0,"year"),z("year","y"),N("Y",_c),N("YY",Wc,Sc),N("YYYY",Yc,Uc),N("YYYYY",Zc,Vc),N("YYYYYY",Zc,Vc),Q(["YYYYY","YYYYYY"],fd),Q("YYYY",function(b,c){c[fd]=2===b.length?a.parseTwoDigitYear(b):q(b)}),Q("YY",function(b,c){c[fd]=a.parseTwoDigitYear(b)}),a.parseTwoDigitYear=function(a){return q(a)+(q(a)>68?1900:2e3)};var td=C("FullYear",!1);H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),z("week","w"),z("isoWeek","W"),N("w",Wc),N("ww",Wc,Sc),N("W",Wc),N("WW",Wc,Sc),R(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=q(a)});var ud={dow:0,doy:6};H("DDD",["DDDD",3],"DDDo","dayOfYear"),z("dayOfYear","DDD"),N("DDD",Xc),N("DDDD",Tc),Q(["DDD","DDDD"],function(a,b,c){c._dayOfYear=q(a)}),a.ISO_8601=function(){};var vd=aa("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Da.apply(null,arguments);return this>a?this:a}),wd=aa("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Da.apply(null,arguments);return a>this?this:a});Ja("Z",":"),Ja("ZZ",""),N("Z",ad),N("ZZ",ad),Q(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Ka(a)});var xd=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var yd=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,zd=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Ya.fn=Ha.prototype;var Ad=ab(1,"add"),Bd=ab(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Cd=aa("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Db("gggg","weekYear"),Db("ggggg","weekYear"),Db("GGGG","isoWeekYear"),Db("GGGGG","isoWeekYear"),z("weekYear","gg"),z("isoWeekYear","GG"),N("G",_c),N("g",_c),N("GG",Wc,Sc),N("gg",Wc,Sc),N("GGGG",Yc,Uc),N("gggg",Yc,Uc),N("GGGGG",Zc,Vc),N("ggggg",Zc,Vc),R(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=q(a)}),R(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),H("Q",0,0,"quarter"),z("quarter","Q"),N("Q",Rc),Q("Q",function(a,b){b[gd]=3*(q(a)-1)}),H("D",["DD",2],"Do","date"),z("date","D"),N("D",Wc),N("DD",Wc,Sc),N("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),Q(["D","DD"],hd),Q("Do",function(a,b){b[hd]=q(a.match(Wc)[0],10)});var Dd=C("Date",!0);H("d",0,"do","day"),H("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),H("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),H("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),z("day","d"),z("weekday","e"),z("isoWeekday","E"),N("d",Wc),N("e",Wc),N("E",Wc),N("dd",cd),N("ddd",cd),N("dddd",cd),R(["dd","ddd","dddd"],function(a,b,c){var d=c._locale.weekdaysParse(a);null!=d?b.d=d:j(c).invalidWeekday=a}),R(["d","e","E"],function(a,b,c,d){b[d]=q(a)});var Ed="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Fd="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Gd="Su_Mo_Tu_We_Th_Fr_Sa".split("_");H("H",["HH",2],0,"hour"),H("h",["hh",2],0,function(){return this.hours()%12||12}),Sb("a",!0),Sb("A",!1),z("hour","h"),N("a",Tb),N("A",Tb),N("H",Wc),N("h",Wc),N("HH",Wc,Sc),N("hh",Wc,Sc),Q(["H","HH"],id),Q(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),Q(["h","hh"],function(a,b,c){b[id]=q(a),j(c).bigHour=!0});var Hd=/[ap]\.?m?\.?/i,Id=C("Hours",!0);H("m",["mm",2],0,"minute"),z("minute","m"),N("m",Wc),N("mm",Wc,Sc),Q(["m","mm"],jd);var Jd=C("Minutes",!1);H("s",["ss",2],0,"second"),z("second","s"),N("s",Wc),N("ss",Wc,Sc),Q(["s","ss"],kd);var Kd=C("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return 10*this.millisecond()}),H(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),H(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),H(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),H(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),H(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),z("millisecond","ms"),N("S",Xc,Rc),N("SS",Xc,Sc),N("SSS",Xc,Tc);var Ld;for(Ld="SSSS";Ld.length<=9;Ld+="S")N(Ld,$c);for(Ld="S";Ld.length<=9;Ld+="S")Q(Ld,Wb);var Md=C("Milliseconds",!1);H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var Nd=n.prototype;Nd.add=Ad,Nd.calendar=cb,Nd.clone=db,Nd.diff=ib,Nd.endOf=ub,Nd.format=mb,Nd.from=nb,Nd.fromNow=ob,Nd.to=pb,Nd.toNow=qb,Nd.get=F,Nd.invalidAt=Cb,Nd.isAfter=eb,Nd.isBefore=fb,Nd.isBetween=gb,Nd.isSame=hb,Nd.isValid=Ab,Nd.lang=Cd,Nd.locale=rb,Nd.localeData=sb,Nd.max=wd,Nd.min=vd,Nd.parsingFlags=Bb,Nd.set=F,Nd.startOf=tb,Nd.subtract=Bd,Nd.toArray=yb,Nd.toObject=zb,Nd.toDate=xb,Nd.toISOString=lb,Nd.toJSON=lb,Nd.toString=kb,Nd.unix=wb,Nd.valueOf=vb,Nd.year=td,Nd.isLeapYear=ia,Nd.weekYear=Fb,Nd.isoWeekYear=Gb,Nd.quarter=Nd.quarters=Jb,Nd.month=Y,Nd.daysInMonth=Z,Nd.week=Nd.weeks=na,Nd.isoWeek=Nd.isoWeeks=oa,Nd.weeksInYear=Ib,Nd.isoWeeksInYear=Hb,Nd.date=Dd,Nd.day=Nd.days=Pb,Nd.weekday=Qb,Nd.isoWeekday=Rb,Nd.dayOfYear=qa,Nd.hour=Nd.hours=Id,Nd.minute=Nd.minutes=Jd,Nd.second=Nd.seconds=Kd,Nd.millisecond=Nd.milliseconds=Md,Nd.utcOffset=Na,Nd.utc=Pa,Nd.local=Qa,Nd.parseZone=Ra,Nd.hasAlignedHourOffset=Sa,Nd.isDST=Ta,Nd.isDSTShifted=Ua,Nd.isLocal=Va,Nd.isUtcOffset=Wa,Nd.isUtc=Xa,Nd.isUTC=Xa,Nd.zoneAbbr=Xb,Nd.zoneName=Yb,Nd.dates=aa("dates accessor is deprecated. Use date instead.",Dd),Nd.months=aa("months accessor is deprecated. Use month instead",Y),Nd.years=aa("years accessor is deprecated. Use year instead",td),Nd.zone=aa("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Oa);var Od=Nd,Pd={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Qd={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Rd="Invalid date",Sd="%d",Td=/\d{1,2}/,Ud={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Vd=s.prototype;Vd._calendar=Pd,Vd.calendar=_b,Vd._longDateFormat=Qd,Vd.longDateFormat=ac,Vd._invalidDate=Rd,Vd.invalidDate=bc,Vd._ordinal=Sd,Vd.ordinal=cc,Vd._ordinalParse=Td,Vd.preparse=dc,Vd.postformat=dc,Vd._relativeTime=Ud,Vd.relativeTime=ec,Vd.pastFuture=fc,Vd.set=gc,Vd.months=U,Vd._months=md,Vd.monthsShort=V,Vd._monthsShort=nd,Vd.monthsParse=W,Vd.week=ka,Vd._week=ud,Vd.firstDayOfYear=ma,Vd.firstDayOfWeek=la,Vd.weekdays=Lb,Vd._weekdays=Ed,Vd.weekdaysMin=Nb,Vd._weekdaysMin=Gd,Vd.weekdaysShort=Mb,Vd._weekdaysShort=Fd,Vd.weekdaysParse=Ob,Vd.isPM=Ub,Vd._meridiemParse=Hd,Vd.meridiem=Vb,w("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===q(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=aa("moment.lang is deprecated. Use moment.locale instead.",w),a.langData=aa("moment.langData is deprecated. Use moment.localeData instead.",y);var Wd=Math.abs,Xd=yc("ms"),Yd=yc("s"),Zd=yc("m"),$d=yc("h"),_d=yc("d"),ae=yc("w"),be=yc("M"),ce=yc("y"),de=Ac("milliseconds"),ee=Ac("seconds"),fe=Ac("minutes"),ge=Ac("hours"),he=Ac("days"),ie=Ac("months"),je=Ac("years"),ke=Math.round,le={s:45,m:45,h:22,d:26,M:11},me=Math.abs,ne=Ha.prototype;ne.abs=oc,ne.add=qc,ne.subtract=rc,ne.as=wc,ne.asMilliseconds=Xd,ne.asSeconds=Yd,ne.asMinutes=Zd,ne.asHours=$d,ne.asDays=_d,ne.asWeeks=ae,ne.asMonths=be,ne.asYears=ce,ne.valueOf=xc,ne._bubble=tc,ne.get=zc,ne.milliseconds=de,ne.seconds=ee,ne.minutes=fe,ne.hours=ge,ne.days=he,ne.weeks=Bc,ne.months=ie,ne.years=je,ne.humanize=Fc,ne.toISOString=Gc,ne.toString=Gc,ne.toJSON=Gc,ne.locale=rb,ne.localeData=sb,ne.toIsoString=aa("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gc),ne.lang=Cd,H("X",0,0,"unix"),H("x",0,0,"valueOf"),N("x",_c),N("X",bd),Q("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),Q("x",function(a,b,c){c._d=new Date(q(a))}),a.version="2.10.6",b(Da),a.fn=Od,a.min=Fa,a.max=Ga,a.utc=h,a.unix=Zb,a.months=jc,a.isDate=d,a.locale=w,a.invalid=l,a.duration=Ya,a.isMoment=o,a.weekdays=lc,a.parseZone=$b,a.localeData=y,a.isDuration=Ia,a.monthsShort=kc,a.weekdaysMin=nc,a.defineLocale=x,a.weekdaysShort=mc,a.normalizeUnits=A,a.relativeTimeThreshold=Ec;var oe=a;return oe}),!function(a){angular.module("ngCsv.config",[]).value("ngCsv.config",{debug:!0}).config(["$compileProvider",function(a){angular.isDefined(a.urlSanitizationWhitelist)?a.urlSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/):a.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/)}]),angular.module("ngCsv.directives",["ngCsv.services"]),angular.module("ngCsv.services",[]),angular.module("ngCsv",["ngCsv.config","ngCsv.services","ngCsv.directives","ngSanitize"]),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ngCsv"),angular.module("ngCsv.services").service("CSV",["$q",function(a){var b="\r\n",c="\ufeff",d={"\\t":" ","\\b":"\b","\\v":"\x0B","\\f":"\f","\\r":"\r"};this.stringifyField=function(a,b){return"locale"===b.decimalSep&&this.isFloat(a)?a.toLocaleString():"."!==b.decimalSep&&this.isFloat(a)?a.toString().replace(".",b.decimalSep):"string"==typeof a?(a=a.replace(/"/g,'""'),(b.quoteStrings||a.indexOf(",")>-1||a.indexOf("\n")>-1||a.indexOf("\r")>-1)&&(a=b.txtDelim+a+b.txtDelim),a):"boolean"==typeof a?a?"TRUE":"FALSE":a},this.isFloat=function(a){return+a===a&&(!isFinite(a)||Boolean(a%1))},this.stringify=function(d,e){var f=a.defer(),g=this,h="",i="",j=a.when(d).then(function(a){if(angular.isDefined(e.header)&&e.header){var d,j;d=[],angular.forEach(e.header,function(a){this.push(g.stringifyField(a,e))},d),j=d.join(e.fieldSep?e.fieldSep:","),i+=j+b}var k=[];if(angular.isArray(a)?k=a:angular.isFunction(a)&&(k=a()),angular.isDefined(e.label)&&e.label&&"boolean"==typeof e.label){var l,m;l=[],angular.forEach(k[0],function(a,b){this.push(g.stringifyField(b,e))},l),m=l.join(e.fieldSep?e.fieldSep:","),i+=m+b}angular.forEach(k,function(a,c){var d,f,h=angular.copy(k[c]);f=[];var j=e.columnOrder?e.columnOrder:h;angular.forEach(j,function(a){var b=e.columnOrder?h[a]:a;this.push(g.stringifyField(b,e))},f),d=f.join(e.fieldSep?e.fieldSep:","),i+=c
      '),h=angular.element(g.children()[0]);h.attr("href",a.URL.createObjectURL(d)),h.attr("download",b.getFilename()),h.attr("target","_blank"),e.find("body").append(g),f(function(){h[0].click(),h.remove()},null)}}c.bind("click",function(){b.buildCSV().then(function(){d()}),b.$apply()})}}}])}(window,document),function(angular){"use strict";if(!angular)throw"Missing something? Please add angular.js to your project or move this script below the angular.js reference";var directiveId="ngRemoteValidate",remoteValidate=function($http,$timeout,$q){return{restrict:"A",require:["^form","ngModel"],scope:{ngRemoteInterceptors:"=?"},link:function(scope,el,attrs,ctrls){var cache={},handleChange,setValidation,addToCache,request,shouldProcess,ngForm=ctrls[0],ngModel=ctrls[1],options={ngRemoteThrottle:400,ngRemoteMethod:"POST"};angular.extend(options,attrs),"["===options.ngRemoteValidate.charAt(0)?options.urls=eval(options.ngRemoteValidate):"{"===options.ngRemoteValidate.charAt(0)?(options.keys=eval("("+options.ngRemoteValidate+")"),options.urls=Object.keys(options.keys)):options.urls=[options.ngRemoteValidate],addToCache=function(a){var b=a[0].data.value;return cache[b]?cache[b]:void(cache[b]=a)},shouldProcess=function(a){var b=!1;for(var c in ngModel.$error){var d=!options.hasOwnProperty("keys")||!Object.keys(options.keys).filter(function(a){return options.keys[a]===c})[0];if(ngModel.$error[c]&&c!=directiveId&&d){b=!0;break}}return!(ngModel.$pristine||b)},setValidation=function(a,b){for(var c=0,d=a.length,e=options.hasOwnProperty("keys"),f=!0;d>c&&(scope.ngRemoteInterceptors&&scope.ngRemoteInterceptors.response&&(a[c]=scope.ngRemoteInterceptors.response(a[c])),a[c].data.isValid||(f=!1,e));c++){var g=e&&a[c].hasOwnProperty("config")&&options.keys[a[c].config.url];if(g){var h=options.keys[a[c].config.url];ngModel.$setValidity(h,a[c].data.isValid)}}b||addToCache(a),ngModel.$setValidity(directiveId,f),ngModel.$processing=ngModel.$pending=ngForm.$pending=!1},handleChange=function(a){return"undefined"==typeof a||""===a?void ngModel.$setPristine():shouldProcess(a)?cache[a]?setValidation(cache[a],!0):(ngModel.$pending||(ngModel.$processing=ngModel.$pending=ngForm.$pending=!0),request&&$timeout.cancel(request),request=$timeout(function(){var b=[],c=0,d=options.urls.length,e={value:a},f={method:options.ngRemoteMethod};for(scope[el[0].name+"SetArgs"]&&(e=scope[el[0].name+"SetArgs"](a,el,attrs,ngModel)),"POST"==options.ngRemoteMethod?f.data=e:f.params=e;d>c;c++)f.url=options.urls[c],scope.ngRemoteInterceptors&&scope.ngRemoteInterceptors.request&&(f=scope.ngRemoteInterceptors.request(f)),b.push($http(f));$q.all(b).then(setValidation)},options.ngRemoteThrottle),!0):setValidation([{data:{isValid:!0,value:a}}],!0)},scope.$watch(function(){return ngModel.$viewValue},handleChange)}}};angular.module("remoteValidation",[]).constant("MODULE_VERSION","0.6.1").directive(directiveId,["$http","$timeout","$q",remoteValidate])}(this.angular),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),function(a){"undefined"!=typeof module&&module.exports?module.exports=a:a(jQuery,window,document)}(function(a){!function(b){var c="function"==typeof define&&define.amd,d="undefined"!=typeof module&&module.exports,e="https:"==document.location.protocol?"https:":"http:",f="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";c||(d?require("jquery-mousewheel")(a):a.event.special.mousewheel||a("head").append(decodeURI("%3Cscript src="+e+"//"+f+"%3E%3C/script%3E"))),b()}(function(){var b,c="mCustomScrollbar",d="mCS",e=".mCustomScrollbar",f={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},g=0,h={},i=window.attachEvent&&!window.addEventListener?1:0,j=!1,k=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],l={init:function(b){var b=a.extend(!0,{},f,b),c=m.call(this);if(b.live){var i=b.liveSelector||this.selector||e,j=a(i);if("off"===b.live)return void o(i);h[i]=setTimeout(function(){j.mCustomScrollbar(b),"once"===b.live&&j.length&&o(i)},500)}else o(i);return b.setWidth=b.set_width?b.set_width:b.setWidth,b.setHeight=b.set_height?b.set_height:b.setHeight,b.axis=b.horizontalScroll?"x":p(b.axis),b.scrollInertia=b.scrollInertia>0&&b.scrollInertia<17?17:b.scrollInertia,"object"!=typeof b.mouseWheel&&1==b.mouseWheel&&(b.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),b.mouseWheel.scrollAmount=b.mouseWheelPixels?b.mouseWheelPixels:b.mouseWheel.scrollAmount,b.mouseWheel.normalizeDelta=b.advanced.normalizeMouseWheelDelta?b.advanced.normalizeMouseWheelDelta:b.mouseWheel.normalizeDelta,b.scrollButtons.scrollType=q(b.scrollButtons.scrollType),n(b),a(c).each(function(){var c=a(this);if(!c.data(d)){c.data(d,{idx:++g,opt:b,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:c.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=c.data(d),f=e.opt,h=c.data("mcs-axis"),i=c.data("mcs-scrollbar-position"),j=c.data("mcs-theme");h&&(f.axis=h),i&&(f.scrollbarPosition=i),j&&(f.theme=j,n(f)),r.call(this),e&&f.callbacks.onCreate&&"function"==typeof f.callbacks.onCreate&&f.callbacks.onCreate.call(this),a("#mCSB_"+e.idx+"_container img:not(."+k[2]+")").addClass(k[2]),l.update.call(null,c)}})},update:function(b,c){var e=b||m.call(this);return a(e).each(function(){var b=a(this);if(b.data(d)){var e=b.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container"),h=a("#mCSB_"+e.idx),i=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];if(!g.length)return;e.tweenRunning&&U(b),c&&e&&f.callbacks.onBeforeUpdate&&"function"==typeof f.callbacks.onBeforeUpdate&&f.callbacks.onBeforeUpdate.call(this),b.hasClass(k[3])&&b.removeClass(k[3]),b.hasClass(k[4])&&b.removeClass(k[4]),h.css("max-height","none"),h.height()!==b.height()&&h.css("max-height",b.height()),t.call(this),"y"===f.axis||f.advanced.autoExpandHorizontalScroll||g.css("width",s(g)),e.overflowed=y.call(this),C.call(this),f.autoDraggerLength&&v.call(this),w.call(this),A.call(this);var j=[Math.abs(g[0].offsetTop),Math.abs(g[0].offsetLeft)];"x"!==f.axis&&(e.overflowed[0]?i[0].height()>i[0].parent().height()?z.call(this):(V(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(z.call(this),"y"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[1]&&V(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==f.axis&&(e.overflowed[1]?i[1].width()>i[1].parent().width()?z.call(this):(V(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(z.call(this),"x"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[0]&&V(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),c&&e&&(2===c&&f.callbacks.onImageLoad&&"function"==typeof f.callbacks.onImageLoad?f.callbacks.onImageLoad.call(this):3===c&&f.callbacks.onSelectorChange&&"function"==typeof f.callbacks.onSelectorChange?f.callbacks.onSelectorChange.call(this):f.callbacks.onUpdate&&"function"==typeof f.callbacks.onUpdate&&f.callbacks.onUpdate.call(this)),S.call(this)}})},scrollTo:function(b,c){if("undefined"!=typeof b&&null!=b){var e=m.call(this);return a(e).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h={trigger:"external",scrollInertia:g.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=a.extend(!0,{},h,c),j=Q.call(this,b),k=i.scrollInertia>0&&i.scrollInertia<17?17:i.scrollInertia;j[0]=R.call(this,j[0],"y"),j[1]=R.call(this,j[1],"x"),i.moveDragger&&(j[0]*=f.scrollRatio.y,j[1]*=f.scrollRatio.x),i.dur=ca()?0:k,setTimeout(function(){null!==j[0]&&"undefined"!=typeof j[0]&&"x"!==g.axis&&f.overflowed[0]&&(i.dir="y",i.overwrite="all",V(e,j[0].toString(),i)),null!==j[1]&&"undefined"!=typeof j[1]&&"y"!==g.axis&&f.overflowed[1]&&(i.dir="x",i.overwrite="none",V(e,j[1].toString(),i))},i.timeout)}})}},stop:function(){var b=m.call(this);return a(b).each(function(){var b=a(this);b.data(d)&&U(b)})},disable:function(b){var c=m.call(this);return a(c).each(function(){var c=a(this);if(c.data(d)){c.data(d);S.call(this,"remove"),B.call(this),b&&z.call(this),C.call(this,!0),c.addClass(k[3])}})},destroy:function(){var b=m.call(this);return a(b).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx),i=a("#mCSB_"+f.idx+"_container"),j=a(".mCSB_"+f.idx+"_scrollbar");g.live&&o(g.liveSelector||a(b).selector),S.call(this,"remove"),B.call(this),z.call(this),e.removeData(d),Z(this,"mcs"),j.remove(),i.find("img."+k[2]).removeClass(k[2]),h.replaceWith(i.contents()),e.removeClass(c+" _"+d+"_"+f.idx+" "+k[6]+" "+k[7]+" "+k[5]+" "+k[3]).addClass(k[4])}})}},m=function(){return"object"!=typeof a(this)||a(this).length<1?e:this},n=function(b){var c=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],d=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],e=["minimal","minimal-dark"],f=["minimal","minimal-dark"],g=["minimal","minimal-dark"];b.autoDraggerLength=a.inArray(b.theme,c)>-1?!1:b.autoDraggerLength,b.autoExpandScrollbar=a.inArray(b.theme,d)>-1?!1:b.autoExpandScrollbar,b.scrollButtons.enable=a.inArray(b.theme,e)>-1?!1:b.scrollButtons.enable,b.autoHideScrollbar=a.inArray(b.theme,f)>-1?!0:b.autoHideScrollbar,b.scrollbarPosition=a.inArray(b.theme,g)>-1?"outside":b.scrollbarPosition},o=function(a){h[a]&&(clearTimeout(h[a]),Z(h,a))},p=function(a){return"yx"===a||"xy"===a||"auto"===a?"yx":"x"===a||"horizontal"===a?"x":"y"},q=function(a){return"stepped"===a||"pixels"===a||"step"===a||"click"===a?"stepped":"stepless"},r=function(){var b=a(this),e=b.data(d),f=e.opt,g=f.autoExpandScrollbar?" "+k[1]+"_expand":"",h=["
      ","
      "],i="yx"===f.axis?"mCSB_vertical_horizontal":"x"===f.axis?"mCSB_horizontal":"mCSB_vertical",j="yx"===f.axis?h[0]+h[1]:"x"===f.axis?h[1]:h[0],l="yx"===f.axis?"
      ":"",m=f.autoHideScrollbar?" "+k[6]:"",n="x"!==f.axis&&"rtl"===e.langDir?" "+k[7]:""; +f.setWidth&&b.css("width",f.setWidth),f.setHeight&&b.css("height",f.setHeight),f.setLeft="y"!==f.axis&&"rtl"===e.langDir?"989999px":f.setLeft,b.addClass(c+" _"+d+"_"+e.idx+m+n).wrapInner("
      ");var o=a("#mCSB_"+e.idx),p=a("#mCSB_"+e.idx+"_container");"y"===f.axis||f.advanced.autoExpandHorizontalScroll||p.css("width",s(p)),"outside"===f.scrollbarPosition?("static"===b.css("position")&&b.css("position","relative"),b.css("overflow","visible"),o.addClass("mCSB_outside").after(j)):(o.addClass("mCSB_inside").append(j),p.wrap(l)),u.call(this);var q=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];q[0].css("min-height",q[0].height()),q[1].css("min-width",q[1].width())},s=function(b){var c=[b[0].scrollWidth,Math.max.apply(Math,b.children().map(function(){return a(this).outerWidth(!0)}).get())],d=b.parent().width();return c[0]>d?c[0]:c[1]>d?c[1]:"100%"},t=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx+"_container");if(e.advanced.autoExpandHorizontalScroll&&"y"!==e.axis){f.css({width:"auto","min-width":0,"overflow-x":"scroll"});var g=Math.ceil(f[0].scrollWidth);3===e.advanced.autoExpandHorizontalScroll||2!==e.advanced.autoExpandHorizontalScroll&&g>f.parent().width()?f.css({width:g,"min-width":"100%","overflow-x":"inherit"}):f.css({"overflow-x":"inherit",position:"absolute"}).wrap("
      ").css({width:Math.ceil(f[0].getBoundingClientRect().right+.4)-Math.floor(f[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},u=function(){var b=a(this),c=b.data(d),e=c.opt,f=a(".mCSB_"+c.idx+"_scrollbar:first"),g=aa(e.scrollButtons.tabindex)?"tabindex='"+e.scrollButtons.tabindex+"'":"",h=["","","",""],i=["x"===e.axis?h[2]:h[0],"x"===e.axis?h[3]:h[1],h[2],h[3]];e.scrollButtons.enable&&f.prepend(i[0]).append(i[1]).next(".mCSB_scrollTools").prepend(i[2]).append(i[3])},v=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[e.height()/f.outerHeight(!1),e.width()/f.outerWidth(!1)],j=[parseInt(g[0].css("min-height")),Math.round(h[0]*g[0].parent().height()),parseInt(g[1].css("min-width")),Math.round(h[1]*g[1].parent().width())],k=i&&j[1]g&&(g=i),j>h&&(h=j),[g>e.height(),h>e.width()]},z=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx),g=a("#mCSB_"+c.idx+"_container"),h=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")];if(U(b),("x"!==e.axis&&!c.overflowed[0]||"y"===e.axis&&c.overflowed[0])&&(h[0].add(g).css("top",0),V(b,"_resetY")),"y"!==e.axis&&!c.overflowed[1]||"x"===e.axis&&c.overflowed[1]){var i=dx=0;"rtl"===c.langDir&&(i=f.width()-g.outerWidth(!1),dx=Math.abs(i/c.scrollRatio.x)),g.css("left",i),h[1].css("left",dx),V(b,"_resetX")}},A=function(){function b(){g=setTimeout(function(){a.event.special.mousewheel?(clearTimeout(g),H.call(c[0])):b()},100)}var c=a(this),e=c.data(d),f=e.opt;if(!e.bindEvents){if(E.call(this),f.contentTouchScroll&&F.call(this),G.call(this),f.mouseWheel.enable){var g;b()}K.call(this),M.call(this),f.advanced.autoScrollOnFocus&&L.call(this),f.scrollButtons.enable&&N.call(this),f.keyboard.enable&&O.call(this),e.bindEvents=!0}},B=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=".mCSB_"+c.idx+"_scrollbar",h=a("#mCSB_"+c.idx+",#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,"+g+" ."+k[12]+",#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal,"+g+">a"),i=a("#mCSB_"+c.idx+"_container");e.advanced.releaseDraggableSelectors&&h.add(a(e.advanced.releaseDraggableSelectors)),e.advanced.extraDraggableSelectors&&h.add(a(e.advanced.extraDraggableSelectors)),c.bindEvents&&(a(document).add(a(!I()||top.document)).unbind("."+f),h.each(function(){a(this).unbind("."+f)}),clearTimeout(b[0]._focusTimeout),Z(b[0],"_focusTimeout"),clearTimeout(c.sequential.step),Z(c.sequential,"step"),clearTimeout(i[0].onCompleteTimeout),Z(i[0],"onCompleteTimeout"),c.bindEvents=!1)},C=function(b){var c=a(this),e=c.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container_wrapper"),h=g.length?g:a("#mCSB_"+e.idx+"_container"),i=[a("#mCSB_"+e.idx+"_scrollbar_vertical"),a("#mCSB_"+e.idx+"_scrollbar_horizontal")],j=[i[0].find(".mCSB_dragger"),i[1].find(".mCSB_dragger")];"x"!==f.axis&&(e.overflowed[0]&&!b?(i[0].add(j[0]).add(i[0].children("a")).css("display","block"),h.removeClass(k[8]+" "+k[10])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[0].css("display","none"),h.removeClass(k[10])):(i[0].css("display","none"),h.addClass(k[10])),h.addClass(k[8]))),"y"!==f.axis&&(e.overflowed[1]&&!b?(i[1].add(j[1]).add(i[1].children("a")).css("display","block"),h.removeClass(k[9]+" "+k[11])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[1].css("display","none"),h.removeClass(k[11])):(i[1].css("display","none"),h.addClass(k[11])),h.addClass(k[9]))),e.overflowed[0]||e.overflowed[1]?c.removeClass(k[5]):c.addClass(k[5])},D=function(b){var c=b.type,d=b.target.ownerDocument!==document?[a(frameElement).offset().top,a(frameElement).offset().left]:null,e=I()&&b.target.ownerDocument!==top.document?[a(b.view.frameElement).offset().top,a(b.view.frameElement).offset().left]:[0,0];switch(c){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return d?[b.originalEvent.pageY-d[0]+e[0],b.originalEvent.pageX-d[1]+e[1],!1]:[b.originalEvent.pageY,b.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var f=b.originalEvent.touches[0]||b.originalEvent.changedTouches[0],g=b.originalEvent.touches.length||b.originalEvent.changedTouches.length;return b.target.ownerDocument!==document?[f.screenY,f.screenX,g>1]:[f.pageY,f.pageX,g>1];default:return d?[b.pageY-d[0]+e[0],b.pageX-d[1]+e[1],!1]:[b.pageY,b.pageX,!1]}},E=function(){function b(a){var b=o.find("iframe");if(b.length){var c=a?"auto":"none";b.css("pointer-events",c)}}function c(a,b,c,d){if(o[0].idleTimer=l.scrollInertia<233?250:0,e.attr("id")===n[1])var f="x",g=(e[0].offsetLeft-b+d)*k.scrollRatio.x;else var f="y",g=(e[0].offsetTop-a+c)*k.scrollRatio.y;V(h,g.toString(),{dir:f,drag:!0})}var e,f,g,h=a(this),k=h.data(d),l=k.opt,m=d+"_"+k.idx,n=["mCSB_"+k.idx+"_dragger_vertical","mCSB_"+k.idx+"_dragger_horizontal"],o=a("#mCSB_"+k.idx+"_container"),p=a("#"+n[0]+",#"+n[1]),q=l.advanced.releaseDraggableSelectors?p.add(a(l.advanced.releaseDraggableSelectors)):p,r=l.advanced.extraDraggableSelectors?a(!I()||top.document).add(a(l.advanced.extraDraggableSelectors)):a(!I()||top.document);p.bind("mousedown."+m+" touchstart."+m+" pointerdown."+m+" MSPointerDown."+m,function(c){if(c.stopImmediatePropagation(),c.preventDefault(),$(c)){j=!0,i&&(document.onselectstart=function(){return!1}),b(!1),U(h),e=a(this);var d=e.offset(),k=D(c)[0]-d.top,m=D(c)[1]-d.left,n=e.height()+d.top,o=e.width()+d.left;n>k&&k>0&&o>m&&m>0&&(f=k,g=m),x(e,"active",l.autoExpandScrollbar)}}).bind("touchmove."+m,function(a){a.stopImmediatePropagation(),a.preventDefault();var b=e.offset(),d=D(a)[0]-b.top,h=D(a)[1]-b.left;c(f,g,d,h)}),a(document).add(r).bind("mousemove."+m+" pointermove."+m+" MSPointerMove."+m,function(a){if(e){var b=e.offset(),d=D(a)[0]-b.top,h=D(a)[1]-b.left;if(f===d&&g===h)return;c(f,g,d,h)}}).add(q).bind("mouseup."+m+" touchend."+m+" pointerup."+m+" MSPointerUp."+m,function(a){e&&(x(e,"active",l.autoExpandScrollbar),e=null),j=!1,i&&(document.onselectstart=null),b(!0)})},F=function(){function c(a){if(!_(a)||j||D(a)[2])return void(b=0);b=1,w=0,x=0,k=1,y.removeClass("mCS_touch_action");var c=E.offset();l=D(a)[0]-c.top,m=D(a)[1]-c.left,L=[D(a)[0],D(a)[1]]}function e(a){if(_(a)&&!j&&!D(a)[2]&&(A.documentTouchScroll||a.preventDefault(),a.stopImmediatePropagation(),(!x||w)&&k)){q=X();var b=C.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left,e="mcsLinearOut";if(G.push(c),H.push(d),L[2]=Math.abs(D(a)[0]-L[0]),L[3]=Math.abs(D(a)[1]-L[1]),z.overflowed[0])var f=F[0].parent().height()-F[0].height(),g=l-c>0&&c-l>-(f*z.scrollRatio.y)&&(2*L[3]0&&d-m>-(h*z.scrollRatio.x)&&(2*L[2]30)){t=1e3/(r-p);var e="mcsEaseOut",f=2.5>t,g=f?[G[G.length-2],H[H.length-2]]:[0,0];s=f?[c-g[0],d-g[1]]:[c-n,d-o];var l=[Math.abs(s[0]),Math.abs(s[1])];t=f?[Math.abs(s[0]/4),Math.abs(s[1]/4)]:[t,t];var m=[Math.abs(E[0].offsetTop)-s[0]*h(l[0]/t[0],t[0]),Math.abs(E[0].offsetLeft)-s[1]*h(l[1]/t[1],t[1])];u="yx"===A.axis?[m[0],m[1]]:"x"===A.axis?[null,m[1]]:[m[0],null],v=[4*l[0]+A.scrollInertia,4*l[1]+A.scrollInertia];var y=parseInt(A.contentTouchScroll)||0;u[0]=l[0]>y?u[0]:0,u[1]=l[1]>y?u[1]:0,z.overflowed[0]&&i(u[0],v[0],e,"y",K,!1),z.overflowed[1]&&i(u[1],v[1],e,"x",K,!1)}}}function h(a,b){var c=[1.5*b,2*b,b/1.5,b/2];return a>90?b>4?c[0]:c[3]:a>60?b>3?c[3]:c[2]:a>30?b>8?c[1]:b>6?c[0]:b>4?b:c[2]:b>8?b:c[3]}function i(a,b,c,d,e,f){a&&V(y,a.toString(),{dur:b,scrollEasing:c,dir:d,overwrite:e,drag:f})}var k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=a(this),z=y.data(d),A=z.opt,B=d+"_"+z.idx,C=a("#mCSB_"+z.idx),E=a("#mCSB_"+z.idx+"_container"),F=[a("#mCSB_"+z.idx+"_dragger_vertical"),a("#mCSB_"+z.idx+"_dragger_horizontal")],G=[],H=[],J=0,K="yx"===A.axis?"none":"all",L=[],M=E.find("iframe"),N=["touchstart."+B+" pointerdown."+B+" MSPointerDown."+B,"touchmove."+B+" pointermove."+B+" MSPointerMove."+B,"touchend."+B+" pointerup."+B+" MSPointerUp."+B],O=void 0!==document.body.style.touchAction;E.bind(N[0],function(a){c(a)}).bind(N[1],function(a){e(a)}),C.bind(N[0],function(a){f(a)}).bind(N[2],function(a){g(a)}),M.length&&M.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind(N[0],function(a){c(a),f(a)}).bind(N[1],function(a){e(a)}).bind(N[2],function(a){g(a)})})})},G=function(){function c(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function e(a,b,c){k.type=c&&f?"stepped":"stepless",k.scrollAmount=10,P(g,a,b,"mcsLinearOut",c?60:null)}var f,g=a(this),h=g.data(d),i=h.opt,k=h.sequential,l=d+"_"+h.idx,m=a("#mCSB_"+h.idx+"_container"),n=m.parent();m.bind("mousedown."+l,function(a){b||f||(f=1,j=!0)}).add(document).bind("mousemove."+l,function(a){if(!b&&f&&c()){var d=m.offset(),g=D(a)[0]-d.top+m[0].offsetTop,j=D(a)[1]-d.left+m[0].offsetLeft;g>0&&g0&&jg?e("on",38):g>n.height()&&e("on",40)),"y"!==i.axis&&h.overflowed[1]&&(0>j?e("on",37):j>n.width()&&e("on",39)))}}).bind("mouseup."+l+" dragend."+l,function(a){b||(f&&(f=0,e("off",null)),j=!1)})},H=function(){function b(b,d){if(U(c),!J(c,b.target)){var g="auto"!==f.mouseWheel.deltaFactor?parseInt(f.mouseWheel.deltaFactor):i&&b.deltaFactor<100?100:b.deltaFactor||100,k=f.scrollInertia;if("x"===f.axis||"x"===f.mouseWheel.axis)var l="x",m=[Math.round(g*e.scrollRatio.x),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.width()?.9*h.width():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetLeft),p=j[1][0].offsetLeft,q=j[1].parent().width()-j[1].width(),r=b.deltaX||b.deltaY||d;else var l="y",m=[Math.round(g*e.scrollRatio.y),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.height()?.9*h.height():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetTop),p=j[0][0].offsetTop,q=j[0].parent().height()-j[0].height(),r=b.deltaY||d;"y"===l&&!e.overflowed[0]||"x"===l&&!e.overflowed[1]||((f.mouseWheel.invert||b.webkitDirectionInvertedFromDevice)&&(r=-r),f.mouseWheel.normalizeDelta&&(r=0>r?-1:1),(r>0&&0!==p||0>r&&p!==q||f.mouseWheel.preventDefault)&&(b.stopImmediatePropagation(),b.preventDefault()),b.deltaFactor<2&&!f.mouseWheel.normalizeDelta&&(n=b.deltaFactor,k=17),V(c,(o-r*n).toString(),{dir:l,dur:k}))}}if(a(this).data(d)){var c=a(this),e=c.data(d),f=e.opt,g=d+"_"+e.idx,h=a("#mCSB_"+e.idx),j=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")],k=a("#mCSB_"+e.idx+"_container").find("iframe");k.length&&k.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind("mousewheel."+g,function(a,c){b(a,c)})})}),h.bind("mousewheel."+g,function(a,c){b(a,c)})}},I=function(a){var b=null;if(a){try{var c=a.contentDocument||a.contentWindow.document;b=c.body.innerHTML}catch(d){}return null!==b}try{var c=top.document;b=c.body.innerHTML}catch(d){}return null!==b},J=function(b,c){var e=c.nodeName.toLowerCase(),f=b.data(d).opt.mouseWheel.disableOver,g=["select","textarea"];return a.inArray(e,f)>-1&&!(a.inArray(e,g)>-1&&!a(c).is(":focus"))},K=function(){var b,c=a(this),e=c.data(d),f=d+"_"+e.idx,g=a("#mCSB_"+e.idx+"_container"),h=g.parent(),i=a(".mCSB_"+e.idx+"_scrollbar ."+k[12]);i.bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(c){j=!0,a(c.target).hasClass("mCSB_dragger")||(b=1)}).bind("touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(a){j=!1}).bind("click."+f,function(d){if(b&&(b=0,a(d.target).hasClass(k[12])||a(d.target).hasClass("mCSB_draggerRail"))){U(c);var f=a(this),i=f.find(".mCSB_dragger");if(f.parent(".mCSB_scrollTools_horizontal").length>0){if(!e.overflowed[1])return;var j="x",l=d.pageX>i.offset().left?-1:1,m=Math.abs(g[0].offsetLeft)-l*(.9*h.width())}else{if(!e.overflowed[0])return;var j="y",l=d.pageY>i.offset().top?-1:1,m=Math.abs(g[0].offsetTop)-l*(.9*h.height())}V(c,m.toString(),{dir:j,scrollEasing:"mcsEaseInOut"})}})},L=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=a("#mCSB_"+c.idx+"_container"),h=g.parent();g.bind("focusin."+f,function(c){var d=a(document.activeElement),f=g.find(".mCustomScrollBox").length,i=0;d.is(e.advanced.autoScrollOnFocus)&&(U(b),clearTimeout(b[0]._focusTimeout),b[0]._focusTimer=f?(i+17)*f:0,b[0]._focusTimeout=setTimeout(function(){var a=[ba(d)[0],ba(d)[1]],c=[g[0].offsetTop,g[0].offsetLeft],f=[c[0]+a[0]>=0&&c[0]+a[0]=0&&c[0]+a[1]a");i.bind("mousedown."+g+" touchstart."+g+" pointerdown."+g+" MSPointerDown."+g+" mouseup."+g+" touchend."+g+" pointerup."+g+" MSPointerUp."+g+" mouseout."+g+" pointerout."+g+" MSPointerOut."+g+" click."+g,function(d){function g(a,c){f.scrollAmount=e.scrollButtons.scrollAmount,P(b,a,c)}if(d.preventDefault(),$(d)){var h=a(this).attr("class");switch(f.type=e.scrollButtons.scrollType,d.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===f.type)return;j=!0,c.tweenRunning=!1,g("on",h);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===f.type)return;j=!1,f.dir&&g("off",h);break;case"click":if("stepped"!==f.type||c.tweenRunning)return;g("on",h)}}})},O=function(){function b(b){function d(a,b){g.type=f.keyboard.scrollType,g.scrollAmount=f.keyboard.scrollAmount,"stepped"===g.type&&e.tweenRunning||P(c,a,b)}switch(b.type){case"blur":e.tweenRunning&&g.dir&&d("off",null);break;case"keydown":case"keyup":var h=b.keyCode?b.keyCode:b.which,i="on";if("x"!==f.axis&&(38===h||40===h)||"y"!==f.axis&&(37===h||39===h)){if((38===h||40===h)&&!e.overflowed[0]||(37===h||39===h)&&!e.overflowed[1])return;"keyup"===b.type&&(i="off"),a(document.activeElement).is(l)||(b.preventDefault(),b.stopImmediatePropagation(),d(i,h))}else if(33===h||34===h){if((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type){U(c);var m=34===h?-1:1;if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=Math.abs(j[0].offsetLeft)-m*(.9*k.width());else var n="y",o=Math.abs(j[0].offsetTop)-m*(.9*k.height());V(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}else if((35===h||36===h)&&!a(document.activeElement).is(l)&&((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type)){if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=35===h?Math.abs(k.width()-j.outerWidth(!1)):0;else var n="y",o=35===h?Math.abs(k.height()-j.outerHeight(!1)):0;V(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}}var c=a(this),e=c.data(d),f=e.opt,g=e.sequential,h=d+"_"+e.idx,i=a("#mCSB_"+e.idx),j=a("#mCSB_"+e.idx+"_container"),k=j.parent(),l="input,textarea,select,datalist,keygen,[contenteditable='true']",m=j.find("iframe"),n=["blur."+h+" keydown."+h+" keyup."+h];m.length&&m.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind(n[0],function(a){b(a)})})}),i.attr("tabindex","0").bind(n[0],function(a){b(a)})},P=function(b,c,e,f,g){function h(a){l.snapAmount&&(m.scrollAmount=l.snapAmount instanceof Array?"x"===m.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var c="stepped"!==m.type,d=g?g:a?c?p/1.5:q:1e3/60,e=a?c?7.5:40:2.5,i=[Math.abs(n[0].offsetTop),Math.abs(n[0].offsetLeft)],k=[j.scrollRatio.y>10?10:j.scrollRatio.y,j.scrollRatio.x>10?10:j.scrollRatio.x],o="x"===m.dir[0]?i[1]+m.dir[1]*(k[1]*e):i[0]+m.dir[1]*(k[0]*e),r="x"===m.dir[0]?i[1]+m.dir[1]*parseInt(m.scrollAmount):i[0]+m.dir[1]*parseInt(m.scrollAmount),s="auto"!==m.scrollAmount?r:o,t=f?f:a?c?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",u=!!a;return a&&17>d&&(s="x"===m.dir[0]?i[1]:i[0]),V(b,s.toString(),{dir:m.dir[0],scrollEasing:t,dur:d,onComplete:u}),a?void(m.dir=!1):(clearTimeout(m.step),void(m.step=setTimeout(function(){h()},d)))}function i(){clearTimeout(m.step),Z(m,"step"),U(b)}var j=b.data(d),l=j.opt,m=j.sequential,n=a("#mCSB_"+j.idx+"_container"),o="stepped"===m.type,p=l.scrollInertia<26?26:l.scrollInertia,q=l.scrollInertia<1?17:l.scrollInertia;switch(c){case"on":if(m.dir=[e===k[16]||e===k[15]||39===e||37===e?"x":"y",e===k[13]||e===k[15]||38===e||37===e?-1:1],U(b),aa(e)&&"stepped"===m.type)return;h(o);break;case"off":i(),(o||j.tweenRunning&&m.dir)&&h(!0)}},Q=function(b){var c=a(this).data(d).opt,e=[];return"function"==typeof b&&(b=b()),b instanceof Array?e=b.length>1?[b[0],b[1]]:"x"===c.axis?[null,b[0]]:[b[0],null]:(e[0]=b.y?b.y:b.x||"x"===c.axis?null:b,e[1]=b.x?b.x:b.y||"y"===c.axis?null:b),"function"==typeof e[0]&&(e[0]=e[0]()),"function"==typeof e[1]&&(e[1]=e[1]()),e},R=function(b,c){if(null!=b&&"undefined"!=typeof b){var e=a(this),f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx+"_container"),i=h.parent(),j=typeof b;c||(c="x"===g.axis?"x":"y");var k="x"===c?h.outerWidth(!1):h.outerHeight(!1),m="x"===c?h[0].offsetLeft:h[0].offsetTop,n="x"===c?"left":"top";switch(j){case"function":return b();case"object":var o=b.jquery?b:a(b);if(!o.length)return;return"x"===c?ba(o)[1]:ba(o)[0];case"string":case"number":if(aa(b))return Math.abs(b);if(-1!==b.indexOf("%"))return Math.abs(k*parseInt(b)/100);if(-1!==b.indexOf("-="))return Math.abs(m-parseInt(b.split("-=")[1]));if(-1!==b.indexOf("+=")){var p=m+parseInt(b.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==b.indexOf("px")&&aa(b.split("px")[0]))return Math.abs(b.split("px")[0]);if("top"===b||"left"===b)return 0;if("bottom"===b)return Math.abs(i.height()-h.outerHeight(!1));if("right"===b)return Math.abs(i.width()-h.outerWidth(!1));if("first"===b||"last"===b){var o=h.find(":"+b);return"x"===c?ba(o)[1]:ba(o)[0]}return a(b).length?"x"===c?ba(a(b))[1]:ba(a(b))[0]:(h.css(n,b),void l.update.call(null,e[0]))}}},S=function(b){function c(){return clearTimeout(m[0].autoUpdate),0===h.parents("html").length?void(h=null):void(m[0].autoUpdate=setTimeout(function(){return j.advanced.updateOnSelectorChange&&(i.poll.change.n=f(),i.poll.change.n!==i.poll.change.o)?(i.poll.change.o=i.poll.change.n,void g(3)):j.advanced.updateOnContentResize&&(i.poll.size.n=h[0].scrollHeight+h[0].scrollWidth+m[0].offsetHeight+h[0].offsetHeight+h[0].offsetWidth,i.poll.size.n!==i.poll.size.o)?(i.poll.size.o=i.poll.size.n,void g(1)):!j.advanced.updateOnImageLoad||"auto"===j.advanced.updateOnImageLoad&&"y"===j.axis||(i.poll.img.n=m.find("img").length,i.poll.img.n===i.poll.img.o)?void((j.advanced.updateOnSelectorChange||j.advanced.updateOnContentResize||j.advanced.updateOnImageLoad)&&c()):(i.poll.img.o=i.poll.img.n,void m.find("img").each(function(){e(this)}))},j.advanced.autoUpdateTimeout))}function e(b){function c(a,b){return function(){return b.apply(a,arguments)}}function d(){this.onload=null,a(b).addClass(k[2]),g(2)}if(a(b).hasClass(k[2]))return void g();var e=new Image;e.onload=c(e,d),e.src=b.src}function f(){j.advanced.updateOnSelectorChange===!0&&(j.advanced.updateOnSelectorChange="*");var a=0,b=m.find(j.advanced.updateOnSelectorChange);return j.advanced.updateOnSelectorChange&&b.length>0&&b.each(function(){a+=this.offsetHeight+this.offsetWidth}),a}function g(a){clearTimeout(m[0].autoUpdate),l.update.call(null,h[0],a)}var h=a(this),i=h.data(d),j=i.opt,m=a("#mCSB_"+i.idx+"_container");return b?(clearTimeout(m[0].autoUpdate),void Z(m[0],"autoUpdate")):void c()},T=function(a,b,c){return Math.round(a/b)*b-c},U=function(b){var c=b.data(d),e=a("#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal");e.each(function(){Y.call(this)})},V=function(b,c,e){function f(a){return i&&j.callbacks[a]&&"function"==typeof j.callbacks[a]}function g(){return[j.callbacks.alwaysTriggerOffsets||u>=v[0]+y,j.callbacks.alwaysTriggerOffsets||-z>=u]}function h(){var a=[n[0].offsetTop,n[0].offsetLeft],c=[s[0].offsetTop,s[0].offsetLeft],d=[n.outerHeight(!1),n.outerWidth(!1)],f=[m.height(),m.width()];b[0].mcs={content:n,top:a[0],left:a[1],draggerTop:c[0],draggerLeft:c[1],topPct:Math.round(100*Math.abs(a[0])/(Math.abs(d[0])-f[0])),leftPct:Math.round(100*Math.abs(a[1])/(Math.abs(d[1])-f[1])),direction:e.dir}}var i=b.data(d),j=i.opt,k={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:j.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},e=a.extend(k,e),l=[e.dur,e.drag?0:e.dur],m=a("#mCSB_"+i.idx),n=a("#mCSB_"+i.idx+"_container"),o=n.parent(),p=j.callbacks.onTotalScrollOffset?Q.call(b,j.callbacks.onTotalScrollOffset):[0,0],q=j.callbacks.onTotalScrollBackOffset?Q.call(b,j.callbacks.onTotalScrollBackOffset):[0,0];if(i.trigger=e.trigger,0===o.scrollTop()&&0===o.scrollLeft()||(a(".mCSB_"+i.idx+"_scrollbar").css("visibility","visible"),o.scrollTop(0).scrollLeft(0)),"_resetY"!==c||i.contentReset.y||(f("onOverflowYNone")&&j.callbacks.onOverflowYNone.call(b[0]),i.contentReset.y=1),"_resetX"!==c||i.contentReset.x||(f("onOverflowXNone")&&j.callbacks.onOverflowXNone.call(b[0]),i.contentReset.x=1),"_resetY"!==c&&"_resetX"!==c){if(!i.contentReset.y&&b[0].mcs||!i.overflowed[0]||(f("onOverflowY")&&j.callbacks.onOverflowY.call(b[0]),i.contentReset.x=null),!i.contentReset.x&&b[0].mcs||!i.overflowed[1]||(f("onOverflowX")&&j.callbacks.onOverflowX.call(b[0]),i.contentReset.x=null),j.snapAmount){var r=j.snapAmount instanceof Array?"x"===e.dir?j.snapAmount[1]:j.snapAmount[0]:j.snapAmount;c=T(c,r,j.snapOffset)}switch(e.dir){case"x":var s=a("#mCSB_"+i.idx+"_dragger_horizontal"),t="left",u=n[0].offsetLeft,v=[m.width()-n.outerWidth(!1),s.parent().width()-s.width()],w=[c,0===c?0:c/i.scrollRatio.x],y=p[1],z=q[1],A=y>0?y/i.scrollRatio.x:0,B=z>0?z/i.scrollRatio.x:0;break;case"y":var s=a("#mCSB_"+i.idx+"_dragger_vertical"),t="top",u=n[0].offsetTop,v=[m.height()-n.outerHeight(!1),s.parent().height()-s.height()],w=[c,0===c?0:c/i.scrollRatio.y],y=p[0],z=q[0],A=y>0?y/i.scrollRatio.y:0,B=z>0?z/i.scrollRatio.y:0}w[1]<0||0===w[0]&&0===w[1]?w=[0,0]:w[1]>=v[1]?w=[v[0],v[1]]:w[0]=-w[0],b[0].mcs||(h(),f("onInit")&&j.callbacks.onInit.call(b[0])),clearTimeout(n[0].onCompleteTimeout),W(s[0],t,Math.round(w[1]),l[1],e.scrollEasing),!i.tweenRunning&&(0===u&&w[0]>=0||u===v[0]&&w[0]<=v[0])||W(n[0],t,Math.round(w[0]),l[0],e.scrollEasing,e.overwrite,{onStart:function(){e.callbacks&&e.onStart&&!i.tweenRunning&&(f("onScrollStart")&&(h(),j.callbacks.onScrollStart.call(b[0])),i.tweenRunning=!0,x(s),i.cbOffsets=g())},onUpdate:function(){e.callbacks&&e.onUpdate&&f("whileScrolling")&&(h(),j.callbacks.whileScrolling.call(b[0]))},onComplete:function(){if(e.callbacks&&e.onComplete){"yx"===j.axis&&clearTimeout(n[0].onCompleteTimeout);var a=n[0].idleTimer||0;n[0].onCompleteTimeout=setTimeout(function(){f("onScroll")&&(h(),j.callbacks.onScroll.call(b[0])),f("onTotalScroll")&&w[1]>=v[1]-A&&i.cbOffsets[0]&&(h(),j.callbacks.onTotalScroll.call(b[0])),f("onTotalScrollBack")&&w[1]<=B&&i.cbOffsets[1]&&(h(),j.callbacks.onTotalScrollBack.call(b[0])),i.tweenRunning=!1,n[0].idleTimer=0,x(s,"hide")},a)}}})}},W=function(a,b,c,d,e,f,g){function h(){v.stop||(s||o.call(),s=X()-r,i(),s>=v.time&&(v.time=s>v.time?s+m-(s-v.time):s+m-1,v.time0?(v.currVal=l(v.time,t,w,d,e),u[b]=Math.round(v.currVal)+"px"):u[b]=c+"px",p.call()}function j(){m=1e3/60,v.time=s+m,n=window.requestAnimationFrame?window.requestAnimationFrame:function(a){return i(),setTimeout(a,.01)},v.id=n(h)}function k(){null!=v.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(v.id):clearTimeout(v.id),v.id=null)}function l(a,b,c,d,e){switch(e){case"linear":case"mcsLinear":return c*a/d+b;case"mcsLinearOut":return a/=d,a--,c*Math.sqrt(1-a*a)+b;case"easeInOutSmooth":return a/=d/2,1>a?c/2*a*a+b:(a--,-c/2*(a*(a-2)-1)+b);case"easeInOutStrong":return a/=d/2,1>a?c/2*Math.pow(2,10*(a-1))+b:(a--,c/2*(-Math.pow(2,-10*a)+2)+b);case"easeInOut":case"mcsEaseInOut":return a/=d/2,1>a?c/2*a*a*a+b:(a-=2,c/2*(a*a*a+2)+b);case"easeOutSmooth":return a/=d,a--,-c*(a*a*a*a-1)+b;case"easeOutStrong":return c*(-Math.pow(2,-10*a/d)+1)+b;case"easeOut":case"mcsEaseOut":default:var f=(a/=d)*a,g=f*a;return b+c*(.499999999999997*g*f+-2.5*f*f+5.5*g+-6.5*f+4*a)}}a._mTween||(a._mTween={top:{},left:{}});var m,n,g=g||{},o=g.onStart||function(){},p=g.onUpdate||function(){},q=g.onComplete||function(){},r=X(),s=0,t=a.offsetTop,u=a.style,v=a._mTween[b];"left"===b&&(t=a.offsetLeft);var w=c-t;v.stop=0,"none"!==f&&k(),j()},X=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Y=function(){var a=this;a._mTween||(a._mTween={top:{},left:{}});for(var b=["top","left"],c=0;c=0&&d[0]+ba(e)[0]=0&&d[1]+ba(e)[1]
      ":"
      "},c=function(b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q;return h=d.duration||1,q=d.timingFunction||"ease-in-out",i=c.scope(),j=d.emitOnClose, +n=d.onClose,m=void 0!==d.lazyRender,g=null,o=null,k=function(a){var b,d,e,f,g;for(e=0,d=c.children(),f=0,g=d.length;g>f;f++)b=d[f],e+=b.clientHeight;return""+e+"px"},p=function(){return g&&a.cancel(g),m&&(b.lazyRender=!0),a(function(){return o&&a.cancel(o),c.css({overflow:"hidden",transitionProperty:"height",transitionDuration:""+h+"s",transitionTimingFunction:q,height:k()}),o=a(function(){return c.css({overflow:"visible",transition:"none",height:"auto"})},1e3*h)})},l=function(){return o&&a.cancel(o),c.css({overflow:"hidden",transitionProperty:"height",transitionDuration:""+h+"s",transitionTimingFunction:q,height:"0px"}),j||n||m?g=a(function(){return j&&b.$emit(j,{}),n&&i.$eval(n),m?b.lazyRender=!1:void 0},1e3*h):void 0},b.$watch("expanded",function(b,d){return b?a(p):(null!=b&&(c.css({height:k()}),c[0].clientHeight),a(l))})},{restrict:"A",scope:{expanded:"=ngSlideDown"},transclude:!0,link:c,template:function(a,c){return b(a,c)}}}])}.call(this);var mod;mod=angular.module("infinite-scroll",[]),mod.directive("infiniteScroll",["$rootScope","$window","$timeout",function(a,b,c){return{link:function(d,e,f){var g,h,i,j;return b=angular.element(b),i=0,null!=f.infiniteScrollDistance&&d.$watch(f.infiniteScrollDistance,function(a){return i=parseInt(a,10)}),j=!0,g=!1,null!=f.infiniteScrollDisabled&&d.$watch(f.infiniteScrollDisabled,function(a){return j=!a,j&&g?(g=!1,h()):void 0}),h=function(){var c,h,k,l;return l=b.height()+b.scrollTop(),c=e.offset().top+e.height(),h=c-l,k=h<=b.height()*i,k&&j?a.$$phase?d.$eval(f.infiniteScroll):d.$apply(f.infiniteScroll):k?g=!0:void 0},b.on("scroll",h),d.$on("$destroy",function(){return b.off("scroll",h)}),c(function(){return f.infiniteScrollImmediateCheck?d.$eval(f.infiniteScrollImmediateCheck)?h():void 0:h()},0)}}}]),angular.module("ngMap",[]),function(){"use strict";function camelCase(a){return a.replace(SPECIAL_CHARS_REGEXP,function(a,b,c,d){return d?c.toUpperCase():c}).replace(MOZ_HACK_REGEXP,"Moz$1")}function JSONize(a){try{return JSON.parse(a),a}catch(b){return a.replace(/([\$\w]+)\s*:/g,function(a,b){return'"'+b+'":'}).replace(/'([^']+)'/g,function(a,b){return'"'+b+'"'})}}var SPECIAL_CHARS_REGEXP=/([\:\-\_]+(.))/g,MOZ_HACK_REGEXP=/^moz([A-Z])/,Attr2Options=function($parse,$timeout,$log,NavigatorGeolocation,GeoCoder){var orgAttributes=function(a){a.length>0&&(a=a[0]);for(var b={},c=0;c-1&&b.splice(c,1),this.el.className=b.join(" ")},d.prototype.onAdd=function(){this.getPanes().overlayMouseTarget.appendChild(this.el)},d.prototype.draw=function(){this.setPosition(),this.setZIndex(this.zIndex),this.setVisible(this.visible)},d.prototype.onRemove=function(){this.el.parentNode.removeChild(this.el),this.el=null}},f=function(c,e){return function(f,g,h,i){var j=(a.orgAttributes(g),a.filter(h)),k=a.getOptions(j,f),l=a.getEvents(f,j),m=g[0].parentElement.removeChild(g[0]),n=new d(k);b(function(){f.$watch("["+e.join(",")+"]",function(a){n.setContent(c,f)}),n.setContent(m.innerHTML,f);var a=m.firstElementChild.className;n.addClass("custom-marker"),n.addClass(a),k.position instanceof google.maps.LatLng||i.getGeoLocation(k.position).then(function(a){n.setPosition(a)})});for(var o in l)google.maps.event.addDomListener(n.el,o,l[o]);i.addObject("customMarkers",n),g.bind("$destroy",function(){i.deleteObject("customMarkers",n)})}},g=function(d,g,h){return a=d,b=g,c=h,e(),{restrict:"E",require:"^map",compile:function(a){var b=a.html(),c=b.match(/{{([^}]+)}}/g),d=[];return(c||[]).forEach(function(a){var b=a.replace("{{","").replace("}}","");-1==a.indexOf("::")&&-1==a.indexOf("this.")&&-1==d.indexOf(b)&&d.push(a.replace("{{","").replace("}}",""))}),f(b,d)}}};g.$inject=["Attr2Options","$timeout","$compile"],angular.module("ngMap").directive("customMarker",g)}(),function(){"use strict";var a=function(a,b){a.panel&&(a.panel=document.getElementById(a.panel)||document.querySelector(a.panel));var c=new google.maps.DirectionsRenderer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c},b=function(b,c,d){var e=b,f=new google.maps.DirectionsService,g=function(a,b){var e=b;e.travelMode=e.travelMode||"DRIVING";var g=["origin","destination","travelMode","transitOptions","unitSystem","durationInTraffic","waypoints","optimizeWaypoints","provideRouteAlternatives","avoidHighways","avoidTolls","region"];for(var h in e)-1===g.indexOf(h)&&delete e[h];e.waypoints&&("[]"!=e.waypoints&&""!=e.waypoints||delete e.waypoints);var i=function(b){f.route(b,function(b,d){d==google.maps.DirectionsStatus.OK&&c(function(){a.setDirections(b)})})};e.origin&&e.destination&&("current-location"==e.origin?d.getCurrentPosition().then(function(a){e.origin=new google.maps.LatLng(a.coords.latitude,a.coords.longitude),i(e)}):"current-location"==e.destination?d.getCurrentPosition().then(function(a){e.destination=new google.maps.LatLng(a.coords.latitude,a.coords.longitude),i(e)}):i(e))},h=function(b,d,f,h){var i=e.orgAttributes(d),j=e.filter(f),k=e.getOptions(j),l=e.getEvents(b,j),m=e.getAttrsToObserve(i),n=a(k,l);h.addObject("directionsRenderers",n),m.forEach(function(a){!function(a){f.$observe(a,function(b){if("panel"==a)c(function(){var a=document.getElementById(b)||document.querySelector(b);a&&n.setPanel(a)});else if(k[a]!==b){var d=e.toOptionValue(b,{key:a});k[a]=d,g(n,k)}})}(a)}),b.$on("mapInitialized",function(a,b){g(n,k)}),b.$on("$destroy",function(a,b){h.deleteObject("directionsRenderers",n)})};return{restrict:"E",require:"^map",link:h}};b.$inject=["Attr2Options","$timeout","NavigatorGeolocation"],angular.module("ngMap").directive("directions",b)}(),function(){"use strict";angular.module("ngMap").directive("drawingManager",["Attr2Options",function(a){var b=a;return{restrict:"E",require:"^map",link:function(a,c,d,e){var f=(b.orgAttributes(c),b.filter(d)),g=b.getOptions(f),h=b.getControlOptions(f),i=b.getEvents(a,f),j=new google.maps.drawing.DrawingManager({drawingMode:g.drawingmode,drawingControl:g.drawingcontrol,drawingControlOptions:h.drawingControlOptions,circleOptions:g.circleoptions,markerOptions:g.markeroptions,polygonOptions:g.polygonoptions,polylineOptions:g.polylineoptions,rectangleOptions:g.rectangleoptions}),i=b.getEvents(a,f);for(var k in i)google.maps.event.addListener(j,k,i[k]);e.addObject("mapDrawingManager",j)}}}])}(),function(){"use strict";angular.module("ngMap").directive("dynamicMapsEngineLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.visualization.DynamicMapsEngineLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.filter(e),h=b.getOptions(g),i=b.getEvents(a,g,i),j=c(h,i);f.addObject("mapsEngineLayers",j)}}}])}(),function(){"use strict";angular.module("ngMap").directive("fusionTablesLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.FusionTablesLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.filter(e),h=b.getOptions(g),i=b.getEvents(a,g,i),j=c(h,i);f.addObject("fusionTablesLayers",j)}}}])}(),function(){"use strict";angular.module("ngMap").directive("heatmapLayer",["Attr2Options","$window",function(a,b){var c=a;return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=c.filter(e),h=c.getOptions(g);if(h.data=b[e.data]||a[e.data],!(h.data instanceof Array))throw"invalid heatmap data";h.data=new google.maps.MVCArray(h.data);var i=new google.maps.visualization.HeatmapLayer(h);c.getEvents(a,g);f.addObject("heatmapLayers",i)}}}])}(),function(){"use strict";var a=function(a,b,c,d){var e=a,f=function(a,d,e){var f;!a.position||a.position instanceof google.maps.LatLng||delete a.position,f=new google.maps.InfoWindow(a),Object.keys(d).length>0;for(var g in d)g&&google.maps.event.addListener(f,g,d[g]);var h=e.html().trim();if(1!=angular.element(h).length)throw"info-window working as a template must have a container";return f.__template=h.replace(/\s?ng-non-bindable[='"]+/,""),f.__compile=function(a,c){c&&(a["this"]=c);var d=b(f.__template)(a);f.setContent(d[0]),a.$apply()},f.__open=function(a,b,d){c(function(){f.__compile(b,d),d&&d.getPosition?f.open(a,d):d&&d instanceof google.maps.LatLng?(f.open(a),f.setPosition(d)):f.open(a)})},f},g=function(a,b,c,g){b.css("display","none");var h,i=e.orgAttributes(b),j=e.filter(c),k=e.getOptions(j,a),l=e.getEvents(a,j);!k.position||k.position instanceof google.maps.LatLng||(h=k.position);var m=f(k,l,b);h&&g.getGeoLocation(h).then(function(b){m.setPosition(b),m.__open(g.map,a,b);var e=c.geoCallback;e&&d(e)(a)}),g.addObject("infoWindows",m),g.observeAttrSetObj(i,c,m),a.$on("mapInitialized",function(b,c){if(m.visible&&m.__open(c,a),m.visibleOnMarker){var d=m.visibleOnMarker;m.__open(c,a,c.markers[d])}}),a.showInfoWindow=function(b,c,d){var e=g.map.infoWindows[c],f=d?d:this.getPosition?this:null;e.__open(g.map,a,f),g.singleInfoWindow&&(g.lastInfoWindow&&a.hideInfoWindow(b,g.lastInfoWindow),g.lastInfoWindow=c)},a.hideInfoWindow=a.hideInfoWindow||function(a,b){var c=g.map.infoWindows[b];c.close()}};return{restrict:"E",require:"^map",link:g}};a.$inject=["Attr2Options","$compile","$timeout","$parse"],angular.module("ngMap").directive("infoWindow",a)}(),function(){"use strict";angular.module("ngMap").directive("kmlLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.KmlLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("kmlLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("kmlLayers",k)})}}}])}(),function(){"use strict";angular.module("ngMap").directive("mapData",["Attr2Options",function(a){var b=a;return{restrict:"E",require:"^map",link:function(a,c,d,e){var f=b.filter(d),g=b.getOptions(f),h=b.getEvents(a,f,h);a.$on("mapInitialized",function(b,c){for(var d in g)if(d){var e=g[d];"function"==typeof a[e]?c.data[d](a[e]):c.data[d](e)}for(var f in h)h[f]&&c.data.addListener(f,h[f])})}}}])}(),function(){"use strict";var a,b,c,d,e=function(c,e,f){var g=f.mapLazyLoadParams||f.mapLazyLoad;if(window.lazyLoadCallback=function(){a(function(){e.html(d),b(e.contents())(c)},100)},void 0===window.google||void 0===window.google.maps){var h=document.createElement("script");h.src=g+(g.indexOf("?")>-1?"&":"?")+"callback=lazyLoadCallback",document.body.appendChild(h)}else e.html(d),b(e.contents())(c)},f=function(a,b){return!b.mapLazyLoad&&void 0,d=a.html(),c=b.mapLazyLoad,document.querySelector('script[src="'+c+(c.indexOf("?")>-1?"&":"?")+'callback=lazyLoadCallback"]')?!1:(a.html(""),{pre:e})},g=function(c,d){return b=c,a=d,{compile:f}};g.$inject=["$compile","$timeout"],angular.module("ngMap").directive("mapLazyLoad",g)}(),function(){"use strict";angular.module("ngMap").directive("mapType",["Attr2Options","$window",function(a,b){return{restrict:"E",require:"^map",link:function(a,c,d,e){var f,g=d.name;if(!g)throw"invalid map-type name";if(d.object){var h=a[d.object]?a:b;f=h[d.object],"function"==typeof f&&(f=new f)}if(!f)throw"invalid map-type object";a.$on("mapInitialized",function(a,b){b.mapTypes.set(g,f)}),e.addObject("mapTypes",f)}}}])}(),function(){"use strict";function a(a,b){var c;return a.currentStyle?c=a.currentStyle[b]:window.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b)),c}var b=function(b,c,d){var e=b,f=function(b,f,g,h){var i=e.orgAttributes(f);b.google=google;var j=document.createElement("div");j.style.width="100%",j.style.height="100%",f.prepend(j),"false"!==g.defaultStyle&&("block"!=a(f[0],"display")&&f.css("display","block"),a(f[0],"height").match(/^(0|auto)/)&&f.css("height","300px")),f[0].addEventListener("dragstart",function(a){return a.preventDefault(),!1});var k=function(a,e){var f=new google.maps.Map(j,{});f.markers={},f.shapes={},c(function(){google.maps.event.trigger(f,"resize")}),a.zoom=a.zoom||15;var k=a.center;k?k instanceof google.maps.LatLng||(delete a.center,h.getGeoLocation(k,m.geoLocationOptions).then(function(a){f.setCenter(a);var c=g.geoCallback;c&&d(c)(b)},function(a){f.setCenter(m.geoFallbackCenter)})):a.center=new google.maps.LatLng(0,0),f.setOptions(a),h.singleInfoWindow=a.singleInfoWindow;for(var l in e)l&&google.maps.event.addListener(f,l,e[l]);h.observeAttrSetObj(i,g,f),h.map=f,h.addObjects(h._objects),b.map=f,b.map.scope=b,google.maps.event.addListenerOnce(f,"idle",function(){b.$emit("mapInitialized",f),g.zoomToIncludeMarkers&&(h.zoomToIncludeMarkers(),"auto"==g.zoomToIncludeMarkers&&b.$on("objectChanged",function(a,b){"markers"==b[0]&&h.zoomToIncludeMarkers()}))})},l=e.filter(g),m=e.getOptions(l,b),n=e.getControlOptions(l),o=angular.extend(m,n),p=e.getEvents(b,l);g.initEvent?b.$on(g.initEvent,function(){!h.map&&k(o,p)}):k(o,p)};return{restrict:"AE",controller:"MapController",link:f}};angular.module("ngMap").directive("map",["Attr2Options","$timeout","$parse",b])}(),function(){"use strict";var a=function(a,b,c,d,e){var f=e,g=this,h=function(a,b,c){a.$observe(b,function(a){if(a){var d=f.camelCase("set-"+b),e=f.toOptionValue(a,{key:b});c[d]&&(b.match(/center|position/)&&"string"==typeof e?g.getGeoLocation(e).then(function(a){c[d](a)}):c[d](e))}})};this.map=null,this._objects=[],this.addObject=function(b,c){if(this.map){this.map[b]=this.map[b]||{};var d=Object.keys(this.map[b]).length;this.map[b][c.id||d]=c,"infoWindows"!=b&&c.setMap&&c.setMap&&c.setMap(this.map),c.centered&&c.position&&this.map.setCenter(c.position),a.$emit("objectChanged",[b,this.map[b]])}else c.groupName=b,this._objects.push(c)},this.deleteObject=function(b,c){if(c.map){var d=c.map[b];for(var e in d)d[e]===c&&delete d[e];c.map&&c.setMap&&c.setMap(null),a.$emit("objectChanged",[b,this.map[b]])}},this.addObjects=function(a){for(var b=0;b0;for(var d in b)d&&google.maps.event.addListener(c,d,b[d]);return c},b=function(b,c){var d=b,e=function(b,e,f,g){var h,i=d.orgAttributes(e),j=d.filter(f),k=d.getOptions(j,b),l=d.getEvents(b,j);k.position instanceof google.maps.LatLng||(h=k.position);var m=a(k,l);g.addObject("markers",m),h&&g.getGeoLocation(h).then(function(a){m.setPosition(a),k.centered&&m.map.setCenter(a);var d=f.geoCallback;d&&c(d)(b)}),k.noWatcher||g.observeAttrSetObj(i,f,m),e.bind("$destroy",function(){g.deleteObject("markers",m)})};return{restrict:"E",require:"^map",link:e}};b.$inject=["Attr2Options","$parse"],angular.module("ngMap").directive("marker",b)}(),function(){"use strict";angular.module("ngMap").directive("overlayMapType",["Attr2Options","$window",function(a,b){return{restrict:"E",require:"^map",link:function(a,c,d,e){var f,g=d.initMethod||"insertAt";if(d.object){var h=a[d.object]?a:b;f=h[d.object],"function"==typeof f&&(f=new f)}if(!f)throw"invalid map-type object";a.$on("mapInitialized",function(a,b){if("insertAt"==g){var c=parseInt(d.index,10);b.overlayMapTypes.insertAt(c,f)}else"push"==g&&b.overlayMapTypes.push(f)}),e.addObject("overlayMapTypes",f)}}}])}(),function(){"use strict";var a=function(a,b){var c=a,d=function(a,d,e,f){if("false"===e.placesAutoComplete)return!1;var g=c.filter(e),h=c.getOptions(g),i=c.getEvents(a,g),j=new google.maps.places.Autocomplete(d[0],h);for(var k in i)google.maps.event.addListener(j,k,i[k]);var l=function(){b(function(){f&&f.$setViewValue(d.val())},100)};google.maps.event.addListener(j,"place_changed",l),d[0].addEventListener("change",l),e.$observe("types",function(a){if(a){var b=c.toOptionValue(a,{key:"types"});j.setTypes(b)}})};return{restrict:"A",require:"?ngModel",link:d}};a.$inject=["Attr2Options","$timeout"],angular.module("ngMap").directive("placesAutoComplete",a)}(),function(){"use strict";var a=function(a,b){var c,d=a.name;switch(delete a.name,d){case"circle":a.center instanceof google.maps.LatLng||(a.center=new google.maps.LatLng(0,0)),c=new google.maps.Circle(a);break;case"polygon":c=new google.maps.Polygon(a);break;case"polyline":c=new google.maps.Polyline(a);break;case"rectangle":c=new google.maps.Rectangle(a);break;case"groundOverlay":case"image":var e=a.url,f={opacity:a.opacity,clickable:a.clickable,id:a.id};c=new google.maps.GroundOverlay(e,a.bounds,f)}for(var g in b)b[g]&&google.maps.event.addListener(c,g,b[g]);return c},b=function(b,c){var d=b,e=function(b,e,f,g){var h,i,j=d.orgAttributes(e),k=d.filter(f),l=d.getOptions(k),m=d.getEvents(b,k);i=l.name,l.center instanceof google.maps.LatLng||(h=l.center);var n=a(l,m);g.addObject("shapes",n),h&&"circle"==i&&g.getGeoLocation(h).then(function(a){n.setCenter(a),n.centered&&n.map.setCenter(a);var d=f.geoCallback;d&&c(d)(b)}),g.observeAttrSetObj(j,f,n),e.bind("$destroy",function(){g.deleteObject("shapes",n)})};return{restrict:"E",require:"^map",link:e}};b.$inject=["Attr2Options","$parse"],angular.module("ngMap").directive("shape",b)}(),function(){"use strict";var a=function(a){var b=a,c=function(a,b,c){var d,e;b.container&&(e=document.getElementById(b.container),e=e||document.querySelector(b.container)),e?d=new google.maps.StreetViewPanorama(e,b):(d=a.getStreetView(),d.setOptions(b));for(var f in c)f&&google.maps.event.addListener(d,f,c[f]);return d},d=function(a,d,e,f){var g=(b.orgAttributes(d),b.filter(e)),h=b.getOptions(g),i=b.getControlOptions(g),j=angular.extend(h,i),k=b.getEvents(a,g);a.$on("mapInitialized",function(a,b){var d=c(b,j,k);b.setStreetView(d),!d.getPosition()&&d.setPosition(b.getCenter()),google.maps.event.addListener(d,"position_changed",function(){d.getPosition()!==b.getCenter()&&b.setCenter(d.getPosition())});var e=google.maps.event.addListener(b,"center_changed",function(){d.setPosition(b.getCenter()),google.maps.event.removeListener(e)})})};return{restrict:"E",require:"^map",link:d}};a.$inject=["Attr2Options"],angular.module("ngMap").directive("streetViewPanorama",a)}(),function(){"use strict";angular.module("ngMap").directive("trafficLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.TrafficLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("trafficLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("trafficLayers",k)})}}}])}(),function(){"use strict";angular.module("ngMap").directive("transitLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.TransitLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("transitLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("transitLayers",k)})}}}])}(),function(){"use strict";angular.module("ngMap").directive("weatherLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.weather.WeatherLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("weatherLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("weatherLayers",k)})}}}])}(),function(a,b){"use strict";var c=["ng","oc.lazyLoad"],d={},e=[],f=[],g=[],h=[],i=a.noop,j={},k=[],l=a.module("oc.lazyLoad",["ng"]);l.provider("$ocLazyLoad",["$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider",function(l,m,p,q,r,s){function t(b,d,e){if(d){var f,h,l,m=[];for(f=d.length-1;f>=0;f--)if(h=d[f],a.isString(h)||(h=w(h)),h&&-1===k.indexOf(h)&&(!y[h]||-1!==g.indexOf(h))){var n=-1===c.indexOf(h);if(l=o(h),n&&(c.push(h),t(b,l.requires,e)),l._runBlocks.length>0)for(j[h]=[];l._runBlocks.length>0;)j[h].push(l._runBlocks.shift());a.isDefined(j[h])&&(n||e.rerun)&&(m=m.concat(j[h])),v(b,l._invokeQueue,h,e.reconfig),v(b,l._configBlocks,h,e.reconfig),i(n?"ocLazyLoad.moduleLoaded":"ocLazyLoad.moduleReloaded",h),d.pop(),k.push(h)}var p=b.getInstanceInjector();a.forEach(m,function(a){p.invoke(a)})}}function u(b,c){function e(b,c){var d,e=!0;return c.length&&(d=f(b),a.forEach(c,function(a){e=e&&f(a)!==d})),e}function f(b){return a.isArray(b)?F(b.toString()):a.isObject(b)?F(E(b)):a.isDefined(b)&&null!==b?F(b.toString()):b}var g=b[2][0],h=b[1],j=!1;a.isUndefined(d[c])&&(d[c]={}),a.isUndefined(d[c][h])&&(d[c][h]={});var k=function(a,b){d[c][h].hasOwnProperty(a)||(d[c][h][a]=[]),e(b,d[c][h][a])&&(j=!0,d[c][h][a].push(b),i("ocLazyLoad.componentLoaded",[c,h,a]))};if(a.isString(g))k(g,b[2][1]);else{if(!a.isObject(g))return!1;a.forEach(g,function(b,c){a.isString(b)?k(b,g[1]):k(c,b)})}return j}function v(b,c,d,f){if(c){var g,h,i,j;for(g=0,h=c.length;h>g;g++)if(i=c[g],a.isArray(i)){if(null!==b){if(!b.hasOwnProperty(i[0]))throw new Error("unsupported provider "+i[0]);j=b[i[0]]}var k=u(i,d);if("invoke"!==i[1])k&&a.isDefined(j)&&j[i[1]].apply(j,i[2]);else{var l=function(b){var c=e.indexOf(d+"-"+b);(-1===c||f)&&(-1===c&&e.push(d+"-"+b),a.isDefined(j)&&j[i[1]].apply(j,i[2]))};if(a.isFunction(i[2][0]))l(i[2][0]);else if(a.isArray(i[2][0]))for(var m=0,n=i[2][0].length;n>m;m++)a.isFunction(i[2][0][m])&&l(i[2][0][m])}}}}function w(b){var c=null;return a.isString(b)?c=b:a.isObject(b)&&b.hasOwnProperty("name")&&a.isString(b.name)&&(c=b.name),c}function x(b){if(!a.isString(b))return!1;try{return o(b)}catch(c){if(/No module/.test(c)||c.message.indexOf("$injector:nomod")>-1)return!1}}var y={},z={$controllerProvider:l,$compileProvider:p,$filterProvider:q,$provide:m,$injector:r,$animateProvider:s},A=!1,B=!1,C=[],D={};C.push=function(a){-1===this.indexOf(a)&&Array.prototype.push.apply(this,arguments)},this.config=function(b){a.isDefined(b.modules)&&(a.isArray(b.modules)?a.forEach(b.modules,function(a){y[a.name]=a}):y[b.modules.name]=b.modules),a.isDefined(b.debug)&&(A=b.debug),a.isDefined(b.events)&&(B=b.events)},this._init=function(d){if(0===f.length){var e=[d],g=["ng:app","ng-app","x-ng-app","data-ng-app"],i=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/,j=function(a){return a&&e.push(a)};a.forEach(g,function(b){g[b]=!0,j(document.getElementById(b)), +b=b.replace(":","\\:"),"undefined"!=typeof d[0]&&d[0].querySelectorAll&&(a.forEach(d[0].querySelectorAll("."+b),j),a.forEach(d[0].querySelectorAll("."+b+"\\:"),j),a.forEach(d[0].querySelectorAll("["+b+"]"),j))}),a.forEach(e,function(b){if(0===f.length){var c=" "+d.className+" ",e=i.exec(c);e?f.push((e[2]||"").replace(/\s+/g,",")):a.forEach(b.attributes,function(a){0===f.length&&g[a.name]&&f.push(a.value)})}})}0!==f.length||(b.jasmine||b.mocha)&&a.isDefined(a.mock)||console.error("No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.");var k=function l(b){if(-1===c.indexOf(b)){c.push(b);var d=a.module(b);v(null,d._invokeQueue,b),v(null,d._configBlocks,b),a.forEach(d.requires,l)}};a.forEach(f,function(a){k(a)}),f=[],h.pop()};var E=function(b){try{return JSON.stringify(b)}catch(c){var d=[];return JSON.stringify(b,function(b,c){if(a.isObject(c)&&null!==c){if(-1!==d.indexOf(c))return;d.push(c)}return c})}},F=function(a){var b,c,d,e=0;if(0==a.length)return e;for(b=0,d=a.length;d>b;b++)c=a.charCodeAt(b),e=(e<<5)-e+c,e|=0;return e};this.$get=["$log","$rootElement","$rootScope","$cacheFactory","$q",function(b,e,g,j,l){function m(a){var c=l.defer();return b.error(a.message),c.reject(a),c.promise}var p,q=j("ocLazyLoad");return A||(b={},b.error=a.noop,b.warn=a.noop,b.info=a.noop),z.getInstanceInjector=function(){return p?p:p=e.data("$injector")||a.injector()},i=function(a,c){B&&g.$broadcast(a,c),A&&b.info(a,c)},{_broadcast:i,_$log:b,_getFilesCache:function(){return q},toggleWatch:function(a){a?h.push(!0):h.pop()},getModuleConfig:function(b){if(!a.isString(b))throw new Error("You need to give the name of the module to get");return y[b]?a.copy(y[b]):null},setModuleConfig:function(b){if(!a.isObject(b))throw new Error("You need to give the module config object to set");return y[b.name]=b,b},getModules:function(){return c},isLoaded:function(b){var d=function(a){var b=c.indexOf(a)>-1;return b||(b=!!x(a)),b};if(a.isString(b)&&(b=[b]),a.isArray(b)){var e,f;for(e=0,f=b.length;f>e;e++)if(!d(b[e]))return!1;return!0}throw new Error("You need to define the module(s) name(s)")},_getModuleName:w,_getModule:function(a){try{return o(a)}catch(b){throw(/No module/.test(b)||b.message.indexOf("$injector:nomod")>-1)&&(b.message='The module "'+E(a)+'" that you are trying to load does not exist. '+b.message),b}},moduleExists:x,_loadDependencies:function(b,c){var d,e,f,g=[],h=this;if(b=h._getModuleName(b),null===b)return l.when();try{d=h._getModule(b)}catch(i){return m(i)}return e=h.getRequires(d),a.forEach(e,function(d){if(a.isString(d)){var e=h.getModuleConfig(d);if(null===e)return void C.push(d);d=e,e.name=void 0}if(h.moduleExists(d.name))return f=d.files.filter(function(a){return h.getModuleConfig(d.name).files.indexOf(a)<0}),0!==f.length&&h._$log.warn('Module "',b,'" attempted to redefine configuration for dependency. "',d.name,'"\n Additional Files Loaded:',f),a.isDefined(h.filesLoader)?void g.push(h.filesLoader(d,c).then(function(){return h._loadDependencies(d)})):m(new Error("Error: New dependencies need to be loaded from external files ("+d.files+"), but no loader has been defined."));if(a.isArray(d)){var i=[];a.forEach(d,function(a){var b=h.getModuleConfig(a);null===b?i.push(a):b.files&&(i=i.concat(b.files))}),i.length>0&&(d={files:i})}else a.isObject(d)&&d.hasOwnProperty("name")&&d.name&&(h.setModuleConfig(d),C.push(d.name));if(a.isDefined(d.files)&&0!==d.files.length){if(!a.isDefined(h.filesLoader))return m(new Error('Error: the module "'+d.name+'" is defined in external files ('+d.files+"), but no loader has been defined."));g.push(h.filesLoader(d,c).then(function(){return h._loadDependencies(d)}))}}),l.all(g)},inject:function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],d=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],e=this,g=l.defer();if(a.isDefined(b)&&null!==b){if(a.isArray(b)){var h=[];return a.forEach(b,function(a){h.push(e.inject(a,c,d))}),l.all(h)}e._addToLoadList(e._getModuleName(b),!0,d)}if(f.length>0){var i=f.slice(),j=function m(a){C.push(a),D[a]=g.promise,e._loadDependencies(a,c).then(function(){try{k=[],t(z,C,c)}catch(a){return e._$log.error(a.message),void g.reject(a)}f.length>0?m(f.shift()):g.resolve(i)},function(a){g.reject(a)})};j(f.shift())}else{if(c&&c.name&&D[c.name])return D[c.name];g.resolve()}return g.promise},getRequires:function(b){var d=[];return a.forEach(b.requires,function(a){-1===c.indexOf(a)&&d.push(a)}),d},_invokeQueue:v,_registerInvokeList:u,_register:t,_addToLoadList:n,_unregister:function(b){a.isDefined(b)&&a.isArray(b)&&a.forEach(b,function(a){d[a]=void 0})}}}],this._init(a.element(b.document))}]);var m=a.bootstrap;a.bootstrap=function(b,c,d){return a.forEach(c.slice(),function(a){n(a,!0,!0)}),m(b,c,d)};var n=function(b,c,d){(h.length>0||c)&&a.isString(b)&&-1===f.indexOf(b)&&(f.push(b),d&&g.push(b))},o=a.module;a.module=function(a,b,c){return n(a,!1,!0),o(a,b,c)},"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="oc.lazyLoad")}(angular,window),function(a){"use strict";a.module("oc.lazyLoad").directive("ocLazyLoad",["$ocLazyLoad","$compile","$animate","$parse","$timeout",function(b,c,d,e,f){return{restrict:"A",terminal:!0,priority:1e3,compile:function(f,g){var h=f[0].innerHTML;return f.html(""),function(f,g,i){var j=e(i.ocLazyLoad);f.$watch(function(){return j(f)||i.ocLazyLoad},function(e){a.isDefined(e)&&b.load(e).then(function(){d.enter(h,g),c(g.contents())(f)})},!0)}}}}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q","$window","$interval",function(b,c,d,e){var f=!1,g=!1,h=d.document.getElementsByTagName("head")[0]||d.document.getElementsByTagName("body")[0];return b.buildElement=function(i,j,k){var l,m,n=c.defer(),o=b._getFilesCache(),p=function(a){var b=(new Date).getTime();return a.indexOf("?")>=0?"&"===a.substring(0,a.length-1)?a+"_dc="+b:a+"&_dc="+b:a+"?_dc="+b};switch(a.isUndefined(o.get(j))&&o.put(j,n.promise),i){case"css":l=d.document.createElement("link"),l.type="text/css",l.rel="stylesheet",l.href=k.cache===!1?p(j):j;break;case"js":l=d.document.createElement("script"),l.src=k.cache===!1?p(j):j;break;default:o.remove(j),n.reject(new Error('Requested type "'+i+'" is not known. Could not inject "'+j+'"'))}l.onload=l.onreadystatechange=function(a){l.readyState&&!/^c|loade/.test(l.readyState)||m||(l.onload=l.onreadystatechange=null,m=1,b._broadcast("ocLazyLoad.fileLoaded",j),n.resolve())},l.onerror=function(){o.remove(j),n.reject(new Error("Unable to load "+j))},l.async=k.serie?0:1;var q=h.lastChild;if(k.insertBefore){var r=a.element(a.isDefined(window.jQuery)?k.insertBefore:document.querySelector(k.insertBefore));r&&r.length>0&&(q=r[0])}if(q.parentNode.insertBefore(l,q),"css"==i){if(!f){var s=d.navigator.userAgent.toLowerCase();if(/iP(hone|od|ad)/.test(d.navigator.platform)){var t=d.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),u=parseFloat([parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3]||0,10)].join("."));g=6>u}else if(s.indexOf("android")>-1){var v=parseFloat(s.slice(s.indexOf("android")+8));g=4.4>v}else if(s.indexOf("safari")>-1){var w=s.match(/version\/([\.\d]+)/i);g=w&&w[1]&&parseFloat(w[1])<6}}if(g)var x=1e3,y=e(function(){try{l.sheet.cssRules,e.cancel(y),l.onload()}catch(a){--x<=0&&l.onerror()}},20)}return n.promise},b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q",function(b,c){return b.filesLoader=function(d){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],f=[],g=[],h=[],i=[],j=null,k=b._getFilesCache();b.toggleWatch(!0),a.extend(e,d);var l=function(c){var d,l=null;if(a.isObject(c)&&(l=c.type,c=c.path),j=k.get(c),a.isUndefined(j)||e.cache===!1){if(null!==(d=/^(css|less|html|htm|js)?(?=!)/.exec(c))&&(l=d[1],c=c.substr(d[1].length+1,c.length)),!l)if(null!==(d=/[.](css|less|html|htm|js)?((\?|#).*)?$/.exec(c)))l=d[1];else{if(b.jsLoader.hasOwnProperty("ocLazyLoadLoader")||!b.jsLoader.hasOwnProperty("requirejs"))return void b._$log.error("File type could not be determined. "+c);l="js"}"css"!==l&&"less"!==l||-1!==f.indexOf(c)?"html"!==l&&"htm"!==l||-1!==g.indexOf(c)?"js"===l||-1===h.indexOf(c)?h.push(c):b._$log.error("File type is not valid. "+c):g.push(c):f.push(c)}else j&&i.push(j)};if(e.serie?l(e.files.shift()):a.forEach(e.files,function(a){l(a)}),f.length>0){var m=c.defer();b.cssLoader(f,function(c){a.isDefined(c)&&b.cssLoader.hasOwnProperty("ocLazyLoadLoader")?(b._$log.error(c),m.reject(c)):m.resolve()},e),i.push(m.promise)}if(g.length>0){var n=c.defer();b.templatesLoader(g,function(c){a.isDefined(c)&&b.templatesLoader.hasOwnProperty("ocLazyLoadLoader")?(b._$log.error(c),n.reject(c)):n.resolve()},e),i.push(n.promise)}if(h.length>0){var o=c.defer();b.jsLoader(h,function(c){a.isDefined(c)&&(b.jsLoader.hasOwnProperty("ocLazyLoadLoader")||b.jsLoader.hasOwnProperty("requirejs"))?(b._$log.error(c),o.reject(c)):o.resolve()},e),i.push(o.promise)}if(0===i.length){var p=c.defer(),q="Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.";return b._$log.error(q),p.reject(q),p.promise}return e.serie&&e.files.length>0?c.all(i).then(function(){return b.filesLoader(d,e)}):c.all(i)["finally"](function(a){return b.toggleWatch(!1),a})},b.load=function(d){var e,f=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=this,h=null,i=[],j=c.defer(),k=a.copy(d),l=a.copy(f);if(a.isArray(k))return a.forEach(k,function(a){i.push(g.load(a,l))}),c.all(i).then(function(a){j.resolve(a)},function(a){j.reject(a)}),j.promise;if(a.isString(k)?(h=g.getModuleConfig(k),h||(h={files:[k]})):a.isObject(k)&&(h=a.isDefined(k.path)&&a.isDefined(k.type)?{files:[k]}:g.setModuleConfig(k)),null===h){var m=g._getModuleName(k);return e='Module "'+(m||"unknown")+'" is not configured, cannot load.',b._$log.error(e),j.reject(new Error(e)),j.promise}a.isDefined(h.template)&&(a.isUndefined(h.files)&&(h.files=[]),a.isString(h.template)?h.files.push(h.template):a.isArray(h.template)&&h.files.concat(h.template));var n=a.extend({},l,h);return a.isUndefined(h.files)&&a.isDefined(h.name)&&b.moduleExists(h.name)?b.inject(h.name,n,!0):(b.filesLoader(h,n).then(function(){b.inject(null,n).then(function(a){j.resolve(a)},function(a){j.reject(a)})},function(a){j.reject(a)}),j.promise)},b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q",function(b,c){return b.cssLoader=function(d,e,f){var g=[];a.forEach(d,function(a){g.push(b.buildElement("css",a,f))}),c.all(g).then(function(){e()},function(a){e(a)})},b.cssLoader.ocLazyLoadLoader=!0,b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q",function(b,c){return b.jsLoader=function(d,e,f){var g=[];a.forEach(d,function(a){g.push(b.buildElement("js",a,f))}),c.all(g).then(function(){e()},function(a){e(a)})},b.jsLoader.ocLazyLoadLoader=!0,b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$templateCache","$q","$http",function(b,c,d,e){return b.templatesLoader=function(f,g,h){var i=[],j=b._getFilesCache();return a.forEach(f,function(b){var f=d.defer();i.push(f.promise),e.get(b,h).success(function(d){a.isString(d)&&d.length>0&&a.forEach(a.element(d),function(a){"SCRIPT"===a.nodeName&&"text/ng-template"===a.type&&c.put(a.id,a.innerHTML)}),a.isUndefined(j.get(b))&&j.put(b,!0),f.resolve()}).error(function(a){f.reject(new Error('Unable to load template file "'+b+'": '+a))})}),d.all(i).then(function(){g()},function(a){g(a)})},b.templatesLoader.ocLazyLoadLoader=!0,b}])}])}(angular),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=+b||0;if(Math.abs(f)===1/0&&(f=0),f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);e>c;){if(c in d&&d[c]===a)return c;c++}return-1}),"undefined"==typeof PDFJS&&(("undefined"!=typeof window?window:this).PDFJS={}),PDFJS.version="1.1.551",PDFJS.build="2a5616c",function(){"use strict";function a(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.infos&&console.log("Info: "+a)}function b(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.warnings&&console.log("Warning: "+a)}function c(a){b("Deprecated API usage: "+a)}function d(a){throw PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.errors&&(console.log("Error: "+a),console.log(e())),I.notify(H.unknown),new Error(a)}function e(){try{throw new Error}catch(a){return a.stack?a.stack.split("\n").slice(2).join("\n"):""}}function f(a,b){a||d(b)}function g(a,b){if(!b)return a;if(/^[a-z][a-z0-9+\-.]*:/i.test(b))return b;var c;if("/"===b.charAt(0))return c=a.indexOf("://"),"/"===b.charAt(1)?++c:c=a.indexOf("/",c+3),a.substring(0,c)+b;var d=a.length;c=a.lastIndexOf("#"),d=c>=0?c:d,c=a.lastIndexOf("?",d),d=c>=0?c:d;var e=a.lastIndexOf("/",d);return a.substring(0,e+1)+b}function h(a,b){if(!a)return!1;var c=/^[a-z][a-z0-9+\-.]*(?=:)/i.exec(a);if(!c)return b;switch(c=c[0].toLowerCase()){case"http":case"https":case"ftp":case"mailto":case"tel":return!0;default:return!1}}function i(a,b,c){return Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!1}),c}function j(){switch(PDFJS.openExternalLinksInNewWindow&&(b("PDFJS.openExternalLinksInNewWindow is deprecated, use PDFJS.externalLinkTarget instead."),PDFJS.externalLinkTarget===J.NONE&&(PDFJS.externalLinkTarget=J.BLANK),PDFJS.openExternalLinksInNewWindow=!1),PDFJS.externalLinkTarget){case J.NONE:return!1;case J.SELF:case J.BLANK:case J.PARENT:case J.TOP:return!0}return b("PDFJS.externalLinkTarget is invalid: "+PDFJS.externalLinkTarget),PDFJS.externalLinkTarget=J.NONE,!1}function k(a){f(null!==a&&"object"==typeof a&&void 0!==a.length,"Invalid argument for bytesToString");var b=a.length,c=8192;if(c>b)return String.fromCharCode.apply(null,a);for(var d=[],e=0;b>e;e+=c){var g=Math.min(e+c,b),h=a.subarray(e,g);d.push(String.fromCharCode.apply(null,h))}return d.join("")}function l(a){f("string"==typeof a,"Invalid argument for stringToBytes");for(var b=a.length,c=new Uint8Array(b),d=0;b>d;++d)c[d]=255&a.charCodeAt(d);return c}function m(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,255&a)}function n(){var a=new Uint8Array(2);a[0]=1;var b=new Uint16Array(a.buffer);return 1===b[0]}function o(){var a=document.createElement("canvas");a.width=a.height=1;var b=a.getContext("2d"),c=b.createImageData(1,1);return"undefined"!=typeof c.data.buffer}function p(a){return"number"==typeof a}function q(a){return a instanceof Array}function r(a){return"object"==typeof a&&null!==a&&void 0!==a.byteLength}function s(){var a={};return a.promise=new Promise(function(b,c){a.resolve=b,a.reject=c}),a}function t(a,b){this.name=a,this.comObj=b,this.callbackIndex=1,this.postMessageTransfers=!0;var c=this.callbacksCapabilities={},e=this.actionHandler={};e.console_log=[function(a){console.log.apply(console,a)}],e.console_error=[function(a){console.error.apply(console,a)}],e._unsupported_feature=[function(a){I.notify(a)}],b.onmessage=function(a){var f=a.data;if(f.isReply){var g=f.callbackId;if(f.callbackId in c){var h=c[g];delete c[g],"error"in f?h.reject(f.error):h.resolve(f.data)}else d("Cannot resolve callback "+g)}else if(f.action in e){var i=e[f.action];f.callbackId?Promise.resolve().then(function(){return i[0].call(i[1],f.data)}).then(function(a){b.postMessage({isReply:!0,callbackId:f.callbackId,data:a})},function(a){a instanceof Error&&(a+=""),b.postMessage({isReply:!0,callbackId:f.callbackId,error:a})}):i[0].call(i[1],f.data)}else d("Unknown action from worker: "+f.action)}}function u(a,c,d){var e=new Image;e.onload=function(){d.resolve(a,e)},e.onerror=function(){d.resolve(a,null),b("Error during JPEG image loading")},e.src=c}function v(a,b){var c=document.createElement("canvas");return c.width=a,c.height=b,c}function w(a){a.mozCurrentTransform||(a._originalSave=a.save,a._originalRestore=a.restore,a._originalRotate=a.rotate,a._originalScale=a.scale,a._originalTranslate=a.translate,a._originalTransform=a.transform,a._originalSetTransform=a.setTransform,a._transformMatrix=a._transformMatrix||[1,0,0,1,0,0],a._transformStack=[],Object.defineProperty(a,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(a,"mozCurrentTransformInverse",{get:function(){var a=this._transformMatrix,b=a[0],c=a[1],d=a[2],e=a[3],f=a[4],g=a[5],h=b*e-c*d,i=c*d-b*e;return[e/h,c/i,d/i,b/h,(e*f-d*g)/i,(c*f-b*g)/h]}}),a.save=function(){var a=this._transformMatrix;this._transformStack.push(a),this._transformMatrix=a.slice(0,6),this._originalSave()},a.restore=function(){var a=this._transformStack.pop();a&&(this._transformMatrix=a,this._originalRestore())},a.translate=function(a,b){var c=this._transformMatrix;c[4]=c[0]*a+c[2]*b+c[4],c[5]=c[1]*a+c[3]*b+c[5],this._originalTranslate(a,b)},a.scale=function(a,b){var c=this._transformMatrix;c[0]=c[0]*a,c[1]=c[1]*a,c[2]=c[2]*b,c[3]=c[3]*b,this._originalScale(a,b)},a.transform=function(b,c,d,e,f,g){var h=this._transformMatrix;this._transformMatrix=[h[0]*b+h[2]*c,h[1]*b+h[3]*c,h[0]*d+h[2]*e,h[1]*d+h[3]*e,h[0]*f+h[2]*g+h[4],h[1]*f+h[3]*g+h[5]],a._originalTransform(b,c,d,e,f,g)},a.setTransform=function(b,c,d,e,f,g){this._transformMatrix=[b,c,d,e,f,g],a._originalSetTransform(b,c,d,e,f,g)},a.rotate=function(a){var b=Math.cos(a),c=Math.sin(a),d=this._transformMatrix;this._transformMatrix=[d[0]*b+d[2]*c,d[1]*b+d[3]*c,d[0]*-c+d[2]*b,d[1]*-c+d[3]*b,d[4],d[5]],this._originalRotate(a)})}function x(a){var b,c,d,e,f=1e3,g=a.width,h=a.height,i=g+1,j=new Uint8Array(i*(h+1)),k=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),l=g+7&-8,m=a.data,n=new Uint8Array(l*h),o=0;for(b=0,e=m.length;e>b;b++)for(var p=128,q=m[b];p>0;)n[o++]=q&p?0:255,p>>=1;var r=0;for(o=0,0!==n[o]&&(j[0]=1,++r),c=1;g>c;c++)n[o]!==n[o+1]&&(j[c]=n[o]?2:1,++r),o++;for(0!==n[o]&&(j[c]=2,++r),b=1;h>b;b++){o=b*l,d=b*i,n[o-l]!==n[o]&&(j[d]=n[o]?1:8,++r);var s=(n[o]?4:0)+(n[o-l]?8:0);for(c=1;g>c;c++)s=(s>>2)+(n[o+1]?4:0)+(n[o-l+1]?8:0),k[s]&&(j[d+c]=k[s],++r),o++;if(n[o-l]!==n[o]&&(j[d+c]=n[o]?2:4,++r),r>f)return null}for(o=l*(h-1),d=b*i,0!==n[o]&&(j[d]=8,++r),c=1;g>c;c++)n[o]!==n[o+1]&&(j[d+c]=n[o]?4:8,++r),o++;if(0!==n[o]&&(j[d+c]=4,++r),r>f)return null;var t=new Int32Array([0,i,-1,0,-i,0,0,0,1]),u=[];for(b=0;r&&h>=b;b++){for(var v=b*i,w=v+g;w>v&&!j[v];)v++;if(v!==w){var x,y=[v%i,b],z=j[v],A=v;do{var B=t[z];do v+=B;while(!j[v]);x=j[v],5!==x&&10!==x?(z=x,j[v]=0):(z=x&51*z>>4,j[v]&=z>>2|z<<2),y.push(v%i),y.push(v/i|0),--r}while(A!==v);u.push(y),--b}}var C=function(a){a.save(),a.scale(1/g,-1/h),a.translate(0,-h),a.beginPath();for(var b=0,c=u.length;c>b;b++){var d=u[b];a.moveTo(d[0],d[1]);for(var e=2,f=d.length;f>e;e+=2)a.lineTo(d[e],d[e+1])}a.fill(),a.beginPath(),a.restore()};return C}function y(a){var b=ma[a[0]];return b||d("Unknown IR type: "+a[0]),b.fromIR(a)}var z="undefined"==typeof window?this:window,A="undefined"==typeof window,B=[.001,0,0,.001,0,0],C={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},D={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},E={WIDGET:1,TEXT:2,LINK:3},F={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};z.PDFJS||(z.PDFJS={}),z.PDFJS.pdfBug=!1,PDFJS.VERBOSITY_LEVELS={errors:0,warnings:1,infos:5};var G=PDFJS.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},H=PDFJS.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},I=PDFJS.UnsupportedManager=function(){var a=[];return{listen:function(b){a.push(b)},notify:function(c){b('Unsupported feature "'+c+'"');for(var d=0,e=a.length;e>d;d++)a[d](c)}}}();PDFJS.isValidUrl=h,PDFJS.shadow=i;var J=PDFJS.LinkTarget={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4},K=["","_self","_blank","_parent","_top"];PDFJS.isExternalLinkTargetSet=j;var L=PDFJS.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},M=function(){function a(a,b){this.name="PasswordException",this.message=a,this.code=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.PasswordException=M;var N=function(){function a(a,b){this.name="UnknownErrorException",this.message=a,this.details=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnknownErrorException=N;var O=function(){function a(a){this.name="InvalidPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.InvalidPDFException=O;var P=function(){function a(a){this.name="MissingPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.MissingPDFException=P;var Q=function(){function a(a,b){this.name="UnexpectedResponseException",this.message=a,this.status=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnexpectedResponseException=Q;(function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="NotImplementedException",a.constructor=a,a})(),function(){function a(a,b){this.begin=a,this.end=b,this.message="Missing data ["+a+", "+b+")"}return a.prototype=new Error,a.prototype.name="MissingDataException",a.constructor=a,a}(),function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="XRefParseException",a.constructor=a,a}();Object.defineProperty(PDFJS,"isLittleEndian",{configurable:!0,get:function(){return i(PDFJS,"isLittleEndian",n())}}),Object.defineProperty(PDFJS,"hasCanvasTypedArrays",{configurable:!0,get:function(){return i(PDFJS,"hasCanvasTypedArrays",o())}});var R=function(){function a(a,b){this.buffer=a,this.byteLength=a.length,this.length=void 0===b?this.byteLength>>2:b,c(this.length)}function b(a){return{get:function(){var b=this.buffer,c=a<<2;return(b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24)>>>0},set:function(b){var c=this.buffer,d=a<<2;c[d]=255&b,c[d+1]=b>>8&255,c[d+2]=b>>16&255,c[d+3]=b>>>24&255}}}function c(c){for(;c>d;)Object.defineProperty(a.prototype,d,b(d)),d++}a.prototype=Object.create(null);var d=0;return a}(),S=[1,0,0,1,0,0],T=PDFJS.Util=function(){function a(){}var b=["rgb(",0,",",0,",",0,")"];return a.makeCssRgb=function(a,c,d){return b[1]=a,b[3]=c,b[5]=d,b.join("")},a.transform=function(a,b){return[a[0]*b[0]+a[2]*b[1],a[1]*b[0]+a[3]*b[1],a[0]*b[2]+a[2]*b[3],a[1]*b[2]+a[3]*b[3],a[0]*b[4]+a[2]*b[5]+a[4],a[1]*b[4]+a[3]*b[5]+a[5]]},a.applyTransform=function(a,b){var c=a[0]*b[0]+a[1]*b[2]+b[4],d=a[0]*b[1]+a[1]*b[3]+b[5];return[c,d]},a.applyInverseTransform=function(a,b){var c=b[0]*b[3]-b[1]*b[2],d=(a[0]*b[3]-a[1]*b[2]+b[2]*b[5]-b[4]*b[3])/c,e=(-a[0]*b[1]+a[1]*b[0]+b[4]*b[1]-b[5]*b[0])/c;return[d,e]},a.getAxialAlignedBoundingBox=function(b,c){var d=a.applyTransform(b,c),e=a.applyTransform(b.slice(2,4),c),f=a.applyTransform([b[0],b[3]],c),g=a.applyTransform([b[2],b[1]],c);return[Math.min(d[0],e[0],f[0],g[0]),Math.min(d[1],e[1],f[1],g[1]),Math.max(d[0],e[0],f[0],g[0]),Math.max(d[1],e[1],f[1],g[1])]},a.inverseTransform=function(a){var b=a[0]*a[3]-a[1]*a[2];return[a[3]/b,-a[1]/b,-a[2]/b,a[0]/b,(a[2]*a[5]-a[4]*a[3])/b,(a[4]*a[1]-a[5]*a[0])/b]},a.apply3dTransform=function(a,b){return[a[0]*b[0]+a[1]*b[1]+a[2]*b[2],a[3]*b[0]+a[4]*b[1]+a[5]*b[2],a[6]*b[0]+a[7]*b[1]+a[8]*b[2]]},a.singularValueDecompose2dScale=function(a){var b=[a[0],a[2],a[1],a[3]],c=a[0]*b[0]+a[1]*b[2],d=a[0]*b[1]+a[1]*b[3],e=a[2]*b[0]+a[3]*b[2],f=a[2]*b[1]+a[3]*b[3],g=(c+f)/2,h=Math.sqrt((c+f)*(c+f)-4*(c*f-e*d))/2,i=g+h||1,j=g-h||1;return[Math.sqrt(i),Math.sqrt(j)]},a.normalizeRect=function(a){var b=a.slice(0);return a[0]>a[2]&&(b[0]=a[2],b[2]=a[0]),a[1]>a[3]&&(b[1]=a[3],b[3]=a[1]),b},a.intersect=function(b,c){function d(a,b){return a-b}var e=[b[0],b[2],c[0],c[2]].sort(d),f=[b[1],b[3],c[1],c[3]].sort(d),g=[];return b=a.normalizeRect(b),c=a.normalizeRect(c),e[0]===b[0]&&e[1]===c[0]||e[0]===c[0]&&e[1]===b[0]?(g[0]=e[1],g[2]=e[2],f[0]===b[1]&&f[1]===c[1]||f[0]===c[1]&&f[1]===b[1]?(g[1]=f[1],g[3]=f[2],g):!1):!1},a.sign=function(a){return 0>a?-1:1},a.appendToArray=function(a,b){Array.prototype.push.apply(a,b)},a.prependToArray=function(a,b){Array.prototype.unshift.apply(a,b)},a.extendObj=function(a,b){for(var c in b)a[c]=b[c]},a.getInheritableProperty=function(a,b){for(;a&&!a.has(b);)a=a.get("Parent");return a?a.get(b):null},a.inherit=function(a,b,c){a.prototype=Object.create(b.prototype),a.prototype.constructor=a;for(var d in c)a.prototype[d]=c[d]},a.loadScript=function(a,b){var c=document.createElement("script"),d=!1;c.setAttribute("src",a),b&&(c.onload=function(){d||b(),d=!0}),document.getElementsByTagName("head")[0].appendChild(c)},a}();PDFJS.PageViewport=function(){function a(a,b,c,d,e,f){this.viewBox=a,this.scale=b,this.rotation=c,this.offsetX=d,this.offsetY=e;var g,h,i,j,k=(a[2]+a[0])/2,l=(a[3]+a[1])/2;switch(c%=360,c=0>c?c+360:c){case 180:g=-1,h=0,i=0,j=1;break;case 90:g=0,h=1,i=1,j=0;break;case 270:g=0,h=-1,i=-1,j=0;break;default:g=1,h=0,i=0,j=-1}f&&(i=-i,j=-j);var m,n,o,p;0===g?(m=Math.abs(l-a[1])*b+d,n=Math.abs(k-a[0])*b+e,o=Math.abs(a[3]-a[1])*b,p=Math.abs(a[2]-a[0])*b):(m=Math.abs(k-a[0])*b+d,n=Math.abs(l-a[1])*b+e,o=Math.abs(a[2]-a[0])*b,p=Math.abs(a[3]-a[1])*b),this.transform=[g*b,h*b,i*b,j*b,m-g*b*k-i*b*l,n-h*b*k-j*b*l],this.width=o,this.height=p,this.fontScale=b}return a.prototype={clone:function(b){b=b||{};var c="scale"in b?b.scale:this.scale,d="rotation"in b?b.rotation:this.rotation;return new a(this.viewBox.slice(),c,d,this.offsetX,this.offsetY,b.dontFlip)},convertToViewportPoint:function(a,b){return T.applyTransform([a,b],this.transform)},convertToViewportRectangle:function(a){var b=T.applyTransform([a[0],a[1]],this.transform),c=T.applyTransform([a[2],a[3]],this.transform);return[b[0],b[1],c[0],c[1]]},convertToPdfPoint:function(a,b){return T.applyInverseTransform([a,b],this.transform)}},a}();PDFJS.createPromiseCapability=s,function(){function a(a){this._status=c,this._handlers=[];try{a.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(b){this._reject(b)}}if(z.Promise)return"function"!=typeof z.Promise.all&&(z.Promise.all=function(a){var b,c,d=0,e=[],f=new z.Promise(function(a,d){b=a,c=d});return a.forEach(function(a,f){d++,a.then(function(a){e[f]=a,d--,0===d&&b(e)},c)}),0===d&&b(e),f}),"function"!=typeof z.Promise.resolve&&(z.Promise.resolve=function(a){return new z.Promise(function(b){b(a)})}),"function"!=typeof z.Promise.reject&&(z.Promise.reject=function(a){return new z.Promise(function(b,c){c(a)})}),void("function"!=typeof z.Promise.prototype["catch"]&&(z.Promise.prototype["catch"]=function(a){return z.Promise.prototype.then(void 0,a)}));var c=0,d=1,e=2,f=500,g={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(a){a._status!==c&&(this.handlers=this.handlers.concat(a._handlers),a._handlers=[],this.running||(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(var a=1,b=Date.now()+a;this.handlers.length>0;){var c=this.handlers.shift(),f=c.thisPromise._status,g=c.thisPromise._value;try{f===d?"function"==typeof c.onResolve&&(g=c.onResolve(g)):"function"==typeof c.onReject&&(g=c.onReject(g),f=d,c.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(c.thisPromise))}catch(h){f=e,g=h}if(c.nextPromise._updateStatus(f,g),Date.now()>=b)break}return this.handlers.length>0?void setTimeout(this.runHandlers.bind(this),0):void(this.running=!1)},addUnhandledRejection:function(a){this.unhandledRejections.push({promise:a,time:Date.now()}),this.scheduleRejectionCheck()},removeUnhandeledRejection:function(a){a._unhandledRejection=!1;for(var b=0;bf){var d=this.unhandledRejections[c].promise._value,e="Unhandled rejection: "+d;d.stack&&(e+="\n"+d.stack),b(e),this.unhandledRejections.splice(c),c--}this.unhandledRejections.length&&this.scheduleRejectionCheck()}.bind(this),f))}};a.all=function(b){function c(a){g._status!==e&&(i=[],f(a))}var d,f,g=new a(function(a,b){d=a,f=b}),h=b.length,i=[];if(0===h)return d(i),g;for(var j=0,k=b.length;k>j;++j){var l=b[j],m=function(a){return function(b){g._status!==e&&(i[a]=b,h--,0===h&&d(i))}}(j);a.isPromise(l)?l.then(m,c):m(l)}return g},a.isPromise=function(a){return a&&"function"==typeof a.then},a.resolve=function(b){return new a(function(a){a(b)})},a.reject=function(b){return new a(function(a,c){c(b)})},a.prototype={_status:null,_value:null,_handlers:null,_unhandledRejection:null,_updateStatus:function(b,c){if(this._status!==d&&this._status!==e){if(b===d&&a.isPromise(c))return void c.then(this._updateStatus.bind(this,d),this._updateStatus.bind(this,e));this._status=b,this._value=c,b===e&&0===this._handlers.length&&(this._unhandledRejection=!0,g.addUnhandledRejection(this)),g.scheduleHandlers(this)}},_resolve:function(a){this._updateStatus(d,a)},_reject:function(a){this._updateStatus(e,a)},then:function(b,c){var d=new a(function(a,b){this.resolve=a,this.reject=b});return this._handlers.push({thisPromise:this,onResolve:b,onReject:c,nextPromise:d}),g.scheduleHandlers(this),d},"catch":function(a){return this.then(void 0,a)}},z.Promise=a}();var U=function(){function a(a,b,c){for(;a.lengthb;++b){var g=d[b].name;g.length>f&&(f=g.length)}for(b=0,c=d.length;c>b;++b){var h=d[b],i=h.end-h.start;e+=a(h.name," ",f)+" "+i+"ms\n"}return e}},c}();PDFJS.createBlob=function(a,b){if("undefined"!=typeof Blob)return new Blob([a],{type:b});var c=new MozBlobBuilder;return c.append(a),c.getBlob(b)},PDFJS.createObjectURL=function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; +return function(b,c){if(!PDFJS.disableCreateObjectURL&&"undefined"!=typeof URL&&URL.createObjectURL){var d=PDFJS.createBlob(b,c);return URL.createObjectURL(d)}for(var e="data:"+c+";base64,",f=0,g=b.length;g>f;f+=3){var h=255&b[f],i=255&b[f+1],j=255&b[f+2],k=h>>2,l=(3&h)<<4|i>>4,m=g>f+1?(15&i)<<2|j>>6:64,n=g>f+2?63&j:64;e+=a[k]+a[l]+a[m]+a[n]}return e}}(),t.prototype={on:function(a,b,c){var e=this.actionHandler;e[a]&&d('There is already an actionName called "'+a+'"'),e[a]=[b,c]},send:function(a,b,c){var d={action:a,data:b};this.postMessage(d,c)},sendWithPromise:function(a,b,c){var d=this.callbackIndex++,e={action:a,data:b,callbackId:d},f=s();this.callbacksCapabilities[d]=f;try{this.postMessage(e,c)}catch(g){f.reject(g)}return f.promise},postMessage:function(a,b){b&&this.postMessageTransfers?this.comObj.postMessage(a,b):this.comObj.postMessage(a)}},PDFJS.maxImageSize=void 0===PDFJS.maxImageSize?-1:PDFJS.maxImageSize,PDFJS.cMapUrl=void 0===PDFJS.cMapUrl?null:PDFJS.cMapUrl,PDFJS.cMapPacked=void 0===PDFJS.cMapPacked?!1:PDFJS.cMapPacked,PDFJS.disableFontFace=void 0===PDFJS.disableFontFace?!1:PDFJS.disableFontFace,PDFJS.imageResourcesPath=void 0===PDFJS.imageResourcesPath?"":PDFJS.imageResourcesPath,PDFJS.disableWorker=void 0===PDFJS.disableWorker?!1:PDFJS.disableWorker,PDFJS.workerSrc=void 0===PDFJS.workerSrc?null:PDFJS.workerSrc,PDFJS.disableRange=void 0===PDFJS.disableRange?!1:PDFJS.disableRange,PDFJS.disableStream=void 0===PDFJS.disableStream?!1:PDFJS.disableStream,PDFJS.disableAutoFetch=void 0===PDFJS.disableAutoFetch?!1:PDFJS.disableAutoFetch,PDFJS.pdfBug=void 0===PDFJS.pdfBug?!1:PDFJS.pdfBug,PDFJS.postMessageTransfers=void 0===PDFJS.postMessageTransfers?!0:PDFJS.postMessageTransfers,PDFJS.disableCreateObjectURL=void 0===PDFJS.disableCreateObjectURL?!1:PDFJS.disableCreateObjectURL,PDFJS.disableWebGL=void 0===PDFJS.disableWebGL?!0:PDFJS.disableWebGL,PDFJS.disableFullscreen=void 0===PDFJS.disableFullscreen?!1:PDFJS.disableFullscreen,PDFJS.useOnlyCssZoom=void 0===PDFJS.useOnlyCssZoom?!1:PDFJS.useOnlyCssZoom,PDFJS.verbosity=void 0===PDFJS.verbosity?PDFJS.VERBOSITY_LEVELS.warnings:PDFJS.verbosity,PDFJS.maxCanvasPixels=void 0===PDFJS.maxCanvasPixels?16777216:PDFJS.maxCanvasPixels,PDFJS.openExternalLinksInNewWindow=void 0===PDFJS.openExternalLinksInNewWindow?!1:PDFJS.openExternalLinksInNewWindow,PDFJS.externalLinkTarget=void 0===PDFJS.externalLinkTarget?PDFJS.LinkTarget.NONE:PDFJS.externalLinkTarget,PDFJS.isEvalSupported=void 0===PDFJS.isEvalSupported?!0:PDFJS.isEvalSupported,PDFJS.getDocument=function(a,b,e,f){var h=new V;arguments.length>1&&c("getDocument is called with pdfDataRangeTransport, passwordCallback or progressCallback argument"),b&&(b instanceof W||(b=Object.create(b),b.length=a.length,b.initialData=a.initialData,b.abort||(b.abort=function(){})),a=Object.create(a),a.range=b),h.onPassword=e||null,h.onProgress=f||null;var i,j,k;"string"==typeof a?k={url:a}:r(a)?k={data:a}:a instanceof W?k={range:a}:("object"!=typeof a&&d("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object"),a.url||a.data||a.range||d("Invalid parameter object: need either .data, .range or .url"),k=a);var m={};for(var n in k)if("url"!==n||"undefined"==typeof window){if("range"!==n)if("data"!==n||k[n]instanceof Uint8Array)m[n]=k[n];else{var o=k[n];"string"==typeof o?m[n]=l(o):"object"!=typeof o||null===o||isNaN(o.length)?r(o)?m[n]=new Uint8Array(o):d("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property."):m[n]=new Uint8Array(o)}}else m[n]=g(window.location.href,k[n]);return i=s(),j=new Z(i,k.range),i.promise.then(function(){j.fetchDocument(h,m)}),h._transport=j,h};var V=function(){function a(){this._capability=s(),this._transport=null,this.onPassword=null,this.onProgress=null}return a.prototype={get promise(){return this._capability.promise},destroy:function(){return this._transport.destroy()},then:function(a,b){return this.promise.then.apply(this.promise,arguments)}},a}(),W=function(){function a(a,b){this.length=a,this.initialData=b,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._readyCapability=s()}return a.prototype={addRangeListener:function(a){this._rangeListeners.push(a)},addProgressListener:function(a){this._progressListeners.push(a)},addProgressiveReadListener:function(a){this._progressiveReadListeners.push(a)},onDataRange:function(a,b){for(var c=this._rangeListeners,d=0,e=c.length;e>d;++d)c[d](a,b)},onDataProgress:function(a){this._readyCapability.promise.then(function(){for(var b=this._progressListeners,c=0,d=b.length;d>c;++c)b[c](a)}.bind(this))},onDataProgressiveRead:function(a){this._readyCapability.promise.then(function(){for(var b=this._progressiveReadListeners,c=0,d=b.length;d>c;++c)b[c](a)}.bind(this))},transportReady:function(){this._readyCapability.resolve()},requestDataRange:function(a,b){throw new Error("Abstract method PDFDataRangeTransport.requestDataRange")},abort:function(){}},a}();PDFJS.PDFDataRangeTransport=W;var X=function(){function a(a,b,c){this.pdfInfo=a,this.transport=b,this.loadingTask=c}return a.prototype={get numPages(){return this.pdfInfo.numPages},get fingerprint(){return this.pdfInfo.fingerprint},getPage:function(a){return this.transport.getPage(a)},getPageIndex:function(a){return this.transport.getPageIndex(a)},getDestinations:function(){return this.transport.getDestinations()},getDestination:function(a){return this.transport.getDestination(a)},getAttachments:function(){return this.transport.getAttachments()},getJavaScript:function(){return this.transport.getJavaScript()},getOutline:function(){return this.transport.getOutline()},getMetadata:function(){return this.transport.getMetadata()},getData:function(){return this.transport.getData()},getDownloadInfo:function(){return this.transport.downloadInfoCapability.promise},getStats:function(){return this.transport.getStats()},cleanup:function(){this.transport.startCleanup()},destroy:function(){return this.transport.destroy()}},a}(),Y=function(){function a(a,b,c){this.pageIndex=a,this.pageInfo=b,this.transport=c,this.stats=new U,this.stats.enabled=!!z.PDFJS.enableStats,this.commonObjs=c.commonObjs,this.objs=new $,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this.intentStates={},this.destroyed=!1}return a.prototype={get pageNumber(){return this.pageIndex+1},get rotate(){return this.pageInfo.rotate},get ref(){return this.pageInfo.ref},get view(){return this.pageInfo.view},getViewport:function(a,b){return arguments.length<2&&(b=this.rotate),new PDFJS.PageViewport(this.view,a,b,0,0)},getAnnotations:function(){return this.annotationsPromise||(this.annotationsPromise=this.transport.getAnnotations(this.pageIndex)),this.annotationsPromise},render:function(a){function b(a){var b=f.renderTasks.indexOf(g);b>=0&&f.renderTasks.splice(b,1),i.cleanupAfterRender&&(i.pendingCleanup=!0),i._tryCleanup(),a?g.capability.reject(a):g.capability.resolve(),d.timeEnd("Rendering"),d.timeEnd("Overall")}var d=this.stats;d.time("Overall"),this.pendingCleanup=!1;var e="print"===a.intent?"print":"display";this.intentStates[e]||(this.intentStates[e]={});var f=this.intentStates[e];f.displayReadyCapability||(f.receivingOperatorList=!0,f.displayReadyCapability=s(),f.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this.stats.time("Page Request"),this.transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageNumber-1,intent:e}));var g=new aa(b,a,this.objs,this.commonObjs,f.operatorList,this.pageNumber);g.useRequestAnimationFrame="print"!==e,f.renderTasks||(f.renderTasks=[]),f.renderTasks.push(g);var h=g.task;a.continueCallback&&(c("render is used with continueCallback parameter"),h.onContinue=a.continueCallback);var i=this;return f.displayReadyCapability.promise.then(function(a){return i.pendingCleanup?void b():(d.time("Rendering"),g.initalizeGraphics(a),void g.operatorListChanged())},function(a){b(a)}),h},getOperatorList:function(){function a(){c.operatorList.lastChunk&&c.opListReadCapability.resolve(c.operatorList)}var b="oplist";this.intentStates[b]||(this.intentStates[b]={});var c=this.intentStates[b];if(!c.opListReadCapability){var d={};d.operatorListChanged=a,c.receivingOperatorList=!0,c.opListReadCapability=s(),c.renderTasks=[],c.renderTasks.push(d),c.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this.transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageIndex,intent:b})}return c.opListReadCapability.promise},getTextContent:function(){return this.transport.messageHandler.sendWithPromise("GetTextContent",{pageIndex:this.pageNumber-1})},_destroy:function(){this.destroyed=!0,this.transport.pageCache[this.pageIndex]=null;var a=[];return Object.keys(this.intentStates).forEach(function(b){var c=this.intentStates[b];c.renderTasks.forEach(function(b){var c=b.capability.promise["catch"](function(){});a.push(c),b.cancel()})},this),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(a)},destroy:function(){c("page destroy method, use cleanup() instead"),this.cleanup()},cleanup:function(){this.pendingCleanup=!0,this._tryCleanup()},_tryCleanup:function(){this.pendingCleanup&&!Object.keys(this.intentStates).some(function(a){var b=this.intentStates[a];return 0!==b.renderTasks.length||b.receivingOperatorList},this)&&(Object.keys(this.intentStates).forEach(function(a){delete this.intentStates[a]},this),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1)},_startRenderPage:function(a,b){var c=this.intentStates[b];c.displayReadyCapability&&c.displayReadyCapability.resolve(a)},_renderPageChunk:function(a,b){var c,d,e=this.intentStates[b];for(c=0,d=a.length;d>c;c++)e.operatorList.fnArray.push(a.fnArray[c]),e.operatorList.argsArray.push(a.argsArray[c]);for(e.operatorList.lastChunk=a.lastChunk,c=0;ch&&(g.cleanupAfterRender=!0);break;default:d("Got unknown object type "+f)}},this),a.on("DocProgress",function(a){var b=this.loadingTask;b.onProgress&&b.onProgress({loaded:a.loaded,total:a.total})},this),a.on("PageError",function(a){var b=this.pageCache[a.pageNum-1],c=b.intentStates[a.intent];c.displayReadyCapability?c.displayReadyCapability.reject(a.error):d(a.error)},this),a.on("JpegDecode",function(a){var b=a[0],c=a[1];return 3!==c&&1!==c?Promise.reject(new Error("Only 3 components or 1 component can be returned")):new Promise(function(a,d){var e=new Image;e.onload=function(){var b=e.width,d=e.height,f=b*d,g=4*f,h=new Uint8Array(f*c),i=v(b,d),j=i.getContext("2d");j.drawImage(e,0,0);var k,l,m=j.getImageData(0,0,b,d).data;if(3===c)for(k=0,l=0;g>k;k+=4,l+=3)h[l]=m[k],h[l+1]=m[k+1],h[l+2]=m[k+2];else if(1===c)for(k=0,l=0;g>k;k+=4,l++)h[l]=m[k];a({data:h,width:b,height:d})},e.onerror=function(){d(new Error("JpegDecode failed to load image"))},e.src=b})})},fetchDocument:function(a,b){return this.destroyed?(a._capability.reject(new Error("Loading aborted")),void this.destroyCapability.resolve()):(this.loadingTask=a,b.disableAutoFetch=PDFJS.disableAutoFetch,b.disableStream=PDFJS.disableStream,b.chunkedViewerLoading=!!this.pdfDataRangeTransport,this.pdfDataRangeTransport&&(b.length=this.pdfDataRangeTransport.length,b.initialData=this.pdfDataRangeTransport.initialData),void this.messageHandler.send("GetDocRequest",{source:b,disableRange:PDFJS.disableRange,maxImageSize:PDFJS.maxImageSize,cMapUrl:PDFJS.cMapUrl,cMapPacked:PDFJS.cMapPacked,disableFontFace:PDFJS.disableFontFace,disableCreateObjectURL:PDFJS.disableCreateObjectURL,verbosity:PDFJS.verbosity}))},getData:function(){return this.messageHandler.sendWithPromise("GetData",null)},getPage:function(a,b){if(0>=a||a>this.numPages||(0|a)!==a)return Promise.reject(new Error("Invalid page request"));var c=a-1;if(c in this.pagePromises)return this.pagePromises[c];var d=this.messageHandler.sendWithPromise("GetPage",{pageIndex:c}).then(function(a){if(this.destroyed)throw new Error("Transport destroyed");var b=new Y(c,a,this);return this.pageCache[c]=b,b}.bind(this));return this.pagePromises[c]=d,d},getPageIndex:function(a){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:a})},getAnnotations:function(a){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:a})},getDestinations:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)},getDestination:function(a){return this.messageHandler.sendWithPromise("GetDestination",{id:a})},getAttachments:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)},getJavaScript:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)},getOutline:function(){return this.messageHandler.sendWithPromise("GetOutline",null)},getMetadata:function(){return this.messageHandler.sendWithPromise("GetMetadata",null).then(function(a){return{info:a[0],metadata:a[1]?new PDFJS.Metadata(a[1]):null}})},getStats:function(){return this.messageHandler.sendWithPromise("GetStats",null)},startCleanup:function(){this.messageHandler.sendWithPromise("Cleanup",null).then(function(){for(var a=0,b=this.pageCache.length;b>a;a++){var c=this.pageCache[a];c&&c.cleanup()}this.commonObjs.clear(),pa.clear()}.bind(this))}},c}(),$=function(){function a(){this.objs={}}return a.prototype={ensureObj:function(a){if(this.objs[a])return this.objs[a];var b={capability:s(),data:null,resolved:!1};return this.objs[a]=b,b},get:function(a,b){if(b)return this.ensureObj(a).capability.promise.then(b),null;var c=this.objs[a];return c&&c.resolved||d("Requesting object that isn't resolved yet "+a),c.data},resolve:function(a,b){var c=this.ensureObj(a);c.resolved=!0,c.data=b,c.capability.resolve(b)},isResolved:function(a){var b=this.objs;return b[a]?b[a].resolved:!1},hasData:function(a){return this.isResolved(a)},getData:function(a){var b=this.objs;return b[a]&&b[a].resolved?b[a].data:null},clear:function(){this.objs={}}},a}(),_=function(){function a(a){this._internalRenderTask=a,this.onContinue=null}return a.prototype={get promise(){return this._internalRenderTask.capability.promise},cancel:function(){this._internalRenderTask.cancel()},then:function(a,b){return this.promise.then.apply(this.promise,arguments)}},a}(),aa=function(){function a(a,b,c,d,e,f){this.callback=a,this.params=b,this.objs=c,this.commonObjs=d,this.operatorListIdx=null,this.operatorList=e,this.pageNumber=f,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this.useRequestAnimationFrame=!1,this.cancelled=!1,this.capability=s(),this.task=new _(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this)}return a.prototype={initalizeGraphics:function(a){if(!this.cancelled){PDFJS.pdfBug&&"StepperManager"in z&&z.StepperManager.enabled&&(this.stepper=z.StepperManager.create(this.pageNumber-1),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var b=this.params;this.gfx=new ka(b.canvasContext,this.commonObjs,this.objs,b.imageLayer),this.gfx.beginDrawing(b.viewport,a),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}},cancel:function(){this.running=!1,this.cancelled=!0,this.callback("cancelled")},operatorListChanged:function(){return this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),void(this.running||this._continue())):void(this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound))},_continue:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue.call(this.task,this._scheduleNextBound):this._scheduleNext())},_scheduleNext:function(){this.useRequestAnimationFrame?window.requestAnimationFrame(this._nextBound):Promise.resolve(void 0).then(this._nextBound)},_next:function(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this.callback())))}},a}(),ba=(PDFJS.Metadata=function(){function a(a){return a.replace(/>\\376\\377([^<]+)/g,function(a,b){for(var c=b.replace(/\\([0-3])([0-7])([0-7])/g,function(a,b,c,d){return String.fromCharCode(64*b+8*c+1*d)}),d="",e=0;e"+d})}function b(b){if("string"==typeof b){b=a(b);var c=new DOMParser;b=c.parseFromString(b,"application/xml")}else b instanceof Document||d("Metadata: Invalid metadata object");this.metaDocument=b,this.metadata={},this.parse()}return b.prototype={parse:function(){var a=this.metaDocument,b=a.documentElement;if("rdf:rdf"!==b.nodeName.toLowerCase())for(b=b.firstChild;b&&"rdf:rdf"!==b.nodeName.toLowerCase();)b=b.nextSibling;var c=b?b.nodeName.toLowerCase():null;if(b&&"rdf:rdf"===c&&b.hasChildNodes()){var d,e,f,g,h,i,j,k=b.childNodes;for(g=0,i=k.length;i>g;g++)if(d=k[g],"rdf:description"===d.nodeName.toLowerCase())for(h=0,j=d.childNodes.length;j>h;h++)"#text"!==d.childNodes[h].nodeName.toLowerCase()&&(e=d.childNodes[h],f=e.nodeName.toLowerCase(),this.metadata[f]=e.textContent.trim())}},get:function(a){return this.metadata[a]||null},has:function(a){return"undefined"!=typeof this.metadata[a]}},b}(),16),ca=100,da=4096,ea=.65,fa=!0,ga=1e3,ha=16,ia=function(){var a={};return{getCanvas:function(b,c,d,e){var f;if(void 0!==a[b])f=a[b],f.canvas.width=c,f.canvas.height=d,f.context.setTransform(1,0,0,1,0,0);else{var g=v(c,d),h=g.getContext("2d");e&&w(h),a[b]=f={canvas:g,context:h}}return f},clear:function(){for(var b in a){var c=a[b];c.canvas.width=0,c.canvas.height=0,delete a[b]}}}}(),ja=function(){function a(a){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=S,this.textMatrixScale=1,this.fontMatrix=B,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=C.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.old=a}return a.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(a,b){this.x=a,this.y=b}},a}(),ka=function(){function c(a,b,c,d){this.ctx=a,this.current=new ja,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=b,this.objs=c,this.imageLayer=d,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,a&&w(a),this.cachedGetSinglePixelWidth=null}function e(a,b){if("undefined"!=typeof ImageData&&b instanceof ImageData)return void a.putImageData(b,0,0);var c,e,f,g,h,i=b.height,j=b.width,k=i%ha,l=(i-k)/ha,m=0===k?l:l+1,n=a.createImageData(j,ha),o=0,p=b.data,q=n.data;if(b.kind===D.GRAYSCALE_1BPP){var r=p.byteLength,s=PDFJS.hasCanvasTypedArrays?new Uint32Array(q.buffer):new R(q),t=s.length,u=j+7>>3,v=4294967295,w=PDFJS.isLittleEndian||!PDFJS.hasCanvasTypedArrays?4278190080:255;for(e=0;m>e;e++){for(g=l>e?ha:k,c=0,f=0;g>f;f++){for(var x=r-o,y=0,z=x>u?j:8*x-7,A=-8&z,B=0,C=0;A>y;y+=8)C=p[o++],s[c++]=128&C?v:w,s[c++]=64&C?v:w,s[c++]=32&C?v:w,s[c++]=16&C?v:w,s[c++]=8&C?v:w,s[c++]=4&C?v:w,s[c++]=2&C?v:w,s[c++]=1&C?v:w;for(;z>y;y++)0===B&&(C=p[o++],B=128),s[c++]=C&B?v:w,B>>=1}for(;t>c;)s[c++]=0;a.putImageData(n,0,e*ha)}}else if(b.kind===D.RGBA_32BPP){for(f=0,h=j*ha*4,e=0;l>e;e++)q.set(p.subarray(o,o+h)),o+=h,a.putImageData(n,0,f),f+=ha;m>e&&(h=j*k*4,q.set(p.subarray(o,o+h)),a.putImageData(n,0,f))}else if(b.kind===D.RGB_24BPP)for(g=ha,h=j*g,e=0;m>e;e++){for(e>=l&&(g=k,h=j*g),c=0,f=h;f--;)q[c++]=p[o++],q[c++]=p[o++],q[c++]=p[o++],q[c++]=255;a.putImageData(n,0,e*ha)}else d("bad image kind: "+b.kind)}function g(a,b){for(var c=b.height,d=b.width,e=c%ha,f=(c-e)/ha,g=0===e?f:f+1,h=a.createImageData(d,ha),i=0,j=b.data,k=h.data,l=0;g>l;l++){for(var m=f>l?ha:e,n=3,o=0;m>o;o++)for(var p=0,q=0;d>q;q++){if(!p){var r=j[i++];p=128}k[n]=r&p?0:255,n+=4,p>>=1}a.putImageData(h,0,l*ha)}}function h(a,b){for(var c=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],d=0,e=c.length;e>d;d++){var f=c[d];void 0!==a[f]&&(b[f]=a[f])}void 0!==a.setLineDash?(b.setLineDash(a.getLineDash()),b.lineDashOffset=a.lineDashOffset):void 0!==a.mozDashOffset&&(b.mozDash=a.mozDash,b.mozDashOffset=a.mozDashOffset)}function j(a,b,c,d){for(var e=a.length,f=3;e>f;f+=4){var g=a[f];if(0===g)a[f-3]=b,a[f-2]=c,a[f-1]=d;else if(255>g){var h=255-g;a[f-3]=a[f-3]*g+b*h>>8,a[f-2]=a[f-2]*g+c*h>>8,a[f-1]=a[f-1]*g+d*h>>8}}}function k(a,b){for(var c=a.length,d=1/255,e=3;c>e;e+=4){var f=a[e];b[e]=b[e]*f*d|0}}function l(a,b){for(var c=a.length,d=3;c>d;d+=4){var e=77*a[d-3]+152*a[d-2]+28*a[d-1];b[d]=b[d]*e>>16}}function m(a,b,c,d,e,f){var g,h=!!f,i=h?f[0]:0,m=h?f[1]:0,n=h?f[2]:0;g="Luminosity"===e?l:k;for(var o=1048576,p=Math.min(d,Math.ceil(o/c)),q=0;d>q;q+=p){var r=Math.min(p,d-q),s=a.getImageData(0,q,c,r),t=b.getImageData(0,q,c,r);h&&j(s.data,i,m,n),g(s.data,t.data),a.putImageData(t,0,q)}}function n(a,b,c){var d=b.canvas,e=b.context;a.setTransform(b.scaleX,0,0,b.scaleY,b.offsetX,b.offsetY);var f=b.backdrop||null;if(la.isEnabled){var g=la.composeSMask(c.canvas,d,{subtype:b.subtype,backdrop:f});return a.setTransform(1,0,0,1,0,0),void a.drawImage(g,b.offsetX,b.offsetY)}m(e,c,d.width,d.height,b.subtype,f),a.drawImage(d,0,0)}var o=15,r=10,s=["butt","round","square"],t=["miter","round","bevel"],u={},v={};c.prototype={beginDrawing:function(a,b){var c=this.ctx.canvas.width,d=this.ctx.canvas.height;b?this.ctx.clearRect(0,0,c,d):(this.ctx.mozOpaque=!0,this.ctx.save(),this.ctx.fillStyle="rgb(255, 255, 255)",this.ctx.fillRect(0,0,c,d),this.ctx.restore());var e=a.transform;this.ctx.save(),this.ctx.transform.apply(this.ctx,e),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(a,b,c,d){var e=a.argsArray,f=a.fnArray,g=b||0,h=e.length;if(h===g)return g;for(var i,j=h-g>r&&"function"==typeof c,k=j?Date.now()+o:0,l=0,m=this.commonObjs,n=this.objs;;){if(void 0!==d&&g===d.nextBreakPoint)return d.breakIt(g,c),g;if(i=f[g],i!==G.dependency)this[i].apply(this,e[g]);else for(var p=e[g],q=0,s=p.length;s>q;q++){var t=p[q],u="g"===t[0]&&"_"===t[1],v=u?m:n;if(!v.isResolved(t))return v.get(t,c),g}if(g++,g===h)return g;if(j&&++l>r){if(Date.now()>k)return c(),g;l=0}}},endDrawing:function(){this.ctx.restore(),ia.clear(),la.clear(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(a){this.current.lineWidth=a,this.ctx.lineWidth=a},setLineCap:function(a){this.ctx.lineCap=s[a]},setLineJoin:function(a){this.ctx.lineJoin=t[a]},setMiterLimit:function(a){this.ctx.miterLimit=a},setDash:function(a,b){var c=this.ctx;void 0!==c.setLineDash?(c.setLineDash(a),c.lineDashOffset=b):(c.mozDash=a,c.mozDashOffset=b)},setRenderingIntent:function(a){},setFlatness:function(a){},setGState:function(a){for(var c=0,d=a.length;d>c;c++){var e=a[c],f=e[0],g=e[1];switch(f){case"LW":this.setLineWidth(g);break;case"LC":this.setLineCap(g);break;case"LJ":this.setLineJoin(g);break;case"ML":this.setMiterLimit(g);break;case"D":this.setDash(g[0],g[1]);break;case"RI":this.setRenderingIntent(g);break;case"FL":this.setFlatness(g);break;case"Font":this.setFont(g[0],g[1]);break;case"CA":this.current.strokeAlpha=e[1];break;case"ca":this.current.fillAlpha=e[1],this.ctx.globalAlpha=e[1];break;case"BM":if(g&&g.name&&"Normal"!==g.name){var h=g.name.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()}).substring(1);this.ctx.globalCompositeOperation=h,this.ctx.globalCompositeOperation!==h&&b('globalCompositeOperation "'+h+'" is not supported')}else this.ctx.globalCompositeOperation="source-over";break;case"SMask":this.current.activeSMask&&this.endSMaskGroup(),this.current.activeSMask=g?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null}}},beginSMaskGroup:function(){var a=this.current.activeSMask,b=a.canvas.width,c=a.canvas.height,d="smaskGroupAt"+this.groupLevel,e=ia.getCanvas(d,b,c,!0),f=this.ctx,g=f.mozCurrentTransform;this.ctx.save();var i=e.context;i.scale(1/a.scaleX,1/a.scaleY),i.translate(-a.offsetX,-a.offsetY),i.transform.apply(i,g),h(f,i),this.ctx=i,this.setGState([["BM","Normal"],["ca",1],["CA",1]]),this.groupStack.push(f),this.groupLevel++},endSMaskGroup:function(){var a=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),n(this.ctx,this.current.activeSMask,a),this.ctx.restore()},save:function(){this.ctx.save();var a=this.current;this.stateStack.push(a),this.current=a.clone(),this.current.activeSMask=null},restore:function(){0!==this.stateStack.length&&(null!==this.current.activeSMask&&this.endSMaskGroup(),this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this.cachedGetSinglePixelWidth=null)},transform:function(a,b,c,d,e,f){this.ctx.transform(a,b,c,d,e,f),this.cachedGetSinglePixelWidth=null},constructPath:function(a,b){for(var c=this.ctx,d=this.current,e=d.x,f=d.y,g=0,h=0,i=a.length;i>g;g++)switch(0|a[g]){case G.rectangle:e=b[h++],f=b[h++];var j=b[h++],k=b[h++];0===j&&(j=this.getSinglePixelWidth()),0===k&&(k=this.getSinglePixelWidth());var l=e+j,m=f+k;this.ctx.moveTo(e,f),this.ctx.lineTo(l,f),this.ctx.lineTo(l,m),this.ctx.lineTo(e,m),this.ctx.lineTo(e,f),this.ctx.closePath();break;case G.moveTo:e=b[h++],f=b[h++],c.moveTo(e,f);break;case G.lineTo:e=b[h++],f=b[h++],c.lineTo(e,f);break;case G.curveTo:e=b[h+4],f=b[h+5],c.bezierCurveTo(b[h],b[h+1],b[h+2],b[h+3],e,f),h+=6;break;case G.curveTo2:c.bezierCurveTo(e,f,b[h],b[h+1],b[h+2],b[h+3]),e=b[h+2],f=b[h+3],h+=4;break;case G.curveTo3:e=b[h+2],f=b[h+3],c.bezierCurveTo(b[h],b[h+1],e,f,e,f),h+=4;break;case G.closePath:c.closePath()}d.setCurrentPoint(e,f)},closePath:function(){this.ctx.closePath()},stroke:function(a){a="undefined"!=typeof a?a:!0;var b=this.ctx,c=this.current.strokeColor;b.lineWidth=Math.max(this.getSinglePixelWidth()*ea,this.current.lineWidth),b.globalAlpha=this.current.strokeAlpha,c&&c.hasOwnProperty("type")&&"Pattern"===c.type?(b.save(),b.strokeStyle=c.getPattern(b,this),b.stroke(),b.restore()):b.stroke(),a&&this.consumePath(),b.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(a){a="undefined"!=typeof a?a:!0;var b=this.ctx,c=this.current.fillColor,d=this.current.patternFill,e=!1;d&&(b.save(),b.fillStyle=c.getPattern(b,this),e=!0),this.pendingEOFill?(void 0!==b.mozFillRule?(b.mozFillRule="evenodd",b.fill(),b.mozFillRule="nonzero"):b.fill("evenodd"),this.pendingEOFill=!1):b.fill(),e&&b.restore(),a&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=u},eoClip:function(){this.pendingClip=v},beginText:function(){this.current.textMatrix=S,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){var a=this.pendingTextPaths,b=this.ctx;if(void 0===a)return void b.beginPath();b.save(),b.beginPath();for(var c=0;cc?(c=-c,f.fontDirection=-1):f.fontDirection=1,this.current.font=e,this.current.fontSize=c,!e.isType3Font){var g=e.loadedName||"sans-serif",h=e.black?e.bold?"900":"bold":e.bold?"bold":"normal",i=e.italic?"italic":"normal",j='"'+g+'", '+e.fallbackName,k=ba>c?ba:c>ca?ca:c;this.current.fontSizeScale=c/k;var l=i+" "+h+" "+k+"px "+j;this.ctx.font=l}},setTextRenderingMode:function(a){this.current.textRenderingMode=a},setTextRise:function(a){this.current.textRise=a},moveText:function(a,b){this.current.x=this.current.lineX+=a,this.current.y=this.current.lineY+=b},setLeadingMoveText:function(a,b){this.setLeading(-b),this.moveText(a,b)},setTextMatrix:function(a,b,c,d,e,f){this.current.textMatrix=[a,b,c,d,e,f],this.current.textMatrixScale=Math.sqrt(a*a+b*b),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar:function(a,b,c){var d,e=this.ctx,f=this.current,g=f.font,h=f.textRenderingMode,i=f.fontSize/f.fontSizeScale,j=h&C.FILL_STROKE_MASK,k=!!(h&C.ADD_TO_PATH_FLAG);if((g.disableFontFace||k)&&(d=g.getPathGenerator(this.commonObjs,a)),g.disableFontFace?(e.save(),e.translate(b,c),e.beginPath(),d(e,i),j!==C.FILL&&j!==C.FILL_STROKE||e.fill(),j!==C.STROKE&&j!==C.FILL_STROKE||e.stroke(),e.restore()):(j!==C.FILL&&j!==C.FILL_STROKE||e.fillText(a,b,c),j!==C.STROKE&&j!==C.FILL_STROKE||e.strokeText(a,b,c)),k){var l=this.pendingTextPaths||(this.pendingTextPaths=[]);l.push({transform:e.mozCurrentTransform,x:b,y:c,fontSize:i,addToPath:d})}},get isFontSubpixelAAEnabled(){var a=document.createElement("canvas").getContext("2d");a.scale(1.5,1),a.fillText("I",0,10);for(var b=a.getImageData(0,0,10,10).data,c=!1,d=3;d0&&b[d]<255){c=!0;break}return i(this,"isFontSubpixelAAEnabled",c)},showText:function(a){var b=this.current,c=b.font;if(c.isType3Font)return this.showType3Text(a);var d=b.fontSize;if(0!==d){var e=this.ctx,f=b.fontSizeScale,g=b.charSpacing,h=b.wordSpacing,i=b.fontDirection,j=b.textHScale*i,k=a.length,l=c.vertical,m=l?1:-1,n=c.defaultVMetrics,o=d*b.fontMatrix[0],q=b.textRenderingMode===C.FILL&&!c.disableFontFace;e.save(),e.transform.apply(e,b.textMatrix),e.translate(b.x,b.y+b.textRise),i>0?e.scale(j,-1):e.scale(j,1);var r=b.lineWidth,s=b.textMatrixScale;if(0===s||0===r){var t=b.textRenderingMode&C.FILL_STROKE_MASK;t!==C.STROKE&&t!==C.FILL_STROKE||(this.cachedGetSinglePixelWidth=null,r=this.getSinglePixelWidth()*ea)}else r/=s;1!==f&&(e.scale(f,f),r/=f),e.lineWidth=r;var u,v=0;for(u=0;k>u;++u){var w=a[u];if(null!==w)if(p(w))v+=m*w*d/1e3;else{var x,y,z,A,B=!1,D=w.fontChar,E=w.accent,F=w.width;if(l){var G,H,I;G=w.vmetric||n,H=w.vmetric?G[1]:.5*F,H=-H*o,I=G[2]*o,F=G?-G[0]:F,x=H/f,y=(v+I)/f}else x=v/f,y=0;if(c.remeasure&&F>0&&this.isFontSubpixelAAEnabled){var J=1e3*e.measureText(D).width/d*f,K=F/J;B=!0,e.save(),e.scale(K,1),x/=K}q&&!E?e.fillText(D,x,y):(this.paintChar(D,x,y),E&&(z=x+E.offset.x/f,A=y-E.offset.y/f,this.paintChar(E.fontChar,z,A)));var L=F*o+g*i;v+=L,B&&e.restore()}else v+=i*h}l?b.y-=v*j:b.x+=v*j,e.restore()}},showType3Text:function(a){var c,d,e,f,g=this.ctx,h=this.current,i=h.font,j=h.fontSize,k=h.fontDirection,l=i.vertical?1:-1,m=h.charSpacing,n=h.wordSpacing,o=h.textHScale*k,q=h.fontMatrix||B,r=a.length,s=h.textRenderingMode===C.INVISIBLE;if(!s&&0!==j){for(this.cachedGetSinglePixelWidth=null,g.save(),g.transform.apply(g,h.textMatrix),g.translate(h.x,h.y),g.scale(o,k),c=0;r>c;++c)if(d=a[c],null!==d)if(p(d))f=l*d*j/1e3,this.ctx.translate(f,0),h.x+=f*o;else{var t=i.charProcOperatorList[d.operatorListId];if(t){this.processingType3=d,this.save(),g.scale(j,j),g.transform.apply(g,q),this.executeOperatorList(t),this.restore();var u=T.applyTransform([d.width,0],q);e=u[0]*j+m,g.translate(e,0),h.x+=e*o}else b('Type3 character "'+d.operatorListId+'" is not available')}else this.ctx.translate(n,0),h.x+=n*o;g.restore(),this.processingType3=null}},setCharWidth:function(a,b){},setCharWidthAndBounds:function(a,b,c,d,e,f){this.ctx.rect(c,d,e-c,f-d),this.clip(),this.endPath()},getColorN_Pattern:function(a){var b;if("TilingPattern"===a[0]){var c=a[1],d=this.baseTransform||this.ctx.mozCurrentTransform.slice();b=new oa(a,c,this.ctx,this.objs,this.commonObjs,d)}else b=y(a);return b},setStrokeColorN:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)},setFillColorN:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0},setStrokeRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.ctx.strokeStyle=d,this.current.strokeColor=d},setFillRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.ctx.fillStyle=d,this.current.fillColor=d,this.current.patternFill=!1},shadingFill:function(a){var b=this.ctx;this.save();var c=y(a);b.fillStyle=c.getPattern(b,this,!0);var d=b.mozCurrentTransformInverse;if(d){var e=b.canvas,f=e.width,g=e.height,h=T.applyTransform([0,0],d),i=T.applyTransform([0,g],d),j=T.applyTransform([f,0],d),k=T.applyTransform([f,g],d),l=Math.min(h[0],i[0],j[0],k[0]),m=Math.min(h[1],i[1],j[1],k[1]),n=Math.max(h[0],i[0],j[0],k[0]),o=Math.max(h[1],i[1],j[1],k[1]);this.ctx.fillRect(l,m,n-l,o-m)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){d("Should not call beginInlineImage")},beginImageData:function(){d("Should not call beginImageData")},paintFormXObjectBegin:function(a,b){if(this.save(),this.baseTransformStack.push(this.baseTransform),q(a)&&6===a.length&&this.transform.apply(this,a),this.baseTransform=this.ctx.mozCurrentTransform,q(b)&&4===b.length){var c=b[2]-b[0],d=b[3]-b[1];this.ctx.rect(b[0],b[1],c,d),this.clip(),this.endPath()}},paintFormXObjectEnd:function(){this.restore(),this.baseTransform=this.baseTransformStack.pop()},beginGroup:function(c){this.save();var d=this.ctx;c.isolated||a("TODO: Support non-isolated groups."),c.knockout&&b("Knockout groups not supported.");var e=d.mozCurrentTransform;c.matrix&&d.transform.apply(d,c.matrix),f(c.bbox,"Bounding box is required.");var g=T.getAxialAlignedBoundingBox(c.bbox,d.mozCurrentTransform),i=[0,0,d.canvas.width,d.canvas.height];g=T.intersect(g,i)||[0,0,0,0];var j=Math.floor(g[0]),k=Math.floor(g[1]),l=Math.max(Math.ceil(g[2])-j,1),m=Math.max(Math.ceil(g[3])-k,1),n=1,o=1;l>da&&(n=l/da,l=da),m>da&&(o=m/da,m=da);var p="groupAt"+this.groupLevel;c.smask&&(p+="_smask_"+this.smaskCounter++%2);var q=ia.getCanvas(p,l,m,!0),r=q.context;r.scale(1/n,1/o),r.translate(-j,-k),r.transform.apply(r,e),c.smask?this.smaskStack.push({canvas:q.canvas,context:r,offsetX:j,offsetY:k,scaleX:n,scaleY:o,subtype:c.smask.subtype,backdrop:c.smask.backdrop}):(d.setTransform(1,0,0,1,0,0),d.translate(j,k),d.scale(n,o)),h(d,r),this.ctx=r,this.setGState([["BM","Normal"],["ca",1],["CA",1]]),this.groupStack.push(d),this.groupLevel++},endGroup:function(a){this.groupLevel--;var b=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,a.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(b.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.current=new ja},endAnnotations:function(){this.restore()},beginAnnotation:function(a,b,c){if(this.save(),q(a)&&4===a.length){var d=a[2]-a[0],e=a[3]-a[1];this.ctx.rect(a[0],a[1],d,e),this.clip(),this.endPath()}this.transform.apply(this,b),this.transform.apply(this,c)},endAnnotation:function(){this.restore()},paintJpegXObject:function(a,c,d){var e=this.objs.get(a);if(!e)return void b("Dependent image isn't ready yet");this.save();var f=this.ctx;if(f.scale(1/c,-1/d),f.drawImage(e,0,0,e.width,e.height,0,-d,c,d),this.imageLayer){var g=f.mozCurrentTransformInverse,h=this.getCanvasPosition(0,0);this.imageLayer.appendImage({objId:a,left:h[0],top:h[1],width:c/g[0],height:d/g[3]})}this.restore()},paintImageMaskXObject:function(a){var b=this.ctx,c=a.width,d=a.height,e=this.current.fillColor,f=this.current.patternFill,h=this.processingType3;if(fa&&h&&void 0===h.compiled&&(ga>=c&&ga>=d?h.compiled=x({data:a.data,width:c,height:d}):h.compiled=null),h&&h.compiled)return void h.compiled(b);var i=ia.getCanvas("maskCanvas",c,d),j=i.context;j.save(),g(j,a),j.globalCompositeOperation="source-in",j.fillStyle=f?e.getPattern(j,this):e,j.fillRect(0,0,c,d),j.restore(),this.paintInlineImageXObject(i.canvas)},paintImageMaskXObjectRepeat:function(a,b,c,d){var e=a.width,f=a.height,h=this.current.fillColor,i=this.current.patternFill,j=ia.getCanvas("maskCanvas",e,f),k=j.context;k.save(),g(k,a),k.globalCompositeOperation="source-in",k.fillStyle=i?h.getPattern(k,this):h,k.fillRect(0,0,e,f),k.restore();for(var l=this.ctx,m=0,n=d.length;n>m;m+=2)l.save(),l.transform(b,0,0,c,d[m],d[m+1]),l.scale(1,-1),l.drawImage(j.canvas,0,0,e,f,0,-1,1,1),l.restore()},paintImageMaskXObjectGroup:function(a){for(var b=this.ctx,c=this.current.fillColor,d=this.current.patternFill,e=0,f=a.length;f>e;e++){var h=a[e],i=h.width,j=h.height,k=ia.getCanvas("maskCanvas",i,j),l=k.context;l.save(),g(l,h),l.globalCompositeOperation="source-in",l.fillStyle=d?c.getPattern(l,this):c,l.fillRect(0,0,i,j),l.restore(),b.save(),b.transform.apply(b,h.transform),b.scale(1,-1),b.drawImage(k.canvas,0,0,i,j,0,-1,1,1),b.restore()}},paintImageXObject:function(a){var c=this.objs.get(a);return c?void this.paintInlineImageXObject(c):void b("Dependent image isn't ready yet")},paintImageXObjectRepeat:function(a,c,d,e){var f=this.objs.get(a);if(!f)return void b("Dependent image isn't ready yet");for(var g=f.width,h=f.height,i=[],j=0,k=e.length;k>j;j+=2)i.push({transform:[c,0,0,d,e[j],e[j+1]],x:0,y:0,w:g,h:h});this.paintInlineImageXObjectGroup(f,i)},paintInlineImageXObject:function(a){var b=a.width,c=a.height,d=this.ctx;this.save(),d.scale(1/b,-1/c);var f,g,h=d.mozCurrentTransformInverse,i=h[0],j=h[1],k=Math.max(Math.sqrt(i*i+j*j),1),l=h[2],m=h[3],n=Math.max(Math.sqrt(l*l+m*m),1);if(a instanceof HTMLElement||!a.data)f=a;else{g=ia.getCanvas("inlineImage",b,c);var o=g.context;e(o,a),f=g.canvas}for(var p=b,q=c,r="prescale1";k>2&&p>1||n>2&&q>1;){var s=p,t=q;k>2&&p>1&&(s=Math.ceil(p/2),k/=p/s),n>2&&q>1&&(t=Math.ceil(q/2),n/=q/t),g=ia.getCanvas(r,s,t),o=g.context,o.clearRect(0,0,s,t),o.drawImage(f,0,0,p,q,0,0,s,t),f=g.canvas,p=s,q=t,r="prescale1"===r?"prescale2":"prescale1"}if(d.drawImage(f,0,0,p,q,0,-c,b,c),this.imageLayer){var u=this.getCanvasPosition(0,-c);this.imageLayer.appendImage({imgData:a,left:u[0],top:u[1],width:b/h[0],height:c/h[3]})}this.restore()},paintInlineImageXObjectGroup:function(a,b){var c=this.ctx,d=a.width,f=a.height,g=ia.getCanvas("inlineImage",d,f),h=g.context;e(h,a);for(var i=0,j=b.length;j>i;i++){var k=b[i];if(c.save(),c.transform.apply(c,k.transform),c.scale(1,-1),c.drawImage(g.canvas,k.x,k.y,k.w,k.h,0,-1,1,1),this.imageLayer){var l=this.getCanvasPosition(k.x,k.y);this.imageLayer.appendImage({imgData:a,left:l[0],top:l[1],width:d,height:f})}c.restore()}},paintSolidColorImageMask:function(){this.ctx.fillRect(0,0,1,1)},paintXObject:function(){I.notify(H.unknown),b("Unsupported 'paintXObject' command.")},markPoint:function(a){},markPointProps:function(a,b){},beginMarkedContent:function(a){},beginMarkedContentProps:function(a,b){},endMarkedContent:function(){},beginCompat:function(){},endCompat:function(){},consumePath:function(){var a=this.ctx;this.pendingClip&&(this.pendingClip===v?void 0!==a.mozFillRule?(a.mozFillRule="evenodd",a.clip(),a.mozFillRule="nonzero"):a.clip("evenodd"):a.clip(),this.pendingClip=null),a.beginPath()},getSinglePixelWidth:function(a){if(null===this.cachedGetSinglePixelWidth){var b=this.ctx.mozCurrentTransformInverse;this.cachedGetSinglePixelWidth=Math.sqrt(Math.max(b[0]*b[0]+b[1]*b[1],b[2]*b[2]+b[3]*b[3]))}return this.cachedGetSinglePixelWidth},getCanvasPosition:function(a,b){var c=this.ctx.mozCurrentTransform;return[c[0]*a+c[2]*b+c[4],c[1]*a+c[3]*b+c[5]]}};for(var z in G)c.prototype[G[z]]=c.prototype[z];return c}(),la=function(){function a(a,b,c){var d=a.createShader(c);a.shaderSource(d,b),a.compileShader(d);var e=a.getShaderParameter(d,a.COMPILE_STATUS);if(!e){var f=a.getShaderInfoLog(d);throw new Error("Error during shader compilation: "+f)}return d}function b(b,c){return a(b,c,b.VERTEX_SHADER)}function c(b,c){return a(b,c,b.FRAGMENT_SHADER)}function d(a,b){for(var c=a.createProgram(),d=0,e=b.length;e>d;++d)a.attachShader(c,b[d]);a.linkProgram(c);var f=a.getProgramParameter(c,a.LINK_STATUS);if(!f){var g=a.getProgramInfoLog(c);throw new Error("Error during program linking: "+g)}return c}function e(a,b,c){a.activeTexture(c);var d=a.createTexture();return a.bindTexture(a.TEXTURE_2D,d),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b),d}function f(){m||(n=document.createElement("canvas"),m=n.getContext("webgl",{premultipliedalpha:!1}))}function g(){var a,e;f(),a=n,n=null,e=m,m=null;var g=b(e,o),h=c(e,p),i=d(e,[g,h]);e.useProgram(i);var j={};j.gl=e,j.canvas=a,j.resolutionLocation=e.getUniformLocation(i,"u_resolution"),j.positionLocation=e.getAttribLocation(i,"a_position"),j.backdropLocation=e.getUniformLocation(i,"u_backdrop"),j.subtypeLocation=e.getUniformLocation(i,"u_subtype");var k=e.getAttribLocation(i,"a_texCoord"),l=e.getUniformLocation(i,"u_image"),r=e.getUniformLocation(i,"u_mask"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),e.STATIC_DRAW),e.enableVertexAttribArray(k),e.vertexAttribPointer(k,2,e.FLOAT,!1,0,0),e.uniform1i(l,0),e.uniform1i(r,1),q=j}function h(a,b,c){var d=a.width,f=a.height;q||g();var h=q,i=h.canvas,j=h.gl;i.width=d,i.height=f,j.viewport(0,0,j.drawingBufferWidth,j.drawingBufferHeight),j.uniform2f(h.resolutionLocation,d,f),c.backdrop?j.uniform4f(h.resolutionLocation,c.backdrop[0],c.backdrop[1],c.backdrop[2],1):j.uniform4f(h.resolutionLocation,0,0,0,0),j.uniform1i(h.subtypeLocation,"Luminosity"===c.subtype?1:0);var k=e(j,a,j.TEXTURE0),l=e(j,b,j.TEXTURE1),m=j.createBuffer();return j.bindBuffer(j.ARRAY_BUFFER,m),j.bufferData(j.ARRAY_BUFFER,new Float32Array([0,0,d,0,0,f,0,f,d,0,d,f]),j.STATIC_DRAW),j.enableVertexAttribArray(h.positionLocation),j.vertexAttribPointer(h.positionLocation,2,j.FLOAT,!1,0,0),j.clearColor(0,0,0,0),j.enable(j.BLEND),j.blendFunc(j.ONE,j.ONE_MINUS_SRC_ALPHA),j.clear(j.COLOR_BUFFER_BIT),j.drawArrays(j.TRIANGLES,0,6),j.flush(),j.deleteTexture(k),j.deleteTexture(l),j.deleteBuffer(m),i}function j(){var a,e;f(),a=n,n=null,e=m,m=null;var g=b(e,r),h=c(e,s),i=d(e,[g,h]);e.useProgram(i);var j={};j.gl=e,j.canvas=a,j.resolutionLocation=e.getUniformLocation(i,"u_resolution"),j.scaleLocation=e.getUniformLocation(i,"u_scale"),j.offsetLocation=e.getUniformLocation(i,"u_offset"),j.positionLocation=e.getAttribLocation(i,"a_position"),j.colorLocation=e.getAttribLocation(i,"a_color"),t=j}function k(a,b,c,d,e){t||j();var f=t,g=f.canvas,h=f.gl;g.width=a,g.height=b,h.viewport(0,0,h.drawingBufferWidth,h.drawingBufferHeight),h.uniform2f(f.resolutionLocation,a,b);var i,k,l,m=0;for(i=0,k=d.length;k>i;i++)switch(d[i].type){case"lattice":l=d[i].coords.length/d[i].verticesPerRow|0,m+=(l-1)*(d[i].verticesPerRow-1)*6;break;case"triangles":m+=d[i].coords.length}var n=new Float32Array(2*m),o=new Uint8Array(3*m),p=e.coords,q=e.colors,r=0,s=0;for(i=0,k=d.length;k>i;i++){var u=d[i],v=u.coords,w=u.colors;switch(u.type){case"lattice":var x=u.verticesPerRow;l=v.length/x|0;for(var y=1;l>y;y++)for(var z=y*x+1,A=1;x>A;A++,z++)n[r]=p[v[z-x-1]],n[r+1]=p[v[z-x-1]+1],n[r+2]=p[v[z-x]],n[r+3]=p[v[z-x]+1],n[r+4]=p[v[z-1]],n[r+5]=p[v[z-1]+1],o[s]=q[w[z-x-1]],o[s+1]=q[w[z-x-1]+1],o[s+2]=q[w[z-x-1]+2],o[s+3]=q[w[z-x]],o[s+4]=q[w[z-x]+1],o[s+5]=q[w[z-x]+2],o[s+6]=q[w[z-1]],o[s+7]=q[w[z-1]+1],o[s+8]=q[w[z-1]+2],n[r+6]=n[r+2],n[r+7]=n[r+3],n[r+8]=n[r+4],n[r+9]=n[r+5],n[r+10]=p[v[z]],n[r+11]=p[v[z]+1],o[s+9]=o[s+3],o[s+10]=o[s+4],o[s+11]=o[s+5],o[s+12]=o[s+6],o[s+13]=o[s+7],o[s+14]=o[s+8],o[s+15]=q[w[z]],o[s+16]=q[w[z]+1],o[s+17]=q[w[z]+2],r+=12,s+=18;break;case"triangles":for(var B=0,C=v.length;C>B;B++)n[r]=p[v[B]],n[r+1]=p[v[B]+1],o[s]=q[w[B]],o[s+1]=q[w[B]+1],o[s+2]=q[w[B]+2],r+=2,s+=3}}c?h.clearColor(c[0]/255,c[1]/255,c[2]/255,1):h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT);var D=h.createBuffer();h.bindBuffer(h.ARRAY_BUFFER,D),h.bufferData(h.ARRAY_BUFFER,n,h.STATIC_DRAW),h.enableVertexAttribArray(f.positionLocation),h.vertexAttribPointer(f.positionLocation,2,h.FLOAT,!1,0,0);var E=h.createBuffer();return h.bindBuffer(h.ARRAY_BUFFER,E),h.bufferData(h.ARRAY_BUFFER,o,h.STATIC_DRAW),h.enableVertexAttribArray(f.colorLocation),h.vertexAttribPointer(f.colorLocation,3,h.UNSIGNED_BYTE,!1,0,0),h.uniform2f(f.scaleLocation,e.scaleX,e.scaleY),h.uniform2f(f.offsetLocation,e.offsetX,e.offsetY),h.drawArrays(h.TRIANGLES,0,m),h.flush(),h.deleteBuffer(D),h.deleteBuffer(E),g}function l(){q&&q.canvas&&(q.canvas.width=0,q.canvas.height=0),t&&t.canvas&&(t.canvas.width=0,t.canvas.height=0),q=null,t=null}var m,n,o=" attribute vec2 a_position; attribute vec2 a_texCoord; uniform vec2 u_resolution; varying vec2 v_texCoord; void main() { vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_texCoord = a_texCoord; } ",p=" precision mediump float; uniform vec4 u_backdrop; uniform int u_subtype; uniform sampler2D u_image; uniform sampler2D u_mask; varying vec2 v_texCoord; void main() { vec4 imageColor = texture2D(u_image, v_texCoord); vec4 maskColor = texture2D(u_mask, v_texCoord); if (u_backdrop.a > 0.0) { maskColor.rgb = maskColor.rgb * maskColor.a + u_backdrop.rgb * (1.0 - maskColor.a); } float lum; if (u_subtype == 0) { lum = maskColor.a; } else { lum = maskColor.r * 0.3 + maskColor.g * 0.59 + maskColor.b * 0.11; } imageColor.a *= lum; imageColor.rgb *= imageColor.a; gl_FragColor = imageColor; } ",q=null,r=" attribute vec2 a_position; attribute vec3 a_color; uniform vec2 u_resolution; uniform vec2 u_scale; uniform vec2 u_offset; varying vec4 v_color; void main() { vec2 position = (a_position + u_offset) * u_scale; vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_color = vec4(a_color / 255.0, 1.0); } ",s=" precision mediump float; varying vec4 v_color; void main() { gl_FragColor = v_color; } ",t=null;return{get isEnabled(){if(PDFJS.disableWebGL)return!1;var a=!1;try{f(),a=!!m}catch(b){}return i(this,"isEnabled",a)},composeSMask:h,drawFigures:k,clear:l}}(),ma={};ma.RadialAxial={fromIR:function(a){var b=a[1],c=a[2],d=a[3],e=a[4],f=a[5],g=a[6];return{type:"Pattern",getPattern:function(a){var h;"axial"===b?h=a.createLinearGradient(d[0],d[1],e[0],e[1]):"radial"===b&&(h=a.createRadialGradient(d[0],d[1],f,e[0],e[1],g));for(var i=0,j=c.length;j>i;++i){var k=c[i];h.addColorStop(k[0],k[1])}return h}}}};var na=function(){function a(a,b,c,d,e,f,g,h){var i,j=b.coords,k=b.colors,l=a.data,m=4*a.width;j[c+1]>j[d+1]&&(i=c,c=d,d=i,i=f,f=g,g=i),j[d+1]>j[e+1]&&(i=d,d=e,e=i,i=g,g=h,h=i),j[c+1]>j[d+1]&&(i=c,c=d,d=i,i=f,f=g,g=i);var n=(j[c]+b.offsetX)*b.scaleX,o=(j[c+1]+b.offsetY)*b.scaleY,p=(j[d]+b.offsetX)*b.scaleX,q=(j[d+1]+b.offsetY)*b.scaleY,r=(j[e]+b.offsetX)*b.scaleX,s=(j[e+1]+b.offsetY)*b.scaleY;if(!(o>=s))for(var t,u,v,w,x,y,z,A,B,C=k[f],D=k[f+1],E=k[f+2],F=k[g],G=k[g+1],H=k[g+2],I=k[h],J=k[h+1],K=k[h+2],L=Math.round(o),M=Math.round(s),N=L;M>=N;N++){q>N?(B=o>N?0:o===q?1:(o-N)/(o-q),t=n-(n-p)*B,u=C-(C-F)*B,v=D-(D-G)*B,w=E-(E-H)*B):(B=N>s?1:q===s?0:(q-N)/(q-s),t=p-(p-r)*B,u=F-(F-I)*B,v=G-(G-J)*B,w=H-(H-K)*B),B=o>N?0:N>s?1:(o-N)/(o-s),x=n-(n-r)*B,y=C-(C-I)*B,z=D-(D-J)*B,A=E-(E-K)*B;for(var O=Math.round(Math.min(t,x)),P=Math.round(Math.max(t,x)),Q=m*N+4*O,R=O;P>=R;R++)B=(t-R)/(t-x),B=0>B?0:B>1?1:B,l[Q++]=u-(u-y)*B|0,l[Q++]=v-(v-z)*B|0,l[Q++]=w-(w-A)*B|0,l[Q++]=255}}function b(b,c,e){var f,g,h=c.coords,i=c.colors;switch(c.type){case"lattice":var j=c.verticesPerRow,k=Math.floor(h.length/j)-1,l=j-1;for(f=0;k>f;f++)for(var m=f*j,n=0;l>n;n++,m++)a(b,e,h[m],h[m+1],h[m+j],i[m],i[m+1],i[m+j]),a(b,e,h[m+j+1],h[m+1],h[m+j],i[m+j+1],i[m+1],i[m+j]);break;case"triangles":for(f=0,g=h.length;g>f;f+=3)a(b,e,h[f],h[f+1],h[f+2],i[f],i[f+1],i[f+2]);break;default:d("illigal figure")}}function c(a,c,d,e,f,g){var h,i,j,k,l=1.1,m=3e3,n=Math.floor(a[0]),o=Math.floor(a[1]),p=Math.ceil(a[2])-n,q=Math.ceil(a[3])-o,r=Math.min(Math.ceil(Math.abs(p*c[0]*l)),m),s=Math.min(Math.ceil(Math.abs(q*c[1]*l)),m),t=p/r,u=q/s,v={coords:d,colors:e,offsetX:-n,offsetY:-o,scaleX:1/t,scaleY:1/u};if(la.isEnabled)h=la.drawFigures(r,s,g,f,v),i=ia.getCanvas("mesh",r,s,!1),i.context.drawImage(h,0,0),h=i.canvas;else{i=ia.getCanvas("mesh",r,s,!1);var w=i.context,x=w.createImageData(r,s);if(g){var y=x.data;for(j=0,k=y.length;k>j;j+=4)y[j]=g[0],y[j+1]=g[1],y[j+2]=g[2],y[j+3]=255}for(j=0;j=14?!0:"node"===a}(),nativeFontFaces:[],isFontLoadingAPISupported:!A&&"undefined"!=typeof document&&!!document.fonts,addNativeFontFace:function(a){this.nativeFontFaces.push(a),document.fonts.add(a)},bind:function(a,c){f(!A,"bind() shall be called from main thread");for(var d=[],e=[],g=[],h=function(a){return a.loaded["catch"](function(c){b('Failed to load font "'+a.family+'": '+c)})},i=0,j=a.length;j>i;i++){var k=a[i];if(!k.attached&&k.loading!==!1)if(k.attached=!0,this.isFontLoadingAPISupported){var l=k.createNativeFontFace();l&&g.push(h(l))}else{var m=k.bindDOM();m&&(d.push(m),e.push(k))}}var n=pa.queueLoadingCallback(c);this.isFontLoadingAPISupported?Promise.all(g).then(function(){n.complete()}):d.length>0&&!this.isSyncFontLoadingSupported?pa.prepareFontLoadEvent(d,e,n):n.complete()},queueLoadingCallback:function(a){function b(){for(f(!e.end,"completeRequest() cannot be called twice"),e.end=Date.now();c.requests.length>0&&c.requests[0].end;){var a=c.requests.shift();setTimeout(a.callback,0)}}var c=pa.loadingContext,d="pdfjs-font-loading-"+c.nextRequestId++,e={id:d,complete:b,callback:a,started:Date.now()};return c.requests.push(e),e},prepareFontLoadEvent:function(a,c,d){function e(a,b){return a.charCodeAt(b)<<24|a.charCodeAt(b+1)<<16|a.charCodeAt(b+2)<<8|255&a.charCodeAt(b+3)}function f(a,b,c,d){var e=a.substr(0,b),f=a.substr(b+c);return e+d+f}function g(a,c){if(l++,l>30)return b("Load test font never loaded."),void c();k.font="30px "+a,k.fillText(".",0,20);var d=k.getImageData(0,0,1,1);return d.data[3]>0?void c():void setTimeout(g.bind(null,a,c))}var h,i,j=document.createElement("canvas");j.width=1,j.height=1;var k=j.getContext("2d"),l=0,n="lt"+Date.now()+this.loadTestFontId++,o=this.loadTestFont,p=976;o=f(o,p,n.length,n);var q=16,r=1482184792,s=e(o,q);for(h=0,i=n.length-3;i>h;h+=4)s=s-r+e(n,h)|0;hh;h++)v.push(c[h].loadedName);v.push(n);var w=document.createElement("div");for(w.setAttribute("style","visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;"),h=0,i=v.length;i>h;++h){var x=document.createElement("span");x.textContent="Hi",x.style.fontFamily=v[h],w.appendChild(x)}document.body.appendChild(w),g(n,function(){document.body.removeChild(w),d.complete()})}},qa=function(){function a(a,b,c){if(this.compiledGlyphs={},1!==arguments.length);else{var d=arguments[0];for(var e in d)this[e]=d[e]}}return a.prototype={createNativeFontFace:function(){if(!this.data)return null;if(PDFJS.disableFontFace)return this.disableFontFace=!0,null;var a=new FontFace(this.loadedName,this.data,{});return pa.addNativeFontFace(a), +PDFJS.pdfBug&&"FontInspector"in z&&z.FontInspector.enabled&&z.FontInspector.fontAdded(this),a},bindDOM:function(){if(!this.data)return null;if(PDFJS.disableFontFace)return this.disableFontFace=!0,null;var a=k(new Uint8Array(this.data)),b=this.loadedName,c="url(data:"+this.mimetype+";base64,"+window.btoa(a)+");",d='@font-face { font-family:"'+b+'";src:'+c+"}";return pa.insertRule(d),PDFJS.pdfBug&&"FontInspector"in z&&z.FontInspector.enabled&&z.FontInspector.fontAdded(this,c),d},getPathGenerator:function(a,b){if(!(b in this.compiledGlyphs)){var c,d,e,f=a.get(this.loadedName+"_path_"+b);if(pa.isEvalSupported){var g,h="";for(d=0,e=f.length;e>d;d++)c=f[d],g=void 0!==c.args?c.args.join(","):"",h+="c."+c.cmd+"("+g+");\n";this.compiledGlyphs[b]=new Function("c","size",h)}else this.compiledGlyphs[b]=function(a,b){for(d=0,e=f.length;e>d;d++)c=f[d],"scale"===c.cmd&&(c.args=[b,-b]),a[c.cmd].apply(a,c.args)}}return this.compiledGlyphs[b]}},a}(),ra=10,sa=function(){function a(a,b,c){var d=a.style;if(d.fontSize=b.fontSize+"px",d.direction=b.fontDirection<0?"rtl":"ltr",c){d.fontWeight=c.black?c.bold?"bolder":"bold":c.bold?"bold":"normal",d.fontStyle=c.italic?"italic":"normal";var e=c.loadedName,f=e?'"'+e+'", ':"",g=c.fallbackName||"Helvetica, sans-serif";d.fontFamily=f+g}}function c(a){var c=document.createElement("section"),d=c.style,e=a.rect[2]-a.rect[0],f=a.rect[3]-a.rect[1];if(a.borderStyle.width>0){c.style.borderWidth=a.borderStyle.width+"px",a.borderStyle.style!==F.UNDERLINE&&(e-=2*a.borderStyle.width,f-=2*a.borderStyle.width);var g=a.borderStyle.horizontalCornerRadius,h=a.borderStyle.verticalCornerRadius;if(g>0||h>0){var i=g+"px / "+h+"px";CustomStyle.setProp("borderRadius",c,i)}switch(a.borderStyle.style){case F.SOLID:c.style.borderStyle="solid";break;case F.DASHED:c.style.borderStyle="dashed";break;case F.BEVELED:b("Unimplemented border style: beveled");break;case F.INSET:b("Unimplemented border style: inset");break;case F.UNDERLINE:c.style.borderBottomStyle="solid"}a.color?c.style.borderColor=T.makeCssRgb(0|a.color[0],0|a.color[1],0|a.color[2]):c.style.borderWidth=0}return d.width=e+"px",d.height=f+"px",c}function d(b,c){var d=document.createElement("div"),e=b.rect[2]-b.rect[0],f=b.rect[3]-b.rect[1];d.style.width=e+"px",d.style.height=f+"px",d.style.display="table";var g=document.createElement("div");g.textContent=b.fieldValue;var h=b.textAlignment;g.style.textAlign=["left","center","right"][h],g.style.verticalAlign="middle",g.style.display="table-cell";var i=b.fontRefName?c.getData(b.fontRefName):null;return a(g,b,i),d.appendChild(g),d}function e(a){var b=a.rect;b[3]-b[1]i;++i){var t=s[i];r.appendChild(document.createTextNode(t)),j-1>i&&r.appendChild(document.createElement("br"))}q.appendChild(r);var u=!1,v=function(a){a&&(u=!0),h.hasAttribute("hidden")&&(d.style.zIndex+=1,h.removeAttribute("hidden"))},w=function(a){a&&(u=!1),h.hasAttribute("hidden")||u||(d.style.zIndex-=1,h.setAttribute("hidden",!0))},x=function(){u?w(!0):v(!0)};e.addEventListener("click",function(){x()},!1),e.addEventListener("mouseover",function(){v()},!1),e.addEventListener("mouseout",function(){w()},!1),h.addEventListener("click",function(){w(!0)},!1)}else h.setAttribute("hidden",!0);return h.appendChild(p),h.appendChild(q),g.appendChild(h),d.appendChild(e),d.appendChild(g),d}function f(a){var b=c(a);b.className="annotLink";var d=document.createElement("a");return d.href=d.title=a.url||"",a.url&&j()&&(d.target=K[PDFJS.externalLinkTarget]),b.appendChild(d),b}function g(a,b){switch(a.annotationType){case E.WIDGET:return d(a,b);case E.TEXT:return e(a);case E.LINK:return f(a);default:throw new Error("Unsupported annotationType: "+a.annotationType)}}return{getHtmlElement:g}}();PDFJS.AnnotationUtils=sa;var ta={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},ua=function(){function a(a,b,c){for(var d=-1,e=b;c>e;e++){var f=255&(d^a[e]),h=g[f];d=d>>>8^h}return-1^d}function b(b,c,d,e){var f=e,g=c.length;d[f]=g>>24&255,d[f+1]=g>>16&255,d[f+2]=g>>8&255,d[f+3]=255&g,f+=4,d[f]=255&b.charCodeAt(0),d[f+1]=255&b.charCodeAt(1),d[f+2]=255&b.charCodeAt(2),d[f+3]=255&b.charCodeAt(3),f+=4,d.set(c,f),f+=c.length;var h=a(d,e+4,f);d[f]=h>>24&255,d[f+1]=h>>16&255,d[f+2]=h>>8&255,d[f+3]=255&h}function c(a,b,c){for(var d=1,e=0,f=b;c>f;++f)d=(d+(255&a[f]))%65521,e=(e+d)%65521;return e<<16|d}function d(a,d){var g,h,i,j=a.width,k=a.height,l=a.data;switch(d){case D.GRAYSCALE_1BPP:h=0,g=1,i=j+7>>3;break;case D.RGB_24BPP:h=2,g=8,i=3*j;break;case D.RGBA_32BPP:h=6,g=8,i=4*j;break;default:throw new Error("invalid format")}var m,n,o=new Uint8Array((1+i)*k),p=0,q=0;for(m=0;k>m;++m)o[p++]=0,o.set(l.subarray(q,q+i),p),q+=i,p+=i;if(d===D.GRAYSCALE_1BPP)for(p=0,m=0;k>m;m++)for(p++,n=0;i>n;n++)o[p++]^=255;var r=new Uint8Array([j>>24&255,j>>16&255,j>>8&255,255&j,k>>24&255,k>>16&255,k>>8&255,255&k,g,h,0,0,0]),s=o.length,t=65535,u=Math.ceil(s/t),v=new Uint8Array(2+s+5*u+4),w=0;v[w++]=120,v[w++]=156;for(var x=0;s>t;)v[w++]=0,v[w++]=255,v[w++]=255,v[w++]=0,v[w++]=0,v.set(o.subarray(x,x+t),w),w+=t,x+=t,s-=t;v[w++]=1,v[w++]=255&s,v[w++]=s>>8&255,v[w++]=65535&~s&255,v[w++]=(65535&~s)>>8&255,v.set(o.subarray(x),w),w+=o.length-x;var y=c(o,0,o.length);v[w++]=y>>24&255,v[w++]=y>>16&255,v[w++]=y>>8&255,v[w++]=255&y;var z=e.length+3*f+r.length+v.length,A=new Uint8Array(z),B=0;return A.set(e,B),B+=e.length,b("IHDR",r,A,B),B+=f+r.length,b("IDATA",v,A,B),B+=f+v.length,b("IEND",new Uint8Array(0),A,B),PDFJS.createObjectURL(A,"image/png")}for(var e=new Uint8Array([137,80,78,71,13,10,26,10]),f=12,g=new Int32Array(256),h=0;256>h;h++){for(var i=h,j=0;8>j;j++)i=1&i?3988292384^i>>1&2147483647:i>>1&2147483647;g[h]=i}return function(a){var b=void 0===a.kind?D.GRAYSCALE_1BPP:a.kind;return d(a,b)}}(),va=function(){function a(){this.fontSizeScale=1,this.fontWeight=ta.fontWeight,this.fontSize=0,this.textMatrix=S,this.fontMatrix=B,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=ta.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.clipId="",this.pendingClip=!1,this.maskId=""}return a.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(a,b){this.x=a,this.y=b}},a}(),wa=function(){function a(a,b){var c="http://www.w3.org/2000/svg",d=document.createElementNS(c,"svg:svg");return d.setAttributeNS(null,"version","1.1"),d.setAttributeNS(null,"width",a+"px"),d.setAttributeNS(null,"height",b+"px"),d.setAttributeNS(null,"viewBox","0 0 "+a+" "+b),d}function c(a){for(var b=[],c=[],d=a.length,e=0;d>e;e++)"save"!==a[e].fn?"restore"===a[e].fn?b=c.pop():b.push(a[e]):(b.push({fnId:92,fn:"group",items:[]}),c.push(b),b=b[b.length-1].items);return b}function d(a){if(a===(0|a))return a.toString();var b=a.toFixed(10),c=b.length-1;if("0"!==b[c])return b;do c--;while("0"===b[c]);return b.substr(0,"."===b[c]?c:c+1)}function e(a){if(0===a[4]&&0===a[5]){if(0===a[1]&&0===a[2])return 1===a[0]&&1===a[3]?"":"scale("+d(a[0])+" "+d(a[3])+")";if(a[0]===a[3]&&a[1]===-a[2]){var b=180*Math.acos(a[0])/Math.PI;return"rotate("+d(b)+")"}}else if(1===a[0]&&0===a[1]&&0===a[2]&&1===a[3])return"translate("+d(a[4])+" "+d(a[5])+")";return"matrix("+d(a[0])+" "+d(a[1])+" "+d(a[2])+" "+d(a[3])+" "+d(a[4])+" "+d(a[5])+")"}function f(a,b){this.current=new va,this.transformMatrix=S,this.transformStack=[],this.extraStack=[],this.commonObjs=a,this.objs=b,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts={},this.cssStyle=null}var g="http://www.w3.org/2000/svg",h="http://www.w3.org/XML/1998/namespace",i="http://www.w3.org/1999/xlink",j=["butt","round","square"],k=["miter","round","bevel"],l=0,m=0;return f.prototype={save:function(){this.transformStack.push(this.transformMatrix);var a=this.current;this.extraStack.push(a),this.current=a.clone()},restore:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix)),this.pgrp.appendChild(this.tgrp)},group:function(a){this.save(),this.executeOpTree(a),this.restore()},loadDependencies:function(a){for(var b=a.fnArray,c=b.length,d=a.argsArray,e=this,f=0;c>f;f++)if(G.dependency===b[f])for(var g=d[f],h=0,i=g.length;i>h;h++){var j,k=g[h],l="g_"===k.substring(0,2);j=l?new Promise(function(a){e.commonObjs.get(k,a)}):new Promise(function(a){e.objs.get(k,a)}),this.current.dependencies.push(j)}return Promise.all(this.current.dependencies)},transform:function(a,b,c,d,f,h){var i=[a,b,c,d,f,h];this.transformMatrix=PDFJS.Util.transform(this.transformMatrix,i),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix))},getSVG:function(b,c){return this.svg=a(c.width,c.height),this.viewport=c,this.loadDependencies(b).then(function(){this.transformMatrix=S,this.pgrp=document.createElementNS(g,"svg:g"),this.pgrp.setAttributeNS(null,"transform",e(c.transform)),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix)),this.defs=document.createElementNS(g,"svg:defs"),this.pgrp.appendChild(this.defs),this.pgrp.appendChild(this.tgrp),this.svg.appendChild(this.pgrp);var a=this.convertOpList(b);return this.executeOpTree(a),this.svg}.bind(this))},convertOpList:function(a){var b=a.argsArray,d=a.fnArray,e=d.length,f=[],g=[];for(var h in G)f[G[h]]=h;for(var i=0;e>i;i++){var j=d[i];g.push({fnId:j,fn:f[j],args:b[i]})}return c(g)},executeOpTree:function(a){for(var c=a.length,d=0;c>d;d++){var e=a[d].fn,f=a[d].fnId,g=a[d].args;switch(0|f){case G.beginText:this.beginText();break;case G.setLeading:this.setLeading(g);break;case G.setLeadingMoveText:this.setLeadingMoveText(g[0],g[1]);break;case G.setFont:this.setFont(g);break;case G.showText:this.showText(g[0]);break;case G.showSpacedText:this.showText(g[0]);break;case G.endText:this.endText();break;case G.moveText:this.moveText(g[0],g[1]);break;case G.setCharSpacing:this.setCharSpacing(g[0]);break;case G.setWordSpacing:this.setWordSpacing(g[0]);break;case G.setHScale:this.setHScale(g[0]);break;case G.setTextMatrix:this.setTextMatrix(g[0],g[1],g[2],g[3],g[4],g[5]);break;case G.setLineWidth:this.setLineWidth(g[0]);break;case G.setLineJoin:this.setLineJoin(g[0]);break;case G.setLineCap:this.setLineCap(g[0]);break;case G.setMiterLimit:this.setMiterLimit(g[0]);break;case G.setFillRGBColor:this.setFillRGBColor(g[0],g[1],g[2]);break;case G.setStrokeRGBColor:this.setStrokeRGBColor(g[0],g[1],g[2]);break;case G.setDash:this.setDash(g[0],g[1]);break;case G.setGState:this.setGState(g[0]);break;case G.fill:this.fill();break;case G.eoFill:this.eoFill();break;case G.stroke:this.stroke();break;case G.fillStroke:this.fillStroke();break;case G.eoFillStroke:this.eoFillStroke();break;case G.clip:this.clip("nonzero");break;case G.eoClip:this.clip("evenodd");break;case G.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case G.paintJpegXObject:this.paintJpegXObject(g[0],g[1],g[2]);break;case G.paintImageXObject:this.paintImageXObject(g[0]);break;case G.paintInlineImageXObject:this.paintInlineImageXObject(g[0]);break;case G.paintImageMaskXObject:this.paintImageMaskXObject(g[0]);break;case G.paintFormXObjectBegin:this.paintFormXObjectBegin(g[0],g[1]);break;case G.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case G.closePath:this.closePath();break;case G.closeStroke:this.closeStroke();break;case G.closeFillStroke:this.closeFillStroke();break;case G.nextLine:this.nextLine();break;case G.transform:this.transform(g[0],g[1],g[2],g[3],g[4],g[5]);break;case G.constructPath:this.constructPath(g[0],g[1]);break;case G.endPath:this.endPath();break;case 92:this.group(a[d].items);break;default:b("Unimplemented method "+e)}}},setWordSpacing:function(a){this.current.wordSpacing=a},setCharSpacing:function(a){this.current.charSpacing=a},nextLine:function(){this.moveText(0,this.current.leading)},setTextMatrix:function(a,b,c,e,f,h){var i=this.current;this.current.textMatrix=this.current.lineMatrix=[a,b,c,e,f,h],this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,i.xcoords=[],i.tspan=document.createElementNS(g,"svg:tspan"),i.tspan.setAttributeNS(null,"font-family",i.fontFamily),i.tspan.setAttributeNS(null,"font-size",d(i.fontSize)+"px"),i.tspan.setAttributeNS(null,"y",d(-i.y)),i.txtElement=document.createElementNS(g,"svg:text"),i.txtElement.appendChild(i.tspan)},beginText:function(){this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,this.current.textMatrix=S,this.current.lineMatrix=S,this.current.tspan=document.createElementNS(g,"svg:tspan"),this.current.txtElement=document.createElementNS(g,"svg:text"),this.current.txtgrp=document.createElementNS(g,"svg:g"),this.current.xcoords=[]},moveText:function(a,b){var c=this.current;this.current.x=this.current.lineX+=a,this.current.y=this.current.lineY+=b,c.xcoords=[],c.tspan=document.createElementNS(g,"svg:tspan"),c.tspan.setAttributeNS(null,"font-family",c.fontFamily),c.tspan.setAttributeNS(null,"font-size",d(c.fontSize)+"px"),c.tspan.setAttributeNS(null,"y",d(-c.y))},showText:function(a){var b=this.current,c=b.font,f=b.fontSize;if(0!==f){var g,i=b.charSpacing,j=b.wordSpacing,k=b.fontDirection,l=b.textHScale*k,m=a.length,n=c.vertical,o=f*b.fontMatrix[0],q=0;for(g=0;m>g;++g){var r=a[g];if(null!==r)if(p(r))q+=-r*f*.001;else{b.xcoords.push(b.x+q*l);var s=r.width,t=r.fontChar,u=s*o+i*k;q+=u,b.tspan.textContent+=t}else q+=k*j}n?b.y-=q*l:b.x+=q*l,b.tspan.setAttributeNS(null,"x",b.xcoords.map(d).join(" ")),b.tspan.setAttributeNS(null,"y",d(-b.y)),b.tspan.setAttributeNS(null,"font-family",b.fontFamily),b.tspan.setAttributeNS(null,"font-size",d(b.fontSize)+"px"),b.fontStyle!==ta.fontStyle&&b.tspan.setAttributeNS(null,"font-style",b.fontStyle),b.fontWeight!==ta.fontWeight&&b.tspan.setAttributeNS(null,"font-weight",b.fontWeight),b.fillColor!==ta.fillColor&&b.tspan.setAttributeNS(null,"fill",b.fillColor),b.txtElement.setAttributeNS(null,"transform",e(b.textMatrix)+" scale(1, -1)"),b.txtElement.setAttributeNS(h,"xml:space","preserve"),b.txtElement.appendChild(b.tspan),b.txtgrp.appendChild(b.txtElement),this.tgrp.appendChild(b.txtElement)}},setLeadingMoveText:function(a,b){this.setLeading(-b),this.moveText(a,b)},addFontStyle:function(a){this.cssStyle||(this.cssStyle=document.createElementNS(g,"svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));var b=PDFJS.createObjectURL(a.data,a.mimetype);this.cssStyle.textContent+='@font-face { font-family: "'+a.loadedName+'"; src: url('+b+"); }\n"},setFont:function(a){var b=this.current,c=this.commonObjs.get(a[0]),e=a[1];this.current.font=c,this.embedFonts&&c.data&&!this.embeddedFonts[c.loadedName]&&(this.addFontStyle(c),this.embeddedFonts[c.loadedName]=c),b.fontMatrix=c.fontMatrix?c.fontMatrix:B;var f=c.black?c.bold?"bolder":"bold":c.bold?"bold":"normal",h=c.italic?"italic":"normal";0>e?(e=-e,b.fontDirection=-1):b.fontDirection=1,b.fontSize=e,b.fontFamily=c.loadedName,b.fontWeight=f,b.fontStyle=h,b.tspan=document.createElementNS(g,"svg:tspan"),b.tspan.setAttributeNS(null,"y",d(-b.y)),b.xcoords=[]},endText:function(){this.current.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix))},setLineWidth:function(a){this.current.lineWidth=a},setLineCap:function(a){this.current.lineCap=j[a]},setLineJoin:function(a){this.current.lineJoin=k[a]},setMiterLimit:function(a){this.current.miterLimit=a},setStrokeRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.current.strokeColor=d},setFillRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.current.fillColor=d,this.current.tspan=document.createElementNS(g,"svg:tspan"),this.current.xcoords=[]},setDash:function(a,b){this.current.dashArray=a,this.current.dashPhase=b},constructPath:function(a,b){var c=this.current,e=c.x,f=c.y;c.path=document.createElementNS(g,"svg:path");for(var h=[],i=a.length,j=0,k=0;i>j;j++)switch(0|a[j]){case G.rectangle:e=b[k++],f=b[k++];var l=b[k++],m=b[k++],n=e+l,o=f+m;h.push("M",d(e),d(f),"L",d(n),d(f),"L",d(n),d(o),"L",d(e),d(o),"Z");break;case G.moveTo:e=b[k++],f=b[k++],h.push("M",d(e),d(f));break;case G.lineTo:e=b[k++],f=b[k++],h.push("L",d(e),d(f));break;case G.curveTo:e=b[k+4],f=b[k+5],h.push("C",d(b[k]),d(b[k+1]),d(b[k+2]),d(b[k+3]),d(e),d(f)),k+=6;break;case G.curveTo2:e=b[k+2],f=b[k+3],h.push("C",d(e),d(f),d(b[k]),d(b[k+1]),d(b[k+2]),d(b[k+3])),k+=4;break;case G.curveTo3:e=b[k+2],f=b[k+3],h.push("C",d(b[k]),d(b[k+1]),d(e),d(f),d(e),d(f)),k+=4;break;case G.closePath:h.push("Z")}c.path.setAttributeNS(null,"d",h.join(" ")),c.path.setAttributeNS(null,"stroke-miterlimit",d(c.miterLimit)),c.path.setAttributeNS(null,"stroke-linecap",c.lineCap),c.path.setAttributeNS(null,"stroke-linejoin",c.lineJoin),c.path.setAttributeNS(null,"stroke-width",d(c.lineWidth)+"px"),c.path.setAttributeNS(null,"stroke-dasharray",c.dashArray.map(d).join(" ")),c.path.setAttributeNS(null,"stroke-dashoffset",d(c.dashPhase)+"px"),c.path.setAttributeNS(null,"fill","none"),this.tgrp.appendChild(c.path),c.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp),c.element=c.path,c.setCurrentPoint(e,f)},endPath:function(){var a=this.current;a.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix))},clip:function(a){var b=this.current;b.clipId="clippath"+l,l++,this.clippath=document.createElementNS(g,"svg:clipPath"),this.clippath.setAttributeNS(null,"id",b.clipId);var c=b.element.cloneNode();"evenodd"===a?c.setAttributeNS(null,"clip-rule","evenodd"):c.setAttributeNS(null,"clip-rule","nonzero"),this.clippath.setAttributeNS(null,"transform",e(this.transformMatrix)),this.clippath.appendChild(c),this.defs.appendChild(this.clippath),b.pendingClip=!0,this.cgrp=document.createElementNS(g,"svg:g"),this.cgrp.setAttributeNS(null,"clip-path","url(#"+b.clipId+")"),this.pgrp.appendChild(this.cgrp)},closePath:function(){var a=this.current,b=a.path.getAttributeNS(null,"d");b+="Z",a.path.setAttributeNS(null,"d",b)},setLeading:function(a){this.current.leading=-a},setTextRise:function(a){this.current.textRise=a},setHScale:function(a){this.current.textHScale=a/100},setGState:function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b],e=d[0],f=d[1];switch(e){case"LW":this.setLineWidth(f);break;case"LC":this.setLineCap(f);break;case"LJ":this.setLineJoin(f);break;case"ML":this.setMiterLimit(f);break;case"D":this.setDash(f[0],f[1]);break;case"RI":break;case"FL":break;case"Font":this.setFont(f);break;case"CA":break;case"ca":break;case"BM":break;case"SMask":}}},fill:function(){var a=this.current;a.element.setAttributeNS(null,"fill",a.fillColor)},stroke:function(){var a=this.current;a.element.setAttributeNS(null,"stroke",a.strokeColor),a.element.setAttributeNS(null,"fill","none")},eoFill:function(){var a=this.current;a.element.setAttributeNS(null,"fill",a.fillColor),a.element.setAttributeNS(null,"fill-rule","evenodd")},fillStroke:function(){this.stroke(),this.fill()},eoFillStroke:function(){this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()},closeStroke:function(){this.closePath(),this.stroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},paintSolidColorImageMask:function(){var a=this.current,b=document.createElementNS(g,"svg:rect");b.setAttributeNS(null,"x","0"),b.setAttributeNS(null,"y","0"),b.setAttributeNS(null,"width","1px"),b.setAttributeNS(null,"height","1px"),b.setAttributeNS(null,"fill",a.fillColor),this.tgrp.appendChild(b)},paintJpegXObject:function(a,b,c){var e=this.current,f=this.objs.get(a),h=document.createElementNS(g,"svg:image");h.setAttributeNS(i,"xlink:href",f.src),h.setAttributeNS(null,"width",f.width+"px"),h.setAttributeNS(null,"height",f.height+"px"),h.setAttributeNS(null,"x","0"),h.setAttributeNS(null,"y",d(-c)),h.setAttributeNS(null,"transform","scale("+d(1/b)+" "+d(-1/c)+")"),this.tgrp.appendChild(h),e.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp)},paintImageXObject:function(a){var c=this.objs.get(a);return c?void this.paintInlineImageXObject(c):void b("Dependent image isn't ready yet")},paintInlineImageXObject:function(a,b){var c=this.current,e=a.width,f=a.height,h=ua(a),j=document.createElementNS(g,"svg:rect");j.setAttributeNS(null,"x","0"),j.setAttributeNS(null,"y","0"),j.setAttributeNS(null,"width",d(e)),j.setAttributeNS(null,"height",d(f)),c.element=j,this.clip("nonzero");var k=document.createElementNS(g,"svg:image");k.setAttributeNS(i,"xlink:href",h),k.setAttributeNS(null,"x","0"),k.setAttributeNS(null,"y",d(-f)),k.setAttributeNS(null,"width",d(e)+"px"),k.setAttributeNS(null,"height",d(f)+"px"),k.setAttributeNS(null,"transform","scale("+d(1/e)+" "+d(-1/f)+")"),b?b.appendChild(k):this.tgrp.appendChild(k),c.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp)},paintImageMaskXObject:function(a){var b=this.current,c=a.width,e=a.height,f=b.fillColor;b.maskId="mask"+m++;var h=document.createElementNS(g,"svg:mask");h.setAttributeNS(null,"id",b.maskId);var i=document.createElementNS(g,"svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",d(c)),i.setAttributeNS(null,"height",d(e)),i.setAttributeNS(null,"fill",f),i.setAttributeNS(null,"mask","url(#"+b.maskId+")"),this.defs.appendChild(h),this.tgrp.appendChild(i),this.paintInlineImageXObject(a,h)},paintFormXObjectBegin:function(a,b){if(this.save(),q(a)&&6===a.length&&this.transform(a[0],a[1],a[2],a[3],a[4],a[5]),q(b)&&4===b.length){var c=b[2]-b[0],e=b[3]-b[1],f=document.createElementNS(g,"svg:rect");f.setAttributeNS(null,"x",b[0]),f.setAttributeNS(null,"y",b[1]),f.setAttributeNS(null,"width",d(c)),f.setAttributeNS(null,"height",d(e)),this.current.element=f,this.clip("nonzero"),this.endPath()}},paintFormXObjectEnd:function(){this.restore()}},f}();PDFJS.SVGGraphics=wa}.call("undefined"==typeof window?this:window),PDFJS.workerSrc||"undefined"==typeof document||(PDFJS.workerSrc=function(){"use strict";var a=document.body||document.getElementsByTagName("head")[0],b=a.lastChild.src;return b&&b.replace(/\.js$/i,".worker.js")}()),"undefined"==typeof PDFJS&&(("undefined"!=typeof window?window:this).PDFJS={}),PDFJS.version="1.1.551",PDFJS.build="2a5616c",function(){"use strict";function a(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.infos&&console.log("Info: "+a)}function b(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.warnings&&console.log("Warning: "+a)}function c(a){throw PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.errors&&(console.log("Error: "+a),console.log(d())),aa.notify(_.unknown),new Error(a)}function d(){try{throw new Error}catch(a){return a.stack?a.stack.split("\n").slice(2).join("\n"):""}}function e(a,b){a||c(b)}function f(a,b){if(!a)return!1;var c=/^[a-z][a-z0-9+\-.]*(?=:)/i.exec(a);if(!c)return b;switch(c=c[0].toLowerCase()){case"http":case"https":case"ftp":case"mailto":case"tel":return!0;default:return!1}}function g(a,b,c){return Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!1}),c}function h(){switch(PDFJS.openExternalLinksInNewWindow&&(b("PDFJS.openExternalLinksInNewWindow is deprecated, use PDFJS.externalLinkTarget instead."),PDFJS.externalLinkTarget===ba.NONE&&(PDFJS.externalLinkTarget=ba.BLANK),PDFJS.openExternalLinksInNewWindow=!1),PDFJS.externalLinkTarget){case ba.NONE:return!1;case ba.SELF:case ba.BLANK:case ba.PARENT:case ba.TOP:return!0}return b("PDFJS.externalLinkTarget is invalid: "+PDFJS.externalLinkTarget),PDFJS.externalLinkTarget=ba.NONE,!1}function i(a){e(null!==a&&"object"==typeof a&&void 0!==a.length,"Invalid argument for bytesToString");var b=a.length,c=8192;if(c>b)return String.fromCharCode.apply(null,a);for(var d=[],f=0;b>f;f+=c){var g=Math.min(f+c,b),h=a.subarray(f,g);d.push(String.fromCharCode.apply(null,h))}return d.join("")}function j(a){e("string"==typeof a,"Invalid argument for stringToBytes");for(var b=a.length,c=new Uint8Array(b),d=0;b>d;++d)c[d]=255&a.charCodeAt(d);return c}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,255&a)}function l(a){for(var b=1,c=0;a>b;)b<<=1,c++;return c}function m(a,b){return a[b]<<24>>24}function n(a,b){return a[b]<<8|a[b+1]}function o(a,b){return(a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3])>>>0}function p(){var a=new Uint8Array(2);a[0]=1;var b=new Uint16Array(a.buffer);return 1===b[0]}function q(){var a=document.createElement("canvas");a.width=a.height=1;var b=a.getContext("2d"),c=b.createImageData(1,1);return"undefined"!=typeof c.data.buffer}function r(a){var b,c=a.length,d=[];if("þ"===a[0]&&"ÿ"===a[1])for(b=2;c>b;b+=2)d.push(String.fromCharCode(a.charCodeAt(b)<<8|a.charCodeAt(b+1)));else for(b=0;c>b;++b){var e=oa[a.charCodeAt(b)];d.push(e?String.fromCharCode(e):a.charAt(b))}return d.join("")}function s(a){return decodeURIComponent(escape(a))}function t(a){return unescape(encodeURIComponent(a))}function u(a){for(var b in a)return!1;return!0}function v(a){return"boolean"==typeof a}function w(a){return"number"==typeof a&&(0|a)===a}function x(a){return"number"==typeof a}function y(a){return"string"==typeof a}function z(a){return a instanceof ya}function A(a,b){return a instanceof za&&(void 0===b||a.cmd===b)}function B(a,b){if(!(a instanceof Aa))return!1;if(!b)return!0;var c=a.get("Type");return z(c)&&c.name===b}function C(a){return a instanceof Array}function D(a){return"object"==typeof a&&null!==a&&void 0!==a.getBytes}function E(a){return"object"==typeof a&&null!==a&&void 0!==a.byteLength}function F(a){return a instanceof Ba}function G(){var a={};return a.promise=new Promise(function(b,c){a.resolve=b,a.reject=c}),a}function H(a,b){this.name=a,this.comObj=b,this.callbackIndex=1,this.postMessageTransfers=!0;var d=this.callbacksCapabilities={},e=this.actionHandler={};e.console_log=[function(a){console.log.apply(console,a)}],e.console_error=[function(a){console.error.apply(console,a)}],e._unsupported_feature=[function(a){aa.notify(a)}],b.onmessage=function(a){var f=a.data;if(f.isReply){var g=f.callbackId;if(f.callbackId in d){var h=d[g];delete d[g],"error"in f?h.reject(f.error):h.resolve(f.data)}else c("Cannot resolve callback "+g)}else if(f.action in e){var i=e[f.action];f.callbackId?Promise.resolve().then(function(){return i[0].call(i[1],f.data)}).then(function(a){b.postMessage({isReply:!0,callbackId:f.callbackId,data:a})},function(a){a instanceof Error&&(a+=""),b.postMessage({isReply:!0,callbackId:f.callbackId,error:a})}):i[0].call(i[1],f.data)}else c("Unknown action from worker: "+f.action)}}function I(){}function J(a,b,c){var d=b.get("Matrix"),e=b.get("BBox"),f=b.get("XStep"),g=b.get("YStep"),h=b.get("PaintType"),i=b.get("TilingType");return["TilingPattern",c,a,d,e,f,g,h,i]}function K(a){return a>=65520&&65535>=a?0:a>=62976&&63743>=a?Wb[a]||a:a}function L(a){for(var b=0,c=Xb.length;c>b;b++){var d=Xb[b];if(a>=d.begin&&a=b.begin&&a=b.begin&&a=b||!M(a.charCodeAt(0)))return a;for(var c="",d=b-1;d>=0;d--)c+=a[d];return c}function O(a){if(a.fontMatrix[0]!==T[0]){var b=.001/a.fontMatrix[0],c=a.widths;for(var d in c)c[d]*=b;a.defaultWidth*=b}}function P(a,b){switch(a){case"Type1":return"Type1C"===b?Z.TYPE1C:Z.TYPE1;case"CIDFontType0":return"CIDFontType0C"===b?Z.CIDFONTTYPE0C:Z.CIDFONTTYPE0;case"OpenType":return Z.OPENTYPE;case"TrueType":return Z.TRUETYPE;case"CIDFontType2":return Z.CIDFONTTYPE2;case"MMType1":return Z.MMTYPE1;case"Type0":return Z.TYPE0;default:return Z.UNKNOWN}}function Q(a,b,c){var d,e,f,g=Object.create(null);if(a.baseEncodingName)for(f=Pb[a.baseEncodingName],e=0;e=0?g[e]=d:g[e]=0;else if(a.flags&Ob.Symbolic)for(e in b)g[e]=b[e];else for(f=Pb.StandardEncoding,e=0;e=0?g[e]=d:g[e]=0;var h=a.differences;if(h)for(e in h){var i=h[e];d=c.indexOf(i),d>=0?g[e]=d:g[e]=0}return g}function R(a){return a===Dc}var S="undefined"==typeof window?this:window,T=("undefined"==typeof window,[.001,0,0,.001,0,0]),U={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},V={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},W={WIDGET:1,TEXT:2,LINK:3},X={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},Y={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9},Z={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10};S.PDFJS||(S.PDFJS={}),S.PDFJS.pdfBug=!1,PDFJS.VERBOSITY_LEVELS={errors:0,warnings:1,infos:5};var $=PDFJS.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},_=PDFJS.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},aa=PDFJS.UnsupportedManager=function(){var a=[];return{listen:function(b){a.push(b)},notify:function(c){b('Unsupported feature "'+c+'"');for(var d=0,e=a.length;e>d;d++)a[d](c)}}}();PDFJS.isValidUrl=f,PDFJS.shadow=g;var ba=PDFJS.LinkTarget={ +NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};PDFJS.isExternalLinkTargetSet=h;var ca=PDFJS.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},da=function(){function a(a,b){this.name="PasswordException",this.message=a,this.code=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.PasswordException=da;var ea=function(){function a(a,b){this.name="UnknownErrorException",this.message=a,this.details=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnknownErrorException=ea;var fa=function(){function a(a){this.name="InvalidPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.InvalidPDFException=fa;var ga=function(){function a(a){this.name="MissingPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.MissingPDFException=ga;var ha=function(){function a(a,b){this.name="UnexpectedResponseException",this.message=a,this.status=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnexpectedResponseException=ha;var ia=function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="NotImplementedException",a.constructor=a,a}(),ja=function(){function a(a,b){this.begin=a,this.end=b,this.message="Missing data ["+a+", "+b+")"}return a.prototype=new Error,a.prototype.name="MissingDataException",a.constructor=a,a}(),ka=function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="XRefParseException",a.constructor=a,a}();Object.defineProperty(PDFJS,"isLittleEndian",{configurable:!0,get:function(){return g(PDFJS,"isLittleEndian",p())}}),Object.defineProperty(PDFJS,"hasCanvasTypedArrays",{configurable:!0,get:function(){return g(PDFJS,"hasCanvasTypedArrays",q())}});var la=function(){function a(a,b){this.buffer=a,this.byteLength=a.length,this.length=void 0===b?this.byteLength>>2:b,c(this.length)}function b(a){return{get:function(){var b=this.buffer,c=a<<2;return(b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24)>>>0},set:function(b){var c=this.buffer,d=a<<2;c[d]=255&b,c[d+1]=b>>8&255,c[d+2]=b>>16&255,c[d+3]=b>>>24&255}}}function c(c){for(;c>d;)Object.defineProperty(a.prototype,d,b(d)),d++}a.prototype=Object.create(null);var d=0;return a}(),ma=[1,0,0,1,0,0],na=PDFJS.Util=function(){function a(){}var b=["rgb(",0,",",0,",",0,")"];return a.makeCssRgb=function(a,c,d){return b[1]=a,b[3]=c,b[5]=d,b.join("")},a.transform=function(a,b){return[a[0]*b[0]+a[2]*b[1],a[1]*b[0]+a[3]*b[1],a[0]*b[2]+a[2]*b[3],a[1]*b[2]+a[3]*b[3],a[0]*b[4]+a[2]*b[5]+a[4],a[1]*b[4]+a[3]*b[5]+a[5]]},a.applyTransform=function(a,b){var c=a[0]*b[0]+a[1]*b[2]+b[4],d=a[0]*b[1]+a[1]*b[3]+b[5];return[c,d]},a.applyInverseTransform=function(a,b){var c=b[0]*b[3]-b[1]*b[2],d=(a[0]*b[3]-a[1]*b[2]+b[2]*b[5]-b[4]*b[3])/c,e=(-a[0]*b[1]+a[1]*b[0]+b[4]*b[1]-b[5]*b[0])/c;return[d,e]},a.getAxialAlignedBoundingBox=function(b,c){var d=a.applyTransform(b,c),e=a.applyTransform(b.slice(2,4),c),f=a.applyTransform([b[0],b[3]],c),g=a.applyTransform([b[2],b[1]],c);return[Math.min(d[0],e[0],f[0],g[0]),Math.min(d[1],e[1],f[1],g[1]),Math.max(d[0],e[0],f[0],g[0]),Math.max(d[1],e[1],f[1],g[1])]},a.inverseTransform=function(a){var b=a[0]*a[3]-a[1]*a[2];return[a[3]/b,-a[1]/b,-a[2]/b,a[0]/b,(a[2]*a[5]-a[4]*a[3])/b,(a[4]*a[1]-a[5]*a[0])/b]},a.apply3dTransform=function(a,b){return[a[0]*b[0]+a[1]*b[1]+a[2]*b[2],a[3]*b[0]+a[4]*b[1]+a[5]*b[2],a[6]*b[0]+a[7]*b[1]+a[8]*b[2]]},a.singularValueDecompose2dScale=function(a){var b=[a[0],a[2],a[1],a[3]],c=a[0]*b[0]+a[1]*b[2],d=a[0]*b[1]+a[1]*b[3],e=a[2]*b[0]+a[3]*b[2],f=a[2]*b[1]+a[3]*b[3],g=(c+f)/2,h=Math.sqrt((c+f)*(c+f)-4*(c*f-e*d))/2,i=g+h||1,j=g-h||1;return[Math.sqrt(i),Math.sqrt(j)]},a.normalizeRect=function(a){var b=a.slice(0);return a[0]>a[2]&&(b[0]=a[2],b[2]=a[0]),a[1]>a[3]&&(b[1]=a[3],b[3]=a[1]),b},a.intersect=function(b,c){function d(a,b){return a-b}var e=[b[0],b[2],c[0],c[2]].sort(d),f=[b[1],b[3],c[1],c[3]].sort(d),g=[];return b=a.normalizeRect(b),c=a.normalizeRect(c),e[0]===b[0]&&e[1]===c[0]||e[0]===c[0]&&e[1]===b[0]?(g[0]=e[1],g[2]=e[2],f[0]===b[1]&&f[1]===c[1]||f[0]===c[1]&&f[1]===b[1]?(g[1]=f[1],g[3]=f[2],g):!1):!1},a.sign=function(a){return 0>a?-1:1},a.appendToArray=function(a,b){Array.prototype.push.apply(a,b)},a.prependToArray=function(a,b){Array.prototype.unshift.apply(a,b)},a.extendObj=function(a,b){for(var c in b)a[c]=b[c]},a.getInheritableProperty=function(a,b){for(;a&&!a.has(b);)a=a.get("Parent");return a?a.get(b):null},a.inherit=function(a,b,c){a.prototype=Object.create(b.prototype),a.prototype.constructor=a;for(var d in c)a.prototype[d]=c[d]},a.loadScript=function(a,b){var c=document.createElement("script"),d=!1;c.setAttribute("src",a),b&&(c.onload=function(){d||b(),d=!0}),document.getElementsByTagName("head")[0].appendChild(c)},a}(),oa=(PDFJS.PageViewport=function(){function a(a,b,c,d,e,f){this.viewBox=a,this.scale=b,this.rotation=c,this.offsetX=d,this.offsetY=e;var g,h,i,j,k=(a[2]+a[0])/2,l=(a[3]+a[1])/2;switch(c%=360,c=0>c?c+360:c){case 180:g=-1,h=0,i=0,j=1;break;case 90:g=0,h=1,i=1,j=0;break;case 270:g=0,h=-1,i=-1,j=0;break;default:g=1,h=0,i=0,j=-1}f&&(i=-i,j=-j);var m,n,o,p;0===g?(m=Math.abs(l-a[1])*b+d,n=Math.abs(k-a[0])*b+e,o=Math.abs(a[3]-a[1])*b,p=Math.abs(a[2]-a[0])*b):(m=Math.abs(k-a[0])*b+d,n=Math.abs(l-a[1])*b+e,o=Math.abs(a[2]-a[0])*b,p=Math.abs(a[3]-a[1])*b),this.transform=[g*b,h*b,i*b,j*b,m-g*b*k-i*b*l,n-h*b*k-j*b*l],this.width=o,this.height=p,this.fontScale=b}return a.prototype={clone:function(b){b=b||{};var c="scale"in b?b.scale:this.scale,d="rotation"in b?b.rotation:this.rotation;return new a(this.viewBox.slice(),c,d,this.offsetX,this.offsetY,b.dontFlip)},convertToViewportPoint:function(a,b){return na.applyTransform([a,b],this.transform)},convertToViewportRectangle:function(a){var b=na.applyTransform([a[0],a[1]],this.transform),c=na.applyTransform([a[2],a[3]],this.transform);return[b[0],b[1],c[0],c[1]]},convertToPdfPoint:function(a,b){return na.applyInverseTransform([a,b],this.transform)}},a}(),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364]);PDFJS.createPromiseCapability=G,function(){function a(a){this._status=c,this._handlers=[];try{a.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(b){this._reject(b)}}if(S.Promise)return"function"!=typeof S.Promise.all&&(S.Promise.all=function(a){var b,c,d=0,e=[],f=new S.Promise(function(a,d){b=a,c=d});return a.forEach(function(a,f){d++,a.then(function(a){e[f]=a,d--,0===d&&b(e)},c)}),0===d&&b(e),f}),"function"!=typeof S.Promise.resolve&&(S.Promise.resolve=function(a){return new S.Promise(function(b){b(a)})}),"function"!=typeof S.Promise.reject&&(S.Promise.reject=function(a){return new S.Promise(function(b,c){c(a)})}),void("function"!=typeof S.Promise.prototype["catch"]&&(S.Promise.prototype["catch"]=function(a){return S.Promise.prototype.then(void 0,a)}));var c=0,d=1,e=2,f=500,g={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(a){a._status!==c&&(this.handlers=this.handlers.concat(a._handlers),a._handlers=[],this.running||(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(var a=1,b=Date.now()+a;this.handlers.length>0;){var c=this.handlers.shift(),f=c.thisPromise._status,g=c.thisPromise._value;try{f===d?"function"==typeof c.onResolve&&(g=c.onResolve(g)):"function"==typeof c.onReject&&(g=c.onReject(g),f=d,c.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(c.thisPromise))}catch(h){f=e,g=h}if(c.nextPromise._updateStatus(f,g),Date.now()>=b)break}return this.handlers.length>0?void setTimeout(this.runHandlers.bind(this),0):void(this.running=!1)},addUnhandledRejection:function(a){this.unhandledRejections.push({promise:a,time:Date.now()}),this.scheduleRejectionCheck()},removeUnhandeledRejection:function(a){a._unhandledRejection=!1;for(var b=0;bf){var d=this.unhandledRejections[c].promise._value,e="Unhandled rejection: "+d;d.stack&&(e+="\n"+d.stack),b(e),this.unhandledRejections.splice(c),c--}this.unhandledRejections.length&&this.scheduleRejectionCheck()}.bind(this),f))}};a.all=function(b){function c(a){g._status!==e&&(i=[],f(a))}var d,f,g=new a(function(a,b){d=a,f=b}),h=b.length,i=[];if(0===h)return d(i),g;for(var j=0,k=b.length;k>j;++j){var l=b[j],m=function(a){return function(b){g._status!==e&&(i[a]=b,h--,0===h&&d(i))}}(j);a.isPromise(l)?l.then(m,c):m(l)}return g},a.isPromise=function(a){return a&&"function"==typeof a.then},a.resolve=function(b){return new a(function(a){a(b)})},a.reject=function(b){return new a(function(a,c){c(b)})},a.prototype={_status:null,_value:null,_handlers:null,_unhandledRejection:null,_updateStatus:function(b,c){if(this._status!==d&&this._status!==e){if(b===d&&a.isPromise(c))return void c.then(this._updateStatus.bind(this,d),this._updateStatus.bind(this,e));this._status=b,this._value=c,b===e&&0===this._handlers.length&&(this._unhandledRejection=!0,g.addUnhandledRejection(this)),g.scheduleHandlers(this)}},_resolve:function(a){this._updateStatus(d,a)},_reject:function(a){this._updateStatus(e,a)},then:function(b,c){var d=new a(function(a,b){this.resolve=a,this.reject=b});return this._handlers.push({thisPromise:this,onResolve:b,onReject:c,nextPromise:d}),g.scheduleHandlers(this),d},"catch":function(a){return this.then(void 0,a)}},S.Promise=a}();(function(){function a(a,b,c){for(;a.lengthb;++b){var g=d[b].name;g.length>f&&(f=g.length)}for(b=0,c=d.length;c>b;++b){var h=d[b],i=h.end-h.start;e+=a(h.name," ",f)+" "+i+"ms\n"}return e}},c})();PDFJS.createBlob=function(a,b){if("undefined"!=typeof Blob)return new Blob([a],{type:b});var c=new MozBlobBuilder;return c.append(a),c.getBlob(b)},PDFJS.createObjectURL=function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(b,c){if(!PDFJS.disableCreateObjectURL&&"undefined"!=typeof URL&&URL.createObjectURL){var d=PDFJS.createBlob(b,c);return URL.createObjectURL(d)}for(var e="data:"+c+";base64,",f=0,g=b.length;g>f;f+=3){var h=255&b[f],i=255&b[f+1],j=255&b[f+2],k=h>>2,l=(3&h)<<4|i>>4,m=g>f+1?(15&i)<<2|j>>6:64,n=g>f+2?63&j:64;e+=a[k]+a[l]+a[m]+a[n]}return e}}(),H.prototype={on:function(a,b,d){var e=this.actionHandler;e[a]&&c('There is already an actionName called "'+a+'"'),e[a]=[b,d]},send:function(a,b,c){var d={action:a,data:b};this.postMessage(d,c)},sendWithPromise:function(a,b,c){var d=this.callbackIndex++,e={action:a,data:b,callbackId:d},f=G();this.callbacksCapabilities[d]=f;try{this.postMessage(e,c)}catch(g){f.reject(g)}return f.promise},postMessage:function(a,b){b&&this.postMessageTransfers?this.comObj.postMessage(a,b):this.comObj.postMessage(a)}};var pa=function(){function a(a,b){this.url=a,b=b||{},this.isHttp=/^https?:/i.test(a),this.httpHeaders=this.isHttp&&b.httpHeaders||{},this.withCredentials=b.withCredentials||!1,this.getXhr=b.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests={},this.loadedRequests={}}function b(a){var b=a.response;if("string"!=typeof b)return b;for(var c=b.length,d=new Uint8Array(c),e=0;c>e;e++)d[e]=255&b.charCodeAt(e);return d.buffer}var c=200,d=206,e=function(){try{var a=new XMLHttpRequest;return a.open("GET","https://example.com"),a.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===a.responseType}catch(b){return!1}}();return a.prototype={requestRange:function(a,b,c){var d={begin:a,end:b};for(var e in c)d[e]=c[e];return this.request(d)},requestFull:function(a){return this.request(a)},request:function(a){var b=this.getXhr(),c=this.currXhrId++,d=this.pendingRequests[c]={xhr:b};b.open("GET",this.url),b.withCredentials=this.withCredentials;for(var f in this.httpHeaders){var g=this.httpHeaders[f];"undefined"!=typeof g&&b.setRequestHeader(f,g)}if(this.isHttp&&"begin"in a&&"end"in a){var h=a.begin+"-"+(a.end-1);b.setRequestHeader("Range","bytes="+h),d.expectedStatus=206}else d.expectedStatus=200;var i=e&&!!a.onProgressiveData;return i?(b.responseType="moz-chunked-arraybuffer",d.onProgressiveData=a.onProgressiveData,d.mozChunked=!0):b.responseType="arraybuffer",a.onError&&(b.onerror=function(c){a.onError(b.status)}),b.onreadystatechange=this.onStateChange.bind(this,c),b.onprogress=this.onProgress.bind(this,c),d.onHeadersReceived=a.onHeadersReceived,d.onDone=a.onDone,d.onError=a.onError,d.onProgress=a.onProgress,b.send(null),c},onProgress:function(a,c){var d=this.pendingRequests[a];if(d){if(d.mozChunked){var e=b(d.xhr);d.onProgressiveData(e)}var f=d.onProgress;f&&f(c)}},onStateChange:function(a,e){var f=this.pendingRequests[a];if(f){var g=f.xhr;if(g.readyState>=2&&f.onHeadersReceived&&(f.onHeadersReceived(),delete f.onHeadersReceived),4===g.readyState&&a in this.pendingRequests){if(delete this.pendingRequests[a],0===g.status&&this.isHttp)return void(f.onError&&f.onError(g.status));var h=g.status||c,i=h===c&&f.expectedStatus===d;if(!i&&h!==f.expectedStatus)return void(f.onError&&f.onError(g.status));this.loadedRequests[a]=!0;var j=b(g);if(h===d){var k=g.getResponseHeader("Content-Range"),l=/bytes (\d+)-(\d+)\/(\d+)/.exec(k),m=parseInt(l[1],10);f.onDone({begin:m,chunk:j})}else f.onProgressiveData?f.onDone(null):f.onDone({begin:0,chunk:j})}}},hasPendingRequests:function(){for(var a in this.pendingRequests)return!0;return!1},getRequestXhr:function(a){return this.pendingRequests[a].xhr},isStreamingRequest:function(a){return!!this.pendingRequests[a].onProgressiveData},isPendingRequest:function(a){return a in this.pendingRequests},isLoadedRequest:function(a){return a in this.loadedRequests},abortAllRequests:function(){for(var a in this.pendingRequests)this.abortRequest(0|a)},abortRequest:function(a){var b=this.pendingRequests[a].xhr;delete this.pendingRequests[a],b.abort()}},a}(),qa=function(){function a(a,b,c){this.bytes=new Uint8Array(a),this.start=0,this.pos=0,this.end=a,this.chunkSize=b,this.loadedChunks=[],this.numChunksLoaded=0,this.numChunks=Math.ceil(a/b),this.manager=c,this.progressiveDataLength=0,this.lastSuccessfulEnsureByteChunk=-1}return a.prototype={getMissingChunks:function(){for(var a=[],b=0,c=this.numChunks;c>b;++b)this.loadedChunks[b]||a.push(b);return a},getBaseStreams:function(){return[this]},allChunksLoaded:function(){return this.numChunksLoaded===this.numChunks},onReceiveData:function(a,b){var c=a+b.byteLength;e(a%this.chunkSize===0,"Bad begin offset: "+a);var d=this.bytes.length;e(c%this.chunkSize===0||c===d,"Bad end offset: "+c),this.bytes.set(new Uint8Array(b),a);var f,g=this.chunkSize,h=Math.floor(a/g),i=Math.floor((c-1)/g)+1;for(f=h;i>f;++f)this.loadedChunks[f]||(this.loadedChunks[f]=!0,++this.numChunksLoaded)},onReceiveProgressiveData:function(a){var b=this.progressiveDataLength,c=Math.floor(b/this.chunkSize);this.bytes.set(new Uint8Array(a),b),b+=a.byteLength,this.progressiveDataLength=b;var d,e=b>=this.end?this.numChunks:Math.floor(b/this.chunkSize);for(d=c;e>d;++d)this.loadedChunks[d]||(this.loadedChunks[d]=!0,++this.numChunksLoaded)},ensureByte:function(a){var b=Math.floor(a/this.chunkSize);if(b!==this.lastSuccessfulEnsureByteChunk){if(!this.loadedChunks[b])throw new ja(a,a+1);this.lastSuccessfulEnsureByteChunk=b}},ensureRange:function(a,b){if(!(a>=b||b<=this.progressiveDataLength))for(var c=this.chunkSize,d=Math.floor(a/c),e=Math.floor((b-1)/c)+1,f=d;e>f;++f)if(!this.loadedChunks[f])throw new ja(a,b)},nextEmptyChunk:function(a){for(var b,c=this.numChunks,d=0;c>d;++d)if(b=(a+d)%c,!this.loadedChunks[b])return b;return null},hasChunk:function(a){return!!this.loadedChunks[a]},get length(){return this.end-this.start},get isEmpty(){return 0===this.length},getByte:function(){var a=this.pos;return a>=this.end?-1:(this.ensureByte(a),this.bytes[this.pos++])},getUint16:function(){var a=this.getByte(),b=this.getByte();return-1===a||-1===b?-1:(a<<8)+b},getInt32:function(){var a=this.getByte(),b=this.getByte(),c=this.getByte(),d=this.getByte();return(a<<24)+(b<<16)+(c<<8)+d},getBytes:function(a){var b=this.bytes,c=this.pos,d=this.end;if(!a)return this.ensureRange(c,d),b.subarray(c,d);var e=c+a;return e>d&&(e=d),this.ensureRange(c,e),this.pos=e,b.subarray(c,e)},peekByte:function(){var a=this.getByte();return this.pos--,a},peekBytes:function(a){var b=this.getBytes(a);return this.pos-=b.length,b},getByteRange:function(a,b){return this.ensureRange(a,b),this.bytes.subarray(a,b)},skip:function(a){a||(a=1),this.pos+=a},reset:function(){this.pos=this.start},moveStart:function(){this.start=this.pos},makeSubStream:function(a,b,c){function d(){}this.ensureRange(a,a+b),d.prototype=Object.create(this),d.prototype.getMissingChunks=function(){for(var a=this.chunkSize,b=Math.floor(this.start/a),c=Math.floor((this.end-1)/a)+1,d=[],e=b;c>e;++e)this.loadedChunks[e]||d.push(e);return d};var e=new d;return e.pos=e.start=a,e.end=a+b||this.end,e.dict=c,e},isStream:!0},a}(),ra=function(){function a(a,b,c,d){this.stream=new qa(a,b,this),this.length=a,this.chunkSize=b,this.url=c,this.disableAutoFetch=d.disableAutoFetch;var e=this.msgHandler=d.msgHandler;if(d.chunkedViewerLoading)e.on("OnDataRange",this.onReceiveData.bind(this)),e.on("OnDataProgress",this.onProgress.bind(this)),this.sendRequest=function(a,b){e.send("RequestDataRange",{begin:a,end:b})};else{var f=function(){return new XMLHttpRequest};this.networkManager=new pa(this.url,{getXhr:f,httpHeaders:d.httpHeaders,withCredentials:d.withCredentials}),this.sendRequest=function(a,b){this.networkManager.requestRange(a,b,{onDone:this.onReceiveData.bind(this),onProgress:this.onProgress.bind(this)})}}this.currRequestId=0,this.chunksNeededByRequest={},this.requestsByChunk={},this.promisesByRequest={},this.progressiveDataLength=0,this._loadedStreamCapability=G(),d.initialData&&this.onReceiveData({chunk:d.initialData})}return a.prototype={onLoadedStream:function(){return this._loadedStreamCapability.promise},requestAllChunks:function(){var a=this.stream.getMissingChunks();return this._requestChunks(a),this._loadedStreamCapability.promise},_requestChunks:function(a){var b,c,d,e=this.currRequestId++;for(this.chunksNeededByRequest[e]=b={},c=0,d=a.length;d>c;c++)this.stream.hasChunk(a[c])||(b[a[c]]=!0);if(u(b))return Promise.resolve();var f=G();this.promisesByRequest[e]=f;var g=[];for(var h in b)h=0|h,h in this.requestsByChunk||(this.requestsByChunk[h]=[],g.push(h)),this.requestsByChunk[h].push(e);if(!g.length)return f.promise;var i=this.groupChunks(g);for(c=0;cf;++f)e.push(f);return this._requestChunks(e)},requestRanges:function(a){a=a||[];for(var b=[],c=0;cf;++f)b.indexOf(f)<0&&b.push(f);return b.sort(function(a,b){return a-b}),this._requestChunks(b)},groupChunks:function(a){for(var b=[],c=-1,d=-1,e=0;ec&&(c=f),d>=0&&d+1!==f&&(b.push({beginChunk:c,endChunk:d+1}),c=f),e+1===a.length&&b.push({beginChunk:c,endChunk:f+1}),d=f}return b},onProgress:function(a){var b=this.stream.numChunksLoaded*this.chunkSize+a.loaded;this.msgHandler.send("DocProgress",{loaded:b,total:this.length})},onReceiveData:function(a){var b=a.chunk,c=void 0===a.begin,d=c?this.progressiveDataLength:a.begin,e=d+b.byteLength,f=Math.floor(d/this.chunkSize),g=eb;++b){var k=this.requestsByChunk[b]||[];for(delete this.requestsByChunk[b],h=0;hf){b("Page_getInheritedPageProp: maximum loop count exceeded.");break}c=c.get("Parent")}return d?1===d.length||!B(d[0])||e>f?d[0]:Aa.merge(this.xref,d):Aa.empty},get content(){return this.getPageProp("Contents")},get resources(){return g(this,"resources",this.getInheritedPageProp("Resources"))},get mediaBox(){var a=this.getInheritedPageProp("MediaBox");return C(a)&&4===a.length||(a=c),g(this,"mediaBox",a)},get view(){var a=this.mediaBox,b=this.getInheritedPageProp("CropBox");return C(b)&&4===b.length?(b=na.intersect(b,a),b?g(this,"view",b):g(this,"view",a)):g(this,"view",a)},get rotate(){var a=this.getInheritedPageProp("Rotate")||0;return a%90!==0?a=0:a>=360?a%=360:0>a&&(a=(a%360+360)%360),g(this,"rotate",a)},getContentStream:function(){var a,b=this.content;if(C(b)){var c,d=this.xref,e=b.length,f=[];for(c=0;e>c;++c)f.push(d.fetchIfRef(b[c]));a=new Pc(f)}else a=D(b)?b:new _c;return a},loadResources:function(a){return this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources")),this.resourcesPromise.then(function(){var b=new Ia(this.resources.map,a,this.xref);return b.load()}.bind(this))},getOperatorList:function(a,b,c){var d=this,e=this.pdfManager,f=e.ensure(this,"getContentStream",[]),g=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),h=new vb(e,this.xref,a,this.pageIndex,"p"+this.pageIndex+"_",this.idCounters,this.fontCache),i=Promise.all([f,g]),j=i.then(function(e){var f=e[0],g=new xb(c,a,d.pageIndex);return a.send("StartRenderPage",{transparency:h.hasBlendModes(d.resources),pageIndex:d.pageIndex,intent:c}),h.getOperatorList(f,b,d.resources,g).then(function(){return g})}),k=e.ensure(this,"annotations");return Promise.all([j,k]).then(function(a){var d=a[0],f=a[1];if(0===f.length)return d.flush(!0),d;var g=Na.appendToOperatorList(f,d,e,h,b,c);return g.then(function(){return d.flush(!0),d})})},extractTextContent:function(a){var b={on:function(){},send:function(){}},c=this,d=this.pdfManager,e=d.ensure(this,"getContentStream",[]),f=this.loadResources(["ExtGState","XObject","Font"]),g=Promise.all([e,f]);return g.then(function(e){var f=e[0],g=new vb(d,c.xref,b,c.pageIndex,"p"+c.pageIndex+"_",c.idCounters,c.fontCache);return g.getTextContent(f,a,c.resources)})},getAnnotationsData:function(){for(var a=this.annotations,b=[],c=0,d=a.length;d>c;++c)b.push(a[c].data);return b},get annotations(){for(var a=[],b=this.getInheritedPageProp("Annots")||[],c=new I,d=0,e=b.length;e>d;++d){var f=b[d],h=c.create(this.xref,f);h&&(h.isViewable()||h.isPrintable())&&a.push(h)}return g(this,"annotations",a)}},a}(),xa=function(){function b(a,b,e){D(b)?d.call(this,a,b,e):E(b)?d.call(this,a,new Mc(b),e):c("PDFDocument: Unknown argument type")}function d(a,b,c){e(b.length>0,"stream must have data"),this.pdfManager=a,this.stream=b;var d=new Fa(this.stream,c,a);this.xref=d}function f(a,b,c,d){var e=a.pos,f=a.end,g=[];e+c>f&&(c=f-e);for(var h=0;c>h;++h)g.push(String.fromCharCode(a.getByte()));var i=g.join("");a.pos=e;var j=d?i.lastIndexOf(b):i.indexOf(b);return-1===j?!1:(a.pos+=j,!0)}var h=1024,i="\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",k={get entries(){return g(this,"entries",{Title:y,Author:y,Subject:y,Keywords:y,Creator:y,Producer:y,CreationDate:y,ModDate:y,Trapped:z})}};return b.prototype={parse:function(b){this.setup(b);var c=this.catalog.catDict.get("Version");z(c)&&(this.pdfFormatVersion=c.name);try{if(this.acroForm=this.catalog.catDict.get("AcroForm"),this.acroForm){this.xfa=this.acroForm.get("XFA");var d=this.acroForm.get("Fields");d&&C(d)&&0!==d.length||this.xfa||(this.acroForm=null)}}catch(e){a("Something wrong with AcroForm entry"),this.acroForm=null}},get linearization(){var b=null;if(this.stream.length)try{b=Hc.create(this.stream)}catch(c){if(c instanceof ja)throw c;a(c)}return g(this,"linearization",b)},get startXRef(){var a=this.stream,b=0,c=this.linearization;if(c)a.reset(),f(a,"endobj",1024)&&(b=a.pos+6);else{for(var d=1024,e=!1,h=a.end;!e&&h>0;)h-=d-"startxref".length,0>h&&(h=0),a.pos=h,e=f(a,"startxref",d,!0);if(e){a.skip(9);var i;do i=a.getByte();while(Gc.isSpace(i));for(var j="";i>=32&&57>=i;)j+=String.fromCharCode(i),i=a.getByte();b=parseInt(j,10),isNaN(b)&&(b=0)}}return g(this,"startXRef",b)},get mainXRefEntriesOffset(){var a=0,b=this.linearization;return b&&(a=b.mainXRefEntriesOffset),g(this,"mainXRefEntriesOffset",a)},checkHeader:function(){var a=this.stream;if(a.reset(),f(a,"%PDF-",1024)){a.moveStart();for(var b,c=12,d="";(b=a.getByte())>32&&!(d.length>=c);)d+=String.fromCharCode(b);return void(this.pdfFormatVersion||(this.pdfFormatVersion=d.substring(5)))}},parseStartXRef:function(){var a=this.startXRef;this.xref.setStartXRef(a)},setup:function(a){this.xref.parse(a),this.catalog=new Ea(this.pdfManager,this.xref)},get numPages(){var a=this.linearization,b=a?a.numPages:this.catalog.numPages;return g(this,"numPages",b)},get documentInfo(){var b,c={PDFFormatVersion:this.pdfFormatVersion,IsAcroFormPresent:!!this.acroForm,IsXFAPresent:!!this.xfa};try{b=this.xref.trailer.get("Info")}catch(d){a("The document information dictionary is invalid.")}if(b){var e=k.entries;for(var f in e)if(b.has(f)){var h=b.get(f);e[f](h)?c[f]="string"!=typeof h?h:r(h):a('Bad value in document info for "'+f+'"')}}return g(this,"documentInfo",c)},get fingerprint(){var a,b=this.xref,c="",d=b.trailer.get("ID");d&&C(d)&&d[0]&&y(d[0])&&d[0]!==i?a=j(d[0]):(this.stream.ensureRange&&this.stream.ensureRange(0,Math.min(h,this.stream.end)),a=gb(this.stream.bytes.subarray(0,h),0,h));for(var e=0,f=a.length;f>e;e++){var k=a[e].toString(16);c+=1===k.length?"0"+k:k}return g(this,"fingerprint",c)},getPage:function(a){return this.catalog.getPage(a)},cleanup:function(){return this.catalog.cleanup()}},b}(),ya=function(){function a(a){this.name=a}a.prototype={};var b={};return a.get=function(c){var d=b[c];return d?d:b[c]=new a(c)},a}(),za=function(){function a(a){this.cmd=a}a.prototype={};var b={};return a.get=function(c){var d=b[c];return d?d:b[c]=new a(c)},a}(),Aa=function(){function a(a){if(!z(a.Type))return!0;var b=a.Type.name;return d[b]===!0}function b(a){this.map=Object.create(null),this.xref=a,this.objId=null,this.__nonSerializable__=c}var c=function(){return c},d={Background:!0,ExtGState:!0,Halftone:!0,Layout:!0,Mask:!0,Pagination:!0,Printing:!0};return b.prototype={assignXref:function(a){this.xref=a},get:function(a,b,c){var d,e=this.xref;return"undefined"!=typeof(d=this.map[a])||a in this.map||"undefined"==typeof b?e?e.fetchIfRef(d):d:"undefined"!=typeof(d=this.map[b])||b in this.map||"undefined"==typeof c?e?e.fetchIfRef(d):d:(d=this.map[c]||null,e?e.fetchIfRef(d):d)},getAsync:function(a,b,c){var d,e=this.xref;return"undefined"!=typeof(d=this.map[a])||a in this.map||"undefined"==typeof b?e?e.fetchIfRefAsync(d):Promise.resolve(d):"undefined"!=typeof(d=this.map[b])||b in this.map||"undefined"==typeof c?e?e.fetchIfRefAsync(d):Promise.resolve(d):(d=this.map[c]||null,e?e.fetchIfRefAsync(d):Promise.resolve(d))},getArray:function(a,b,c){var d=this.get(a,b,c),e=this.xref;if(!C(d)||!e)return d;d=d.slice();for(var f=0,g=d.length;g>f;f++)F(d[f])&&(d[f]=e.fetch(d[f]));return d},getRaw:function(a){return this.map[a]},getAll:function(){var c,d,e=Object.create(null),f=null; +for(c in this.map)d=this.get(c),d instanceof b?a(d)?(f||(f=[])).push({target:e,key:c,obj:d}):e[c]=this.getRaw(c):e[c]=d;if(!f)return e;for(var g=Object.create(null);f.length>0;){var h=f.shift(),i=h.obj,j=i.objId;if(j&&j in g)h.target[h.key]=g[j];else{var k=Object.create(null);for(c in i.map)d=i.get(c),d instanceof b?a(d)?f.push({target:k,key:c,obj:d}):k[c]=i.getRaw(c):k[c]=d;j&&(g[j]=k),h.target[h.key]=k}}return e},getKeys:function(){return Object.keys(this.map)},set:function(a,b){this.map[a]=b},has:function(a){return a in this.map},forEach:function(a){for(var b in this.map)a(b,this.get(b))}},b.empty=new b(null),b.merge=function(a,c){for(var d=new b(a),e=0,f=c.length;f>e;e++){var g=c[e];if(B(g))for(var h in g.map)d.map[h]||(d.map[h]=g.map[h])}return d},b}(),Ba=function(){function a(a,b){this.num=a,this.gen=b}return a.prototype={toString:function(){var a=this.num+"R";return 0!==this.gen&&(a+=this.gen),a}},a}(),Ca=function(){function a(){this.dict={}}return a.prototype={has:function(a){return a.toString()in this.dict},put:function(a){this.dict[a.toString()]=!0},remove:function(a){delete this.dict[a.toString()]}},a}(),Da=function(){function a(){this.dict=Object.create(null)}return a.prototype={get:function(a){return this.dict[a.toString()]},has:function(a){return a.toString()in this.dict},put:function(a,b){this.dict[a.toString()]=b},putAlias:function(a,b){this.dict[a.toString()]=this.get(b)},forEach:function(a,b){for(var c in this.dict)a.call(b,this.dict[c])},clear:function(){this.dict=Object.create(null)}},a}(),Ea=function(){function d(a,b){this.pdfManager=a,this.xref=b,this.catDict=b.getCatalogObj(),this.fontCache=new Da,e(B(this.catDict),"catalog object is not a dictionary"),this.pagePromises=[]}return d.prototype={get metadata(){var b=this.catDict.getRaw("Metadata");if(!F(b))return g(this,"metadata",null);var c,d=this.xref.encrypt?this.xref.encrypt.encryptMetadata:!1,e=this.xref.fetch(b,!d);if(e&&B(e.dict)){var f=e.dict.get("Type"),h=e.dict.get("Subtype");if(z(f)&&z(h)&&"Metadata"===f.name&&"XML"===h.name)try{c=s(i(e.getBytes()))}catch(j){a("Skipping invalid metadata.")}}return g(this,"metadata",c)},get toplevelPagesDict(){var a=this.catDict.get("Pages");return e(B(a),"invalid top-level pages dictionary"),g(this,"toplevelPagesDict",a)},get documentOutline(){var a=null;try{a=this.readDocumentOutline()}catch(c){if(c instanceof ja)throw c;b("Unable to read document outline")}return g(this,"documentOutline",a)},readDocumentOutline:function(){var a=this.xref,b=this.catDict.get("Outlines"),d={items:[]};if(B(b)){b=b.getRaw("First");var e=new Ca;if(F(b)){var f=[{obj:b,parent:d}];for(e.put(b);f.length>0;){var g=f.shift(),h=a.fetchIfRef(g.obj);if(null!==h){h.has("Title")||c("Invalid outline item");var i=h.get("A");i?i=i.get("D"):h.has("Dest")&&(i=h.getRaw("Dest"),z(i)&&(i=i.name));var j=h.get("Title"),k={dest:i,title:r(j),color:h.get("C")||[0,0,0],count:h.get("Count"),bold:!!(2&h.get("F")),italic:!!(1&h.get("F")),items:[]};g.parent.items.push(k),b=h.getRaw("First"),F(b)&&!e.has(b)&&(f.push({obj:b,parent:k}),e.put(b)),b=h.getRaw("Next"),F(b)&&!e.has(b)&&(f.push({obj:b,parent:g.parent}),e.put(b))}}}}return d.items.length>0?d.items:null},get numPages(){var a=this.toplevelPagesDict.get("Count");return e(w(a),"page count in top level pages object is not an integer"),g(this,"num",a)},get destinations(){function a(a){return B(a)?a.get("D"):a}var b,c,d=this.xref,e={},f=this.catDict.get("Names");if(f&&f.has("Dests")?b=f.getRaw("Dests"):this.catDict.has("Dests")&&(c=this.catDict.get("Dests")),c&&(f=c,f.forEach(function(b,c){c&&(e[b]=a(c))})),b){var h=new Ga(b,d),i=h.getAll();for(var j in i)i.hasOwnProperty(j)&&(e[j]=a(i[j]))}return g(this,"destinations",e)},getDestination:function(a){function b(a){return B(a)?a.get("D"):a}var c,d,e=this.xref,f=null,g=this.catDict.get("Names");if(g&&g.has("Dests")?c=g.getRaw("Dests"):this.catDict.has("Dests")&&(d=this.catDict.get("Dests")),d){var h=d.get(a);h&&(f=b(h))}if(c){var i=new Ga(c,e);f=b(i.get(a))}return f},get attachments(){var a,b=this.xref,c=null,d=this.catDict.get("Names");if(d&&(a=d.getRaw("EmbeddedFiles")),a){var e=new Ga(a,b),f=e.getAll();for(var h in f)if(f.hasOwnProperty(h)){var i=new Ha(f[h],b);c||(c={}),c[r(h)]=i.serializable}}return g(this,"attachments",c)},get javaScript(){function a(a){var b=a.get("S");if(z(b)&&"JavaScript"===b.name){var c=a.get("JS");if(D(c))c=i(c.getBytes());else if(!y(c))return;d.push(r(c))}}var b=this.xref,c=this.catDict.get("Names"),d=[];if(c&&c.has("JavaScript")){var e=new Ga(c.getRaw("JavaScript"),b),f=e.getAll();for(var h in f)if(f.hasOwnProperty(h)){var j=f[h];B(j)&&a(j)}}var k=this.catDict.get("OpenAction");if(B(k,"Action")){var l=k.get("S");if(z(l)&&"Named"===l.name){var m=k.get("N");z(m)&&"Print"===m.name&&d.push("print({});")}else a(k)}return g(this,"javaScript",d)},cleanup:function(){var a=[];return this.fontCache.forEach(function(b){a.push(b)}),Promise.all(a).then(function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b].dict;delete d.translated}this.fontCache.clear()}.bind(this))},getPage:function(a){return a in this.pagePromises||(this.pagePromises[a]=this.getPageDict(a).then(function(b){var c=b[0],d=b[1];return new wa(this.pdfManager,this.xref,a,c,d,this.fontCache)}.bind(this))),this.pagePromises[a]},getPageDict:function(a){function b(){for(;d.length;){var i=d.pop();if(F(i))return void g.fetchAsync(i).then(function(e){return B(e,"Page")||B(e)&&!e.has("Kids")?void(a===f?c.resolve([e,i]):(f++,b())):(d.push(e),void b())},c.reject);e(B(i),"page dictionary kid reference points to wrong type of object");var j=i.get("Count");if(0===j&&(h=!0),a>=f+j)f+=j;else{var k=i.get("Kids");if(e(C(k),"page dictionary kids object is not an array"),h||j!==k.length)for(var l=k.length-1;l>=0;l--)d.push(k[l]);else d=[k[a-f]],f=a}}c.reject("Page index "+a+" not found.")}var c=G(),d=[this.catDict.getRaw("Pages")],f=0,g=this.xref,h=!1;return b(),c.promise},getPageIndex:function(a){function b(a){var b,d=0;return f.fetchAsync(a).then(function(a){return a?(b=a.getRaw("Parent"),a.getAsync("Parent")):null}).then(function(a){return a?a.getAsync("Kids"):null}).then(function(g){if(!g)return null;for(var h=[],i=!1,j=0;jh;h++){d.streamPos=b.pos,d.entryNum=h,d.parserBuf1=a.buf1,d.parserBuf2=a.buf2;var i={};i.offset=a.getObj(),i.gen=a.getObj();var j=a.getObj();A(j,"f")?i.free=!0:A(j,"n")&&(i.uncompressed=!0),w(i.offset)&&w(i.gen)&&(i.free||i.uncompressed)||c("Invalid entry in XRef subsection: "+f+", "+g),this.entries[h+f]||(this.entries[h+f]=i)}d.entryNum=0,d.streamPos=b.pos,d.parserBuf1=a.buf1,d.parserBuf2=a.buf2,delete d.firstEntryNum,delete d.entryCount}return 1===f&&this.entries[1]&&this.entries[1].free&&this.entries.shift(),this.entries[0]&&!this.entries[0].free&&c("Invalid XRef table: unexpected first object"),e},processXRefStream:function(a){if(!("streamState"in this)){var b=a.dict,c=b.get("W"),d=b.get("Index");d||(d=[0,b.get("Size")]),this.streamState={entryRanges:d,byteWidths:c,entryNum:0,streamPos:a.pos}}return this.readXRefStream(a),delete this.streamState,a.dict},readXRefStream:function(a){var b,d,e=this.streamState;a.pos=e.streamPos;for(var f=e.byteWidths,g=f[0],h=f[1],i=f[2],j=e.entryRanges;j.length>0;){var k=j[0],l=j[1];for(w(k)&&w(l)||c("Invalid XRef range fields: "+k+", "+l),w(g)&&w(h)&&w(i)||c("Invalid XRef entry fields length: "+k+", "+l),b=e.entryNum;l>b;++b){e.entryNum=b,e.streamPos=a.pos;var m=0,n=0,o=0;for(d=0;g>d;++d)m=m<<8|a.getByte();for(0===g&&(m=1),d=0;h>d;++d)n=n<<8|a.getByte();for(d=0;i>d;++d)o=o<<8|a.getByte();var p={};switch(p.offset=n,p.gen=o,m){case 0:p.free=!0;break;case 1:p.uncompressed=!0;break;case 2:break;default:c("Invalid XRef entry type: "+m)}this.entries[k+b]||(this.entries[k+b]=p)}e.entryNum=0,e.streamPos=a.pos,j.splice(0,2)}},indexObjects:function(){function a(a,b){for(var c="",f=a[b];f!==d&&f!==e&&f!==h&&!(++b>=a.length);)c+=String.fromCharCode(f),f=a[b];return c}function b(a,b,c){for(var d=c.length,e=a.length,f=0;e>b;){for(var g=0;d>g&&a[b+g]===c[g];)++g;if(g>=d)break;b++,f++}return f}var c=9,d=10,e=13,f=32,g=37,h=60,i=/^(\d+)\s+(\d+)\s+obj\b/,j=new Uint8Array([116,114,97,105,108,101,114]),k=new Uint8Array([115,116,97,114,116,120,114,101,102]),l=new Uint8Array([101,110,100,111,98,106]),m=new Uint8Array([47,88,82,101,102]);this.entries.length=0;var n=this.stream;n.pos=0;for(var o=n.getBytes(),p=n.start,q=o.length,r=[],s=[];q>p;){var t=o[p];if(t!==c&&t!==d&&t!==e&&t!==f)if(t!==g){var u,v=a(o,p);if(0!==v.indexOf("xref")||4!==v.length&&!/\s/.test(v[4]))if(u=i.exec(v)){"undefined"==typeof this.entries[u[1]]&&(this.entries[u[1]]={offset:p-n.start,gen:0|u[2],uncompressed:!0});var w=b(o,p,l)+7,x=o.subarray(p,p+w),y=b(x,0,m);w>y&&x[y+5]<64&&(s.push(p-n.start),this.xrefstms[p-n.start]=1),p+=w}else 0!==v.indexOf("trailer")||7!==v.length&&!/\s/.test(v[7])?p+=v.length+1:(r.push(p),p+=b(o,p,k));else p+=b(o,p,j),r.push(p),p+=b(o,p,k)}else do{if(++p,p>=q)break;t=o[p]}while(t!==d&&t!==e);else++p}var z,C;for(z=0,C=s.length;C>z;++z)this.startXRefQueue.push(s[z]),this.readXRef(!0);var D;for(z=0,C=r.length;C>z;++z){n.pos=r[z];var E=new Fc(new Gc(n),!0,this),F=E.getObj();if(A(F,"trailer")&&B(D=E.getObj())&&D.has("ID"))return D}if(D)return D;throw new fa("Invalid PDF structure")},readXRef:function(b){var d=this.stream;try{for(;this.startXRefQueue.length;){var e=this.startXRefQueue[0];d.pos=e+d.start;var f,g=new Fc(new Gc(d),!0,this),h=g.getObj();if(A(h,"xref")){if(f=this.processXRefTable(g),this.topDict||(this.topDict=f),h=f.get("XRefStm"),w(h)){var i=h;i in this.xrefstms||(this.xrefstms[i]=1,this.startXRefQueue.push(i))}}else w(h)?(w(g.getObj())&&A(g.getObj(),"obj")&&D(h=g.getObj())||c("Invalid XRef stream"),f=this.processXRefStream(h),this.topDict||(this.topDict=f),f||c("Failed to read XRef stream")):c("Invalid XRef stream header");h=f.get("Prev"),w(h)?this.startXRefQueue.push(h):F(h)&&this.startXRefQueue.push(h.num),this.startXRefQueue.shift()}return this.topDict}catch(j){if(j instanceof ja)throw j;a("(while reading XRef): "+j)}if(!b)throw new ka},getEntry:function(a){var b=this.entries[a];return b&&!b.free&&b.offset?b:null},fetchIfRef:function(a){return F(a)?this.fetch(a):a},fetch:function(a,b){e(F(a),"ref object is not a reference");var c=a.num;if(c in this.cache){var d=this.cache[c];return d}var f=this.getEntry(c);return null===f?this.cache[c]=null:(f=f.uncompressed?this.fetchUncompressed(a,f,b):this.fetchCompressed(f,b),B(f)?f.objId=a.toString():D(f)&&(f.dict.objId=a.toString()),f)},fetchUncompressed:function(a,b,d){var e=a.gen,f=a.num;b.gen!==e&&c("inconsistent generation in XRef");var g=this.stream.makeSubStream(b.offset+this.stream.start),h=new Fc(new Gc(g),!0,this),i=h.getObj(),j=h.getObj(),k=h.getObj();if(w(i)&&parseInt(i,10)===f&&w(j)&&parseInt(j,10)===e&&A(k)||c("bad XRef entry"),!A(k,"obj")){if(0===k.cmd.indexOf("obj")&&(f=parseInt(k.cmd.substring(3),10),!isNaN(f)))return f;c("bad XRef entry")}return b=this.encrypt&&!d?h.getObj(this.encrypt.createCipherTransform(f,e)):h.getObj(),D(b)||(this.cache[f]=b),b},fetchCompressed:function(a,b){var d=a.offset,e=this.fetch(new Ba(d,0));D(e)||c("bad ObjStm stream");var f=e.dict.get("First"),g=e.dict.get("N");w(f)&&w(g)||c("invalid first and n parameters for ObjStm stream");var h=new Fc(new Gc(e),!1,this);h.allowStreams=!0;var i,j,k=[],l=[];for(i=0;g>i;++i){j=h.getObj(),w(j)||c("invalid object number in the ObjStm stream: "+j),l.push(j);var m=h.getObj();w(m)||c("invalid object offset in the ObjStm stream: "+m)}for(i=0;g>i;++i){k.push(h.getObj()),j=l[i];var n=this.entries[j];n&&n.offset===d&&n.gen===i&&(this.cache[j]=k[i])}return a=k[a.gen],void 0===a&&c("bad XRef entry for compressed object"),a},fetchIfRefAsync:function(a){return F(a)?this.fetchAsync(a):Promise.resolve(a)},fetchAsync:function(a,b){var c=this.stream.manager,d=this;return new Promise(function e(f,g){try{f(d.fetch(a,b))}catch(h){if(h instanceof ja)return void c.requestRange(h.begin,h.end).then(function(){e(f,g)},g);g(h)}})},getCatalogObj:function(){return this.root}},d}(),Ga=function(){function a(a,b){this.root=a,this.xref=b}return a.prototype={getAll:function(){var a={};if(!this.root)return a;var b=this.xref,d=new Ca;d.put(this.root);for(var e=[this.root];e.length>0;){var f,g,h=b.fetchIfRef(e.shift());if(B(h))if(h.has("Kids")){var i=h.get("Kids");for(f=0,g=i.length;g>f;f++){var j=i[f];d.has(j)&&c("invalid destinations"),e.push(j),d.put(j)}}else{var k=h.get("Names");if(k)for(f=0,g=k.length;g>f;f+=2)a[b.fetchIfRef(k[f])]=b.fetchIfRef(k[f+1])}}return a},get:function(a){if(!this.root)return null;for(var c,d,e,f=this.xref,g=f.fetchIfRef(this.root),h=0,i=10;g.has("Kids");){if(h++,h>i)return b("Search depth limit for named destionations has been reached."),null;var j=g.get("Kids");if(!C(j))return null;for(c=0,d=j.length-1;d>=c;){e=c+d>>1;var k=f.fetchIfRef(j[e]),l=k.get("Limits");if(af.fetchIfRef(l[1]))){g=f.fetchIfRef(j[e]);break}c=e+1}}if(c>d)return null}var m=g.get("Names");if(C(m))for(c=0,d=m.length-2;d>=c;)if(e=c+d&-2,af.fetchIfRef(m[e])))return f.fetchIfRef(m[e+1]);c=e+2}return null}},a}(),Ha=function(){function a(a,c){a&&B(a)&&(this.xref=c,this.root=a,a.has("FS")&&(this.fs=a.get("FS")),this.description=a.has("Desc")?r(a.get("Desc")):"",a.has("RF")&&b("Related file specifications are not supported"),this.contentAvailable=!0,a.has("EF")||(this.contentAvailable=!1,b("Non-embedded file specifications are not supported")))}function c(a){return a.has("UF")?a.get("UF"):a.has("F")?a.get("F"):a.has("Unix")?a.get("Unix"):a.has("Mac")?a.get("Mac"):a.has("DOS")?a.get("DOS"):null}return a.prototype={get filename(){if(!this._filename&&this.root){var a=c(this.root)||"unnamed";this._filename=r(a).replace(/\\\\/g,"\\").replace(/\\\//g,"/").replace(/\\/g,"/")}return this._filename},get content(){if(!this.contentAvailable)return null;!this.contentRef&&this.root&&(this.contentRef=c(this.root.get("EF")));var a=null;if(this.contentRef){var d=this.xref,e=d.fetchIfRef(this.contentRef);e&&D(e)?a=e.getBytes():b("Embedded file specification points to non-existing/invalid content")}else b("Embedded file specification does not have a content");return a},get serializable(){return{filename:this.filename,content:this.content}}},a}(),Ia=function(){function a(a){return F(a)||B(a)||C(a)||D(a)}function b(b,c){var d;if(B(b)||D(b)){var e;e=B(b)?b.map:b.dict.map;for(var f in e)d=e[f],a(d)&&c.push(d)}else if(C(b))for(var g=0,h=b.length;h>g;g++)d=b[g],a(d)&&c.push(d)}function c(a,b,c){this.obj=a,this.keys=b,this.xref=c,this.refSet=null,this.capability=null}return c.prototype={load:function(){var a=this.keys;if(this.capability=G(),!(this.xref.stream instanceof qa)||0===this.xref.stream.getMissingChunks().length)return this.capability.resolve(),this.capability.promise;this.refSet=new Ca;for(var b=[],c=0;c=3&&(this.borderStyle.setHorizontalCornerRadius(d[0]),this.borderStyle.setVerticalCornerRadius(d[1]),this.borderStyle.setWidth(d[2]),4===d.length&&this.borderStyle.setDashArray(d[3]))}else this.borderStyle.setWidth(0)},isInvisible:function(){var a=this.data;return!!(a&&a.annotationFlags&&1&a.annotationFlags)},isViewable:function(){var a=this.data;return!(this.isInvisible()||!a||a.annotationFlags&&34&a.annotationFlags||!a.rect)},isPrintable:function(){var a=this.data;return!(!(!this.isInvisible()&&a&&a.annotationFlags&&4&a.annotationFlags)||2&a.annotationFlags||!a.rect)},loadResources:function(a){return new Promise(function(b,c){this.appearance.dict.getAsync("Resources").then(function(d){if(!d)return void b();var e=new Ia(d.map,a,d.xref);e.load().then(function(){b(d)},c)},c)}.bind(this))},getOperatorList:function(b,c){if(!this.appearance)return Promise.resolve(new xb);var d=this.data,e=this.appearance.dict,f=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),g=e.get("BBox")||[0,0,1,1],h=e.get("Matrix")||[1,0,0,1,0,0],i=a(d.rect,g,h),j=this;return f.then(function(a){var e=new xb;return e.addOp($.beginAnnotation,[d.rect,i,h]),b.getOperatorList(j.appearance,c,a,e).then(function(){return e.addOp($.endAnnotation,[]),j.appearance.reset(),e})})}},c.appendToOperatorList=function(a,b,c,d,e,f){function g(a){h.reject(a)}for(var h=G(),i=[],j=0,k=a.length;k>j;++j)("display"===f&&a[j].isViewable()||"print"===f&&a[j].isPrintable())&&i.push(a[j].getOperatorList(d,e));return Promise.all(i).then(function(a){b.addOp($.beginAnnotations,[]);for(var c=0,d=a.length;d>c;++c){var e=a[c];b.addOpList(e)}b.addOp($.endAnnotations,[]),h.resolve()},g),h.promise},c}(),Oa=function(){function a(){this.width=1,this.style=X.SOLID,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}return a.prototype={setWidth:function(a){a===(0|a)&&(this.width=a)},setStyle:function(a){if(a)switch(a.name){case"S":this.style=X.SOLID;break;case"D":this.style=X.DASHED;break;case"B":this.style=X.BEVELED;break;case"I":this.style=X.INSET;break;case"U":this.style=X.UNDERLINE}},setDashArray:function(a){if(C(a)&&a.length>0){for(var b=!0,c=!0,d=0,e=a.length;e>d;d++){var f=a[d],g=+f>=0;if(!g){b=!1;break}f>0&&(c=!1)}b&&!c?this.dashArray=a:this.width=0}else a&&(this.width=0)},setHorizontalCornerRadius:function(a){a===(0|a)&&(this.horizontalCornerRadius=a)},setVerticalCornerRadius:function(a){a===(0|a)&&(this.verticalCornerRadius=a)}},a}(),Pa=function(){function a(a){Na.call(this,a);var b=a.dict,c=this.data;c.fieldValue=r(na.getInheritableProperty(b,"V")||""),c.alternativeText=r(b.get("TU")||""),c.defaultAppearance=na.getInheritableProperty(b,"DA")||"";var d=na.getInheritableProperty(b,"FT");c.fieldType=z(d)?d.name:"",c.fieldFlags=na.getInheritableProperty(b,"Ff")||0,this.fieldResources=na.getInheritableProperty(b,"DR")||Aa.empty;for(var e=[],f=b,g=a.ref;f;){var h=f.get("Parent"),i=f.getRaw("Parent"),j=f.get("T");if(j)e.unshift(r(j));else if(h&&g){var k,l,m=h.get("Kids");for(k=0,l=m.length;l>k;k++){var n=m[k];if(n.num===g.num&&n.gen===g.gen)break}e.unshift("`"+k)}f=h,g=i}c.fullName=e.join(".")}var c=Na.prototype;return na.inherit(a,Na,{isViewable:function(){return"Sig"===this.data.fieldType?(b("unimplemented annotation type: Widget signature"),!1):c.isViewable.call(this)}}),a}(),Qa=function(){function a(a){Pa.call(this,a),this.data.textAlignment=na.getInheritableProperty(a.dict,"Q"),this.data.annotationType=W.WIDGET,this.data.hasHtml=!this.data.hasAppearance&&!!this.data.fieldValue}return na.inherit(a,Pa,{getOperatorList:function(a,b){if(this.appearance)return Na.prototype.getOperatorList.call(this,a,b);var c=new xb,d=this.data;if(!d.defaultAppearance)return Promise.resolve(c);var e=new Mc(j(d.defaultAppearance));return a.getOperatorList(e,b,this.fieldResources,c).then(function(){return c})}}),a}(),Ra=function(){function a(a){Na.call(this,a);var b=a.dict,c=this.data,d=b.get("Contents"),e=b.get("T");c.annotationType=W.TEXT,c.content=r(d||""),c.title=r(e||""),c.hasHtml=!0,c.hasAppearance?c.name="NoIcon":(c.rect[1]=c.rect[3]-Ma,c.rect[2]=c.rect[0]+Ma,c.name=b.has("Name")?b.get("Name").name:"Note"),b.has("C")&&(c.hasBgColor=!0)}return na.inherit(a,Na,{}),a}(),Sa=function(){function a(a){Na.call(this,a);var d=a.dict,e=this.data;e.annotationType=W.LINK,e.hasHtml=!0;var g=d.get("A");if(g&&B(g)){var h=g.get("S").name;if("URI"===h){var i=g.get("URI");z(i)?i="/"+i.name:i&&(i=c(i)),f(i,!1)||(i="");try{e.url=s(i)}catch(j){e.url=i}}else if("GoTo"===h)e.dest=g.get("D");else if("GoToR"===h){var k=g.get("F");B(k)&&(i=k.get("F")||""),f(i,!1)||(i=""),e.url=i,e.dest=g.get("D")}else"Named"===h?e.action=g.get("N").name:b("unrecognized link type: "+h)}else if(d.has("Dest")){var l=d.get("Dest");e.dest=z(l)?l.name:l}}function c(a){return a&&0===a.indexOf("www.")?"http://"+a:a}return na.inherit(a,Na,{}),a}(),Ta=function(){var b=0,d=2,e=3,f=4;return{getSampleArray:function(a,b,c,d){var e,f,g=1;for(e=0,f=a.length;f>e;e++)g*=a[e];g*=b;var h=new Array(g),i=0,j=0,k=1/(Math.pow(2,c)-1),l=d.getBytes((g*c+7)/8),m=0;for(e=0;g>e;e++){for(;c>i;)j<<=8,j|=l[m++],i+=8;i-=c,h[e]=(j>>i)*k,j&=(1<d;d++){var f=a.fetchIfRef(b[d]);c.push(Ta.parse(a,f))}return function(a,b,d,e){for(var f=0,g=c.length;g>f;f++)c[f](a,b,d,e+f)}},constructSampled:function(d,e){function f(a){for(var b=a.length,c=[],d=0,e=0;b>e;e+=2)c[d]=[a[e],a[e+1]],++d;return c}var g=e.get("Domain"),h=e.get("Range");g&&h||c("No domain or range");var i=g.length/2,j=h.length/2;g=f(g),h=f(h);var k=e.get("Size"),l=e.get("BitsPerSample"),m=e.get("Order")||1;1!==m&&a("No support for cubic spline interpolation: "+m);var n=e.get("Encode");if(!n){n=[];for(var o=0;i>o;++o)n.push(0),n.push(k[o]-1)}n=f(n);var p=e.get("Decode");p=p?f(p):h;var q=this.getSampleArray(k,j,l,d);return[b,i,g,n,p,q,k,j,Math.pow(2,l)-1,h]},constructSampledFromIR:function(a){function b(a,b,c,d,e){return d+(a-b)*((e-d)/(c-b))}return function(c,d,e,f){var g,h,i=a[1],j=a[2],k=a[3],l=a[4],m=a[5],n=a[6],o=a[7],p=a[9],q=1<h;h++)r[h]=1;var t=o,u=1;for(g=0;i>g;++g){var v=j[g][0],w=j[g][1],x=Math.min(Math.max(c[d+g],v),w),y=b(x,v,w,k[g][0],k[g][1]),z=n[g];y=Math.min(Math.max(y,0),z-1);var A=z-1>y?Math.floor(y):y-1,B=A+1-y,C=y-A,D=A*t,E=D+t;for(h=0;q>h;h++)h&u?(r[h]*=C,s[h]+=E):(r[h]*=B,s[h]+=D);t*=z,u<<=1}for(h=0;o>h;++h){var F=0;for(g=0;q>g;g++)F+=m[s[g]+h]*r[g];F=b(F,0,1,l[h][0],l[h][1]),e[f+h]=Math.min(Math.max(F,p[h][0]),p[h][1])}}},constructInterpolated:function(a,b){var e=b.get("C0")||[0],f=b.get("C1")||[1],g=b.get("N");C(e)&&C(f)||c("Illegal dictionary for interpolated function");for(var h=e.length,i=[],j=0;h>j;++j)i.push(f[j]-e[j]);return[d,e,i,g]},constructInterpolatedFromIR:function(a){ +var b=a[1],c=a[2],d=a[3],e=c.length;return function(a,f,g,h){for(var i=1===d?a[f]:Math.pow(a[f],d),j=0;e>j;++j)g[h+j]=b[j]+i*c[j]}},constructStiched:function(a,b,d){var f=b.get("Domain");f||c("No domain");var g=f.length/2;1!==g&&c("Bad domain for stiched function");for(var h=b.get("Functions"),i=[],j=0,k=h.length;k>j;++j)i.push(Ta.getIR(d,d.fetchIfRef(h[j])));var l=b.get("Bounds"),m=b.get("Encode");return[e,f,l,m,i]},constructStichedFromIR:function(a){for(var b=a[1],c=a[2],d=a[3],e=a[4],f=[],g=new Float32Array(1),h=0,i=e.length;i>h;h++)f.push(Ta.fromIR(e[h]));return function(a,e,h,i){for(var j=function(a,b,c){return a>c?a=c:b>a&&(a=b),a},k=j(a[e],b[0],b[1]),l=0,m=c.length;m>l&&!(k0&&(n=c[l-1]);var o=b[1];l>1,h=c.length>>1,i=new Va(e),j={},k=8192,l=k,m=new Float32Array(h);return function(a,b,c,e){var f,k,n="",o=m;for(f=0;h>f;f++)k=a[b+f],o[f]=k,n+=k+"_";var p=j[n];if(void 0!==p)return void c.set(p,e);var q=new Float32Array(g),r=i.execute(o),s=r.length-g;for(f=0;g>f;f++){k=r[s+f];var t=d[2*f];t>k?k=t:(t=d[2*f+1],k>t&&(k=t)),q[f]=k}l>0&&(l--,j[n]=q),c.set(q,e)}}}}(),Ua=function(){function a(a){this.stack=a?Array.prototype.slice.call(a,0):[]}var b=100;return a.prototype={push:function(a){this.stack.length>=b&&c("PostScript function stack overflow."),this.stack.push(a)},pop:function(){return this.stack.length<=0&&c("PostScript function stack underflow."),this.stack.pop()},copy:function(a){this.stack.length+a>=b&&c("PostScript function stack overflow.");for(var d=this.stack,e=d.length-a,f=a-1;f>=0;f--,e++)d.push(d[e])},index:function(a){this.push(this.stack[this.stack.length-a-1])},roll:function(a,b){var c,d,e,f=this.stack,g=f.length-a,h=f.length-1,i=g+(b-Math.floor(b/a)*a);for(c=g,d=h;d>c;c++,d--)e=f[c],f[c]=f[d],f[d]=e;for(c=g,d=i-1;d>c;c++,d--)e=f[c],f[c]=f[d],f[d]=e;for(c=i,d=h;d>c;c++,d--)e=f[c],f[c]=f[d],f[d]=e}},a}(),Va=function(){function a(a){this.operators=a}return a.prototype={execute:function(a){for(var b,d,e,f=new Ua(a),g=0,h=this.operators,i=h.length;i>g;)if(b=h[g++],"number"!=typeof b)switch(b){case"jz":e=f.pop(),d=f.pop(),d||(g=e);break;case"j":d=f.pop(),g=d;break;case"abs":d=f.pop(),f.push(Math.abs(d));break;case"add":e=f.pop(),d=f.pop(),f.push(d+e);break;case"and":e=f.pop(),d=f.pop(),v(d)&&v(e)?f.push(d&&e):f.push(d&e);break;case"atan":d=f.pop(),f.push(Math.atan(d));break;case"bitshift":e=f.pop(),d=f.pop(),d>0?f.push(d<>e);break;case"ceiling":d=f.pop(),f.push(Math.ceil(d));break;case"copy":d=f.pop(),f.copy(d);break;case"cos":d=f.pop(),f.push(Math.cos(d));break;case"cvi":d=0|f.pop(),f.push(d);break;case"cvr":break;case"div":e=f.pop(),d=f.pop(),f.push(d/e);break;case"dup":f.copy(1);break;case"eq":e=f.pop(),d=f.pop(),f.push(d===e);break;case"exch":f.roll(2,1);break;case"exp":e=f.pop(),d=f.pop(),f.push(Math.pow(d,e));break;case"false":f.push(!1);break;case"floor":d=f.pop(),f.push(Math.floor(d));break;case"ge":e=f.pop(),d=f.pop(),f.push(d>=e);break;case"gt":e=f.pop(),d=f.pop(),f.push(d>e);break;case"idiv":e=f.pop(),d=f.pop(),f.push(d/e|0);break;case"index":d=f.pop(),f.index(d);break;case"le":e=f.pop(),d=f.pop(),f.push(e>=d);break;case"ln":d=f.pop(),f.push(Math.log(d));break;case"log":d=f.pop(),f.push(Math.log(d)/Math.LN10);break;case"lt":e=f.pop(),d=f.pop(),f.push(e>d);break;case"mod":e=f.pop(),d=f.pop(),f.push(d%e);break;case"mul":e=f.pop(),d=f.pop(),f.push(d*e);break;case"ne":e=f.pop(),d=f.pop(),f.push(d!==e);break;case"neg":d=f.pop(),f.push(-d);break;case"not":d=f.pop(),v(d)?f.push(!d):f.push(~d);break;case"or":e=f.pop(),d=f.pop(),v(d)&&v(e)?f.push(d||e):f.push(d|e);break;case"pop":f.pop();break;case"roll":e=f.pop(),d=f.pop(),f.roll(d,e);break;case"round":d=f.pop(),f.push(Math.round(d));break;case"sin":d=f.pop(),f.push(Math.sin(d));break;case"sqrt":d=f.pop(),f.push(Math.sqrt(d));break;case"sub":e=f.pop(),d=f.pop(),f.push(d-e);break;case"true":f.push(!0);break;case"truncate":d=f.pop(),d=0>d?Math.ceil(d):Math.floor(d),f.push(d);break;case"xor":e=f.pop(),d=f.pop(),v(d)&&v(e)?f.push(d!==e):f.push(d^e);break;default:c("Unknown operator "+b)}else f.push(b);return f.stack}},a}(),Wa=function(){function a(a){this.type=a}function b(b,c,d){a.call(this,"args"),this.index=b,this.min=c,this.max=d}function c(b){a.call(this,"literal"),this.number=b,this.min=b,this.max=b}function d(b,c,d,e,f){a.call(this,"binary"),this.op=b,this.arg1=c,this.arg2=d,this.min=e,this.max=f}function e(b,c){a.call(this,"max"),this.arg=b,this.min=b.min,this.max=c}function f(b,c,d){a.call(this,"var"),this.index=b,this.min=c,this.max=d}function g(b,c){a.call(this,"definition"),this.variable=b,this.arg=c}function h(){this.parts=[]}function i(a,b){return"literal"===b.type&&0===b.number?a:"literal"===a.type&&0===a.number?b:"literal"===b.type&&"literal"===a.type?new c(a.number+b.number):new d("+",a,b,a.min+b.min,a.max+b.max)}function j(a,b){if("literal"===b.type){if(0===b.number)return new c(0);if(1===b.number)return a;if("literal"===a.type)return new c(a.number*b.number)}if("literal"===a.type){if(0===a.number)return new c(0);if(1===a.number)return b}var e=Math.min(a.min*b.min,a.min*b.max,a.max*b.min,a.max*b.max),f=Math.max(a.min*b.min,a.min*b.max,a.max*b.min,a.max*b.max);return new d("*",a,b,e,f)}function k(a,b){if("literal"===b.type){if(0===b.number)return a;if("literal"===a.type)return new c(a.number-b.number)}return"binary"===b.type&&"-"===b.op&&"literal"===a.type&&1===a.number&&"literal"===b.arg1.type&&1===b.arg1.number?b.arg2:new d("-",a,b,a.min-b.max,a.max-b.min)}function l(a,b){return a.min>=b?new c(b):a.max<=b?a:new e(a,b)}function m(){}return a.prototype.visit=function(a){throw new Error("abstract method")},b.prototype=Object.create(a.prototype),b.prototype.visit=function(a){a.visitArgument(this)},c.prototype=Object.create(a.prototype),c.prototype.visit=function(a){a.visitLiteral(this)},d.prototype=Object.create(a.prototype),d.prototype.visit=function(a){a.visitBinaryOperation(this)},e.prototype=Object.create(a.prototype),e.prototype.visit=function(a){a.visitMin(this)},f.prototype=Object.create(a.prototype),f.prototype.visit=function(a){a.visitVariable(this)},g.prototype=Object.create(a.prototype),g.prototype.visit=function(a){a.visitVariableDefinition(this)},h.prototype={visitArgument:function(a){this.parts.push("Math.max(",a.min,", Math.min(",a.max,", src[srcOffset + ",a.index,"]))")},visitVariable:function(a){this.parts.push("v",a.index)},visitLiteral:function(a){this.parts.push(a.number)},visitBinaryOperation:function(a){this.parts.push("("),a.arg1.visit(this),this.parts.push(" ",a.op," "),a.arg2.visit(this),this.parts.push(")")},visitVariableDefinition:function(a){this.parts.push("var "),a.variable.visit(this),this.parts.push(" = "),a.arg.visit(this),this.parts.push(";")},visitMin:function(a){this.parts.push("Math.min("),a.arg.visit(this),this.parts.push(", ",a.max,")")},toString:function(){return this.parts.join("")}},m.prototype={compile:function(a,d,e){var m,n,o,p,q,r,s,t,u,v,w=[],x=[],y=d.length>>1,z=e.length>>1,A=0;for(m=0;y>m;m++)w.push(new b(m,d[2*m],d[2*m+1]));for(m=0,n=a.length;n>m;m++)if(v=a[m],"number"!=typeof v)switch(v){case"add":if(w.length<2)return null;r=w.pop(),q=w.pop(),w.push(i(q,r));break;case"cvr":if(w.length<1)return null;break;case"mul":if(w.length<2)return null;r=w.pop(),q=w.pop(),w.push(j(q,r));break;case"sub":if(w.length<2)return null;r=w.pop(),q=w.pop(),w.push(k(q,r));break;case"exch":if(w.length<2)return null;s=w.pop(),t=w.pop(),w.push(s,t);break;case"pop":if(w.length<1)return null;w.pop();break;case"index":if(w.length<1)return null;if(q=w.pop(),"literal"!==q.type)return null;if(o=q.number,0>o||(0|o)!==o||w.length=o||(0|o)!==o||(0|p)!==p||w.lengtha.min&&(g.unshift("Math.max(",d,", "),g.push(")")),fn&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){var p,q=8>=g?new Uint8Array(n):new Uint16Array(n);for(j=0;n>j;j++)q[j]=j;var r=new Uint8Array(3*n);this.getRgbBuffer(q,0,n,r,0,g,0);var s,t;if(o)for(m=new Uint8Array(3*l),t=0,j=0;l>j;++j)p=3*h[j],m[t++]=r[p],m[t++]=r[p+1],m[t++]=r[p+2];else for(s=0,j=0;l>j;++j)p=3*h[j],a[s++]=r[p],a[s++]=r[p+1],a[s++]=r[p+2],s+=i}else o?(m=new Uint8Array(3*l),this.getRgbBuffer(h,0,l,m,0,g,0)):this.getRgbBuffer(h,0,d*f,a,0,g,i);if(m)if(o)Bc.resize(m,g,3,b,c,d,e,a,i);else for(t=0,s=0,j=0,k=d*f;k>j;j++)a[s++]=m[t++],a[s++]=m[t++],a[s++]=m[t++],s+=i},usesZeroToOneRange:!0},a.parse=function(b,c,d){var e=a.parseToIR(b,c,d);return e instanceof Ya?e:a.fromIR(e)},a.fromIR=function(b){var d,e,f,g=C(b)?b[0]:b;switch(g){case"DeviceGrayCS":return this.singletons.gray;case"DeviceRgbCS":return this.singletons.rgb;case"DeviceCmykCS":return this.singletons.cmyk;case"CalGrayCS":return d=b[1].WhitePoint,e=b[1].BlackPoint,f=b[1].Gamma,new cb(d,e,f);case"CalRGBCS":d=b[1].WhitePoint,e=b[1].BlackPoint,f=b[1].Gamma;var h=b[1].Matrix;return new db(d,e,f,h);case"PatternCS":var i=b[1];return i&&(i=a.fromIR(i)),new Za(i);case"IndexedCS":var j=b[1],k=b[2],l=b[3];return new $a(a.fromIR(j),k,l);case"AlternateCS":var m=b[1],n=b[2],o=b[3];return new Ya(m,a.fromIR(n),Ta.fromIR(o));case"LabCS":d=b[1].WhitePoint,e=b[1].BlackPoint;var p=b[1].Range;return new eb(d,e,p);default:c("Unknown name "+g)}return null},a.parseToIR=function(d,e,f){if(z(d)){var g=f.get("ColorSpace");if(B(g)){var h=g.get(d.name);h&&(d=h)}}d=e.fetchIfRef(d);var i;if(z(d))switch(i=d.name,this.mode=i,i){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"Pattern":return["PatternCS",null];default:c("unrecognized colorspace "+i)}else if(C(d)){i=e.fetchIfRef(d[0]).name,this.mode=i;var j,k,l;switch(i){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"CalGray":return k=e.fetchIfRef(d[1]).getAll(),["CalGrayCS",k];case"CalRGB":return k=e.fetchIfRef(d[1]).getAll(),["CalRGBCS",k];case"ICCBased":var m=e.fetchIfRef(d[1]),n=m.dict;if(j=n.get("N"),l=n.get("Alternate")){var o=a.parseToIR(l,e,f),p=a.fromIR(o);if(p.numComps===j)return o;b("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===j)return"DeviceGrayCS";if(3===j)return"DeviceRgbCS";if(4===j)return"DeviceCmykCS";break;case"Pattern":var q=d[1]||null;return q&&(q=a.parseToIR(q,e,f)),["PatternCS",q];case"Indexed":case"I":var r=a.parseToIR(d[1],e,f),s=e.fetchIfRef(d[2])+1,t=e.fetchIfRef(d[3]);return D(t)&&(t=t.getBytes()),["IndexedCS",r,s,t];case"Separation":case"DeviceN":var u=e.fetchIfRef(d[1]);j=1,z(u)?j=1:C(u)&&(j=u.length),l=a.parseToIR(d[2],e,f);var v=Ta.getIR(e,e.fetchIfRef(d[3]));return["AlternateCS",j,l,v];case"Lab":return k=e.fetchIfRef(d[1]).getAll(),["LabCS",k];default:c('unimplemented color space object "'+i+'"')}}else c('unrecognized color space object: "'+d+'"');return null},a.isDefaultDecode=function(a,c){if(!C(a))return!0;if(2*c!==a.length)return b("The decode map is not the correct length"),!0;for(var d=0,e=a.length;e>d;d+=2)if(0!==a[d]||1!==a[d+1])return!1;return!0},a.singletons={get gray(){return g(this,"gray",new _a)},get rgb(){return g(this,"rgb",new ab)},get cmyk(){return g(this,"cmyk",new bb)}},a}(),Ya=function(){function a(a,b,c){this.name="Alternate",this.numComps=a,this.defaultColor=new Float32Array(a);for(var d=0;a>d;++d)this.defaultColor[d]=1;this.base=b,this.tintFn=c,this.tmpBuf=new Float32Array(b.numComps)}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=this.tmpBuf;this.tintFn(a,b,e,0),this.base.getRgbItem(e,0,c,d)},getRgbBuffer:function(a,b,c,d,e,f,g){var h,i,j=this.tintFn,k=this.base,l=1/((1<h;h++){for(i=0;r>i;i++)s[i]=a[b++]*l;for(j(s,0,t,0),i=0;m>i;i++)q[p++]=255*t[i]}else for(h=0;c>h;h++){for(i=0;r>i;i++)s[i]=a[b++]*l;j(s,0,t,0),k.getRgbItem(t,0,q,p),p+=m}o||k.getRgbBuffer(q,0,c,d,e,8,g)},getOutputLength:function(a,b){return this.base.getOutputLength(a*this.base.numComps/this.numComps,b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},a}(),Za=function(){function a(a){this.name="Pattern",this.base=a}return a.prototype={},a}(),$a=function(){function a(a,b,d){this.name="Indexed",this.numComps=1,this.defaultColor=new Uint8Array([0]),this.base=a,this.highVal=b;var e,f=a.numComps,g=f*b;if(D(d)){e=new Uint8Array(g);var h=d.getBytes(g);e.set(h)}else if(y(d)){e=new Uint8Array(g);for(var i=0;g>i;++i)e[i]=d.charCodeAt(i)}else d instanceof Uint8Array||d instanceof Array?e=d:c("Unrecognized lookup table: "+d);this.lookup=e}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=this.base.numComps,f=a[b]*e;this.base.getRgbItem(this.lookup,f,c,d)},getRgbBuffer:function(a,b,c,d,e,f,g){for(var h=this.base,i=h.numComps,j=h.getOutputLength(i,g),k=this.lookup,l=0;c>l;++l){var m=a[b++]*i;h.getRgbBuffer(k,m,1,d,e,8,g),e+=j}},getOutputLength:function(a,b){return this.base.getOutputLength(a*this.base.numComps,b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return!0},usesZeroToOneRange:!0},a}(),_a=function(){function a(){this.name="DeviceGray",this.numComps=1,this.defaultColor=new Float32Array([0])}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=255*a[b]|0;e=0>e?0:e>255?255:e,c[d]=c[d+1]=c[d+2]=e},getRgbBuffer:function(a,b,c,d,e,f,g){for(var h=255/((1<k;++k){var l=h*a[i++]|0;d[j++]=l,d[j++]=l,d[j++]=l,j+=g}},getOutputLength:function(a,b){return a*(3+b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},a}(),ab=function(){function a(){this.name="DeviceRGB",this.numComps=3,this.defaultColor=new Float32Array([0,0,0])}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=255*a[b]|0,f=255*a[b+1]|0,g=255*a[b+2]|0;c[d]=0>e?0:e>255?255:e,c[d+1]=0>f?0:f>255?255:f,c[d+2]=0>g?0:g>255?255:g},getRgbBuffer:function(a,b,c,d,e,f,g){if(8===f&&0===g)return void d.set(a.subarray(b,b+3*c),e);for(var h=255/((1<k;++k)d[j++]=h*a[i++]|0,d[j++]=h*a[i++]|0,d[j++]=h*a[i++]|0,j+=g},getOutputLength:function(a,b){return a*(3+b)/3|0},isPassthrough:function(a){return 8===a},fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},a}(),bb=function(){function a(a,b,c,d,e){var f=a[b+0]*c,g=a[b+1]*c,h=a[b+2]*c,i=a[b+3]*c,j=f*(-4.387332384609988*f+54.48615194189176*g+18.82290502165302*h+212.25662451639585*i+-285.2331026137004)+g*(1.7149763477362134*g-5.6096736904047315*h+-17.873870861415444*i-5.497006427196366)+h*(-2.5217340131683033*h-21.248923337353073*i+17.5119270841813)+i*(-21.86122147463605*i-189.48180835922747)+255|0,k=f*(8.841041422036149*f+60.118027045597366*g+6.871425592049007*h+31.159100130055922*i+-79.2970844816548)+g*(-15.310361306967817*g+17.575251261109482*h+131.35250912493976*i-190.9453302588951)+h*(4.444339102852739*h+9.8632861493405*i-24.86741582555878)+i*(-20.737325471181034*i-187.80453709719578)+255|0,l=f*(.8842522430003296*f+8.078677503112928*g+30.89978309703729*h-.23883238689178934*i+-14.183576799673286)+g*(10.49593273432072*g+63.02378494754052*h+50.606957656360734*i-112.23884253719248)+h*(.03296041114873217*h+115.60384449646641*i+-193.58209356861505)+i*(-22.33816807309886*i-180.12613974708367)+255|0;d[e]=j>255?255:0>j?0:j,d[e+1]=k>255?255:0>k?0:k,d[e+2]=l>255?255:0>l?0:l}function b(){this.name="DeviceCMYK",this.numComps=4,this.defaultColor=new Float32Array([0,0,0,1])}return b.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(b,c,d,e){a(b,c,1,d,e)},getRgbBuffer:function(b,c,d,e,f,g,h){for(var i=1/((1<j;j++)a(b,c,i,e,f),c+=4,f+=3+h},getOutputLength:function(a,b){return a/4*(3+b)|0},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},b}(),cb=function(){function d(d,e,f){this.name="CalGray",this.numComps=1,this.defaultColor=new Float32Array([0]),d||c("WhitePoint missing - required for color space CalGray"),e=e||[0,0,0],f=f||1,this.XW=d[0],this.YW=d[1],this.ZW=d[2],this.XB=e[0],this.YB=e[1],this.ZB=e[2],this.G=f,(this.XW<0||this.ZW<0||1!==this.YW)&&c("Invalid WhitePoint components for "+this.name+", no fallback available"),(this.XB<0||this.YB<0||this.ZB<0)&&(a("Invalid BlackPoint for "+this.name+", falling back to default"),this.XB=this.YB=this.ZB=0),0===this.XB&&0===this.YB&&0===this.ZB||b(this.name+", BlackPoint: XB: "+this.XB+", YB: "+this.YB+", ZB: "+this.ZB+", only default values are supported."),this.G<1&&(a("Invalid Gamma: "+this.G+" for "+this.name+", falling back to default"),this.G=1)}function e(a,b,c,d,e,f){var g=b[c]*f,h=Math.pow(g,a.G),i=a.YW*h,j=0|Math.max(295.8*Math.pow(i,.3333333333333333)-40.8,0);d[e]=j,d[e+1]=j,d[e+2]=j}return d.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){e(this,a,b,c,d,1)},getRgbBuffer:function(a,b,c,d,f,g,h){for(var i=1/((1<j;++j)e(this,a,b,d,f,i),b+=1,f+=3+h},getOutputLength:function(a,b){return a*(3+b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},d}(),db=function(){function b(b,d,e,f){this.name="CalRGB",this.numComps=3,this.defaultColor=new Float32Array(3),b||c("WhitePoint missing - required for color space CalRGB"),d=d||new Float32Array(3),e=e||new Float32Array([1,1,1]),f=f||new Float32Array([1,0,0,0,1,0,0,0,1]);var g=b[0],h=b[1],i=b[2];this.whitePoint=b;var j=d[0],k=d[1],l=d[2];this.blackPoint=d,this.GR=e[0],this.GG=e[1],this.GB=e[2],this.MXA=f[0],this.MYA=f[1],this.MZA=f[2],this.MXB=f[3],this.MYB=f[4],this.MZB=f[5],this.MXC=f[6],this.MYC=f[7],this.MZC=f[8],(0>g||0>i||1!==h)&&c("Invalid WhitePoint components for "+this.name+", no fallback available"),(0>j||0>k||0>l)&&(a("Invalid BlackPoint for "+this.name+" ["+j+", "+k+", "+l+"], falling back to default"),this.blackPoint=new Float32Array(3)),(this.GR<0||this.GG<0||this.GB<0)&&(a("Invalid Gamma ["+this.GR+", "+this.GG+", "+this.GB+"] for "+this.name+", falling back to default"),this.GR=this.GG=this.GB=1),(this.MXA<0||this.MYA<0||this.MZA<0||this.MXB<0||this.MYB<0||this.MZB<0||this.MXC<0||this.MYC<0||this.MZC<0)&&(a("Invalid Matrix for "+this.name+" ["+this.MXA+", "+this.MYA+", "+this.MZA+this.MXB+", "+this.MYB+", "+this.MZB+this.MXC+", "+this.MYC+", "+this.MZC+"], falling back to default"),this.MXA=this.MYB=this.MZC=1,this.MXB=this.MYA=this.MZA=this.MXC=this.MYC=this.MZB=0)}function d(a,b,c){c[0]=a[0]*b[0]+a[1]*b[1]+a[2]*b[2],c[1]=a[3]*b[0]+a[4]*b[1]+a[5]*b[2],c[2]=a[6]*b[0]+a[7]*b[1]+a[8]*b[2]}function e(a,b,c){c[0]=1*b[0]/a[0],c[1]=1*b[1]/a[1],c[2]=1*b[2]/a[2]}function f(a,b,c){var d=.95047,e=1,f=1.08883;c[0]=b[0]*d/a[0],c[1]=b[1]*e/a[1],c[2]=b[2]*f/a[2]}function g(a){return.0031308>=a?h(0,1,12.92*a):h(0,1,1.055*Math.pow(a,1/2.4)-.055)}function h(a,b,c){return Math.max(a,Math.min(b,c))}function i(a){return 0>a?-i(-a):a>8?Math.pow((a+16)/116,3):a*u}function j(a,b,c){if(0===a[0]&&0===a[1]&&0===a[2])return c[0]=b[0],c[1]=b[1],void(c[2]=b[2]);var d=i(0),e=d,f=i(a[0]),g=d,h=i(a[1]),j=d,k=i(a[2]),l=(1-e)/(1-f),m=1-l,n=(1-g)/(1-h),o=1-n,p=(1-j)/(1-k),q=1-p;c[0]=b[0]*l+m,c[1]=b[1]*n+o,c[2]=b[2]*p+q}function k(a,b,c){if(1===a[0]&&1===a[2])return c[0]=b[0],c[1]=b[1],void(c[2]=b[2]);var f=c;d(n,b,f);var g=r;e(a,f,g),d(o,g,c)}function l(a,b,c){var e=c;d(n,b,e);var g=r;f(a,e,g),d(o,g,c)}function m(a,b,c,e,f,i){var m=h(0,1,b[c]*i),n=h(0,1,b[c+1]*i),o=h(0,1,b[c+2]*i),r=Math.pow(m,a.GR),u=Math.pow(n,a.GG),v=Math.pow(o,a.GB),w=a.MXA*r+a.MXB*u+a.MXC*v,x=a.MYA*r+a.MYB*u+a.MYC*v,y=a.MZA*r+a.MZB*u+a.MZC*v,z=s;z[0]=w,z[1]=x,z[2]=y;var A=t;k(a.whitePoint,z,A);var B=s;j(a.blackPoint,A,B);var C=t;l(q,B,C);var D=s;d(p,C,D);var E=g(D[0]),F=g(D[1]),G=g(D[2]);e[f]=Math.round(255*E),e[f+1]=Math.round(255*F),e[f+2]=Math.round(255*G)}var n=new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]),o=new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867]),p=new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252]),q=new Float32Array([1,1,1]),r=new Float32Array(3),s=new Float32Array(3),t=new Float32Array(3),u=Math.pow(24/116,3)/8;return b.prototype={getRgb:function(a,b){var c=new Uint8Array(3);return this.getRgbItem(a,b,c,0),c},getRgbItem:function(a,b,c,d){m(this,a,b,c,d,1)},getRgbBuffer:function(a,b,c,d,e,f,g){for(var h=1/((1<i;++i)m(this,a,b,d,e,h),b+=3,e+=3+g},getOutputLength:function(a,b){return a*(3+b)/3|0},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},b}(),eb=function(){function b(b,d,e){this.name="Lab",this.numComps=3,this.defaultColor=new Float32Array([0,0,0]),b||c("WhitePoint missing - required for color space Lab"),d=d||[0,0,0],e=e||[-100,100,-100,100],this.XW=b[0],this.YW=b[1],this.ZW=b[2],this.amin=e[0],this.amax=e[1],this.bmin=e[2],this.bmax=e[3],this.XB=d[0],this.YB=d[1],this.ZB=d[2],(this.XW<0||this.ZW<0||1!==this.YW)&&c("Invalid WhitePoint components, no fallback available"),(this.XB<0||this.YB<0||this.ZB<0)&&(a("Invalid BlackPoint, falling back to default"),this.XB=this.YB=this.ZB=0),(this.amin>this.amax||this.bmin>this.bmax)&&(a("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}function d(a){return a>=6/29?a*a*a:108/841*(a-4/29)}function e(a,b,c,d){return c+a*(d-c)/b}function f(a,b,c,f,g,h){var i=b[c],j=b[c+1],k=b[c+2];f!==!1&&(i=e(i,f,0,100),j=e(j,f,a.amin,a.amax),k=e(k,f,a.bmin,a.bmax)),j=j>a.amax?a.amax:ja.bmax?a.bmax:k=l?0:l>=1?255:255*Math.sqrt(l)|0,g[h+1]=0>=m?0:m>=1?255:255*Math.sqrt(m)|0,g[h+2]=0>=n?0:n>=1?255:255*Math.sqrt(n)|0}return b.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){f(this,a,b,!1,c,d)},getRgbBuffer:function(a,b,c,d,e,g,h){for(var i=(1<j;j++)f(this,a,b,i,d,e),b+=3,e+=3+h},getOutputLength:function(a,b){return a*(3+b)/3|0},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return!0},usesZeroToOneRange:!1},b}(),fb=function(){function a(a){this.a=0,this.b=0;var b,c,d=new Uint8Array(256),e=0,f=a.length;for(b=0;256>b;++b)d[b]=b;for(b=0;256>b;++b)c=d[b],e=e+c+a[b%f]&255,d[b]=d[e],d[e]=c;this.s=d}return a.prototype={encryptBlock:function(a){var b,c,d,e=a.length,f=this.a,g=this.b,h=this.s,i=new Uint8Array(e);for(b=0;e>b;++b)f=f+1&255,c=h[f],g=g+c&255,d=h[g],h[f]=d,h[g]=c,i[b]=a[b]^h[c+d&255];return this.a=f,this.b=g,i}},a.prototype.decryptBlock=a.prototype.encryptBlock,a}(),gb=function(){function a(a,d,e){var f,g,h,i=1732584193,j=-271733879,k=-1732584194,l=271733878,m=e+72&-64,n=new Uint8Array(m);for(f=0;e>f;++f)n[f]=a[d++];for(n[f++]=128,h=m-8;h>f;)n[f++]=0;n[f++]=e<<3&255,n[f++]=e>>5&255,n[f++]=e>>13&255,n[f++]=e>>21&255,n[f++]=e>>>29&255,n[f++]=0,n[f++]=0,n[f++]=0;var o=new Int32Array(16);for(f=0;m>f;){for(g=0;16>g;++g,f+=4)o[g]=n[f]|n[f+1]<<8|n[f+2]<<16|n[f+3]<<24;var p,q,r=i,s=j,t=k,u=l;for(g=0;64>g;++g){16>g?(p=s&t|~s&u,q=g):32>g?(p=u&s|~u&t,q=5*g+1&15):48>g?(p=s^t^u,q=3*g+5&15):(p=t^(s|~u),q=7*g&15);var v=u,w=r+p+c[g]+o[q]|0,x=b[g];u=t,t=s,s=s+(w<>>32-x)|0,r=v}i=i+r|0,j=j+s|0,k=k+t|0,l=l+u|0}return new Uint8Array([255&i,i>>8&255,i>>16&255,i>>>24&255,255&j,j>>8&255,j>>16&255,j>>>24&255,255&k,k>>8&255,k>>16&255,k>>>24&255,255&l,l>>8&255,l>>16&255,l>>>24&255])}var b=new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]),c=new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]);return a}(),hb=function(){function a(a,b){this.high=0|a,this.low=0|b}return a.prototype={and:function(a){this.high&=a.high,this.low&=a.low},xor:function(a){this.high^=a.high,this.low^=a.low},or:function(a){this.high|=a.high,this.low|=a.low},shiftRight:function(a){a>=32?(this.low=this.high>>>a-32|0,this.high=0):(this.low=this.low>>>a|this.high<<32-a,this.high=this.high>>>a|0)},shiftLeft:function(a){a>=32?(this.high=this.low<>>32-a,this.low=this.low<>>a|c<<32-a,this.high=c>>>a|b<<32-a},not:function(){this.high=~this.high,this.low=~this.low},add:function(a){var b=(this.low>>>0)+(a.low>>>0),c=(this.high>>>0)+(a.high>>>0);b>4294967295&&(c+=1),this.low=0|b,this.high=0|c},copyTo:function(a,b){a[b]=this.high>>>24&255,a[b+1]=this.high>>16&255,a[b+2]=this.high>>8&255,a[b+3]=255&this.high,a[b+4]=this.low>>>24&255,a[b+5]=this.low>>16&255,a[b+6]=this.low>>8&255,a[b+7]=255&this.low},assign:function(a){this.high=a.high,this.low=a.low}},a}(),ib=function(){function a(a,b){return a>>>b|a<<32-b}function b(a,b,c){return a&b^~a&c}function c(a,b,c){return a&b^a&c^b&c}function d(b){return a(b,2)^a(b,13)^a(b,22)}function e(b){return a(b,6)^a(b,11)^a(b,25)}function f(b){return a(b,7)^a(b,18)^b>>>3}function g(b){return a(b,17)^a(b,19)^b>>>10}function h(a,h,j){var k,l,m,n=1779033703,o=3144134277,p=1013904242,q=2773480762,r=1359893119,s=2600822924,t=528734635,u=1541459225,v=64*Math.ceil((j+9)/64),w=new Uint8Array(v);for(k=0;j>k;++k)w[k]=a[h++];for(w[k++]=128,m=v-8;m>k;)w[k++]=0;w[k++]=0,w[k++]=0,w[k++]=0,w[k++]=j>>>29&255,w[k++]=j>>21&255,w[k++]=j>>13&255,w[k++]=j>>5&255,w[k++]=j<<3&255;var x=new Uint32Array(64);for(k=0;v>k;){for(l=0;16>l;++l)x[l]=w[k]<<24|w[k+1]<<16|w[k+2]<<8|w[k+3],k+=4;for(l=16;64>l;++l)x[l]=g(x[l-2])+x[l-7]+f(x[l-15])+x[l-16]|0;var y,z,A=n,B=o,C=p,D=q,E=r,F=s,G=t,H=u;for(l=0;64>l;++l)y=H+e(E)+b(E,F,G)+i[l]+x[l],z=d(A)+c(A,B,C),H=G,G=F,F=E,E=D+y|0,D=C,C=B,B=A,A=y+z|0;n=n+A|0,o=o+B|0,p=p+C|0,q=q+D|0,r=r+E|0,s=s+F|0,t=t+G|0,u=u+H|0}return new Uint8Array([n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,p>>24&255,p>>16&255,p>>8&255,255&p,q>>24&255,q>>16&255,q>>8&255,255&q,r>>24&255,r>>16&255,r>>8&255,255&r,s>>24&255,s>>16&255,s>>8&255,255&s,t>>24&255,t>>16&255,t>>8&255,255&t,u>>24&255,u>>16&255,u>>8&255,255&u])}var i=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];return h}(),jb=function(){function a(a,b,c,d,e){a.assign(b),a.and(c),e.assign(b),e.not(),e.and(d),a.xor(e)}function b(a,b,c,d,e){a.assign(b),a.and(c),e.assign(b),e.and(d),a.xor(e),e.assign(c),e.and(d),a.xor(e)}function c(a,b,c){a.assign(b),a.rotateRight(28),c.assign(b),c.rotateRight(34),a.xor(c),c.assign(b),c.rotateRight(39),a.xor(c)}function d(a,b,c){a.assign(b),a.rotateRight(14),c.assign(b),c.rotateRight(18),a.xor(c),c.assign(b),c.rotateRight(41),a.xor(c)}function e(a,b,c){a.assign(b),a.rotateRight(1),c.assign(b),c.rotateRight(8),a.xor(c),c.assign(b),c.shiftRight(7),a.xor(c)}function f(a,b,c){a.assign(b),a.rotateRight(19),c.assign(b),c.rotateRight(61),a.xor(c),c.assign(b),c.shiftRight(6),a.xor(c)}function g(g,i,j,k){k=!!k;var l,m,n,o,p,q,r,s;k?(l=new hb(3418070365,3238371032),m=new hb(1654270250,914150663),n=new hb(2438529370,812702999),o=new hb(355462360,4144912697),p=new hb(1731405415,4290775857),q=new hb(2394180231,1750603025),r=new hb(3675008525,1694076839),s=new hb(1203062813,3204075428)):(l=new hb(1779033703,4089235720),m=new hb(3144134277,2227873595),n=new hb(1013904242,4271175723),o=new hb(2773480762,1595750129),p=new hb(1359893119,2917565137),q=new hb(2600822924,725511199),r=new hb(528734635,4215389547),s=new hb(1541459225,327033209));var t,u,v,w=128*Math.ceil((j+17)/128),x=new Uint8Array(w);for(t=0;j>t;++t)x[t]=g[i++];for(x[t++]=128,v=w-16;v>t;)x[t++]=0;x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=j>>>29&255,x[t++]=j>>21&255,x[t++]=j>>13&255,x[t++]=j>>5&255,x[t++]=j<<3&255;var y=new Array(80);for(t=0;80>t;t++)y[t]=new hb(0,0);var z,A=new hb(0,0),B=new hb(0,0),C=new hb(0,0),D=new hb(0,0),E=new hb(0,0),F=new hb(0,0),G=new hb(0,0),H=new hb(0,0),I=new hb(0,0),J=new hb(0,0),K=new hb(0,0),L=new hb(0,0); +for(t=0;w>t;){for(u=0;16>u;++u)y[u].high=x[t]<<24|x[t+1]<<16|x[t+2]<<8|x[t+3],y[u].low=x[t+4]<<24|x[t+5]<<16|x[t+6]<<8|x[t+7],t+=8;for(u=16;80>u;++u)z=y[u],f(z,y[u-2],L),z.add(y[u-7]),e(K,y[u-15],L),z.add(K),z.add(y[u-16]);for(A.assign(l),B.assign(m),C.assign(n),D.assign(o),E.assign(p),F.assign(q),G.assign(r),H.assign(s),u=0;80>u;++u)I.assign(H),d(K,E,L),I.add(K),a(K,E,F,G,L),I.add(K),I.add(h[u]),I.add(y[u]),c(J,A,L),b(K,A,B,C,L),J.add(K),z=H,H=G,G=F,F=E,D.add(I),E=D,D=C,C=B,B=A,z.assign(I),z.add(J),A=z;l.add(A),m.add(B),n.add(C),o.add(D),p.add(E),q.add(F),r.add(G),s.add(H)}var M;return k?(M=new Uint8Array(48),l.copyTo(M,0),m.copyTo(M,8),n.copyTo(M,16),o.copyTo(M,24),p.copyTo(M,32),q.copyTo(M,40)):(M=new Uint8Array(64),l.copyTo(M,0),m.copyTo(M,8),n.copyTo(M,16),o.copyTo(M,24),p.copyTo(M,32),q.copyTo(M,40),r.copyTo(M,48),s.copyTo(M,56)),M}var h=[new hb(1116352408,3609767458),new hb(1899447441,602891725),new hb(3049323471,3964484399),new hb(3921009573,2173295548),new hb(961987163,4081628472),new hb(1508970993,3053834265),new hb(2453635748,2937671579),new hb(2870763221,3664609560),new hb(3624381080,2734883394),new hb(310598401,1164996542),new hb(607225278,1323610764),new hb(1426881987,3590304994),new hb(1925078388,4068182383),new hb(2162078206,991336113),new hb(2614888103,633803317),new hb(3248222580,3479774868),new hb(3835390401,2666613458),new hb(4022224774,944711139),new hb(264347078,2341262773),new hb(604807628,2007800933),new hb(770255983,1495990901),new hb(1249150122,1856431235),new hb(1555081692,3175218132),new hb(1996064986,2198950837),new hb(2554220882,3999719339),new hb(2821834349,766784016),new hb(2952996808,2566594879),new hb(3210313671,3203337956),new hb(3336571891,1034457026),new hb(3584528711,2466948901),new hb(113926993,3758326383),new hb(338241895,168717936),new hb(666307205,1188179964),new hb(773529912,1546045734),new hb(1294757372,1522805485),new hb(1396182291,2643833823),new hb(1695183700,2343527390),new hb(1986661051,1014477480),new hb(2177026350,1206759142),new hb(2456956037,344077627),new hb(2730485921,1290863460),new hb(2820302411,3158454273),new hb(3259730800,3505952657),new hb(3345764771,106217008),new hb(3516065817,3606008344),new hb(3600352804,1432725776),new hb(4094571909,1467031594),new hb(275423344,851169720),new hb(430227734,3100823752),new hb(506948616,1363258195),new hb(659060556,3750685593),new hb(883997877,3785050280),new hb(958139571,3318307427),new hb(1322822218,3812723403),new hb(1537002063,2003034995),new hb(1747873779,3602036899),new hb(1955562222,1575990012),new hb(2024104815,1125592928),new hb(2227730452,2716904306),new hb(2361852424,442776044),new hb(2428436474,593698344),new hb(2756734187,3733110249),new hb(3204031479,2999351573),new hb(3329325298,3815920427),new hb(3391569614,3928383900),new hb(3515267271,566280711),new hb(3940187606,3454069534),new hb(4118630271,4000239992),new hb(116418474,1914138554),new hb(174292421,2731055270),new hb(289380356,3203993006),new hb(460393269,320620315),new hb(685471733,587496836),new hb(852142971,1086792851),new hb(1017036298,365543100),new hb(1126000580,2618297676),new hb(1288033470,3409855158),new hb(1501505948,4234509866),new hb(1607167915,987167468),new hb(1816402316,1246189591)];return g}(),kb=function(){function a(a,b,c){return jb(a,b,c,!0)}return a}(),lb=function(){function a(){}return a.prototype={decryptBlock:function(a){return a}},a}(),mb=function(){function a(a){var b=176,c=new Uint8Array(b);c.set(a);for(var d=16,e=1;b>d;++e){var h=c[d-3],i=c[d-2],j=c[d-1],k=c[d-4];h=g[h],i=g[i],j=g[j],k=g[k],h^=f[e];for(var l=0;4>l;++l)c[d]=h^=c[d-16],d++,c[d]=i^=c[d-16],d++,c[d]=j^=c[d-16],d++,c[d]=k^=c[d-16],d++}return c}function b(a,b){var c=new Uint8Array(16);c.set(a);var d,e,f,g,i,j;for(e=0,f=160;16>e;++e,++f)c[e]^=b[f];for(d=9;d>=1;--d){for(g=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=g,g=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=g,c[2]=i,g=c[15],i=c[11],j=c[7],c[15]=c[3],c[11]=g,c[7]=i,c[3]=j,e=0;16>e;++e)c[e]=h[c[e]];for(e=0,f=16*d;16>e;++e,++f)c[e]^=b[f];for(e=0;16>e;e+=4){var l=k[c[e]],m=k[c[e+1]],n=k[c[e+2]],o=k[c[e+3]];g=l^m>>>8^m<<24^n>>>16^n<<16^o>>>24^o<<8,c[e]=g>>>24&255,c[e+1]=g>>16&255,c[e+2]=g>>8&255,c[e+3]=255&g}}for(g=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=g,g=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=g,c[2]=i,g=c[15],i=c[11],j=c[7],c[15]=c[3],c[11]=g,c[7]=i,c[3]=j,e=0;16>e;++e)c[e]=h[c[e]],c[e]^=b[e];return c}function c(a,b){var c,d,e,f,h=new Uint8Array(16);for(h.set(a),k=0;16>k;++k)h[k]^=b[k];for(j=1;10>j;j++){for(k=0;16>k;++k)h[k]=g[h[k]];e=h[1],h[1]=h[5],h[5]=h[9],h[9]=h[13],h[13]=e,e=h[2],d=h[6],h[2]=h[10],h[6]=h[14],h[10]=e,h[14]=d,e=h[3],d=h[7],c=h[11],h[3]=h[15],h[7]=e,h[11]=d,h[15]=c;for(var k=0;16>k;k+=4){var l=h[k+0],m=h[k+1],n=h[k+2],o=h[k+3];c=l^m^n^o,h[k+0]^=c^i[l^m],h[k+1]^=c^i[m^n],h[k+2]^=c^i[n^o],h[k+3]^=c^i[o^l]}for(k=0,f=16*j;16>k;++k,++f)h[k]^=b[f]}for(k=0;16>k;++k)h[k]=g[h[k]];for(e=h[1],h[1]=h[5],h[5]=h[9],h[9]=h[13],h[13]=e,e=h[2],d=h[6],h[2]=h[10],h[6]=h[14],h[10]=e,h[14]=d,e=h[3],d=h[7],c=h[11],h[3]=h[15],h[7]=e,h[11]=d,h[15]=c,k=0,f=160;16>k;++k,++f)h[k]^=b[f];return h}function d(b){this.key=a(b),this.buffer=new Uint8Array(16),this.bufferPosition=0}function e(a,c){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[],k=this.iv;for(d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){var l=b(h,this.key);for(e=0;16>e;++e)l[e]^=k[e];k=h,j.push(l),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=k,0===j.length)return new Uint8Array([]);var m=16*j.length;if(c){var n=j[j.length-1],o=n[15];if(16>=o){for(d=15,f=16-o;d>=f;--d)if(n[d]!==o){o=0;break}m-=o,j[j.length-1]=n.subarray(0,16-o)}}var p=new Uint8Array(m);for(d=0,e=0,f=j.length;f>d;++d,e+=16)p.set(j[d],e);return p}for(var f=new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),g=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]),h=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),i=new Uint8Array(256),j=0;256>j;j++)128>j?i[j]=j<<1:i[j]=j<<1^27;var k=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]);return d.prototype={decryptBlock:function(a,b){var c,d=a.length,f=this.buffer,g=this.bufferPosition;for(c=0;16>g&&d>c;++c,++g)f[g]=a[c];return 16>g?(this.bufferLength=g,new Uint8Array([])):(this.iv=f,this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=e,this.decryptBlock(a.subarray(16),b))},encrypt:function(a,b){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[];for(b||(b=new Uint8Array(16)),d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){for(e=0;16>e;++e)h[e]^=b[e];var k=c(h,this.key);b=k,j.push(k),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=b,0===j.length)return new Uint8Array([]);var l=16*j.length,m=new Uint8Array(l);for(d=0,e=0,f=j.length;f>d;++d,e+=16)m.set(j[d],e);return m}},d}(),nb=function(){function a(a){var b=240,c=new Uint8Array(b),d=1;c.set(a);for(var e=32,g=1;b>e;++g){if(e%32===16)h=f[h],i=f[i],j=f[j],k=f[k];else if(e%32===0){var h=c[e-3],i=c[e-2],j=c[e-1],k=c[e-4];h=f[h],i=f[i],j=f[j],k=f[k],h^=d,(d<<=1)>=256&&(d=255&(27^d))}for(var l=0;4>l;++l)c[e]=h^=c[e-32],e++,c[e]=i^=c[e-32],e++,c[e]=j^=c[e-32],e++,c[e]=k^=c[e-32],e++}return c}function b(a,b){var c=new Uint8Array(16);c.set(a);var d,e,f,h,i,k;for(e=0,f=224;16>e;++e,++f)c[e]^=b[f];for(d=13;d>=1;--d){for(h=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=h,h=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=h,c[2]=i,h=c[15],i=c[11],k=c[7],c[15]=c[3],c[11]=h,c[7]=i,c[3]=k,e=0;16>e;++e)c[e]=g[c[e]];for(e=0,f=16*d;16>e;++e,++f)c[e]^=b[f];for(e=0;16>e;e+=4){var l=j[c[e]],m=j[c[e+1]],n=j[c[e+2]],o=j[c[e+3]];h=l^m>>>8^m<<24^n>>>16^n<<16^o>>>24^o<<8,c[e]=h>>>24&255,c[e+1]=h>>16&255,c[e+2]=h>>8&255,c[e+3]=255&h}}for(h=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=h,h=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=h,c[2]=i,h=c[15],i=c[11],k=c[7],c[15]=c[3],c[11]=h,c[7]=i,c[3]=k,e=0;16>e;++e)c[e]=g[c[e]],c[e]^=b[e];return c}function c(a,b){var c,d,e,g,j=new Uint8Array(16);for(j.set(a),k=0;16>k;++k)j[k]^=b[k];for(i=1;14>i;i++){for(k=0;16>k;++k)j[k]=f[j[k]];e=j[1],j[1]=j[5],j[5]=j[9],j[9]=j[13],j[13]=e,e=j[2],d=j[6],j[2]=j[10],j[6]=j[14],j[10]=e,j[14]=d,e=j[3],d=j[7],c=j[11],j[3]=j[15],j[7]=e,j[11]=d,j[15]=c;for(var k=0;16>k;k+=4){var l=j[k+0],m=j[k+1],n=j[k+2],o=j[k+3];c=l^m^n^o,j[k+0]^=c^h[l^m],j[k+1]^=c^h[m^n],j[k+2]^=c^h[n^o],j[k+3]^=c^h[o^l]}for(k=0,g=16*i;16>k;++k,++g)j[k]^=b[g]}for(k=0;16>k;++k)j[k]=f[j[k]];for(e=j[1],j[1]=j[5],j[5]=j[9],j[9]=j[13],j[13]=e,e=j[2],d=j[6],j[2]=j[10],j[6]=j[14],j[10]=e,j[14]=d,e=j[3],d=j[7],c=j[11],j[3]=j[15],j[7]=e,j[11]=d,j[15]=c,k=0,g=224;16>k;++k,++g)j[k]^=b[g];return j}function d(b){this.key=a(b),this.buffer=new Uint8Array(16),this.bufferPosition=0}function e(a,c){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[],k=this.iv;for(d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){var l=b(h,this.key);for(e=0;16>e;++e)l[e]^=k[e];k=h,j.push(l),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=k,0===j.length)return new Uint8Array([]);var m=16*j.length;if(c){var n=j[j.length-1],o=n[15];if(16>=o){for(d=15,f=16-o;d>=f;--d)if(n[d]!==o){o=0;break}m-=o,j[j.length-1]=n.subarray(0,16-o)}}var p=new Uint8Array(m);for(d=0,e=0,f=j.length;f>d;++d,e+=16)p.set(j[d],e);return p}for(var f=(new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22])),g=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),h=new Uint8Array(256),i=0;256>i;i++)128>i?h[i]=i<<1:h[i]=i<<1^27;var j=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]);return d.prototype={decryptBlock:function(a,b,c){var d,f=a.length,g=this.buffer,h=this.bufferPosition;if(c)this.iv=c;else{for(d=0;16>h&&f>d;++d,++h)g[h]=a[d];if(16>h)return this.bufferLength=h,new Uint8Array([]);this.iv=g,a=a.subarray(16)}return this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=e,this.decryptBlock(a,b)},encrypt:function(a,b){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[];for(b||(b=new Uint8Array(16)),d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){for(e=0;16>e;++e)h[e]^=b[e];var k=c(h,this.key);this.iv=k,j.push(k),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=b,0===j.length)return new Uint8Array([]);var l=16*j.length,m=new Uint8Array(l);for(d=0,e=0,f=j.length;f>d;++d,e+=16)m.set(j[d],e);return m}},d}(),ob=function(){function a(a,b){if(a.length!==b.length)return!1;for(var c=0;cg||f[f.length-1]>g-32;){var h=b.length+e.length+d.length,i=new Uint8Array(64*h),j=a(b,e);j=a(j,d);for(var k=0,l=0;64>k;k++,l+=h)i.set(j,l);var m=new mb(e.subarray(0,16));f=m.encrypt(i,e.subarray(16,32));for(var n=0,o=0;16>o;o++)n*=1,n%=3,n+=(f[o]>>>0)%3,n%=3;0===n?e=ib(f,0,f.length):1===n?e=kb(f,0,f.length):2===n&&(e=jb(f,0,f.length)),g++}return e.subarray(0,32)}function c(){}function d(a,b){if(a.length!==b.length)return!1;for(var c=0;cn;++n)m[n]=b[n];for(j=0;32>n;)m[n++]=i[j++];for(j=0,k=c.length;k>j;++j)m[n++]=c[j];for(m[n++]=255&e,m[n++]=e>>8&255,m[n++]=e>>16&255,m[n++]=e>>>24&255,j=0,k=a.length;k>j;++j)m[n++]=a[j];f>=4&&!h&&(m[n++]=255,m[n++]=255,m[n++]=255,m[n++]=255);var o=gb(m,0,n),p=g>>3;if(f>=3)for(j=0;50>j;++j)o=gb(o,0,p);var q,r,s=o.subarray(0,p);if(f>=3){for(n=0;32>n;++n)m[n]=i[n];for(j=0,k=a.length;k>j;++j)m[n++]=a[j];q=new fb(s),r=q.encryptBlock(gb(m,0,n)),k=s.length;var t,u=new Uint8Array(k);for(j=1;19>=j;++j){for(t=0;k>t;++t)u[t]=s[t]^j;q=new fb(u),r=q.encryptBlock(r)}for(j=0,k=r.length;k>j;++j)if(d[j]!==r[j])return null}else for(q=new fb(s),r=q.encryptBlock(i),j=0,k=r.length;k>j;++j)if(d[j]!==r[j])return null;return s}function e(a,b,c,d){var e,f,g=new Uint8Array(32),h=0;for(f=Math.min(32,a.length);f>h;++h)g[h]=a[h];for(e=0;32>h;)g[h++]=i[e++];var j=gb(g,0,h),k=d>>3;if(c>=3)for(e=0;50>e;++e)j=gb(j,0,j.length);var l,m;if(c>=3){m=b;var n,o=new Uint8Array(k);for(e=19;e>=0;e--){for(n=0;k>n;++n)o[n]=j[n]^e;l=new fb(o),m=l.encryptBlock(m)}}else l=new fb(j.subarray(0,k)),m=l.encryptBlock(b);return m}function f(f,g,h){var i=f.get("Filter");z(i)&&"Standard"===i.name||c("unknown encryption method"),this.dict=f;var l=f.get("V");(!w(l)||1!==l&&2!==l&&4!==l&&5!==l)&&c("unsupported encryption algorithm"),this.algorithm=l;var m=f.get("Length")||40;(!w(m)||40>m||m%8!==0)&&c("invalid key length");var n=j(f.get("O")).subarray(0,32),o=j(f.get("U")).subarray(0,32),p=f.get("P"),q=f.get("R"),r=(4===l||5===l)&&f.get("EncryptMetadata")!==!1;this.encryptMetadata=r;var s,u=j(g);if(h){if(6===q)try{h=t(h)}catch(v){b("CipherTransformFactory: Unable to convert UTF8 encoded password.")}s=j(h)}var x;if(5!==l)x=d(u,s,n,o,p,q,m,r);else{var y=j(f.get("O")).subarray(32,40),A=j(f.get("O")).subarray(40,48),B=j(f.get("U")).subarray(0,48),C=j(f.get("U")).subarray(32,40),D=j(f.get("U")).subarray(40,48),E=j(f.get("OE")),F=j(f.get("UE")),G=j(f.get("Perms"));x=a(q,s,n,y,A,B,o,C,D,E,F,G)}if(!x&&!h)throw new da("No password given",ca.NEED_PASSWORD);if(!x&&h){var H=e(s,n,q,m);x=d(u,H,n,o,p,q,m,r)}if(!x)throw new da("Incorrect Password",ca.INCORRECT_PASSWORD);this.encryptionKey=x,l>=4&&(this.cf=f.get("CF"),this.stmf=f.get("StmF")||k,this.strf=f.get("StrF")||k,this.eff=f.get("EFF")||this.stmf)}function g(a,b,c,d){var e,f,g=new Uint8Array(c.length+9);for(e=0,f=c.length;f>e;++e)g[e]=c[e];g[e++]=255&a,g[e++]=a>>8&255,g[e++]=a>>16&255,g[e++]=255&b,g[e++]=b>>8&255,d&&(g[e++]=115,g[e++]=65,g[e++]=108,g[e++]=84);var h=gb(g,0,e);return h.subarray(0,Math.min(c.length+5,16))}function h(a,b,d,e,f){var h,i=a.get(b.name);return null!==i&&void 0!==i&&(h=i.get("CFM")),h&&"None"!==h.name?"V2"===h.name?function(){return new fb(g(d,e,f,!1))}:"AESV2"===h.name?function(){return new mb(g(d,e,f,!0))}:"AESV3"===h.name?function(){return new nb(f)}:void c("Unknown crypto method"):function(){return new lb}}var i=new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]),k=ya.get("Identity");return f.prototype={createCipherTransform:function(a,b){if(4===this.algorithm||5===this.algorithm)return new qb(h(this.cf,this.stmf,a,b,this.encryptionKey),h(this.cf,this.strf,a,b,this.encryptionKey));var c=g(a,b,this.encryptionKey,!1),d=function(){return new fb(c)};return new qb(d,d)}},f}(),sb={FUNCTION_BASED:1,AXIAL:2,RADIAL:3,FREE_FORM_MESH:4,LATTICE_FORM_MESH:5,COONS_PATCH_MESH:6,TENSOR_PATCH_MESH:7},tb=function(){function a(){c("should not call Pattern constructor")}return a.prototype={getPattern:function(a){c("Should not call Pattern.getStyle: "+a)}},a.parseShading=function(a,c,d,e){var f=D(a)?a.dict:a,g=f.get("ShadingType");try{switch(g){case sb.AXIAL:case sb.RADIAL:return new ub.RadialAxial(f,c,d,e);case sb.FREE_FORM_MESH:case sb.LATTICE_FORM_MESH:case sb.COONS_PATCH_MESH:case sb.TENSOR_PATCH_MESH:return new ub.Mesh(a,c,d,e);default:throw new Error("Unsupported ShadingType: "+g)}}catch(h){if(h instanceof ja)throw h;return aa.notify(_.shadingPattern),b(h),new ub.Dummy}},a}(),ub={};ub.SMALL_NUMBER=.01,ub.RadialAxial=function(){function d(c,d,e,f){this.matrix=d,this.coordsArr=c.get("Coords"),this.shadingType=c.get("ShadingType"),this.type="Pattern";var g=c.get("ColorSpace","CS");g=Xa.parse(g,e,f),this.cs=g;var h=0,i=1;if(c.has("Domain")){var j=c.get("Domain");h=j[0],i=j[1]}var k=!1,l=!1;if(c.has("Extend")){var m=c.get("Extend");k=m[0],l=m[1]}if(!(this.shadingType!==sb.RADIAL||k&&l)){var n=this.coordsArr[0],o=this.coordsArr[1],p=this.coordsArr[2],q=this.coordsArr[3],r=this.coordsArr[4],s=this.coordsArr[5],t=Math.sqrt((n-q)*(n-q)+(o-r)*(o-r));s+t>=p&&p+t>=s&&b("Unsupported radial gradient.")}this.extendStart=k,this.extendEnd=l;var u=c.get("Function"),v=Ta.parseArray(e,u),w=i-h,x=w/10,y=this.colorStops=[];if(h>=i||0>=x)return void a("Bad shading domain.");for(var z,A=new Float32Array(g.numComps),B=new Float32Array(1),C=h;i>=C;C+=x){B[0]=C,v(B,0,A,0),z=g.getRgb(A,0);var D=na.makeCssRgb(z[0],z[1],z[2]);y.push([(C-h)/w,D])}var E="transparent";c.has("Background")&&(z=g.getRgb(c.get("Background"),0),E=na.makeCssRgb(z[0],z[1],z[2])),k||(y.unshift([0,E]),y[1][0]+=ub.SMALL_NUMBER),l||(y[y.length-1][0]-=ub.SMALL_NUMBER,y.push([1,E])),this.colorStops=y}return d.prototype={getIR:function(){var a,b,d,e,f,g=this.coordsArr,h=this.shadingType;h===sb.AXIAL?(b=[g[0],g[1]],d=[g[2],g[3]],e=null,f=null,a="axial"):h===sb.RADIAL?(b=[g[0],g[1]],d=[g[3],g[4]],e=g[2],f=g[5],a="radial"):c("getPattern type unknown: "+h);var i=this.matrix;return i&&(b=na.applyTransform(b,i),d=na.applyTransform(d,i)),["RadialAxial",a,this.colorStops,b,d,e,f]}},d}(),ub.Mesh=function(){function a(a,b){this.stream=a,this.context=b,this.buffer=0,this.bufferLength=0;var c=b.numComps;this.tmpCompsBuf=new Float32Array(c);var d=b.colorSpace.numComps;this.tmpCsCompsBuf=b.colorFn?new Float32Array(d):this.tmpCompsBuf}function b(a,b){for(var c=a.coords,d=a.colors,f=[],g=[],h=0;b.hasData;){var i=b.readFlag(),j=b.readCoordinate(),k=b.readComponents();if(0===h){switch(e(i>=0&&2>=i,"Unknown type4 flag"),i){case 0:h=3;break;case 1:g.push(g[g.length-2],g[g.length-1]),h=1;break;case 2:g.push(g[g.length-3],g[g.length-1]),h=1}f.push(i)}g.push(c.length),c.push(j),d.push(k),h--,b.align()}a.figures.push({type:"triangles",coords:new Int32Array(g),colors:new Int32Array(g)})}function d(a,b,c){for(var d=a.coords,e=a.colors,f=[];b.hasData;){var g=b.readCoordinate(),h=b.readComponents();f.push(d.length),d.push(g),e.push(h)}a.figures.push({type:"lattice",coords:new Int32Array(f),colors:new Int32Array(f),verticesPerRow:c})}function f(a,b){var c=a.figures[b];e("patch"===c.type,"Unexpected patch mesh figure");var d=a.coords,f=a.colors,g=c.coords,h=c.colors,i=Math.min(d[g[0]][0],d[g[3]][0],d[g[12]][0],d[g[15]][0]),j=Math.min(d[g[0]][1],d[g[3]][1],d[g[12]][1],d[g[15]][1]),k=Math.max(d[g[0]][0],d[g[3]][0],d[g[12]][0],d[g[15]][0]),p=Math.max(d[g[0]][1],d[g[3]][1],d[g[12]][1],d[g[15]][1]),q=Math.ceil((k-i)*n/(a.bounds[2]-a.bounds[0]));q=Math.max(l,Math.min(m,q));var r=Math.ceil((p-j)*n/(a.bounds[3]-a.bounds[1]));r=Math.max(l,Math.min(m,r));for(var s=q+1,t=new Int32Array((r+1)*s),u=new Int32Array((r+1)*s),v=0,w=new Uint8Array(3),x=new Uint8Array(3),y=f[h[0]],z=f[h[1]],A=f[h[2]],B=f[h[3]],C=o(r),D=o(q),E=0;r>=E;E++){w[0]=(y[0]*(r-E)+A[0]*E)/r|0,w[1]=(y[1]*(r-E)+A[1]*E)/r|0,w[2]=(y[2]*(r-E)+A[2]*E)/r|0,x[0]=(z[0]*(r-E)+B[0]*E)/r|0,x[1]=(z[1]*(r-E)+B[1]*E)/r|0,x[2]=(z[2]*(r-E)+B[2]*E)/r|0;for(var F=0;q>=F;F++,v++)if(0!==E&&E!==r||0!==F&&F!==q){for(var G=0,H=0,I=0,J=0;3>=J;J++)for(var K=0;3>=K;K++,I++){var L=C[E][J]*D[F][K];G+=d[g[I]][0]*L,H+=d[g[I]][1]*L}t[v]=d.length,d.push([G,H]),u[v]=f.length;var M=new Uint8Array(3);M[0]=(w[0]*(q-F)+x[0]*F)/q|0,M[1]=(w[1]*(q-F)+x[1]*F)/q|0,M[2]=(w[2]*(q-F)+x[2]*F)/q|0,f.push(M)}}t[0]=g[0],u[0]=h[0],t[q]=g[3],u[q]=h[1],t[s*r]=g[12],u[s*r]=h[2],t[s*r+q]=g[15],u[s*r+q]=h[3],a.figures[b]={type:"lattice",coords:t,colors:u,verticesPerRow:s}}function g(a,b){for(var c=a.coords,d=a.colors,f=new Int32Array(16),g=new Int32Array(4);b.hasData;){var h=b.readFlag();e(h>=0&&3>=h,"Unknown type6 flag");var i,j,k=c.length;for(i=0,j=0!==h?8:12;j>i;i++)c.push(b.readCoordinate());var l=d.length;for(i=0, +j=0!==h?2:4;j>i;i++)d.push(b.readComponents());var m,n,o,p;switch(h){case 0:f[12]=k+3,f[13]=k+4,f[14]=k+5,f[15]=k+6,f[8]=k+2,f[11]=k+7,f[4]=k+1,f[7]=k+8,f[0]=k,f[1]=k+11,f[2]=k+10,f[3]=k+9,g[2]=l+1,g[3]=l+2,g[0]=l,g[1]=l+3;break;case 1:m=f[12],n=f[13],o=f[14],p=f[15],f[12]=p,f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=o,f[11]=k+3,f[4]=n,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[2],n=g[3],g[2]=n,g[3]=l,g[0]=m,g[1]=l+1;break;case 2:m=f[15],n=f[11],f[12]=f[3],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[7],f[11]=k+3,f[4]=n,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[3],g[2]=g[1],g[3]=l,g[0]=m,g[1]=l+1;break;case 3:f[12]=f[0],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[1],f[11]=k+3,f[4]=f[2],f[7]=k+4,f[0]=f[3],f[1]=k+7,f[2]=k+6,f[3]=k+5,g[2]=g[0],g[3]=l,g[0]=g[1],g[1]=l+1}f[5]=c.length,c.push([(-4*c[f[0]][0]-c[f[15]][0]+6*(c[f[4]][0]+c[f[1]][0])-2*(c[f[12]][0]+c[f[3]][0])+3*(c[f[13]][0]+c[f[7]][0]))/9,(-4*c[f[0]][1]-c[f[15]][1]+6*(c[f[4]][1]+c[f[1]][1])-2*(c[f[12]][1]+c[f[3]][1])+3*(c[f[13]][1]+c[f[7]][1]))/9]),f[6]=c.length,c.push([(-4*c[f[3]][0]-c[f[12]][0]+6*(c[f[2]][0]+c[f[7]][0])-2*(c[f[0]][0]+c[f[15]][0])+3*(c[f[4]][0]+c[f[14]][0]))/9,(-4*c[f[3]][1]-c[f[12]][1]+6*(c[f[2]][1]+c[f[7]][1])-2*(c[f[0]][1]+c[f[15]][1])+3*(c[f[4]][1]+c[f[14]][1]))/9]),f[9]=c.length,c.push([(-4*c[f[12]][0]-c[f[3]][0]+6*(c[f[8]][0]+c[f[13]][0])-2*(c[f[0]][0]+c[f[15]][0])+3*(c[f[11]][0]+c[f[1]][0]))/9,(-4*c[f[12]][1]-c[f[3]][1]+6*(c[f[8]][1]+c[f[13]][1])-2*(c[f[0]][1]+c[f[15]][1])+3*(c[f[11]][1]+c[f[1]][1]))/9]),f[10]=c.length,c.push([(-4*c[f[15]][0]-c[f[0]][0]+6*(c[f[11]][0]+c[f[14]][0])-2*(c[f[12]][0]+c[f[3]][0])+3*(c[f[2]][0]+c[f[8]][0]))/9,(-4*c[f[15]][1]-c[f[0]][1]+6*(c[f[11]][1]+c[f[14]][1])-2*(c[f[12]][1]+c[f[3]][1])+3*(c[f[2]][1]+c[f[8]][1]))/9]),a.figures.push({type:"patch",coords:new Int32Array(f),colors:new Int32Array(g)})}}function h(a,b){for(var c=a.coords,d=a.colors,f=new Int32Array(16),g=new Int32Array(4);b.hasData;){var h=b.readFlag();e(h>=0&&3>=h,"Unknown type7 flag");var i,j,k=c.length;for(i=0,j=0!==h?12:16;j>i;i++)c.push(b.readCoordinate());var l=d.length;for(i=0,j=0!==h?2:4;j>i;i++)d.push(b.readComponents());var m,n,o,p;switch(h){case 0:f[12]=k+3,f[13]=k+4,f[14]=k+5,f[15]=k+6,f[8]=k+2,f[9]=k+13,f[10]=k+14,f[11]=k+7,f[4]=k+1,f[5]=k+12,f[6]=k+15,f[7]=k+8,f[0]=k,f[1]=k+11,f[2]=k+10,f[3]=k+9,g[2]=l+1,g[3]=l+2,g[0]=l,g[1]=l+3;break;case 1:m=f[12],n=f[13],o=f[14],p=f[15],f[12]=p,f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=o,f[9]=k+9,f[10]=k+10,f[11]=k+3,f[4]=n,f[5]=k+8,f[6]=k+11,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[2],n=g[3],g[2]=n,g[3]=l,g[0]=m,g[1]=l+1;break;case 2:m=f[15],n=f[11],f[12]=f[3],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[7],f[9]=k+9,f[10]=k+10,f[11]=k+3,f[4]=n,f[5]=k+8,f[6]=k+11,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[3],g[2]=g[1],g[3]=l,g[0]=m,g[1]=l+1;break;case 3:f[12]=f[0],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[1],f[9]=k+9,f[10]=k+10,f[11]=k+3,f[4]=f[2],f[5]=k+8,f[6]=k+11,f[7]=k+4,f[0]=f[3],f[1]=k+7,f[2]=k+6,f[3]=k+5,g[2]=g[0],g[3]=l,g[0]=g[1],g[1]=l+1}a.figures.push({type:"patch",coords:new Int32Array(f),colors:new Int32Array(g)})}}function i(a){for(var b=a.coords[0][0],c=a.coords[0][1],d=b,e=c,f=1,g=a.coords.length;g>f;f++){var h=a.coords[f][0],i=a.coords[f][1];b=b>h?h:b,c=c>i?i:c,d=h>d?h:d,e=i>e?i:e}a.bounds=[b,c,d,e]}function j(a){var b,c,d,e,f=a.coords,g=new Float32Array(2*f.length);for(b=0,d=0,c=f.length;c>b;b++){var h=f[b];g[d++]=h[0],g[d++]=h[1]}a.coords=g;var i=a.colors,j=new Uint8Array(3*i.length);for(b=0,d=0,c=i.length;c>b;b++){var k=i[b];j[d++]=k[0],j[d++]=k[1],j[d++]=k[2]}a.colors=j;var l=a.figures;for(b=0,c=l.length;c>b;b++){var m=l[b],n=m.coords,o=m.colors;for(d=0,e=n.length;e>d;d++)n[d]*=2,o[d]*=3}}function k(k,l,m,n){e(D(k),"Mesh data is not a stream");var o=k.dict;this.matrix=l,this.shadingType=o.get("ShadingType"),this.type="Pattern",this.bbox=o.get("BBox");var p=o.get("ColorSpace","CS");p=Xa.parse(p,m,n),this.cs=p,this.background=o.has("Background")?p.getRgb(o.get("Background"),0):null;var q=o.get("Function"),r=q?Ta.parseArray(m,q):null;this.coords=[],this.colors=[],this.figures=[];var s={bitsPerCoordinate:o.get("BitsPerCoordinate"),bitsPerComponent:o.get("BitsPerComponent"),bitsPerFlag:o.get("BitsPerFlag"),decode:o.get("Decode"),colorFn:r,colorSpace:p,numComps:r?1:p.numComps},t=new a(k,s),u=!1;switch(this.shadingType){case sb.FREE_FORM_MESH:b(this,t);break;case sb.LATTICE_FORM_MESH:var v=0|o.get("VerticesPerRow");e(v>=2,"Invalid VerticesPerRow"),d(this,t,v);break;case sb.COONS_PATCH_MESH:g(this,t),u=!0;break;case sb.TENSOR_PATCH_MESH:h(this,t),u=!0;break;default:c("Unsupported mesh type.")}if(u){i(this);for(var w=0,x=this.figures.length;x>w;w++)f(this,w)}i(this),j(this)}a.prototype={get hasData(){if(this.stream.end)return this.stream.pos0)return!0;var a=this.stream.getByte();return 0>a?!1:(this.buffer=a,this.bufferLength=8,!0)},readBits:function(a){var b=this.buffer,c=this.bufferLength;if(32===a){if(0===c)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;b=b<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();var d=this.stream.getByte();return this.buffer=d&(1<>c)>>>0}if(8===a&&0===c)return this.stream.getByte();for(;a>c;)b=b<<8|this.stream.getByte(),c+=8;return c-=a,this.bufferLength=c,this.buffer=b&(1<>c},align:function(){this.buffer=0,this.bufferLength=0},readFlag:function(){return this.readBits(this.context.bitsPerFlag)},readCoordinate:function(){var a=this.context.bitsPerCoordinate,b=this.readBits(a),c=this.readBits(a),d=this.context.decode,e=32>a?1/((1<b?1/((1<f;f++,g+=2){var h=this.readBits(b);e[f]=h*c*(d[g+1]-d[g])+d[g]}var i=this.tmpCsCompsBuf;return this.context.colorFn&&this.context.colorFn(e,0,i,0),this.context.colorSpace.getRgb(i,0)}};var l=3,m=20,n=20,o=function(){function a(a){for(var b=[],c=0;a>=c;c++){var d=c/a,e=1-d;b.push(new Float32Array([e*e*e,3*d*e*e,3*d*d*e,d*d*d]))}return b}var b=[];return function(c){return b[c]||(b[c]=a(c)),b[c]}}();return k.prototype={getIR:function(){return["Mesh",this.shadingType,this.coords,this.colors,this.figures,this.bounds,this.matrix,this.bbox,this.background]}},k}(),ub.Dummy=function(){function a(){this.type="Pattern"}return a.prototype={getIR:function(){return["Dummy"]}},a}();var vb=function(){function d(a,b,c,d,e,f,g){this.pdfManager=a,this.xref=b,this.handler=c,this.pageIndex=d,this.uniquePrefix=e,this.idCounters=f,this.fontCache=g}function f(){this.reset()}var g=20,h=100;f.prototype={check:function(){return++this.checkedPDFJS.maxImageSize)return void b("Image exceeded maximum allowed size and was removed.");var l,m,n=i.get("ImageMask","IM")||!1;if(n){var o=i.get("Width","W"),p=i.get("Height","H"),q=o+7>>3,r=c.getBytes(q*p),s=i.get("Decode","D"),t=!!s&&s[0]>0;return l=Bc.createMask(r,o,p,c instanceof Oc,t),l.cached=!0,m=[l],e.addOp($.paintImageMaskXObject,m),void(f&&(g[f]={fn:$.paintImageMaskXObject,args:m}))}var u=i.get("SMask","SM")||!1,v=i.get("Mask")||!1,w=200;if(d&&!u&&!v&&!(c instanceof Sc)&&w>j+k){var y=new Bc(this.xref,a,c,d,null,null);return l=y.createImageData(!0),void e.addOp($.paintInlineImageXObject,[l])}var z=this.uniquePrefix||"",A="img_"+z+ ++this.idCounters.obj;return e.addDependency(A),m=[A,j,k],!u&&!v&&c instanceof Sc&&c.isNativelySupported(this.xref,a)?(e.addOp($.paintJpegXObject,m),void this.handler.send("obj",[A,this.pageIndex,"JpegStream",c.getIR()])):(Bc.buildImage(h.handler,h.xref,a,c,d).then(function(a){var b=a.createImageData(!1);h.handler.send("obj",[A,h.pageIndex,"Image",b],[b.data.buffer])}).then(void 0,function(a){b("Unable to decode image: "+a),h.handler.send("obj",[A,h.pageIndex,"Image",null])}),e.addOp($.paintImageXObject,m),void(f&&(g[f]={fn:$.paintImageXObject,args:m})))},handleSMask:function(a,b,c,d,e){var f=a.get("G"),g={subtype:a.get("S").name,backdrop:a.get("BC")};return this.buildFormXObject(b,f,g,c,d,e.state.clone())},handleTilingType:function(a,b,c,d,e,f,g){var h=new xb,i=[e.get("Resources"),c],j=Aa.merge(this.xref,i);return this.getOperatorList(d,g,j,h).then(function(){f.addDependencies(h.dependencies),f.addOp(a,J({fnArray:h.fnArray,argsArray:h.argsArray},e,b))})},handleSetFont:function(a,b,c,d,e,f){var g;b&&(b=b.slice(),g=b[0].name);var h=this;return this.loadFont(g,c,this.xref,a).then(function(b){return b.font.isType3Font?b.loadType3Data(h,a,d,e).then(function(){return b}):b}).then(function(a){return f.font=a.font,a.send(h.handler),a.loadedName})},handleText:function(a,b){var c=b.font,d=c.charsToGlyphs(a),e=!!(b.textRenderingMode&U.ADD_TO_PATH_FLAG);if(c.data&&(e||PDFJS.disableFontFace))for(var f=function(a){if(!c.renderer.hasBuiltPath(a)){var b=c.renderer.getPathJs(a);this.handler.send("commonobj",[c.loadedName+"_path_"+a,"FontPath",b])}}.bind(this),g=0,h=d.length;h>g;g++){var i=d[g];if(null!==i){f(i.fontChar);var j=i.accent;j&&j.fontChar&&f(j.fontChar)}}return d},setGState:function(c,d,e,f,g,h){var i=[],j=d.map,k=this,l=Promise.resolve();for(var m in j){var n=j[m];switch(m){case"Type":break;case"LW":case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":i.push([m,n]);break;case"Font":l=l.then(function(){return k.handleSetFont(c,null,n[0],e,f,h.state).then(function(a){e.addDependency(a),i.push([m,[a,n[1]]])})});break;case"BM":i.push([m,n]);break;case"SMask":if(z(n)&&"None"===n.name){i.push([m,!1]);break}var o=g.fetchIfRef(n);B(o)?(l=l.then(function(){return k.handleSMask(o,c,e,f,h)}),i.push([m,!0])):b("Unsupported SMask type");break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":a("graphic state operator "+m);break;default:a("Unknown graphic state operator "+m)}}return l.then(function(){i.length>=0&&e.addOp($.setGState,[i])})},loadFont:function(a,c,d,f){function g(){return Promise.resolve(new wb("g_font_error",new ec("Font "+a+" is not available"),c))}var h;if(c)e(F(c)),h=c;else{var i=f.get("Font");if(!i)return b("fontRes not available"),g();h=i.getRaw(a)}if(!h)return b("fontRef not available"),g();if(this.fontCache.has(h))return this.fontCache.get(h);if(c=d.fetchIfRef(h),!B(c))return g();if(c.translated)return c.translated;var j=G(),k=this.preEvaluateFont(c,d),l=k.descriptor,m=h.num+"_"+h.gen;if(B(l)){l.fontAliases||(l.fontAliases=Object.create(null));var n=l.fontAliases,o=k.hash;if(n[o]){var p=n[o].aliasRef;if(p&&this.fontCache.has(p))return this.fontCache.putAlias(h,p),this.fontCache.get(h)}n[o]||(n[o]={fontID:dc.getFontID()}),n[o].aliasRef=h,m=n[o].fontID}var q=B(h);q||this.fontCache.put(h,j.promise),c.loadedName="g_font_"+(q?a.replace(/\W/g,""):m),c.translated=j.promise;var r;try{r=Promise.resolve(this.translateFont(k,d))}catch(s){r=Promise.reject(s)}return r.then(function(a){if(void 0!==a.fontType){var b=d.stats.fontTypes;b[a.fontType]=!0}j.resolve(new wb(c.loadedName,a,c))},function(a){aa.notify(_.font);try{var b=k.descriptor,e=b&&b.get("FontFile3"),f=e&&e.get("Subtype"),g=P(k.type,f&&f.name),h=d.stats.fontTypes;h[g]=!0}catch(i){}j.resolve(new wb(c.loadedName,new ec(a instanceof Error?a.message:a),c))}),j.promise},buildPath:function(a,b,c){var d=a.length-1;if(c||(c=[]),0>d||a.fnArray[d]!==$.constructPath)a.addOp($.constructPath,[[b],c]);else{var e=a.argsArray[d];e[0].push(b),Array.prototype.push.apply(e[1],c)}},handleColorN:function(a,b,c,d,e,f,g,h){var i,l=c[c.length-1];if(z(l)&&(i=e.get(l.name))){var m=D(i)?i.dict:i,n=m.get("PatternType");if(n===j){var o=d.base?d.base.getRgb(c,0):null;return this.handleTilingType(b,o,f,i,m,a,g)}if(n===k){var p=m.get("Shading"),q=m.get("Matrix");return i=tb.parseShading(p,q,h,f),a.addOp(b,i.getIR()),Promise.resolve()}return Promise.reject("Unknown PatternType: "+n)}return a.addOp(b,c),Promise.resolve()},getOperatorList:function(d,g,h,j,k){var l=this,m=this.xref,n={};e(j),h=h||Aa.empty;var o=h.get("XObject")||Aa.empty,p=h.get("Pattern")||Aa.empty,q=new yb(k||new Ab),r=new Bb(d,m,q),s=new f;return new Promise(function t(d,f){g.ensureNotTerminated(),s.reset();for(var k,u,v,w,A={};!(k=s.check())&&(A.args=null,r.read(A));){var C=A.args,E=A.fn;switch(0|E){case $.paintXObject:if(C[0].code)break;var F=C[0].name;if(!F){b("XObject must be referred to by name.");continue}if(void 0!==n[F]){j.addOp(n[F].fn,n[F].args),C=null;continue}var G=o.get(F);if(G){e(D(G),"XObject should be a stream");var H=G.dict.get("Subtype");if(e(z(H),"XObject should have a Name subtype"),"Form"===H.name)return q.save(),l.buildFormXObject(h,G,null,j,g,q.state.clone()).then(function(){q.restore(),t(d,f)},f);if("Image"===H.name){l.buildPaintImageXObject(h,G,!1,j,F,n),C=null;continue}if("PS"===H.name){a("Ignored XObject subtype PS");continue}c("Unhandled XObject subtype "+H.name)}break;case $.setFont:var I=C[1];return l.handleSetFont(h,C,null,j,g,q.state).then(function(a){j.addDependency(a),j.addOp($.setFont,[a,I]),t(d,f)},f);case $.endInlineImage:var J=C[0].cacheKey;if(J){var K=n[J];if(void 0!==K){j.addOp(K.fn,K.args),C=null;continue}}l.buildPaintImageXObject(h,C[0],!0,j,J,n),C=null;continue;case $.showText:C[0]=l.handleText(C[0],q.state);break;case $.showSpacedText:var L=C[0],M=[],N=L.length,O=q.state;for(u=0;N>u;++u){var P=L[u];y(P)?Array.prototype.push.apply(M,l.handleText(P,O)):x(P)&&M.push(P)}C[0]=M,E=$.showText;break;case $.nextLineShowText:j.addOp($.nextLine),C[0]=l.handleText(C[0],q.state),E=$.showText;break;case $.nextLineSetSpacingShowText:j.addOp($.nextLine),j.addOp($.setWordSpacing,[C.shift()]),j.addOp($.setCharSpacing,[C.shift()]),C[0]=l.handleText(C[0],q.state),E=$.showText;break;case $.setTextRenderingMode:q.state.textRenderingMode=C[0];break;case $.setFillColorSpace:q.state.fillColorSpace=Xa.parse(C[0],m,h);continue;case $.setStrokeColorSpace:q.state.strokeColorSpace=Xa.parse(C[0],m,h);continue;case $.setFillColor:w=q.state.fillColorSpace,C=w.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeColor:w=q.state.strokeColorSpace,C=w.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.setFillGray:q.state.fillColorSpace=Xa.singletons.gray,C=Xa.singletons.gray.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeGray:q.state.strokeColorSpace=Xa.singletons.gray,C=Xa.singletons.gray.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.setFillCMYKColor:q.state.fillColorSpace=Xa.singletons.cmyk,C=Xa.singletons.cmyk.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeCMYKColor:q.state.strokeColorSpace=Xa.singletons.cmyk,C=Xa.singletons.cmyk.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.setFillRGBColor:q.state.fillColorSpace=Xa.singletons.rgb,C=Xa.singletons.rgb.getRgb(C,0);break;case $.setStrokeRGBColor:q.state.strokeColorSpace=Xa.singletons.rgb,C=Xa.singletons.rgb.getRgb(C,0);break;case $.setFillColorN:if(w=q.state.fillColorSpace,"Pattern"===w.name)return l.handleColorN(j,$.setFillColorN,C,w,p,h,g,m).then(function(){t(d,f)},f);C=w.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeColorN:if(w=q.state.strokeColorSpace,"Pattern"===w.name)return l.handleColorN(j,$.setStrokeColorN,C,w,p,h,g,m).then(function(){t(d,f)},f);C=w.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.shadingFill:var Q=h.get("Shading");Q||c("No shading resource found");var R=Q.get(C[0].name);R||c("No shading object found");var S=tb.parseShading(R,null,m,h),T=S.getIR();C=[T],E=$.shadingFill;break;case $.setGState:var U=C[0],V=h.get("ExtGState");if(!B(V)||!V.has(U.name))break;var W=V.get(U.name);return l.setGState(h,W,j,g,m,q).then(function(){t(d,f)},f);case $.moveTo:case $.lineTo:case $.curveTo:case $.curveTo2:case $.curveTo3:case $.closePath:l.buildPath(j,E,C);continue;case $.rectangle:l.buildPath(j,E,C);continue;case $.markPoint:case $.markPointProps:case $.beginMarkedContent:case $.beginMarkedContentProps:case $.endMarkedContent:case $.beginCompat:case $.endCompat:continue}j.addOp(E,C)}if(k)return void i.then(function(){t(d,f)},f);for(u=0,v=r.savedStatesDepth;v>u;u++)j.addOp($.restore,[]);d()})},getTextContent:function(a,b,c,d){function g(){var a=r.font;return a.loadedName in l.styles||(l.styles[a.loadedName]={fontFamily:a.fallbackName,ascent:a.ascent,descent:a.descent,vertical:a.vertical}),{str:[],dir:null,width:0,height:0,transform:null,fontName:a.loadedName}}function h(a){var b=a.str.join(""),c=PDFJS.bidi(b,-1,r.font.vertical);return a.str=c.str,a.dir=c.dir,a}function j(a,b){return p.loadFont(a,b,q,c).then(function(a){r.font=a.font,r.fontMatrix=a.font.fontMatrix||T})}function k(a,b){var c=r.font;if(b=b||g(),!b.transform){var d=[r.fontSize*r.textHScale,0,0,r.fontSize,0,r.textRise];if(c.isType3Font&&r.fontMatrix!==T&&1===r.fontSize){var e=c.bbox[3]-c.bbox[1];e>0&&(e*=r.fontMatrix[3],d[3]*=e)}var f=b.transform=na.transform(r.ctm,na.transform(r.textMatrix,d));c.vertical?b.width=Math.sqrt(f[0]*f[0]+f[1]*f[1]):b.height=Math.sqrt(f[2]*f[2]+f[3]*f[3])}for(var h=0,i=0,j=c.charsToGlyphs(a),k=c.defaultVMetrics,l=0;l0&&(s=r.charSpacing);var t=0,u=0;if(c.vertical){var v=p*r.fontMatrix[0];u=v*r.fontSize+s,i+=u}else{var w=p*r.fontMatrix[0];t=(w*r.fontSize+s)*r.textHScale,h+=t}r.translateTextMatrix(t,u),b.str.push(q)}else h+=r.wordSpacing*r.textHScale}var x=r.textLineMatrix[0],y=r.textLineMatrix[1],z=Math.sqrt(x*x+y*y);x=r.ctm[0],y=r.ctm[1];var A=Math.sqrt(x*x+y*y);return c.vertical?b.height+=Math.abs(i*A*z):b.width+=h*A*z,b}d=d||new yb(new zb);var l={items:[],styles:Object.create(null)},m=l.items,n=.3,o=1.5,p=this,q=this.xref;c=q.fetchIfRef(c)||Aa.empty;var r,s=null,t={},u=new Bb(a,q,d),v=new f;return new Promise(function w(a,f){b.ensureNotTerminated(),v.reset();for(var q,x={},y=[];!(q=v.check())&&(y.length=0,x.args=y,u.read(x));){r=d.state;var A=x.fn;switch(y=x.args,0|A){case $.setFont:return r.fontSize=y[1],j(y[0].name).then(function(){w(a,f)},f);case $.setTextRise:r.textRise=y[0];break;case $.setHScale:r.textHScale=y[0]/100;break;case $.setLeading:r.leading=y[0];break;case $.moveText:r.translateTextLineMatrix(y[0],y[1]),r.textMatrix=r.textLineMatrix.slice();break;case $.setLeadingMoveText:r.leading=-y[1],r.translateTextLineMatrix(y[0],y[1]),r.textMatrix=r.textLineMatrix.slice();break;case $.nextLine:r.carriageReturn();break;case $.setTextMatrix:r.setTextMatrix(y[0],y[1],y[2],y[3],y[4],y[5]),r.setTextLineMatrix(y[0],y[1],y[2],y[3],y[4],y[5]);break;case $.setCharSpacing:r.charSpacing=y[0];break;case $.setWordSpacing:r.wordSpacing=y[0];break;case $.beginText:r.textMatrix=ma.slice(),r.textLineMatrix=ma.slice();break;case $.showSpacedText:for(var E,F=y[0],G=g(),H=0,I=F.length;I>H;H++)if("string"==typeof F[H])k(F[H],G);else{var J=F[H]*r.fontSize/1e3;if(r.font.vertical?(E=J*r.textMatrix[3],r.translateTextMatrix(0,E),G.height+=E):(E=J*r.textHScale*r.textMatrix[0],r.translateTextMatrix(E,0),G.width-=E),F[H]<0&&r.font.spaceWidth>0){var K=-F[H]/r.font.spaceWidth;if(K>o)for(K=Math.round(K);K--;)G.str.push(" ");else K>n&&G.str.push(" ")}}m.push(h(G));break;case $.showText:m.push(h(k(y[0])));break;case $.nextLineShowText:r.carriageReturn(),m.push(h(k(y[0])));break;case $.nextLineSetSpacingShowText:r.wordSpacing=y[0],r.charSpacing=y[1],r.carriageReturn(),m.push(h(k(y[2])));break;case $.paintXObject:if(y[0].code)break;s||(s=c.get("XObject")||Aa.empty);var L=y[0].name;if(t.key===L){t.texts&&(na.appendToArray(m,t.texts.items),na.extendObj(l.styles,t.texts.styles));break}var M=s.get(L);if(!M)break;e(D(M),"XObject should be a stream");var N=M.dict.get("Subtype");if(e(z(N),"XObject should have a Name subtype"),"Form"!==N.name){t.key=L,t.texts=null;break}d.save();var O=M.dict.get("Matrix");return C(O)&&6===O.length&&d.transform(O),p.getTextContent(M,b,M.dict.get("Resources")||c,d).then(function(b){na.appendToArray(m,b.items),na.extendObj(l.styles,b.styles),d.restore(),t.key=L,t.texts=b,w(a,f)},f);case $.setGState:var P=y[0],Q=c.get("ExtGState");if(!B(Q)||!Q.has(P.name))break;var R=Q.get(P.name),S=null;for(var T in R)"Font"===T&&(e(!S),S=R[T]);if(S)return r.fontSize=S[1],j(S[0]).then(function(){w(a,f)},f)}}return q?void i.then(function(){w(a,f)},f):void a(l)})},extractDataStructures:function(a,b,d,e){var f=a.get("ToUnicode")||b.get("ToUnicode");if(f&&(e.toUnicode=this.readToUnicode(f)),e.composite){var g=a.get("CIDSystemInfo");B(g)&&(e.cidSystemInfo={registry:g.get("Registry"),ordering:g.get("Ordering"),supplement:g.get("Supplement")});var h=a.get("CIDToGIDMap");D(h)&&(e.cidToGidMap=this.readCidToGidMap(h))}var i,j=[],k=null;if(a.has("Encoding")){if(i=a.get("Encoding"),B(i)){if(k=i.get("BaseEncoding"),k=z(k)?k.name:null,i.has("Differences"))for(var l=i.get("Differences"),m=0,n=0,o=l.length;o>n;n++){var p=l[n];if(x(p))m=p;else if(z(p))j[m++]=p.name;else{if(F(p)){l[n--]=d.fetch(p);continue}c("Invalid entry in 'Differences' array: "+p)}}}else z(i)?k=i.name:c("Encoding is not a Name nor a Dict");"MacRomanEncoding"!==k&&"MacExpertEncoding"!==k&&"WinAnsiEncoding"!==k&&(k=null)}k?e.defaultEncoding=Pb[k].slice():(i="TrueType"===e.type?Pb.WinAnsiEncoding:Pb.StandardEncoding,e.flags&Ob.Symbolic&&(i=Pb.MacRomanEncoding,e.file||(/Symbol/i.test(e.name)?i=Pb.SymbolSetEncoding:/Dingbats/i.test(e.name)&&(i=Pb.ZapfDingbatsEncoding))),e.defaultEncoding=i),e.differences=j,e.baseEncodingName=k,e.dict=a},readToUnicode:function(a){var b,c=a;if(z(c))return b=Hb.create(c,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),b instanceof Fb?new ac(0,65535):new _b(b.getMap());if(D(c)){if(b=Hb.create(c,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),b instanceof Fb)return new ac(0,65535);var d=new Array(b.length);return b.forEach(function(a,b){for(var c=[],e=0;ed;d++){var f=b[d++]<<8|b[d];if(0!==f){var g=d>>1;c[g]=f}}return c},extractWidths:function(a,b,c,d){var e,f,g,h,i,j,k,l,m=[],n=0,o=[];if(d.composite){if(n=a.get("DW")||1e3,l=a.get("W"))for(f=0,g=l.length;g>f;f++)if(j=l[f++],k=b.fetchIfRef(l[f]),C(k))for(h=0,i=k.length;i>h;h++)m[j++]=k[h];else{var p=l[++f];for(h=j;k>=h;h++)m[h]=p}if(d.vertical){var q=a.get("DW2")||[880,-1e3];if(e=[q[1],.5*n,q[0]],q=a.get("W2"))for(f=0,g=q.length;g>f;f++)if(j=q[f++],k=b.fetchIfRef(q[f]),C(k))for(h=0,i=k.length;i>h;h++)o[j++]=[k[h++],k[h++],k[h]];else{var r=[q[++f],q[++f],q[++f]];for(h=j;k>=h;h++)o[h]=r}}}else{var s=d.firstChar;if(l=a.get("Widths")){for(h=s,f=0,g=l.length;g>f;f++)m[h++]=l[f];n=parseFloat(c.get("MissingWidth"))||0}else{var t=a.get("BaseFont");if(z(t)){var u=this.getBaseFontMetrics(t.name);m=this.buildCharCodeToWidth(u.widths,d),n=u.defaultWidth}}}var v=!0,w=n;for(var x in m){var y=m[x];if(y)if(w){if(w!==y){v=!1;break}}else w=y}v&&(d.flags|=Ob.FixedPitch),d.defaultWidth=n,d.widths=m,d.defaultVMetrics=e,d.vmetrics=o},isSerifFont:function(a){var b=a.split("-")[0];return b in Sb||-1!==b.search(/serif/gi)},getBaseFontMetrics:function(a){var b=0,c=[],d=!1,e=Qb[a]||a;e in Cc||(e=this.isSerifFont(a)?"Times-Roman":"Helvetica");var f=Cc[e];return x(f)?(b=f,d=!0):c=f,{defaultWidth:b,monospace:d,widths:c}},buildCharCodeToWidth:function(a,b){for(var c=Object.create(null),d=b.differences,e=b.defaultEncoding,f=0;256>f;f++)f in d&&a[d[f]]?c[f]=a[d[f]]:f in e&&a[e[f]]&&(c[f]=a[e[f]]);return c},preEvaluateFont:function(a,b){var d=a,f=a.get("Subtype");e(z(f),"invalid font Subtype");var g,h=!1;if("Type0"===f.name){var i=a.get("DescendantFonts");i||c("Descendant fonts are not specified"),a=C(i)?b.fetchIfRef(i[0]):i,f=a.get("Subtype"),e(z(f),"invalid font Subtype"),h=!0}var j=a.get("FontDescriptor");if(j){var k=new jd,l=d.getRaw("Encoding");if(z(l))k.update(l.name);else if(F(l))k.update(l.num+"_"+l.gen);else if(B(l))for(var m=l.getKeys(),n=0,o=m.length;o>n;n++){var p=l.getRaw(m[n]);z(p)?k.update(p.name):F(p)?k.update(p.num+"_"+p.gen):C(p)&&k.update(p.length.toString())}var q=a.get("ToUnicode")||d.get("ToUnicode");if(D(q)){var r=q.str||q;g=r.buffer?new Uint8Array(r.buffer.buffer,0,r.bufferLength):new Uint8Array(r.bytes.buffer,r.start,r.end-r.start),k.update(g)}else z(q)&&k.update(q.name);var s=a.get("Widths")||d.get("Widths");s&&(g=new Uint8Array(new Uint32Array(s).buffer),k.update(g))}return{descriptor:j,dict:a,baseDict:d,composite:h,type:f.name,hash:k?k.hexdigest():""}},translateFont:function(b,d){var f,g=b.baseDict,h=b.dict,i=b.composite,j=b.descriptor,k=b.type,l=i?65535:255;if(!j){if("Type3"!==k){var m=h.get("BaseFont");z(m)||c("Base font is not specified"),m=m.name.replace(/[,_]/g,"-");var n=this.getBaseFontMetrics(m),o=m.split("-")[0],p=(this.isSerifFont(o)?Ob.Serif:0)|(n.monospace?Ob.FixedPitch:0)|(Tb[o]?Ob.Symbolic:Ob.Nonsymbolic);return f={type:k,name:m,widths:n.widths,defaultWidth:n.defaultWidth,flags:p,firstChar:0,lastChar:l},this.extractDataStructures(h,h,d,f),f.widths=this.buildCharCodeToWidth(n.widths,f),new dc(m,null,f)}j=new Aa(null),j.set("FontName",ya.get(k)),j.set("FontBBox",h.get("FontBBox"))}var q=h.get("FirstChar")||0,r=h.get("LastChar")||l,s=j.get("FontName"),t=h.get("BaseFont");if(y(s)&&(s=ya.get(s)),y(t)&&(t=ya.get(t)),"Type3"!==k){var u=s&&s.name,v=t&&t.name;u!==v&&(a("The FontDescriptor's FontName is \""+u+'" but should be the same as the Font\'s BaseFont "'+v+'"'),u&&v&&0===v.indexOf(u)&&(s=t))}s=s||t,e(z(s),"invalid font name");var w=j.get("FontFile","FontFile2","FontFile3");if(w&&w.dict){var x=w.dict.get("Subtype");x&&(x=x.name);var A=w.dict.get("Length1"),B=w.dict.get("Length2")}if(f={type:k,name:s.name,subtype:x,file:w,length1:A,length2:B,loadedName:g.loadedName,composite:i,wideChars:i,fixedPitch:!1,fontMatrix:h.get("FontMatrix")||T,firstChar:q||0,lastChar:r||l,bbox:j.get("FontBBox"),ascent:j.get("Ascent"),descent:j.get("Descent"),xHeight:j.get("XHeight"),capHeight:j.get("CapHeight"),flags:j.get("Flags"),italicAngle:j.get("ItalicAngle"),coded:!1},i){var C=g.get("Encoding");z(C)&&(f.cidEncoding=C.name),f.cMap=Hb.create(C,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),f.vertical=f.cMap.vertical}return this.extractDataStructures(h,g,d,f),this.extractWidths(h,d,j,f),"Type3"===k&&(f.isType3Font=!0),new dc(s.name,w,f)}},d}(),wb=function(){function a(a,b,c){this.loadedName=a,this.font=b,this.dict=c,this.type3Loaded=null,this.sent=!1}return a.prototype={send:function(a){if(!this.sent){var b=this.font.exportData();a.send("commonobj",[this.loadedName,"Font",b]),this.sent=!0}},loadType3Data:function(a,c,d,f){if(e(this.font.isType3Font),this.type3Loaded)return this.type3Loaded;for(var g=this.font,h=Promise.resolve(),i=this.dict.get("CharProcs").getAll(),j=this.dict.get("Resources")||c,k=Object.keys(i),l={},m=0,n=k.length;n>m;++m)h=h.then(function(c){var e=i[c],g=new xb;return a.getOperatorList(e,f,j,g).then(function(){l[c]=g.getIR(),d.addDependencies(g.dependencies)},function(a){b('Type3 font resource "'+c+'" is not available');var d=new xb;l[c]=d.getIR()})}.bind(this,k[m]));return this.type3Loaded=h.then(function(){g.charProcOperatorList=l}),this.type3Loaded}},a}(),xb=function(){function a(a){for(var b=[],c=a.fnArray,d=a.argsArray,e=0,f=a.length;f>e;e++)switch(c[e]){case $.paintInlineImageXObject:case $.paintInlineImageXObjectGroup:case $.paintImageMaskXObject:var g=d[e][0];g.cached||b.push(g.data.buffer)}return b}function b(a,b,c){this.messageHandler=b,this.fnArray=[],this.argsArray=[],this.dependencies={},this.pageIndex=c,this.intent=a}var c=1e3,d=c-5;return b.prototype={get length(){return this.argsArray.length},addOp:function(a,b){this.fnArray.push(a),this.argsArray.push(b),this.messageHandler&&(this.fnArray.length>=c?this.flush():this.fnArray.length>=d&&(a===$.restore||a===$.endText)&&this.flush())},addDependency:function(a){a in this.dependencies||(this.dependencies[a]=!0,this.addOp($.dependency,[a]))},addDependencies:function(a){for(var b in a)this.addDependency(b)},addOpList:function(a){na.extendObj(this.dependencies,a.dependencies);for(var b=0,c=a.length;c>b;b++)this.addOp(a.fnArray[b],a.argsArray[b])},getIR:function(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}},flush:function(b){"oplist"!==this.intent&&(new Cb).optimize(this);var c=a(this);this.messageHandler.send("RenderPageChunk",{operatorList:{fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:b,length:this.length},pageIndex:this.pageIndex,intent:this.intent},c),this.dependencies={},this.fnArray.length=0,this.argsArray.length=0}},b}(),yb=function(){function a(a){this.state=a,this.stateStack=[]}return a.prototype={save:function(){var a=this.state;this.stateStack.push(this.state),this.state=a.clone()},restore:function(){var a=this.stateStack.pop();a&&(this.state=a)},transform:function(a){this.state.ctm=na.transform(this.state.ctm,a)}},a}(),zb=function(){function a(){this.ctm=new Float32Array(ma),this.fontSize=0,this.font=null,this.fontMatrix=T,this.textMatrix=ma.slice(),this.textLineMatrix=ma.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}return a.prototype={setTextMatrix:function(a,b,c,d,e,f){var g=this.textMatrix;g[0]=a,g[1]=b,g[2]=c,g[3]=d,g[4]=e,g[5]=f},setTextLineMatrix:function(a,b,c,d,e,f){var g=this.textLineMatrix;g[0]=a,g[1]=b,g[2]=c,g[3]=d,g[4]=e,g[5]=f},translateTextMatrix:function(a,b){var c=this.textMatrix;c[4]=c[0]*a+c[2]*b+c[4],c[5]=c[1]*a+c[3]*b+c[5]},translateTextLineMatrix:function(a,b){var c=this.textLineMatrix;c[4]=c[0]*a+c[2]*b+c[4],c[5]=c[1]*a+c[3]*b+c[5]},calcRenderMatrix:function(a){var b=[this.fontSize*this.textHScale,0,0,this.fontSize,0,this.textRise];return na.transform(a,na.transform(this.textMatrix,b))},carriageReturn:function(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()},clone:function(){var a=Object.create(this);return a.textMatrix=this.textMatrix.slice(),a.textLineMatrix=this.textLineMatrix.slice(),a.fontMatrix=this.fontMatrix.slice(),a}},a}(),Ab=function(){function a(){this.ctm=new Float32Array(ma),this.font=null,this.textRenderingMode=U.FILL,this.fillColorSpace=Xa.singletons.gray,this.strokeColorSpace=Xa.singletons.gray}return a.prototype={clone:function(){return Object.create(this)}},a}(),Bb=function(){function c(a,b,c){this.parser=new Fc(new Gc(a,d),!1,b), +this.stateManager=c,this.nonProcessedArgs=[]}var d={w:{id:$.setLineWidth,numArgs:1,variableArgs:!1},J:{id:$.setLineCap,numArgs:1,variableArgs:!1},j:{id:$.setLineJoin,numArgs:1,variableArgs:!1},M:{id:$.setMiterLimit,numArgs:1,variableArgs:!1},d:{id:$.setDash,numArgs:2,variableArgs:!1},ri:{id:$.setRenderingIntent,numArgs:1,variableArgs:!1},i:{id:$.setFlatness,numArgs:1,variableArgs:!1},gs:{id:$.setGState,numArgs:1,variableArgs:!1},q:{id:$.save,numArgs:0,variableArgs:!1},Q:{id:$.restore,numArgs:0,variableArgs:!1},cm:{id:$.transform,numArgs:6,variableArgs:!1},m:{id:$.moveTo,numArgs:2,variableArgs:!1},l:{id:$.lineTo,numArgs:2,variableArgs:!1},c:{id:$.curveTo,numArgs:6,variableArgs:!1},v:{id:$.curveTo2,numArgs:4,variableArgs:!1},y:{id:$.curveTo3,numArgs:4,variableArgs:!1},h:{id:$.closePath,numArgs:0,variableArgs:!1},re:{id:$.rectangle,numArgs:4,variableArgs:!1},S:{id:$.stroke,numArgs:0,variableArgs:!1},s:{id:$.closeStroke,numArgs:0,variableArgs:!1},f:{id:$.fill,numArgs:0,variableArgs:!1},F:{id:$.fill,numArgs:0,variableArgs:!1},"f*":{id:$.eoFill,numArgs:0,variableArgs:!1},B:{id:$.fillStroke,numArgs:0,variableArgs:!1},"B*":{id:$.eoFillStroke,numArgs:0,variableArgs:!1},b:{id:$.closeFillStroke,numArgs:0,variableArgs:!1},"b*":{id:$.closeEOFillStroke,numArgs:0,variableArgs:!1},n:{id:$.endPath,numArgs:0,variableArgs:!1},W:{id:$.clip,numArgs:0,variableArgs:!1},"W*":{id:$.eoClip,numArgs:0,variableArgs:!1},BT:{id:$.beginText,numArgs:0,variableArgs:!1},ET:{id:$.endText,numArgs:0,variableArgs:!1},Tc:{id:$.setCharSpacing,numArgs:1,variableArgs:!1},Tw:{id:$.setWordSpacing,numArgs:1,variableArgs:!1},Tz:{id:$.setHScale,numArgs:1,variableArgs:!1},TL:{id:$.setLeading,numArgs:1,variableArgs:!1},Tf:{id:$.setFont,numArgs:2,variableArgs:!1},Tr:{id:$.setTextRenderingMode,numArgs:1,variableArgs:!1},Ts:{id:$.setTextRise,numArgs:1,variableArgs:!1},Td:{id:$.moveText,numArgs:2,variableArgs:!1},TD:{id:$.setLeadingMoveText,numArgs:2,variableArgs:!1},Tm:{id:$.setTextMatrix,numArgs:6,variableArgs:!1},"T*":{id:$.nextLine,numArgs:0,variableArgs:!1},Tj:{id:$.showText,numArgs:1,variableArgs:!1},TJ:{id:$.showSpacedText,numArgs:1,variableArgs:!1},"'":{id:$.nextLineShowText,numArgs:1,variableArgs:!1},'"':{id:$.nextLineSetSpacingShowText,numArgs:3,variableArgs:!1},d0:{id:$.setCharWidth,numArgs:2,variableArgs:!1},d1:{id:$.setCharWidthAndBounds,numArgs:6,variableArgs:!1},CS:{id:$.setStrokeColorSpace,numArgs:1,variableArgs:!1},cs:{id:$.setFillColorSpace,numArgs:1,variableArgs:!1},SC:{id:$.setStrokeColor,numArgs:4,variableArgs:!0},SCN:{id:$.setStrokeColorN,numArgs:33,variableArgs:!0},sc:{id:$.setFillColor,numArgs:4,variableArgs:!0},scn:{id:$.setFillColorN,numArgs:33,variableArgs:!0},G:{id:$.setStrokeGray,numArgs:1,variableArgs:!1},g:{id:$.setFillGray,numArgs:1,variableArgs:!1},RG:{id:$.setStrokeRGBColor,numArgs:3,variableArgs:!1},rg:{id:$.setFillRGBColor,numArgs:3,variableArgs:!1},K:{id:$.setStrokeCMYKColor,numArgs:4,variableArgs:!1},k:{id:$.setFillCMYKColor,numArgs:4,variableArgs:!1},sh:{id:$.shadingFill,numArgs:1,variableArgs:!1},BI:{id:$.beginInlineImage,numArgs:0,variableArgs:!1},ID:{id:$.beginImageData,numArgs:0,variableArgs:!1},EI:{id:$.endInlineImage,numArgs:1,variableArgs:!1},Do:{id:$.paintXObject,numArgs:1,variableArgs:!1},MP:{id:$.markPoint,numArgs:1,variableArgs:!1},DP:{id:$.markPointProps,numArgs:2,variableArgs:!1},BMC:{id:$.beginMarkedContent,numArgs:1,variableArgs:!1},BDC:{id:$.beginMarkedContentProps,numArgs:2,variableArgs:!1},EMC:{id:$.endMarkedContent,numArgs:0,variableArgs:!1},BX:{id:$.beginCompat,numArgs:0,variableArgs:!1},EX:{id:$.endCompat,numArgs:0,variableArgs:!1},BM:null,BD:null,"true":null,fa:null,fal:null,fals:null,"false":null,nu:null,nul:null,"null":null};return c.prototype={get savedStatesDepth(){return this.stateManager.stateStack.length},read:function(c){for(var f=c.args;;){var g=this.parser.getObj();if(A(g)){var h=g.cmd,i=d[h];if(!i){b('Unknown command "'+h+'"');continue}var j=i.id,k=i.numArgs,l=null!==f?f.length:0;if(i.variableArgs)l>k&&a("Command "+j+": expected [0,"+k+"] args, but received "+l+" args");else{if(l!==k){for(var m=this.nonProcessedArgs;l>k;)m.push(f.shift()),l--;for(;k>l&&0!==m.length;)f||(f=[]),f.unshift(m.pop()),l++}if(k>l){a("Command "+j+": because expected "+k+" args, but received "+l+" args; skipping"),f=null;continue}}return this.preprocessCommand(j,f),c.fn=j,c.args=f,!0}if(R(g))return!1;null!==g&&(f||(f=[]),f.push(g instanceof Aa?g.getAll():g),e(f.length<=33,"Too many arguments"))}},preprocessCommand:function(a,b){switch(0|a){case $.save:this.stateManager.save();break;case $.restore:this.stateManager.restore();break;case $.transform:this.stateManager.transform(b)}}},c}(),Cb=function(){function a(a,b,c){for(var d=a,e=0,f=b.length-1;f>e;e++){var g=b[e];d=d[g]||(d[g]=[])}d[b[b.length-1]]=c}function b(a,b,c,d){for(var e=a+2,f=0;b>f;f++){var g=d[e+4*f],h=1===g.length&&g[0];if(!h||1!==h.width||1!==h.height||h.data.length&&(1!==h.data.length||0!==h.data[0]))break;c[e+4*f]=$.paintSolidColorImageMask}return b-f}function c(){}var d=[];return a(d,[$.save,$.transform,$.paintInlineImageXObject,$.restore],function(a){for(var b=10,c=200,d=1e3,e=1,f=a.fnArray,g=a.argsArray,h=a.iCurr,i=h-3,j=h-2,k=h-1,l=i+4,m=f.length;m>l+3&&f[l]===$.save&&f[l+1]===$.transform&&f[l+2]===$.paintInlineImageXObject&&f[l+3]===$.restore;)l+=4;var n=Math.min((l-i)/4,c);if(b>n)return l;var o,p=0,q=[],r=0,s=e,t=e;for(o=0;n>o;o++){var u=g[j+(o<<2)],v=g[k+(o<<2)][0];s+v.width>d&&(p=Math.max(p,s),t+=r+2*e,s=0,r=0),q.push({transform:u,x:s,y:t,w:v.width,h:v.height}),s+=v.width+2*e,r=Math.max(r,v.height)}var w=Math.max(p,s)+e,x=t+r+e,y=new Uint8Array(w*x*4),z=w<<2;for(o=0;n>o;o++){var A=g[k+(o<<2)][0].data,B=q[o].w<<2,C=0,D=q[o].x+q[o].y*w<<2;y.set(A.subarray(0,B),D-z);for(var E=0,F=q[o].h;F>E;E++)y.set(A.subarray(C,C+B),D),C+=B,D+=z;for(y.set(A.subarray(C-B,C),D);D>=0;)A[D-4]=A[D],A[D-3]=A[D+1],A[D-2]=A[D+2],A[D-1]=A[D+3],A[D+B]=A[D+B-4],A[D+B+1]=A[D+B-3],A[D+B+2]=A[D+B-2],A[D+B+3]=A[D+B-1],D-=z}return f.splice(i,4*n,$.paintInlineImageXObjectGroup),g.splice(i,4*n,[{width:w,height:x,kind:V.RGBA_32BPP,data:y},q]),i+1}),a(d,[$.save,$.transform,$.paintImageMaskXObject,$.restore],function(a){for(var c=10,d=100,e=1e3,f=a.fnArray,g=a.argsArray,h=a.iCurr,i=h-3,j=h-2,k=h-1,l=i+4,m=f.length;m>l+3&&f[l]===$.save&&f[l+1]===$.transform&&f[l+2]===$.paintImageMaskXObject&&f[l+3]===$.restore;)l+=4;var n=(l-i)/4;if(n=b(i,n,f,g),c>n)return l;var o,p,q,r=!1,s=g[k][0];if(0===g[j][1]&&0===g[j][2]){r=!0;var t=g[j][0],u=g[j][3];p=j+4;var v=k+4;for(o=1;n>o;o++,p+=4,v+=4)if(q=g[p],g[v][0]!==s||q[0]!==t||0!==q[1]||0!==q[2]||q[3]!==u){c>o?r=!1:n=o;break}}if(r){n=Math.min(n,e);var w=new Float32Array(2*n);for(p=j,o=0;n>o;o++,p+=4)q=g[p],w[o<<1]=q[4],w[(o<<1)+1]=q[5];f.splice(i,4*n,$.paintImageMaskXObjectRepeat),g.splice(i,4*n,[s,t,u,w])}else{n=Math.min(n,d);var x=[];for(o=0;n>o;o++){q=g[j+(o<<2)];var y=g[k+(o<<2)][0];x.push({data:y.data,width:y.width,height:y.height,transform:q})}f.splice(i,4*n,$.paintImageMaskXObjectGroup),g.splice(i,4*n,[x])}return i+1}),a(d,[$.save,$.transform,$.paintImageXObject,$.restore],function(a){var b=3,c=1e3,d=a.fnArray,e=a.argsArray,f=a.iCurr,g=f-3,h=f-2,i=f-1,j=f;if(0!==e[h][1]||0!==e[h][2])return j+1;for(var k=e[i][0],l=e[h][0],m=e[h][3],n=g+4,o=d.length;o>n+3&&d[n]===$.save&&d[n+1]===$.transform&&d[n+2]===$.paintImageXObject&&d[n+3]===$.restore&&e[n+1][0]===l&&0===e[n+1][1]&&0===e[n+1][2]&&e[n+1][3]===m&&e[n+2][0]===k;)n+=4;var p=Math.min((n-g)/4,c);if(b>p)return n;for(var q=new Float32Array(2*p),r=h,s=0;p>s;s++,r+=4){var t=e[r];q[s<<1]=t[4],q[(s<<1)+1]=t[5]}var u=[k,l,m,q];return d.splice(g,4*p,$.paintImageXObjectRepeat),e.splice(g,4*p,u),g+1}),a(d,[$.beginText,$.setFont,$.setTextMatrix,$.showText,$.endText],function(a){for(var b=3,c=1e3,d=a.fnArray,e=a.argsArray,f=a.iCurr,g=f-4,h=f-3,i=f-2,j=f-1,k=f,l=e[h][0],m=e[h][1],n=g+5,o=d.length;o>n+4&&d[n]===$.beginText&&d[n+1]===$.setFont&&d[n+2]===$.setTextMatrix&&d[n+3]===$.showText&&d[n+4]===$.endText&&e[n+1][0]===l&&e[n+1][1]===m;)n+=5;var p=Math.min((n-g)/5,c);if(b>p)return n;var q=g;g>=4&&d[g-4]===d[h]&&d[g-3]===d[i]&&d[g-2]===d[j]&&d[g-1]===d[k]&&e[g-4][0]===l&&e[g-4][1]===m&&(p++,q-=5);for(var r=q+4,s=1;p>s;s++)d.splice(r,3),e.splice(r,3),r+=2;return r+1}),c.prototype={optimize:function(a){for(var b,c=a.fnArray,e=a.argsArray,f={iCurr:0,fnArray:c,argsArray:e},g=0,h=c.length;h>g;)b=(b||d)[c[g]],"function"==typeof b?(f.iCurr=g,g=b(f),b=void 0,h=f.fnArray.length):g++}},c}(),Db=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Adobe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-UHC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJIS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPro-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"],Eb=function(){function a(a){this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=a}return a.prototype={addCodespaceRange:function(a,b,c){this.codespaceRanges[a-1].push(b,c),this.numCodespaceRanges++},mapCidRange:function(a,b,c){for(;b>=a;)this._map[a++]=c++},mapBfRange:function(a,b,c){for(var d=c.length-1;b>=a;)this._map[a++]=c,c=c.substr(0,d)+String.fromCharCode(c.charCodeAt(d)+1)},mapBfRangeToArray:function(a,b,c){for(var d=0,e=c.length;b>=a&&e>d;)this._map[a]=c[d++],++a},mapOne:function(a,b){this._map[a]=b},lookup:function(a){return this._map[a]},contains:function(a){return void 0!==this._map[a]},forEach:function(a){var b,c=this._map,d=c.length;if(65536>=d)for(b=0;d>b;b++)void 0!==c[b]&&a(b,c[b]);else for(b in this._map)a(b,c[b])},charCodeOf:function(a){return this._map.indexOf(a)},getMap:function(){return this._map},readCharCode:function(a,b,c){for(var d=0,e=this.codespaceRanges,f=this.codespaceRanges.length,g=0;f>g;g++){d=(d<<8|a.charCodeAt(b+g))>>>0;for(var h=e[g],i=0,j=h.length;j>i;){var k=h[i++],l=h[i++];if(d>=k&&l>=d)return c.charcode=d,void(c.length=g+1)}}c.charcode=0,c.length=1},get length(){return this._map.length},get isIdentityCMap(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(var a=0;65536>a;a++)if(this._map[a]!==a)return!1;return!0}},a}(),Fb=function(){function a(a,b){Eb.call(this),this.vertical=a,this.addCodespaceRange(b,0,65535)}return na.inherit(a,Eb,{}),a.prototype={addCodespaceRange:Eb.prototype.addCodespaceRange,mapCidRange:function(a,b,d){c("should not call mapCidRange")},mapBfRange:function(a,b,d){c("should not call mapBfRange")},mapBfRangeToArray:function(a,b,d){c("should not call mapBfRangeToArray")},mapOne:function(a,b){c("should not call mapCidOne")},lookup:function(a){return w(a)&&65535>=a?a:void 0},contains:function(a){return w(a)&&65535>=a},forEach:function(a){for(var b=0;65535>=b;b++)a(b,b)},charCodeOf:function(a){return w(a)&&65535>=a?a:-1},getMap:function(){for(var a=new Array(65536),b=0;65535>=b;b++)a[b]=b;return a},readCharCode:Eb.prototype.readCharCode,get length(){return 65536},get isIdentityCMap(){c("should not access .isIdentityCMap")}},a}(),Gb=function(){function a(a){var b=PDFJS.disableWorker,d=new XMLHttpRequest;if(d.open("GET",a,!1),!b)try{d.responseType="arraybuffer",b="arraybuffer"!==d.responseType}catch(e){b=!0}if(b&&d.overrideMimeType&&d.overrideMimeType("text/plain; charset=x-user-defined"),d.send(null),(b?d.responseText:d.response)||c("Unable to get binary cMap at: "+a),b){var f=Array.prototype.map.call(d.responseText,function(a){return 255&a.charCodeAt(0)});return new Uint8Array(f)}return new Uint8Array(d.response)}function b(a,b){for(var c=0,d=0;b>=d;d++)c=c<<8|a[d];return c>>>0}function d(a,b){return 1===b?String.fromCharCode(a[0],a[1]):3===b?String.fromCharCode(a[0],a[1],a[2],a[3]):String.fromCharCode.apply(null,a.subarray(0,b+1))}function f(a,b,c){for(var d=0,e=c;e>=0;e--)d+=a[e]+b[e],a[e]=255&d,d>>=8}function g(a,b){for(var c=1,d=b;d>=0&&c>0;d--)c+=a[d],a[d]=255&c,c>>=8}function h(a){this.buffer=a,this.pos=0,this.end=a.length,this.tmpBuf=new Uint8Array(l)}function i(i,j,l){var m=a(i),n=new h(m),o=n.readByte();j.vertical=!!(1&o);for(var p,q,r=null,s=new Uint8Array(k),t=new Uint8Array(k),u=new Uint8Array(k),v=new Uint8Array(k),w=new Uint8Array(k);(q=n.readByte())>=0;){var x=q>>5;if(7!==x){var y=!!(16&q),z=15&q;e(k>=z+1);var A,B=1,C=n.readNumber();switch(x){case 0:for(n.readHex(s,z),n.readHexNumber(t,z),f(t,s,z),j.addCodespaceRange(z+1,b(s,z),b(t,z)),A=1;C>A;A++)g(t,z),n.readHexNumber(s,z),f(s,t,z),n.readHexNumber(t,z),f(t,s,z),j.addCodespaceRange(z+1,b(s,z),b(t,z));break;case 1:for(n.readHex(s,z),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber(),A=1;C>A;A++)g(t,z),n.readHexNumber(s,z),f(s,t,z),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber();break;case 2:for(n.readHex(u,z),p=n.readNumber(),j.mapOne(b(u,z),p),A=1;C>A;A++)g(u,z),y||(n.readHexNumber(w,z),f(u,w,z)),p=n.readSigned()+(p+1),j.mapOne(b(u,z),p);break;case 3:for(n.readHex(s,z),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber(),j.mapCidRange(b(s,z),b(t,z),p),A=1;C>A;A++)g(t,z),y?s.set(t):(n.readHexNumber(s,z),f(s,t,z)),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber(),j.mapCidRange(b(s,z),b(t,z),p);break;case 4:for(n.readHex(u,B),n.readHex(v,z),j.mapOne(b(u,B),d(v,z)),A=1;C>A;A++)g(u,B),y||(n.readHexNumber(w,B),f(u,w,B)),g(v,z),n.readHexSigned(w,z),f(v,w,z),j.mapOne(b(u,B),d(v,z));break;case 5:for(n.readHex(s,B),n.readHexNumber(t,B),f(t,s,B),n.readHex(v,z),j.mapBfRange(b(s,B),b(t,B),d(v,z)),A=1;C>A;A++)g(t,B),y?s.set(t):(n.readHexNumber(s,B),f(s,t,B)),n.readHexNumber(t,B),f(t,s,B),n.readHex(v,z),j.mapBfRange(b(s,B),b(t,B),d(v,z));break;default:c("Unknown type: "+x)}}else switch(31&q){case 0:n.readString();break;case 1:r=n.readString()}}return r&&l(r),j}function j(){}var k=16,l=19;return h.prototype={readByte:function(){return this.pos>=this.end?-1:this.buffer[this.pos++]},readNumber:function(){var a,b=0;do{var d=this.readByte();0>d&&c("unexpected EOF in bcmap"),a=!(128&d),b=b<<7|127&d}while(!a);return b},readSigned:function(){var a=this.readNumber();return 1&a?~(a>>>1):a>>>1},readHex:function(a,b){a.set(this.buffer.subarray(this.pos,this.pos+b+1)),this.pos+=b+1},readHexNumber:function(a,b){var d,e=this.tmpBuf,f=0;do{var g=this.readByte();0>g&&c("unexpected EOF in bcmap"),d=!(128&g),e[f++]=127&g}while(!d);for(var h=b,i=0,j=0;h>=0;){for(;8>j&&e.length>0;)i=e[--f]<>=8,j-=8}},readHexSigned:function(a,b){this.readHexNumber(a,b);for(var c=1&a[b]?255:0,d=0,e=0;b>=e;e++)d=(1&d)<<8|a[e],a[e]=d>>1^c},readString:function(){for(var a=this.readNumber(),b="",c=0;a>c;c++)b+=String.fromCharCode(this.readNumber());return b}},j.prototype={read:i},j}(),Hb=function(){function a(a){for(var b=0,c=0;c>>0}function d(a){y(a)||c("Malformed CMap: expected string.")}function f(a){w(a)||c("Malformed CMap: expected int.")}function g(b,c){for(;;){var e=c.getObj();if(R(e))break;if(A(e,"endbfchar"))return;d(e);var f=a(e);e=c.getObj(),d(e);var g=e;b.mapOne(f,g)}}function h(b,e){for(;;){var f=e.getObj();if(R(f))break;if(A(f,"endbfrange"))return;d(f);var g=a(f);f=e.getObj(),d(f);var h=a(f);if(f=e.getObj(),w(f)||y(f)){var i=w(f)?String.fromCharCode(f):f;b.mapBfRange(g,h,i)}else{if(!A(f,"["))break;f=e.getObj();for(var j=[];!A(f,"]")&&!R(f);)j.push(f),f=e.getObj();b.mapBfRangeToArray(g,h,j)}}c("Invalid bf range.")}function i(b,c){for(;;){var e=c.getObj();if(R(e))break;if(A(e,"endcidchar"))return;d(e);var g=a(e);e=c.getObj(),f(e);var h=e;b.mapOne(g,h)}}function j(b,c){for(;;){var e=c.getObj();if(R(e))break;if(A(e,"endcidrange"))return;d(e);var g=a(e);e=c.getObj(),d(e);var h=a(e);e=c.getObj(),f(e);var i=e;b.mapCidRange(g,h,i)}}function k(b,d){for(;;){var e=d.getObj();if(R(e))break;if(A(e,"endcodespacerange"))return;if(!y(e))break;var f=a(e);if(e=d.getObj(),!y(e))break;var g=a(e);b.addCodespaceRange(e.length,f,g)}c("Invalid codespace range.")}function l(a,b){var c=b.getObj();w(c)&&(a.vertical=!!c)}function m(a,b){var c=b.getObj();z(c)&&y(c.name)&&(a.name=c.name)}function n(a,b,c,d){var e,f;a:for(;;){var n=b.getObj();if(R(n))break;if(z(n))"WMode"===n.name?l(a,b):"CMapName"===n.name&&m(a,b),e=n;else if(A(n))switch(n.cmd){case"endcmap":break a;case"usecmap":z(e)&&(f=e.name);break;case"begincodespacerange":k(a,b);break;case"beginbfchar":g(a,b);break;case"begincidchar":i(a,b);break;case"beginbfrange":h(a,b);break;case"begincidrange":j(a,b)}}!d&&f&&(d=f),d&&o(a,c,d)}function o(a,b,c){if(a.useCMap=q(c,b),0===a.numCodespaceRanges){for(var d=a.useCMap.codespaceRanges,e=0;e=b;b++)a(b,b)},has:function(a){return this.firstChar<=a&&a<=this.lastChar},get:function(a){return this.firstChar<=a&&a<=this.lastChar?String.fromCharCode(a):void 0},charCodeOf:function(a){c("should not call .charCodeOf")}},a}(),bc=function(){function a(a,b,c){a[b]=c>>8&255,a[b+1]=255&c}function b(a,b,c){a[b]=c>>24&255,a[b+1]=c>>16&255,a[b+2]=c>>8&255,a[b+3]=255&c}function c(a,b,c){var d,e;if(c instanceof Uint8Array)a.set(c,b);else if("string"==typeof c)for(d=0,e=c.length;e>d;d++)a[b++]=255&c.charCodeAt(d);else for(d=0,e=c.length;e>d;d++)a[b++]=255&c[d]}function d(a){this.sfnt=a,this.tables=Object.create(null)}d.getSearchParams=function(a,b){for(var c=1,d=0;(c^a)>c;)c<<=1,d++;var e=c*b;return{range:e,entry:d,rangeShift:b*a-e}};var e=12,f=16;return d.prototype={toArray:function(){var g=this.sfnt,h=this.tables,i=Object.keys(h);i.sort();var j,l,m,n,o,p=i.length,q=e+p*f,r=[q];for(j=0;p>j;j++){n=h[i[j]];var s=(n.length+3&-4)>>>0;q+=s,r.push(q)}var t=new Uint8Array(q);for(j=0;p>j;j++)n=h[i[j]],c(t,r[j],n);"true"===g&&(g=k(65536)),t[0]=255&g.charCodeAt(0),t[1]=255&g.charCodeAt(1),t[2]=255&g.charCodeAt(2),t[3]=255&g.charCodeAt(3),a(t,4,p);var u=d.getSearchParams(p,16);for(a(t,6,u.range),a(t,8,u.entry),a(t,10,u.rangeShift),q=e,j=0;p>j;j++){o=i[j],t[q]=255&o.charCodeAt(0),t[q+1]=255&o.charCodeAt(1),t[q+2]=255&o.charCodeAt(2),t[q+3]=255&o.charCodeAt(3);var v=0;for(l=r[j],m=r[j+1];m>l;l+=4){var w=(t[l]<<24)+(t[l+1]<<16)+(t[l+2]<<8)+t[l+3];v=v+w|0}b(t,q+4,v),b(t,q+8,r[j]),b(t,q+12,h[o].length),q+=f}return t},addTable:function(a,b){if(a in this.tables)throw new Error("Table "+a+" already exists");this.tables[a]=b}},d}(),cc=new Int32Array([0,32,127,161,173,174,1536,1920,2208,4256,6016,6144,8192,8208,8209,8210,8232,8240,8287,8304,9676,9677,43616,43648,65520,65536]),dc=function(){function d(d,e,f){var g,h,i;this.name=d,this.loadedName=f.loadedName,this.isType3Font=f.isType3Font,this.sizes=[],this.glyphCache={};var j=d.split("+");j=j.length>1?j[1]:j[0],j=j.split(/[-,_]/g)[0],this.isSerifFont=!!(f.flags&Ob.Serif),this.isSymbolicFont=!!(f.flags&Ob.Symbolic),this.isMonospace=!!(f.flags&Ob.FixedPitch);var k=f.type,l=f.subtype;if(this.type=k,this.fallbackName=this.isMonospace?"monospace":this.isSerifFont?"serif":"sans-serif",this.differences=f.differences,this.widths=f.widths,this.defaultWidth=f.defaultWidth,this.composite=f.composite,this.wideChars=f.wideChars,this.cMap=f.cMap,this.ascent=f.ascent/Lb,this.descent=f.descent/Lb,this.fontMatrix=f.fontMatrix,this.bbox=f.bbox,this.toUnicode=f.toUnicode=this.buildToUnicode(f),this.toFontChar=[],"Type3"===f.type){for(g=0;256>g;g++)this.toFontChar[g]=this.differences[g]||f.defaultEncoding[g];return void(this.fontType=Z.TYPE3)}if(this.cidEncoding=f.cidEncoding,this.vertical=f.vertical,this.vertical&&(this.vmetrics=f.vmetrics,this.defaultVMetrics=f.defaultVMetrics),!e||e.isEmpty){e&&b('Font file is empty in "'+d+'" ('+this.loadedName+")"),this.missingFile=!0;var o=d.replace(/[,_]/g,"-"),p=!!Qb[o]||!(!Rb[o]||!Qb[Rb[o]]);if(o=Qb[o]||Rb[o]||o,this.bold=-1!==o.search(/bold/gi),this.italic=-1!==o.search(/oblique/gi)||-1!==o.search(/italic/gi),this.black=-1!==d.search(/Black/g),this.remeasure=Object.keys(this.widths).length>0,p&&"CIDFontType2"===k&&0===f.cidEncoding.indexOf("Identity-")){var q=[];for(g in Ub)q[+g]=Ub[g];if(/ArialBlack/i.test(d))for(g in Vb)q[+g]=Vb[g];var r=this.toUnicode instanceof ac;r||this.toUnicode.forEach(function(a,b){q[+a]=b}),this.toFontChar=q,this.toUnicode=new _b(q)}else if(/Symbol/i.test(o)){var s=Pb.SymbolSetEncoding;for(g in s)i=zc[s[g]],i&&(this.toFontChar[g]=i);for(g in f.differences)i=zc[f.differences[g]],i&&(this.toFontChar[g]=i)}else if(/Dingbats/i.test(o)){/Wingdings/i.test(d)&&b("Wingdings font without embedded font file, falling back to the ZapfDingbats encoding.");var t=Pb.ZapfDingbatsEncoding;for(g in t)i=Ac[t[g]],i&&(this.toFontChar[g]=i); +for(g in f.differences)i=Ac[f.differences[g]],i&&(this.toFontChar[g]=i)}else if(p){this.toFontChar=[];for(g in f.defaultEncoding)h=f.differences[g]||f.defaultEncoding[g],this.toFontChar[g]=zc[h]}else{var u=-1===k.indexOf("CIDFontType");this.toUnicode.forEach(function(a,b){u&&(h=f.differences[a]||f.defaultEncoding[a],b=zc[h]||b),this.toFontChar[a]=b}.bind(this))}return this.loadedName=o.split("-")[0],this.loading=!1,void(this.fontType=P(k,l))}"Type1C"===l&&"Type1"!==k&&"MMType1"!==k&&(m(e)?l="TrueType":k="Type1"),"CIDFontType0C"===l&&"CIDFontType0"!==k&&(k="CIDFontType0"),"OpenType"===l&&(k="OpenType"),"CIDFontType0"===k&&(l=n(e)?"CIDFontType0":"CIDFontType0C");var v;switch(k){case"MMType1":a("MMType1 font ("+d+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";var w="Type1C"===l||"CIDFontType0C"===l?new jc(e,f):new ic(d,e,f);O(f),v=this.convert(d,w,f);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",v=this.checkAndRepair(d,e,f),this.isOpenType&&(k="OpenType");break;default:c("Font "+k+" is not supported")}this.data=v,this.fontType=P(k,l),this.fontMatrix=f.fontMatrix,this.widths=f.widths,this.defaultWidth=f.defaultWidth,this.encoding=f.baseEncoding,this.seacMap=f.seacMap,this.loading=!0}function f(a,b){return(a<<8)+b}function h(a,b,c,d){return(a<<24)+(b<<16)+(c<<8)+d}function j(a){return String.fromCharCode(a>>8&255,255&a)}function l(a){return a=a>32767?32767:-32768>a?-32768:a,String.fromCharCode(a>>8&255,255&a)}function m(a){var b=a.peekBytes(4);return 65536===o(b,0)}function n(a){var b=a.peekBytes(2);return 37===b[0]&&33===b[1]?!0:128===b[0]&&1===b[1]}function p(a){for(var b=0,c=cc.length-1;c>b;){var d=b+c+1>>1;a=i)do l=i++,Kb&&61440===l&&(l=61472,i=l+1);while(void 0!==h[l]&&Jb>=i);f[l]=k,g[j]=l,h[l]=!0}return{toFontChar:g,charCodeToGlyphId:f,nextAvailableFontCharCode:i}}function r(a){var b=[];for(var c in a)b.push({fontCharCode:0|c,glyphId:a[c]});b.sort(function(a,b){return a.fontCharCode-b.fontCharCode});for(var d=[],e=b.length,f=0;e>f;){var g=b[f].fontCharCode,h=[b[f].glyphId];++f;for(var i=g;e>f&&i+1===b[f].fontCharCode&&(h.push(b[f].glyphId),++i,++f,65535!==i););d.push([g,i,h])}return d}function s(a){var b,c,d,e,f=r(a),g=f[f.length-1][1]>65535?2:1,h="\x00\x00"+j(g)+"\x00\x00"+k(4+8*g);for(b=f.length-1;b>=0&&!(f[b][0]<=65535);--b);var i=b+1;f[b][0]<65535&&65535===f[b][1]&&(f[b][1]=65534);var l,m,n,o,p=f[b][1]<65535?1:0,q=i+p,s=bc.getSearchParams(q,2),t="",u="",v="",w="",x="",y=0;for(b=0,c=i;c>b;b++){l=f[b],m=l[0],n=l[1],t+=j(m),u+=j(n),o=l[2];var z=!0;for(d=1,e=o.length;e>d;++d)if(o[d]!==o[d-1]+1){z=!1;break}if(z){var A=o[0];v+=j(A-m&65535),w+=j(0)}else{var B=2*(q-b)+2*y;for(y+=n-m+1,v+=j(0),w+=j(B),d=0,e=o.length;e>d;++d)x+=j(o[d])}}p>0&&(u+="ÿÿ",t+="ÿÿ",v+="\x00",w+="\x00\x00");var C="\x00\x00"+j(2*q)+j(s.range)+j(s.entry)+j(s.rangeShift)+u+"\x00\x00"+t+v+w+x,D="",E="";if(g>1){for(h+="\x00\x00\n"+k(4+8*g+4+C.length),D="",b=0,c=f.length;c>b;b++){l=f[b],m=l[0],o=l[2];var F=o[0];for(d=1,e=o.length;e>d;++d)o[d]!==o[d-1]+1&&(n=l[0]+d-1,D+=k(m)+k(n)+k(F),m=n+1,F=o[d]);D+=k(m)+k(l[1])+k(F)}E="\x00\f\x00\x00"+k(D.length+16)+"\x00\x00\x00\x00"+k(D.length/12)}return h+"\x00"+j(C.length+4)+C+E+D}function t(a){var b=new Mc(a.data),c=b.getUint16();b.getBytes(60);var d=b.getUint16();if(4>c&&768&d)return!1;var e=b.getUint16(),f=b.getUint16();if(e>f)return!1;b.getBytes(6);var g=b.getUint16();return 0===g?!1:(a.data[8]=a.data[9]=0,!0)}function u(a,b,d){d=d||{unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};var e=0,f=0,g=0,h=0,i=null,l=0;if(b)for(var m in b){m|=0,(i>m||!i)&&(i=m),m>l&&(l=m);var n=L(m);32>n?e|=1<n?f|=1<n?g|=1<n?h|=1< 123 are reserved for internal usage")}else i=0,l=255;var o=a.bbox||[0,0,0,0],p=d.unitsPerEm||1/(a.fontMatrix||T)[0],q=a.ascentScaled?1:p/Lb,r=d.ascent||Math.round(q*(a.ascent||o[3])),s=d.descent||Math.round(q*(a.descent||o[1]));s>0&&a.descent>0&&o[1]<0&&(s=-s);var t=d.yMax||r,u=-d.yMin||-s;return"\x00$ô\x00\x00\x00Š»\x00\x00\x00ŒŠ»\x00\x00ß\x001\x00\x00\x00\x00"+String.fromCharCode(a.fixedPitch?9:0)+"\x00\x00\x00\x00\x00\x00"+k(e)+k(f)+k(g)+k(h)+"*21*"+j(a.italicAngle?1:0)+j(i||a.firstChar)+j(l||a.lastChar)+j(r)+j(s)+"\x00d"+j(t)+j(u)+"\x00\x00\x00\x00\x00\x00\x00\x00"+j(a.xHeight)+j(a.capHeight)+j(0)+j(i||a.firstChar)+"\x00"}function v(a){var b=Math.floor(a.italicAngle*Math.pow(2,16));return"\x00\x00\x00"+k(b)+"\x00\x00\x00\x00"+k(a.fixedPitch)+"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"}function w(a,b){b||(b=[[],[]]);var c,d,e,f,g,h=[b[0][0]||"Original licence",b[0][1]||a,b[0][2]||"Unknown",b[0][3]||"uniqueID",b[0][4]||a,b[0][5]||"Version 0.11",b[0][6]||"",b[0][7]||"Unknown",b[0][8]||"Unknown",b[0][9]||"Unknown"],i=[];for(c=0,d=h.length;d>c;c++){g=b[1][c]||h[c];var k=[];for(e=0,f=g.length;f>e;e++)k.push(j(g.charCodeAt(e)));i.push(k.join(""))}var l=[h,i],m=["\x00","\x00"],n=["\x00\x00","\x00"],o=["\x00\x00"," "],p=h.length*m.length,q="\x00\x00"+j(p)+j(12*p+6),r=0;for(c=0,d=m.length;d>c;c++){var s=l[c];for(e=0,f=s.length;f>e;e++){g=s[e];var t=m[c]+n[c]+o[c]+j(e)+j(g.length)+j(r);q+=t,r+=g.length}}return q+=h.join("")+i.join("")}return d.getFontID=function(){var a=1;return function(){return String(a++)}}(),d.prototype={name:null,font:null,mimetype:null,encoding:null,get renderer(){var a=yc.create(this);return g(this,"renderer",a)},exportData:function(){var a={};for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},checkAndRepair:function(d,g,j){function k(a){var b=i(a.getBytes(4)),c=a.getInt32(),d=a.getInt32()>>>0,e=a.getInt32()>>>0,f=a.pos;a.pos=a.start?a.start:0,a.skip(d);var g=a.getBytes(e);return a.pos=f,"head"===b&&(g[8]=g[9]=g[10]=g[11]=0,g[17]|=32),{tag:b,checksum:c,length:e,offset:d,data:g}}function l(a){return{version:i(a.getBytes(4)),numTables:a.getUint16(),searchRange:a.getUint16(),entrySelector:a.getUint16(),rangeShift:a.getUint16()}}function m(a,c,d,e){var f,g=(c.start?c.start:0)+a.offset;c.pos=g;for(var h,i=(c.getUint16(),c.getUint16()),j=!1,k=0;i>k;k++){var l=c.getUint16(),m=c.getUint16(),n=c.getInt32()>>>0,o=!1;if(0===l&&0===m?o=!0:1===l&&0===m?o=!0:3!==l||1!==m||(d||!e)&&h?d&&3===l&&0===m&&(o=!0,j=!0):(o=!0,d||(j=!0)),o&&(h={platformId:l,encodingId:m,offset:n}),j)break}if(h&&(c.pos=g+h.offset),!h||-1===c.peekByte())return b("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var p,q,r=c.getUint16(),s=(c.getUint16(),c.getUint16(),!1),t=[];if(0===r){for(p=0;256>p;p++){var u=c.getByte();u&&t.push({charCode:p,glyphId:u})}s=!0}else if(4===r){var v=c.getUint16()>>1;c.getBytes(6);var w,x=[];for(w=0;v>w;w++)x.push({end:c.getUint16()});for(c.getUint16(),w=0;v>w;w++)x[w].start=c.getUint16();for(w=0;v>w;w++)x[w].delta=c.getUint16();var y=0;for(w=0;v>w;w++){f=x[w];var z=c.getUint16();if(z){var A=(z>>1)-(v-w);f.offsetIndex=A,y=Math.max(y,A+f.end-f.start+1)}else f.offsetIndex=-1}var B=[];for(p=0;y>p;p++)B.push(c.getUint16());for(w=0;v>w;w++){f=x[w],g=f.start;var C=f.end,D=f.delta;for(A=f.offsetIndex,p=g;C>=p;p++)65535!==p&&(q=0>A?p:B[A+p-g],q=q+D&65535,0!==q&&t.push({charCode:p,glyphId:q}))}}else{if(6!==r)return b("cmap table has unsupported format: "+r),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var E=c.getUint16(),F=c.getUint16();for(p=0;F>p;p++){q=c.getUint16();var G=E+p;t.push({charCode:G,glyphId:q})}}for(t.sort(function(a,b){return a.charCode-b.charCode}),k=1;ke&&(a("The numOfMetrics ("+f+") should not be greater than the numGlyphs ("+e+")"),f=e,c.data[34]=(65280&f)>>8,c.data[35]=255&f);var g=e-f,h=g-(d.length-4*f>>1);if(h>0){var i=new Uint8Array(d.length+2*h);i.set(d.data),d.data=i}}function o(a,b,c,d,e,f){if(12>=c-b)return 0;var g=a.subarray(b,c),h=g[0]<<8|g[1];if(32768&h)return d.set(g,e),g.length;var i,j=10,k=0;for(i=0;h>i;i++){var l=g[j]<<8|g[j+1];k=l+1,j+=2}var m=j,n=g[j]<<8|g[j+1];j+=2+n;var o=j,p=0;for(i=0;k>i;i++){var q=g[j++];192&q&&(g[j-1]=63&q);var r=(2&q?1:16&q?0:2)+(4&q?1:32&q?0:2);if(p+=r,8&q){var s=g[j++];i+=s,p+=s*r}}if(0===p)return 0;var t=j+p;return t>g.length?0:!f&&n>0?(d.set(g.subarray(0,m),e),d.set([0,0],e+m),d.set(g.subarray(o,t),e+m+2),t-=n,g.length-t>3&&(t=t+3&-4),t):g.length-t>3?(t=t+3&-4,d.set(g.subarray(0,t),e),t):(d.set(g,e),g.length)}function p(c,d,e){var g=c.data,i=h(g[0],g[1],g[2],g[3]);i>>16!==1&&(a("Attempting to fix invalid version in head table: "+i),g[0]=0,g[1]=1,g[2]=0,g[3]=0);var j=f(g[50],g[51]);if(0>j||j>1){a("Attempting to fix invalid indexToLocFormat in head table: "+j);var k=d+1;e===k<<1?(g[50]=0,g[51]=0):e===k<<2?(g[50]=0,g[51]=1):b("Could not fix indexToLocFormat: "+j)}}function r(a,b,c,d,e,f){var g,h,i;d?(g=4,h=function(a,b){return a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3]},i=function(a,b,c){a[b]=c>>>24&255,a[b+1]=c>>16&255,a[b+2]=c>>8&255,a[b+3]=255&c}):(g=2,h=function(a,b){return a[b]<<9|a[b+1]<<1},i=function(a,b,c){a[b]=c>>9&255,a[b+1]=c>>1&255});var j=a.data,k=g*(1+c);j.length!==k&&(j=new Uint8Array(k),j.set(a.data.subarray(0,k)),a.data=j);var l=b.data,m=l.length,n=new Uint8Array(m),p=h(j,0),q=0,r={};i(j,0,q);var s,t;for(s=0,t=g;c>s;s++,t+=g){var u=h(j,t);if(u>m&&(m+3&-4)===u&&(u=m),u>m)i(j,t,q),p=u;else{p===u&&(r[s]=!0);var v=o(l,p,u,n,q,e);q+=v,i(j,t,q),p=u}}if(0===q){var w=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(s=0,t=g;c>s;s++,t+=g)i(j,t,w.length);return b.data=w,r}if(f){var x=h(j,g);n.length>x+q?b.data=n.subarray(0,x+q):(b.data=new Uint8Array(x+q),b.data.set(n.subarray(0,q))),b.data.set(n.subarray(0,x),q),i(a.data,j.length-g,q+x)}else b.data=n.subarray(0,q);return r}function y(a,c,d){var e=(g.start?g.start:0)+a.offset;g.pos=e;var f=a.length,h=e+f,i=g.getInt32();g.getBytes(28);var j,k,l=!0;switch(i){case 65536:j=Yb;break;case 131072:var m=g.getUint16();if(m!==d){l=!1;break}var n=[];for(k=0;m>k;++k){var o=g.getUint16();if(o>=32768){l=!1;break}n.push(o)}if(!l)break;for(var p=[],q=[];g.posk;++k)q[k]=String.fromCharCode(g.getByte());p.push(q.join(""))}for(j=[],k=0;m>k;++k){var s=n[k];258>s?j.push(Yb[s]):j.push(p[s-258])}break;case 196608:break;default:b("Unknown/unsupported post table version "+i),l=!1,c.defaultEncoding&&(j=c.defaultEncoding)}return c.glyphNames=j,l}function z(a){var b=(g.start?g.start:0)+a.offset;g.pos=b;var c=[[],[]],d=a.length,e=b+d,f=g.getUint16(),h=6;if(0!==f||h>d)return c;var j,k,l=g.getUint16(),m=g.getUint16(),n=[],o=12;for(j=0;l>j&&g.pos+o<=e;j++){var p={platform:g.getUint16(),encoding:g.getUint16(),language:g.getUint16(),name:g.getUint16(),length:g.getUint16(),offset:g.getUint16()};(1===p.platform&&0===p.encoding&&0===p.language||3===p.platform&&1===p.encoding&&1033===p.language)&&n.push(p)}for(j=0,k=n.length;k>j;j++){var q=n[j],r=b+m+q.offset;if(!(r+q.length>e)){g.pos=r;var s=q.name;if(q.encoding){for(var t="",u=0,v=q.length;v>u;u+=2)t+=String.fromCharCode(g.getUint16());c[1][s]=t}else c[0][s]=i(g.getBytes(q.length))}}return c}function A(a,c){for(var d,e,f,g,h,i=a.data,j=0,k=0,l=0,m=[],n=[],o=[],p=c.tooComplexToFollowFunctions,q=!1,r=0,s=0,t=i.length;t>j;){var u=i[j++];if(64===u)if(e=i[j++],q||s)j+=e;else for(d=0;e>d;d++)m.push(i[j++]);else if(65===u)if(e=i[j++],q||s)j+=2*e;else for(d=0;e>d;d++)f=i[j++],m.push(f<<8|i[j++]);else if(176===(248&u))if(e=u-176+1,q||s)j+=e;else for(d=0;e>d;d++)m.push(i[j++]);else if(184===(248&u))if(e=u-184+1,q||s)j+=2*e;else for(d=0;e>d;d++)f=i[j++],m.push(f<<8|i[j++]);else if(43!==u||p)if(44!==u||p){if(45===u)if(q)q=!1,k=j;else{if(h=n.pop(),!h)return b("TT: ENDF bad stack"),void(c.hintsValid=!1);g=o.pop(),i=h.data,j=h.i,c.functionsStackDeltas[g]=m.length-h.stackTop}else if(137===u)(q||s)&&(b("TT: nested IDEFs not allowed"),p=!0),q=!0,l=j;else if(88===u)++r;else if(27===u)s=r;else if(89===u)s===r&&(s=0),--r;else if(28===u&&!q&&!s){var v=m[m.length-1];v>0&&(j+=v-1)}}else(q||s)&&(b("TT: nested FDEFs not allowed"),p=!0),q=!0,l=j,g=m.pop(),c.functionsDefined[g]={data:i,i:j};else if(!q&&!s)if(g=m[m.length-1],c.functionsUsed[g]=!0,g in c.functionsStackDeltas)m.length+=c.functionsStackDeltas[g];else if(g in c.functionsDefined&&o.indexOf(g)<0){if(n.push({data:i,i:j,stackTop:m.length-1}),o.push(g),h=c.functionsDefined[g],!h)return b("TT: CALL non-existent function"),void(c.hintsValid=!1);i=h.data,j=h.i}if(!q&&!s){var w=142>=u?F[u]:u>=192&&223>=u?-1:u>=224?-2:0;for(u>=113&&117>=u&&(e=m.pop(),e===e&&(w=2*-e));0>w&&m.length>0;)m.pop(),w++;for(;w>0;)m.push(NaN),w--}}c.tooComplexToFollowFunctions=p;var x=[i];j>i.length&&x.push(new Uint8Array(j-i.length)),l>k&&(b("TT: complementing a missing function tail"),x.push(new Uint8Array([34,45]))),C(a,x)}function B(a,c){if(!a.tooComplexToFollowFunctions){if(a.functionsDefined.length>c)return b("TT: more functions defined than expected"),void(a.hintsValid=!1);for(var d=0,e=a.functionsUsed.length;e>d;d++){if(d>c)return b("TT: invalid function id: "+d),void(a.hintsValid=!1);if(a.functionsUsed[d]&&!a.functionsDefined[d])return b("TT: undefined function: "+d),void(a.hintsValid=!1)}}}function C(a,b){if(b.length>1){var c,d,e=0;for(c=0,d=b.length;d>c;c++)e+=b[c].length;e=e+3&-4;var f=new Uint8Array(e),g=0;for(c=0,d=b.length;d>c;c++)f.set(b[c],g),g+=b[c].length;a.data=f,a.length=e}}function D(a,b,c){var d={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(a&&A(a,d),b&&A(b,d),a&&B(d,R),c&&1&c.length){var e=new Uint8Array(c.length+1);e.set(c.data),c.data=e}return d.hintsValid}function E(a,b,c){return V[a]?!aa&&b>=0&&$.has(b)?!0:!!(_&&c>=0&&x(_[c])):!0}var F=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];g=new Mc(new Uint8Array(g.getBytes()));for(var G,H,I,J=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "],K=l(g),L=K.numTables,M={"OS/2":null,cmap:null,head:null,hhea:null,hmtx:null,maxp:null,name:null,post:null},N=0;L>N;N++)I=k(g),J.indexOf(I.tag)<0||0!==I.length&&(M[I.tag]=I);var O=!M["CFF "];if(O)M.glyf&&M.loca||c('Required "glyf" or "loca" tables are not found'),this.isOpenType=!1;else{if("OTTO"===K.version&&"CIDFontType2"!==j.type||!M.head||!M.hhea||!M.maxp||!M.post)return H=new Mc(M["CFF "].data),G=new jc(H,j),this.convert(d,G,j);delete M.glyf,delete M.loca,delete M.fpgm,delete M.prep,delete M["cvt "],this.isOpenType=!0}M.maxp||c('Required "maxp" table is not found'),g.pos=(g.start||0)+M.maxp.offset;var P=g.getInt32(),Q=g.getUint16(),R=0;if(P>=65536&&M.maxp.length>=22){g.pos+=8;var S=g.getUint16();S>2&&(M.maxp.data[14]=0,M.maxp.data[15]=2),g.pos+=4,R=g.getUint16()}var T=!1;"CIDFontType2"===j.type&&j.toUnicode&&j.toUnicode.get(0)>"\x00"&&(T=!0,Q++,M.maxp.data[4]=Q>>8,M.maxp.data[5]=255&Q);var U=D(M.fpgm,M.prep,M["cvt "],R);U||(delete M.fpgm,delete M.prep,delete M["cvt "]),n(g,M.hhea,M.hmtx,Q),M.head||c('Required "head" table is not found'),p(M.head,Q,O?M.loca.length:0);var V={};if(O){var W=f(M.head.data[50],M.head.data[51]);V=r(M.loca,M.glyf,Q,W,U,T)}if(M.hhea||c('Required "hhea" table is not found'),0===M.hhea.data[10]&&0===M.hhea.data[11]&&(M.hhea.data[10]=255,M.hhea.data[11]=255),M.post){var X=y(M.post,j,Q);X||(M.post=null)}var Y,Z=[],$=j.toUnicode,_=j.widths,aa=$ instanceof ac||65536===$.length;if("CIDFontType2"===j.type){var ba=j.cidToGidMap||[],ca=0===ba.length;j.cMap.forEach(function(a,b){e(65535>=b,"Max size of CID is 65,535");var c=-1;ca?c=a:void 0!==ba[b]&&(c=ba[b]),c>=0&&Q>c&&E(c,a,b)&&(Z[a]=c)}),T&&(Z[0]=Q-1)}else{var da=j.differences.length>0||!!j.baseEncodingName,ea=m(M.cmap,g,this.isSymbolicFont,da),fa=ea.platformId,ga=ea.encodingId,ha=ea.mappings,ia=ha.length;if(da&&(3===fa&&1===ga||1===fa&&0===ga)||-1===fa&&-1===ga&&Pb[j.baseEncodingName]){var ja=[];for("MacRomanEncoding"!==j.baseEncodingName&&"WinAnsiEncoding"!==j.baseEncodingName||(ja=Pb[j.baseEncodingName]),Y=0;256>Y;Y++){var ka;if(ka=this.differences&&Y in this.differences?this.differences[Y]:Y in ja&&""!==ja[Y]?ja[Y]:Pb.StandardEncoding[Y]){var la,ma=!1;3===fa&&1===ga?(la=zc[ka],ma=!0):1===fa&&0===ga&&(la=Pb.MacRomanEncoding.indexOf(ka));var na=!1;for(N=0;ia>N;++N)if(ha[N].charCode===la){var oa=ma?Y:la;if(E(ha[N].glyphId,oa,-1)){Z[Y]=ha[N].glyphId,na=!0;break}}if(!na&&j.glyphNames){var pa=j.glyphNames.indexOf(ka);pa>0&&E(pa,-1,-1)?Z[Y]=pa:Z[Y]=0}}}}else if(0===fa&&0===ga)for(N=0;ia>N;++N)Z[ha[N].charCode]=ha[N].glyphId;else for(N=0;ia>N;++N)Y=255&ha[N].charCode,Z[Y]=ha[N].glyphId}0===Z.length&&(Z[0]=0);var qa=q(Z,j);if(this.toFontChar=qa.toFontChar,M.cmap={tag:"cmap",data:s(qa.charCodeToGlyphId)},!M["OS/2"]||!t(M["OS/2"])){var ra={unitsPerEm:f(M.head.data[18],M.head.data[19]),yMax:f(M.head.data[42],M.head.data[43]),yMin:f(M.head.data[38],M.head.data[39])-65536,ascent:f(M.hhea.data[4],M.hhea.data[5]),descent:f(M.hhea.data[6],M.hhea.data[7])-65536};M["OS/2"]={tag:"OS/2",data:u(j,qa.charCodeToGlyphId,ra)}}if(M.post||(M.post={tag:"post",data:v(j)}),!O)try{H=new Mc(M["CFF "].data);var sa=new kc(H,j);G=sa.parse();var ta=new xc(G);M["CFF "].data=ta.compile()}catch(ua){b("Failed to compile font "+j.loadedName)}if(M.name){var va=z(M.name);M.name.data=w(d,va)}else M.name={tag:"name",data:w(this.name)};var wa=new bc(K.version);for(var xa in M)wa.addTable(xa,M[xa].data);return wa.toArray()},convert:function(a,b,c){function d(a,b){var c=null;for(var d in a)b===a[d]&&(c||(c=[]),c.push(0|d));return c}function e(a,b){for(var c in a)if(b===a[c])return 0|c;return g.charCodeToGlyphId[g.nextAvailableFontCharCode]=b,g.nextAvailableFontCharCode++}c.fixedPitch=!1;var f=b.getGlyphMapping(c),g=q(f,c);this.toFontChar=g.toFontChar;var h=b.numGlyphs,i=b.seacs;if(Nb&&i&&i.length){var k=c.fontMatrix||T,m=b.getCharset(),n=Object.create(null);for(var o in i){o|=0;var p=i[o],r=Pb.StandardEncoding[p[2]],t=Pb.StandardEncoding[p[3]],x=m.indexOf(r),y=m.indexOf(t);if(!(0>x||0>y)){var z={x:p[0]*k[0]+p[1]*k[2]+k[4],y:p[0]*k[1]+p[1]*k[3]+k[5]},A=d(f,o);if(A)for(var B=0,C=A.length;C>B;B++){var D=A[B],E=g.charCodeToGlyphId,F=e(E,x),G=e(E,y);n[D]={baseFontCharCode:F,accentFontCharCode:G,accentOffset:z}}}}c.seacMap=n}var H=1/(c.fontMatrix||T)[0],I=new bc("OTTO");return I.addTable("CFF ",b.data),I.addTable("OS/2",u(c,g.charCodeToGlyphId)),I.addTable("cmap",s(g.charCodeToGlyphId)),I.addTable("head","\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00_<õ\x00\x00"+l(H)+"\x00\x00\x00\x00ž\x0B~'\x00\x00\x00\x00ž\x0B~'\x00\x00"+l(c.descent)+"ÿ"+l(c.ascent)+j(c.italicAngle?2:0)+"\x00\x00\x00\x00\x00\x00\x00"),I.addTable("hhea","\x00\x00\x00"+l(c.ascent)+l(c.descent)+"\x00\x00ÿÿ\x00\x00\x00\x00\x00\x00"+l(c.capHeight)+l(Math.tan(c.italicAngle)*c.xHeight)+"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"+j(h)),I.addTable("hmtx",function(){for(var a=b.charstrings,c=b.cff?b.cff.widths:null,d="\x00\x00\x00\x00",e=1,f=h;f>e;e++){var g=0;if(a){var i=a[e-1];g="width"in i?i.width:0}else c&&(g=Math.ceil(c[e]||0));d+=j(g)+j(0)}return d}()),I.addTable("maxp","\x00\x00P\x00"+j(h)),I.addTable("name",w(a)),I.addTable("post",v(c)),I.toArray()},buildToUnicode:function(a){if(a.toUnicode&&0!==a.toUnicode.length)return a.toUnicode;var b,c;if(!a.composite){b=[];var d=a.defaultEncoding.slice(),f=a.baseEncodingName,g=a.differences;for(c in g)d[c]=g[c];for(c in d){var h=d[c];if(""!==h)if(void 0!==zc[h])b[c]=String.fromCharCode(zc[h]);else{var i=0;switch(h[0]){case"G":3===h.length&&(i=parseInt(h.substr(1),16));break;case"g":5===h.length&&(i=parseInt(h.substr(1),16));break;case"C":case"c":h.length>=3&&(i=+h.substr(1))}if(i){if(f&&i===+c){var j=Pb[f];if(j&&(h=j[c])){b[c]=String.fromCharCode(zc[h]);continue}}b[c]=String.fromCharCode(i)}}}return new _b(b)}if(a.composite&&(a.cMap.builtInCMap&&!(a.cMap instanceof Fb)||"Adobe"===a.cidSystemInfo.registry&&("GB1"===a.cidSystemInfo.ordering||"CNS1"===a.cidSystemInfo.ordering||"Japan1"===a.cidSystemInfo.ordering||"Korea1"===a.cidSystemInfo.ordering))){var k=a.cidSystemInfo.registry,l=a.cidSystemInfo.ordering,m=new ya(k+"-"+l+"-UCS2"),n=Hb.create(m,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),o=a.cMap;return b=[],o.forEach(function(a,c){e(65535>=c,"Max size of CID is 65,535");var d=n.lookup(c);d&&(b[a]=String.fromCharCode((d.charCodeAt(0)<<8)+d.charCodeAt(1)))}),new _b(b)}return new ac(a.firstChar,a.lastChar)},get spaceWidth(){if("_shadowWidth"in this)return this._shadowWidth;for(var a,b=["space","minus","one","i"],c=0,d=b.length;d>c;c++){var e=b[c];if(e in this.widths){a=this.widths[e];break}var f=zc[e],g=0;if(this.composite&&this.cMap.contains(f)&&(g=this.cMap.lookup(f)),!g&&"toUnicode"in this&&(g=this.toUnicode.charCodeOf(f)),0>=g&&(g=f),a=this.widths[g])break}return a=a||this.defaultWidth,this._shadowWidth=a,a},charToGlyph:function(a){var b,c,d,e=a;this.cMap&&this.cMap.contains(a)&&(e=this.cMap.lookup(a)),c=this.widths[e],c=x(c)?c:this.defaultWidth;var f=this.vmetrics&&this.vmetrics[e],g=this.toUnicode.get(a)||a;"number"==typeof g&&(g=String.fromCharCode(g)),b=this.toFontChar[a]||a,this.missingFile&&(b=K(b)),this.isType3Font&&(d=b);var h=null;if(this.seacMap&&this.seacMap[a]){var i=this.seacMap[a];b=i.baseFontCharCode,h={fontChar:String.fromCharCode(i.accentFontCharCode),offset:i.accentOffset}}var j=String.fromCharCode(b),k=this.glyphCache[a];return k&&k.matchesForCache(j,g,h,c,f,d)||(k=new $b(j,g,h,c,f,d),this.glyphCache[a]=k),k},charsToGlyphs:function(a){var b,c,d,e=this.charsCache;if(e&&(b=e[a]))return b;e||(e=this.charsCache=Object.create(null)),b=[];var f,g=a,h=0;if(this.cMap)for(var i={};hh;++h)d=a.charCodeAt(h),c=this.charToGlyph(d),b.push(c),32===d&&b.push(null);return e[g]=b}},d}(),ec=function(){function a(a){this.error=a,this.loadedName="g_font_error",this.loading=!1}return a.prototype={charsToGlyphs:function(){return[]},exportData:function(){return{error:this.error}}},a}(),fc=function(){function a(){this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}var c={hstem:[1],vstem:[3],vmoveto:[4],rlineto:[5],hlineto:[6],vlineto:[7],rrcurveto:[8],callsubr:[10],flex:[12,35],drop:[12,18],endchar:[14],rmoveto:[21],hmoveto:[22],vhcurveto:[30],hvcurveto:[31]};return a.prototype={convert:function(a,d){for(var e,f,g,h=a.length,i=!1,j=0;h>j;j++){var k=a[j];if(32>k){switch(12===k&&(k=(k<<8)+a[++j]),k){case 1:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.hstem);break;case 3:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.vstem);break;case 4:if(this.flexing){if(this.stack.length<1){i=!0;break}var l=this.stack.pop();this.stack.push(0,l);break}i=this.executeCommand(1,c.vmoveto);break;case 5:i=this.executeCommand(2,c.rlineto);break;case 6:i=this.executeCommand(1,c.hlineto);break;case 7:i=this.executeCommand(1,c.vlineto);break;case 8:i=this.executeCommand(6,c.rrcurveto);break;case 9:this.stack=[];break;case 10:if(this.stack.length<1){i=!0;break}g=this.stack.pop(),i=this.convert(d[g],d);break;case 11:return i;case 13:if(this.stack.length<2){i=!0;break}e=this.stack.pop(),f=this.stack.pop(),this.lsb=f,this.width=e,this.stack.push(e,f),i=this.executeCommand(2,c.hmoveto);break;case 14:this.output.push(c.endchar[0]);break;case 21:if(this.flexing)break;i=this.executeCommand(2,c.rmoveto);break;case 22:if(this.flexing){this.stack.push(0);break}i=this.executeCommand(1,c.hmoveto);break;case 30:i=this.executeCommand(4,c.vhcurveto);break;case 31:i=this.executeCommand(4,c.hvcurveto);break;case 3072:this.stack=[];break;case 3073:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.vstem);break;case 3074:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.hstem);break;case 3078:Nb?(this.seac=this.stack.splice(-4,4),i=this.executeCommand(0,c.endchar)):i=this.executeCommand(4,c.endchar);break;case 3079:if(this.stack.length<4){i=!0;break}this.stack.pop();e=this.stack.pop();var m=this.stack.pop();f=this.stack.pop(),this.lsb=f,this.width=e,this.stack.push(e,f,m),i=this.executeCommand(3,c.rmoveto);break;case 3084:if(this.stack.length<2){i=!0;break}var n=this.stack.pop(),o=this.stack.pop();this.stack.push(o/n);break;case 3088:if(this.stack.length<2){i=!0;break}g=this.stack.pop();var p=this.stack.pop();if(0===g&&3===p){var q=this.stack.splice(this.stack.length-17,17);this.stack.push(q[2]+q[0],q[3]+q[1],q[4],q[5],q[6],q[7],q[8],q[9],q[10],q[11],q[12],q[13],q[14]),i=this.executeCommand(13,c.flex,!0),this.flexing=!1,this.stack.push(q[15],q[16])}else 1===g&&0===p&&(this.flexing=!0);break;case 3089:break;case 3105:this.stack=[];break;default:b('Unknown type 1 charstring command of "'+k+'"')}if(i)break}else 246>=k?k-=139:k=250>=k?256*(k-247)+a[++j]+108:254>=k?-(256*(k-251))-a[++j]-108:(255&a[++j])<<24|(255&a[++j])<<16|(255&a[++j])<<8|(255&a[++j])<<0,this.stack.push(k)}return i},executeCommand:function(a,b,c){var d=this.stack.length;if(a>d)return!0;for(var e=d-a,f=e;d>f;f++){var g=this.stack[f];g===(0|g)?this.output.push(28,g>>8&255,255&g):(g=65536*g|0,this.output.push(255,g>>24&255,g>>16&255,g>>8&255,255&g))}return this.output.push.apply(this.output,b),c?this.stack.splice(e,a):this.stack.length=0,!1}},a}(),gc=function(){function a(a){return a>=48&&57>=a||a>=65&&70>=a||a>=97&&102>=a}function b(a,b,c){for(var d=0|b,e=52845,f=22719,g=a.length,h=new Uint8Array(g),i=0;g>i;i++){var j=a[i];h[i]=j^d>>8,d=(j+d)*e+f&65535}return Array.prototype.slice.call(h,c)}function c(b,c,d){var e,f,g=0|c,h=52845,i=22719,j=b.length,k=j>>>1,l=new Uint8Array(k);for(e=0,f=0;j>e;e++){var m=b[e];if(a(m)){e++;for(var n;j>e&&!a(n=b[e]);)e++;if(j>e){var o=parseInt(String.fromCharCode(m,n),16);l[f++]=o^g>>8,g=(o+g)*h+i&65535}}}return Array.prototype.slice.call(l,d,f)}function d(a){return 47===a||91===a||93===a||123===a||125===a||40===a||41===a}function e(d,e){if(e){var g=d.getBytes(),h=!(a(g[0])&&a(g[1])&&a(g[2])&&a(g[3]));d=new Mc(h?b(g,f,4):c(g,f,4))}this.stream=d,this.nextChar()}var f=55665,g=4330;return e.prototype={readNumberArray:function(){this.getToken();for(var a=[];;){var b=this.getToken();if(null===b||"]"===b||"}"===b)break;a.push(parseFloat(b||0))}return a},readNumber:function(){var a=this.getToken();return parseFloat(a||0)},readInt:function(){var a=this.getToken();return 0|parseInt(a||0,10)},readBoolean:function(){var a=this.getToken();return"true"===a?1:0},nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){for(var a=!1,b=this.currentChar;;){if(-1===b)return null;if(a)10!==b&&13!==b||(a=!1);else if(37===b)a=!0;else if(!Gc.isSpace(b))break;b=this.nextChar()}if(d(b))return this.nextChar(),String.fromCharCode(b);var c="";do c+=String.fromCharCode(b),b=this.nextChar();while(b>=0&&!Gc.isSpace(b)&&!d(b));return c},extractFontProgram:function(){for(var a,c,d,e,f,h=this.stream,i=[],j=[],k={subrs:[],charstrings:[],properties:{privateData:{lenIV:4}}};null!==(a=this.getToken());)if("/"===a)switch(a=this.getToken()){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();;){if(a=this.getToken(),null===a||"end"===a)break;if("/"===a){var l=this.getToken();c=this.readInt(),this.getToken(),d=h.makeSubStream(h.pos,c),e=k.properties.privateData.lenIV,f=b(d.getBytes(),g,e),h.skip(c),this.nextChar(),a=this.getToken(),"noaccess"===a&&this.getToken(),j.push({glyph:l,encoded:f})}}break;case"Subrs":this.readInt();for(this.getToken();"dup"===(a=this.getToken());){var m=this.readInt();c=this.readInt(),this.getToken(),d=h.makeSubStream(h.pos,c),e=k.properties.privateData.lenIV,f=b(d.getBytes(),g,e),h.skip(c),this.nextChar(),a=this.getToken(),"noaccess"===a&&this.getToken(),i[m]=f}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":var n=this.readNumberArray();n.length>0&&n.length%2===0&&Mb&&(k.properties.privateData[a]=n);break;case"StemSnapH":case"StemSnapV":k.properties.privateData[a]=this.readNumberArray();break;case"StdHW":case"StdVW":k.properties.privateData[a]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":case"ExpansionFactor":k.properties.privateData[a]=this.readNumber();break;case"ForceBold":k.properties.privateData[a]=this.readBoolean()}for(var o=0;og;g++){for(b=this.getToken();"dup"!==b&&"def"!==b;)if(b=this.getToken(),null===b)return;if("def"===b)break;var h=this.readInt();this.getToken();var i=this.getToken();d[h]=i,this.getToken()}}else d=Pb[e];a.builtInEncoding=d;break;case"FontBBox":var j=this.readNumberArray();a.ascent=j[3],a.descent=j[1],a.ascentScaled=!0}}},e}(),hc=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],ic=function(a,b,c){ +var d=6,e=c.length1,f=c.length2,g=b.peekBytes(d),h=128===g[0]&&1===g[1];h&&(b.skip(d),e=g[5]<<24|g[4]<<16|g[3]<<8|g[2]);var i=new Mc(b.getBytes(e)),j=new gc(i);j.extractFontHeader(c),h&&(g=b.getBytes(d),f=g[5]<<24|g[4]<<16|g[3]<<8|g[2]);var k=new Mc(b.getBytes(f)),l=new gc(k,!0),m=l.extractFontProgram();for(var n in m.properties)c[n]=m.properties[n];var o=m.charstrings,p=this.getType2Charstrings(o),q=this.getType2Subrs(m.subrs);this.charstrings=o,this.data=this.wrap(a,p,this.charstrings,q,c),this.seacs=this.getSeacs(m.charstrings)};ic.prototype={get numGlyphs(){return this.charstrings.length+1},getCharset:function(){for(var a=[".notdef"],b=this.charstrings,c=0;c=0&&(f[g]=b)}return Q(a,f,d)},getSeacs:function(a){var b,c,d=[];for(b=0,c=a.length;c>b;b++){var e=a[b];e.seac&&(d[b+1]=e.seac)}return d},getType2Charstrings:function(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c].charstring);return b},getType2Subrs:function(a){var b=0,c=a.length;b=1133>c?107:33769>c?1131:32768;var d,e=[];for(d=0;b>d;d++)e.push([11]);for(d=0;c>d;d++)e.push(a[d]);return e},wrap:function(a,b,c,d,e){var f=new lc;f.header=new mc(1,0,4,4),f.names=[a];var g=new qc;g.setByName("version",391),g.setByName("Notice",392),g.setByName("FullName",393),g.setByName("FamilyName",394),g.setByName("Weight",395),g.setByName("Encoding",null),g.setByName("FontMatrix",e.fontMatrix),g.setByName("FontBBox",e.bbox),g.setByName("charset",null),g.setByName("CharStrings",null),g.setByName("Private",null),f.topDict=g;var h=new nc;h.add("Version 0.11"),h.add("See original notice"),h.add(a),h.add(a),h.add("Medium"),f.strings=h,f.globalSubrIndex=new oc;var i,j,k=b.length,l=[0];for(i=0;k>i;i++){var m=hc.indexOf(c[i].glyphName);-1===m&&(m=0),l.push(m>>8&255,255&m)}f.charset=new tc(!1,0,[],l);var n=new oc;for(n.add([139,14]),i=0;k>i;i++)n.add(b[i]);f.charStrings=n;var o=new rc;o.setByName("Subrs",null);var p=["BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for(i=0,j=p.length;j>i;i++){var q=p[i];if(e.privateData.hasOwnProperty(q)){var r=e.privateData[q];if(C(r))for(var s=r.length-1;s>0;s--)r[s]-=r[s-1];o.setByName(q,r)}}f.topDict.privateDict=o;var t=new oc;for(i=0,j=d.length;j>i;i++)t.add(d[i]);o.subrsIndex=t;var u=new xc(f);return u.compile()}};var jc=function(){function a(a,c){this.properties=c;var d=new kc(a,c);this.cff=d.parse();var e=new xc(this.cff);this.seacs=this.cff.seacs;try{this.data=e.compile()}catch(f){b("Failed to compile font "+c.loadedName),this.data=a}}return a.prototype={get numGlyphs(){return this.cff.charStrings.count},getCharset:function(){return this.cff.charset.charset},getGlyphMapping:function(){var a,b,c=this.cff,d=this.properties,e=c.charset.charset;if(d.composite){if(a=Object.create(null),c.isCIDFont)for(b=0;bq;++q){var s=p.get(q),t=this.createDict(qc,this.parseDict(s),b.strings);this.parsePrivateDict(t),b.fdArray.push(t)}o=null,n=this.parseCharsets(i.getByName("charset"),b.charStrings.count,b.strings,!0),b.fdSelect=this.parseFDSelect(i.getByName("FDSelect"),b.charStrings.count)}else n=this.parseCharsets(i.getByName("charset"),b.charStrings.count,b.strings,!1),o=this.parseEncoding(i.getByName("Encoding"),a,b.strings,n.charset);return b.charset=n,b.encoding=o,b},parseHeader:function(){for(var b=this.bytes,d=b.length,e=0;d>e&&1!==b[e];)++e;e>=d?c("Invalid CFF header"):0!==e&&(a("cff data is shifted"),b=b.subarray(e),this.bytes=b);var f=b[0],g=b[1],h=b[2],i=b[3],j=new mc(f,g,h,i);return{obj:j,endPos:h}},parseDict:function(a){function b(){var b=a[e++];return 30===b?d(e):28===b?(b=a[e++],b=(b<<24|a[e++]<<16)>>16):29===b?(b=a[e++],b=b<<8|a[e++],b=b<<8|a[e++],b=b<<8|a[e++]):b>=32&&246>=b?b-139:b>=247&&250>=b?256*(b-247)+a[e++]+108:b>=251&&254>=b?-(256*(b-251))-a[e++]-108:(c("255 is not a valid DICT command"),-1)}function d(){for(var b="",c=15,d=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],f=a.length;f>e;){var g=a[e++],h=g>>4,i=15&g;if(h===c)break;if(b+=d[h],i===c)break;b+=d[i]}return parseFloat(b)}var e=0,f=[],g=[];e=0;for(var h=a.length;h>e;){var i=a[e];21>=i?(12===i&&(i=i<<8|a[++e]),g.push([i,f]),f=[],++e):f.push(b())}return g},parseIndex:function(a){var b,c,d=new oc,e=this.bytes,f=e[a++]<<8|e[a++],g=[],h=a;if(0!==f){var i=e[a++],j=a+(f+1)*i-1;for(b=0,c=f+1;c>b;++b){for(var k=0,l=0;i>l;++l)k<<=8,k+=e[a++];g.push(j+k)}h=g[f]}for(b=0,c=g.length-1;c>b;++b){var m=g[b],n=g[b+1];d.add(e.subarray(m,n))}return{obj:d,endPos:h}},parseNameIndex:function(a){for(var b=[],c=0,d=a.count;d>c;++c){for(var e=a.get(c),f=Math.min(e.length,127),g=[],h=0;f>h;++h){var j=e[h];(0!==h||0!==j)&&(33>j||j>126||91===j||93===j||40===j||41===j||123===j||125===j||60===j||62===j||47===j||37===j||35===j)?g[h]=95:g[h]=j}b.push(i(g))}return b},parseStringIndex:function(a){for(var b=new nc,c=0,d=a.count;d>c;++c){var e=a.get(c);b.add(i(e))}return b},createDict:function(a,b,c){for(var d=new a(c),e=0,f=b.length;f>e;++e){var g=b[e],h=g[0],i=g[1];d.setByKey(h,i)}return d},parseCharStrings:function(a){for(var c=this.parseIndex(a).obj,d=[],g=[],h=c.count,i=0;h>i;i++){for(var j=c.get(i),k=0,l=[],m=!0,n=0,o=!0,p=j,q=p.length,r=!0,s=0;q>s;){var t=p[s++],u=null;if(12===t){var v=p[s++];0===v?(p[s-2]=139,p[s-1]=22,k=0):u=f[v]}else 28===t?(l[k]=(p[s]<<24|p[s+1]<<16)>>16,s+=2,k++):14===t?(k>=4&&(k-=4,Nb&&(d[i]=l.slice(k,k+4),o=!1)),u=e[t]):t>=32&&246>=t?(l[k]=t-139,k++):t>=247&&254>=t?(l[k]=251>t?(t-247<<8)+p[s]+108:-(t-251<<8)-p[s]-108,s++,k++):255===t?(l[k]=(p[s]<<24|p[s+1]<<16|p[s+2]<<8|p[s+3])/65536,s+=4,k++):19===t||20===t?(n+=k>>1,s+=n+7>>3,k%=2,u=e[t]):u=e[t];if(u){if(u.stem&&(n+=k>>1),"min"in u&&!m&&k=2&&u.stem?k%=2:k>1&&b("Found too many parameters for stack-clearing command"),k>0&&l[k-1]>=0&&(g[i]=l[k-1])),"stackDelta"in u?("stackFn"in u&&u.stackFn(l,k),k+=u.stackDelta):u.stackClearing?k=0:u.resetStack?(k=0,m=!1):u.undefStack&&(k=0,m=!0,r=!1)}}o||c.set(i,new Uint8Array([14]))}return{charStrings:c,seacs:d,widths:g}},emptyPrivateDictionary:function(a){var b=this.createDict(rc,[],a.strings);a.setByKey(18,[0,0]),a.privateDict=b},parsePrivateDict:function(a){if(!a.hasName("Private"))return void this.emptyPrivateDictionary(a);var b=a.getByName("Private");if(!C(b)||2!==b.length)return void a.removeByName("Private");var c=b[0],d=b[1];if(0===c||d>=this.bytes.length)return void this.emptyPrivateDictionary(a);var e=d+c,f=this.bytes.subarray(d,e),g=this.parseDict(f),h=this.createDict(rc,g,a.strings);if(a.privateDict=h,h.getByName("Subrs")){var i=h.getByName("Subrs"),j=d+i;if(0===i||j>=this.bytes.length)return void this.emptyPrivateDictionary(a);var k=this.parseIndex(j);h.subrsIndex=k.obj}},parseCharsets:function(a,b,d,e){if(0===a)return new tc(!0,sc.ISO_ADOBE,Ja);if(1===a)return new tc(!0,sc.EXPERT,Ka);if(2===a)return new tc(!0,sc.EXPERT_SUBSET,La);var f,g,h,i=this.bytes,j=a,k=i[a++],l=[".notdef"];switch(b-=1,k){case 0:for(h=0;b>h;h++)f=i[a++]<<8|i[a++],l.push(e?f:d.get(f));break;case 1:for(;l.length<=b;)for(f=i[a++]<<8|i[a++],g=i[a++],h=0;g>=h;h++)l.push(e?f++:d.get(f++));break;case 2:for(;l.length<=b;)for(f=i[a++]<<8|i[a++],g=i[a++]<<8|i[a++],h=0;g>=h;h++)l.push(e?f++:d.get(f++));break;default:c("Unknown charset format")}var m=a,n=i.subarray(j,m);return new tc(!1,k,l,n)},parseEncoding:function(a,b,d,e){function f(){var b=k[a++];for(h=0;b>h;h++){var c=k[a++],f=(k[a++]<<8)+(255&k[a++]);j[c]=e.indexOf(d.get(f))}}var g,h,i,j={},k=this.bytes,l=!1,m=!1,n=null;if(0===a||1===a){l=!0,g=a;var o=a?Pb.ExpertEncoding:Pb.StandardEncoding;for(h=0,i=e.length;i>h;h++){var p=o.indexOf(e[h]);-1!==p&&(j[p]=h)}}else{var q=a;switch(g=k[a++],127&g){case 0:var r=k[a++];for(h=1;r>=h;h++)j[k[a++]]=h;break;case 1:var s=k[a++],t=1;for(h=0;s>h;h++)for(var u=k[a++],v=k[a++],w=u;u+v>=w;w++)j[w]=t++;break;default:c("Unknow encoding format: "+g+" in CFF")}var x=a;128&g&&(k[q]&=127,f(),m=!0),n=k.subarray(q,x)}return g=127&g,new uc(l,g,j,n)},parseFDSelect:function(a,b){var d,e=a,f=this.bytes,g=f[a++],h=[];switch(g){case 0:for(d=0;b>d;++d){var i=f[a++];h.push(i)}break;case 3:var j=f[a++]<<8|f[a++];for(d=0;j>d;++d)for(var k=f[a++]<<8|f[a++],l=f[a++],m=f[a]<<8|f[a+1],n=k;m>n;++n)h.push(l);a+=2;break;default:c("Unknown fdselect format "+g)}var o=a;return new vc(h,f.subarray(e,o))}},d}(),lc=function(){function a(){this.header=null,this.names=[],this.topDict=null,this.strings=new nc,this.globalSubrIndex=null,this.encoding=null,this.charset=null,this.charStrings=null,this.fdArray=[],this.fdSelect=null,this.isCIDFont=!1}return a}(),mc=function(){function a(a,b,c,d){this.major=a,this.minor=b,this.hdrSize=c,this.offSize=d}return a}(),nc=function(){function a(){this.strings=[]}return a.prototype={get:function(a){return a>=0&&390>=a?hc[a]:a-391<=this.strings.length?this.strings[a-391]:hc[0]},add:function(a){this.strings.push(a)},get count(){return this.strings.length}},a}(),oc=function(){function a(){this.objects=[],this.length=0}return a.prototype={add:function(a){this.length+=a.length,this.objects.push(a)},set:function(a,b){this.length+=b.length-this.objects[a].length,this.objects[a]=b},get:function(a){return this.objects[a]},get count(){return this.objects.length}},a}(),pc=function(){function a(a,b){this.keyToNameMap=a.keyToNameMap,this.nameToKeyMap=a.nameToKeyMap,this.defaults=a.defaults,this.types=a.types,this.opcodes=a.opcodes,this.order=a.order,this.strings=b,this.values={}}return a.prototype={setByKey:function(a,b){if(!(a in this.keyToNameMap))return!1;if(0===b.length)return!0;var c=this.types[a];return"num"!==c&&"sid"!==c&&"offset"!==c||(b=b[0]),this.values[a]=b,!0},setByName:function(a,b){a in this.nameToKeyMap||c('Invalid dictionary name "'+a+'"'),this.values[this.nameToKeyMap[a]]=b},hasName:function(a){return this.nameToKeyMap[a]in this.values},getByName:function(a){a in this.nameToKeyMap||c('Invalid dictionary name "'+a+'"');var b=this.nameToKeyMap[a];return b in this.values?this.values[b]:this.defaults[b]},removeByName:function(a){delete this.values[this.nameToKeyMap[a]]}},a.createTables=function(a){for(var b={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]},c=0,d=a.length;d>c;++c){var e=a[c],f=C(e[0])?(e[0][0]<<8)+e[0][1]:e[0];b.keyToNameMap[f]=e[1],b.nameToKeyMap[e[1]]=f,b.types[f]=e[2],b.defaults[f]=e[3],b.opcodes[f]=C(e[0])?e[0]:[e[0]],b.order.push(f)}return b},a}(),qc=function(){function a(a){null===c&&(c=pc.createTables(b)),pc.call(this,c,a),this.privateDict=null}var b=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]],c=null;return a.prototype=Object.create(pc.prototype),a}(),rc=function(){function a(a){null===c&&(c=pc.createTables(b)),pc.call(this,c,a),this.subrsIndex=null}var b=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]],c=null;return a.prototype=Object.create(pc.prototype),a}(),sc={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2},tc=function(){function a(a,b,c,d){this.predefined=a,this.format=b,this.charset=c,this.raw=d}return a}(),uc=function(){function a(a,b,c,d){this.predefined=a,this.format=b,this.encoding=c,this.raw=d}return a}(),vc=function(){function a(a,b){this.fdSelect=a,this.raw=b}return a}(),wc=function(){function a(){this.offsets={}}return a.prototype={isTracking:function(a){return a in this.offsets},track:function(a,b){a in this.offsets&&c("Already tracking location of "+a),this.offsets[a]=b},offset:function(a){for(var b in this.offsets)this.offsets[b]+=a},setEntryLocation:function(a,b,d){a in this.offsets||c("Not tracking location of "+a);for(var e=d.data,f=this.offsets[a],g=5,h=0,i=b.length;i>h;++h){var j=h*g+f,k=j+1,l=j+2,m=j+3,n=j+4;29===e[j]&&0===e[k]&&0===e[l]&&0===e[m]&&0===e[n]||c("writing to an offset that is not empty");var o=b[h];e[j]=29,e[k]=o>>24&255,e[l]=o>>16&255,e[m]=o>>8&255,e[n]=255&o}}},a}(),xc=function(){function a(a){this.cff=a}return a.prototype={compile:function(){var a=this.cff,b={data:[],length:0,add:function(a){this.data=this.data.concat(a),this.length=this.data.length}},c=this.compileHeader(a.header);b.add(c);var d=this.compileNameIndex(a.names);if(b.add(d),a.isCIDFont&&a.topDict.hasName("FontMatrix")){var e=a.topDict.getByName("FontMatrix");a.topDict.removeByName("FontMatrix");for(var f=0,g=a.fdArray.length;g>f;f++){var h=a.fdArray[f],i=e.slice(0);h.hasName("FontMatrix")&&(i=na.transform(i,h.getByName("FontMatrix"))),h.setByName("FontMatrix",i)}}var j=this.compileTopDicts([a.topDict],b.length,a.isCIDFont);b.add(j.output);var k=j.trackers[0],l=this.compileStringIndex(a.strings.strings);b.add(l);var m=this.compileIndex(a.globalSubrIndex);if(b.add(m),a.encoding&&a.topDict.hasName("Encoding"))if(a.encoding.predefined)k.setEntryLocation("Encoding",[a.encoding.format],b);else{var n=this.compileEncoding(a.encoding);k.setEntryLocation("Encoding",[b.length],b),b.add(n)}if(a.charset&&a.topDict.hasName("charset"))if(a.charset.predefined)k.setEntryLocation("charset",[a.charset.format],b);else{var o=this.compileCharset(a.charset);k.setEntryLocation("charset",[b.length],b),b.add(o)}var p=this.compileCharStrings(a.charStrings);if(k.setEntryLocation("CharStrings",[b.length],b),b.add(p),a.isCIDFont){k.setEntryLocation("FDSelect",[b.length],b);var q=this.compileFDSelect(a.fdSelect.raw);b.add(q),j=this.compileTopDicts(a.fdArray,b.length,!0),k.setEntryLocation("FDArray",[b.length],b),b.add(j.output);var r=j.trackers;this.compilePrivateDicts(a.fdArray,r,b)}return this.compilePrivateDicts([a.topDict],[k],b),b.add([0]),b.data},encodeNumber:function(a){return parseFloat(a)!==parseInt(a,10)||isNaN(a)?this.encodeFloat(a):this.encodeInteger(a)},encodeFloat:function(a){var b=a.toString(),c=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(b);if(c){var d=parseFloat("1e"+((c[2]?+c[2]:0)+c[1].length));b=(Math.round(a*d)/d).toString()}var e,f,g="";for(e=0,f=b.length;f>e;++e){var h=b[e];g+="e"===h?"-"===b[++e]?"c":"b":"."===h?"a":"-"===h?"e":h}g+=1&g.length?"f":"ff";var i=[30];for(e=0,f=g.length;f>e;e+=2)i.push(parseInt(g.substr(e,2),16));return i},encodeInteger:function(a){var b;return a>=-107&&107>=a?b=[a+139]:a>=108&&1131>=a?(a=[a-108],b=[(a>>8)+247,255&a]):a>=-1131&&-108>=a?(a=-a-108,b=[(a>>8)+251,255&a]):b=a>=-32768&&32767>=a?[28,a>>8&255,255&a]:[29,a>>24&255,a>>16&255,a>>8&255,255&a],b},compileHeader:function(a){return[a.major,a.minor,a.hdrSize,a.offSize]},compileNameIndex:function(a){for(var b=new oc,c=0,d=a.length;d>c;++c)b.add(j(a[c]));return this.compileIndex(b)},compileTopDicts:function(a,b,c){for(var d=[],e=new oc,f=0,g=a.length;g>f;++f){var h=a[f];c&&(h.removeByName("CIDFontVersion"),h.removeByName("CIDFontRevision"),h.removeByName("CIDFontType"),h.removeByName("CIDCount"),h.removeByName("UIDBase"));var i=new wc,j=this.compileDict(h,i);d.push(i),e.add(j),i.offset(b)}return e=this.compileIndex(e,d),{trackers:d,output:e}},compilePrivateDicts:function(a,b,c){for(var d=0,f=a.length;f>d;++d){var g=a[d];e(g.privateDict&&g.hasName("Private"),"There must be an private dictionary.");var h=g.privateDict,i=new wc,j=this.compileDict(h,i),k=c.length;if(i.offset(k),j.length||(k=0),b[d].setEntryLocation("Private",[j.length,k],c),c.add(j),h.subrsIndex&&h.hasName("Subrs")){var l=this.compileIndex(h.subrsIndex);i.setEntryLocation("Subrs",[j.length],c),c.add(l)}}},compileDict:function(a,b){for(var d=[],e=a.order,f=0;fj;++j){var l=i[j],m=h[j];switch(l){case"num":case"sid":d=d.concat(this.encodeNumber(m));break;case"offset":var n=a.keyToNameMap[g];b.isTracking(n)||b.track(n,d.length),d=d.concat([29,0,0,0,0]);break;case"array":case"delta":d=d.concat(this.encodeNumber(m));for(var o=1,p=h.length;p>o;++o)d=d.concat(this.encodeNumber(h[o]));break;default:c("Unknown data type of "+l)}}d=d.concat(a.opcodes[g])}}}return d},compileStringIndex:function(a){for(var b=new oc,c=0,d=a.length;d>c;++c)b.add(j(a[c]));return this.compileIndex(b)},compileGlobalSubrIndex:function(){var a=this.cff.globalSubrIndex;this.out.writeByteArray(this.compileIndex(a))},compileCharStrings:function(a){return this.compileIndex(a)},compileCharset:function(a){return this.compileTypedArray(a.raw)},compileEncoding:function(a){return this.compileTypedArray(a.raw)},compileFDSelect:function(a){return this.compileTypedArray(a)},compileTypedArray:function(a){for(var b=[],c=0,d=a.length;d>c;++c)b[c]=a[c];return b},compileIndex:function(a,b){b=b||[];var c=a.objects,d=c.length;if(0===d)return[0,0,0];var e,f=[d>>8&255,255&d],g=1;for(e=0;d>e;++e)g+=c[e].length;var h;h=256>g?1:65536>g?2:16777216>g?3:4,f.push(h);var i=1;for(e=0;d+1>e;e++)1===h?f.push(255&i):2===h?f.push(i>>8&255,255&i):3===h?f.push(i>>16&255,i>>8&255,255&i):f.push(i>>>24&255,i>>16&255,i>>8&255,255&i),c[e]&&(i+=c[e].length);for(e=0;d>e;e++){b[e]&&b[e].offset(f.length);for(var j=0,k=c[e].length;k>j;j++)f.push(c[e][j])}return f}},a}();!function(){/Windows/.test(navigator.userAgent)&&(Nb=!0)}(),function(){/Windows.*Chrome/.test(navigator.userAgent)&&(Kb=!0)}();var yc=function(){function a(a,b){return a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3]}function b(a,b){return a[b]<<8|a[b+1]}function d(d,e,f){var g,h,i,j,k=1===b(d,e+2)?a(d,e+8):a(d,e+16),l=b(d,e+k);if(4===l){g=b(d,e+k+2);var m=b(d,e+k+6)>>1;for(i=e+k+14,h=[],j=0;m>j;j++,i+=2)h[j]={end:b(d,i)};for(i+=2,j=0;m>j;j++,i+=2)h[j].start=b(d,i);for(j=0;m>j;j++,i+=2)h[j].idDelta=b(d,i);for(j=0;m>j;j++,i+=2){var n=b(d,i);if(0!==n){h[j].ids=[];for(var o=0,p=h[j].end-h[j].start+1;p>o;o++)h[j].ids[o]=b(d,i+n),n+=2}}return h}if(12===l){g=a(d,e+k+4);var q=a(d,e+k+12);for(i=e+k+16,h=[],j=0;q>j;j++)h.push({start:a(d,i),end:a(d,i+4),idDelta:a(d,i+8)-a(d,i)}),i+=12;return h}c("not supported cmap: "+l)}function e(a,b,c){var d={},e=new kc(new Mc(a,b,c-b),d),f=e.parse();return{glyphs:f.charStrings.objects,subrs:f.topDict.privateDict&&f.topDict.privateDict.subrsIndex&&f.topDict.privateDict.subrsIndex.objects,gsubrs:f.globalSubrIndex&&f.globalSubrIndex.objects}}function f(a,b,c){var d,e;c?(d=4,e=function(a,b){return a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3]}):(d=2,e=function(a,b){return a[b]<<9|a[b+1]<<1});for(var f=[],g=e(b,0),h=d;hd;){var f=d+e+1>>1;c>16,k=0,l=0;if(i+=10,0>j){do{g=a[i]<<8|a[i+1];var m=a[i+2]<<8|a[i+3];i+=4;var n,o;1&g?(n=(a[i]<<24|a[i+1]<<16)>>16,o=(a[i+2]<<24|a[i+3]<<16)>>16,i+=4):(n=a[i++],o=a[i++]),2&g?(k=n,l=o):(k=0,l=0);var p=1,q=1,r=0,s=0;8&g?(p=q=(a[i]<<24|a[i+1]<<16)/1073741824,i+=2):64&g?(p=(a[i]<<24|a[i+1]<<16)/1073741824,q=(a[i+2]<<24|a[i+3]<<16)/1073741824,i+=4):128&g&&(p=(a[i]<<24|a[i+1]<<16)/1073741824,r=(a[i+2]<<24|a[i+3]<<16)/1073741824,s=(a[i+4]<<24|a[i+5]<<16)/1073741824,q=(a[i+6]<<24|a[i+7]<<16)/1073741824,i+=8);var t=c.glyphs[m];t&&(b.push({cmd:"save"}),b.push({cmd:"transform",args:[p,r,s,q,k,l]}),h(t,b,c),b.push({cmd:"restore"}))}while(32&g)}else{var u,v,w=[];for(u=0;j>u;u++)w.push(a[i]<<8|a[i+1]),i+=2;var x=a[i]<<8|a[i+1];i+=2+x;for(var y=w[w.length-1]+1,z=[];z.length0;)z.push({flags:g})}for(u=0;y>u;u++){switch(18&z[u].flags){case 0:k+=(a[i]<<24|a[i+1]<<16)>>16,i+=2;break;case 2:k-=a[i++];break;case 18:k+=a[i++]}z[u].x=k}for(u=0;y>u;u++){switch(36&z[u].flags){case 0:l+=(a[i]<<24|a[i+1]<<16)>>16,i+=2;break;case 4:l-=a[i++];break;case 36:l+=a[i++]}z[u].y=l}var B=0;for(i=0;j>i;i++){var C=w[i],D=z.slice(B,C+1);if(1&D[0].flags)D.push(D[0]);else if(1&D[D.length-1].flags)D.unshift(D[D.length-1]);else{var E={flags:1,x:(D[0].x+D[D.length-1].x)/2,y:(D[0].y+D[D.length-1].y)/2};D.unshift(E),D.push(E)}for(d(D[0].x,D[0].y),u=1,v=D.length;v>u;u++)1&D[u].flags?e(D[u].x,D[u].y):1&D[u+1].flags?(f(D[u].x,D[u].y,D[u+1].x,D[u+1].y),u++):f(D[u].x,D[u].y,(D[u].x+D[u+1].x)/2,(D[u].y+D[u+1].y)/2);B=C+1}}}function j(a,b,d){function e(a,c){b.push({cmd:"moveTo",args:[a,c]})}function f(a,c){b.push({cmd:"lineTo",args:[a,c]})}function h(a,c,d,e,f,g){b.push({cmd:"bezierCurveTo",args:[a,c,d,e,f,g]})}function i(a){for(var o=0;o>1,y=!0;break;case 3:n+=k.length>>1,y=!0;break;case 4:m+=k.pop(),e(l,m),y=!0;break;case 5:for(;k.length>0;)l+=k.shift(),m+=k.shift(),f(l,m);break;case 6:for(;k.length>0&&(l+=k.shift(),f(l,m),0!==k.length);)m+=k.shift(),f(l,m);break;case 7:for(;k.length>0&&(m+=k.shift(),f(l,m),0!==k.length);)l+=k.shift(),f(l,m);break;case 8:for(;k.length>0;)p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m);break;case 10:w=k.pop()+d.subrsBias,x=d.subrs[w],x&&i(x);break;case 11:return;case 12:switch(z=a[o++]){case 34:p=l+k.shift(),q=p+k.shift(),t=m+k.shift(),l=q+k.shift(),h(p,m,q,t,l,t),p=l+k.shift(),q=p+k.shift(),l=q+k.shift(),h(p,t,q,m,l,m);break;case 35:p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m),p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m),k.pop();break;case 36:p=l+k.shift(),t=m+k.shift(),q=p+k.shift(),u=t+k.shift(),l=q+k.shift(),h(p,t,q,u,l,u),p=l+k.shift(),q=p+k.shift(),v=u+k.shift(),l=q+k.shift(),h(p,u,q,v,l,m);break;case 37:var A=l,B=m;p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m),p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q,m=s,Math.abs(l-A)>Math.abs(m-B)?l+=k.shift():m+=k.shift(),h(p,r,q,s,l,m);break;default:c("unknown operator: 12 "+z)}break;case 14:if(k.length>=4){var C=k.pop(),D=k.pop();m=k.pop(),l=k.pop(),b.push({cmd:"save"}),b.push({cmd:"translate",args:[l,m]});var E=g(d.cmap,String.fromCharCode(d.glyphNameMap[Pb.StandardEncoding[C]]));j(d.glyphs[E],b,d),b.push({cmd:"restore"}),E=g(d.cmap,String.fromCharCode(d.glyphNameMap[Pb.StandardEncoding[D]])),j(d.glyphs[E],b,d)}return;case 18:n+=k.length>>1,y=!0;break;case 19:n+=k.length>>1,o+=n+7>>3,y=!0;break;case 20:n+=k.length>>1,o+=n+7>>3,y=!0;break;case 21:m+=k.pop(),l+=k.pop(),e(l,m),y=!0;break;case 22:l+=k.pop(),e(l,m),y=!0;break;case 23:n+=k.length>>1,y=!0;break;case 24:for(;k.length>2;)p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m);l+=k.shift(),m+=k.shift(),f(l,m);break;case 25:for(;k.length>6;)l+=k.shift(),m+=k.shift(),f(l,m);p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m);break;case 26:for(k.length%2&&(l+=k.shift());k.length>0;)p=l,r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q,m=s+k.shift(),h(p,r,q,s,l,m);break;case 27:for(k.length%2&&(m+=k.shift());k.length>0;)p=l+k.shift(),r=m,q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s,h(p,r,q,s,l,m);break;case 28:k.push((a[o]<<24|a[o+1]<<16)>>16),o+=2;break;case 29:w=k.pop()+d.gsubrsBias,x=d.gsubrs[w],x&&i(x);break;case 30:for(;k.length>0&&(p=l,r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+(1===k.length?k.shift():0),h(p,r,q,s,l,m),0!==k.length);)p=l+k.shift(),r=m,q=p+k.shift(),s=r+k.shift(),m=s+k.shift(),l=q+(1===k.length?k.shift():0),h(p,r,q,s,l,m);break;case 31:for(;k.length>0&&(p=l+k.shift(),r=m,q=p+k.shift(),s=r+k.shift(),m=s+k.shift(),l=q+(1===k.length?k.shift():0),h(p,r,q,s,l,m),0!==k.length);)p=l,r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+(1===k.length?k.shift():0),h(p,r,q,s,l,m);break;default:32>z&&c("unknown operator: "+z),247>z?k.push(z-139):251>z?k.push(256*(z-247)+a[o++]+108):255>z?k.push(256*-(z-251)-a[o++]-108):(k.push((a[o]<<24|a[o+1]<<16|a[o+2]<<8|a[o+3])/65536),o+=4)}y&&(k.length=0)}}var k=[],l=0,m=0,n=0;i(a)}function k(a){this.compiledGlyphs={},this.fontMatrix=a}function l(a,b,c){c=c||[488e-6,0,0,488e-6,0,0],k.call(this,c),this.glyphs=a,this.cmap=b,this.compiledGlyphs=[]}function m(a,b,c,d){c=c||[.001,0,0,.001,0,0],k.call(this,c),this.glyphs=a.glyphs,this.gsubrs=a.gsubrs||[],this.subrs=a.subrs||[],this.cmap=b,this.glyphNameMap=d||zc,this.compiledGlyphs=[],this.gsubrsBias=this.gsubrs.length<1240?107:this.gsubrs.length<33900?1131:32768,this.subrsBias=this.subrs.length<1240?107:this.subrs.length<33900?1131:32768}var n="";return k.prototype={getPathJs:function(a){var b=g(this.cmap,a),c=this.compiledGlyphs[b];return c||(this.compiledGlyphs[b]=c=this.compileGlyph(this.glyphs[b])),c},compileGlyph:function(a){if(!a||0===a.length||14===a[0])return n;var b=[];return b.push({cmd:"save"}),b.push({cmd:"transform",args:this.fontMatrix.slice()}),b.push({cmd:"scale",args:["size","-size"]}),this.compileGlyphImpl(a,b),b.push({cmd:"restore"}),b},compileGlyphImpl:function(){c("Children classes should implement this.")},hasBuiltPath:function(a){var b=g(this.cmap,a);return b in this.compiledGlyphs}},na.inherit(l,k,{compileGlyphImpl:function(a,b){h(a,b,this)}}),na.inherit(m,k,{compileGlyphImpl:function(a,b){j(a,b,this)}}),{create:function(c){for(var g,h,j,k,n,o,p=new Uint8Array(c.data),q=b(p,4),r=0,s=12;q>r;r++,s+=16){var t=i(p.subarray(s,s+4)),u=a(p,s+8),v=a(p,s+12);switch(t){case"cmap":g=d(p,u,u+v);break;case"glyf":h=p.subarray(u,u+v);break;case"loca":j=p.subarray(u,u+v);break;case"head":o=b(p,u+18),n=b(p,u+50);break;case"CFF ":k=e(p,u,u+v)}}if(h){var w=o?[1/o,0,0,1/o,0,0]:c.fontMatrix;return new l(f(h,j,n),g,w)}return new m(k,g,c.fontMatrix,c.glyphNameMap)}}}(),zc={A:65,AE:198,AEacute:508,AEmacron:482,AEsmall:63462,Aacute:193,Aacutesmall:63457,Abreve:258,Abreveacute:7854,Abrevecyrillic:1232,Abrevedotbelow:7862,Abrevegrave:7856,Abrevehookabove:7858,Abrevetilde:7860,Acaron:461,Acircle:9398,Acircumflex:194,Acircumflexacute:7844,Acircumflexdotbelow:7852,Acircumflexgrave:7846,Acircumflexhookabove:7848,Acircumflexsmall:63458,Acircumflextilde:7850,Acute:63177,Acutesmall:63412,Acyrillic:1040,Adblgrave:512,Adieresis:196,Adieresiscyrillic:1234,Adieresismacron:478,Adieresissmall:63460,Adotbelow:7840,Adotmacron:480,Agrave:192,Agravesmall:63456,Ahookabove:7842,Aiecyrillic:1236,Ainvertedbreve:514,Alpha:913,Alphatonos:902,Amacron:256,Amonospace:65313,Aogonek:260,Aring:197,Aringacute:506,Aringbelow:7680,Aringsmall:63461,Asmall:63329,Atilde:195,Atildesmall:63459,Aybarmenian:1329,B:66,Bcircle:9399,Bdotaccent:7682,Bdotbelow:7684,Becyrillic:1041,Benarmenian:1330,Beta:914,Bhook:385,Blinebelow:7686,Bmonospace:65314,Brevesmall:63220,Bsmall:63330,Btopbar:386,C:67,Caarmenian:1342,Cacute:262,Caron:63178,Caronsmall:63221,Ccaron:268,Ccedilla:199,Ccedillaacute:7688,Ccedillasmall:63463,Ccircle:9400,Ccircumflex:264,Cdot:266,Cdotaccent:266,Cedillasmall:63416,Chaarmenian:1353,Cheabkhasiancyrillic:1212,Checyrillic:1063,Chedescenderabkhasiancyrillic:1214,Chedescendercyrillic:1206,Chedieresiscyrillic:1268,Cheharmenian:1347,Chekhakassiancyrillic:1227,Cheverticalstrokecyrillic:1208,Chi:935,Chook:391,Circumflexsmall:63222,Cmonospace:65315,Coarmenian:1361,Csmall:63331,D:68,DZ:497,DZcaron:452,Daarmenian:1332,Dafrican:393, +Dcaron:270,Dcedilla:7696,Dcircle:9401,Dcircumflexbelow:7698,Dcroat:272,Ddotaccent:7690,Ddotbelow:7692,Decyrillic:1044,Deicoptic:1006,Delta:8710,Deltagreek:916,Dhook:394,Dieresis:63179,DieresisAcute:63180,DieresisGrave:63181,Dieresissmall:63400,Digammagreek:988,Djecyrillic:1026,Dlinebelow:7694,Dmonospace:65316,Dotaccentsmall:63223,Dslash:272,Dsmall:63332,Dtopbar:395,Dz:498,Dzcaron:453,Dzeabkhasiancyrillic:1248,Dzecyrillic:1029,Dzhecyrillic:1039,E:69,Eacute:201,Eacutesmall:63465,Ebreve:276,Ecaron:282,Ecedillabreve:7708,Echarmenian:1333,Ecircle:9402,Ecircumflex:202,Ecircumflexacute:7870,Ecircumflexbelow:7704,Ecircumflexdotbelow:7878,Ecircumflexgrave:7872,Ecircumflexhookabove:7874,Ecircumflexsmall:63466,Ecircumflextilde:7876,Ecyrillic:1028,Edblgrave:516,Edieresis:203,Edieresissmall:63467,Edot:278,Edotaccent:278,Edotbelow:7864,Efcyrillic:1060,Egrave:200,Egravesmall:63464,Eharmenian:1335,Ehookabove:7866,Eightroman:8551,Einvertedbreve:518,Eiotifiedcyrillic:1124,Elcyrillic:1051,Elevenroman:8554,Emacron:274,Emacronacute:7702,Emacrongrave:7700,Emcyrillic:1052,Emonospace:65317,Encyrillic:1053,Endescendercyrillic:1186,Eng:330,Enghecyrillic:1188,Enhookcyrillic:1223,Eogonek:280,Eopen:400,Epsilon:917,Epsilontonos:904,Ercyrillic:1056,Ereversed:398,Ereversedcyrillic:1069,Escyrillic:1057,Esdescendercyrillic:1194,Esh:425,Esmall:63333,Eta:919,Etarmenian:1336,Etatonos:905,Eth:208,Ethsmall:63472,Etilde:7868,Etildebelow:7706,Euro:8364,Ezh:439,Ezhcaron:494,Ezhreversed:440,F:70,Fcircle:9403,Fdotaccent:7710,Feharmenian:1366,Feicoptic:996,Fhook:401,Fitacyrillic:1138,Fiveroman:8548,Fmonospace:65318,Fourroman:8547,Fsmall:63334,G:71,GBsquare:13191,Gacute:500,Gamma:915,Gammaafrican:404,Gangiacoptic:1002,Gbreve:286,Gcaron:486,Gcedilla:290,Gcircle:9404,Gcircumflex:284,Gcommaaccent:290,Gdot:288,Gdotaccent:288,Gecyrillic:1043,Ghadarmenian:1346,Ghemiddlehookcyrillic:1172,Ghestrokecyrillic:1170,Gheupturncyrillic:1168,Ghook:403,Gimarmenian:1331,Gjecyrillic:1027,Gmacron:7712,Gmonospace:65319,Grave:63182,Gravesmall:63328,Gsmall:63335,Gsmallhook:667,Gstroke:484,H:72,H18533:9679,H18543:9642,H18551:9643,H22073:9633,HPsquare:13259,Haabkhasiancyrillic:1192,Hadescendercyrillic:1202,Hardsigncyrillic:1066,Hbar:294,Hbrevebelow:7722,Hcedilla:7720,Hcircle:9405,Hcircumflex:292,Hdieresis:7718,Hdotaccent:7714,Hdotbelow:7716,Hmonospace:65320,Hoarmenian:1344,Horicoptic:1e3,Hsmall:63336,Hungarumlaut:63183,Hungarumlautsmall:63224,Hzsquare:13200,I:73,IAcyrillic:1071,IJ:306,IUcyrillic:1070,Iacute:205,Iacutesmall:63469,Ibreve:300,Icaron:463,Icircle:9406,Icircumflex:206,Icircumflexsmall:63470,Icyrillic:1030,Idblgrave:520,Idieresis:207,Idieresisacute:7726,Idieresiscyrillic:1252,Idieresissmall:63471,Idot:304,Idotaccent:304,Idotbelow:7882,Iebrevecyrillic:1238,Iecyrillic:1045,Ifraktur:8465,Igrave:204,Igravesmall:63468,Ihookabove:7880,Iicyrillic:1048,Iinvertedbreve:522,Iishortcyrillic:1049,Imacron:298,Imacroncyrillic:1250,Imonospace:65321,Iniarmenian:1339,Iocyrillic:1025,Iogonek:302,Iota:921,Iotaafrican:406,Iotadieresis:938,Iotatonos:906,Ismall:63337,Istroke:407,Itilde:296,Itildebelow:7724,Izhitsacyrillic:1140,Izhitsadblgravecyrillic:1142,J:74,Jaarmenian:1345,Jcircle:9407,Jcircumflex:308,Jecyrillic:1032,Jheharmenian:1355,Jmonospace:65322,Jsmall:63338,K:75,KBsquare:13189,KKsquare:13261,Kabashkircyrillic:1184,Kacute:7728,Kacyrillic:1050,Kadescendercyrillic:1178,Kahookcyrillic:1219,Kappa:922,Kastrokecyrillic:1182,Kaverticalstrokecyrillic:1180,Kcaron:488,Kcedilla:310,Kcircle:9408,Kcommaaccent:310,Kdotbelow:7730,Keharmenian:1364,Kenarmenian:1343,Khacyrillic:1061,Kheicoptic:998,Khook:408,Kjecyrillic:1036,Klinebelow:7732,Kmonospace:65323,Koppacyrillic:1152,Koppagreek:990,Ksicyrillic:1134,Ksmall:63339,L:76,LJ:455,LL:63167,Lacute:313,Lambda:923,Lcaron:317,Lcedilla:315,Lcircle:9409,Lcircumflexbelow:7740,Lcommaaccent:315,Ldot:319,Ldotaccent:319,Ldotbelow:7734,Ldotbelowmacron:7736,Liwnarmenian:1340,Lj:456,Ljecyrillic:1033,Llinebelow:7738,Lmonospace:65324,Lslash:321,Lslashsmall:63225,Lsmall:63340,M:77,MBsquare:13190,Macron:63184,Macronsmall:63407,Macute:7742,Mcircle:9410,Mdotaccent:7744,Mdotbelow:7746,Menarmenian:1348,Mmonospace:65325,Msmall:63341,Mturned:412,Mu:924,N:78,NJ:458,Nacute:323,Ncaron:327,Ncedilla:325,Ncircle:9411,Ncircumflexbelow:7754,Ncommaaccent:325,Ndotaccent:7748,Ndotbelow:7750,Nhookleft:413,Nineroman:8552,Nj:459,Njecyrillic:1034,Nlinebelow:7752,Nmonospace:65326,Nowarmenian:1350,Nsmall:63342,Ntilde:209,Ntildesmall:63473,Nu:925,O:79,OE:338,OEsmall:63226,Oacute:211,Oacutesmall:63475,Obarredcyrillic:1256,Obarreddieresiscyrillic:1258,Obreve:334,Ocaron:465,Ocenteredtilde:415,Ocircle:9412,Ocircumflex:212,Ocircumflexacute:7888,Ocircumflexdotbelow:7896,Ocircumflexgrave:7890,Ocircumflexhookabove:7892,Ocircumflexsmall:63476,Ocircumflextilde:7894,Ocyrillic:1054,Odblacute:336,Odblgrave:524,Odieresis:214,Odieresiscyrillic:1254,Odieresissmall:63478,Odotbelow:7884,Ogoneksmall:63227,Ograve:210,Ogravesmall:63474,Oharmenian:1365,Ohm:8486,Ohookabove:7886,Ohorn:416,Ohornacute:7898,Ohorndotbelow:7906,Ohorngrave:7900,Ohornhookabove:7902,Ohorntilde:7904,Ohungarumlaut:336,Oi:418,Oinvertedbreve:526,Omacron:332,Omacronacute:7762,Omacrongrave:7760,Omega:8486,Omegacyrillic:1120,Omegagreek:937,Omegaroundcyrillic:1146,Omegatitlocyrillic:1148,Omegatonos:911,Omicron:927,Omicrontonos:908,Omonospace:65327,Oneroman:8544,Oogonek:490,Oogonekmacron:492,Oopen:390,Oslash:216,Oslashacute:510,Oslashsmall:63480,Osmall:63343,Ostrokeacute:510,Otcyrillic:1150,Otilde:213,Otildeacute:7756,Otildedieresis:7758,Otildesmall:63477,P:80,Pacute:7764,Pcircle:9413,Pdotaccent:7766,Pecyrillic:1055,Peharmenian:1354,Pemiddlehookcyrillic:1190,Phi:934,Phook:420,Pi:928,Piwrarmenian:1363,Pmonospace:65328,Psi:936,Psicyrillic:1136,Psmall:63344,Q:81,Qcircle:9414,Qmonospace:65329,Qsmall:63345,R:82,Raarmenian:1356,Racute:340,Rcaron:344,Rcedilla:342,Rcircle:9415,Rcommaaccent:342,Rdblgrave:528,Rdotaccent:7768,Rdotbelow:7770,Rdotbelowmacron:7772,Reharmenian:1360,Rfraktur:8476,Rho:929,Ringsmall:63228,Rinvertedbreve:530,Rlinebelow:7774,Rmonospace:65330,Rsmall:63346,Rsmallinverted:641,Rsmallinvertedsuperior:694,S:83,SF010000:9484,SF020000:9492,SF030000:9488,SF040000:9496,SF050000:9532,SF060000:9516,SF070000:9524,SF080000:9500,SF090000:9508,SF100000:9472,SF110000:9474,SF190000:9569,SF200000:9570,SF210000:9558,SF220000:9557,SF230000:9571,SF240000:9553,SF250000:9559,SF260000:9565,SF270000:9564,SF280000:9563,SF360000:9566,SF370000:9567,SF380000:9562,SF390000:9556,SF400000:9577,SF410000:9574,SF420000:9568,SF430000:9552,SF440000:9580,SF450000:9575,SF460000:9576,SF470000:9572,SF480000:9573,SF490000:9561,SF500000:9560,SF510000:9554,SF520000:9555,SF530000:9579,SF540000:9578,Sacute:346,Sacutedotaccent:7780,Sampigreek:992,Scaron:352,Scarondotaccent:7782,Scaronsmall:63229,Scedilla:350,Schwa:399,Schwacyrillic:1240,Schwadieresiscyrillic:1242,Scircle:9416,Scircumflex:348,Scommaaccent:536,Sdotaccent:7776,Sdotbelow:7778,Sdotbelowdotaccent:7784,Seharmenian:1357,Sevenroman:8550,Shaarmenian:1351,Shacyrillic:1064,Shchacyrillic:1065,Sheicoptic:994,Shhacyrillic:1210,Shimacoptic:1004,Sigma:931,Sixroman:8549,Smonospace:65331,Softsigncyrillic:1068,Ssmall:63347,Stigmagreek:986,T:84,Tau:932,Tbar:358,Tcaron:356,Tcedilla:354,Tcircle:9417,Tcircumflexbelow:7792,Tcommaaccent:354,Tdotaccent:7786,Tdotbelow:7788,Tecyrillic:1058,Tedescendercyrillic:1196,Tenroman:8553,Tetsecyrillic:1204,Theta:920,Thook:428,Thorn:222,Thornsmall:63486,Threeroman:8546,Tildesmall:63230,Tiwnarmenian:1359,Tlinebelow:7790,Tmonospace:65332,Toarmenian:1337,Tonefive:444,Tonesix:388,Tonetwo:423,Tretroflexhook:430,Tsecyrillic:1062,Tshecyrillic:1035,Tsmall:63348,Twelveroman:8555,Tworoman:8545,U:85,Uacute:218,Uacutesmall:63482,Ubreve:364,Ucaron:467,Ucircle:9418,Ucircumflex:219,Ucircumflexbelow:7798,Ucircumflexsmall:63483,Ucyrillic:1059,Udblacute:368,Udblgrave:532,Udieresis:220,Udieresisacute:471,Udieresisbelow:7794,Udieresiscaron:473,Udieresiscyrillic:1264,Udieresisgrave:475,Udieresismacron:469,Udieresissmall:63484,Udotbelow:7908,Ugrave:217,Ugravesmall:63481,Uhookabove:7910,Uhorn:431,Uhornacute:7912,Uhorndotbelow:7920,Uhorngrave:7914,Uhornhookabove:7916,Uhorntilde:7918,Uhungarumlaut:368,Uhungarumlautcyrillic:1266,Uinvertedbreve:534,Ukcyrillic:1144,Umacron:362,Umacroncyrillic:1262,Umacrondieresis:7802,Umonospace:65333,Uogonek:370,Upsilon:933,Upsilon1:978,Upsilonacutehooksymbolgreek:979,Upsilonafrican:433,Upsilondieresis:939,Upsilondieresishooksymbolgreek:980,Upsilonhooksymbol:978,Upsilontonos:910,Uring:366,Ushortcyrillic:1038,Usmall:63349,Ustraightcyrillic:1198,Ustraightstrokecyrillic:1200,Utilde:360,Utildeacute:7800,Utildebelow:7796,V:86,Vcircle:9419,Vdotbelow:7806,Vecyrillic:1042,Vewarmenian:1358,Vhook:434,Vmonospace:65334,Voarmenian:1352,Vsmall:63350,Vtilde:7804,W:87,Wacute:7810,Wcircle:9420,Wcircumflex:372,Wdieresis:7812,Wdotaccent:7814,Wdotbelow:7816,Wgrave:7808,Wmonospace:65335,Wsmall:63351,X:88,Xcircle:9421,Xdieresis:7820,Xdotaccent:7818,Xeharmenian:1341,Xi:926,Xmonospace:65336,Xsmall:63352,Y:89,Yacute:221,Yacutesmall:63485,Yatcyrillic:1122,Ycircle:9422,Ycircumflex:374,Ydieresis:376,Ydieresissmall:63487,Ydotaccent:7822,Ydotbelow:7924,Yericyrillic:1067,Yerudieresiscyrillic:1272,Ygrave:7922,Yhook:435,Yhookabove:7926,Yiarmenian:1349,Yicyrillic:1031,Yiwnarmenian:1362,Ymonospace:65337,Ysmall:63353,Ytilde:7928,Yusbigcyrillic:1130,Yusbigiotifiedcyrillic:1132,Yuslittlecyrillic:1126,Yuslittleiotifiedcyrillic:1128,Z:90,Zaarmenian:1334,Zacute:377,Zcaron:381,Zcaronsmall:63231,Zcircle:9423,Zcircumflex:7824,Zdot:379,Zdotaccent:379,Zdotbelow:7826,Zecyrillic:1047,Zedescendercyrillic:1176,Zedieresiscyrillic:1246,Zeta:918,Zhearmenian:1338,Zhebrevecyrillic:1217,Zhecyrillic:1046,Zhedescendercyrillic:1174,Zhedieresiscyrillic:1244,Zlinebelow:7828,Zmonospace:65338,Zsmall:63354,Zstroke:437,a:97,aabengali:2438,aacute:225,aadeva:2310,aagujarati:2694,aagurmukhi:2566,aamatragurmukhi:2622,aarusquare:13059,aavowelsignbengali:2494,aavowelsigndeva:2366,aavowelsigngujarati:2750,abbreviationmarkarmenian:1375,abbreviationsigndeva:2416,abengali:2437,abopomofo:12570,abreve:259,abreveacute:7855,abrevecyrillic:1233,abrevedotbelow:7863,abrevegrave:7857,abrevehookabove:7859,abrevetilde:7861,acaron:462,acircle:9424,acircumflex:226,acircumflexacute:7845,acircumflexdotbelow:7853,acircumflexgrave:7847,acircumflexhookabove:7849,acircumflextilde:7851,acute:180,acutebelowcmb:791,acutecmb:769,acutecomb:769,acutedeva:2388,acutelowmod:719,acutetonecmb:833,acyrillic:1072,adblgrave:513,addakgurmukhi:2673,adeva:2309,adieresis:228,adieresiscyrillic:1235,adieresismacron:479,adotbelow:7841,adotmacron:481,ae:230,aeacute:509,aekorean:12624,aemacron:483,afii00208:8213,afii08941:8356,afii10017:1040,afii10018:1041,afii10019:1042,afii10020:1043,afii10021:1044,afii10022:1045,afii10023:1025,afii10024:1046,afii10025:1047,afii10026:1048,afii10027:1049,afii10028:1050,afii10029:1051,afii10030:1052,afii10031:1053,afii10032:1054,afii10033:1055,afii10034:1056,afii10035:1057,afii10036:1058,afii10037:1059,afii10038:1060,afii10039:1061,afii10040:1062,afii10041:1063,afii10042:1064,afii10043:1065,afii10044:1066,afii10045:1067,afii10046:1068,afii10047:1069,afii10048:1070,afii10049:1071,afii10050:1168,afii10051:1026,afii10052:1027,afii10053:1028,afii10054:1029,afii10055:1030,afii10056:1031,afii10057:1032,afii10058:1033,afii10059:1034,afii10060:1035,afii10061:1036,afii10062:1038,afii10063:63172,afii10064:63173,afii10065:1072,afii10066:1073,afii10067:1074,afii10068:1075,afii10069:1076,afii10070:1077,afii10071:1105,afii10072:1078,afii10073:1079,afii10074:1080,afii10075:1081,afii10076:1082,afii10077:1083,afii10078:1084,afii10079:1085,afii10080:1086,afii10081:1087,afii10082:1088,afii10083:1089,afii10084:1090,afii10085:1091,afii10086:1092,afii10087:1093,afii10088:1094,afii10089:1095,afii10090:1096,afii10091:1097,afii10092:1098,afii10093:1099,afii10094:1100,afii10095:1101,afii10096:1102,afii10097:1103,afii10098:1169,afii10099:1106,afii10100:1107,afii10101:1108,afii10102:1109,afii10103:1110,afii10104:1111,afii10105:1112,afii10106:1113,afii10107:1114,afii10108:1115,afii10109:1116,afii10110:1118,afii10145:1039,afii10146:1122,afii10147:1138,afii10148:1140,afii10192:63174,afii10193:1119,afii10194:1123,afii10195:1139,afii10196:1141,afii10831:63175,afii10832:63176,afii10846:1241,afii299:8206,afii300:8207,afii301:8205,afii57381:1642,afii57388:1548,afii57392:1632,afii57393:1633,afii57394:1634,afii57395:1635,afii57396:1636,afii57397:1637,afii57398:1638,afii57399:1639,afii57400:1640,afii57401:1641,afii57403:1563,afii57407:1567,afii57409:1569,afii57410:1570,afii57411:1571,afii57412:1572,afii57413:1573,afii57414:1574,afii57415:1575,afii57416:1576,afii57417:1577,afii57418:1578,afii57419:1579,afii57420:1580,afii57421:1581,afii57422:1582,afii57423:1583,afii57424:1584,afii57425:1585,afii57426:1586,afii57427:1587,afii57428:1588,afii57429:1589,afii57430:1590,afii57431:1591,afii57432:1592,afii57433:1593,afii57434:1594,afii57440:1600,afii57441:1601,afii57442:1602,afii57443:1603,afii57444:1604,afii57445:1605,afii57446:1606,afii57448:1608,afii57449:1609,afii57450:1610,afii57451:1611,afii57452:1612,afii57453:1613,afii57454:1614,afii57455:1615,afii57456:1616,afii57457:1617,afii57458:1618,afii57470:1607,afii57505:1700,afii57506:1662,afii57507:1670,afii57508:1688,afii57509:1711,afii57511:1657,afii57512:1672,afii57513:1681,afii57514:1722,afii57519:1746,afii57534:1749,afii57636:8362,afii57645:1470,afii57658:1475,afii57664:1488,afii57665:1489,afii57666:1490,afii57667:1491,afii57668:1492,afii57669:1493,afii57670:1494,afii57671:1495,afii57672:1496,afii57673:1497,afii57674:1498,afii57675:1499,afii57676:1500,afii57677:1501,afii57678:1502,afii57679:1503,afii57680:1504,afii57681:1505,afii57682:1506,afii57683:1507,afii57684:1508,afii57685:1509,afii57686:1510,afii57687:1511,afii57688:1512,afii57689:1513,afii57690:1514,afii57694:64298,afii57695:64299,afii57700:64331,afii57705:64287,afii57716:1520,afii57717:1521,afii57718:1522,afii57723:64309,afii57793:1460,afii57794:1461,afii57795:1462,afii57796:1467,afii57797:1464,afii57798:1463,afii57799:1456,afii57800:1458,afii57801:1457,afii57802:1459,afii57803:1474,afii57804:1473,afii57806:1465,afii57807:1468,afii57839:1469,afii57841:1471,afii57842:1472,afii57929:700,afii61248:8453,afii61289:8467,afii61352:8470,afii61573:8236,afii61574:8237,afii61575:8238,afii61664:8204,afii63167:1645,afii64937:701,agrave:224,agujarati:2693,agurmukhi:2565,ahiragana:12354,ahookabove:7843,aibengali:2448,aibopomofo:12574,aideva:2320,aiecyrillic:1237,aigujarati:2704,aigurmukhi:2576,aimatragurmukhi:2632,ainarabic:1593,ainfinalarabic:65226,aininitialarabic:65227,ainmedialarabic:65228,ainvertedbreve:515,aivowelsignbengali:2504,aivowelsigndeva:2376,aivowelsigngujarati:2760,akatakana:12450,akatakanahalfwidth:65393,akorean:12623,alef:1488,alefarabic:1575,alefdageshhebrew:64304,aleffinalarabic:65166,alefhamzaabovearabic:1571,alefhamzaabovefinalarabic:65156,alefhamzabelowarabic:1573,alefhamzabelowfinalarabic:65160,alefhebrew:1488,aleflamedhebrew:64335,alefmaddaabovearabic:1570,alefmaddaabovefinalarabic:65154,alefmaksuraarabic:1609,alefmaksurafinalarabic:65264,alefmaksurainitialarabic:65267,alefmaksuramedialarabic:65268,alefpatahhebrew:64302,alefqamatshebrew:64303,aleph:8501,allequal:8780,alpha:945,alphatonos:940,amacron:257,amonospace:65345,ampersand:38,ampersandmonospace:65286,ampersandsmall:63270,amsquare:13250,anbopomofo:12578,angbopomofo:12580,angbracketleft:12296,angbracketright:12297,angkhankhuthai:3674,angle:8736,anglebracketleft:12296,anglebracketleftvertical:65087,anglebracketright:12297,anglebracketrightvertical:65088,angleleft:9001,angleright:9002,angstrom:8491,anoteleia:903,anudattadeva:2386,anusvarabengali:2434,anusvaradeva:2306,anusvaragujarati:2690,aogonek:261,apaatosquare:13056,aparen:9372,apostrophearmenian:1370,apostrophemod:700,apple:63743,approaches:8784,approxequal:8776,approxequalorimage:8786,approximatelyequal:8773,araeaekorean:12686,araeakorean:12685,arc:8978,arighthalfring:7834,aring:229,aringacute:507,aringbelow:7681,arrowboth:8596,arrowdashdown:8675,arrowdashleft:8672,arrowdashright:8674,arrowdashup:8673,arrowdblboth:8660,arrowdbldown:8659,arrowdblleft:8656,arrowdblright:8658,arrowdblup:8657,arrowdown:8595,arrowdownleft:8601,arrowdownright:8600,arrowdownwhite:8681,arrowheaddownmod:709,arrowheadleftmod:706,arrowheadrightmod:707,arrowheadupmod:708,arrowhorizex:63719,arrowleft:8592,arrowleftdbl:8656,arrowleftdblstroke:8653,arrowleftoverright:8646,arrowleftwhite:8678,arrowright:8594,arrowrightdblstroke:8655,arrowrightheavy:10142,arrowrightoverleft:8644,arrowrightwhite:8680,arrowtableft:8676,arrowtabright:8677,arrowup:8593,arrowupdn:8597,arrowupdnbse:8616,arrowupdownbase:8616,arrowupleft:8598,arrowupleftofdown:8645,arrowupright:8599,arrowupwhite:8679,arrowvertex:63718,asciicircum:94,asciicircummonospace:65342,asciitilde:126,asciitildemonospace:65374,ascript:593,ascriptturned:594,asmallhiragana:12353,asmallkatakana:12449,asmallkatakanahalfwidth:65383,asterisk:42,asteriskaltonearabic:1645,asteriskarabic:1645,asteriskmath:8727,asteriskmonospace:65290,asterisksmall:65121,asterism:8258,asuperior:63209,asymptoticallyequal:8771,at:64,atilde:227,atmonospace:65312,atsmall:65131,aturned:592,aubengali:2452,aubopomofo:12576,audeva:2324,augujarati:2708,augurmukhi:2580,aulengthmarkbengali:2519,aumatragurmukhi:2636,auvowelsignbengali:2508,auvowelsigndeva:2380,auvowelsigngujarati:2764,avagrahadeva:2365,aybarmenian:1377,ayin:1506,ayinaltonehebrew:64288,ayinhebrew:1506,b:98,babengali:2476,backslash:92,backslashmonospace:65340,badeva:2348,bagujarati:2732,bagurmukhi:2604,bahiragana:12400,bahtthai:3647,bakatakana:12496,bar:124,barmonospace:65372,bbopomofo:12549,bcircle:9425,bdotaccent:7683,bdotbelow:7685,beamedsixteenthnotes:9836,because:8757,becyrillic:1073,beharabic:1576,behfinalarabic:65168,behinitialarabic:65169,behiragana:12409,behmedialarabic:65170,behmeeminitialarabic:64671,behmeemisolatedarabic:64520,behnoonfinalarabic:64621,bekatakana:12505,benarmenian:1378,bet:1489,beta:946,betasymbolgreek:976,betdagesh:64305,betdageshhebrew:64305,bethebrew:1489,betrafehebrew:64332,bhabengali:2477,bhadeva:2349,bhagujarati:2733,bhagurmukhi:2605,bhook:595,bihiragana:12403,bikatakana:12499,bilabialclick:664,bindigurmukhi:2562,birusquare:13105,blackcircle:9679,blackdiamond:9670,blackdownpointingtriangle:9660,blackleftpointingpointer:9668,blackleftpointingtriangle:9664,blacklenticularbracketleft:12304,blacklenticularbracketleftvertical:65083,blacklenticularbracketright:12305,blacklenticularbracketrightvertical:65084,blacklowerlefttriangle:9699,blacklowerrighttriangle:9698,blackrectangle:9644,blackrightpointingpointer:9658,blackrightpointingtriangle:9654,blacksmallsquare:9642,blacksmilingface:9787,blacksquare:9632,blackstar:9733,blackupperlefttriangle:9700,blackupperrighttriangle:9701,blackuppointingsmalltriangle:9652,blackuppointingtriangle:9650,blank:9251,blinebelow:7687,block:9608,bmonospace:65346,bobaimaithai:3610,bohiragana:12412,bokatakana:12508,bparen:9373,bqsquare:13251,braceex:63732,braceleft:123,braceleftbt:63731,braceleftmid:63730,braceleftmonospace:65371,braceleftsmall:65115,bracelefttp:63729,braceleftvertical:65079,braceright:125,bracerightbt:63742,bracerightmid:63741,bracerightmonospace:65373,bracerightsmall:65116,bracerighttp:63740,bracerightvertical:65080,bracketleft:91,bracketleftbt:63728,bracketleftex:63727,bracketleftmonospace:65339,bracketlefttp:63726,bracketright:93,bracketrightbt:63739,bracketrightex:63738,bracketrightmonospace:65341,bracketrighttp:63737,breve:728,brevebelowcmb:814,brevecmb:774,breveinvertedbelowcmb:815,breveinvertedcmb:785,breveinverteddoublecmb:865,bridgebelowcmb:810,bridgeinvertedbelowcmb:826,brokenbar:166,bstroke:384,bsuperior:63210,btopbar:387,buhiragana:12406,bukatakana:12502,bullet:8226,bulletinverse:9688,bulletoperator:8729,bullseye:9678,c:99,caarmenian:1390,cabengali:2458,cacute:263,cadeva:2330,cagujarati:2714,cagurmukhi:2586,calsquare:13192,candrabindubengali:2433,candrabinducmb:784,candrabindudeva:2305,candrabindugujarati:2689,capslock:8682,careof:8453,caron:711,caronbelowcmb:812,caroncmb:780,carriagereturn:8629,cbopomofo:12568,ccaron:269,ccedilla:231,ccedillaacute:7689,ccircle:9426,ccircumflex:265,ccurl:597,cdot:267,cdotaccent:267,cdsquare:13253,cedilla:184,cedillacmb:807,cent:162,centigrade:8451,centinferior:63199,centmonospace:65504,centoldstyle:63394,centsuperior:63200,chaarmenian:1401,chabengali:2459,chadeva:2331,chagujarati:2715,chagurmukhi:2587,chbopomofo:12564,cheabkhasiancyrillic:1213,checkmark:10003,checyrillic:1095,chedescenderabkhasiancyrillic:1215,chedescendercyrillic:1207,chedieresiscyrillic:1269,cheharmenian:1395,chekhakassiancyrillic:1228,cheverticalstrokecyrillic:1209,chi:967,chieuchacirclekorean:12919,chieuchaparenkorean:12823,chieuchcirclekorean:12905,chieuchkorean:12618,chieuchparenkorean:12809,chochangthai:3594,chochanthai:3592,chochingthai:3593,chochoethai:3596,chook:392,cieucacirclekorean:12918,cieucaparenkorean:12822,cieuccirclekorean:12904,cieuckorean:12616,cieucparenkorean:12808,cieucuparenkorean:12828,circle:9675,circlecopyrt:169,circlemultiply:8855,circleot:8857,circleplus:8853,circlepostalmark:12342,circlewithlefthalfblack:9680,circlewithrighthalfblack:9681,circumflex:710,circumflexbelowcmb:813,circumflexcmb:770,clear:8999,clickalveolar:450,clickdental:448,clicklateral:449,clickretroflex:451,club:9827,clubsuitblack:9827,clubsuitwhite:9831,cmcubedsquare:13220,cmonospace:65347,cmsquaredsquare:13216,coarmenian:1409,colon:58,colonmonetary:8353,colonmonospace:65306,colonsign:8353,colonsmall:65109,colontriangularhalfmod:721,colontriangularmod:720,comma:44,commaabovecmb:787,commaaboverightcmb:789,commaaccent:63171,commaarabic:1548,commaarmenian:1373,commainferior:63201,commamonospace:65292,commareversedabovecmb:788,commareversedmod:701,commasmall:65104,commasuperior:63202,commaturnedabovecmb:786,commaturnedmod:699,compass:9788,congruent:8773,contourintegral:8750,control:8963,controlACK:6,controlBEL:7,controlBS:8,controlCAN:24,controlCR:13,controlDC1:17,controlDC2:18,controlDC3:19,controlDC4:20,controlDEL:127,controlDLE:16,controlEM:25,controlENQ:5,controlEOT:4,controlESC:27,controlETB:23,controlETX:3,controlFF:12,controlFS:28,controlGS:29,controlHT:9,controlLF:10,controlNAK:21,controlRS:30,controlSI:15,controlSO:14,controlSOT:2,controlSTX:1,controlSUB:26,controlSYN:22,controlUS:31,controlVT:11,copyright:169,copyrightsans:63721,copyrightserif:63193,cornerbracketleft:12300,cornerbracketlefthalfwidth:65378,cornerbracketleftvertical:65089,cornerbracketright:12301,cornerbracketrighthalfwidth:65379,cornerbracketrightvertical:65090,corporationsquare:13183,cosquare:13255,coverkgsquare:13254,cparen:9374,cruzeiro:8354,cstretched:663,curlyand:8911,curlyor:8910,currency:164,cyrBreve:63185,cyrFlex:63186,cyrbreve:63188,cyrflex:63189,d:100,daarmenian:1380,dabengali:2470,dadarabic:1590,dadeva:2342,dadfinalarabic:65214,dadinitialarabic:65215,dadmedialarabic:65216,dagesh:1468,dageshhebrew:1468,dagger:8224,daggerdbl:8225,dagujarati:2726,dagurmukhi:2598,dahiragana:12384,dakatakana:12480,dalarabic:1583,dalet:1491,daletdagesh:64307,daletdageshhebrew:64307,dalethebrew:1491,dalfinalarabic:65194,dammaarabic:1615,dammalowarabic:1615,dammatanaltonearabic:1612,dammatanarabic:1612,danda:2404,dargahebrew:1447,dargalefthebrew:1447,dasiapneumatacyrilliccmb:1157,dblGrave:63187,dblanglebracketleft:12298,dblanglebracketleftvertical:65085,dblanglebracketright:12299,dblanglebracketrightvertical:65086,dblarchinvertedbelowcmb:811,dblarrowleft:8660,dblarrowright:8658,dbldanda:2405,dblgrave:63190,dblgravecmb:783,dblintegral:8748,dbllowline:8215,dbllowlinecmb:819,dbloverlinecmb:831,dblprimemod:698,dblverticalbar:8214,dblverticallineabovecmb:782,dbopomofo:12553,dbsquare:13256,dcaron:271,dcedilla:7697,dcircle:9427,dcircumflexbelow:7699,dcroat:273,ddabengali:2465,ddadeva:2337,ddagujarati:2721,ddagurmukhi:2593,ddalarabic:1672,ddalfinalarabic:64393,dddhadeva:2396,ddhabengali:2466,ddhadeva:2338,ddhagujarati:2722,ddhagurmukhi:2594,ddotaccent:7691,ddotbelow:7693,decimalseparatorarabic:1643,decimalseparatorpersian:1643,decyrillic:1076,degree:176,dehihebrew:1453,dehiragana:12391,deicoptic:1007,dekatakana:12487,deleteleft:9003,deleteright:8998,delta:948,deltaturned:397,denominatorminusonenumeratorbengali:2552,dezh:676,dhabengali:2471,dhadeva:2343,dhagujarati:2727,dhagurmukhi:2599,dhook:599,dialytikatonos:901,dialytikatonoscmb:836,diamond:9830,diamondsuitwhite:9826,dieresis:168,dieresisacute:63191,dieresisbelowcmb:804,dieresiscmb:776,dieresisgrave:63192,dieresistonos:901,dihiragana:12386,dikatakana:12482,dittomark:12291,divide:247,divides:8739,divisionslash:8725,djecyrillic:1106,dkshade:9619,dlinebelow:7695,dlsquare:13207,dmacron:273,dmonospace:65348,dnblock:9604,dochadathai:3598,dodekthai:3604,dohiragana:12393,dokatakana:12489,dollar:36,dollarinferior:63203,dollarmonospace:65284,dollaroldstyle:63268,dollarsmall:65129,dollarsuperior:63204,dong:8363,dorusquare:13094,dotaccent:729,dotaccentcmb:775,dotbelowcmb:803,dotbelowcomb:803,dotkatakana:12539,dotlessi:305,dotlessj:63166,dotlessjstrokehook:644,dotmath:8901,dottedcircle:9676,doubleyodpatah:64287,doubleyodpatahhebrew:64287,downtackbelowcmb:798,downtackmod:725,dparen:9375,dsuperior:63211,dtail:598,dtopbar:396,duhiragana:12389,dukatakana:12485,dz:499,dzaltone:675,dzcaron:454,dzcurl:677,dzeabkhasiancyrillic:1249,dzecyrillic:1109,dzhecyrillic:1119,e:101,eacute:233,earth:9793,ebengali:2447,ebopomofo:12572,ebreve:277,ecandradeva:2317,ecandragujarati:2701,ecandravowelsigndeva:2373,ecandravowelsigngujarati:2757,ecaron:283,ecedillabreve:7709,echarmenian:1381,echyiwnarmenian:1415,ecircle:9428,ecircumflex:234,ecircumflexacute:7871,ecircumflexbelow:7705,ecircumflexdotbelow:7879,ecircumflexgrave:7873,ecircumflexhookabove:7875,ecircumflextilde:7877,ecyrillic:1108,edblgrave:517,edeva:2319,edieresis:235,edot:279,edotaccent:279,edotbelow:7865,eegurmukhi:2575,eematragurmukhi:2631,efcyrillic:1092,egrave:232,egujarati:2703,eharmenian:1383,ehbopomofo:12573,ehiragana:12360,ehookabove:7867,eibopomofo:12575,eight:56,eightarabic:1640,eightbengali:2542,eightcircle:9319,eightcircleinversesansserif:10129,eightdeva:2414,eighteencircle:9329,eighteenparen:9349,eighteenperiod:9369,eightgujarati:2798,eightgurmukhi:2670,eighthackarabic:1640,eighthangzhou:12328,eighthnotebeamed:9835,eightideographicparen:12839,eightinferior:8328,eightmonospace:65304,eightoldstyle:63288,eightparen:9339,eightperiod:9359,eightpersian:1784,eightroman:8567,eightsuperior:8312,eightthai:3672,einvertedbreve:519,eiotifiedcyrillic:1125,ekatakana:12456,ekatakanahalfwidth:65396,ekonkargurmukhi:2676,ekorean:12628,elcyrillic:1083,element:8712,elevencircle:9322,elevenparen:9342,elevenperiod:9362,elevenroman:8570,ellipsis:8230,ellipsisvertical:8942,emacron:275,emacronacute:7703,emacrongrave:7701,emcyrillic:1084,emdash:8212,emdashvertical:65073,emonospace:65349,emphasismarkarmenian:1371,emptyset:8709,enbopomofo:12579,encyrillic:1085,endash:8211,endashvertical:65074,endescendercyrillic:1187,eng:331,engbopomofo:12581,enghecyrillic:1189,enhookcyrillic:1224,enspace:8194,eogonek:281,eokorean:12627,eopen:603,eopenclosed:666,eopenreversed:604,eopenreversedclosed:606,eopenreversedhook:605,eparen:9376,epsilon:949,epsilontonos:941,equal:61,equalmonospace:65309,equalsmall:65126,equalsuperior:8316,equivalence:8801,erbopomofo:12582,ercyrillic:1088,ereversed:600,ereversedcyrillic:1101,escyrillic:1089,esdescendercyrillic:1195,esh:643,eshcurl:646,eshortdeva:2318,eshortvowelsigndeva:2374,eshreversedloop:426,eshsquatreversed:645,esmallhiragana:12359,esmallkatakana:12455,esmallkatakanahalfwidth:65386,estimated:8494,esuperior:63212,eta:951,etarmenian:1384,etatonos:942,eth:240,etilde:7869,etildebelow:7707,etnahtafoukhhebrew:1425,etnahtafoukhlefthebrew:1425,etnahtahebrew:1425,etnahtalefthebrew:1425,eturned:477,eukorean:12641,euro:8364,evowelsignbengali:2503,evowelsigndeva:2375,evowelsigngujarati:2759,exclam:33,exclamarmenian:1372,exclamdbl:8252,exclamdown:161,exclamdownsmall:63393,exclammonospace:65281,exclamsmall:63265,existential:8707,ezh:658,ezhcaron:495,ezhcurl:659,ezhreversed:441,ezhtail:442,f:102,fadeva:2398,fagurmukhi:2654,fahrenheit:8457,fathaarabic:1614,fathalowarabic:1614,fathatanarabic:1611,fbopomofo:12552,fcircle:9429,fdotaccent:7711,feharabic:1601,feharmenian:1414,fehfinalarabic:65234,fehinitialarabic:65235,fehmedialarabic:65236,feicoptic:997,female:9792,ff:64256,ffi:64259,ffl:64260,fi:64257,fifteencircle:9326,fifteenparen:9346,fifteenperiod:9366,figuredash:8210,filledbox:9632,filledrect:9644,finalkaf:1498,finalkafdagesh:64314,finalkafdageshhebrew:64314,finalkafhebrew:1498,finalmem:1501,finalmemhebrew:1501,finalnun:1503,finalnunhebrew:1503,finalpe:1507,finalpehebrew:1507,finaltsadi:1509,finaltsadihebrew:1509,firsttonechinese:713,fisheye:9673,fitacyrillic:1139,five:53,fivearabic:1637,fivebengali:2539,fivecircle:9316,fivecircleinversesansserif:10126,fivedeva:2411,fiveeighths:8541,fivegujarati:2795,fivegurmukhi:2667,fivehackarabic:1637,fivehangzhou:12325,fiveideographicparen:12836,fiveinferior:8325,fivemonospace:65301,fiveoldstyle:63285,fiveparen:9336,fiveperiod:9356,fivepersian:1781,fiveroman:8564,fivesuperior:8309,fivethai:3669,fl:64258,florin:402,fmonospace:65350,fmsquare:13209,fofanthai:3615,fofathai:3613,fongmanthai:3663,forall:8704,four:52,fourarabic:1636,fourbengali:2538,fourcircle:9315,fourcircleinversesansserif:10125,fourdeva:2410,fourgujarati:2794,fourgurmukhi:2666,fourhackarabic:1636,fourhangzhou:12324,fourideographicparen:12835,fourinferior:8324,fourmonospace:65300,fournumeratorbengali:2551,fouroldstyle:63284,fourparen:9335,fourperiod:9355,fourpersian:1780,fourroman:8563,foursuperior:8308,fourteencircle:9325,fourteenparen:9345,fourteenperiod:9365,fourthai:3668,fourthtonechinese:715,fparen:9377,fraction:8260,franc:8355,g:103,gabengali:2455,gacute:501,gadeva:2327,gafarabic:1711,gaffinalarabic:64403,gafinitialarabic:64404,gafmedialarabic:64405,gagujarati:2711,gagurmukhi:2583,gahiragana:12364,gakatakana:12460,gamma:947,gammalatinsmall:611,gammasuperior:736,gangiacoptic:1003,gbopomofo:12557,gbreve:287,gcaron:487,gcedilla:291,gcircle:9430,gcircumflex:285,gcommaaccent:291,gdot:289,gdotaccent:289,gecyrillic:1075,gehiragana:12370,gekatakana:12466,geometricallyequal:8785,gereshaccenthebrew:1436,gereshhebrew:1523,gereshmuqdamhebrew:1437,germandbls:223,gershayimaccenthebrew:1438,gershayimhebrew:1524,getamark:12307,ghabengali:2456,ghadarmenian:1394,ghadeva:2328,ghagujarati:2712,ghagurmukhi:2584,ghainarabic:1594,ghainfinalarabic:65230,ghaininitialarabic:65231,ghainmedialarabic:65232,ghemiddlehookcyrillic:1173,ghestrokecyrillic:1171,gheupturncyrillic:1169,ghhadeva:2394,ghhagurmukhi:2650,ghook:608,ghzsquare:13203,gihiragana:12366,gikatakana:12462,gimarmenian:1379,gimel:1490,gimeldagesh:64306,gimeldageshhebrew:64306,gimelhebrew:1490,gjecyrillic:1107,glottalinvertedstroke:446,glottalstop:660,glottalstopinverted:662,glottalstopmod:704,glottalstopreversed:661,glottalstopreversedmod:705,glottalstopreversedsuperior:740,glottalstopstroke:673,glottalstopstrokereversed:674,gmacron:7713,gmonospace:65351,gohiragana:12372,gokatakana:12468,gparen:9378,gpasquare:13228,gradient:8711,grave:96,gravebelowcmb:790,gravecmb:768,gravecomb:768,gravedeva:2387,gravelowmod:718,gravemonospace:65344,gravetonecmb:832,greater:62,greaterequal:8805,greaterequalorless:8923,greatermonospace:65310,greaterorequivalent:8819,greaterorless:8823,greateroverequal:8807,greatersmall:65125,gscript:609,gstroke:485,guhiragana:12368,guillemotleft:171,guillemotright:187,guilsinglleft:8249,guilsinglright:8250,gukatakana:12464,guramusquare:13080,gysquare:13257,h:104,haabkhasiancyrillic:1193,haaltonearabic:1729,habengali:2489,hadescendercyrillic:1203,hadeva:2361,hagujarati:2745,hagurmukhi:2617,haharabic:1581,hahfinalarabic:65186,hahinitialarabic:65187,hahiragana:12399,hahmedialarabic:65188,haitusquare:13098,hakatakana:12495,hakatakanahalfwidth:65418,halantgurmukhi:2637,hamzaarabic:1569,hamzalowarabic:1569,hangulfiller:12644,hardsigncyrillic:1098,harpoonleftbarbup:8636,harpoonrightbarbup:8640,hasquare:13258,hatafpatah:1458,hatafpatah16:1458,hatafpatah23:1458,hatafpatah2f:1458, +hatafpatahhebrew:1458,hatafpatahnarrowhebrew:1458,hatafpatahquarterhebrew:1458,hatafpatahwidehebrew:1458,hatafqamats:1459,hatafqamats1b:1459,hatafqamats28:1459,hatafqamats34:1459,hatafqamatshebrew:1459,hatafqamatsnarrowhebrew:1459,hatafqamatsquarterhebrew:1459,hatafqamatswidehebrew:1459,hatafsegol:1457,hatafsegol17:1457,hatafsegol24:1457,hatafsegol30:1457,hatafsegolhebrew:1457,hatafsegolnarrowhebrew:1457,hatafsegolquarterhebrew:1457,hatafsegolwidehebrew:1457,hbar:295,hbopomofo:12559,hbrevebelow:7723,hcedilla:7721,hcircle:9431,hcircumflex:293,hdieresis:7719,hdotaccent:7715,hdotbelow:7717,he:1492,heart:9829,heartsuitblack:9829,heartsuitwhite:9825,hedagesh:64308,hedageshhebrew:64308,hehaltonearabic:1729,heharabic:1607,hehebrew:1492,hehfinalaltonearabic:64423,hehfinalalttwoarabic:65258,hehfinalarabic:65258,hehhamzaabovefinalarabic:64421,hehhamzaaboveisolatedarabic:64420,hehinitialaltonearabic:64424,hehinitialarabic:65259,hehiragana:12408,hehmedialaltonearabic:64425,hehmedialarabic:65260,heiseierasquare:13179,hekatakana:12504,hekatakanahalfwidth:65421,hekutaarusquare:13110,henghook:615,herutusquare:13113,het:1495,hethebrew:1495,hhook:614,hhooksuperior:689,hieuhacirclekorean:12923,hieuhaparenkorean:12827,hieuhcirclekorean:12909,hieuhkorean:12622,hieuhparenkorean:12813,hihiragana:12402,hikatakana:12498,hikatakanahalfwidth:65419,hiriq:1460,hiriq14:1460,hiriq21:1460,hiriq2d:1460,hiriqhebrew:1460,hiriqnarrowhebrew:1460,hiriqquarterhebrew:1460,hiriqwidehebrew:1460,hlinebelow:7830,hmonospace:65352,hoarmenian:1392,hohipthai:3627,hohiragana:12411,hokatakana:12507,hokatakanahalfwidth:65422,holam:1465,holam19:1465,holam26:1465,holam32:1465,holamhebrew:1465,holamnarrowhebrew:1465,holamquarterhebrew:1465,holamwidehebrew:1465,honokhukthai:3630,hookabovecomb:777,hookcmb:777,hookpalatalizedbelowcmb:801,hookretroflexbelowcmb:802,hoonsquare:13122,horicoptic:1001,horizontalbar:8213,horncmb:795,hotsprings:9832,house:8962,hparen:9379,hsuperior:688,hturned:613,huhiragana:12405,huiitosquare:13107,hukatakana:12501,hukatakanahalfwidth:65420,hungarumlaut:733,hungarumlautcmb:779,hv:405,hyphen:45,hypheninferior:63205,hyphenmonospace:65293,hyphensmall:65123,hyphensuperior:63206,hyphentwo:8208,i:105,iacute:237,iacyrillic:1103,ibengali:2439,ibopomofo:12583,ibreve:301,icaron:464,icircle:9432,icircumflex:238,icyrillic:1110,idblgrave:521,ideographearthcircle:12943,ideographfirecircle:12939,ideographicallianceparen:12863,ideographiccallparen:12858,ideographiccentrecircle:12965,ideographicclose:12294,ideographiccomma:12289,ideographiccommaleft:65380,ideographiccongratulationparen:12855,ideographiccorrectcircle:12963,ideographicearthparen:12847,ideographicenterpriseparen:12861,ideographicexcellentcircle:12957,ideographicfestivalparen:12864,ideographicfinancialcircle:12950,ideographicfinancialparen:12854,ideographicfireparen:12843,ideographichaveparen:12850,ideographichighcircle:12964,ideographiciterationmark:12293,ideographiclaborcircle:12952,ideographiclaborparen:12856,ideographicleftcircle:12967,ideographiclowcircle:12966,ideographicmedicinecircle:12969,ideographicmetalparen:12846,ideographicmoonparen:12842,ideographicnameparen:12852,ideographicperiod:12290,ideographicprintcircle:12958,ideographicreachparen:12867,ideographicrepresentparen:12857,ideographicresourceparen:12862,ideographicrightcircle:12968,ideographicsecretcircle:12953,ideographicselfparen:12866,ideographicsocietyparen:12851,ideographicspace:12288,ideographicspecialparen:12853,ideographicstockparen:12849,ideographicstudyparen:12859,ideographicsunparen:12848,ideographicsuperviseparen:12860,ideographicwaterparen:12844,ideographicwoodparen:12845,ideographiczero:12295,ideographmetalcircle:12942,ideographmooncircle:12938,ideographnamecircle:12948,ideographsuncircle:12944,ideographwatercircle:12940,ideographwoodcircle:12941,ideva:2311,idieresis:239,idieresisacute:7727,idieresiscyrillic:1253,idotbelow:7883,iebrevecyrillic:1239,iecyrillic:1077,ieungacirclekorean:12917,ieungaparenkorean:12821,ieungcirclekorean:12903,ieungkorean:12615,ieungparenkorean:12807,igrave:236,igujarati:2695,igurmukhi:2567,ihiragana:12356,ihookabove:7881,iibengali:2440,iicyrillic:1080,iideva:2312,iigujarati:2696,iigurmukhi:2568,iimatragurmukhi:2624,iinvertedbreve:523,iishortcyrillic:1081,iivowelsignbengali:2496,iivowelsigndeva:2368,iivowelsigngujarati:2752,ij:307,ikatakana:12452,ikatakanahalfwidth:65394,ikorean:12643,ilde:732,iluyhebrew:1452,imacron:299,imacroncyrillic:1251,imageorapproximatelyequal:8787,imatragurmukhi:2623,imonospace:65353,increment:8710,infinity:8734,iniarmenian:1387,integral:8747,integralbottom:8993,integralbt:8993,integralex:63733,integraltop:8992,integraltp:8992,intersection:8745,intisquare:13061,invbullet:9688,invcircle:9689,invsmileface:9787,iocyrillic:1105,iogonek:303,iota:953,iotadieresis:970,iotadieresistonos:912,iotalatin:617,iotatonos:943,iparen:9380,irigurmukhi:2674,ismallhiragana:12355,ismallkatakana:12451,ismallkatakanahalfwidth:65384,issharbengali:2554,istroke:616,isuperior:63213,iterationhiragana:12445,iterationkatakana:12541,itilde:297,itildebelow:7725,iubopomofo:12585,iucyrillic:1102,ivowelsignbengali:2495,ivowelsigndeva:2367,ivowelsigngujarati:2751,izhitsacyrillic:1141,izhitsadblgravecyrillic:1143,j:106,jaarmenian:1393,jabengali:2460,jadeva:2332,jagujarati:2716,jagurmukhi:2588,jbopomofo:12560,jcaron:496,jcircle:9433,jcircumflex:309,jcrossedtail:669,jdotlessstroke:607,jecyrillic:1112,jeemarabic:1580,jeemfinalarabic:65182,jeeminitialarabic:65183,jeemmedialarabic:65184,jeharabic:1688,jehfinalarabic:64395,jhabengali:2461,jhadeva:2333,jhagujarati:2717,jhagurmukhi:2589,jheharmenian:1403,jis:12292,jmonospace:65354,jparen:9381,jsuperior:690,k:107,kabashkircyrillic:1185,kabengali:2453,kacute:7729,kacyrillic:1082,kadescendercyrillic:1179,kadeva:2325,kaf:1499,kafarabic:1603,kafdagesh:64315,kafdageshhebrew:64315,kaffinalarabic:65242,kafhebrew:1499,kafinitialarabic:65243,kafmedialarabic:65244,kafrafehebrew:64333,kagujarati:2709,kagurmukhi:2581,kahiragana:12363,kahookcyrillic:1220,kakatakana:12459,kakatakanahalfwidth:65398,kappa:954,kappasymbolgreek:1008,kapyeounmieumkorean:12657,kapyeounphieuphkorean:12676,kapyeounpieupkorean:12664,kapyeounssangpieupkorean:12665,karoriisquare:13069,kashidaautoarabic:1600,kashidaautonosidebearingarabic:1600,kasmallkatakana:12533,kasquare:13188,kasraarabic:1616,kasratanarabic:1613,kastrokecyrillic:1183,katahiraprolongmarkhalfwidth:65392,kaverticalstrokecyrillic:1181,kbopomofo:12558,kcalsquare:13193,kcaron:489,kcedilla:311,kcircle:9434,kcommaaccent:311,kdotbelow:7731,keharmenian:1412,kehiragana:12369,kekatakana:12465,kekatakanahalfwidth:65401,kenarmenian:1391,kesmallkatakana:12534,kgreenlandic:312,khabengali:2454,khacyrillic:1093,khadeva:2326,khagujarati:2710,khagurmukhi:2582,khaharabic:1582,khahfinalarabic:65190,khahinitialarabic:65191,khahmedialarabic:65192,kheicoptic:999,khhadeva:2393,khhagurmukhi:2649,khieukhacirclekorean:12920,khieukhaparenkorean:12824,khieukhcirclekorean:12906,khieukhkorean:12619,khieukhparenkorean:12810,khokhaithai:3586,khokhonthai:3589,khokhuatthai:3587,khokhwaithai:3588,khomutthai:3675,khook:409,khorakhangthai:3590,khzsquare:13201,kihiragana:12365,kikatakana:12461,kikatakanahalfwidth:65399,kiroguramusquare:13077,kiromeetorusquare:13078,kirosquare:13076,kiyeokacirclekorean:12910,kiyeokaparenkorean:12814,kiyeokcirclekorean:12896,kiyeokkorean:12593,kiyeokparenkorean:12800,kiyeoksioskorean:12595,kjecyrillic:1116,klinebelow:7733,klsquare:13208,kmcubedsquare:13222,kmonospace:65355,kmsquaredsquare:13218,kohiragana:12371,kohmsquare:13248,kokaithai:3585,kokatakana:12467,kokatakanahalfwidth:65402,kooposquare:13086,koppacyrillic:1153,koreanstandardsymbol:12927,koroniscmb:835,kparen:9382,kpasquare:13226,ksicyrillic:1135,ktsquare:13263,kturned:670,kuhiragana:12367,kukatakana:12463,kukatakanahalfwidth:65400,kvsquare:13240,kwsquare:13246,l:108,labengali:2482,lacute:314,ladeva:2354,lagujarati:2738,lagurmukhi:2610,lakkhangyaothai:3653,lamaleffinalarabic:65276,lamalefhamzaabovefinalarabic:65272,lamalefhamzaaboveisolatedarabic:65271,lamalefhamzabelowfinalarabic:65274,lamalefhamzabelowisolatedarabic:65273,lamalefisolatedarabic:65275,lamalefmaddaabovefinalarabic:65270,lamalefmaddaaboveisolatedarabic:65269,lamarabic:1604,lambda:955,lambdastroke:411,lamed:1500,lameddagesh:64316,lameddageshhebrew:64316,lamedhebrew:1500,lamfinalarabic:65246,lamhahinitialarabic:64714,laminitialarabic:65247,lamjeeminitialarabic:64713,lamkhahinitialarabic:64715,lamlamhehisolatedarabic:65010,lammedialarabic:65248,lammeemhahinitialarabic:64904,lammeeminitialarabic:64716,largecircle:9711,lbar:410,lbelt:620,lbopomofo:12556,lcaron:318,lcedilla:316,lcircle:9435,lcircumflexbelow:7741,lcommaaccent:316,ldot:320,ldotaccent:320,ldotbelow:7735,ldotbelowmacron:7737,leftangleabovecmb:794,lefttackbelowcmb:792,less:60,lessequal:8804,lessequalorgreater:8922,lessmonospace:65308,lessorequivalent:8818,lessorgreater:8822,lessoverequal:8806,lesssmall:65124,lezh:622,lfblock:9612,lhookretroflex:621,lira:8356,liwnarmenian:1388,lj:457,ljecyrillic:1113,ll:63168,lladeva:2355,llagujarati:2739,llinebelow:7739,llladeva:2356,llvocalicbengali:2529,llvocalicdeva:2401,llvocalicvowelsignbengali:2531,llvocalicvowelsigndeva:2403,lmiddletilde:619,lmonospace:65356,lmsquare:13264,lochulathai:3628,logicaland:8743,logicalnot:172,logicalnotreversed:8976,logicalor:8744,lolingthai:3621,longs:383,lowlinecenterline:65102,lowlinecmb:818,lowlinedashed:65101,lozenge:9674,lparen:9383,lslash:322,lsquare:8467,lsuperior:63214,ltshade:9617,luthai:3622,lvocalicbengali:2444,lvocalicdeva:2316,lvocalicvowelsignbengali:2530,lvocalicvowelsigndeva:2402,lxsquare:13267,m:109,mabengali:2478,macron:175,macronbelowcmb:817,macroncmb:772,macronlowmod:717,macronmonospace:65507,macute:7743,madeva:2350,magujarati:2734,magurmukhi:2606,mahapakhhebrew:1444,mahapakhlefthebrew:1444,mahiragana:12414,maichattawalowleftthai:63637,maichattawalowrightthai:63636,maichattawathai:3659,maichattawaupperleftthai:63635,maieklowleftthai:63628,maieklowrightthai:63627,maiekthai:3656,maiekupperleftthai:63626,maihanakatleftthai:63620,maihanakatthai:3633,maitaikhuleftthai:63625,maitaikhuthai:3655,maitholowleftthai:63631,maitholowrightthai:63630,maithothai:3657,maithoupperleftthai:63629,maitrilowleftthai:63634,maitrilowrightthai:63633,maitrithai:3658,maitriupperleftthai:63632,maiyamokthai:3654,makatakana:12510,makatakanahalfwidth:65423,male:9794,mansyonsquare:13127,maqafhebrew:1470,mars:9794,masoracirclehebrew:1455,masquare:13187,mbopomofo:12551,mbsquare:13268,mcircle:9436,mcubedsquare:13221,mdotaccent:7745,mdotbelow:7747,meemarabic:1605,meemfinalarabic:65250,meeminitialarabic:65251,meemmedialarabic:65252,meemmeeminitialarabic:64721,meemmeemisolatedarabic:64584,meetorusquare:13133,mehiragana:12417,meizierasquare:13182,mekatakana:12513,mekatakanahalfwidth:65426,mem:1502,memdagesh:64318,memdageshhebrew:64318,memhebrew:1502,menarmenian:1396,merkhahebrew:1445,merkhakefulahebrew:1446,merkhakefulalefthebrew:1446,merkhalefthebrew:1445,mhook:625,mhzsquare:13202,middledotkatakanahalfwidth:65381,middot:183,mieumacirclekorean:12914,mieumaparenkorean:12818,mieumcirclekorean:12900,mieumkorean:12609,mieumpansioskorean:12656,mieumparenkorean:12804,mieumpieupkorean:12654,mieumsioskorean:12655,mihiragana:12415,mikatakana:12511,mikatakanahalfwidth:65424,minus:8722,minusbelowcmb:800,minuscircle:8854,minusmod:727,minusplus:8723,minute:8242,miribaarusquare:13130,mirisquare:13129,mlonglegturned:624,mlsquare:13206,mmcubedsquare:13219,mmonospace:65357,mmsquaredsquare:13215,mohiragana:12418,mohmsquare:13249,mokatakana:12514,mokatakanahalfwidth:65427,molsquare:13270,momathai:3617,moverssquare:13223,moverssquaredsquare:13224,mparen:9384,mpasquare:13227,mssquare:13235,msuperior:63215,mturned:623,mu:181,mu1:181,muasquare:13186,muchgreater:8811,muchless:8810,mufsquare:13196,mugreek:956,mugsquare:13197,muhiragana:12416,mukatakana:12512,mukatakanahalfwidth:65425,mulsquare:13205,multiply:215,mumsquare:13211,munahhebrew:1443,munahlefthebrew:1443,musicalnote:9834,musicalnotedbl:9835,musicflatsign:9837,musicsharpsign:9839,mussquare:13234,muvsquare:13238,muwsquare:13244,mvmegasquare:13241,mvsquare:13239,mwmegasquare:13247,mwsquare:13245,n:110,nabengali:2472,nabla:8711,nacute:324,nadeva:2344,nagujarati:2728,nagurmukhi:2600,nahiragana:12394,nakatakana:12490,nakatakanahalfwidth:65413,napostrophe:329,nasquare:13185,nbopomofo:12555,nbspace:160,ncaron:328,ncedilla:326,ncircle:9437,ncircumflexbelow:7755,ncommaaccent:326,ndotaccent:7749,ndotbelow:7751,nehiragana:12397,nekatakana:12493,nekatakanahalfwidth:65416,newsheqelsign:8362,nfsquare:13195,ngabengali:2457,ngadeva:2329,ngagujarati:2713,ngagurmukhi:2585,ngonguthai:3591,nhiragana:12435,nhookleft:626,nhookretroflex:627,nieunacirclekorean:12911,nieunaparenkorean:12815,nieuncieuckorean:12597,nieuncirclekorean:12897,nieunhieuhkorean:12598,nieunkorean:12596,nieunpansioskorean:12648,nieunparenkorean:12801,nieunsioskorean:12647,nieuntikeutkorean:12646,nihiragana:12395,nikatakana:12491,nikatakanahalfwidth:65414,nikhahitleftthai:63641,nikhahitthai:3661,nine:57,ninearabic:1641,ninebengali:2543,ninecircle:9320,ninecircleinversesansserif:10130,ninedeva:2415,ninegujarati:2799,ninegurmukhi:2671,ninehackarabic:1641,ninehangzhou:12329,nineideographicparen:12840,nineinferior:8329,ninemonospace:65305,nineoldstyle:63289,nineparen:9340,nineperiod:9360,ninepersian:1785,nineroman:8568,ninesuperior:8313,nineteencircle:9330,nineteenparen:9350,nineteenperiod:9370,ninethai:3673,nj:460,njecyrillic:1114,nkatakana:12531,nkatakanahalfwidth:65437,nlegrightlong:414,nlinebelow:7753,nmonospace:65358,nmsquare:13210,nnabengali:2467,nnadeva:2339,nnagujarati:2723,nnagurmukhi:2595,nnnadeva:2345,nohiragana:12398,nokatakana:12494,nokatakanahalfwidth:65417,nonbreakingspace:160,nonenthai:3603,nonuthai:3609,noonarabic:1606,noonfinalarabic:65254,noonghunnaarabic:1722,noonghunnafinalarabic:64415,nooninitialarabic:65255,noonjeeminitialarabic:64722,noonjeemisolatedarabic:64587,noonmedialarabic:65256,noonmeeminitialarabic:64725,noonmeemisolatedarabic:64590,noonnoonfinalarabic:64653,notcontains:8716,notelement:8713,notelementof:8713,notequal:8800,notgreater:8815,notgreaternorequal:8817,notgreaternorless:8825,notidentical:8802,notless:8814,notlessnorequal:8816,notparallel:8742,notprecedes:8832,notsubset:8836,notsucceeds:8833,notsuperset:8837,nowarmenian:1398,nparen:9385,nssquare:13233,nsuperior:8319,ntilde:241,nu:957,nuhiragana:12396,nukatakana:12492,nukatakanahalfwidth:65415,nuktabengali:2492,nuktadeva:2364,nuktagujarati:2748,nuktagurmukhi:2620,numbersign:35,numbersignmonospace:65283,numbersignsmall:65119,numeralsigngreek:884,numeralsignlowergreek:885,numero:8470,nun:1504,nundagesh:64320,nundageshhebrew:64320,nunhebrew:1504,nvsquare:13237,nwsquare:13243,nyabengali:2462,nyadeva:2334,nyagujarati:2718,nyagurmukhi:2590,o:111,oacute:243,oangthai:3629,obarred:629,obarredcyrillic:1257,obarreddieresiscyrillic:1259,obengali:2451,obopomofo:12571,obreve:335,ocandradeva:2321,ocandragujarati:2705,ocandravowelsigndeva:2377,ocandravowelsigngujarati:2761,ocaron:466,ocircle:9438,ocircumflex:244,ocircumflexacute:7889,ocircumflexdotbelow:7897,ocircumflexgrave:7891,ocircumflexhookabove:7893,ocircumflextilde:7895,ocyrillic:1086,odblacute:337,odblgrave:525,odeva:2323,odieresis:246,odieresiscyrillic:1255,odotbelow:7885,oe:339,oekorean:12634,ogonek:731,ogonekcmb:808,ograve:242,ogujarati:2707,oharmenian:1413,ohiragana:12362,ohookabove:7887,ohorn:417,ohornacute:7899,ohorndotbelow:7907,ohorngrave:7901,ohornhookabove:7903,ohorntilde:7905,ohungarumlaut:337,oi:419,oinvertedbreve:527,okatakana:12458,okatakanahalfwidth:65397,okorean:12631,olehebrew:1451,omacron:333,omacronacute:7763,omacrongrave:7761,omdeva:2384,omega:969,omega1:982,omegacyrillic:1121,omegalatinclosed:631,omegaroundcyrillic:1147,omegatitlocyrillic:1149,omegatonos:974,omgujarati:2768,omicron:959,omicrontonos:972,omonospace:65359,one:49,onearabic:1633,onebengali:2535,onecircle:9312,onecircleinversesansserif:10122,onedeva:2407,onedotenleader:8228,oneeighth:8539,onefitted:63196,onegujarati:2791,onegurmukhi:2663,onehackarabic:1633,onehalf:189,onehangzhou:12321,oneideographicparen:12832,oneinferior:8321,onemonospace:65297,onenumeratorbengali:2548,oneoldstyle:63281,oneparen:9332,oneperiod:9352,onepersian:1777,onequarter:188,oneroman:8560,onesuperior:185,onethai:3665,onethird:8531,oogonek:491,oogonekmacron:493,oogurmukhi:2579,oomatragurmukhi:2635,oopen:596,oparen:9386,openbullet:9702,option:8997,ordfeminine:170,ordmasculine:186,orthogonal:8735,oshortdeva:2322,oshortvowelsigndeva:2378,oslash:248,oslashacute:511,osmallhiragana:12361,osmallkatakana:12457,osmallkatakanahalfwidth:65387,ostrokeacute:511,osuperior:63216,otcyrillic:1151,otilde:245,otildeacute:7757,otildedieresis:7759,oubopomofo:12577,overline:8254,overlinecenterline:65098,overlinecmb:773,overlinedashed:65097,overlinedblwavy:65100,overlinewavy:65099,overscore:175,ovowelsignbengali:2507,ovowelsigndeva:2379,ovowelsigngujarati:2763,p:112,paampssquare:13184,paasentosquare:13099,pabengali:2474,pacute:7765,padeva:2346,pagedown:8671,pageup:8670,pagujarati:2730,pagurmukhi:2602,pahiragana:12401,paiyannoithai:3631,pakatakana:12497,palatalizationcyrilliccmb:1156,palochkacyrillic:1216,pansioskorean:12671,paragraph:182,parallel:8741,parenleft:40,parenleftaltonearabic:64830,parenleftbt:63725,parenleftex:63724,parenleftinferior:8333,parenleftmonospace:65288,parenleftsmall:65113,parenleftsuperior:8317,parenlefttp:63723,parenleftvertical:65077,parenright:41,parenrightaltonearabic:64831,parenrightbt:63736,parenrightex:63735,parenrightinferior:8334,parenrightmonospace:65289,parenrightsmall:65114,parenrightsuperior:8318,parenrighttp:63734,parenrightvertical:65078,partialdiff:8706,paseqhebrew:1472,pashtahebrew:1433,pasquare:13225,patah:1463,patah11:1463,patah1d:1463,patah2a:1463,patahhebrew:1463,patahnarrowhebrew:1463,patahquarterhebrew:1463,patahwidehebrew:1463,pazerhebrew:1441,pbopomofo:12550,pcircle:9439,pdotaccent:7767,pe:1508,pecyrillic:1087,pedagesh:64324,pedageshhebrew:64324,peezisquare:13115,pefinaldageshhebrew:64323,peharabic:1662,peharmenian:1402,pehebrew:1508,pehfinalarabic:64343,pehinitialarabic:64344,pehiragana:12410,pehmedialarabic:64345,pekatakana:12506,pemiddlehookcyrillic:1191,perafehebrew:64334,percent:37,percentarabic:1642,percentmonospace:65285,percentsmall:65130,period:46,periodarmenian:1417,periodcentered:183,periodhalfwidth:65377,periodinferior:63207,periodmonospace:65294,periodsmall:65106,periodsuperior:63208,perispomenigreekcmb:834,perpendicular:8869,perthousand:8240,peseta:8359,pfsquare:13194,phabengali:2475,phadeva:2347,phagujarati:2731,phagurmukhi:2603,phi:966,phi1:981,phieuphacirclekorean:12922,phieuphaparenkorean:12826,phieuphcirclekorean:12908,phieuphkorean:12621,phieuphparenkorean:12812,philatin:632,phinthuthai:3642,phisymbolgreek:981,phook:421,phophanthai:3614,phophungthai:3612,phosamphaothai:3616,pi:960,pieupacirclekorean:12915,pieupaparenkorean:12819,pieupcieuckorean:12662,pieupcirclekorean:12901,pieupkiyeokkorean:12658,pieupkorean:12610,pieupparenkorean:12805,pieupsioskiyeokkorean:12660,pieupsioskorean:12612,pieupsiostikeutkorean:12661,pieupthieuthkorean:12663,pieuptikeutkorean:12659,pihiragana:12404,pikatakana:12500,pisymbolgreek:982,piwrarmenian:1411,plus:43,plusbelowcmb:799,pluscircle:8853,plusminus:177,plusmod:726,plusmonospace:65291,plussmall:65122,plussuperior:8314,pmonospace:65360,pmsquare:13272,pohiragana:12413,pointingindexdownwhite:9759,pointingindexleftwhite:9756,pointingindexrightwhite:9758,pointingindexupwhite:9757,pokatakana:12509,poplathai:3611,postalmark:12306,postalmarkface:12320,pparen:9387,precedes:8826,prescription:8478,primemod:697,primereversed:8245,product:8719,projective:8965,prolongedkana:12540,propellor:8984,propersubset:8834,propersuperset:8835,proportion:8759,proportional:8733,psi:968,psicyrillic:1137,psilipneumatacyrilliccmb:1158,pssquare:13232,puhiragana:12407,pukatakana:12503,pvsquare:13236,pwsquare:13242,q:113,qadeva:2392,qadmahebrew:1448,qafarabic:1602,qaffinalarabic:65238,qafinitialarabic:65239,qafmedialarabic:65240,qamats:1464,qamats10:1464,qamats1a:1464,qamats1c:1464,qamats27:1464,qamats29:1464,qamats33:1464,qamatsde:1464,qamatshebrew:1464,qamatsnarrowhebrew:1464,qamatsqatanhebrew:1464,qamatsqatannarrowhebrew:1464,qamatsqatanquarterhebrew:1464,qamatsqatanwidehebrew:1464,qamatsquarterhebrew:1464,qamatswidehebrew:1464,qarneyparahebrew:1439,qbopomofo:12561,qcircle:9440,qhook:672,qmonospace:65361,qof:1511,qofdagesh:64327,qofdageshhebrew:64327,qofhebrew:1511,qparen:9388,quarternote:9833,qubuts:1467,qubuts18:1467,qubuts25:1467,qubuts31:1467,qubutshebrew:1467,qubutsnarrowhebrew:1467,qubutsquarterhebrew:1467,qubutswidehebrew:1467,question:63,questionarabic:1567,questionarmenian:1374,questiondown:191,questiondownsmall:63423,questiongreek:894,questionmonospace:65311,questionsmall:63295,quotedbl:34,quotedblbase:8222,quotedblleft:8220,quotedblmonospace:65282,quotedblprime:12318,quotedblprimereversed:12317,quotedblright:8221,quoteleft:8216,quoteleftreversed:8219,quotereversed:8219,quoteright:8217,quoterightn:329,quotesinglbase:8218,quotesingle:39,quotesinglemonospace:65287,r:114,raarmenian:1404,rabengali:2480,racute:341,radeva:2352,radical:8730,radicalex:63717,radoverssquare:13230,radoverssquaredsquare:13231,radsquare:13229,rafe:1471,rafehebrew:1471,ragujarati:2736,ragurmukhi:2608,rahiragana:12425,rakatakana:12521,rakatakanahalfwidth:65431,ralowerdiagonalbengali:2545,ramiddlediagonalbengali:2544,ramshorn:612,ratio:8758,rbopomofo:12566,rcaron:345,rcedilla:343,rcircle:9441,rcommaaccent:343,rdblgrave:529,rdotaccent:7769,rdotbelow:7771,rdotbelowmacron:7773,referencemark:8251,reflexsubset:8838,reflexsuperset:8839,registered:174,registersans:63720,registerserif:63194,reharabic:1585,reharmenian:1408,rehfinalarabic:65198,rehiragana:12428,rekatakana:12524,rekatakanahalfwidth:65434,resh:1512,reshdageshhebrew:64328,reshhebrew:1512,reversedtilde:8765,reviahebrew:1431,reviamugrashhebrew:1431,revlogicalnot:8976,rfishhook:638,rfishhookreversed:639,rhabengali:2525,rhadeva:2397,rho:961,rhook:637,rhookturned:635,rhookturnedsuperior:693,rhosymbolgreek:1009,rhotichookmod:734,rieulacirclekorean:12913,rieulaparenkorean:12817,rieulcirclekorean:12899,rieulhieuhkorean:12608,rieulkiyeokkorean:12602,rieulkiyeoksioskorean:12649,rieulkorean:12601,rieulmieumkorean:12603,rieulpansioskorean:12652,rieulparenkorean:12803,rieulphieuphkorean:12607,rieulpieupkorean:12604,rieulpieupsioskorean:12651,rieulsioskorean:12605,rieulthieuthkorean:12606,rieultikeutkorean:12650,rieulyeorinhieuhkorean:12653,rightangle:8735,righttackbelowcmb:793,righttriangle:8895,rihiragana:12426,rikatakana:12522,rikatakanahalfwidth:65432,ring:730,ringbelowcmb:805,ringcmb:778,ringhalfleft:703,ringhalfleftarmenian:1369,ringhalfleftbelowcmb:796,ringhalfleftcentered:723,ringhalfright:702,ringhalfrightbelowcmb:825,ringhalfrightcentered:722,rinvertedbreve:531,rittorusquare:13137,rlinebelow:7775,rlongleg:636,rlonglegturned:634,rmonospace:65362,rohiragana:12429,rokatakana:12525,rokatakanahalfwidth:65435,roruathai:3619,rparen:9389,rrabengali:2524,rradeva:2353,rragurmukhi:2652,rreharabic:1681,rrehfinalarabic:64397,rrvocalicbengali:2528,rrvocalicdeva:2400,rrvocalicgujarati:2784,rrvocalicvowelsignbengali:2500,rrvocalicvowelsigndeva:2372,rrvocalicvowelsigngujarati:2756,rsuperior:63217,rtblock:9616,rturned:633,rturnedsuperior:692,ruhiragana:12427,rukatakana:12523,rukatakanahalfwidth:65433,rupeemarkbengali:2546,rupeesignbengali:2547,rupiah:63197,ruthai:3620,rvocalicbengali:2443,rvocalicdeva:2315,rvocalicgujarati:2699,rvocalicvowelsignbengali:2499,rvocalicvowelsigndeva:2371,rvocalicvowelsigngujarati:2755,s:115,sabengali:2488,sacute:347,sacutedotaccent:7781,sadarabic:1589,sadeva:2360,sadfinalarabic:65210,sadinitialarabic:65211,sadmedialarabic:65212,sagujarati:2744,sagurmukhi:2616,sahiragana:12373,sakatakana:12469,sakatakanahalfwidth:65403,sallallahoualayhewasallamarabic:65018,samekh:1505,samekhdagesh:64321,samekhdageshhebrew:64321,samekhhebrew:1505,saraaathai:3634,saraaethai:3649,saraaimaimalaithai:3652,saraaimaimuanthai:3651,saraamthai:3635,saraathai:3632,saraethai:3648,saraiileftthai:63622,saraiithai:3637,saraileftthai:63621,saraithai:3636,saraothai:3650,saraueeleftthai:63624,saraueethai:3639,saraueleftthai:63623,sarauethai:3638,sarauthai:3640,sarauuthai:3641,sbopomofo:12569,scaron:353,scarondotaccent:7783,scedilla:351,schwa:601,schwacyrillic:1241,schwadieresiscyrillic:1243,schwahook:602,scircle:9442,scircumflex:349,scommaaccent:537,sdotaccent:7777,sdotbelow:7779,sdotbelowdotaccent:7785,seagullbelowcmb:828,second:8243,secondtonechinese:714,section:167,seenarabic:1587,seenfinalarabic:65202,seeninitialarabic:65203,seenmedialarabic:65204,segol:1462,segol13:1462,segol1f:1462,segol2c:1462,segolhebrew:1462,segolnarrowhebrew:1462,segolquarterhebrew:1462,segoltahebrew:1426,segolwidehebrew:1462,seharmenian:1405,sehiragana:12379,sekatakana:12475,sekatakanahalfwidth:65406,semicolon:59,semicolonarabic:1563,semicolonmonospace:65307,semicolonsmall:65108,semivoicedmarkkana:12444,semivoicedmarkkanahalfwidth:65439,sentisquare:13090,sentosquare:13091,seven:55,sevenarabic:1639,sevenbengali:2541,sevencircle:9318,sevencircleinversesansserif:10128,sevendeva:2413,seveneighths:8542,sevengujarati:2797,sevengurmukhi:2669,sevenhackarabic:1639,sevenhangzhou:12327,sevenideographicparen:12838,seveninferior:8327,sevenmonospace:65303,sevenoldstyle:63287,sevenparen:9338,sevenperiod:9358,sevenpersian:1783,sevenroman:8566,sevensuperior:8311,seventeencircle:9328,seventeenparen:9348,seventeenperiod:9368,seventhai:3671,sfthyphen:173,shaarmenian:1399,shabengali:2486,shacyrillic:1096,shaddaarabic:1617,shaddadammaarabic:64609,shaddadammatanarabic:64606,shaddafathaarabic:64608,shaddakasraarabic:64610,shaddakasratanarabic:64607,shade:9618,shadedark:9619,shadelight:9617,shademedium:9618,shadeva:2358,shagujarati:2742,shagurmukhi:2614,shalshelethebrew:1427,shbopomofo:12565,shchacyrillic:1097,sheenarabic:1588,sheenfinalarabic:65206,sheeninitialarabic:65207,sheenmedialarabic:65208,sheicoptic:995,sheqel:8362,sheqelhebrew:8362,sheva:1456,sheva115:1456,sheva15:1456,sheva22:1456,sheva2e:1456,shevahebrew:1456,shevanarrowhebrew:1456,shevaquarterhebrew:1456,shevawidehebrew:1456,shhacyrillic:1211,shimacoptic:1005,shin:1513,shindagesh:64329,shindageshhebrew:64329,shindageshshindot:64300,shindageshshindothebrew:64300,shindageshsindot:64301,shindageshsindothebrew:64301,shindothebrew:1473,shinhebrew:1513,shinshindot:64298,shinshindothebrew:64298,shinsindot:64299,shinsindothebrew:64299,shook:642,sigma:963,sigma1:962,sigmafinal:962,sigmalunatesymbolgreek:1010,sihiragana:12375,sikatakana:12471,sikatakanahalfwidth:65404,siluqhebrew:1469,siluqlefthebrew:1469,similar:8764,sindothebrew:1474,siosacirclekorean:12916,siosaparenkorean:12820,sioscieuckorean:12670,sioscirclekorean:12902,sioskiyeokkorean:12666,sioskorean:12613,siosnieunkorean:12667,siosparenkorean:12806,siospieupkorean:12669,siostikeutkorean:12668,six:54,sixarabic:1638,sixbengali:2540,sixcircle:9317,sixcircleinversesansserif:10127,sixdeva:2412,sixgujarati:2796,sixgurmukhi:2668,sixhackarabic:1638,sixhangzhou:12326,sixideographicparen:12837,sixinferior:8326,sixmonospace:65302,sixoldstyle:63286,sixparen:9337,sixperiod:9357,sixpersian:1782,sixroman:8565,sixsuperior:8310,sixteencircle:9327,sixteencurrencydenominatorbengali:2553,sixteenparen:9347,sixteenperiod:9367,sixthai:3670,slash:47,slashmonospace:65295,slong:383,slongdotaccent:7835,smileface:9786,smonospace:65363,sofpasuqhebrew:1475,softhyphen:173,softsigncyrillic:1100,sohiragana:12381,sokatakana:12477,sokatakanahalfwidth:65407,soliduslongoverlaycmb:824,solidusshortoverlaycmb:823,sorusithai:3625,sosalathai:3624,sosothai:3595,sosuathai:3626,space:32,spacehackarabic:32,spade:9824,spadesuitblack:9824,spadesuitwhite:9828,sparen:9390,squarebelowcmb:827,squarecc:13252,squarecm:13213,squarediagonalcrosshatchfill:9641,squarehorizontalfill:9636,squarekg:13199,squarekm:13214,squarekmcapital:13262,squareln:13265,squarelog:13266,squaremg:13198,squaremil:13269,squaremm:13212,squaremsquared:13217,squareorthogonalcrosshatchfill:9638,squareupperlefttolowerrightfill:9639,squareupperrighttolowerleftfill:9640,squareverticalfill:9637,squarewhitewithsmallblack:9635,srsquare:13275,ssabengali:2487,ssadeva:2359,ssagujarati:2743,ssangcieuckorean:12617,ssanghieuhkorean:12677,ssangieungkorean:12672,ssangkiyeokkorean:12594,ssangnieunkorean:12645,ssangpieupkorean:12611,ssangsioskorean:12614,ssangtikeutkorean:12600,ssuperior:63218,sterling:163,sterlingmonospace:65505,strokelongoverlaycmb:822,strokeshortoverlaycmb:821,subset:8834,subsetnotequal:8842,subsetorequal:8838,succeeds:8827,suchthat:8715,suhiragana:12377,sukatakana:12473,sukatakanahalfwidth:65405,sukunarabic:1618,summation:8721,sun:9788,superset:8835,supersetnotequal:8843,supersetorequal:8839,svsquare:13276,syouwaerasquare:13180,t:116,tabengali:2468,tackdown:8868,tackleft:8867,tadeva:2340,tagujarati:2724,tagurmukhi:2596,taharabic:1591,tahfinalarabic:65218,tahinitialarabic:65219,tahiragana:12383,tahmedialarabic:65220,taisyouerasquare:13181,takatakana:12479,takatakanahalfwidth:65408,tatweelarabic:1600,tau:964,tav:1514,tavdages:64330,tavdagesh:64330,tavdageshhebrew:64330,tavhebrew:1514,tbar:359,tbopomofo:12554,tcaron:357,tccurl:680,tcedilla:355,tcheharabic:1670,tchehfinalarabic:64379,tchehinitialarabic:64380,tchehmedialarabic:64381,tcircle:9443,tcircumflexbelow:7793,tcommaaccent:355,tdieresis:7831,tdotaccent:7787,tdotbelow:7789,tecyrillic:1090,tedescendercyrillic:1197,teharabic:1578,tehfinalarabic:65174,tehhahinitialarabic:64674,tehhahisolatedarabic:64524,tehinitialarabic:65175,tehiragana:12390,tehjeeminitialarabic:64673,tehjeemisolatedarabic:64523,tehmarbutaarabic:1577,tehmarbutafinalarabic:65172,tehmedialarabic:65176,tehmeeminitialarabic:64676,tehmeemisolatedarabic:64526,tehnoonfinalarabic:64627,tekatakana:12486,tekatakanahalfwidth:65411,telephone:8481,telephoneblack:9742,telishagedolahebrew:1440,telishaqetanahebrew:1449,tencircle:9321,tenideographicparen:12841,tenparen:9341,tenperiod:9361,tenroman:8569,tesh:679,tet:1496,tetdagesh:64312,tetdageshhebrew:64312,tethebrew:1496,tetsecyrillic:1205,tevirhebrew:1435,tevirlefthebrew:1435,thabengali:2469,thadeva:2341,thagujarati:2725,thagurmukhi:2597,thalarabic:1584,thalfinalarabic:65196,thanthakhatlowleftthai:63640,thanthakhatlowrightthai:63639,thanthakhatthai:3660,thanthakhatupperleftthai:63638,theharabic:1579,thehfinalarabic:65178,thehinitialarabic:65179,thehmedialarabic:65180,thereexists:8707,therefore:8756,theta:952,theta1:977,thetasymbolgreek:977,thieuthacirclekorean:12921,thieuthaparenkorean:12825,thieuthcirclekorean:12907,thieuthkorean:12620,thieuthparenkorean:12811,thirteencircle:9324,thirteenparen:9344,thirteenperiod:9364,thonangmonthothai:3601,thook:429,thophuthaothai:3602,thorn:254,thothahanthai:3607,thothanthai:3600,thothongthai:3608,thothungthai:3606,thousandcyrillic:1154,thousandsseparatorarabic:1644,thousandsseparatorpersian:1644,three:51,threearabic:1635,threebengali:2537,threecircle:9314,threecircleinversesansserif:10124,threedeva:2409,threeeighths:8540,threegujarati:2793,threegurmukhi:2665,threehackarabic:1635,threehangzhou:12323,threeideographicparen:12834,threeinferior:8323,threemonospace:65299,threenumeratorbengali:2550,threeoldstyle:63283,threeparen:9334,threeperiod:9354,threepersian:1779,threequarters:190,threequartersemdash:63198,threeroman:8562,threesuperior:179,threethai:3667,thzsquare:13204,tihiragana:12385,tikatakana:12481,tikatakanahalfwidth:65409,tikeutacirclekorean:12912,tikeutaparenkorean:12816,tikeutcirclekorean:12898,tikeutkorean:12599,tikeutparenkorean:12802,tilde:732,tildebelowcmb:816,tildecmb:771,tildecomb:771,tildedoublecmb:864,tildeoperator:8764,tildeoverlaycmb:820,tildeverticalcmb:830,timescircle:8855,tipehahebrew:1430,tipehalefthebrew:1430,tippigurmukhi:2672,titlocyrilliccmb:1155,tiwnarmenian:1407,tlinebelow:7791,tmonospace:65364,toarmenian:1385,tohiragana:12392,tokatakana:12488,tokatakanahalfwidth:65412,tonebarextrahighmod:741,tonebarextralowmod:745,tonebarhighmod:742,tonebarlowmod:744,tonebarmidmod:743, +tonefive:445,tonesix:389,tonetwo:424,tonos:900,tonsquare:13095,topatakthai:3599,tortoiseshellbracketleft:12308,tortoiseshellbracketleftsmall:65117,tortoiseshellbracketleftvertical:65081,tortoiseshellbracketright:12309,tortoiseshellbracketrightsmall:65118,tortoiseshellbracketrightvertical:65082,totaothai:3605,tpalatalhook:427,tparen:9391,trademark:8482,trademarksans:63722,trademarkserif:63195,tretroflexhook:648,triagdn:9660,triaglf:9668,triagrt:9658,triagup:9650,ts:678,tsadi:1510,tsadidagesh:64326,tsadidageshhebrew:64326,tsadihebrew:1510,tsecyrillic:1094,tsere:1461,tsere12:1461,tsere1e:1461,tsere2b:1461,tserehebrew:1461,tserenarrowhebrew:1461,tserequarterhebrew:1461,tserewidehebrew:1461,tshecyrillic:1115,tsuperior:63219,ttabengali:2463,ttadeva:2335,ttagujarati:2719,ttagurmukhi:2591,tteharabic:1657,ttehfinalarabic:64359,ttehinitialarabic:64360,ttehmedialarabic:64361,tthabengali:2464,tthadeva:2336,tthagujarati:2720,tthagurmukhi:2592,tturned:647,tuhiragana:12388,tukatakana:12484,tukatakanahalfwidth:65410,tusmallhiragana:12387,tusmallkatakana:12483,tusmallkatakanahalfwidth:65391,twelvecircle:9323,twelveparen:9343,twelveperiod:9363,twelveroman:8571,twentycircle:9331,twentyhangzhou:21316,twentyparen:9351,twentyperiod:9371,two:50,twoarabic:1634,twobengali:2536,twocircle:9313,twocircleinversesansserif:10123,twodeva:2408,twodotenleader:8229,twodotleader:8229,twodotleadervertical:65072,twogujarati:2792,twogurmukhi:2664,twohackarabic:1634,twohangzhou:12322,twoideographicparen:12833,twoinferior:8322,twomonospace:65298,twonumeratorbengali:2549,twooldstyle:63282,twoparen:9333,twoperiod:9353,twopersian:1778,tworoman:8561,twostroke:443,twosuperior:178,twothai:3666,twothirds:8532,u:117,uacute:250,ubar:649,ubengali:2441,ubopomofo:12584,ubreve:365,ucaron:468,ucircle:9444,ucircumflex:251,ucircumflexbelow:7799,ucyrillic:1091,udattadeva:2385,udblacute:369,udblgrave:533,udeva:2313,udieresis:252,udieresisacute:472,udieresisbelow:7795,udieresiscaron:474,udieresiscyrillic:1265,udieresisgrave:476,udieresismacron:470,udotbelow:7909,ugrave:249,ugujarati:2697,ugurmukhi:2569,uhiragana:12358,uhookabove:7911,uhorn:432,uhornacute:7913,uhorndotbelow:7921,uhorngrave:7915,uhornhookabove:7917,uhorntilde:7919,uhungarumlaut:369,uhungarumlautcyrillic:1267,uinvertedbreve:535,ukatakana:12454,ukatakanahalfwidth:65395,ukcyrillic:1145,ukorean:12636,umacron:363,umacroncyrillic:1263,umacrondieresis:7803,umatragurmukhi:2625,umonospace:65365,underscore:95,underscoredbl:8215,underscoremonospace:65343,underscorevertical:65075,underscorewavy:65103,union:8746,universal:8704,uogonek:371,uparen:9392,upblock:9600,upperdothebrew:1476,upsilon:965,upsilondieresis:971,upsilondieresistonos:944,upsilonlatin:650,upsilontonos:973,uptackbelowcmb:797,uptackmod:724,uragurmukhi:2675,uring:367,ushortcyrillic:1118,usmallhiragana:12357,usmallkatakana:12453,usmallkatakanahalfwidth:65385,ustraightcyrillic:1199,ustraightstrokecyrillic:1201,utilde:361,utildeacute:7801,utildebelow:7797,uubengali:2442,uudeva:2314,uugujarati:2698,uugurmukhi:2570,uumatragurmukhi:2626,uuvowelsignbengali:2498,uuvowelsigndeva:2370,uuvowelsigngujarati:2754,uvowelsignbengali:2497,uvowelsigndeva:2369,uvowelsigngujarati:2753,v:118,vadeva:2357,vagujarati:2741,vagurmukhi:2613,vakatakana:12535,vav:1493,vavdagesh:64309,vavdagesh65:64309,vavdageshhebrew:64309,vavhebrew:1493,vavholam:64331,vavholamhebrew:64331,vavvavhebrew:1520,vavyodhebrew:1521,vcircle:9445,vdotbelow:7807,vecyrillic:1074,veharabic:1700,vehfinalarabic:64363,vehinitialarabic:64364,vehmedialarabic:64365,vekatakana:12537,venus:9792,verticalbar:124,verticallineabovecmb:781,verticallinebelowcmb:809,verticallinelowmod:716,verticallinemod:712,vewarmenian:1406,vhook:651,vikatakana:12536,viramabengali:2509,viramadeva:2381,viramagujarati:2765,visargabengali:2435,visargadeva:2307,visargagujarati:2691,vmonospace:65366,voarmenian:1400,voicediterationhiragana:12446,voicediterationkatakana:12542,voicedmarkkana:12443,voicedmarkkanahalfwidth:65438,vokatakana:12538,vparen:9393,vtilde:7805,vturned:652,vuhiragana:12436,vukatakana:12532,w:119,wacute:7811,waekorean:12633,wahiragana:12431,wakatakana:12527,wakatakanahalfwidth:65436,wakorean:12632,wasmallhiragana:12430,wasmallkatakana:12526,wattosquare:13143,wavedash:12316,wavyunderscorevertical:65076,wawarabic:1608,wawfinalarabic:65262,wawhamzaabovearabic:1572,wawhamzaabovefinalarabic:65158,wbsquare:13277,wcircle:9446,wcircumflex:373,wdieresis:7813,wdotaccent:7815,wdotbelow:7817,wehiragana:12433,weierstrass:8472,wekatakana:12529,wekorean:12638,weokorean:12637,wgrave:7809,whitebullet:9702,whitecircle:9675,whitecircleinverse:9689,whitecornerbracketleft:12302,whitecornerbracketleftvertical:65091,whitecornerbracketright:12303,whitecornerbracketrightvertical:65092,whitediamond:9671,whitediamondcontainingblacksmalldiamond:9672,whitedownpointingsmalltriangle:9663,whitedownpointingtriangle:9661,whiteleftpointingsmalltriangle:9667,whiteleftpointingtriangle:9665,whitelenticularbracketleft:12310,whitelenticularbracketright:12311,whiterightpointingsmalltriangle:9657,whiterightpointingtriangle:9655,whitesmallsquare:9643,whitesmilingface:9786,whitesquare:9633,whitestar:9734,whitetelephone:9743,whitetortoiseshellbracketleft:12312,whitetortoiseshellbracketright:12313,whiteuppointingsmalltriangle:9653,whiteuppointingtriangle:9651,wihiragana:12432,wikatakana:12528,wikorean:12639,wmonospace:65367,wohiragana:12434,wokatakana:12530,wokatakanahalfwidth:65382,won:8361,wonmonospace:65510,wowaenthai:3623,wparen:9394,wring:7832,wsuperior:695,wturned:653,wynn:447,x:120,xabovecmb:829,xbopomofo:12562,xcircle:9447,xdieresis:7821,xdotaccent:7819,xeharmenian:1389,xi:958,xmonospace:65368,xparen:9395,xsuperior:739,y:121,yaadosquare:13134,yabengali:2479,yacute:253,yadeva:2351,yaekorean:12626,yagujarati:2735,yagurmukhi:2607,yahiragana:12420,yakatakana:12516,yakatakanahalfwidth:65428,yakorean:12625,yamakkanthai:3662,yasmallhiragana:12419,yasmallkatakana:12515,yasmallkatakanahalfwidth:65388,yatcyrillic:1123,ycircle:9448,ycircumflex:375,ydieresis:255,ydotaccent:7823,ydotbelow:7925,yeharabic:1610,yehbarreearabic:1746,yehbarreefinalarabic:64431,yehfinalarabic:65266,yehhamzaabovearabic:1574,yehhamzaabovefinalarabic:65162,yehhamzaaboveinitialarabic:65163,yehhamzaabovemedialarabic:65164,yehinitialarabic:65267,yehmedialarabic:65268,yehmeeminitialarabic:64733,yehmeemisolatedarabic:64600,yehnoonfinalarabic:64660,yehthreedotsbelowarabic:1745,yekorean:12630,yen:165,yenmonospace:65509,yeokorean:12629,yeorinhieuhkorean:12678,yerahbenyomohebrew:1450,yerahbenyomolefthebrew:1450,yericyrillic:1099,yerudieresiscyrillic:1273,yesieungkorean:12673,yesieungpansioskorean:12675,yesieungsioskorean:12674,yetivhebrew:1434,ygrave:7923,yhook:436,yhookabove:7927,yiarmenian:1397,yicyrillic:1111,yikorean:12642,yinyang:9775,yiwnarmenian:1410,ymonospace:65369,yod:1497,yoddagesh:64313,yoddageshhebrew:64313,yodhebrew:1497,yodyodhebrew:1522,yodyodpatahhebrew:64287,yohiragana:12424,yoikorean:12681,yokatakana:12520,yokatakanahalfwidth:65430,yokorean:12635,yosmallhiragana:12423,yosmallkatakana:12519,yosmallkatakanahalfwidth:65390,yotgreek:1011,yoyaekorean:12680,yoyakorean:12679,yoyakthai:3618,yoyingthai:3597,yparen:9396,ypogegrammeni:890,ypogegrammenigreekcmb:837,yr:422,yring:7833,ysuperior:696,ytilde:7929,yturned:654,yuhiragana:12422,yuikorean:12684,yukatakana:12518,yukatakanahalfwidth:65429,yukorean:12640,yusbigcyrillic:1131,yusbigiotifiedcyrillic:1133,yuslittlecyrillic:1127,yuslittleiotifiedcyrillic:1129,yusmallhiragana:12421,yusmallkatakana:12517,yusmallkatakanahalfwidth:65389,yuyekorean:12683,yuyeokorean:12682,yyabengali:2527,yyadeva:2399,z:122,zaarmenian:1382,zacute:378,zadeva:2395,zagurmukhi:2651,zaharabic:1592,zahfinalarabic:65222,zahinitialarabic:65223,zahiragana:12374,zahmedialarabic:65224,zainarabic:1586,zainfinalarabic:65200,zakatakana:12470,zaqefgadolhebrew:1429,zaqefqatanhebrew:1428,zarqahebrew:1432,zayin:1494,zayindagesh:64310,zayindageshhebrew:64310,zayinhebrew:1494,zbopomofo:12567,zcaron:382,zcircle:9449,zcircumflex:7825,zcurl:657,zdot:380,zdotaccent:380,zdotbelow:7827,zecyrillic:1079,zedescendercyrillic:1177,zedieresiscyrillic:1247,zehiragana:12380,zekatakana:12476,zero:48,zeroarabic:1632,zerobengali:2534,zerodeva:2406,zerogujarati:2790,zerogurmukhi:2662,zerohackarabic:1632,zeroinferior:8320,zeromonospace:65296,zerooldstyle:63280,zeropersian:1776,zerosuperior:8304,zerothai:3664,zerowidthjoiner:65279,zerowidthnonjoiner:8204,zerowidthspace:8203,zeta:950,zhbopomofo:12563,zhearmenian:1386,zhebrevecyrillic:1218,zhecyrillic:1078,zhedescendercyrillic:1175,zhedieresiscyrillic:1245,zihiragana:12376,zikatakana:12472,zinorhebrew:1454,zlinebelow:7829,zmonospace:65370,zohiragana:12382,zokatakana:12478,zparen:9397,zretroflexhook:656,zstroke:438,zuhiragana:12378,zukatakana:12474,".notdef":0},Ac={space:32,a1:9985,a2:9986,a202:9987,a3:9988,a4:9742,a5:9990,a119:9991,a118:9992,a117:9993,a11:9755,a12:9758,a13:9996,a14:9997,a15:9998,a16:9999,a105:1e4,a17:10001,a18:10002,a19:10003,a20:10004,a21:10005,a22:10006,a23:10007,a24:10008,a25:10009,a26:10010,a27:10011,a28:10012,a6:10013,a7:10014,a8:10015,a9:10016,a10:10017,a29:10018,a30:10019,a31:10020,a32:10021,a33:10022,a34:10023,a35:9733,a36:10025,a37:10026,a38:10027,a39:10028,a40:10029,a41:10030,a42:10031,a43:10032,a44:10033,a45:10034,a46:10035,a47:10036,a48:10037,a49:10038,a50:10039,a51:10040,a52:10041,a53:10042,a54:10043,a55:10044,a56:10045,a57:10046,a58:10047,a59:10048,a60:10049,a61:10050,a62:10051,a63:10052,a64:10053,a65:10054,a66:10055,a67:10056,a68:10057,a69:10058,a70:10059,a71:9679,a72:10061,a73:9632,a74:10063,a203:10064,a75:10065,a204:10066,a76:9650,a77:9660,a78:9670,a79:10070,a81:9687,a82:10072,a83:10073,a84:10074,a97:10075,a98:10076,a99:10077,a100:10078,a101:10081,a102:10082,a103:10083,a104:10084,a106:10085,a107:10086,a108:10087,a112:9827,a111:9830,a110:9829,a109:9824,a120:9312,a121:9313,a122:9314,a123:9315,a124:9316,a125:9317,a126:9318,a127:9319,a128:9320,a129:9321,a130:10102,a131:10103,a132:10104,a133:10105,a134:10106,a135:10107,a136:10108,a137:10109,a138:10110,a139:10111,a140:10112,a141:10113,a142:10114,a143:10115,a144:10116,a145:10117,a146:10118,a147:10119,a148:10120,a149:10121,a150:10122,a151:10123,a152:10124,a153:10125,a154:10126,a155:10127,a156:10128,a157:10129,a158:10130,a159:10131,a160:10132,a161:8594,a163:8596,a164:8597,a196:10136,a165:10137,a192:10138,a166:10139,a167:10140,a168:10141,a169:10142,a170:10143,a171:10144,a172:10145,a173:10146,a162:10147,a174:10148,a175:10149,a176:10150,a177:10151,a178:10152,a179:10153,a193:10154,a180:10155,a199:10156,a181:10157,a200:10158,a182:10159,a201:10161,a183:10162,a184:10163,a197:10164,a185:10165,a194:10166,a198:10167,a186:10168,a195:10169,a187:10170,a188:10171,a189:10172,a190:10173,a191:10174,a89:10088,a90:10089,a93:10090,a94:10091,a91:10092,a92:10093,a205:10094,a85:10095,a206:10096,a86:10097,a87:10098,a88:10099,a95:10100,a96:10101,".notdef":0},Bc=function(){function d(a,b,c,d){if(d instanceof Sc&&d.isNativelyDecodable(b,c)){var e=d.dict,f=e.get("ColorSpace","CS");f=Xa.parse(f,b,c);var g=f.numComps,h=a.sendWithPromise("JpegDecode",[d.getIR(),g]);return h.then(function(a){var b=a.data;return new Mc(b,0,b.length,d.dict)})}return Promise.resolve(d)}function f(a,b,c,d){return a=b+a*c,0>a?0:a>d?d:a}function g(b,d,e,f,h,i,j){this.image=e;var k=e.dict;if(k.has("Filter")){var l=k.get("Filter").name;if("JPXDecode"===l){var m=new hd;m.parseImageProperties(e.stream),e.stream.reset(),e.bitsPerComponent=m.bitsPerComponent,e.numComps=m.componentsCount}else"JBIG2Decode"===l&&(e.bitsPerComponent=1,e.numComps=1)}this.width=k.get("Width","W"),this.height=k.get("Height","H"),(this.width<1||this.height<1)&&c("Invalid image width: "+this.width+" or height: "+this.height),this.interpolate=k.get("Interpolate","I")||!1,this.imageMask=k.get("ImageMask","IM")||!1,this.matte=k.get("Matte")||!1;var n=e.bitsPerComponent;if(n||(n=k.get("BitsPerComponent","BPC"),n||(this.imageMask?n=1:c("Bits per component missing in image: "+this.imageMask))),this.bpc=n,!this.imageMask){var o=k.get("ColorSpace","CS");if(!o)switch(a("JPX images (which do not require color spaces)"),e.numComps){case 1:o=ya.get("DeviceGray");break;case 3:o=ya.get("DeviceRGB");break;case 4:o=ya.get("DeviceCMYK");break;default:c("JPX images with "+this.numComps+" color components not supported.")}this.colorSpace=Xa.parse(o,b,d),this.numComps=this.colorSpace.numComps}if(this.decode=k.get("Decode","D"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode)||j&&!Xa.isDefaultDecode(this.decode,1))){this.needsDecode=!0;var p=(1<=b?new Uint8Array(o):16>=b?new Uint16Array(o):new Uint32Array(o),q=e/g,r=f/h,s=0,t=new Uint16Array(g),u=e*d;for(1!==j&&(j=0),l=0;g>l;l++)t[l]=Math.floor(l*q)*d;if(1===d)for(k=0;h>k;k++)for(m=Math.floor(k*r)*u,l=0;g>l;l++)n=m+t[l],p[s++]=a[n];else if(3===d)for(k=0;h>k;k++)for(m=Math.floor(k*r)*u,l=0;g>l;l++)n=m+t[l],p[s++]=a[n++],p[s++]=a[n++],p[s++]=a[n++],s+=j;return p},g.createMask=function(a,b,c,d,e){var f,g,h=(b+7>>3)*c,i=a.byteLength,j=h===i;if(!d||e&&!j)if(e)for(f=new Uint8Array(h),f.set(a),g=i;h>g;g++)f[g]=255;else f=new Uint8Array(i),f.set(a);else f=a;if(e)for(g=0;i>g;g++)f[g]=~f[g];return{data:f,width:b,height:c}},g.prototype={get drawWidth(){return Math.max(this.width,this.smask&&this.smask.width||0,this.mask&&this.mask.width||0)},get drawHeight(){return Math.max(this.height,this.smask&&this.smask.height||0,this.mask&&this.mask.height||0)},decodeBuffer:function(a){var b,c,d=this.bpc,e=this.numComps,g=this.decodeAddends,h=this.decodeCoefficients,i=(1<b;b++)for(var k=0;e>k;k++)a[j]=f(a[j],g[k],h[k],i),j++}else for(b=0,c=a.length;c>b;b++)a[b]=+!a[b]},getComponents:function(a){var b=this.bpc;if(8===b)return a;var c,d,e=this.width,f=this.height,g=this.numComps,h=e*f*g,i=0,j=8>=b?new Uint8Array(h):16>=b?new Uint16Array(h):new Uint32Array(h),k=e*g,l=(1<q;q++){for(o=m+(-8&k),p=m+k;o>m;)d=a[i++],j[m]=d>>7&1,j[m+1]=d>>6&1,j[m+2]=d>>5&1,j[m+3]=d>>4&1,j[m+4]=d>>3&1,j[m+5]=d>>2&1,j[m+6]=d>>1&1,j[m+7]=1&d,m+=8;if(p>m)for(d=a[i++],n=128;p>m;)j[m++]=+!!(d&n),n>>=1}else{var r=0;for(d=0,m=0,c=h;c>m;++m){for(m%k===0&&(d=0,r=0);b>r;)d=d<<8|a[i++],r+=8;var s=r-b,t=d>>s;j[m]=0>t?0:t>l?l:t,d&=(1<k;++k)h[k]=255-h[k];i===b&&j===d||(h=g.resize(h,o.bpc,1,i,j,b,d))}else if(C(o)){h=new Uint8Array(b*d);var p=this.numComps;for(k=0,l=b*d;l>k;++k){var q=0,r=k*p;for(m=0;p>m;++m){var s=f[r+m],t=2*m;if(so[t+1]){q=255;break}}h[k]=q}}else c("Unknown mask format.");if(h)for(k=0,m=3,l=b*e;l>k;++k,m+=4)a[m]=h[k];else for(k=0,m=3,l=b*e;l>k;++k,m+=4)a[m]=255},undoPreblend:function(a,b,c){var d=this.smask&&this.smask.matte;if(d)for(var e,f,g,h=this.colorSpace.getRgb(d,0),i=h[0],j=h[1],k=h[2],l=b*c*4,m=0;l>m;m+=4){var n=a[m+3];if(0!==n){var o=255/n;e=(a[m]-i)*o+i,f=(a[m+1]-j)*o+j,g=(a[m+2]-k)*o+k,a[m]=0>=e?0:e>=255?255:0|e,a[m+1]=0>=f?0:f>=255?255:0|f,a[m+2]=0>=g?0:g>=255?255:0|g}else a[m]=255,a[m+1]=255,a[m+2]=255}},createImageData:function(a){var b,c=this.drawWidth,d=this.drawHeight,f={width:c,height:d},g=this.numComps,h=this.width,i=this.height,j=this.bpc,k=h*g*j+7>>3;if(!a){var l;if("DeviceGray"===this.colorSpace.name&&1===j?l=V.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==j||this.needsDecode||(l=V.RGB_24BPP),l&&!this.smask&&!this.mask&&c===h&&d===i){if(f.kind=l,b=this.getImageBytes(i*k),this.image instanceof Oc)f.data=b;else{var m=new Uint8Array(b.length);m.set(b),f.data=m}if(this.needsDecode){e(l===V.GRAYSCALE_1BPP);for(var n=f.data,o=0,p=n.length;p>o;o++)n[o]^=255}return f}if(this.image instanceof Sc&&!this.smask&&!this.mask&&("DeviceGray"===this.colorSpace.name||"DeviceRGB"===this.colorSpace.name||"DeviceCMYK"===this.colorSpace.name))return f.kind=V.RGB_24BPP,f.data=this.getImageBytes(i*k,c,d,!0),f}b=this.getImageBytes(i*k);var q,r,s=0|b.length/k*d/i,t=this.getComponents(b);return a||this.smask||this.mask?(f.kind=V.RGBA_32BPP,f.data=new Uint8Array(c*d*4),q=1,r=!0,this.fillOpacity(f.data,c,d,s,t)):(f.kind=V.RGB_24BPP,f.data=new Uint8Array(c*d*3),q=0,r=!1),this.needsDecode&&this.decodeBuffer(t),this.colorSpace.fillRgb(f.data,h,i,c,d,s,j,t,q),r&&this.undoPreblend(f.data,c,s),f},fillGrayBuffer:function(a){var b=this.numComps;1!==b&&c("Reading gray scale from a color image: "+b);var d,e,f=this.width,g=this.height,h=this.bpc,i=f*b*h+7>>3,j=this.getImageBytes(g*i),k=this.getComponents(j);if(1!==h){this.needsDecode&&this.decodeBuffer(k),e=f*g;var l=255/((1<d;++d)a[d]=l*k[d]|0}else if(e=f*g,this.needsDecode)for(d=0;e>d;++d)a[d]=k[d]-1&255;else for(d=0;e>d;++d)a[d]=255&-k[d]},getImageBytes:function(a,b,c,d){return this.image.reset(),this.image.drawWidth=b||this.width,this.image.drawHeight=c||this.height,this.image.forceRGB=!!d,this.image.getBytes(a)}},g}(),Cc={Courier:600,"Courier-Bold":600,"Courier-BoldOblique":600,"Courier-Oblique":600,Helvetica:{space:278,exclam:278,quotedbl:355,numbersign:556,dollar:556,percent:889,ampersand:667,quoteright:222,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:278,semicolon:278,less:584,equal:584,greater:584,question:556,at:1015,A:667,B:667,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:500,K:667,L:556,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:278,backslash:278,bracketright:278,asciicircum:469,underscore:556,quoteleft:222,a:556,b:556,c:500,d:556,e:556,f:278,g:556,h:556,i:222,j:222,k:500,l:222,m:833,n:556,o:556,p:556,q:556,r:333,s:500,t:278,u:556,v:500,w:722,x:500,y:500,z:500,braceleft:334,bar:260,braceright:334,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:191,quotedblleft:333,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:500,fl:500,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:537,bullet:350,quotesinglbase:222,quotedblbase:333,quotedblright:333,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:556,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:222,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:556,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:667,aacute:556,Ucircumflex:722,yacute:500,scommaaccent:500,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:500,aring:556,Ncommaaccent:722,lacute:222,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:500,scedilla:500,iacute:278,lozenge:471,Rcaron:722,Gcommaaccent:778,ucircumflex:556,acircumflex:556,Amacron:667,rcaron:333,ccedilla:500,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:643,Umacron:722,uring:556,threesuperior:333,Ograve:778,Agrave:667,Abreve:667,multiply:584,uacute:556,Tcaron:611,partialdiff:476,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:500,nacute:556,umacron:556,Ncaron:722,Iacute:278,plusminus:584,brokenbar:260,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:333,omacron:556,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:222,tcaron:317,eogonek:556,Uogonek:722,Aacute:667,Adieresis:667,egrave:556,zacute:500,iogonek:222,Oacute:778,oacute:556,amacron:556,sacute:500,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:556,twosuperior:333,Odieresis:778,mu:556,igrave:278,ohungarumlaut:556,Eogonek:667,dcroat:556,threequarters:834,Scedilla:667,lcaron:299,Kcommaaccent:667,Lacute:556,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:556,onehalf:834,lessequal:549,ocircumflex:556,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:556,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:556,Ccaron:722,ugrave:556,radical:453,Dcaron:722,rcommaaccent:333,Ntilde:722,otilde:556,Rcommaaccent:722,Lcommaaccent:556,Atilde:667,Aogonek:667,Aring:667,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:500,minus:584,Icircumflex:278,ncaron:556,tcommaaccent:278,logicalnot:584,odieresis:556,udieresis:556,notequal:549,gcommaaccent:556,eth:556,zcaron:500,ncommaaccent:556,onesuperior:333,imacron:278,Euro:556},"Helvetica-Bold":{space:278,exclam:333,quotedbl:474,numbersign:556,dollar:556,percent:889,ampersand:722,quoteright:278,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:333,semicolon:333,less:584,equal:584,greater:584,question:611,at:975,A:722,B:722,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:556,K:722,L:611,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:584,underscore:556,quoteleft:278,a:556,b:611,c:556,d:611,e:556,f:333,g:611,h:611,i:278,j:278,k:556,l:278,m:889,n:611,o:611,p:611,q:611,r:389,s:556,t:333,u:611,v:556,w:778,x:556,y:556,z:500,braceleft:389,bar:280,braceright:389,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:238,quotedblleft:500,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:611,fl:611,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:556,bullet:350,quotesinglbase:278,quotedblbase:500,quotedblright:500,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:611,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:278,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:611,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:722,aacute:556,Ucircumflex:722,yacute:556,scommaaccent:556,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:611,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:556,aring:556,Ncommaaccent:722,lacute:278,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:556,scedilla:556,iacute:278,lozenge:494,Rcaron:722,Gcommaaccent:778,ucircumflex:611,acircumflex:556,Amacron:722,rcaron:389,ccedilla:556,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:743,Umacron:722,uring:611,threesuperior:333,Ograve:778,Agrave:722,Abreve:722,multiply:584,uacute:611,Tcaron:611,partialdiff:494,ydieresis:556,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:556,nacute:611,umacron:611,Ncaron:722,Iacute:278,plusminus:584,brokenbar:280,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:389,omacron:611,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:278,tcaron:389,eogonek:556,Uogonek:722,Aacute:722,Adieresis:722,egrave:556,zacute:500,iogonek:278,Oacute:778,oacute:611,amacron:556,sacute:556,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:611,twosuperior:333,Odieresis:778,mu:611,igrave:278,ohungarumlaut:611,Eogonek:667,dcroat:611,threequarters:834,Scedilla:667,lcaron:400,Kcommaaccent:722,Lacute:611,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:611,onehalf:834,lessequal:549,ocircumflex:611,ntilde:611,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:611,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:611,Ccaron:722,ugrave:611,radical:549,Dcaron:722,rcommaaccent:389,Ntilde:722,otilde:611,Rcommaaccent:722,Lcommaaccent:611,Atilde:722,Aogonek:722,Aring:722,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:556,minus:584,Icircumflex:278,ncaron:611,tcommaaccent:333,logicalnot:584,odieresis:611,udieresis:611,notequal:549,gcommaaccent:611,eth:611,zcaron:500,ncommaaccent:611,onesuperior:333,imacron:278,Euro:556},"Helvetica-BoldOblique":{space:278,exclam:333,quotedbl:474,numbersign:556,dollar:556,percent:889,ampersand:722,quoteright:278,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:333,semicolon:333,less:584,equal:584,greater:584,question:611,at:975,A:722,B:722,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:556,K:722,L:611,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:584,underscore:556,quoteleft:278,a:556,b:611,c:556,d:611,e:556,f:333,g:611,h:611,i:278,j:278,k:556,l:278,m:889,n:611,o:611,p:611,q:611,r:389,s:556,t:333,u:611,v:556,w:778,x:556,y:556,z:500,braceleft:389,bar:280,braceright:389,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:238,quotedblleft:500,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:611,fl:611,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:556,bullet:350,quotesinglbase:278,quotedblbase:500,quotedblright:500,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:611,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:278,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:611,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:722,aacute:556,Ucircumflex:722,yacute:556,scommaaccent:556,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:611,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:556,aring:556,Ncommaaccent:722,lacute:278,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:556,scedilla:556,iacute:278,lozenge:494,Rcaron:722,Gcommaaccent:778,ucircumflex:611,acircumflex:556,Amacron:722,rcaron:389,ccedilla:556,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:743,Umacron:722,uring:611,threesuperior:333,Ograve:778,Agrave:722,Abreve:722,multiply:584,uacute:611,Tcaron:611,partialdiff:494,ydieresis:556,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:556,nacute:611,umacron:611,Ncaron:722,Iacute:278,plusminus:584,brokenbar:280,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:389,omacron:611,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:278,tcaron:389,eogonek:556,Uogonek:722,Aacute:722,Adieresis:722,egrave:556,zacute:500,iogonek:278,Oacute:778,oacute:611,amacron:556,sacute:556,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:611,twosuperior:333,Odieresis:778,mu:611,igrave:278,ohungarumlaut:611,Eogonek:667,dcroat:611,threequarters:834,Scedilla:667,lcaron:400,Kcommaaccent:722,Lacute:611,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:611,onehalf:834,lessequal:549,ocircumflex:611,ntilde:611,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:611,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:611,Ccaron:722,ugrave:611,radical:549,Dcaron:722,rcommaaccent:389,Ntilde:722,otilde:611,Rcommaaccent:722,Lcommaaccent:611,Atilde:722,Aogonek:722,Aring:722,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:556,minus:584,Icircumflex:278,ncaron:611,tcommaaccent:333,logicalnot:584,odieresis:611,udieresis:611,notequal:549,gcommaaccent:611,eth:611,zcaron:500,ncommaaccent:611,onesuperior:333,imacron:278,Euro:556},"Helvetica-Oblique":{space:278,exclam:278,quotedbl:355,numbersign:556,dollar:556,percent:889,ampersand:667,quoteright:222,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:278,semicolon:278,less:584,equal:584,greater:584,question:556,at:1015,A:667,B:667,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:500,K:667,L:556,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:278,backslash:278,bracketright:278,asciicircum:469,underscore:556,quoteleft:222,a:556,b:556,c:500,d:556,e:556,f:278,g:556,h:556,i:222,j:222,k:500,l:222,m:833,n:556,o:556,p:556,q:556,r:333,s:500,t:278,u:556,v:500,w:722,x:500,y:500,z:500,braceleft:334,bar:260,braceright:334,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:191,quotedblleft:333,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:500,fl:500,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:537,bullet:350,quotesinglbase:222,quotedblbase:333,quotedblright:333,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:556,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:222,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:556,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:667,aacute:556,Ucircumflex:722,yacute:500,scommaaccent:500,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:500,aring:556,Ncommaaccent:722,lacute:222,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:500,scedilla:500,iacute:278,lozenge:471,Rcaron:722,Gcommaaccent:778,ucircumflex:556,acircumflex:556,Amacron:667,rcaron:333,ccedilla:500,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:643,Umacron:722,uring:556,threesuperior:333,Ograve:778,Agrave:667,Abreve:667,multiply:584,uacute:556,Tcaron:611,partialdiff:476,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:500,nacute:556,umacron:556,Ncaron:722,Iacute:278,plusminus:584,brokenbar:260,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:333,omacron:556,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:222,tcaron:317,eogonek:556,Uogonek:722,Aacute:667,Adieresis:667,egrave:556,zacute:500,iogonek:222,Oacute:778,oacute:556,amacron:556,sacute:500,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:556,twosuperior:333,Odieresis:778,mu:556,igrave:278,ohungarumlaut:556,Eogonek:667,dcroat:556,threequarters:834,Scedilla:667,lcaron:299,Kcommaaccent:667,Lacute:556,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:556, +onehalf:834,lessequal:549,ocircumflex:556,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:556,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:556,Ccaron:722,ugrave:556,radical:453,Dcaron:722,rcommaaccent:333,Ntilde:722,otilde:556,Rcommaaccent:722,Lcommaaccent:556,Atilde:667,Aogonek:667,Aring:667,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:500,minus:584,Icircumflex:278,ncaron:556,tcommaaccent:278,logicalnot:584,odieresis:556,udieresis:556,notequal:549,gcommaaccent:556,eth:556,zcaron:500,ncommaaccent:556,onesuperior:333,imacron:278,Euro:556},Symbol:{space:250,exclam:333,universal:713,numbersign:500,existential:549,percent:833,ampersand:778,suchthat:439,parenleft:333,parenright:333,asteriskmath:500,plus:549,comma:250,minus:549,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:278,semicolon:278,less:549,equal:549,greater:549,question:444,congruent:549,Alpha:722,Beta:667,Chi:722,Delta:612,Epsilon:611,Phi:763,Gamma:603,Eta:722,Iota:333,theta1:631,Kappa:722,Lambda:686,Mu:889,Nu:722,Omicron:722,Pi:768,Theta:741,Rho:556,Sigma:592,Tau:611,Upsilon:690,sigma1:439,Omega:768,Xi:645,Psi:795,Zeta:611,bracketleft:333,therefore:863,bracketright:333,perpendicular:658,underscore:500,radicalex:500,alpha:631,beta:549,chi:549,delta:494,epsilon:439,phi:521,gamma:411,eta:603,iota:329,phi1:603,kappa:549,lambda:549,mu:576,nu:521,omicron:549,pi:549,theta:521,rho:549,sigma:603,tau:439,upsilon:576,omega1:713,omega:686,xi:493,psi:686,zeta:494,braceleft:480,bar:200,braceright:480,similar:549,Euro:750,Upsilon1:620,minute:247,lessequal:549,fraction:167,infinity:713,florin:500,club:753,diamond:753,heart:753,spade:753,arrowboth:1042,arrowleft:987,arrowup:603,arrowright:987,arrowdown:603,degree:400,plusminus:549,second:411,greaterequal:549,multiply:549,proportional:713,partialdiff:494,bullet:460,divide:549,notequal:549,equivalence:549,approxequal:549,ellipsis:1e3,arrowvertex:603,arrowhorizex:1e3,carriagereturn:658,aleph:823,Ifraktur:686,Rfraktur:795,weierstrass:987,circlemultiply:768,circleplus:768,emptyset:823,intersection:768,union:768,propersuperset:713,reflexsuperset:713,notsubset:713,propersubset:713,reflexsubset:713,element:713,notelement:713,angle:768,gradient:713,registerserif:790,copyrightserif:790,trademarkserif:890,product:823,radical:549,dotmath:250,logicalnot:713,logicaland:603,logicalor:603,arrowdblboth:1042,arrowdblleft:987,arrowdblup:603,arrowdblright:987,arrowdbldown:603,lozenge:494,angleleft:329,registersans:790,copyrightsans:790,trademarksans:786,summation:713,parenlefttp:384,parenleftex:384,parenleftbt:384,bracketlefttp:384,bracketleftex:384,bracketleftbt:384,bracelefttp:494,braceleftmid:494,braceleftbt:494,braceex:494,angleright:329,integral:274,integraltp:686,integralex:686,integralbt:686,parenrighttp:384,parenrightex:384,parenrightbt:384,bracketrighttp:384,bracketrightex:384,bracketrightbt:384,bracerighttp:494,bracerightmid:494,bracerightbt:494,apple:790},"Times-Roman":{space:250,exclam:333,quotedbl:408,numbersign:500,dollar:500,percent:833,ampersand:778,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:564,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:278,semicolon:278,less:564,equal:564,greater:564,question:444,at:921,A:722,B:667,C:667,D:722,E:611,F:556,G:722,H:722,I:333,J:389,K:722,L:611,M:889,N:722,O:722,P:556,Q:722,R:667,S:556,T:611,U:722,V:722,W:944,X:722,Y:722,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:469,underscore:500,quoteleft:333,a:444,b:500,c:444,d:500,e:444,f:333,g:500,h:500,i:278,j:278,k:500,l:278,m:778,n:500,o:500,p:500,q:500,r:333,s:389,t:278,u:500,v:500,w:722,x:500,y:500,z:444,braceleft:480,bar:200,braceright:480,asciitilde:541,exclamdown:333,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:180,quotedblleft:444,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:556,fl:556,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:453,bullet:350,quotesinglbase:333,quotedblbase:444,quotedblright:444,guillemotright:500,ellipsis:1e3,perthousand:1e3,questiondown:444,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:889,ordfeminine:276,Lslash:611,Oslash:722,OE:889,ordmasculine:310,ae:667,dotlessi:278,lslash:278,oslash:500,oe:722,germandbls:500,Idieresis:333,eacute:444,abreve:444,uhungarumlaut:500,ecaron:444,Ydieresis:722,divide:564,Yacute:722,Acircumflex:722,aacute:444,Ucircumflex:722,yacute:500,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:444,Uacute:722,uogonek:500,Edieresis:611,Dcroat:722,commaaccent:250,copyright:760,Emacron:611,ccaron:444,aring:444,Ncommaaccent:722,lacute:278,agrave:444,Tcommaaccent:611,Cacute:667,atilde:444,Edotaccent:611,scaron:389,scedilla:389,iacute:278,lozenge:471,Rcaron:667,Gcommaaccent:722,ucircumflex:500,acircumflex:444,Amacron:722,rcaron:333,ccedilla:444,Zdotaccent:611,Thorn:556,Omacron:722,Racute:667,Sacute:556,dcaron:588,Umacron:722,uring:500,threesuperior:300,Ograve:722,Agrave:722,Abreve:722,multiply:564,uacute:500,Tcaron:611,partialdiff:476,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:611,adieresis:444,edieresis:444,cacute:444,nacute:500,umacron:500,Ncaron:722,Iacute:333,plusminus:564,brokenbar:200,registered:760,Gbreve:722,Idotaccent:333,summation:600,Egrave:611,racute:333,omacron:500,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:667,lcommaaccent:278,tcaron:326,eogonek:444,Uogonek:722,Aacute:722,Adieresis:722,egrave:444,zacute:444,iogonek:278,Oacute:722,oacute:500,amacron:444,sacute:389,idieresis:278,Ocircumflex:722,Ugrave:722,Delta:612,thorn:500,twosuperior:300,Odieresis:722,mu:500,igrave:278,ohungarumlaut:500,Eogonek:611,dcroat:500,threequarters:750,Scedilla:556,lcaron:344,Kcommaaccent:722,Lacute:611,trademark:980,edotaccent:444,Igrave:333,Imacron:333,Lcaron:611,onehalf:750,lessequal:549,ocircumflex:500,ntilde:500,Uhungarumlaut:722,Eacute:611,emacron:444,gbreve:500,onequarter:750,Scaron:556,Scommaaccent:556,Ohungarumlaut:722,degree:400,ograve:500,Ccaron:667,ugrave:500,radical:453,Dcaron:722,rcommaaccent:333,Ntilde:722,otilde:500,Rcommaaccent:667,Lcommaaccent:611,Atilde:722,Aogonek:722,Aring:722,Otilde:722,zdotaccent:444,Ecaron:611,Iogonek:333,kcommaaccent:500,minus:564,Icircumflex:333,ncaron:500,tcommaaccent:278,logicalnot:564,odieresis:500,udieresis:500,notequal:549,gcommaaccent:500,eth:500,zcaron:444,ncommaaccent:500,onesuperior:300,imacron:278,Euro:500},"Times-Bold":{space:250,exclam:333,quotedbl:555,numbersign:500,dollar:500,percent:1e3,ampersand:833,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:570,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:333,semicolon:333,less:570,equal:570,greater:570,question:500,at:930,A:722,B:667,C:722,D:722,E:667,F:611,G:778,H:778,I:389,J:500,K:778,L:667,M:944,N:722,O:778,P:611,Q:778,R:722,S:556,T:667,U:722,V:722,W:1e3,X:722,Y:722,Z:667,bracketleft:333,backslash:278,bracketright:333,asciicircum:581,underscore:500,quoteleft:333,a:500,b:556,c:444,d:556,e:444,f:333,g:500,h:556,i:278,j:333,k:556,l:278,m:833,n:556,o:500,p:556,q:556,r:444,s:389,t:333,u:556,v:500,w:722,x:500,y:500,z:444,braceleft:394,bar:220,braceright:394,asciitilde:520,exclamdown:333,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:278,quotedblleft:500,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:556,fl:556,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:540,bullet:350,quotesinglbase:333,quotedblbase:500,quotedblright:500,guillemotright:500,ellipsis:1e3,perthousand:1e3,questiondown:500,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:300,Lslash:667,Oslash:778,OE:1e3,ordmasculine:330,ae:722,dotlessi:278,lslash:278,oslash:500,oe:722,germandbls:556,Idieresis:389,eacute:444,abreve:500,uhungarumlaut:556,ecaron:444,Ydieresis:722,divide:570,Yacute:722,Acircumflex:722,aacute:500,Ucircumflex:722,yacute:500,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:500,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:747,Emacron:667,ccaron:444,aring:500,Ncommaaccent:722,lacute:278,agrave:500,Tcommaaccent:667,Cacute:722,atilde:500,Edotaccent:667,scaron:389,scedilla:389,iacute:278,lozenge:494,Rcaron:722,Gcommaaccent:778,ucircumflex:556,acircumflex:500,Amacron:722,rcaron:444,ccedilla:444,Zdotaccent:667,Thorn:611,Omacron:778,Racute:722,Sacute:556,dcaron:672,Umacron:722,uring:556,threesuperior:300,Ograve:778,Agrave:722,Abreve:722,multiply:570,uacute:556,Tcaron:667,partialdiff:494,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:500,edieresis:444,cacute:444,nacute:556,umacron:556,Ncaron:722,Iacute:389,plusminus:570,brokenbar:220,registered:747,Gbreve:778,Idotaccent:389,summation:600,Egrave:667,racute:444,omacron:500,Zacute:667,Zcaron:667,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:278,tcaron:416,eogonek:444,Uogonek:722,Aacute:722,Adieresis:722,egrave:444,zacute:444,iogonek:278,Oacute:778,oacute:500,amacron:500,sacute:389,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:556,twosuperior:300,Odieresis:778,mu:556,igrave:278,ohungarumlaut:500,Eogonek:667,dcroat:556,threequarters:750,Scedilla:556,lcaron:394,Kcommaaccent:778,Lacute:667,trademark:1e3,edotaccent:444,Igrave:389,Imacron:389,Lcaron:667,onehalf:750,lessequal:549,ocircumflex:500,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:444,gbreve:500,onequarter:750,Scaron:556,Scommaaccent:556,Ohungarumlaut:778,degree:400,ograve:500,Ccaron:722,ugrave:556,radical:549,Dcaron:722,rcommaaccent:444,Ntilde:722,otilde:500,Rcommaaccent:722,Lcommaaccent:667,Atilde:722,Aogonek:722,Aring:722,Otilde:778,zdotaccent:444,Ecaron:667,Iogonek:389,kcommaaccent:556,minus:570,Icircumflex:389,ncaron:556,tcommaaccent:333,logicalnot:570,odieresis:500,udieresis:556,notequal:549,gcommaaccent:500,eth:500,zcaron:444,ncommaaccent:556,onesuperior:300,imacron:278,Euro:500},"Times-BoldItalic":{space:250,exclam:389,quotedbl:555,numbersign:500,dollar:500,percent:833,ampersand:778,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:570,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:333,semicolon:333,less:570,equal:570,greater:570,question:500,at:832,A:667,B:667,C:667,D:722,E:667,F:667,G:722,H:778,I:389,J:500,K:667,L:611,M:889,N:722,O:722,P:611,Q:722,R:667,S:556,T:611,U:722,V:667,W:889,X:667,Y:611,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:570,underscore:500,quoteleft:333,a:500,b:500,c:444,d:500,e:444,f:333,g:500,h:556,i:278,j:278,k:500,l:278,m:778,n:556,o:500,p:500,q:500,r:389,s:389,t:278,u:556,v:444,w:667,x:500,y:444,z:389,braceleft:348,bar:220,braceright:348,asciitilde:570,exclamdown:389,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:278,quotedblleft:500,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:556,fl:556,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:500,bullet:350,quotesinglbase:333,quotedblbase:500,quotedblright:500,guillemotright:500,ellipsis:1e3,perthousand:1e3,questiondown:500,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:944,ordfeminine:266,Lslash:611,Oslash:722,OE:944,ordmasculine:300,ae:722,dotlessi:278,lslash:278,oslash:500,oe:722,germandbls:500,Idieresis:389,eacute:444,abreve:500,uhungarumlaut:556,ecaron:444,Ydieresis:611,divide:570,Yacute:611,Acircumflex:667,aacute:500,Ucircumflex:722,yacute:444,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:500,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:747,Emacron:667,ccaron:444,aring:500,Ncommaaccent:722,lacute:278,agrave:500,Tcommaaccent:611,Cacute:667,atilde:500,Edotaccent:667,scaron:389,scedilla:389,iacute:278,lozenge:494,Rcaron:667,Gcommaaccent:722,ucircumflex:556,acircumflex:500,Amacron:667,rcaron:389,ccedilla:444,Zdotaccent:611,Thorn:611,Omacron:722,Racute:667,Sacute:556,dcaron:608,Umacron:722,uring:556,threesuperior:300,Ograve:722,Agrave:667,Abreve:667,multiply:570,uacute:556,Tcaron:611,partialdiff:494,ydieresis:444,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:500,edieresis:444,cacute:444,nacute:556,umacron:556,Ncaron:722,Iacute:389,plusminus:570,brokenbar:220,registered:747,Gbreve:722,Idotaccent:389,summation:600,Egrave:667,racute:389,omacron:500,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:667,lcommaaccent:278,tcaron:366,eogonek:444,Uogonek:722,Aacute:667,Adieresis:667,egrave:444,zacute:389,iogonek:278,Oacute:722,oacute:500,amacron:500,sacute:389,idieresis:278,Ocircumflex:722,Ugrave:722,Delta:612,thorn:500,twosuperior:300,Odieresis:722,mu:576,igrave:278,ohungarumlaut:500,Eogonek:667,dcroat:500,threequarters:750,Scedilla:556,lcaron:382,Kcommaaccent:667,Lacute:611,trademark:1e3,edotaccent:444,Igrave:389,Imacron:389,Lcaron:611,onehalf:750,lessequal:549,ocircumflex:500,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:444,gbreve:500,onequarter:750,Scaron:556,Scommaaccent:556,Ohungarumlaut:722,degree:400,ograve:500,Ccaron:667,ugrave:556,radical:549,Dcaron:722,rcommaaccent:389,Ntilde:722,otilde:500,Rcommaaccent:667,Lcommaaccent:611,Atilde:667,Aogonek:667,Aring:667,Otilde:722,zdotaccent:389,Ecaron:667,Iogonek:389,kcommaaccent:500,minus:606,Icircumflex:389,ncaron:556,tcommaaccent:278,logicalnot:606,odieresis:500,udieresis:556,notequal:549,gcommaaccent:500,eth:500,zcaron:389,ncommaaccent:556,onesuperior:300,imacron:278,Euro:500},"Times-Italic":{space:250,exclam:333,quotedbl:420,numbersign:500,dollar:500,percent:833,ampersand:778,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:675,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:333,semicolon:333,less:675,equal:675,greater:675,question:500,at:920,A:611,B:611,C:667,D:722,E:611,F:611,G:722,H:722,I:333,J:444,K:667,L:556,M:833,N:667,O:722,P:611,Q:722,R:611,S:500,T:556,U:722,V:611,W:833,X:611,Y:556,Z:556,bracketleft:389,backslash:278,bracketright:389,asciicircum:422,underscore:500,quoteleft:333,a:500,b:500,c:444,d:500,e:444,f:278,g:500,h:500,i:278,j:278,k:444,l:278,m:722,n:500,o:500,p:500,q:500,r:389,s:389,t:278,u:500,v:444,w:667,x:444,y:444,z:389,braceleft:400,bar:275,braceright:400,asciitilde:541,exclamdown:389,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:214,quotedblleft:556,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:500,fl:500,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:523,bullet:350,quotesinglbase:333,quotedblbase:556,quotedblright:556,guillemotright:500,ellipsis:889,perthousand:1e3,questiondown:500,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:889,AE:889,ordfeminine:276,Lslash:556,Oslash:722,OE:944,ordmasculine:310,ae:667,dotlessi:278,lslash:278,oslash:500,oe:667,germandbls:500,Idieresis:333,eacute:444,abreve:500,uhungarumlaut:500,ecaron:444,Ydieresis:556,divide:675,Yacute:556,Acircumflex:611,aacute:500,Ucircumflex:722,yacute:444,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:500,Uacute:722,uogonek:500,Edieresis:611,Dcroat:722,commaaccent:250,copyright:760,Emacron:611,ccaron:444,aring:500,Ncommaaccent:667,lacute:278,agrave:500,Tcommaaccent:556,Cacute:667,atilde:500,Edotaccent:611,scaron:389,scedilla:389,iacute:278,lozenge:471,Rcaron:611,Gcommaaccent:722,ucircumflex:500,acircumflex:500,Amacron:611,rcaron:389,ccedilla:444,Zdotaccent:556,Thorn:611,Omacron:722,Racute:611,Sacute:500,dcaron:544,Umacron:722,uring:500,threesuperior:300,Ograve:722,Agrave:611,Abreve:611,multiply:675,uacute:500,Tcaron:556,partialdiff:476,ydieresis:444,Nacute:667,icircumflex:278,Ecircumflex:611,adieresis:500,edieresis:444,cacute:444,nacute:500,umacron:500,Ncaron:667,Iacute:333,plusminus:675,brokenbar:275,registered:760,Gbreve:722,Idotaccent:333,summation:600,Egrave:611,racute:389,omacron:500,Zacute:556,Zcaron:556,greaterequal:549,Eth:722,Ccedilla:667,lcommaaccent:278,tcaron:300,eogonek:444,Uogonek:722,Aacute:611,Adieresis:611,egrave:444,zacute:389,iogonek:278,Oacute:722,oacute:500,amacron:500,sacute:389,idieresis:278,Ocircumflex:722,Ugrave:722,Delta:612,thorn:500,twosuperior:300,Odieresis:722,mu:500,igrave:278,ohungarumlaut:500,Eogonek:611,dcroat:500,threequarters:750,Scedilla:500,lcaron:300,Kcommaaccent:667,Lacute:556,trademark:980,edotaccent:444,Igrave:333,Imacron:333,Lcaron:611,onehalf:750,lessequal:549,ocircumflex:500,ntilde:500,Uhungarumlaut:722,Eacute:611,emacron:444,gbreve:500,onequarter:750,Scaron:500,Scommaaccent:500,Ohungarumlaut:722,degree:400,ograve:500,Ccaron:667,ugrave:500,radical:453,Dcaron:722,rcommaaccent:389,Ntilde:667,otilde:500,Rcommaaccent:611,Lcommaaccent:556,Atilde:611,Aogonek:611,Aring:611,Otilde:722,zdotaccent:389,Ecaron:611,Iogonek:333,kcommaaccent:444,minus:675,Icircumflex:333,ncaron:500,tcommaaccent:278,logicalnot:675,odieresis:500,udieresis:500,notequal:549,gcommaaccent:500,eth:500,zcaron:389,ncommaaccent:500,onesuperior:300,imacron:278,Euro:500},ZapfDingbats:{space:278,a1:974,a2:961,a202:974,a3:980,a4:719,a5:789,a119:790,a118:791,a117:690,a11:960,a12:939,a13:549,a14:855,a15:911,a16:933,a105:911,a17:945,a18:974,a19:755,a20:846,a21:762,a22:761,a23:571,a24:677,a25:763,a26:760,a27:759,a28:754,a6:494,a7:552,a8:537,a9:577,a10:692,a29:786,a30:788,a31:788,a32:790,a33:793,a34:794,a35:816,a36:823,a37:789,a38:841,a39:823,a40:833,a41:816,a42:831,a43:923,a44:744,a45:723,a46:749,a47:790,a48:792,a49:695,a50:776,a51:768,a52:792,a53:759,a54:707,a55:708,a56:682,a57:701,a58:826,a59:815,a60:789,a61:789,a62:707,a63:687,a64:696,a65:689,a66:786,a67:787,a68:713,a69:791,a70:785,a71:791,a72:873,a73:761,a74:762,a203:762,a75:759,a204:759,a76:892,a77:892,a78:788,a79:784,a81:438,a82:138,a83:277,a84:415,a97:392,a98:392,a99:668,a100:668,a89:390,a90:390,a93:317,a94:317,a91:276,a92:276,a205:509,a85:509,a206:410,a86:410,a87:234,a88:234,a95:334,a96:334,a101:732,a102:544,a103:544,a104:910,a106:667,a107:760,a108:760,a112:776,a111:595,a110:694,a109:626,a120:788,a121:788,a122:788,a123:788,a124:788,a125:788,a126:788,a127:788,a128:788,a129:788,a130:788,a131:788,a132:788,a133:788,a134:788,a135:788,a136:788,a137:788,a138:788,a139:788,a140:788,a141:788,a142:788,a143:788,a144:788,a145:788,a146:788,a147:788,a148:788,a149:788,a150:788,a151:788,a152:788,a153:788,a154:788,a155:788,a156:788,a157:788,a158:788,a159:788,a160:894,a161:838,a163:1016,a164:458,a196:748,a165:924,a192:748,a166:918,a167:927,a168:928,a169:928,a170:834,a171:873,a172:828,a173:924,a162:924,a174:917,a175:930,a176:931,a177:463,a178:883,a179:836,a193:836,a180:867,a199:867,a181:696,a200:696,a182:874,a201:874,a183:760,a184:946,a197:771,a185:865,a194:771,a198:888,a186:967,a195:888,a187:831,a188:873,a189:927,a190:970,a191:918}},Dc={},Ec=1e3,Fc=function(){function d(a,b,c){this.lexer=a,this.allowStreams=b,this.xref=c,this.imageCache={},this.refill()}return d.prototype={refill:function(){this.buf1=this.lexer.getObj(),this.buf2=this.lexer.getObj()},shift:function(){A(this.buf2,"ID")?(this.buf1=this.buf2,this.buf2=null):(this.buf1=this.buf2,this.buf2=this.lexer.getObj())},tryShift:function(){try{return this.shift(),!0}catch(a){if(a instanceof ja)throw a;return!1}},getObj:function(b){var d=this.buf1;if(this.shift(),d instanceof za)switch(d.cmd){case"BI":return this.makeInlineImage(b);case"[":for(var e=[];!A(this.buf1,"]")&&!R(this.buf1);)e.push(this.getObj(b));return R(this.buf1)&&c("End of file inside array"),this.shift(),e;case"<<":for(var f=new Aa(this.xref);!A(this.buf1,">>")&&!R(this.buf1);)if(z(this.buf1)){var g=this.buf1.name;if(this.shift(),R(this.buf1))break;f.set(g,this.getObj(b))}else a("Malformed dictionary: key must be a name object"),this.shift();return R(this.buf1)&&c("End of file inside dictionary"),A(this.buf2,"stream")?this.allowStreams?this.makeStream(f,b):f:(this.shift(),f);default:return d}if(w(d)){var h=d;if(w(this.buf1)&&A(this.buf2,"R")){var i=new Ba(h,this.buf1);return this.shift(),this.shift(),i}return h}if(y(d)){var j=d;return b&&(j=b.decryptString(j)),j}return d},findDefaultInlineStreamEnd:function(a){for(var b,c,d,f,g=69,h=73,i=32,j=10,k=13,l=a.pos,m=0;-1!==(b=a.getByte());)if(0===m)m=b===g?1:0;else if(1===m)m=b===h?2:0;else if(e(2===m),b===i||b===j||b===k){for(d=5,f=a.peekBytes(d),c=0;d>c;c++)if(b=f[c],b!==j&&b!==k&&(i>b||b>127)){m=0;break}if(2===m)break}else m=0;return a.pos-4-l},findDCTDecodeInlineStreamEnd:function(a){for(var c,d,e,f=a.pos,g=!1;-1!==(c=a.getByte());)if(255===c){switch(a.getByte()){case 0:break;case 255:a.skip(-1);break;case 217:g=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:d=a.getUint16(),d>2?a.skip(d-2):a.skip(-2)}if(g)break}return e=a.pos-f,-1===c?(b("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),a.skip(-e),this.findDefaultInlineStreamEnd(a)):(this.inlineStreamSkipEI(a),e)},findASCII85DecodeInlineStreamEnd:function(a){for(var c,d,e=126,f=62,g=a.pos;-1!==(c=a.getByte());)if(c===e&&a.peekByte()===f){a.skip();break}return d=a.pos-g,-1===c?(b("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),a.skip(-d),this.findDefaultInlineStreamEnd(a)):(this.inlineStreamSkipEI(a),d)},findASCIIHexDecodeInlineStreamEnd:function(a){for(var c,d,e=62,f=a.pos;-1!==(c=a.getByte())&&c!==e;);return d=a.pos-f,-1===c?(b("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),a.skip(-d),this.findDefaultInlineStreamEnd(a)):(this.inlineStreamSkipEI(a),d)},inlineStreamSkipEI:function(a){for(var b,c=69,d=73,e=0;-1!==(b=a.getByte());)if(0===e)e=b===c?1:0;else if(1===e)e=b===d?2:0;else if(2===e)break},makeInlineImage:function(a){for(var b=this.lexer,d=b.stream,e=new Aa(this.xref);!A(this.buf1,"ID")&&!R(this.buf1);){z(this.buf1)||c("Dictionary key must be a name object");var f=this.buf1.name;if(this.shift(),R(this.buf1))break;e.set(f,this.getObj(a))}var g,h=e.get("Filter","F");z(h)?g=h.name:C(h)&&z(h[0])&&(g=h[0].name);var i,j,k,l=d.pos;i="DCTDecode"===g||"DCT"===g?this.findDCTDecodeInlineStreamEnd(d):"ASCII85Decide"===g||"A85"===g?this.findASCII85DecodeInlineStreamEnd(d):"ASCIIHexDecode"===g||"AHx"===g?this.findASCIIHexDecodeInlineStreamEnd(d):this.findDefaultInlineStreamEnd(d);var m,n=d.makeSubStream(l,i,e);if(Ec>i){var o=n.getBytes();n.reset();var p=1,q=0;for(j=0,k=o.length;k>j;++j)p+=255&o[j],q+=p;if(m=q%65521<<16|p%65521,this.imageCache.adler32===m)return this.buf2=za.get("EI"),this.shift(),this.imageCache[m].reset(),this.imageCache[m]}return a&&(n=a.createStream(n,i)),n=this.filter(n,e,i),n.dict=e,void 0!==m&&(n.cacheKey="inline_"+i+"_"+m,this.imageCache[m]=n),this.buf2=za.get("EI"),this.shift(),n},makeStream:function(b,d){var e=this.lexer,f=e.stream;e.skipToNextLine();var g=f.pos-1,h=b.get("Length");if(w(h)||(a("Bad "+h+" attribute in stream"),h=0),f.pos=g+h,e.nextChar(),this.tryShift()&&A(this.buf2,"endstream"))this.shift();else{f.pos=g;for(var i,j,k=2048,l=9,m=[101,110,100,115,116,114,101,97,109],n=0,o=!1;f.pos=q)break;for(o=!1,i=0,j=0;q>i;i++){var r=p[i];if(r!==m[j])i-=j,j=0;else if(j++,j>=l){i++,o=!0;break}}if(o){n+=i-l,f.pos+=i-l;break}n+=q,f.pos+=q}o||c("Missing endstream"),h=n,e.nextChar(),this.shift(),this.shift()}return this.shift(),f=f.makeSubStream(g,h,b),d&&(f=d.createStream(f,h)),f=this.filter(f,b,h),f.dict=b,f},filter:function(a,b,d){var e=b.get("Filter","F"),f=b.get("DecodeParms","DP");if(z(e))return this.makeFilter(a,e.name,d,f);var g=d;if(C(e))for(var h=e,i=f,j=0,k=h.length;k>j;++j)e=h[j],z(e)||c("Bad filter name: "+e),f=null,C(i)&&j in i&&(f=i[j]),a=this.makeFilter(a,e.name,g,f),g=null;return a},makeFilter:function(a,c,d,e){if(0===a.dict.get("Length")&&!d)return b('Empty "'+c+'" stream.'),new _c(a);try{e&&this.xref&&(e=this.xref.fetchIfRef(e));var f=this.xref.stats.streamTypes;if("FlateDecode"===c||"Fl"===c)return f[Y.FLATE]=!0,e?new Rc(new Qc(a,d),d,e):new Qc(a,d);if("LZWDecode"===c||"LZW"===c){f[Y.LZW]=!0;var g=1;return e?(e.has("EarlyChange")&&(g=e.get("EarlyChange")),new Rc(new $c(a,d,g),d,e)):new $c(a,d,g)}return"DCTDecode"===c||"DCT"===c?(f[Y.DCT]=!0,new Sc(a,d,a.dict,this.xref)):"JPXDecode"===c||"JPX"===c?(f[Y.JPX]=!0,new Tc(a,d,a.dict)):"ASCII85Decode"===c||"A85"===c?(f[Y.A85]=!0,new Wc(a,d)):"ASCIIHexDecode"===c||"AHx"===c?(f[Y.AHX]=!0,new Xc(a,d)):"CCITTFaxDecode"===c||"CCF"===c?(f[Y.CCF]=!0,new Zc(a,d,e)):"RunLengthDecode"===c||"RL"===c?(f[Y.RL]=!0,new Yc(a,d)):"JBIG2Decode"===c?(f[Y.JBIG]=!0,new Uc(a,d,a.dict)):(b('filter "'+c+'" not supported yet'),a)}catch(h){if(h instanceof ja)throw h;return b('Invalid stream: "'+h+'"'),new _c(a)}}},d}(),Gc=function(){function a(a,b){this.stream=a,this.nextChar(),this.strBuf=[],this.knownCommands=b}function d(a){return a>=48&&57>=a?15&a:a>=65&&70>=a||a>=97&&102>=a?(15&a)+9:-1}a.isSpace=function(a){return 32===a||9===a||13===a||10===a};var e=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];return a.prototype={nextChar:function(){return this.currentChar=this.stream.getByte()},peekChar:function(){return this.stream.peekByte()},getNumber:function(){var a=this.currentChar,d=!1,e=0,f=1;if(45===a?(f=-1,a=this.nextChar(),45===a&&(a=this.nextChar())):43===a&&(a=this.nextChar()),46===a&&(e=10,a=this.nextChar()),48>a||a>57)return c("Invalid number: "+String.fromCharCode(a)),0;for(var g=a-48,h=0,i=1;(a=this.nextChar())>=0;)if(a>=48&&57>=a){var j=a-48;d?h=10*h+j:(0!==e&&(e*=10),g=10*g+j)}else if(46===a){if(0!==e)break;e=1}else if(45===a)b("Badly formated number");else{if(69!==a&&101!==a)break;if(a=this.peekChar(),43===a||45===a)i=45===a?-1:1,this.nextChar();else if(48>a||a>57)break;d=!0}return 0!==e&&(g/=e),d&&(g*=Math.pow(10,i*h)),f*g},getString:function(){var a=1,c=!1,d=this.strBuf;d.length=0;for(var e=this.nextChar();;){var f=!1;switch(0|e){case-1:b("Unterminated string"),c=!0;break;case 40:++a,d.push("(");break;case 41:0===--a?(this.nextChar(),c=!0):d.push(")");break;case 92:switch(e=this.nextChar()){case-1:b("Unterminated string"),c=!0;break;case 110:d.push("\n");break;case 114:d.push("\r");break;case 116:d.push(" ");break;case 98:d.push("\b");break;case 102:d.push("\f");break;case 92:case 40:case 41:d.push(String.fromCharCode(e));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:var g=15&e;e=this.nextChar(),f=!0,e>=48&&55>=e&&(g=(g<<3)+(15&e),e=this.nextChar(),e>=48&&55>=e&&(f=!1,g=(g<<3)+(15&e))),d.push(String.fromCharCode(g));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:d.push(String.fromCharCode(e))}break;default:d.push(String.fromCharCode(e))}if(c)break;f||(e=this.nextChar())}return d.join("")},getName:function(){var a,f=this.strBuf;for(f.length=0;(a=this.nextChar())>=0&&!e[a];)if(35===a){a=this.nextChar();var g=d(a);if(-1!==g){var h=d(this.nextChar());-1===h&&c("Illegal digit in hex char in name: "+h),f.push(String.fromCharCode(g<<4|h))}else f.push("#",String.fromCharCode(a))}else f.push(String.fromCharCode(a));return f.length>127&&b("name token is longer than allowed by the spec: "+f.length),ya.get(f.join(""))},getHexString:function(){var a=this.strBuf;a.length=0;for(var c,f,g=this.currentChar,h=!0;;){if(0>g){b("Unterminated hex string");break}if(62===g){this.nextChar();break}if(1!==e[g]){if(h){if(c=d(g),-1===c){b('Ignoring invalid character "'+g+'" in hex string'),g=this.nextChar();continue}}else{if(f=d(g),-1===f){b('Ignoring invalid character "'+g+'" in hex string'),g=this.nextChar();continue}a.push(String.fromCharCode(c<<4|f))}h=!h,g=this.nextChar()}else g=this.nextChar()}return a.join("")},getObj:function(){for(var a=!1,b=this.currentChar;;){if(0>b)return Dc;if(a)10!==b&&13!==b||(a=!1);else if(37===b)a=!0;else if(1!==e[b])break;b=this.nextChar()}switch(0|b){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),za.get("[");case 93:return this.nextChar(),za.get("]");case 60:return b=this.nextChar(),60===b?(this.nextChar(),za.get("<<")):this.getHexString();case 62:return b=this.nextChar(),62===b?(this.nextChar(),za.get(">>")):za.get(">");case 123:return this.nextChar(),za.get("{");case 125:return this.nextChar(),za.get("}");case 41:c("Illegal character: "+b)}for(var d=String.fromCharCode(b),f=this.knownCommands,g=f&&void 0!==f[d];(b=this.nextChar())>=0&&!e[b];){var h=d+String.fromCharCode(b);if(g&&void 0===f[h])break;128===d.length&&c("Command token too long: "+d.length),d=h,g=f&&void 0!==f[d]}return"true"===d?!0:"false"===d?!1:"null"===d?null:za.get(d)},skipToNextLine:function(){for(var a=this.currentChar;a>=0;){if(13===a){a=this.nextChar(),10===a&&this.nextChar();break}if(10===a){this.nextChar();break}a=this.nextChar()}}},a}(),Hc={create:function(a){function b(a,b){var c=j.get(a);if(w(c)&&(b?c>=0:c>0))return c;throw new Error('The "'+a+'" parameter in the linearization dictionary is invalid.')}function c(){var a,b,c=j.get("H");if(C(c)&&(2===(a=c.length)||4===a)){for(var d=0;a>d;d++)if(!(w(b=c[d])&&b>0))throw new Error("Hint ("+d+") in the linearization dictionary is invalid.");return c}throw new Error("Hint array in the linearization dictionary is invalid.")}var d,e,f=new Fc(new Gc(a),!1,null),g=f.getObj(),h=f.getObj(),i=f.getObj(),j=f.getObj();if(!(w(g)&&w(h)&&A(i,"obj")&&B(j)&&x(d=j.get("Linearized"))&&d>0))return null;if((e=b("L"))!==a.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:e,hints:c(),objectNumberFirst:b("O"),endFirst:b("E"),numPages:b("N"),mainXRefEntriesOffset:b("T"),pageFirst:j.has("P")?b("P",!0):0}}},Ic=function(){function a(a){this.lexer=a,this.operators=[],this.token=null,this.prev=null}return a.prototype={nextToken:function(){this.prev=this.token,this.token=this.lexer.getToken()},accept:function(a){return this.token.type===a?(this.nextToken(),!0):!1},expect:function(a){return this.accept(a)?!0:void c("Unexpected symbol: found "+this.token.type+" expected "+a+".")},parse:function(){return this.nextToken(),this.expect(Jc.LBRACE),this.parseBlock(),this.expect(Jc.RBRACE),this.operators},parseBlock:function(){for(;;)if(this.accept(Jc.NUMBER))this.operators.push(this.prev.value);else if(this.accept(Jc.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(Jc.LBRACE))return;this.parseCondition()}},parseCondition:function(){var a=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(Jc.RBRACE),this.accept(Jc.IF))this.operators[a]=this.operators.length,this.operators[a+1]="jz";else if(this.accept(Jc.LBRACE)){var b=this.operators.length;this.operators.push(null,null);var d=this.operators.length; +this.parseBlock(),this.expect(Jc.RBRACE),this.expect(Jc.IFELSE),this.operators[b]=this.operators.length,this.operators[b+1]="j",this.operators[a]=d,this.operators[a+1]="jz"}else c("PS Function: error parsing conditional.")}},a}(),Jc={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5},Kc=function(){function a(a,b){this.type=a,this.value=b}var b={};return a.getOperator=function(c){var d=b[c];return d?d:b[c]=new a(Jc.OPERATOR,c)},a.LBRACE=new a(Jc.LBRACE,"{"),a.RBRACE=new a(Jc.RBRACE,"}"),a.IF=new a(Jc.IF,"IF"),a.IFELSE=new a(Jc.IFELSE,"IFELSE"),a}(),Lc=function(){function a(a){this.stream=a,this.nextChar(),this.strBuf=[]}return a.prototype={nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){for(var a=!1,b=this.currentChar;;){if(0>b)return Dc;if(a)10!==b&&13!==b||(a=!1);else if(37===b)a=!0;else if(!Gc.isSpace(b))break;b=this.nextChar()}switch(0|b){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new Kc(Jc.NUMBER,this.getNumber());case 123:return this.nextChar(),Kc.LBRACE;case 125:return this.nextChar(),Kc.RBRACE}var c=this.strBuf;for(c.length=0,c[0]=String.fromCharCode(b);(b=this.nextChar())>=0&&(b>=65&&90>=b||b>=97&&122>=b);)c.push(String.fromCharCode(b));var d=c.join("");switch(d.toLowerCase()){case"if":return Kc.IF;case"ifelse":return Kc.IFELSE;default:return Kc.getOperator(d)}},getNumber:function(){var a=this.currentChar,b=this.strBuf;for(b.length=0,b[0]=String.fromCharCode(a);(a=this.nextChar())>=0&&(a>=48&&57>=a||45===a||46===a);)b.push(String.fromCharCode(a));var d=parseFloat(b.join(""));return isNaN(d)&&c("Invalid floating point number: "+d),d}},a}(),Mc=function(){function a(a,b,c,d){this.bytes=a instanceof Uint8Array?a:new Uint8Array(a),this.start=b||0,this.pos=this.start,this.end=b+c||this.bytes.length,this.dict=d}return a.prototype={get length(){return this.end-this.start},get isEmpty(){return 0===this.length},getByte:function(){return this.pos>=this.end?-1:this.bytes[this.pos++]},getUint16:function(){var a=this.getByte(),b=this.getByte();return-1===a||-1===b?-1:(a<<8)+b},getInt32:function(){var a=this.getByte(),b=this.getByte(),c=this.getByte(),d=this.getByte();return(a<<24)+(b<<16)+(c<<8)+d},getBytes:function(a){var b=this.bytes,c=this.pos,d=this.end;if(!a)return b.subarray(c,d);var e=c+a;return e>d&&(e=d),this.pos=e,b.subarray(c,e)},peekByte:function(){var a=this.getByte();return this.pos--,a},peekBytes:function(a){var b=this.getBytes(a);return this.pos-=b.length,b},skip:function(a){a||(a=1),this.pos+=a},reset:function(){this.pos=this.start},moveStart:function(){this.start=this.pos},makeSubStream:function(b,c,d){return new a(this.bytes.buffer,b,c,d)},isStream:!0},a}(),Nc=function(){function a(a){for(var b=a.length,c=new Uint8Array(b),d=0;b>d;++d)c[d]=a.charCodeAt(d);Mc.call(this,c)}return a.prototype=Mc.prototype,a}(),Oc=function(){function a(a){if(this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=b,this.minBufferLength=512,a)for(;this.minBufferLengthc;)c*=2;var d=new Uint8Array(c);return d.set(b),this.buffer=d},getByte:function(){for(var a=this.pos;this.bufferLength<=a;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]},getUint16:function(){var a=this.getByte(),b=this.getByte();return-1===a||-1===b?-1:(a<<8)+b},getInt32:function(){var a=this.getByte(),b=this.getByte(),c=this.getByte(),d=this.getByte();return(a<<24)+(b<<16)+(c<<8)+d},getBytes:function(a){var b,c=this.pos;if(a){for(this.ensureBuffer(c+a),b=c+a;!this.eof&&this.bufferLengthd&&(b=d)}else{for(;!this.eof;)this.readBlock();b=this.bufferLength}return this.pos=b,this.buffer.subarray(c,b)},peekByte:function(){var a=this.getByte();return this.pos--,a},peekBytes:function(a){var b=this.getBytes(a);return this.pos-=b.length,b},makeSubStream:function(a,b,c){for(var d=a+b;this.bufferLength<=d&&!this.eof;)this.readBlock();return new Mc(this.buffer,a,b,c)},skip:function(a){a||(a=1),this.pos+=a},reset:function(){this.pos=0},getBaseStreams:function(){return this.str&&this.str.getBaseStreams?this.str.getBaseStreams():[]}},a}(),Pc=function(){function a(a){this.streams=a,Oc.call(this,null)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a=this.streams;if(0===a.length)return void(this.eof=!0);var b=a.shift(),c=b.getBytes(),d=this.bufferLength,e=d+c.length,f=this.ensureBuffer(e);f.set(c,d),this.bufferLength=e},a.prototype.getBaseStreams=function(){for(var a=[],b=0,c=this.streams.length;c>b;b++){var d=this.streams[b];d.getBaseStreams&&na.appendToArray(a,d.getBaseStreams())}return a},a}(),Qc=function(){function a(a,b){this.str=a,this.dict=a.dict;var d=a.getByte(),e=a.getByte();-1!==d&&-1!==e||c("Invalid header in flate stream: "+d+", "+e),8!==(15&d)&&c("Unknown compression method in flate stream: "+d+", "+e),((d<<8)+e)%31!==0&&c("Bad FCHECK in flate stream: "+d+", "+e),32&e&&c("FDICT bit set in flate stream: "+d+", "+e),this.codeSize=0,this.codeBuf=0,Oc.call(this,b)}var b=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),e=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),f=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],g=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];return a.prototype=Object.create(Oc.prototype),a.prototype.getBits=function(a){for(var b,d=this.str,e=this.codeSize,f=this.codeBuf;a>e;)-1===(b=d.getByte())&&c("Bad encoding in flate stream"),f|=b<>a,this.codeSize=e-=a,b},a.prototype.getCode=function(a){for(var b,d=this.str,e=a[0],f=a[1],g=this.codeSize,h=this.codeBuf;f>g&&-1!==(b=d.getByte());)h|=b<>16,k=65535&i;return(1>j||j>g)&&c("Bad encoding in flate stream"),this.codeBuf=h>>j,this.codeSize=g-j,k},a.prototype.generateHuffmanTable=function(a){var b,c=a.length,d=0;for(b=0;c>b;++b)a[b]>d&&(d=a[b]);for(var e=1<=g;++g,h<<=1,i<<=1)for(var j=0;c>j;++j)if(a[j]===g){var k=0,l=h;for(b=0;g>b;++b)k=k<<1|1&l,l>>=1;for(b=k;e>b;b+=i)f[b]=g<<16|j;++h}return[f,d]},a.prototype.readBlock=function(){var a,h,i=this.str,j=this.getBits(3);if(1&j&&(this.eof=!0),j>>=1,0!==j){var k,l;if(1===j)k=f,l=g;else if(2===j){var m,n=this.getBits(5)+257,o=this.getBits(5)+1,p=this.getBits(4)+4,q=new Uint8Array(b.length);for(m=0;p>m;++m)q[b[m]]=this.getBits(3);var r=this.generateHuffmanTable(q);h=0,m=0;for(var s,t,u,v=n+o,w=new Uint8Array(v);v>m;){var x=this.getCode(r);if(16===x)s=2,t=3,u=h;else if(17===x)s=3,t=3,u=h=0;else{if(18!==x){w[m++]=h=x;continue}s=7,t=11,u=h=0}for(var y=this.getBits(s)+t;y-- >0;)w[m++]=u}k=this.generateHuffmanTable(w.subarray(0,n)),l=this.generateHuffmanTable(w.subarray(n,v))}else c("Unknown block type in flate stream");a=this.buffer;for(var z=a?a.length:0,A=this.bufferLength;;){var B=this.getCode(k);if(256>B)A+1>=z&&(a=this.ensureBuffer(A+1),z=a.length),a[A++]=B;else{if(256===B)return void(this.bufferLength=A);B-=257,B=d[B];var C=B>>16;C>0&&(C=this.getBits(C)),h=(65535&B)+C,B=this.getCode(l),B=e[B],C=B>>16,C>0&&(C=this.getBits(C));var D=(65535&B)+C;A+h>=z&&(a=this.ensureBuffer(A+h),z=a.length);for(var E=0;h>E;++E,++A)a[A]=a[A-D]}}}else{var F;-1===(F=i.getByte())&&c("Bad block header in flate stream");var G=F;-1===(F=i.getByte())&&c("Bad block header in flate stream"),G|=F<<8,-1===(F=i.getByte())&&c("Bad block header in flate stream");var H=F;-1===(F=i.getByte())&&c("Bad block header in flate stream"),H|=F<<8,H===(65535&~G)||0===G&&0===H||c("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var I=this.bufferLength;a=this.ensureBuffer(I+G);var J=I+G;if(this.bufferLength=J,0===G)-1===i.peekByte()&&(this.eof=!0);else for(var K=I;J>K;++K){if(-1===(F=i.getByte())){this.eof=!0;break}a[K]=F}}},a}(),Rc=function(){function a(a,b,d){var e=this.predictor=d.get("Predictor")||1;if(1>=e)return a;2!==e&&(10>e||e>15)&&c("Unsupported predictor: "+e),2===e?this.readBlock=this.readBlockTiff:this.readBlock=this.readBlockPng,this.str=a,this.dict=a.dict;var f=this.colors=d.get("Colors")||1,g=this.bits=d.get("BitsPerComponent")||8,h=this.columns=d.get("Columns")||1;return this.pixBytes=f*g+7>>3,this.rowBytes=h*f*g+7>>3,Oc.call(this,b),this}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlockTiff=function(){var a=this.rowBytes,b=this.bufferLength,c=this.ensureBuffer(b+a),d=this.bits,e=this.colors,f=this.str.getBytes(a);if(this.eof=!f.length,!this.eof){var g,h=0,i=0,j=0,k=0,l=b;if(1===d)for(g=0;a>g;++g){var m=f[g];h=h<<8|m,c[l++]=255&(m^h>>e),h&=65535}else if(8===d){for(g=0;e>g;++g)c[l++]=f[g];for(;a>g;++g)c[l]=c[l-e]+f[g],l++}else{var n=new Uint8Array(e+1),o=(1<g;++g)for(var s=0;e>s;++s)d>j&&(h=h<<8|255&f[p++],j+=8),n[s]=n[s]+(h>>j-d)&o,j-=d,i=i<=8&&(c[q++]=i>>k-8&255,k-=8);k>0&&(c[q++]=(i<<8-k)+(h&(1<<8-k)-1))}this.bufferLength+=a}},a.prototype.readBlockPng=function(){var a=this.rowBytes,b=this.pixBytes,d=this.str.getByte(),e=this.str.getBytes(a);if(this.eof=!e.length,!this.eof){var f=this.bufferLength,g=this.ensureBuffer(f+a),h=g.subarray(f-a,f);0===h.length&&(h=new Uint8Array(a));var i,j,k,l=f;switch(d){case 0:for(i=0;a>i;++i)g[l++]=e[i];break;case 1:for(i=0;b>i;++i)g[l++]=e[i];for(;a>i;++i)g[l]=g[l-b]+e[i]&255,l++;break;case 2:for(i=0;a>i;++i)g[l++]=h[i]+e[i]&255;break;case 3:for(i=0;b>i;++i)g[l++]=(h[i]>>1)+e[i];for(;a>i;++i)g[l]=(h[i]+g[l-b]>>1)+e[i]&255,l++;break;case 4:for(i=0;b>i;++i)j=h[i],k=e[i],g[l++]=j+k;for(;a>i;++i){j=h[i];var m=h[i-b],n=g[l-b],o=n+j-m,p=o-n;0>p&&(p=-p);var q=o-j;0>q&&(q=-q);var r=o-m;0>r&&(r=-r),k=e[i],q>=p&&r>=p?g[l++]=n+k:r>=q?g[l++]=j+k:g[l++]=m+k}break;default:c("Unsupported predictor: "+d)}this.bufferLength+=a}},a}(),Sc=function(){function a(a,b,c,d){for(var e;-1!==(e=a.getByte());)if(255===e){a.skip(-1);break}this.stream=a,this.maybeLength=b,this.dict=c,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),Object.defineProperty(a.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),a.prototype.ensureBuffer=function(a){if(!this.bufferLength)try{var b=new gd;if(this.forceRGB&&this.dict&&C(this.dict.get("Decode"))){for(var d=this.dict.get("Decode"),e=this.dict.get("BitsPerComponent")||8,f=d.length,g=new Int32Array(f),h=!1,i=(1<j;j+=2)g[j]=256*(d[j+1]-d[j])|0,g[j+1]=d[j]*i|0,256===g[j]&&0===g[j+1]||(h=!0);h&&(b.decodeTransform=g)}b.parse(this.bytes);var k=b.getData(this.drawWidth,this.drawHeight,this.forceRGB);this.buffer=k,this.bufferLength=k.length,this.eof=!0}catch(l){c("JPEG error: "+l)}},a.prototype.getBytes=function(a){return this.ensureBuffer(),this.buffer},a.prototype.getIR=function(){return PDFJS.createObjectURL(this.bytes,"image/jpeg")},a.prototype.isNativelySupported=function(a,b){var c=Xa.parse(this.dict.get("ColorSpace","CS"),a,b);return("DeviceGray"===c.name||"DeviceRGB"===c.name)&&c.isDefaultDecode(this.dict.get("Decode","D"))},a.prototype.isNativelyDecodable=function(a,b){var c=Xa.parse(this.dict.get("ColorSpace","CS"),a,b);return(1===c.numComps||3===c.numComps)&&c.isDefaultDecode(this.dict.get("Decode","D"))},a}(),Tc=function(){function a(a,b,c){this.stream=a,this.maybeLength=b,this.dict=c,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),Object.defineProperty(a.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),a.prototype.ensureBuffer=function(a){if(!this.bufferLength){var b=new hd;b.parse(this.bytes);var c=b.width,d=b.height,e=b.componentsCount,f=b.tiles.length;if(1===f)this.buffer=b.tiles[0].items;else{for(var g=new Uint8Array(c*d*e),h=0;f>h;h++)for(var i=b.tiles[h],j=i.width,k=i.height,l=i.left,m=i.top,n=i.items,o=0,p=(c*m+l)*e,q=c*e,r=j*e,s=0;k>s;s++){var t=n.subarray(o,o+r);g.set(t,p),o+=r,p+=q}this.buffer=g}this.bufferLength=this.buffer.length,this.eof=!0}},a}(),Uc=function(){function a(a,b,c){this.stream=a,this.maybeLength=b,this.dict=c,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),Object.defineProperty(a.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),a.prototype.ensureBuffer=function(a){if(!this.bufferLength){var c=new id,d=[],e=this.dict.xref,f=e.fetchIfRef(this.dict.get("DecodeParms"));if(C(f)&&(f.length>1&&b("JBIG2 - 'DecodeParms' array with multiple elements not supported."),f=e.fetchIfRef(f[0])),f&&f.has("JBIG2Globals")){var g=f.get("JBIG2Globals"),h=g.getBytes();d.push({data:h,start:0,end:h.length})}d.push({data:this.bytes,start:0,end:this.bytes.length});for(var i=c.parseChunks(d),j=i.length,k=0;j>k;k++)i[k]^=255;this.buffer=i,this.bufferLength=j,this.eof=!0}},a}(),Vc=function(){function a(a,b,c){this.str=a,this.dict=a.dict,this.decrypt=c,this.nextChunk=null,this.initialized=!1,Oc.call(this,b)}var b=512;return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a;if(this.initialized?a=this.nextChunk:(a=this.str.getBytes(b),this.initialized=!0),!a||0===a.length)return void(this.eof=!0);this.nextChunk=this.str.getBytes(b);var c=this.nextChunk&&this.nextChunk.length>0,d=this.decrypt;a=d(a,!c);var e,f=this.bufferLength,g=a.length,h=this.ensureBuffer(f+g);for(e=0;g>e;e++)h[f++]=a[e];this.bufferLength=f},a}(),Wc=function(){function a(a,b){this.str=a,this.dict=a.dict,this.input=new Uint8Array(5),b&&(b=.8*b),Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){for(var a=126,b=122,c=-1,d=this.str,e=d.getByte();Gc.isSpace(e);)e=d.getByte();if(e===c||e===a)return void(this.eof=!0);var f,g,h=this.bufferLength;if(e===b){for(f=this.ensureBuffer(h+4),g=0;4>g;++g)f[h+g]=0;this.bufferLength+=4}else{var i=this.input;for(i[0]=e,g=1;5>g;++g){for(e=d.getByte();Gc.isSpace(e);)e=d.getByte();if(i[g]=e,e===c||e===a)break}if(f=this.ensureBuffer(h+g-1),this.bufferLength+=g-1,5>g){for(;5>g;++g)i[g]=117;this.eof=!0}var j=0;for(g=0;5>g;++g)j=85*j+(i[g]-33);for(g=3;g>=0;--g)f[h+g]=255&j,j>>=8}},a}(),Xc=function(){function a(a,b){this.str=a,this.dict=a.dict,this.firstDigit=-1,b&&(b=.5*b),Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a=8e3,b=this.str.getBytes(a);if(!b.length)return void(this.eof=!0);for(var c=b.length+1>>1,d=this.ensureBuffer(this.bufferLength+c),e=this.bufferLength,f=this.firstDigit,g=0,h=b.length;h>g;g++){var i,j=b[g];if(j>=48&&57>=j)i=15&j;else{if(!(j>=65&&70>=j||j>=97&&102>=j)){if(62===j){this.eof=!0;break}continue}i=(15&j)+9}0>f?f=i:(d[e++]=f<<4|i,f=-1)}f>=0&&this.eof&&(d[e++]=f<<4,f=-1),this.firstDigit=f,this.bufferLength=e},a}(),Yc=function(){function a(a,b){this.str=a,this.dict=a.dict,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a=this.str.getBytes(2);if(!a||a.length<2||128===a[0])return void(this.eof=!0);var b,c=this.bufferLength,d=a[0];if(128>d){if(b=this.ensureBuffer(c+d+1),b[c++]=a[1],d>0){var e=this.str.getBytes(d);b.set(e,c),c+=d}}else{d=257-d;var f=a[1];b=this.ensureBuffer(c+d+1);for(var g=0;d>g;g++)b[c++]=f}this.bufferLength=c},a}(),Zc=function(){function b(a,b,c){this.str=a,this.dict=a.dict,c=c||Aa.empty,this.encoding=c.get("K")||0,this.eoline=c.get("EndOfLine")||!1,this.byteAlign=c.get("EncodedByteAlign")||!1,this.columns=c.get("Columns")||1728,this.rows=c.get("Rows")||0;var d=c.get("EndOfBlock");null!==d&&void 0!==d||(d=!0),this.eoblock=d,this.black=c.get("BlackIs1")||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0;for(var e;0===(e=this.lookBits(12));)this.eatBits(1);1===e&&this.eatBits(12),this.encoding>0&&(this.nextLine2D=!this.lookBits(1),this.eatBits(1)),Oc.call(this,b)}var c=-2,d=0,e=1,f=2,g=3,h=4,i=5,j=6,k=7,l=8,m=[[-1,-1],[-1,-1],[7,l],[7,k],[6,j],[6,j],[6,i],[6,i],[4,d],[4,d],[4,d],[4,d],[4,d],[4,d],[4,d],[4,d],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f]],n=[[-1,-1],[12,c],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],o=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],p=[[-1,-1],[-1,-1],[12,c],[12,c],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],q=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],r=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];return b.prototype=Object.create(Oc.prototype),b.prototype.readBlock=function(){for(;!this.eof;){var a=this.lookChar();this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=a}},b.prototype.addPixels=function(b,c){var d=this.codingLine,e=this.codingPos;b>d[e]&&(b>this.columns&&(a("row is wrong length"),this.err=!0,b=this.columns),1&e^c&&++e,d[e]=b),this.codingPos=e},b.prototype.addPixelsNeg=function(b,c){var d=this.codingLine,e=this.codingPos;if(b>d[e])b>this.columns&&(a("row is wrong length"),this.err=!0,b=this.columns),1&e^c&&++e,d[e]=b;else if(bb&&(a("invalid code"),this.err=!0,b=0);e>0&&b=64);do s+=t=this.getWhiteCode();while(t>=64)}else{do r+=t=this.getWhiteCode();while(t>=64);do s+=t=this.getBlackCode();while(t>=64)}for(this.addPixels(p[this.codingPos]+r,c),p[this.codingPos]0?--b:++b;o[b]<=p[this.codingPos]&&o[b]0?--b:++b;o[b]<=p[this.codingPos]&&o[b]0?--b:++b;o[b]<=p[this.codingPos]&&o[b]=64)}else do r+=t=this.getWhiteCode();while(t>=64);this.addPixels(p[this.codingPos]+r,c),c^=1}var u=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(r=this.lookBits(12),this.eoline)for(;r!==Dc&&1!==r;)this.eatBits(1),r=this.lookBits(12);else for(;0===r;)this.eatBits(1),r=this.lookBits(12);1===r?(this.eatBits(12),u=!0):r===Dc&&(this.eof=!0)}else this.eof=!0;if(!this.eof&&this.encoding>0&&(this.nextLine2D=!this.lookBits(1),this.eatBits(1)),this.eoblock&&u&&this.byteAlign){if(r=this.lookBits(12),1===r){if(this.eatBits(12),this.encoding>0&&(this.lookBits(1),this.eatBits(1)),this.encoding>=0)for(n=0;4>n;++n)r=this.lookBits(12),1!==r&&a("bad rtc code: "+r),this.eatBits(12),this.encoding>0&&(this.lookBits(1),this.eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(r=this.lookBits(13),r===Dc)return this.eof=!0,null;if(r>>1===1)break;this.eatBits(1)}this.eatBits(12),this.encoding>0&&(this.eatBits(1),this.nextLine2D=!(1&r))}p[0]>0?this.outputBits=p[this.codingPos=0]:this.outputBits=p[this.codingPos=1],this.row++}var v;if(this.outputBits>=8)v=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&p[this.codingPos]m?(v<<=m,1&this.codingPos||(v|=255>>8-m),this.outputBits-=m,m=0):(v<<=this.outputBits,1&this.codingPos||(v|=255>>8-this.outputBits),m-=this.outputBits,this.outputBits=0,p[this.codingPos]0&&(v<<=m,m=0));while(m)}return this.black&&(v^=255),v},b.prototype.findTableCode=function(a,b,c,d){for(var e=d||0,f=a;b>=f;++f){var g=this.lookBits(f);if(g===Dc)return[!0,1,!1];if(b>f&&(g<<=b-f),!e||g>=e){var h=c[g-e];if(h[0]===f)return this.eatBits(f),[!0,h[1],!0]}}return[!1,0,!1]},b.prototype.getTwoDimCode=function(){var b,c=0;if(this.eoblock){if(c=this.lookBits(7),b=m[c],b&&b[0]>0)return this.eatBits(b[0]), +b[1]}else{var d=this.findTableCode(1,7,m);if(d[0]&&d[2])return d[1]}return a("Bad two dim code"),Dc},b.prototype.getWhiteCode=function(){var b,c=0;if(this.eoblock){if(c=this.lookBits(12),c===Dc)return 1;if(b=c>>5===0?n[c]:o[c>>3],b[0]>0)return this.eatBits(b[0]),b[1]}else{var d=this.findTableCode(1,9,o);if(d[0])return d[1];if(d=this.findTableCode(11,12,n),d[0])return d[1]}return a("bad white code"),this.eatBits(1),1},b.prototype.getBlackCode=function(){var b,c;if(this.eoblock){if(b=this.lookBits(13),b===Dc)return 1;if(c=b>>7===0?p[b]:b>>9===0&&b>>7!==0?q[(b>>1)-64]:r[b>>7],c[0]>0)return this.eatBits(c[0]),c[1]}else{var d=this.findTableCode(2,6,r);if(d[0])return d[1];if(d=this.findTableCode(7,12,q,64),d[0])return d[1];if(d=this.findTableCode(10,13,p),d[0])return d[1]}return a("bad black code"),this.eatBits(1),1},b.prototype.lookBits=function(a){for(var b;this.inputBits>16-a;this.inputBuf=(this.inputBuf<<8)+b,this.inputBits+=8}return this.inputBuf>>this.inputBits-a&65535>>16-a},b.prototype.eatBits=function(a){(this.inputBits-=a)<0&&(this.inputBits=0)},b}(),$c=function(){function a(a,b,c){this.str=a,this.dict=a.dict,this.cachedData=0,this.bitsCached=0;for(var d=4096,e={earlyChange:c,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(d),dictionaryLengths:new Uint16Array(d),dictionaryPrevCodes:new Uint16Array(d),currentSequence:new Uint8Array(d),currentSequenceLength:0},f=0;256>f;++f)e.dictionaryValues[f]=f,e.dictionaryLengths[f]=1;this.lzwState=e,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBits=function(a){for(var b=this.bitsCached,c=this.cachedData;a>b;){var d=this.str.getByte();if(-1===d)return this.eof=!0,null;c=c<<8|d,b+=8}return this.bitsCached=b-=a,this.cachedData=c,this.lastCode=null,c>>>b&(1<a;a++){var t=this.readBits(m),u=p>0;if(256>t)o[0]=t,p=1;else{if(!(t>=258)){if(256===t){m=9,i=258,p=0;continue}this.eof=!0,delete this.lzwState;break}if(i>t)for(p=k[t],b=p-1,c=t;b>=0;b--)o[b]=j[c],c=l[c];else o[p++]=o[0]}if(u&&(l[i]=n,k[i]=k[n]+1,j[i]=o[0],i++,m=i+h&i+h-1?m:0|Math.min(Math.log(i+h)/.6931471805599453+1,12)),n=t,q+=p,q>e){do e+=f;while(q>e);s=this.ensureBuffer(this.bufferLength+e)}for(b=0;p>b;b++)s[r++]=o[b]}g.nextCode=i,g.codeLength=m,g.prevCode=n,g.currentSequenceLength=p,this.bufferLength=r}},a}(),_c=function(){function a(){Mc.call(this,new Uint8Array(0))}return a.prototype=Mc.prototype,a}(),ad=function(){function a(a){this.name=a,this.terminated=!1,this._capability=G()}return a.prototype={get finished(){return this._capability.promise},finish:function(){this._capability.resolve()},terminate:function(){this.terminated=!0},ensureNotTerminated:function(){if(this.terminated)throw new Error("Worker task was terminated")}},a}(),bd=PDFJS.WorkerMessageHandler={setup:function(c){function d(){if(j)throw new Error("Worker was terminated")}function e(a){l.push(a)}function f(a){a.finish();var b=l.indexOf(a);l.splice(b,1)}function g(a){var b=G(),c=function(){var a=i.ensureDoc("numPages"),c=i.ensureDoc("fingerprint"),e=i.ensureXRef("encrypt");Promise.all([a,c,e]).then(function(a){var c={numPages:a[0],fingerprint:a[1],encrypted:!!a[2]};b.resolve(c)},d)},d=function(a){b.reject(a)};return i.ensureDoc("checkHeader",[]).then(function(){i.ensureDoc("parseStartXRef",[]).then(function(){i.ensureDoc("parse",[a]).then(c,d)},d)},d),b.promise}function h(a){var d,e=G(),f=a.source,g=a.disableRange;if(f.data){try{d=new ua(f.data,f.password),e.resolve(d)}catch(h){e.reject(h)}return e.promise}if(f.chunkedViewerLoading){try{d=new va(f,c),e.resolve(d)}catch(h){e.reject(h)}return e.promise}var i=new pa(f.url,{httpHeaders:f.httpHeaders,withCredentials:f.withCredentials}),j=[],l=i.requestFull({onHeadersReceived:function(){if(!g){var a=i.getRequestXhr(l);if("bytes"===a.getResponseHeader("Accept-Ranges")){var b=a.getResponseHeader("Content-Encoding")||"identity";if("identity"===b){var h=a.getResponseHeader("Content-Length");if(h=parseInt(h,10),w(h)&&(f.length=h,!(2*sa>=h))){i.isStreamingRequest(l)?f.disableAutoFetch=!0:i.abortRequest(l);try{d=new va(f,c),e.resolve(d)}catch(j){e.reject(j)}k=null}}}}},onProgressiveData:f.disableStream?null:function(a){return d?void d.sendProgressiveData(a):void j.push(a)},onDone:function(a){if(!d){var c;if(null===a){var g=0,h=0;j.forEach(function(a){g+=a.byteLength}),f.length&&g!==f.length&&b("reported HTTP length is different from actual");var i=new Uint8Array(g);j.forEach(function(a){i.set(new Uint8Array(a),h),h+=a.byteLength}),c=i.buffer}else c=a.chunk;try{d=new ua(c,f.password),e.resolve(d)}catch(l){e.reject(l)}k=null}},onError:function(a){var b;404===a?(b=new ga('Missing PDF "'+f.url+'".'),c.send("MissingPDF",b)):(b=new ha("Unexpected server response ("+a+') while retrieving PDF "'+f.url+'".',a),c.send("UnexpectedResponse",b)),k=null},onProgress:function(a){c.send("DocProgress",{loaded:a.loaded,total:a.lengthComputable?a.total:f.length})}});return k=function(){i.abortRequest(l)},e.promise}var i,j=!1,k=null,l=[];c.on("test",function(a){if(!(a instanceof Uint8Array))return void c.send("test",!1);var b=255===a[0];c.postMessageTransfers=b;var d=new XMLHttpRequest,e="response"in d;try{d.responseType}catch(f){e=!1}return e?void c.send("test",{supportTypedArray:!0,supportTransfers:b}):void c.send("test",!1)}),c.on("GetDocRequest",function(a){var b=function(a){d(),c.send("GetDoc",{pdfInfo:a})},e=function(a){a instanceof da?a.code===ca.NEED_PASSWORD?c.send("NeedPassword",a):a.code===ca.INCORRECT_PASSWORD&&c.send("IncorrectPassword",a):a instanceof fa?c.send("InvalidPDF",a):a instanceof ga?c.send("MissingPDF",a):a instanceof ha?c.send("UnexpectedResponse",a):c.send("UnknownError",new ea(a.message,a.toString()))};d(),PDFJS.maxImageSize=void 0===a.maxImageSize?-1:a.maxImageSize,PDFJS.disableFontFace=a.disableFontFace,PDFJS.disableCreateObjectURL=a.disableCreateObjectURL,PDFJS.verbosity=a.verbosity,PDFJS.cMapUrl=void 0===a.cMapUrl?null:a.cMapUrl,PDFJS.cMapPacked=a.cMapPacked===!0,h(a).then(function(a){if(j)throw a.terminate(),new Error("Worker was terminated");i=a,c.send("PDFManagerReady",null),i.onLoadedStream().then(function(a){c.send("DataLoaded",{length:a.bytes.byteLength})})}).then(function f(){d(),g(!1).then(b,function(a){return d(),a instanceof ka?(i.requestLoadedStream(),void i.onLoadedStream().then(function(){d(),g(!0).then(b,e)})):(a instanceof da&&i.passwordChanged().then(f),void e(a))},e)},e)}),c.on("GetPage",function(a){return i.getPage(a.pageIndex).then(function(a){var b=i.ensure(a,"rotate"),c=i.ensure(a,"ref"),d=i.ensure(a,"view");return Promise.all([b,c,d]).then(function(a){return{rotate:a[0],ref:a[1],view:a[2]}})})}),c.on("GetPageIndex",function(a){var b=new Ba(a.ref.num,a.ref.gen),c=i.pdfDocument.catalog;return c.getPageIndex(b)}),c.on("GetDestinations",function(a){return i.ensureCatalog("destinations")}),c.on("GetDestination",function(a){return i.ensureCatalog("getDestination",[a.id])}),c.on("GetAttachments",function(a){return i.ensureCatalog("attachments")}),c.on("GetJavaScript",function(a){return i.ensureCatalog("javaScript")}),c.on("GetOutline",function(a){return i.ensureCatalog("documentOutline")}),c.on("GetMetadata",function(a){return Promise.all([i.ensureDoc("documentInfo"),i.ensureCatalog("metadata")])}),c.on("GetData",function(a){return i.requestLoadedStream(),i.onLoadedStream().then(function(a){return a.bytes})}),c.on("GetStats",function(a){return i.pdfDocument.xref.stats}),c.on("UpdatePassword",function(a){i.updatePassword(a)}),c.on("GetAnnotations",function(a){return i.getPage(a.pageIndex).then(function(a){return i.ensure(a,"getAnnotationsData",[])})}),c.on("RenderPageRequest",function(b){var d=b.pageIndex;i.getPage(d).then(function(g){var h=new ad("RenderPageRequest: page "+d);e(h);var i=d+1,j=Date.now();g.getOperatorList(c,h,b.intent).then(function(b){f(h),a("page="+i+" - getOperatorList: time="+(Date.now()-j)+"ms, len="+b.fnArray.length)},function(a){if(f(h),!h.terminated){var d,e="worker.js: while trying to getPage() and getOperatorList()";d="string"==typeof a?{message:a,stack:e}:"object"==typeof a?{message:a.message||a.toString(),stack:a.stack||e}:{message:"Unknown exception type: "+typeof a,stack:e},c.send("PageError",{pageNum:i,error:d,intent:b.intent})}})})},this),c.on("GetTextContent",function(b){var c=b.pageIndex;return i.getPage(c).then(function(b){var d=new ad("GetTextContent: page "+c);e(d);var g=c+1,h=Date.now();return b.extractTextContent(d).then(function(b){return f(d),a("text indexing: page="+g+" - time="+(Date.now()-h)+"ms"),b},function(a){if(f(d),!d.terminated)throw a})})}),c.on("Cleanup",function(a){return i.cleanup()}),c.on("Terminate",function(a){j=!0,i&&(i.terminate(),i=null),k&&k();var b=[];return l.forEach(function(a){b.push(a.finished),a.terminate()}),Promise.all(b).then(function(){})})}},cd={},dd={log:function(){var a=Array.prototype.slice.call(arguments);S.postMessage({action:"console_log",data:a})},error:function(){var a=Array.prototype.slice.call(arguments);throw S.postMessage({action:"console_error",data:a}),"pdf.js execution error"},time:function(a){cd[a]=Date.now()},timeEnd:function(a){var b=cd[a];b||c("Unknown timer name "+a),this.log("Timer:",a,Date.now()-b)}};if("undefined"==typeof window){"console"in S||(S.console=dd),PDFJS.UnsupportedManager.listen(function(a){S.postMessage({action:"_unsupported_feature",data:a})});var ed=new H("worker_processor",this);bd.setup(ed)}var fd=function(){function a(a,b,c){this.data=a,this.bp=b,this.dataEnd=c,this.chigh=a[b],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}var b=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];return a.prototype={byteIn:function(){var a=this.data,b=this.bp;if(255===a[b]){var c=a[b+1];c>143?(this.clow+=65280,this.ct=8):(b++,this.clow+=a[b]<<9,this.ct=7,this.bp=b)}else b++,this.clow+=b65535&&(this.chigh+=this.clow>>16,this.clow&=65535)},readBit:function(a,c){var d,e=a[c]>>1,f=1&a[c],g=b[e],h=g.qe,i=this.a-h;if(this.chighi?(i=h,d=f,e=g.nmps):(i=h,d=1^f,1===g.switchFlag&&(f=d),e=g.nlps);else{if(this.chigh-=h,0!==(32768&i))return this.a=i,f;h>i?(d=1^f,1===g.switchFlag&&(f=d),e=g.nlps):(d=f,e=g.nmps)}do 0===this.ct&&this.byteIn(),i<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--;while(0===(32768&i));return this.a=i,a[c]=e<<1|f,d}},a}(),gd=function(){function a(){}function b(a,b){for(var c,d,e=0,f=[],g=16;g>0&&!a[g-1];)g--;f.push({children:[],index:0});var h,i=f[0];for(c=0;g>c;c++){for(d=0;d0;)i=f.pop();for(i.index++,f.push(i);f.length<=c;)f.push(h={children:[],index:0}),i.children[i.index]=h.children,i=h;e++}g>c+1&&(f.push(h={children:[],index:0}),i.children[i.index]=h.children,i=h)}return f[0].children}function c(a,b,c){return 64*((a.blocksPerLine+1)*b+c)}function d(a,b,d,e,f,g,i,j,k){function l(){if(H>0)return H--,G>>H&1;if(G=a[b++],255===G){var c=a[b++];if(c)throw"unexpected marker: "+(G<<8|c).toString(16)}return H=7,G>>>7}function m(a){for(var b=a;;){if(b=b[l()],"number"==typeof b)return b;if("object"!=typeof b)throw"invalid huffman sequence"}}function n(a){for(var b=0;a>0;)b=b<<1|l(),a--;return b}function o(a){if(1===a)return 1===l()?1:-1;var b=n(a);return b>=1<e;){var f=m(a.huffmanTableAC),g=15&f,i=f>>4;if(0!==g){e+=i;var j=h[e];a.blockData[b+j]=o(g),e++}else{if(15>i)break;e+=16}}}function q(a,b){var c=m(a.huffmanTableDC),d=0===c?0:o(c)<0)return void I--;for(var c=g,d=i;d>=c;){var e=m(a.huffmanTableAC),f=15&e,j=e>>4;if(0!==f){c+=j;var l=h[c];a.blockData[b+l]=o(f)*(1<j){I=n(j)+(1<=e;){var p=h[e];switch(J){case 0:if(d=m(a.huffmanTableAC),c=15&d,j=d>>4,0===c)15>j?(I=n(j)+(1<N;){for(y=0;K>y;y++)e[y].pred=0;if(I=0,1===K)for(x=e[0],B=0;f>B;B++)v(x,C,N),N++;else for(B=0;f>B;B++){for(y=0;K>y;y++)for(x=e[y],O=x.h,P=x.v,z=0;P>z;z++)for(A=0;O>A;A++)u(x,C,N,z,A);N++}if(H=0,L=a[b]<<8|a[b+1],65280>=L)throw"marker was not found";if(!(L>=65488&&65495>=L))break;b+=2}return b-F}function e(a,b,c){for(var d,e,f,g,h,q,r,s,t,u,v,w,x,y,z,A,B,C=a.quantizationTable,D=a.blockData,E=0;64>E;E+=8)t=D[b+E],u=D[b+E+1],v=D[b+E+2],w=D[b+E+3],x=D[b+E+4],y=D[b+E+5],z=D[b+E+6],A=D[b+E+7],t*=C[E],0!==(u|v|w|x|y|z|A)?(u*=C[E+1],v*=C[E+2],w*=C[E+3],x*=C[E+4],y*=C[E+5],z*=C[E+6],A*=C[E+7],d=o*t+128>>8,e=o*x+128>>8,f=v,g=z,h=p*(u-A)+128>>8,s=p*(u+A)+128>>8,q=w<<4,r=y<<4,d=d+e+1>>1,e=d-e,B=f*n+g*m+128>>8,f=f*m-g*n+128>>8,g=B,h=h+r+1>>1,r=h-r,s=s+q+1>>1,q=s-q,d=d+g+1>>1,g=d-g,e=e+f+1>>1,f=e-f,B=h*l+s*k+2048>>12,h=h*k-s*l+2048>>12,s=B,B=q*j+r*i+2048>>12,q=q*i-r*j+2048>>12,r=B,c[E]=d+s,c[E+7]=d-s,c[E+1]=e+r,c[E+6]=e-r,c[E+2]=f+q,c[E+5]=f-q,c[E+3]=g+h,c[E+4]=g-h):(B=o*t+512>>10,c[E]=B,c[E+1]=B,c[E+2]=B,c[E+3]=B,c[E+4]=B,c[E+5]=B,c[E+6]=B,c[E+7]=B);for(var F=0;8>F;++F)t=c[F],u=c[F+8],v=c[F+16],w=c[F+24],x=c[F+32],y=c[F+40],z=c[F+48],A=c[F+56],0!==(u|v|w|x|y|z|A)?(d=o*t+2048>>12,e=o*x+2048>>12,f=v,g=z,h=p*(u-A)+2048>>12,s=p*(u+A)+2048>>12,q=w,r=y,d=(d+e+1>>1)+4112,e=d-e,B=f*n+g*m+2048>>12,f=f*m-g*n+2048>>12,g=B,h=h+r+1>>1,r=h-r,s=s+q+1>>1,q=s-q,d=d+g+1>>1,g=d-g,e=e+f+1>>1,f=e-f,B=h*l+s*k+2048>>12,h=h*k-s*l+2048>>12,s=B,B=q*j+r*i+2048>>12,q=q*i-r*j+2048>>12,r=B,t=d+s,A=d-s,u=e+r,z=e-r,v=f+q,y=f-q,w=g+h,x=g-h,t=16>t?0:t>=4080?255:t>>4,u=16>u?0:u>=4080?255:u>>4,v=16>v?0:v>=4080?255:v>>4,w=16>w?0:w>=4080?255:w>>4,x=16>x?0:x>=4080?255:x>>4,y=16>y?0:y>=4080?255:y>>4,z=16>z?0:z>=4080?255:z>>4,A=16>A?0:A>=4080?255:A>>4,D[b+F]=t,D[b+F+8]=u,D[b+F+16]=v,D[b+F+24]=w,D[b+F+32]=x,D[b+F+40]=y,D[b+F+48]=z,D[b+F+56]=A):(B=o*t+8192>>14,B=-2040>B?0:B>=2024?255:B+2056>>4,D[b+F]=B,D[b+F+8]=B,D[b+F+16]=B,D[b+F+24]=B,D[b+F+32]=B,D[b+F+40]=B,D[b+F+48]=B,D[b+F+56]=B)}function f(a,b){for(var d=b.blocksPerLine,f=b.blocksPerColumn,g=new Int16Array(64),h=0;f>h;h++)for(var i=0;d>i;i++){var j=c(b,h,i);e(b,j,g)}return b.blockData}function g(a){return 0>=a?0:a>=255?255:a}var h=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),i=4017,j=799,k=3406,l=2276,m=1567,n=3784,o=5793,p=2896;return a.prototype={parse:function(a){function c(){var b=a[k]<<8|a[k+1];return k+=2,b}function e(){var b=c(),d=a.subarray(k,k+b-2);return k+=d.length,d}function g(a){for(var b=Math.ceil(a.samplesPerLine/8/a.maxH),c=Math.ceil(a.scanLines/8/a.maxV),d=0;dk;){var y=a[k++],z=new Uint16Array(64);if(y>>4===0)for(s=0;64>s;s++)v=h[s],z[v]=a[k++];else{if(y>>4!==1)throw"DQT: invalid table spec";for(s=0;64>s;s++)v=h[s],z[v]=c()}n[15&y]=z}break;case 65472:case 65473:case 65474:if(i)throw"Only single frame JPEGs supported";c(),i={},i.extended=65473===q,i.progressive=65474===q,i.precision=a[k++],i.scanLines=c(),i.samplesPerLine=c(),i.components=[],i.componentIds={};var A,B=a[k++],C=0,D=0;for(r=0;B>r;r++){A=a[k];var E=a[k+1]>>4,F=15&a[k+1];E>C&&(C=E),F>D&&(D=F);var G=a[k+2];t=i.components.push({h:E,v:F,quantizationTable:n[G]}),i.componentIds[A]=t-1,k+=3}i.maxH=C,i.maxV=D,g(i);break;case 65476:var H=c();for(r=2;H>r;){var I=a[k++],J=new Uint8Array(16),K=0;for(s=0;16>s;s++,k++)K+=J[s]=a[k];var L=new Uint8Array(K);for(s=0;K>s;s++,k++)L[s]=a[k];r+=17+K,(I>>4===0?p:o)[15&I]=b(J,L)}break;case 65501:c(),j=c();break;case 65498:var M,N=(c(),a[k++]),O=[];for(r=0;N>r;r++){var P=i.componentIds[a[k++]];M=i.components[P];var Q=a[k++];M.huffmanTableDC=p[Q>>4],M.huffmanTableAC=o[15&Q],O.push(M)}var R=a[k++],S=a[k++],T=a[k++],U=d(a,k,i,O,j,R,S,T>>4,15&T);k+=U;break;case 65535:255!==a[k]&&k--;break;default:if(255===a[k-3]&&a[k-2]>=192&&a[k-2]<=254){k-=3;break}throw"unknown JPEG marker "+q.toString(16)}q=c()}for(this.width=i.samplesPerLine,this.height=i.scanLines,this.jfif=l,this.adobe=m,this.components=[],r=0;ri;i++){for(c=this.components[i],d=c.scaleX*n,e=c.scaleY*o,p=i,m=c.output,f=c.blocksPerLine+1<<3,g=0;a>g;g++)j=0|g*d,t[g]=(j&u)<<3|7&j;for(h=0;b>h;h++)for(j=0|h*e,l=f*(j&u)|(7&j)<<3,g=0;a>g;g++)s[p]=m[l+t[g]],p+=q}var v=this.decodeTransform;if(v)for(i=0;r>i;)for(j=0,k=0;q>j;j++,i++,k+=2)s[i]=(s[i]*v[k]>>8)+v[k+1];return s},_isColorConversionNeeded:function(){return this.adobe&&this.adobe.transformCode?!0:3===this.numComponents},_convertYccToRgb:function(a){for(var b,c,d,e=0,f=a.length;f>e;e+=3)b=a[e],c=a[e+1],d=a[e+2],a[e]=g(b-179.456+1.402*d),a[e+1]=g(b+135.459-.344*c-.714*d),a[e+2]=g(b-226.816+1.772*c);return a},_convertYcckToRgb:function(a){for(var b,c,d,e,f=0,h=0,i=a.length;i>h;h+=4){b=a[h],c=a[h+1],d=a[h+2],e=a[h+3];var j=-122.67195406894+c*(-660635669420364e-19*c+.000437130475926232*d-54080610064599e-18*b+.00048449797120281*e-.154362151871126)+d*(-.000957964378445773*d+.000817076911346625*b-.00477271405408747*e+1.53380253221734)+b*(.000961250184130688*b-.00266257332283933*e+.48357088451265)+e*(-.000336197177618394*e+.484791561490776),k=107.268039397724+c*(219927104525741e-19*c-.000640992018297945*d+.000659397001245577*b+.000426105652938837*e-.176491792462875)+d*(-.000778269941513683*d+.00130872261408275*b+.000770482631801132*e-.151051492775562)+b*(.00126935368114843*b-.00265090189010898*e+.25802910206845)+e*(-.000318913117588328*e-.213742400323665),l=-20.810012546947+c*(-.000570115196973677*c-263409051004589e-19*d+.0020741088115012*b-.00288260236853442*e+.814272968359295)+d*(-153496057440975e-19*d-.000132689043961446*b+.000560833691242812*e-.195152027534049)+b*(.00174418132927582*b-.00255243321439347*e+.116935020465145)+e*(-.000343531996510555*e+.24165260232407);a[f++]=g(j),a[f++]=g(k),a[f++]=g(l)}return a},_convertYcckToCmyk:function(a){for(var b,c,d,e=0,f=a.length;f>e;e+=4)b=a[e],c=a[e+1],d=a[e+2],a[e]=g(434.456-b-1.402*d),a[e+1]=g(119.541-b+.344*c+.714*d),a[e+2]=g(481.816-b-1.772*c);return a},_convertCmykToRgb:function(a){for(var b,c,d,e,f=0,g=-16581375,h=1/255/255,i=0,j=a.length;j>i;i+=4){b=a[i],c=a[i+1],d=a[i+2],e=a[i+3];var k=b*(-4.387332384609988*b+54.48615194189176*c+18.82290502165302*d+212.25662451639585*e-72734.4411664936)+c*(1.7149763477362134*c-5.6096736904047315*d-17.873870861415444*e-1401.7366389350734)+d*(-2.5217340131683033*d-21.248923337353073*e+4465.541406466231)-e*(21.86122147463605*e+48317.86113160301),l=b*(8.841041422036149*b+60.118027045597366*c+6.871425592049007*d+31.159100130055922*e-20220.756542821975)+c*(-15.310361306967817*c+17.575251261109482*d+131.35250912493976*e-48691.05921601825)+d*(4.444339102852739*d+9.8632861493405*e-6341.191035517494)-e*(20.737325471181034*e+47890.15695978492),m=b*(.8842522430003296*b+8.078677503112928*c+30.89978309703729*d-.23883238689178934*e-3616.812083916688)+c*(10.49593273432072*c+63.02378494754052*d+50.606957656360734*e-28620.90484698408)+d*(.03296041114873217*d+115.60384449646641*e-49363.43385999684)-e*(22.33816807309886*e+45932.16563550634);a[f++]=k>=0?255:g>=k?0:255+k*h|0,a[f++]=l>=0?255:g>=l?0:255+l*h|0,a[f++]=m>=0?255:g>=m?0:255+m*h|0}return a},getData:function(a,b,c){if(this.numComponents>4)throw"Unsupported color mode";var d=this._getLinearizedBlockData(a,b);if(3===this.numComponents)return this._convertYccToRgb(d);if(4===this.numComponents){if(this._isColorConversionNeeded())return c?this._convertYcckToRgb(d):this._convertYcckToCmyk(d);if(c)return this._convertCmykToRgb(d)}return d}},a}(),hd=function(){function c(){this.failOnCorruptedImage=!1}function d(a,b){a.x0=Math.ceil(b.XOsiz/a.XRsiz),a.x1=Math.ceil(b.Xsiz/a.XRsiz),a.y0=Math.ceil(b.YOsiz/a.YRsiz),a.y1=Math.ceil(b.Ysiz/a.YRsiz),a.width=a.x1-a.x0,a.height=a.y1-a.y0}function e(a,b){for(var c,d=a.SIZ,e=[],f=Math.ceil((d.Xsiz-d.XTOsiz)/d.XTsiz),g=Math.ceil((d.Ysiz-d.YTOsiz)/d.YTsiz),h=0;g>h;h++)for(var i=0;f>i;i++)c={},c.tx0=Math.max(d.XTOsiz+i*d.XTsiz,d.XOsiz),c.ty0=Math.max(d.YTOsiz+h*d.YTsiz,d.YOsiz),c.tx1=Math.min(d.XTOsiz+(i+1)*d.XTsiz,d.Xsiz),c.ty1=Math.min(d.YTOsiz+(h+1)*d.YTsiz,d.Ysiz),c.width=c.tx1-c.tx0,c.height=c.ty1-c.ty0,c.components=[],e.push(c);a.tiles=e;for(var j=d.Csiz,k=0,l=j;l>k;k++)for(var m=b[k],n=0,o=e.length;o>n;n++){var p={};c=e[n],p.tcx0=Math.ceil(c.tx0/m.XRsiz),p.tcy0=Math.ceil(c.ty0/m.YRsiz),p.tcx1=Math.ceil(c.tx1/m.XRsiz),p.tcy1=Math.ceil(c.ty1/m.YRsiz),p.width=p.tcx1-p.tcx0,p.height=p.tcy1-p.tcy0,c.components[k]=p}}function f(a,b,c){var d=b.codingStyleParameters,e={};return d.entropyCoderWithCustomPrecincts?(e.PPx=d.precinctsSizes[c].PPx,e.PPy=d.precinctsSizes[c].PPy):(e.PPx=15,e.PPy=15),e.xcb_=c>0?Math.min(d.xcb,e.PPx-1):Math.min(d.xcb,e.PPx),e.ycb_=c>0?Math.min(d.ycb,e.PPy-1):Math.min(d.ycb,e.PPy),e}function g(a,b,c){var d=1<b.trx0?Math.ceil(b.trx1/d)-Math.floor(b.trx0/d):0,j=b.try1>b.try0?Math.ceil(b.try1/e)-Math.floor(b.try0/e):0,k=i*j;b.precinctParameters={precinctWidth:d,precinctHeight:e,numprecinctswide:i,numprecinctshigh:j,numprecincts:k,precinctWidthInSubband:g,precinctHeightInSubband:h}}function h(a,b,c){var d,e,f,g,h=c.xcb_,i=c.ycb_,j=1<>h,m=b.tby0>>i,n=b.tbx1+j-1>>h,o=b.tby1+k-1>>i,p=b.resolution.precinctParameters,q=[],r=[];for(e=m;o>e;e++)for(d=l;n>d;d++){f={cbx:d,cby:e,tbx0:j*d,tby0:k*e,tbx1:j*(d+1),tby1:k*(e+1)},f.tbx0_=Math.max(b.tbx0,f.tbx0),f.tby0_=Math.max(b.tby0,f.tby0),f.tbx1_=Math.min(b.tbx1,f.tbx1),f.tby1_=Math.min(b.tby1,f.tby1);var s=Math.floor((f.tbx0_-b.tbx0)/p.precinctWidthInSubband),t=Math.floor((f.tby0_-b.tby0)/p.precinctHeightInSubband);if(g=s+t*p.numprecinctswide,f.precinctNumber=g,f.subbandType=b.type,f.Lblock=3,!(f.tbx1_<=f.tbx0_||f.tby1_<=f.tby0_)){q.push(f);var u=r[g];void 0!==u?(du.cbxMax&&(u.cbxMax=d),eu.cbyMax&&(u.cbyMax=e)):r[g]=u={cbxMin:d,cbyMin:e,cbxMax:d,cbyMax:e},f.precinct=u}}b.codeblockParameters={codeblockWidth:h,codeblockHeight:i,numcodeblockwide:n-l+1,numcodeblockhigh:o-m+1},b.codeblocks=q,b.precincts=r}function i(a,b,c){for(var d=[],e=a.subbands,f=0,g=e.length;g>f;f++)for(var h=e[f],i=h.codeblocks,j=0,k=i.length;k>j;j++){var l=i[j];l.precinctNumber===b&&d.push(l)}return{layerNumber:c,codeblocks:d}}function j(a){for(var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=0,h=0;f>h;h++)g=Math.max(g,d.components[h].codingStyleParameters.decompositionLevelsCount);var j=0,k=0,l=0,m=0;this.nextPacket=function(){for(;e>j;j++){for(;g>=k;k++){for(;f>l;l++){var a=d.components[l];if(!(k>a.codingStyleParameters.decompositionLevelsCount)){for(var b=a.resolutions[k],c=b.precinctParameters.numprecincts;c>m;){var h=i(b,m,j);return m++,h}m=0}}l=0}k=0}throw new Error("JPX Error: Out of packets")}}function k(a){for(var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=0,h=0;f>h;h++)g=Math.max(g,d.components[h].codingStyleParameters.decompositionLevelsCount);var j=0,k=0,l=0,m=0;this.nextPacket=function(){for(;g>=j;j++){for(;e>k;k++){for(;f>l;l++){var a=d.components[l];if(!(j>a.codingStyleParameters.decompositionLevelsCount)){for(var b=a.resolutions[j],c=b.precinctParameters.numprecincts;c>m;){var h=i(b,m,k);return m++,h}m=0}}l=0}k=0}throw new Error("JPX Error: Out of packets")}}function m(a){var b,c,d,e,f=a.SIZ,g=a.currentTile.index,h=a.tiles[g],j=h.codingStyleDefaultParameters.layersCount,k=f.Csiz,l=0;for(d=0;k>d;d++){var m=h.components[d];l=Math.max(l,m.codingStyleParameters.decompositionLevelsCount)}var n=new Int32Array(l+1);for(c=0;l>=c;++c){var o=0;for(d=0;k>d;++d){var p=h.components[d].resolutions;c=c;c++){for(;ed;d++){var a=h.components[d];if(!(c>a.codingStyleParameters.decompositionLevelsCount)){var f=a.resolutions[c],g=f.precinctParameters.numprecincts;if(!(e>=g)){for(;j>b;){var m=i(f,e,b);return b++,m}b=0}}}d=0}e=0}throw new Error("JPX Error: Out of packets")}}function p(a){var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=s(d),h=g,j=0,k=0,l=0,m=0,n=0;this.nextPacket=function(){for(;nl;l++){for(var a=d.components[l],b=a.codingStyleParameters.decompositionLevelsCount;b>=k;k++){var c=a.resolutions[k],o=g.components[l].resolutions[k],p=r(m,n,o,h,c);if(null!==p){for(;e>j;){var q=i(c,p,j);return j++,q}j=0}}k=0}l=0}m=0}throw new Error("JPX Error: Out of packets")}}function q(a){var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=s(d),h=0,j=0,k=0,l=0,m=0;this.nextPacket=function(){for(;f>k;++k){for(var a=d.components[k],b=g.components[k],c=a.codingStyleParameters.decompositionLevelsCount;m=j;j++){var n=a.resolutions[j],o=b.resolutions[j],p=r(l,m,o,b,n);if(null!==p){for(;e>h;){var q=i(n,p,h);return h++,q}h=0}}j=0}l=0}m=0}throw new Error("JPX Error: Out of packets")}}function r(a,b,c,d,e){var f=a*d.minWidth,g=b*d.minHeight;if(f%c.width!==0||g%c.height!==0)return null;var h=g/c.width*e.precinctParameters.numprecinctswide;return f/c.height+h}function s(a){for(var b=a.components.length,c=Number.MAX_VALUE,d=Number.MAX_VALUE,e=0,f=0,g=new Array(b),h=0;b>h;h++){for(var i=a.components[h],j=i.codingStyleParameters.decompositionLevelsCount,k=new Array(j+1),l=Number.MAX_VALUE,m=Number.MAX_VALUE,n=0,o=0,p=1,q=j;q>=0;--q){var r=i.resolutions[q],s=p*r.precinctParameters.precinctWidth,t=p*r.precinctParameters.precinctHeight;l=Math.min(l,s),m=Math.min(m,t),n=Math.max(n,r.precinctParameters.numprecinctswide),o=Math.max(o,r.precinctParameters.numprecinctshigh),k[q]={width:s,height:t},p<<=1}c=Math.min(c,l),d=Math.min(d,m),e=Math.max(e,n),f=Math.max(f,o),g[h]={resolutions:k,minWidth:l,minHeight:m,maxNumWide:n,maxNumHigh:o}}return{components:g,minWidth:c,minHeight:d,maxNumWide:e,maxNumHigh:f}}function t(a){for(var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=b.Csiz,i=0;e>i;i++){for(var l=d.components[i],n=l.codingStyleParameters.decompositionLevelsCount,o=[],r=[],s=0;n>=s;s++){var t=f(a,l,s),u={},v=1<m;){var d=b[c+k];k++,n?(j=j<<7|d,m+=7,n=!1):(j=j<<8|d,m+=8),255===d&&(n=!0)}return m-=a,j>>>m&(1<a?a+3:(a=e(5),31>a?a+6:(a=e(7),a+37))}for(var j,k=0,m=0,n=!1,o=a.currentTile.index,p=a.tiles[o],q=a.COD.sopMarkerUsed,r=a.COD.ephMarkerUsed,s=p.packetsIterator;d>k;){h(),q&&f(145)&&g(4);var t=s.nextPacket();if(e(1)){for(var u,v=t.layerNumber,w=[],x=0,y=t.codeblocks.length;y>x;x++){u=t.codeblocks[x];var z,C=u.precinct,D=u.cbx-C.cbxMin,E=u.cby-C.cbyMin,F=!1,G=!1;if(void 0!==u.included)F=!!e(1);else{C=u.precinct;var H,I;if(void 0!==C.inclusionTree)H=C.inclusionTree;else{var J=C.cbxMax-C.cbxMin+1,K=C.cbyMax-C.cbyMin+1;H=new B(J,K,v),I=new A(J,K),C.inclusionTree=H,C.zeroBitPlanesTree=I}if(H.reset(D,E,v))for(;;){if(!e(1)){H.incrementValue(v);break}if(z=!H.nextLevel()){u.included=!0,F=G=!0;break}}}if(F){if(G){for(I=C.zeroBitPlanesTree,I.reset(D,E);;)if(e(1)){if(z=!I.nextLevel())break}else I.incrementValue();u.zeroBitPlanes=I.value}for(var L=i();e(1);)u.Lblock++;var M=l(L),N=(1<L?M-1:M)+u.Lblock,O=e(N);w.push({codeblock:u,codingpasses:L,dataLength:O})}}for(h(),r&&f(146);w.length>0;){var P=w.shift();u=P.codeblock,void 0===u.data&&(u.data=[]),u.data.push({data:b,start:c+k,end:c+k+P.dataLength,codingpasses:P.codingpasses}),k+=P.dataLength}}}return k}function v(a,b,c,d,e,f,g,h){for(var i=d.tbx0,j=d.tby0,k=d.tbx1-d.tbx0,l=d.codeblocks,m="H"===d.type.charAt(0)?1:0,n="H"===d.type.charAt(1)?b:0,o=0,p=l.length;p>o;++o){var q=l[o],r=q.tbx1_-q.tbx0_,s=q.tby1_-q.tby0_;if(0!==r&&0!==s&&void 0!==q.data){var t,u;t=new C(r,s,q.subbandType,q.zeroBitPlanes,f),u=2;var v,w,x,y=q.data,z=0,A=0;for(v=0,w=y.length;w>v;v++)x=y[v],z+=x.end-x.start,A+=x.codingpasses;var B=new Uint8Array(z),D=0;for(v=0,w=y.length;w>v;v++){x=y[v];var E=x.data.subarray(x.start,x.end);B.set(E,D),D+=E.length}var F=new fd(B,0,z);for(t.setDecoder(F),v=0;A>v;v++){switch(u){case 0:t.runSignificancePropogationPass();break;case 1:t.runMagnitudeRefinementPass();break;case 2:t.runCleanupPass(),h&&t.checkSegmentationSymbol()}u=(u+1)%3}var G,H,I,J=q.tbx0_-i+(q.tby0_-j)*k,K=t.coefficentsSign,L=t.coefficentsMagnitude,M=t.bitsDecoded,N=g?0:.5;D=0;var O="LL"!==d.type;for(v=0;s>v;v++){var P=J/k|0,Q=2*P*(b-k)+m+n;for(G=0;r>G;G++){if(H=L[D],0!==H){H=(H+N)*e,0!==K[D]&&(H=-H),I=M[D];var R=O?Q+(J<<1):J;g&&I>=f?a[R]=H:a[R]=H*(1<=q;q++){for(var r=d.resolutions[q],s=r.trx1-r.trx0,t=r.try1-r.try0,u=new Float32Array(s*t),w=0,x=r.subbands.length;x>w;w++){var y,A;i?(y=h[p].mu,A=h[p].epsilon,p++):(y=h[0].mu,A=h[0].epsilon+(q>0?1-q:0));var B=r.subbands[w],C=z[B.type],D=m?1:Math.pow(2,l+C-A)*(1+y/2048),G=j+A-1;v(u,s,t,B,D,G,m,k)}o.push({width:s,height:t,items:u})}var H=n.calculate(o,d.tcx0,d.tcy0);return{left:d.tcx0,top:d.tcy0,width:H.width,height:H.height,items:H.items}}function x(a){for(var b=a.SIZ,c=a.components,d=b.Csiz,e=[],f=0,g=a.tiles.length;g>f;f++){var h,i=a.tiles[f],j=[];for(h=0;d>h;h++)j[h]=w(a,i,h);var k,l,m,n,o,p,q,r,s,t,u,v,x,y,z,A=j[0],B=new Uint8Array(A.items.length*d),C={left:A.left,top:A.top,width:A.width,height:A.height,items:B},D=0;if(i.codingStyleDefaultParameters.multipleComponentTransform){var E=4===d,F=j[0].items,G=j[1].items,H=j[2].items,I=E?j[3].items:null;k=c[0].precision-8,l=(128<p;p++,D+=K)r=F[p]+l,s=G[p],t=H[p],v=r-(t+s>>2),u=v+t,x=v+s,B[D++]=0>=u?0:u>=m?255:u>>k,B[D++]=0>=v?0:v>=m?255:v>>k,B[D++]=0>=x?0:x>=m?255:x>>k;else for(p=0;q>p;p++,D+=K)r=F[p]+l,s=G[p],t=H[p],u=r+1.402*t,v=r-.34413*s-.71414*t,x=r+1.772*s,B[D++]=0>=u?0:u>=m?255:u>>k,B[D++]=0>=v?0:v>=m?255:v>>k,B[D++]=0>=x?0:x>=m?255:x>>k;if(E)for(p=0,D=3;q>p;p++,D+=4)y=I[p],B[D]=n>=y?0:y>=o?255:y+l>>k}else for(h=0;d>h;h++){var L=j[h].items;for(k=c[h].precision-8,l=(128<p;p++)z=L[p],B[D]=n>=z?0:z>=m?255:z+l>>k,D+=d}e.push(C)}return e}function y(a,b){for(var c=a.SIZ,d=c.Csiz,e=a.tiles[b],f=0;d>f;f++){var g=e.components[f],h=void 0!==a.currentTile.QCC[f]?a.currentTile.QCC[f]:a.currentTile.QCD;g.quantizationParameters=h;var i=void 0!==a.currentTile.COC[f]?a.currentTile.COC[f]:a.currentTile.COD;g.codingStyleParameters=i}e.codingStyleDefaultParameters=a.currentTile.COD}var z={LL:0,LH:1,HL:1,HH:2};c.prototype={parse:function(c){var d=n(c,0);if(65359===d)return void this.parseCodestream(c,0,c.length);for(var e=0,f=c.length;f>e;){var g=8,h=o(c,e),i=o(c,e+4);if(e+=g,1===h&&(h=4294967296*o(c,e)+o(c,e+4),e+=8,g+=8),0===h&&(h=f-e+g),g>h)throw new Error("JPX Error: Invalid box field size");var j=h-g,k=!0;switch(i){case 1785737832:k=!1;break;case 1668246642:var l=c[e];c[e+1],c[e+2];if(1===l){var m=o(c,e+3);switch(m){case 16:case 17:case 18:break;default:b("Unknown colorspace "+m)}}else 2===l&&a("ICC profile not supported");break;case 1785737827:this.parseCodestream(c,e,e+j);break;case 1783636e3:218793738!==o(c,e)&&b("Invalid JP2 signature");break;case 1783634458:case 1718909296:case 1920099697:case 1919251232:case 1768449138:break;default:var p=String.fromCharCode(i>>24&255,i>>16&255,i>>8&255,255&i);b("Unsupported header type "+i+" ("+p+")")}k&&(e+=j)}},parseImageProperties:function(a){for(var b=a.getByte();b>=0;){var c=b;b=a.getByte();var d=c<<8|b;if(65361===d){a.skip(4);var e=a.getInt32()>>>0,f=a.getInt32()>>>0,g=a.getInt32()>>>0,h=a.getInt32()>>>0;a.skip(16);var i=a.getUint16();return this.width=e-g,this.height=f-h,this.componentsCount=i,void(this.bitsPerComponent=8)}}throw new Error("JPX Error: No size marker found in JPX stream")},parseCodestream:function(a,c,f){var g={};try{for(var h=!1,i=c;f>i+1;){var j=n(a,i);i+=2;var k,l,m,p,q,r,s=0;switch(j){case 65359:g.mainHeader=!0;break;case 65497:break;case 65361:s=n(a,i);var v={};v.Xsiz=o(a,i+4),v.Ysiz=o(a,i+8),v.XOsiz=o(a,i+12),v.YOsiz=o(a,i+16),v.XTsiz=o(a,i+20),v.YTsiz=o(a,i+24),v.XTOsiz=o(a,i+28),v.YTOsiz=o(a,i+32);var w=n(a,i+36);v.Csiz=w;var z=[];k=i+38;for(var A=0;w>A;A++){var B={precision:(127&a[k])+1,isSigned:!!(128&a[k]),XRsiz:a[k+1],YRsiz:a[k+1]};d(B,v),z.push(B)}g.SIZ=v,g.components=z,e(g,z),g.QCC=[],g.COC=[];break;case 65372:s=n(a,i);var C={};switch(k=i+2,l=a[k++],31&l){case 0:p=8,q=!0;break;case 1:p=16,q=!1;break;case 2:p=16,q=!0;break;default:throw new Error("JPX Error: Invalid SQcd value "+l)}for(C.noQuantization=8===p,C.scalarExpounded=q,C.guardBits=l>>5,m=[];s+i>k;){var D={};8===p?(D.epsilon=a[k++]>>3,D.mu=0):(D.epsilon=a[k]>>3,D.mu=(7&a[k])<<8|a[k+1],k+=2),m.push(D)}C.SPqcds=m,g.mainHeader?g.QCD=C:(g.currentTile.QCD=C,g.currentTile.QCC=[]);break;case 65373:s=n(a,i);var E={};k=i+2;var F;switch(g.SIZ.Csiz<257?F=a[k++]:(F=n(a,k),k+=2),l=a[k++],31&l){case 0:p=8,q=!0;break;case 1:p=16,q=!1;break;case 2:p=16,q=!0;break;default:throw new Error("JPX Error: Invalid SQcd value "+l)}for(E.noQuantization=8===p,E.scalarExpounded=q,E.guardBits=l>>5,m=[];s+i>k;)D={},8===p?(D.epsilon=a[k++]>>3,D.mu=0):(D.epsilon=a[k]>>3,D.mu=(7&a[k])<<8|a[k+1],k+=2),m.push(D);E.SPqcds=m,g.mainHeader?g.QCC[F]=E:g.currentTile.QCC[F]=E;break;case 65362:s=n(a,i);var G={};k=i+2;var H=a[k++];G.entropyCoderWithCustomPrecincts=!!(1&H),G.sopMarkerUsed=!!(2&H),G.ephMarkerUsed=!!(4&H),G.progressionOrder=a[k++],G.layersCount=n(a,k),k+=2,G.multipleComponentTransform=a[k++],G.decompositionLevelsCount=a[k++],G.xcb=(15&a[k++])+2,G.ycb=(15&a[k++])+2;var I=a[k++];if(G.selectiveArithmeticCodingBypass=!!(1&I),G.resetContextProbabilities=!!(2&I),G.terminationOnEachCodingPass=!!(4&I),G.verticalyStripe=!!(8&I),G.predictableTermination=!!(16&I),G.segmentationSymbolUsed=!!(32&I),G.reversibleTransformation=a[k++],G.entropyCoderWithCustomPrecincts){for(var J=[];s+i>k;){var K=a[k++];J.push({PPx:15&K,PPy:K>>4})}G.precinctsSizes=J}var L=[];if(G.selectiveArithmeticCodingBypass&&L.push("selectiveArithmeticCodingBypass"),G.resetContextProbabilities&&L.push("resetContextProbabilities"),G.terminationOnEachCodingPass&&L.push("terminationOnEachCodingPass"),G.verticalyStripe&&L.push("verticalyStripe"),G.predictableTermination&&L.push("predictableTermination"),L.length>0)throw h=!0,new Error("JPX Error: Unsupported COD options ("+L.join(", ")+")");g.mainHeader?g.COD=G:(g.currentTile.COD=G,g.currentTile.COC=[]);break;case 65424:s=n(a,i),r={},r.index=n(a,i+2),r.length=o(a,i+4),r.dataEnd=r.length+i-2,r.partIndex=a[i+8],r.partsCount=a[i+9],g.mainHeader=!1,0===r.partIndex&&(r.COD=g.COD,r.COC=g.COC.slice(0),r.QCD=g.QCD,r.QCC=g.QCC.slice(0)),g.currentTile=r;break;case 65427:r=g.currentTile,0===r.partIndex&&(y(g,r.index),t(g)),s=r.dataEnd-i,u(g,a,i,s);break;case 65365:case 65367:case 65368:case 65380:s=n(a,i);break;case 65363:throw new Error("JPX Error: Codestream code 0xFF53 (COC) is not implemented");default:throw new Error("JPX Error: Unknown codestream code: "+j.toString(16))}i+=s}}catch(M){if(h||this.failOnCorruptedImage)throw M;b("Trying to recover from "+M.message)}this.tiles=x(g),this.width=g.SIZ.Xsiz-g.SIZ.XOsiz,this.height=g.SIZ.Ysiz-g.SIZ.YOsiz,this.componentsCount=g.SIZ.Csiz}};var A=function(){function a(a,b){var c=l(Math.max(a,b))+1;this.levels=[];for(var d=0;c>d;d++){var e={width:a,height:b,items:[]};this.levels.push(e),a=Math.ceil(a/2),b=Math.ceil(b/2)}}return a.prototype={reset:function(a,b){for(var c,d=0,e=0;d>=1,b>>=1,d++}d--,c=this.levels[d],c.items[c.index]=e,this.currentLevel=d,delete this.value},incrementValue:function(){var a=this.levels[this.currentLevel];a.items[a.index]++},nextLevel:function(){var a=this.currentLevel,b=this.levels[a],c=b.items[b.index];return a--,0>a?(this.value=c,!1):(this.currentLevel=a,b=this.levels[a],b.items[b.index]=c,!0)}},a}(),B=function(){function a(a,b,c){var d=l(Math.max(a,b))+1;this.levels=[];for(var e=0;d>e;e++){for(var f=new Uint8Array(a*b),g=0,h=f.length;h>g;g++)f[g]=c;var i={width:a,height:b,items:f};this.levels.push(i),a=Math.ceil(a/2),b=Math.ceil(b/2)}}return a.prototype={reset:function(a,b,c){for(var d=0;dc)return this.currentLevel=d,this.propagateValues(),!1;a>>=1,b>>=1,d++}return this.currentLevel=d-1,!0},incrementValue:function(a){var b=this.levels[this.currentLevel];b.items[b.index]=a+1,this.propagateValues()},propagateValues:function(){for(var a=this.currentLevel,b=this.levels[a],c=b.items[b.index];--a>=0;)b=this.levels[a],b.items[b.index]=c},nextLevel:function(){var a=this.currentLevel,b=this.levels[a],c=b.items[b.index];return b.items[b.index]=255,a--,0>a?!1:(this.currentLevel=a,b=this.levels[a],b.items[b.index]=c,!0)}},a}(),C=function(){function a(a,b,c,g,h){this.width=a,this.height=b,this.contextLabelTable="HH"===c?f:"HL"===c?e:d;var i=a*b;this.neighborsSignificance=new Uint8Array(i),this.coefficentsSign=new Uint8Array(i),this.coefficentsMagnitude=h>14?new Uint32Array(i):h>6?new Uint16Array(i):new Uint8Array(i),this.processingFlags=new Uint8Array(i);var j=new Uint8Array(i);if(0!==g)for(var k=0;i>k;k++)j[k]=g;this.bitsDecoded=j,this.reset()}var b=17,c=18,d=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),e=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),f=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);return a.prototype={setDecoder:function(a){this.decoder=a},reset:function(){this.contexts=new Int8Array(19),this.contexts[0]=8,this.contexts[b]=92,this.contexts[c]=6},setNeighborsSignificance:function(a,b,c){var d,e=this.neighborsSignificance,f=this.width,g=this.height,h=b>0,i=f>b+1;a>0&&(d=c-f,h&&(e[d-1]+=16),i&&(e[d+1]+=16),e[d]+=4),g>a+1&&(d=c+f,h&&(e[d-1]+=16),i&&(e[d+1]+=16),e[d]+=4),h&&(e[c-1]+=1),i&&(e[c+1]+=1),e[c]|=128},runSignificancePropogationPass:function(){for(var a=this.decoder,b=this.width,c=this.height,d=this.coefficentsMagnitude,e=this.coefficentsSign,f=this.neighborsSignificance,g=this.processingFlags,h=this.contexts,i=this.contextLabelTable,j=this.bitsDecoded,k=-2,l=1,m=2,n=0;c>n;n+=4)for(var o=0;b>o;o++)for(var p=n*b+o,q=0;4>q;q++,p+=b){var r=n+q;if(r>=c)break;if(g[p]&=k,!d[p]&&f[p]){var s=i[f[p]],t=a.readBit(h,s);if(t){var u=this.decodeSignBit(r,o,p);e[p]=u,d[p]=1,this.setNeighborsSignificance(r,o,p),g[p]|=m}j[p]++,g[p]|=l}}},decodeSignBit:function(a,b,c){var d,e,f,g,h,i,j=this.width,k=this.height,l=this.coefficentsMagnitude,m=this.coefficentsSign;g=b>0&&0!==l[c-1],j>b+1&&0!==l[c+1]?(f=m[c+1],g?(e=m[c-1],d=1-f-e):d=1-f-f):g?(e=m[c-1],d=1-e-e):d=0;var n=3*d;return g=a>0&&0!==l[c-j],k>a+1&&0!==l[c+j]?(f=m[c+j],g?(e=m[c-j],d=1-f-e+n):d=1-f-f+n):g?(e=m[c-j],d=1-e-e+n):d=n,d>=0?(h=9+d,i=this.decoder.readBit(this.contexts,h)):(h=9-d,i=1^this.decoder.readBit(this.contexts,h)),i},runMagnitudeRefinementPass:function(){for(var a,b=this.decoder,c=this.width,d=this.height,e=this.coefficentsMagnitude,f=this.neighborsSignificance,g=this.contexts,h=this.bitsDecoded,i=this.processingFlags,j=1,k=2,l=c*d,m=4*c,n=0;l>n;n=a){a=Math.min(l,n+m);for(var o=0;c>o;o++)for(var p=n+o;a>p;p+=c)if(e[p]&&0===(i[p]&j)){var q=16;if(0!==(i[p]&k)){i[p]^=k;var r=127&f[p];q=0===r?15:14}var s=b.readBit(g,q);e[p]=e[p]<<1|s,h[p]++,i[p]|=j}}},runCleanupPass:function(){for(var a,d=this.decoder,e=this.width,f=this.height,g=this.neighborsSignificance,h=this.coefficentsMagnitude,i=this.coefficentsSign,j=this.contexts,k=this.contextLabelTable,l=this.bitsDecoded,m=this.processingFlags,n=1,o=2,p=e,q=2*e,r=3*e,s=0;f>s;s=a){a=Math.min(s+4,f);for(var t=s*e,u=f>s+3,v=0;e>v;v++){var w,x=t+v,y=u&&0===m[x]&&0===m[x+p]&&0===m[x+q]&&0===m[x+r]&&0===g[x]&&0===g[x+p]&&0===g[x+q]&&0===g[x+r],z=0,A=x,B=s;if(y){var C=d.readBit(j,c);if(!C){l[x]++,l[x+p]++,l[x+q]++,l[x+r]++;continue}z=d.readBit(j,b)<<1|d.readBit(j,b),0!==z&&(B=s+z,A+=z*e),w=this.decodeSignBit(B,v,A),i[A]=w,h[A]=1,this.setNeighborsSignificance(B,v,A),m[A]|=o,A=x;for(var D=s;B>=D;D++,A+=e)l[A]++;z++}for(B=s+z;a>B;B++,A+=e)if(!h[A]&&0===(m[A]&n)){var E=k[g[A]],F=d.readBit(j,E);1===F&&(w=this.decodeSignBit(B,v,A),i[A]=w,h[A]=1,this.setNeighborsSignificance(B,v,A),m[A]|=o),l[A]++}}}},checkSegmentationSymbol:function(){var a=this.decoder,c=this.contexts,d=a.readBit(c,b)<<3|a.readBit(c,b)<<2|a.readBit(c,b)<<1|a.readBit(c,b);if(10!==d)throw new Error("JPX Error: Invalid segmentation symbol")}},a}(),D=function(){function a(){}return a.prototype.calculate=function(a,b,c){for(var d=a[0],e=1,f=a.length;f>e;e++)d=this.iterate(d,a[e],b,c);return d},a.prototype.extend=function(a,b,c){var d=b-1,e=b+1,f=b+c-2,g=b+c;a[d--]=a[e++],a[g++]=a[f--],a[d--]=a[e++],a[g++]=a[f--],a[d--]=a[e++],a[g++]=a[f--],a[d]=a[e],a[g]=a[f]},a.prototype.iterate=function(a,b,c,d){var e,f,g,h,i,j,k=a.width,l=a.height,m=a.items,n=b.width,o=b.height,p=b.items;for(g=0,e=0;l>e;e++)for(h=2*e*n,f=0;k>f;f++,g++,h+=2)p[h]=m[g];m=a.items=null;var q=4,r=new Float32Array(n+2*q);if(1===n){if(0!==(1&c))for(j=0,g=0;o>j;j++,g+=n)p[g]*=.5}else for(j=0,g=0;o>j;j++,g+=n)r.set(p.subarray(g,g+n),q),this.extend(r,q,n),this.filter(r,q,n),p.set(r.subarray(q,q+n),g);var s=16,t=[];for(e=0;s>e;e++)t.push(new Float32Array(o+2*q));var u,v=0;if(a=q+o,1===o){if(0!==(1&d))for(i=0;n>i;i++)p[i]*=.5}else for(i=0;n>i;i++){if(0===v){for(s=Math.min(n-i,s),g=i,h=q;a>h;g+=n,h++)for(u=0;s>u;u++)t[u][h]=p[g+u];v=s}v--;var w=t[v];if(this.extend(w,q,o),this.filter(w,q,o),0===v)for(g=i-s+1,h=q;a>h;g+=n,h++)for(u=0;s>u;u++)p[g+u]=t[u][h]}return{width:n,height:o,items:p}},a}(),E=function(){function a(){D.call(this)}return a.prototype=Object.create(D.prototype),a.prototype.filter=function(a,b,c){var d=c>>1;b=0|b;var e,f,g,h,i=-1.586134342059924,j=-.052980118572961,k=.882911075530934,l=.443506852043971,m=1.230174104914001,n=1/m;for(e=b-3,f=d+4;f--;e+=2)a[e]*=n;for(e=b-2,g=l*a[e-1],f=d+3;f--&&(h=l*a[e+1],a[e]=m*a[e]-g-h,f--);e+=2)e+=2,g=l*a[e+1],a[e]=m*a[e]-g-h;for(e=b-1,g=k*a[e-1],f=d+2;f--&&(h=k*a[e+1],a[e]-=g+h,f--);e+=2)e+=2,g=k*a[e+1],a[e]-=g+h;for(e=b,g=j*a[e-1],f=d+1;f--&&(h=j*a[e+1],a[e]-=g+h,f--);e+=2)e+=2,g=j*a[e+1],a[e]-=g+h;if(0!==d)for(e=b+1,g=i*a[e-1],f=d;f--&&(h=i*a[e+1],a[e]-=g+h,f--);e+=2)e+=2,g=i*a[e+1],a[e]-=g+h},a}(),F=function(){function a(){D.call(this)}return a.prototype=Object.create(D.prototype),a.prototype.filter=function(a,b,c){var d=c>>1;b=0|b;var e,f;for(e=b,f=d+1;f--;e+=2)a[e]-=a[e-1]+a[e+1]+2>>2;for(e=b+1,f=d;f--;e+=2)a[e]+=a[e-1]+a[e+1]>>1},a}();return c}(),id=function(){function a(){}function b(a,b,c){this.data=a,this.start=b,this.end=c}function d(a,b,c){function d(a){for(var b=0,d=0;a>d;d++){var g=c.readBit(e,f);f=256>f?f<<1|g:511&(f<<1|g)|256,b=b<<1|g}return b>>>0}var e=a.getContexts(b),f=1,g=d(1),h=d(1)?d(1)?d(1)?d(1)?d(1)?d(32)+4436:d(12)+340:d(8)+84:d(6)+20:d(4)+4:d(2);return 0===g?h:h>0?-h:null}function e(a,b,c){for(var d=a.getContexts("IAID"),e=1,f=0;c>f;f++){var g=b.readBit(d,e);e=e<<1|g}return 31>c?e&(1<e;e++)for(h=m[e]=new Uint8Array(a),i=1>e?h:m[e-1],j=2>e?h:m[e-2],d=j[0]<<13|j[1]<<12|j[2]<<11|i[0]<<7|i[1]<<6|i[2]<<5|i[3]<<4,f=0;a>f;f++)h[f]=g=k.readBit(l,d),d=(d&n)<<1|(a>f+3?j[f+3]<<11:0)|(a>f+4?i[f+4]<<4:0)|g;return m}function h(a,b,d,e,g,h,i,j){if(a&&c("JBIG2 error: MMR encoding is not supported"),0===e&&!h&&!g&&4===i.length&&3===i[0].x&&-1===i[0].y&&-3===i[1].x&&-1===i[1].y&&2===i[2].x&&-2===i[2].y&&-2===i[3].x&&-2===i[3].y)return f(b,d,j);var k=!!h,l=y[e].concat(i);l.sort(function(a,b){return a.y-b.y||a.x-b.x});var m,n,o=l.length,p=new Int8Array(o),q=new Int8Array(o),r=[],s=0,t=0,u=0,v=0;for(n=0;o>n;n++)p[n]=l[n].x,q[n]=l[n].y,t=Math.min(t,l[n].x),u=Math.max(u,l[n].x),v=Math.min(v,l[n].y),o-1>n&&l[n].y===l[n+1].y&&l[n].x===l[n+1].x-1?s|=1<m;m++)n=r[m],x[m]=l[n].x,z[m]=l[n].y,B[m]=1<R;R++){if(g){var S=N.readBit(O,K);if(P^=S){M.push(L);continue}}for(L=new Uint8Array(L),M.push(L),C=0;b>C;C++)if(k&&h[R][C])L[C]=0;else{if(C>=H&&J>C&&R>=I)for(Q=Q<<1&s,n=0;w>n;n++)D=R+z[n],E=C+x[n],F=M[D][E],F&&(F=B[n],Q|=F);else for(Q=0,G=o-1,n=0;o>n;n++,G--)E=C+p[n],E>=0&&b>E&&(D=R+q[n],D>=0&&(F=M[D][E],F&&(Q|=F<l;l++)n[l]=k[l].x,o[l]=k[l].y;var p=z[d].reference;0===d&&(p=p.concat([i[1]]));var q=p.length,r=new Int32Array(q),s=new Int32Array(q);for(l=0;q>l;l++)r[l]=p[l].x,s[l]=p[l].y;for(var t=e[0].length,u=e.length,v=B[d],w=[],x=j.decoder,y=j.contextCache.getContexts("GR"),A=0,C=0;b>C;C++){if(h){var D=x.readBit(y,v);A^=D,A&&c("JBIG2 error: prediction is not supported")}var E=new Uint8Array(a);w.push(E);for(var F=0;a>F;F++){var G,H,I=0;for(l=0;m>l;l++)G=C+o[l],H=F+n[l],0>G||0>H||H>=a?I<<=1:I=I<<1|w[G][H];for(l=0;q>l;l++)G=C+s[l]+g,H=F+r[l]+f,0>G||G>=u||0>H||H>=t?I<<=1:I=I<<1|e[G][H];var J=x.readBit(y,I);E[F]=J}}return w}function j(a,b,f,g,j,m,n,o,p,q,r){a&&c("JBIG2 error: huffman is not supported");for(var s=[],t=0,u=l(f.length+g),v=r.decoder,w=r.contextCache;s.length1)B=k(a,b,y,t,0,C,1,f.concat(s),u,0,0,1,0,m,p,q,r);else{var D=e(w,v,u),E=d(w,"IARDX",v),F=d(w,"IARDY",v),G=DM;M++)I[M]&&H.push(f[M]);for(var O=0;g>O;M++,O++)I[M]&&H.push(s[O]);return H}function k(a,b,f,g,h,j,k,l,m,n,o,p,q,r,s,t,u){a&&c("JBIG2 error: huffman is not supported");var v,w,x=[];for(v=0;g>v;v++){if(w=new Uint8Array(f),h)for(var y=0;f>y;y++)w[y]=h;x.push(w)}var z=u.decoder,A=u.contextCache,B=-d(A,"IADT",z),C=0;for(v=0;j>v;){var D=d(A,"IADT",z);B+=D;var E=d(A,"IAFS",z);C+=E;for(var F=C;;){var G=1===k?0:d(A,"IAIT",z),H=k*B+G,I=e(A,z,m),J=b&&d(A,"IARI",z),K=l[I],L=K[0].length,M=K.length;if(J){var N=d(A,"IARDW",z),O=d(A,"IARDH",z),P=d(A,"IARDX",z),Q=d(A,"IARDY",z);L+=N,M+=O,K=i(L,M,s,K,(N>>1)+P,(O>>1)+Q,!1,t,u)}var R,S,T,U=H-(1&p?0:M),V=F-(2&p?L:0);if(n){for(R=0;M>R;R++)if(w=x[V+R]){T=K[R];var W=Math.min(f-U,L);switch(q){case 0:for(S=0;W>S;S++)w[U+S]|=T[S];break;case 2:for(S=0;W>S;S++)w[U+S]^=T[S];break;default:c("JBIG2 error: operator "+q+" is not supported")}}F+=M-1}else{for(S=0;M>S;S++)if(w=x[U+S])switch(T=K[S],q){case 0:for(R=0;L>R;R++)w[V+R]|=T[R];break;case 2:for(R=0;L>R;R++)w[V+R]^=T[R];break;default:c("JBIG2 error: operator "+q+" is not supported")}F+=L-1}v++;var X=d(A,"IADS",z);if(null===X)break;F+=X+o}}return x}function p(a,b){var d={};d.number=o(a,b);var e=a[b+4],f=63&e;x[f]||c("JBIG2 error: invalid segment type: "+f),d.type=f,d.typeName=x[f],d.deferredNonRetain=!!(128&e);var g=!!(64&e),h=a[b+5],i=h>>5&7,j=[31&h],k=b+6;if(7===h){i=536870911&o(a,k-1),k+=3;var l=i+7>>3;for(j[0]=a[k++];--l>0;)j.push(a[k++])}else 5!==h&&6!==h||c("JBIG2 error: invalid referred-to flags");d.retainBits=j;var m,p,q=d.number<=256?1:d.number<=65536?2:4,s=[];for(m=0;i>m;m++){var t=1===q?a[k]:2===q?n(a,k):o(a,k);s.push(t),k+=q}if(d.referredTo=s,g?(d.pageAssociation=o(a,k),k+=4):d.pageAssociation=a[k++],d.length=o(a,k),k+=4,4294967295===d.length)if(38===f){var u=r(a,k),v=a[k+C],w=!!(1&v),y=6,z=new Uint8Array(y);for(w||(z[0]=255,z[1]=172),z[2]=u.height>>>24&255,z[3]=u.height>>16&255,z[4]=u.height>>8&255,z[5]=255&u.height,m=k,p=a.length;p>m;m++){for(var A=0;y>A&&z[A]===a[m+A];)A++;if(A===y){d.length=m+y;break}}4294967295===d.length&&c("JBIG2 error: segment end was not found")}else c("JBIG2 error: invalid unknown segment length");return d.headerEnd=k,d}function q(a,b,c,d){for(var e=[],f=c;d>f;){var g=p(b,f);f=g.headerEnd;var h={header:g,data:b};if(a.randomAccess||(h.start=f,f+=g.length,h.end=f),e.push(h),51===g.type)break}if(a.randomAccess)for(var i=0,j=e.length;j>i;i++)e[i].start=f,f+=e[i].header.length,e[i].end=f;return e}function r(a,b){return{width:o(a,b),height:o(a,b+4),x:o(a,b+8),y:o(a,b+12),combinationOperator:7&a[b+16]}}function s(a,b){var d,e,f,g,h=a.header,i=a.data,j=a.start,k=a.end;switch(h.type){case 0:var l={},p=n(i,j);if(l.huffman=!!(1&p),l.refinement=!!(2&p),l.huffmanDHSelector=p>>2&3,l.huffmanDWSelector=p>>4&3,l.bitmapSizeSelector=p>>6&1,l.aggregationInstancesSelector=p>>7&1,l.bitmapCodingContextUsed=!!(256&p),l.bitmapCodingContextRetained=!!(512&p),l.template=p>>10&3,l.refinementTemplate=p>>12&1,j+=2,!l.huffman){for(g=0===l.template?4:1,e=[],f=0;g>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;l.at=e}if(l.refinement&&!l.refinementTemplate){for(e=[],f=0;2>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;l.refinementAt=e}l.numberOfExportedSymbols=o(i,j),j+=4,l.numberOfNewSymbols=o(i,j),j+=4,d=[l,h.number,h.referredTo,i,j,k];break;case 6:case 7:var q={};q.info=r(i,j),j+=C;var s=n(i,j);if(j+=2,q.huffman=!!(1&s),q.refinement=!!(2&s),q.stripSize=1<<(s>>2&3),q.referenceCorner=s>>4&3,q.transposed=!!(64&s),q.combinationOperator=s>>7&3,q.defaultPixelValue=s>>9&1,q.dsOffset=s<<17>>27,q.refinementTemplate=s>>15&1,q.huffman){var t=n(i,j);j+=2,q.huffmanFS=3&t,q.huffmanDS=t>>2&3,q.huffmanDT=t>>4&3,q.huffmanRefinementDW=t>>6&3,q.huffmanRefinementDH=t>>8&3,q.huffmanRefinementDX=t>>10&3,q.huffmanRefinementDY=t>>12&3,q.huffmanRefinementSizeSelector=!!(14&t)}if(q.refinement&&!q.refinementTemplate){for(e=[],f=0;2>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;q.refinementAt=e}q.numberOfSymbolInstances=o(i,j),j+=4,q.huffman&&c("JBIG2 error: huffman is not supported"),d=[q,h.referredTo,i,j,k];break;case 38:case 39:var u={};u.info=r(i,j),j+=C;var v=i[j++];if(u.mmr=!!(1&v),u.template=v>>1&3,u.prediction=!!(8&v),!u.mmr){for(g=0===u.template?4:1,e=[],f=0;g>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;u.at=e}d=[u,i,j,k];break;case 48:var w={width:o(i,j),height:o(i,j+4),resolutionX:o(i,j+8),resolutionY:o(i,j+12)};4294967295===w.height&&delete w.height;var x=i[j+16];n(i,j+17);w.lossless=!!(1&x),w.refinement=!!(2&x),w.defaultPixelValue=x>>2&1,w.combinationOperator=x>>3&3,w.requiresBuffer=!!(32&x),w.combinationOperatorOverride=!!(64&x),d=[w];break;case 49:break;case 50:break;case 51:break;case 62:break;default:c("JBIG2 error: segment type "+h.typeName+"("+h.type+") is not implemented")}var y="on"+h.typeName;y in b&&b[y].apply(b,d)}function t(a,b){for(var c=0,d=a.length;d>c;c++)s(a[c],b)}function u(a){for(var b=new v,c=0,d=a.length;d>c;c++){var e=a[c],f=q({},e.data,e.start,e.end);t(f,b)}return b.buffer}function v(){}function w(){}a.prototype={getContexts:function(a){return a in this?this[a]:this[a]=new Int8Array(65536)}},b.prototype={get decoder(){var a=new fd(this.data,this.start,this.end);return g(this,"decoder",a)},get contextCache(){var b=new a;return g(this,"contextCache",b)}};var x=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"patternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],y=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],z=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],A=[39717,1941,229,405],B=[32,8],C=17;return v.prototype={onPageInformation:function(a){this.currentPageInfo=a;var b=a.width+7>>3,c=new Uint8Array(b*a.height);if(a.defaultPixelValue)for(var d=0,e=c.length;e>d;d++)c[d]=255;this.buffer=c},drawBitmap:function(a,b){var d,e,f,g,h=this.currentPageInfo,i=a.width,j=a.height,k=h.width+7>>3,l=h.combinationOperatorOverride?a.combinationOperator:h.combinationOperator,m=this.buffer,n=128>>(7&a.x),o=a.y*k+(a.x>>3);switch(l){case 0:for(d=0;j>d;d++){for(f=n,g=o,e=0;i>e;e++)b[d][e]&&(m[g]|=f),f>>=1,f||(f=128,g++);o+=k}break;case 2:for(d=0;j>d;d++){for(f=n,g=o,e=0;i>e;e++)b[d][e]&&(m[g]^=f),f>>=1,f||(f=128,g++);o+=k}break;default:c("JBIG2 error: operator "+l+" is not supported")}},onImmediateGenericRegion:function(a,c,d,e){var f=a.info,g=new b(c,d,e),i=h(a.mmr,f.width,f.height,a.template,a.prediction,null,a.at,g);this.drawBitmap(f,i)},onImmediateLosslessGenericRegion:function(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function(a,d,e,f,g,h){var i;a.huffman&&c("JBIG2 error: huffman is not supported");var k=this.symbols;k||(this.symbols=k={});for(var l=[],m=0,n=e.length;n>m;m++)l=l.concat(k[e[m]]);var o=new b(f,g,h);k[d]=j(a.huffman,a.refinement,l,a.numberOfNewSymbols,a.numberOfExportedSymbols,i,a.template,a.at,a.refinementTemplate,a.refinementAt,o)},onImmediateTextRegion:function(a,c,d,e,f){for(var g,h=a.info,i=this.symbols,j=[],m=0,n=c.length;n>m;m++)j=j.concat(i[c[m]]);var o=l(j.length),p=new b(d,e,f),q=k(a.huffman,a.refinement,h.width,h.height,a.defaultPixelValue,a.numberOfSymbolInstances,a.stripSize,j,o,a.transposed,a.dsOffset,a.referenceCorner,a.combinationOperator,g,a.refinementTemplate,a.refinementAt,p);this.drawBitmap(h,q)},onImmediateLosslessTextRegion:function(){this.onImmediateTextRegion.apply(this,arguments)}},w.prototype={parseChunks:function(a){return u(a)}},w}(),jd=(PDFJS.bidi=function(){function a(a){return 0!==(1&a)}function b(a){return 0===(1&a)}function c(a,b,c){for(var d=b,e=a.length;e>d;++d)if(a[d]!==c)return d;return d}function d(a,b,c,d){for(var e=b;c>e;++e)a[e]=d}function e(a,b,c){for(var d=b,e=c-1;e>d;++d,--e){var f=a[d];a[d]=a[e],a[e]=f}}function f(a,b,c){return{str:a,dir:c?"ttb":b?"ltr":"rtl"}}function g(g,l,m){var n=!0,o=g.length;if(0===o||m)return f(g,n,m);j.length=o,k.length=o;var p,q,r=0;for(p=0;o>p;++p){j[p]=g.charAt(p);var s=g.charCodeAt(p),t="L";255>=s?t=h[s]:s>=1424&&1524>=s?t="R":s>=1536&&1791>=s?t=i[255&s]:s>=1792&&2220>=s&&(t="AL"),"R"!==t&&"AL"!==t&&"AN"!==t||r++,k[p]=t}if(0===r)return n=!0,f(g,n);-1===l&&(.3>o/r?(n=!0,l=0):(n=!1,l=1));var u=[];for(p=0;o>p;++p)u[p]=l;var v=a(l)?"R":"L",w=v,x=w,y=w;for(p=0;o>p;++p)"NSM"===k[p]?k[p]=y:y=k[p];y=w;var z;for(p=0;o>p;++p)z=k[p],"EN"===z?k[p]="AL"===y?"AN":"EN":"R"!==z&&"L"!==z&&"AL"!==z||(y=z);for(p=0;o>p;++p)z=k[p],"AL"===z&&(k[p]="R");for(p=1;o-1>p;++p)"ES"===k[p]&&"EN"===k[p-1]&&"EN"===k[p+1]&&(k[p]="EN"),"CS"!==k[p]||"EN"!==k[p-1]&&"AN"!==k[p-1]||k[p+1]!==k[p-1]||(k[p]=k[p-1]);for(p=0;o>p;++p)if("EN"===k[p]){var A;for(A=p-1;A>=0&&"ET"===k[A];--A)k[A]="EN";for(A=p+1;o>A&&"ET"===k[A];--A)k[A]="EN"}for(p=0;o>p;++p)z=k[p],"WS"!==z&&"ES"!==z&&"ET"!==z&&"CS"!==z||(k[p]="ON");for(y=w,p=0;o>p;++p)z=k[p],"EN"===z?k[p]="L"===y?"L":"EN":"R"!==z&&"L"!==z||(y=z);for(p=0;o>p;++p)if("ON"===k[p]){var B=c(k,p+1,"ON"),C=w;p>0&&(C=k[p-1]);var D=x;o>B+1&&(D=k[B+1]),"L"!==C&&(C="R"),"L"!==D&&(D="R"),C===D&&d(k,p,B,C),p=B-1}for(p=0;o>p;++p)"ON"===k[p]&&(k[p]=v);for(p=0;o>p;++p)z=k[p],b(u[p])?"R"===z?u[p]+=1:"AN"!==z&&"EN"!==z||(u[p]+=2):"L"!==z&&"AN"!==z&&"EN"!==z||(u[p]+=1);var E,F=-1,G=99;for(p=0,q=u.length;q>p;++p)E=u[p],E>F&&(F=E),G>E&&a(E)&&(G=E);for(E=F;E>=G;--E){var H=-1;for(p=0,q=u.length;q>p;++p)u[p]=0&&(e(j,H,p),H=-1):0>H&&(H=p);H>=0&&e(j,H,u.length)}for(p=0,q=j.length;q>p;++p){var I=j[p];"<"!==I&&">"!==I||(j[p]="")}return f(j.join(""),n)}var h=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ON","CS","ON","CS","ON","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ON","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","ON","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],i=["AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL"],j=[],k=[]; +return g}(),function(a){function b(a){var b=3285377520;this.h1=a?4294967295&a:b,this.h2=a?4294967295&a:b}var c=4294901760,d=65535,e=!1;try{new Uint32Array(new Uint8Array(5).buffer,0,1)}catch(f){e=!0}return b.prototype={update:function(a){var b,f=e;if("string"==typeof a){var g=new Uint8Array(2*a.length),h=0;for(b=0;b=i?g[h++]=i:(g[h++]=i>>>8,g[h++]=255&i)}}else if(a instanceof Uint8Array)g=a,h=g.length;else{if(!("object"==typeof a&&"length"in a))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");g=a,h=g.length,f=!0}var j=h>>2,k=h-4*j,l=f?new la(g,j):new Uint32Array(g.buffer,0,j),m=0,n=0,o=this.h1,p=this.h2,q=3432918353,r=461845907,s=q&d,t=r&d;for(b=0;j>b;b++)1&b?(m=l[b],m=m*q&c|m*s&d,m=m<<15|m>>>17,m=m*r&c|m*t&d,o^=m,o=o<<13|o>>>19,o=5*o+3864292196):(n=l[b],n=n*q&c|n*s&d,n=n<<15|n>>>17,n=n*r&c|n*t&d,p^=n,p=p<<13|p>>>19,p=5*p+3864292196);switch(m=0,k){case 3:m^=g[4*j+2]<<16;case 2:m^=g[4*j+1]<<8;case 1:m^=g[4*j],m=m*q&c|m*s&d,m=m<<15|m>>>17,m=m*r&c|m*t&d,1&j?o^=m:p^=m}return this.h1=o,this.h2=p,this},hexdigest:function(){var a=this.h1,b=this.h2;a^=b>>>1,a=3981806797*a&c|36045*a&d,b=4283543511*b&c|(2950163797*(b<<16|a>>>16)&c)>>>16,a^=b>>>1,a=444984403*a&c|60499*a&d,b=3301882366*b&c|(3120437893*(b<<16|a>>>16)&c)>>>16,a^=b>>>1;for(var e=0,f=[a,b],g="";e>>0).toString(16);h.length<8;)h="0"+h;g+=h}return g}},b}())}.call("undefined"==typeof window?this:window),PDFJS.workerSrc||"undefined"==typeof document||(PDFJS.workerSrc=function(){"use strict";var a=document.body||document.getElementsByTagName("head")[0],b=a.lastChild.src;return b&&b.replace(/\.js$/i,".worker.js")}()),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;hc;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('
        ');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('
      • '),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")});var f=e.filter("[aria-selected=true]");f.length>0?f.first().trigger("mouseenter"):e.first().trigger("mouseenter")})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&d.setClasses()}),b.on("unselect",function(){b.isOpen()&&d.setClasses()}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html(''),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('
          '),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('
        • ×
        • ');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e0||0===c.length)){var d=a('×');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ç ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ç¢":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","ï¼¢":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","ï¼£":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","È»":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","ï¼¥":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ç´":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ä ":"G","Ǧ":"G","Ä¢":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","â±µ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","Ä°":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Ä®":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ä´":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ä¿":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ä»":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","â±¢":"L","â± ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","ï¼­":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","â±®":"M","Ɯ":"M","Ⓝ":"N","ï¼®":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","È ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","È®":"O","È°":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Æ ":"O","Ờ":"O","Ớ":"O","á» ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Æ¢":"OI","Ꝏ":"OO","È¢":"OU","Ⓟ":"P","ï¼°":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","â±£":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","ï¼±":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","ï¼²":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","ï¼³":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","á¹ ":"S","Å ":"S","Ṧ":"S","á¹¢":"S","Ṩ":"S","Ș":"S","Ş":"S","â±¾":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","ï¼´":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Å¢":"T","á¹°":"T","á¹®":"T","Ŧ":"T","Ƭ":"T","Æ®":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","ï¼µ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Å®":"U","Å°":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","á»®":"U","Ử":"U","á»°":"U","Ụ":"U","á¹²":"U","Ų":"U","Ṷ":"U","á¹´":"U","Ʉ":"U","Ⓥ":"V","V":"V","á¹¼":"V","á¹¾":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","ï¼·":"W","Ẁ":"W","Ẃ":"W","Å´":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","â±²":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","ï¼¹":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","á»´":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Å»":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","Ç¡":"a","ä":"a","ǟ":"a","ả":"a","Ã¥":"a","Ç»":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","â±¥":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","Ç£":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","È©":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","Ä¡":"g","ǧ":"g","Ä£":"g","Ç¥":"g","É ":"g","ꞡ":"g","áµ¹":"g","ꝿ":"g","ⓗ":"h","h":"h","Ä¥":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","É¥":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","Ä©":"i","Ä«":"i","Ä­":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","Ç°":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","Ç©":"k","ḳ":"k","Ä·":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","Å¿":"l","ł":"l","ƚ":"l","É«":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","È­":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","È«":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","Æ¡":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","Ç«":"o","Ç­":"o","ø":"o","Ç¿":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","Æ£":"oi","È£":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","Æ¥":"p","áµ½":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","á¹¥":"s","ŝ":"s","ṡ":"s","Å¡":"s","ṧ":"s","á¹£":"s","ṩ":"s","ș":"s","ş":"s","È¿":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","Å¥":"t","á¹­":"t","ț":"t","Å£":"t","á¹±":"t","ṯ":"t","ŧ":"t","Æ­":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","Å©":"u","á¹¹":"u","Å«":"u","á¹»":"u","Å­":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","Æ°":"u","ừ":"u","ứ":"u","ữ":"u","á»­":"u","á»±":"u","ụ":"u","á¹³":"u","ų":"u","á¹·":"u","á¹µ":"u","ʉ":"u","ⓥ":"v","v":"v","á¹½":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","â±³":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","Å·":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","á»·":"y","ẙ":"y", +"ỵ":"y","Æ´":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","È¥":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Î¥","Ϋ":"Î¥","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('
        • '),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a(""),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.topf.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this._sync=c.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",b._sync,!1)},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null, +this.results=null},e.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d;return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2.");var e=Array.prototype.slice.call(arguments,1);d=c[b].apply(c,e)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c}),angular.module("sprintf",[]).filter("sprintf",function(){return function(){return sprintf.apply(null,arguments)}}).filter("fmt",["$filter",function(a){return a("sprintf")}]).filter("vsprintf",function(){return function(a,b){return vsprintf(a,b)}}).filter("vfmt",["$filter",function(a){return a("vsprintf")}]),function(a,b){"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a():b.rangy=a()}(function(){function a(a,b){var c=typeof a[b];return c==u||!(c!=t||!a[b])||"unknown"==c}function b(a,b){return!(typeof a[b]!=t||!a[b])}function c(a,b){return typeof a[b]!=v}function d(a){return function(b,c){for(var d=c.length;d--;)if(!a(b,c[d]))return!1;return!0}}function e(a){return a&&A(a,z)&&C(a,y)}function f(a){return b(a,"body")?a.body:a.getElementsByTagName("body")[0]}function g(b){typeof console!=v&&a(console,"log")&&console.log(b)}function h(a,b){F&&b?alert(a):g(a)}function i(a){H.initialized=!0,H.supported=!1,h("Rangy is not supported in this environment. Reason: "+a,H.config.alertOnFail)}function j(a){h("Rangy warning: "+a,H.config.alertOnWarn)}function k(a){return a.message||a.description||String(a)}function l(){if(F&&!H.initialized){var b,c=!1,d=!1;a(document,"createRange")&&(b=document.createRange(),A(b,x)&&C(b,w)&&(c=!0));var h=f(document);if(!h||"body"!=h.nodeName.toLowerCase())return void i("No body element found");if(h&&a(h,"createTextRange")&&(b=h.createTextRange(),e(b)&&(d=!0)),!c&&!d)return void i("Neither Range nor TextRange are available");H.initialized=!0,H.features={implementsDomRange:c,implementsTextRange:d};var j,l;for(var m in E)(j=E[m])instanceof p&&j.init(j,H);for(var n=0,o=K.length;o>n;++n)try{K[n](H)}catch(q){l="Rangy init listener threw an exception. Continuing. Detail: "+k(q),g(l)}}}function m(a,b,c){c&&(a+=" in module "+c.name),H.warn("DEPRECATED: "+a+" is deprecated. Please use "+b+" instead.")}function n(a,b,c,d){a[b]=function(){return m(b,c,d),a[c].apply(a,G.toArray(arguments))}}function o(a){a=a||window,l();for(var b=0,c=L.length;c>b;++b)L[b](a)}function p(a,b,c){this.name=a,this.dependencies=b,this.initialized=!1,this.supported=!1,this.initializer=c}function q(a,b,c){var d=new p(a,b,function(b){if(!b.initialized){b.initialized=!0;try{c(H,b),b.supported=!0}catch(d){var e="Module '"+a+"' failed to load: "+k(d);g(e),d.stack&&g(d.stack)}}});return E[a]=d,d}function r(){}function s(){}var t="object",u="function",v="undefined",w=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],x=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],y=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],z=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],A=d(a),B=d(b),C=d(c),D=[].forEach?function(a,b){a.forEach(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)b(a[c],c)},E={},F=typeof window!=v&&typeof document!=v,G={isHostMethod:a,isHostObject:b,isHostProperty:c,areHostMethods:A,areHostObjects:B,areHostProperties:C,isTextRange:e,getBody:f,forEach:D},H={version:"1.3.0",initialized:!1,isBrowser:F,supported:!0,util:G,features:{},modules:E,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==v?!0:rangyAutoInitialize}};H.fail=i,H.warn=j;var I;({}).hasOwnProperty?(G.extend=I=function(a,b,c){var d,e;for(var f in b)b.hasOwnProperty(f)&&(d=a[f],e=b[f],c&&null!==d&&"object"==typeof d&&null!==e&&"object"==typeof e&&I(d,e,!0),a[f]=e);return b.hasOwnProperty("toString")&&(a.toString=b.toString),a},G.createOptions=function(a,b){var c={};return I(c,b),a&&I(c,a),c}):i("hasOwnProperty not supported"),F||i("Rangy can only run in a browser"),function(){var a;if(F){var b=document.createElement("div");b.appendChild(document.createElement("span"));var c=[].slice;try{1==c.call(b.childNodes,0)[0].nodeType&&(a=function(a){return c.call(a,0)})}catch(d){}}a||(a=function(a){for(var b=[],c=0,d=a.length;d>c;++c)b[c]=a[c];return b}),G.toArray=a}();var J;F&&(a(document,"addEventListener")?J=function(a,b,c){a.addEventListener(b,c,!1)}:a(document,"attachEvent")?J=function(a,b,c){a.attachEvent("on"+b,c)}:i("Document does not have required addEventListener or attachEvent method"),G.addListener=J);var K=[];G.deprecationNotice=m,G.createAliasForDeprecatedMethod=n,H.init=l,H.addInitListener=function(a){H.initialized?a(H):K.push(a)};var L=[];H.addShimListener=function(a){L.push(a)},F&&(H.shim=H.createMissingNativeApi=o,n(H,"createMissingNativeApi","shim")),p.prototype={init:function(){for(var a,b,c=this.dependencies||[],d=0,e=c.length;e>d;++d){if(b=c[d],a=E[b],!(a&&a instanceof p))throw new Error("required module '"+b+"' not found");if(a.init(),!a.supported)throw new Error("required module '"+b+"' not supported")}this.initializer(this)},fail:function(a){throw this.initialized=!0,this.supported=!1,new Error(a)},warn:function(a){H.warn("Module "+this.name+": "+a)},deprecationNotice:function(a,b){H.warn("DEPRECATED: "+a+" in module "+this.name+" is deprecated. Please use "+b+" instead")},createError:function(a){return new Error("Error in Rangy "+this.name+" module: "+a)}},H.createModule=function(a){var b,c;2==arguments.length?(b=arguments[1],c=[]):(b=arguments[2],c=arguments[1]);var d=q(a,c,b);H.initialized&&H.supported&&d.init()},H.createCoreModule=function(a,b,c){q(a,b,c)},H.RangePrototype=r,H.rangePrototype=new r,H.selectionPrototype=new s,H.createCoreModule("DomUtil",[],function(a,b){function c(a){var b;return typeof a.namespaceURI==F||null===(b=a.namespaceURI)||"http://www.w3.org/1999/xhtml"==b}function d(a){var b=a.parentNode;return 1==b.nodeType?b:null}function e(a){for(var b=0;a=a.previousSibling;)++b;return b}function f(a){switch(a.nodeType){case 7:case 10:return 0;case 3:case 8:return a.length;default:return a.childNodes.length}}function g(a,b){var c,d=[];for(c=a;c;c=c.parentNode)d.push(c);for(c=b;c;c=c.parentNode)if(K(d,c))return c;return null}function h(a,b,c){for(var d=c?b:b.parentNode;d;){if(d===a)return!0;d=d.parentNode}return!1}function i(a,b){return h(a,b,!0)}function j(a,b,c){for(var d,e=c?a:a.parentNode;e;){if(d=e.parentNode,d===b)return e;e=d}return null}function k(a){var b=a.nodeType;return 3==b||4==b||8==b}function l(a){if(!a)return!1;var b=a.nodeType;return 3==b||8==b}function m(a,b){var c=b.nextSibling,d=b.parentNode;return c?d.insertBefore(a,c):d.appendChild(a),a}function n(a,b,c){var d=a.cloneNode(!1);if(d.deleteData(0,b),a.deleteData(b,a.length-b),m(d,a),c)for(var f,g=0;f=c[g++];)f.node==a&&f.offset>b?(f.node=d,f.offset-=b):f.node==a.parentNode&&f.offset>e(a)&&++f.offset;return d}function o(a){if(9==a.nodeType)return a;if(typeof a.ownerDocument!=F)return a.ownerDocument;if(typeof a.document!=F)return a.document;if(a.parentNode)return o(a.parentNode);throw b.createError("getDocument: no document found for node")}function p(a){var c=o(a);if(typeof c.defaultView!=F)return c.defaultView;if(typeof c.parentWindow!=F)return c.parentWindow;throw b.createError("Cannot get a window object for node")}function q(a){if(typeof a.contentDocument!=F)return a.contentDocument;if(typeof a.contentWindow!=F)return a.contentWindow.document;throw b.createError("getIframeDocument: No Document object found for iframe element")}function r(a){if(typeof a.contentWindow!=F)return a.contentWindow;if(typeof a.contentDocument!=F)return a.contentDocument.defaultView;throw b.createError("getIframeWindow: No Window object found for iframe element")}function s(a){return a&&G.isHostMethod(a,"setTimeout")&&G.isHostObject(a,"document")}function t(a,b,c){var d;if(a?G.isHostProperty(a,"nodeType")?d=1==a.nodeType&&"iframe"==a.tagName.toLowerCase()?q(a):o(a):s(a)&&(d=a.document):d=document,!d)throw b.createError(c+"(): Parameter must be a Window object or DOM node");return d}function u(a){for(var b;b=a.parentNode;)a=b;return a}function v(a,c,d,f){var h,i,k,l,m;if(a==d)return c===f?0:f>c?-1:1;if(h=j(d,a,!0))return c<=e(h)?-1:1;if(h=j(a,d,!0))return e(h)[index:"+e(a)+",length:"+a.childNodes.length+"]["+(a.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return a.nodeName}function y(a){for(var b,c=o(a).createDocumentFragment();b=a.firstChild;)c.appendChild(b);return c}function z(a,b,c){var d=H(a),e=a.createElement("div");e.contentEditable=""+!!c,b&&(e.innerHTML=b);var f=d.firstChild;return f?d.insertBefore(e,f):d.appendChild(e),e}function A(a){return a.parentNode.removeChild(a)}function B(a){this.root=a,this._next=a}function C(a){return new B(a)}function D(a,b){this.node=a,this.offset=b}function E(a){this.code=this[a],this.codeName=a,this.message="DOMException: "+this.codeName}var F="undefined",G=a.util,H=G.getBody;G.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||b.fail("document missing a Node creation method"),G.isHostMethod(document,"getElementsByTagName")||b.fail("document missing getElementsByTagName method");var I=document.createElement("div");G.areHostMethods(I,["insertBefore","appendChild","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"]))||b.fail("Incomplete Element implementation"),G.isHostProperty(I,"innerHTML")||b.fail("Element is missing innerHTML property");var J=document.createTextNode("test");G.areHostMethods(J,["splitText","deleteData","insertData","appendData","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"])||!G.areHostProperties(J,["data"]))||b.fail("Incomplete Text Node implementation");var K=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1},L=!1;!function(){var b=document.createElement("b");b.innerHTML="1";var c=b.firstChild;b.innerHTML="
          ",L=w(c),a.features.crashyTextNodes=L}();var M;typeof window.getComputedStyle!=F?M=function(a,b){return p(a).getComputedStyle(a,null)[b]}:typeof document.documentElement.currentStyle!=F?M=function(a,b){return a.currentStyle?a.currentStyle[b]:""}:b.fail("No means of obtaining computed style properties found"),B.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var a,b,c=this._current=this._next;if(this._current)if(a=c.firstChild)this._next=a;else{for(b=null;c!==this.root&&!(b=c.nextSibling);)c=c.parentNode;this._next=b}return this._current},detach:function(){this._current=this._next=this.root=null}},D.prototype={equals:function(a){return!!a&&this.node===a.node&&this.offset==a.offset},inspect:function(){return"[DomPosition("+x(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},E.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},E.prototype.toString=function(){return this.message},a.dom={arrayContains:K,isHtmlNamespace:c,parentElement:d,getNodeIndex:e,getNodeLength:f,getCommonAncestor:g,isAncestorOf:h,isOrIsAncestorOf:i,getClosestAncestorIn:j,isCharacterDataNode:k,isTextOrCommentNode:l,insertAfter:m,splitDataNode:n,getDocument:o,getWindow:p,getIframeWindow:r,getIframeDocument:q,getBody:H,isWindow:s,getContentDocument:t,getRootContainer:u,comparePoints:v,isBrokenNode:w,inspectNode:x,getComputedStyleProperty:M,createTestElement:z,removeNode:A,fragmentFromNodeChildren:y,createIterator:C,DomPosition:D},a.DOMException=E}),H.createCoreModule("DomRange",["DomUtil"],function(a,b){function c(a,b){return 3!=a.nodeType&&(P(a,b.startContainer)||P(a,b.endContainer))}function d(a){return a.document||Q(a.startContainer)}function e(a){return W(a.startContainer)}function f(a){return new L(a.parentNode,O(a))}function g(a){return new L(a.parentNode,O(a)+1)}function h(a,b,c){var d=11==a.nodeType?a.firstChild:a;return N(b)?c==b.length?J.insertAfter(a,b):b.parentNode.insertBefore(a,0==c?b:S(b,c)):c>=b.childNodes.length?b.appendChild(a):b.insertBefore(a,b.childNodes[c]),d}function i(a,b,c){if(z(a),z(b),d(b)!=d(a))throw new M("WRONG_DOCUMENT_ERR");var e=R(a.startContainer,a.startOffset,b.endContainer,b.endOffset),f=R(a.endContainer,a.endOffset,b.startContainer,b.startOffset);return c?0>=e&&f>=0:0>e&&f>0}function j(a){for(var b,c,e,f=d(a.range).createDocumentFragment();c=a.next();){if(b=a.isPartiallySelectedSubtree(),c=c.cloneNode(!b),b&&(e=a.getSubtreeIterator(),c.appendChild(j(e)),e.detach()),10==c.nodeType)throw new M("HIERARCHY_REQUEST_ERR");f.appendChild(c)}return f}function k(a,b,c){var d,e;c=c||{stop:!1};for(var f,g;f=a.next();)if(a.isPartiallySelectedSubtree()){if(b(f)===!1)return void(c.stop=!0);if(g=a.getSubtreeIterator(),k(g,b,c),g.detach(),c.stop)return}else for(d=J.createIterator(f);e=d.next();)if(b(e)===!1)return void(c.stop=!0)}function l(a){for(var b;a.next();)a.isPartiallySelectedSubtree()?(b=a.getSubtreeIterator(),l(b),b.detach()):a.remove()}function m(a){for(var b,c,e=d(a.range).createDocumentFragment();b=a.next();){if(a.isPartiallySelectedSubtree()?(b=b.cloneNode(!1),c=a.getSubtreeIterator(),b.appendChild(m(c)),c.detach()):a.remove(),10==b.nodeType)throw new M("HIERARCHY_REQUEST_ERR");e.appendChild(b)}return e}function n(a,b,c){var d,e=!(!b||!b.length),f=!!c;e&&(d=new RegExp("^("+b.join("|")+")$"));var g=[];return k(new p(a,!1),function(b){if((!e||d.test(b.nodeType))&&(!f||c(b))){var h=a.startContainer;if(b!=h||!N(h)||a.startOffset!=h.length){var i=a.endContainer;b==i&&N(i)&&0==a.endOffset||g.push(b)}}}),g}function o(a){var b="undefined"==typeof a.getName?"Range":a.getName();return"["+b+"("+J.inspectNode(a.startContainer)+":"+a.startOffset+", "+J.inspectNode(a.endContainer)+":"+a.endOffset+")]"}function p(a,b){if(this.range=a,this.clonePartiallySelectedTextNodes=b,!a.collapsed){this.sc=a.startContainer,this.so=a.startOffset,this.ec=a.endContainer,this.eo=a.endOffset;var c=a.commonAncestorContainer;this.sc===this.ec&&N(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==c||N(this.sc)?T(this.sc,c,!0):this.sc.childNodes[this.so],this._last=this.ec!==c||N(this.ec)?T(this.ec,c,!0):this.ec.childNodes[this.eo-1])}}function q(a){return function(b,c){for(var d,e=c?b:b.parentNode;e;){if(d=e.nodeType,V(a,d))return e;e=e.parentNode}return null}}function r(a,b){if(ea(a,b))throw new M("INVALID_NODE_TYPE_ERR")}function s(a,b){if(!V(b,a.nodeType))throw new M("INVALID_NODE_TYPE_ERR")}function t(a,b){if(0>b||b>(N(a)?a.length:a.childNodes.length))throw new M("INDEX_SIZE_ERR")}function u(a,b){if(ca(a,!0)!==ca(b,!0))throw new M("WRONG_DOCUMENT_ERR")}function v(a){if(da(a,!0))throw new M("NO_MODIFICATION_ALLOWED_ERR")}function w(a,b){if(!a)throw new M(b)}function x(a,b){return b<=(N(a)?a.length:a.childNodes.length)}function y(a){return!!a.startContainer&&!!a.endContainer&&!(X&&(J.isBrokenNode(a.startContainer)||J.isBrokenNode(a.endContainer)))&&W(a.startContainer)==W(a.endContainer)&&x(a.startContainer,a.startOffset)&&x(a.endContainer,a.endOffset)}function z(a){if(!y(a))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+a.inspect()+")")}function A(a,b){z(a);var c=a.startContainer,d=a.startOffset,e=a.endContainer,f=a.endOffset,g=c===e;N(e)&&f>0&&f0&&d=O(c)&&f++,d=0),a.setStartAndEnd(c,d,e,f)}function B(a){z(a);var b=a.commonAncestorContainer.parentNode.cloneNode(!1);return b.appendChild(a.cloneContents()),b.innerHTML}function C(a){a.START_TO_START=ka,a.START_TO_END=la,a.END_TO_END=ma,a.END_TO_START=na,a.NODE_BEFORE=oa,a.NODE_AFTER=pa,a.NODE_BEFORE_AND_AFTER=qa,a.NODE_INSIDE=ra}function D(a){C(a),C(a.prototype)}function E(a,b){return function(){z(this);var c,d,e=this.startContainer,f=this.startOffset,h=this.commonAncestorContainer,i=new p(this,!0);e!==h&&(c=T(e,h,!0),d=g(c),e=d.node,f=d.offset),k(i,v),i.reset();var j=a(i);return i.detach(),b(this,e,f,e,f),j}}function F(b,d){function e(a,b){return function(c){s(c,Z),s(W(c),$);var d=(a?f:g)(c);(b?h:i)(this,d.node,d.offset)}}function h(a,b,c){var e=a.endContainer,f=a.endOffset;b===a.startContainer&&c===a.startOffset||(W(b)==W(e)&&1!=R(b,c,e,f)||(e=b,f=c),d(a,b,c,e,f))}function i(a,b,c){var e=a.startContainer,f=a.startOffset;b===a.endContainer&&c===a.endOffset||(W(b)==W(e)&&-1!=R(b,c,e,f)||(e=b,f=c),d(a,e,f,b,c))}var j=function(){};j.prototype=a.rangePrototype,b.prototype=new j,K.extend(b.prototype,{setStart:function(a,b){r(a,!0),t(a,b),h(this,a,b)},setEnd:function(a,b){r(a,!0),t(a,b),i(this,a,b)},setStartAndEnd:function(){var a=arguments,b=a[0],c=a[1],e=b,f=c;switch(a.length){case 3:f=a[2];break;case 4:e=a[2],f=a[3]}d(this,b,c,e,f)},setBoundary:function(a,b,c){this["set"+(c?"Start":"End")](a,b)},setStartBefore:e(!0,!0),setStartAfter:e(!1,!0),setEndBefore:e(!0,!1),setEndAfter:e(!1,!1),collapse:function(a){z(this),a?d(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):d(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(a){r(a,!0),d(this,a,0,a,U(a))},selectNode:function(a){r(a,!1),s(a,Z);var b=f(a),c=g(a);d(this,b.node,b.offset,c.node,c.offset)},extractContents:E(m,d),deleteContents:E(l,d),canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},splitBoundaries:function(){A(this)},splitBoundariesPreservingPositions:function(a){A(this,a)},normalizeBoundaries:function(){z(this);var a,b=this.startContainer,c=this.startOffset,e=this.endContainer,f=this.endOffset,g=function(a){var b=a.nextSibling;b&&b.nodeType==a.nodeType&&(e=a,f=a.length,a.appendData(b.data),Y(b))},h=function(a){var d=a.previousSibling;if(d&&d.nodeType==a.nodeType){b=a;var g=a.length;if(c=d.length,a.insertData(0,d.data),Y(d),b==e)f+=c,e=b;else if(e==a.parentNode){var h=O(a);f==h?(e=a,f=g):f>h&&f--}}},i=!0;if(N(e))f==e.length?g(e):0==f&&(a=e.previousSibling,a&&a.nodeType==e.nodeType&&(f=a.length,b==e&&(i=!1),a.appendData(e.data),Y(e),e=a));else{if(f>0){var j=e.childNodes[f-1];j&&N(j)&&g(j)}i=!this.collapsed}if(i){if(N(b))0==c?h(b):c==b.length&&(a=b.nextSibling,a&&a.nodeType==b.nodeType&&(e==a&&(e=b,f+=b.length),b.appendData(a.data),Y(a)));else if(cx",ga=3==fa.firstChild.nodeType}catch(ha){}a.features.htmlParsingConforms=ga;var ia=ga?function(a){var b=this.startContainer,c=Q(b);if(!b)throw new M("INVALID_STATE_ERR");var d=null;return 1==b.nodeType?d=b:N(b)&&(d=J.parentElement(b)),d=null===d||"HTML"==d.nodeName&&J.isHtmlNamespace(Q(d).documentElement)&&J.isHtmlNamespace(d)?c.createElement("body"):d.cloneNode(!1),d.innerHTML=a,J.fragmentFromNodeChildren(d)}:function(a){var b=d(this),c=b.createElement("body");return c.innerHTML=a,J.fragmentFromNodeChildren(c)},ja=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ka=0,la=1,ma=2,na=3,oa=0,pa=1,qa=2,ra=3;K.extend(a.rangePrototype,{compareBoundaryPoints:function(a,b){z(this),u(this.startContainer,b.startContainer);var c,d,e,f,g=a==na||a==ka?"start":"end",h=a==la||a==ka?"start":"end";return c=this[g+"Container"],d=this[g+"Offset"],e=b[h+"Container"],f=b[h+"Offset"],R(c,d,e,f)},insertNode:function(a){if(z(this),s(a,aa),v(this.startContainer),P(a,this.startContainer))throw new M("HIERARCHY_REQUEST_ERR");var b=h(a,this.startContainer,this.startOffset);this.setStartBefore(b)},cloneContents:function(){z(this);var a,b;if(this.collapsed)return d(this).createDocumentFragment();if(this.startContainer===this.endContainer&&N(this.startContainer))return a=this.startContainer.cloneNode(!0),a.data=a.data.slice(this.startOffset,this.endOffset),b=d(this).createDocumentFragment(),b.appendChild(a),b;var c=new p(this,!0);return a=j(c),c.detach(),a},canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},surroundContents:function(a){if(s(a,ba),!this.canSurroundContents())throw new M("INVALID_STATE_ERR");var b=this.extractContents();if(a.hasChildNodes())for(;a.lastChild;)a.removeChild(a.lastChild);h(a,this.startContainer,this.startOffset),a.appendChild(b),this.selectNode(a)},cloneRange:function(){z(this);for(var a,b=new I(d(this)),c=ja.length;c--;)a=ja[c],b[a]=this[a];return b},toString:function(){z(this);var a=this.startContainer;if(a===this.endContainer&&N(a))return 3==a.nodeType||4==a.nodeType?a.data.slice(this.startOffset,this.endOffset):"";var b=[],c=new p(this,!0);return k(c,function(a){3!=a.nodeType&&4!=a.nodeType||b.push(a.data)}),c.detach(),b.join("")},compareNode:function(a){z(this);var b=a.parentNode,c=O(a);if(!b)throw new M("NOT_FOUND_ERR");var d=this.comparePoint(b,c),e=this.comparePoint(b,c+1);return 0>d?e>0?qa:oa:e>0?pa:ra},comparePoint:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)<0?-1:R(a,b,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:ia,toHtml:function(){return B(this)},intersectsNode:function(a,b){if(z(this),W(a)!=e(this))return!1;var c=a.parentNode,d=O(a);if(!c)return!0;var f=R(c,d,this.endContainer,this.endOffset),g=R(c,d+1,this.startContainer,this.startOffset);return b?0>=f&&g>=0:0>f&&g>0},isPointInRange:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)>=0&&R(a,b,this.endContainer,this.endOffset)<=0},intersectsRange:function(a){return i(this,a,!1)},intersectsOrTouchesRange:function(a){return i(this,a,!0)},intersection:function(a){if(this.intersectsRange(a)){var b=R(this.startContainer,this.startOffset,a.startContainer,a.startOffset),c=R(this.endContainer,this.endOffset,a.endContainer,a.endOffset),d=this.cloneRange();return-1==b&&d.setStart(a.startContainer,a.startOffset),1==c&&d.setEnd(a.endContainer,a.endOffset),d}return null},union:function(a){if(this.intersectsOrTouchesRange(a)){var b=this.cloneRange();return-1==R(a.startContainer,a.startOffset,this.startContainer,this.startOffset)&&b.setStart(a.startContainer,a.startOffset),1==R(a.endContainer,a.endOffset,this.endContainer,this.endOffset)&&b.setEnd(a.endContainer,a.endOffset),b}throw new M("Ranges do not intersect")},containsNode:function(a,b){return b?this.intersectsNode(a,!1):this.compareNode(a)==ra},containsNodeContents:function(a){return this.comparePoint(a,0)>=0&&this.comparePoint(a,U(a))<=0},containsRange:function(a){var b=this.intersection(a);return null!==b&&a.equals(b)},containsNodeText:function(a){var b=this.cloneRange();b.selectNode(a);var c=b.getNodes([3]);if(c.length>0){b.setStart(c[0],0);var d=c.pop();return b.setEnd(d,d.length),this.containsRange(b)}return this.containsNodeContents(a)},getNodes:function(a,b){return z(this),n(this,a,b)},getDocument:function(){return d(this)},collapseBefore:function(a){this.setEndBefore(a),this.collapse(!1)},collapseAfter:function(a){this.setStartAfter(a),this.collapse(!0)},getBookmark:function(b){var c=d(this),e=a.createRange(c);b=b||J.getBody(c),e.selectNodeContents(b);var f=this.intersection(e),g=0,h=0;return f&&(e.setEnd(f.startContainer,f.startOffset),g=e.toString().length,h=g+f.toString().length),{start:g,end:h,containerNode:b}},moveToBookmark:function(a){var b=a.containerNode,c=0;this.setStart(b,0),this.collapse(!0);for(var d,e,f,g,h=[b],i=!1,j=!1;!j&&(d=h.pop());)if(3==d.nodeType)e=c+d.length,!i&&a.start>=c&&a.start<=e&&(this.setStart(d,a.start-c),i=!0),i&&a.end>=c&&a.end<=e&&(this.setEnd(d,a.end-c),j=!0),c=e;else for(g=d.childNodes,f=g.length;f--;)h.push(g[f])},getName:function(){return"DomRange"},equals:function(a){return I.rangesEqual(this,a)},isValid:function(){return y(this)},inspect:function(){return o(this)},detach:function(){}}),F(I,H),K.extend(I,{rangeProperties:ja,RangeIterator:p,copyComparisonConstants:D,createPrototypeRange:F,inspect:o,toHtml:B,getRangeDocument:d,rangesEqual:function(a,b){return a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===b.endOffset}}),a.DomRange=I}),H.createCoreModule("WrappedRange",["DomRange"],function(a,b){var c,d,e=a.dom,f=a.util,g=e.DomPosition,h=a.DomRange,i=e.getBody,j=e.getContentDocument,k=e.isCharacterDataNode;if(a.features.implementsDomRange&&!function(){function d(a){for(var b,c=m.length;c--;)b=m[c],a[b]=a.nativeRange[b];a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset}function g(a,b,c,d,e){var f=a.startContainer!==b||a.startOffset!=c,g=a.endContainer!==d||a.endOffset!=e,h=!a.equals(a.nativeRange);(f||g||h)&&(a.setEnd(d,e),a.setStart(b,c))}var k,l,m=h.rangeProperties;c=function(a){if(!a)throw b.createError("WrappedRange: Range must be specified");this.nativeRange=a,d(this)},h.createPrototypeRange(c,g),k=c.prototype,k.selectNode=function(a){this.nativeRange.selectNode(a),d(this)},k.cloneContents=function(){return this.nativeRange.cloneContents()},k.surroundContents=function(a){this.nativeRange.surroundContents(a),d(this)},k.collapse=function(a){this.nativeRange.collapse(a),d(this)},k.cloneRange=function(){return new c(this.nativeRange.cloneRange())},k.refresh=function(){d(this)},k.toString=function(){return this.nativeRange.toString()};var n=document.createTextNode("test");i(document).appendChild(n);var o=document.createRange();o.setStart(n,0),o.setEnd(n,0);try{o.setStart(n,1),k.setStart=function(a,b){this.nativeRange.setStart(a,b),d(this)},k.setEnd=function(a,b){this.nativeRange.setEnd(a,b),d(this)},l=function(a){return function(b){this.nativeRange[a](b),d(this)}}}catch(p){k.setStart=function(a,b){try{this.nativeRange.setStart(a,b)}catch(c){this.nativeRange.setEnd(a,b),this.nativeRange.setStart(a,b)}d(this)},k.setEnd=function(a,b){try{this.nativeRange.setEnd(a,b)}catch(c){this.nativeRange.setStart(a,b),this.nativeRange.setEnd(a,b)}d(this)},l=function(a,b){return function(c){try{this.nativeRange[a](c)}catch(e){this.nativeRange[b](c),this.nativeRange[a](c)}d(this)}}}k.setStartBefore=l("setStartBefore","setEndBefore"),k.setStartAfter=l("setStartAfter","setEndAfter"),k.setEndBefore=l("setEndBefore","setStartBefore"),k.setEndAfter=l("setEndAfter","setStartAfter"),k.selectNodeContents=function(a){this.setStartAndEnd(a,0,e.getNodeLength(a))},o.selectNodeContents(n),o.setEnd(n,3);var q=document.createRange();q.selectNodeContents(n),q.setEnd(n,4),q.setStart(n,2),-1==o.compareBoundaryPoints(o.START_TO_END,q)&&1==o.compareBoundaryPoints(o.END_TO_START,q)?k.compareBoundaryPoints=function(a,b){return b=b.nativeRange||b,a==b.START_TO_END?a=b.END_TO_START:a==b.END_TO_START&&(a=b.START_TO_END),this.nativeRange.compareBoundaryPoints(a,b)}:k.compareBoundaryPoints=function(a,b){return this.nativeRange.compareBoundaryPoints(a,b.nativeRange||b)};var r=document.createElement("div");r.innerHTML="123";var s=r.firstChild,t=i(document);t.appendChild(r),o.setStart(s,1),o.setEnd(s,2),o.deleteContents(),"13"==s.data&&(k.deleteContents=function(){this.nativeRange.deleteContents(),d(this)},k.extractContents=function(){var a=this.nativeRange.extractContents();return d(this),a}),t.removeChild(r),t=null,f.isHostMethod(o,"createContextualFragment")&&(k.createContextualFragment=function(a){return this.nativeRange.createContextualFragment(a)}),i(document).removeChild(n),k.getName=function(){return"WrappedRange"},a.WrappedRange=c,a.createNativeRange=function(a){return a=j(a,b,"createNativeRange"),a.createRange()}}(),a.features.implementsTextRange){var l=function(a){var b=a.parentElement(),c=a.duplicate();c.collapse(!0);var d=c.parentElement();c=a.duplicate(),c.collapse(!1);var f=c.parentElement(),g=d==f?d:e.getCommonAncestor(d,f);return g==b?g:e.getCommonAncestor(b,g)},m=function(a){return 0==a.compareEndPoints("StartToEnd",a)},n=function(a,b,c,d,f){var h=a.duplicate();h.collapse(c);var i=h.parentElement();if(e.isOrIsAncestorOf(b,i)||(i=b), +!i.canHaveHTML){var j=new g(i.parentNode,e.getNodeIndex(i));return{boundaryPosition:j,nodeInfo:{nodeIndex:j.offset,containerElement:j.node}}}var l=e.getDocument(i).createElement("span");l.parentNode&&e.removeNode(l);for(var m,n,o,p,q,r=c?"StartToStart":"StartToEnd",s=f&&f.containerElement==i?f.nodeIndex:0,t=i.childNodes.length,u=t,v=u;;){if(v==t?i.appendChild(l):i.insertBefore(l,i.childNodes[v]),h.moveToElementText(l),m=h.compareEndPoints(r,a),0==m||s==u)break;if(-1==m){if(u==s+1)break;s=v}else u=u==s+1?s:v;v=Math.floor((s+u)/2),i.removeChild(l)}if(q=l.nextSibling,-1==m&&q&&k(q)){h.setEndPoint(c?"EndToStart":"EndToEnd",a);var w;if(/[\r\n]/.test(q.data)){var x=h.duplicate(),y=x.text.replace(/\r\n/g,"\r").length;for(w=x.moveStart("character",y);-1==(m=x.compareEndPoints("StartToEnd",x));)w++,x.moveStart("character",1)}else w=h.text.length;p=new g(q,w)}else n=(d||!c)&&l.previousSibling,o=(d||c)&&l.nextSibling,p=o&&k(o)?new g(o,0):n&&k(n)?new g(n,n.data.length):new g(i,e.getNodeIndex(l));return e.removeNode(l),{boundaryPosition:p,nodeInfo:{nodeIndex:v,containerElement:i}}},o=function(a,b){var c,d,f,g,h=a.offset,j=e.getDocument(a.node),l=i(j).createTextRange(),m=k(a.node);return m?(c=a.node,d=c.parentNode):(g=a.node.childNodes,c=hb;++b)if(!C.isAncestorOf(a[0],a[b]))return!1;return!0}function m(a){var c=a.getNodes();if(!l(c))throw b.createError("getSingleElementFromRange: range "+a.inspect()+" did not consist of a single element");return c[0]}function n(a){return!!a&&"undefined"!=typeof a.text}function o(a,b){var c=new G(b);a._ranges=[c],h(a,c,!1),a.rangeCount=1,a.isCollapsed=c.collapsed}function p(b){if(b._ranges.length=0,"None"==b.docSelection.type)j(b);else{var c=b.docSelection.createRange();if(n(c))o(b,c);else{b.rangeCount=c.length;for(var d,e=L(c.item(0)),f=0;fh;++h)g.add(d.item(h));try{g.add(e)}catch(j){throw b.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}g.select(),p(a)}function r(a,b,c){this.nativeSelection=a,this.docSelection=b,this._ranges=[],this.win=c,this.refresh()}function s(a){a.win=a.anchorNode=a.focusNode=a._ranges=null,a.rangeCount=a.anchorOffset=a.focusOffset=0,a.detached=!0}function t(a,b){for(var c,d,e=ba.length;e--;)if(c=ba[e],d=c.selection,"deleteAll"==b)s(d);else if(c.win==a)return"delete"==b?(ba.splice(e,1),!0):d;return"deleteAll"==b&&(ba.length=0),null}function u(a,c){for(var d,e=L(c[0].startContainer),f=M(e).createControlRange(),g=0,h=c.length;h>g;++g){d=m(c[g]);try{f.add(d)}catch(i){throw b.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}f.select(),p(a)}function v(a,b){if(a.win.document!=L(b))throw new H("WRONG_DOCUMENT_ERR")}function w(b){return function(c,d){var e;this.rangeCount?(e=this.getRangeAt(0),e["set"+(b?"Start":"End")](c,d)):(e=a.createRange(this.win.document),e.setStartAndEnd(c,d)),this.setSingleRange(e,this.isBackward())}}function x(a){var b=[],c=new I(a.anchorNode,a.anchorOffset),d=new I(a.focusNode,a.focusOffset),e="function"==typeof a.getName?a.getName():"Selection";if("undefined"!=typeof a.rangeCount)for(var f=0,g=a.rangeCount;g>f;++f)b[f]=F.inspect(a.getRangeAt(f));return"["+e+"(Ranges: "+b.join(", ")+")(anchor: "+c.inspect()+", focus: "+d.inspect()+"]"}a.config.checkSelectionRanges=!0;var y,z,A="boolean",B="number",C=a.dom,D=a.util,E=D.isHostMethod,F=a.DomRange,G=a.WrappedRange,H=a.DOMException,I=C.DomPosition,J=a.features,K="Control",L=C.getDocument,M=C.getBody,N=F.rangesEqual,O=E(window,"getSelection"),P=D.isHostObject(document,"selection");J.implementsWinGetSelection=O,J.implementsDocSelection=P;var Q=P&&(!O||a.config.preferTextRange);if(Q)y=f,a.isSelectionValid=function(a){var b=d(a,"isSelectionValid").document,c=b.selection;return"None"!=c.type||L(c.createRange().parentElement())==b};else{if(!O)return b.fail("Neither document.selection or window.getSelection() detected."),!1;y=e,a.isSelectionValid=function(){return!0}}a.getNativeSelection=y;var R=y();if(!R)return b.fail("Native selection was null (possibly issue 138?)"),!1;var S=a.createNativeRange(document),T=M(document),U=D.areHostProperties(R,["anchorNode","focusNode","anchorOffset","focusOffset"]);J.selectionHasAnchorAndFocus=U;var V=E(R,"extend");J.selectionHasExtend=V;var W=typeof R.rangeCount==B;J.selectionHasRangeCount=W;var X=!1,Y=!0,Z=V?function(b,c){var d=F.getRangeDocument(c),e=a.createRange(d);e.collapseToPoint(c.endContainer,c.endOffset),b.addRange(k(e)),b.extend(c.startContainer,c.startOffset)}:null;D.areHostMethods(R,["addRange","getRangeAt","removeAllRanges"])&&typeof R.rangeCount==B&&J.implementsDomRange&&!function(){var b=window.getSelection();if(b){for(var c=b.rangeCount,d=c>1,e=[],f=g(b),h=0;c>h;++h)e[h]=b.getRangeAt(h);var i=C.createTestElement(document,"",!1),j=i.appendChild(document.createTextNode("   ")),k=document.createRange();if(k.setStart(j,1),k.collapse(!0),b.removeAllRanges(),b.addRange(k),Y=1==b.rangeCount,b.removeAllRanges(),!d){var l=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(l&&parseInt(l[1])>=36)X=!1;else{var m=k.cloneRange();k.setStart(j,0),m.setEnd(j,3),m.setStart(j,2),b.addRange(k),b.addRange(m),X=2==b.rangeCount}}for(C.removeNode(i),b.removeAllRanges(),h=0;c>h;++h)0==h&&f?Z?Z(b,e[h]):(a.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),b.addRange(e[h])):b.addRange(e[h])}}(),J.selectionSupportsMultipleRanges=X,J.collapsedNonEditableSelectionsSupported=Y;var $,_=!1;T&&E(T,"createControlRange")&&($=T.createControlRange(),D.areHostProperties($,["item","add"])&&(_=!0)),J.implementsControlRange=_,z=U?function(a){return a.anchorNode===a.focusNode&&a.anchorOffset===a.focusOffset}:function(a){return a.rangeCount?a.getRangeAt(a.rangeCount-1).collapsed:!1};var aa;E(R,"getRangeAt")?aa=function(a,b){try{return a.getRangeAt(b)}catch(c){return null}}:U&&(aa=function(b){var c=L(b.anchorNode),d=a.createRange(c);return d.setStartAndEnd(b.anchorNode,b.anchorOffset,b.focusNode,b.focusOffset),d.collapsed!==this.isCollapsed&&d.setStartAndEnd(b.focusNode,b.focusOffset,b.anchorNode,b.anchorOffset),d}),r.prototype=a.selectionPrototype;var ba=[],ca=function(a){if(a&&a instanceof r)return a.refresh(),a;a=d(a,"getNativeSelection");var b=t(a),c=y(a),e=P?f(a):null;return b?(b.nativeSelection=c,b.docSelection=e,b.refresh()):(b=new r(c,e,a),ba.push({win:a,selection:b})),b};a.getSelection=ca,D.createAliasForDeprecatedMethod(a,"getIframeSelection","getSelection");var da=r.prototype;if(!Q&&U&&D.areHostMethods(R,["removeAllRanges","addRange"])){da.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),j(this)};var ea=function(a,b){Z(a.nativeSelection,b),a.refresh()};W?da.addRange=function(b,d){if(_&&P&&this.docSelection.type==K)q(this,b);else if(c(d)&&V)ea(this,b);else{var e;X?e=this.rangeCount:(this.removeAllRanges(),e=0);var f=k(b).cloneRange();try{this.nativeSelection.addRange(f)}catch(g){}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==e+1){if(a.config.checkSelectionRanges){var i=aa(this.nativeSelection,this.rangeCount-1);i&&!N(i,b)&&(b=new G(i))}this._ranges[this.rangeCount-1]=b,h(this,b,ha(this.nativeSelection)),this.isCollapsed=z(this)}else this.refresh()}}:da.addRange=function(a,b){c(b)&&V?ea(this,a):(this.nativeSelection.addRange(k(a)),this.refresh())},da.setRanges=function(a){if(_&&P&&a.length>1)u(this,a);else{this.removeAllRanges();for(var b=0,c=a.length;c>b;++b)this.addRange(a[b])}}}else{if(!(E(R,"empty")&&E(S,"select")&&_&&Q))return b.fail("No means of selecting a Range or TextRange was found"),!1;da.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var a;if(this.anchorNode)a=L(this.anchorNode);else if(this.docSelection.type==K){var b=this.docSelection.createRange();b.length&&(a=L(b.item(0)))}if(a){var c=M(a).createTextRange();c.select(),this.docSelection.empty()}}}catch(d){}j(this)},da.addRange=function(b){this.docSelection.type==K?q(this,b):(a.WrappedTextRange.rangeToTextRange(b).select(),this._ranges[0]=b,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,h(this,b,!1))},da.setRanges=function(a){this.removeAllRanges();var b=a.length;b>1?u(this,a):b&&this.addRange(a[0])}}da.getRangeAt=function(a){if(0>a||a>=this.rangeCount)throw new H("INDEX_SIZE_ERR");return this._ranges[a].cloneRange()};var fa;if(Q)fa=function(b){var c;a.isSelectionValid(b.win)?c=b.docSelection.createRange():(c=M(b.win.document).createTextRange(),c.collapse(!0)),b.docSelection.type==K?p(b):n(c)?o(b,c):j(b)};else if(E(R,"getRangeAt")&&typeof R.rangeCount==B)fa=function(b){if(_&&P&&b.docSelection.type==K)p(b);else if(b._ranges.length=b.rangeCount=b.nativeSelection.rangeCount,b.rangeCount){for(var c=0,d=b.rangeCount;d>c;++c)b._ranges[c]=new a.WrappedRange(b.nativeSelection.getRangeAt(c));h(b,b._ranges[b.rangeCount-1],ha(b.nativeSelection)),b.isCollapsed=z(b)}else j(b)};else{if(!U||typeof R.isCollapsed!=A||typeof S.collapsed!=A||!J.implementsDomRange)return b.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;fa=function(a){var b,c=a.nativeSelection;c.anchorNode?(b=aa(c,0),a._ranges=[b],a.rangeCount=1,i(a),a.isCollapsed=z(a)):j(a)}}da.refresh=function(a){var b=a?this._ranges.slice(0):null,c=this.anchorNode,d=this.anchorOffset;if(fa(this),a){var e=b.length;if(e!=this._ranges.length)return!0;if(this.anchorNode!=c||this.anchorOffset!=d)return!0;for(;e--;)if(!N(b[e],this._ranges[e]))return!0;return!1}};var ga=function(a,b){var c=a.getAllRanges();a.removeAllRanges();for(var d=0,e=c.length;e>d;++d)N(b,c[d])||a.addRange(c[d]);a.rangeCount||j(a)};_&&P?da.removeRange=function(a){if(this.docSelection.type==K){for(var b,c=this.docSelection.createRange(),d=m(a),e=L(c.item(0)),f=M(e).createControlRange(),g=!1,h=0,i=c.length;i>h;++h)b=c.item(h),b!==d||g?f.add(c.item(h)):g=!0;f.select(),p(this)}else ga(this,a)}:da.removeRange=function(a){ga(this,a)};var ha;!Q&&U&&J.implementsDomRange?(ha=g,da.isBackward=function(){return ha(this)}):ha=da.isBackward=function(){return!1},da.isBackwards=da.isBackward,da.toString=function(){for(var a=[],b=0,c=this.rangeCount;c>b;++b)a[b]=""+this._ranges[b];return a.join("")},da.collapse=function(b,c){v(this,b);var d=a.createRange(b);d.collapseToPoint(b,c),this.setSingleRange(d),this.isCollapsed=!0},da.collapseToStart=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[0];this.collapse(a.startContainer,a.startOffset)},da.collapseToEnd=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[this.rangeCount-1];this.collapse(a.endContainer,a.endOffset)},da.selectAllChildren=function(b){v(this,b);var c=a.createRange(b);c.selectNodeContents(b),this.setSingleRange(c)},da.deleteFromDocument=function(){if(_&&P&&this.docSelection.type==K){for(var a,b=this.docSelection.createRange();b.length;)a=b.item(0),b.remove(a),C.removeNode(a);this.refresh()}else if(this.rangeCount){var c=this.getAllRanges();if(c.length){this.removeAllRanges();for(var d=0,e=c.length;e>d;++d)c[d].deleteContents();this.addRange(c[e-1])}}},da.eachRange=function(a,b){for(var c=0,d=this._ranges.length;d>c;++c)if(a(this.getRangeAt(c)))return b},da.getAllRanges=function(){var a=[];return this.eachRange(function(b){a.push(b)}),a},da.setSingleRange=function(a,b){this.removeAllRanges(),this.addRange(a,b)},da.callMethodOnEachRange=function(a,b){var c=[];return this.eachRange(function(d){c.push(d[a].apply(d,b||[]))}),c},da.setStart=w(!0),da.setEnd=w(!1),a.rangePrototype.select=function(a){ca(this.getDocument()).setSingleRange(this,a)},da.changeEachRange=function(a){var b=[],c=this.isBackward();this.eachRange(function(c){a(c),b.push(c)}),this.removeAllRanges(),c&&1==b.length?this.addRange(b[0],"backward"):this.setRanges(b)},da.containsNode=function(a,b){return this.eachRange(function(c){return c.containsNode(a,b)},!0)||!1},da.getBookmark=function(a){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[a])}},da.moveToBookmark=function(b){for(var c,d,e=[],f=0;c=b.rangeBookmarks[f++];)d=a.createRange(this.win),d.moveToBookmark(c),e.push(d);b.backward?this.setSingleRange(e[0],"backward"):this.setRanges(e)},da.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},da.restoreRanges=function(a){this.removeAllRanges();for(var b,c=0;b=a.ranges[c];++c)this.addRange(b,a.backward&&0==c)},da.toHtml=function(){var a=[];return this.eachRange(function(b){a.push(F.toHtml(b))}),a.join("")},J.implementsTextRange&&(da.getNativeTextRange=function(){var c;if(c=this.docSelection){var d=c.createRange();if(n(d))return d;throw b.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return a.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw b.createError("getNativeTextRange: selection contains no range")}),da.getName=function(){return"WrappedSelection"},da.inspect=function(){return x(this)},da.detach=function(){t(this.win,"delete"),s(this)},r.detachAll=function(){t(null,"deleteAll")},r.inspect=x,r.isDirectionBackward=c,a.Selection=r,a.selectionPrototype=da,a.addShimListener(function(a){"undefined"==typeof a.getSelection&&(a.getSelection=function(){return ca(a)}),a=null})});var M=!1,N=function(a){M||(M=!0,!H.initialized&&H.config.autoInitialize&&l())};return F&&("complete"==document.readyState?N():(a(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",N,!1),J(window,"load",N))),H},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("ClassApplier",["WrappedSelection"],function(a,b){function c(a,b){for(var c in a)if(a.hasOwnProperty(c)&&b(c,a[c])===!1)return!1;return!0}function d(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function e(a,b){return!!a&&new RegExp("(?:^|\\s)"+b+"(?:\\s|$)").test(a)}function f(a,b){if("object"==typeof a.classList)return a.classList.contains(b);var c="string"==typeof a.className,d=c?a.className:a.getAttribute("class");return e(d,b)}function g(a,b){if("object"==typeof a.classList)a.classList.add(b);else{var c="string"==typeof a.className,d=c?a.className:a.getAttribute("class");d?e(d,b)||(d+=" "+b):d=b,c?a.className=d:a.setAttribute("class",d)}}function h(a){var b="string"==typeof a.className;return b?a.className:a.getAttribute("class")}function j(a){return a&&a.split(/\s+/).sort().join(" ")}function k(a){return j(h(a))}function l(a,b){return k(a)==k(b)}function m(a,b){for(var c=b.split(/\s+/),e=0,g=c.length;g>e;++e)if(!f(a,d(c[e])))return!1;return!0}function n(a){var b=a.parentNode;return b&&1==b.nodeType&&!/^(textarea|style|script|select|iframe)$/i.test(b.nodeName)}function o(a,b,c,d,e){var f=a.node,g=a.offset,h=f,i=g;f==d&&g>e&&++i,f!=b||g!=c&&g!=c+1||(h=d,i+=e-c),f==b&&g>c+1&&--i,a.node=h,a.offset=i}function p(a,b,c){a.node==b&&a.offset>c&&--a.offset}function q(a,b,c,d){-1==c&&(c=b.childNodes.length);var e=a.parentNode,f=L.getNodeIndex(a);P(d,function(a){o(a,e,f,b,c)}),b.childNodes.length==c?b.appendChild(a):b.insertBefore(a,b.childNodes[c])}function r(a,b){var c=a.parentNode,d=L.getNodeIndex(a);P(b,function(a){p(a,c,d)}),L.removeNode(a)}function s(a,b,c,d,e){for(var f,g=[];f=a.firstChild;)q(f,b,c++,e),g.push(f);return d&&r(a,e),g}function t(a,b){return s(a,a.parentNode,L.getNodeIndex(a),!0,b)}function u(a,b){var c=a.cloneRange();c.selectNodeContents(b);var d=c.intersection(a),e=d?d.toString():"";return""!=e}function v(a){for(var b,c=a.getNodes([3]),d=0;(b=c[d])&&!u(a,b);)++d;for(var e=c.length-1;(b=c[e])&&!u(a,b);)--e;return c.slice(d,e+1)}function w(a,b){if(a.attributes.length!=b.attributes.length)return!1;for(var c,d,e,f=0,g=a.attributes.length;g>f;++f)if(c=a.attributes[f],e=c.name,"class"!=e){if(d=b.attributes.getNamedItem(e),null===c!=(null===d))return!1;if(c.specified!=d.specified)return!1;if(c.specified&&c.nodeValue!==d.nodeValue)return!1}return!0}function x(a,b){for(var c,d=0,e=a.attributes.length;e>d;++d)if(c=a.attributes[d].name,(!b||!N(b,c))&&a.attributes[d].specified&&"class"!=c)return!0;return!1}function y(a){var b;return a&&1==a.nodeType&&((b=a.parentNode)&&9==b.nodeType&&"on"==b.designMode||U(a)&&!U(a.parentNode))}function z(a){return(U(a)||1!=a.nodeType&&U(a.parentNode))&&!y(a)}function A(a){return a&&1==a.nodeType&&!V.test(T(a,"display"))}function B(a){if(0==a.data.length)return!0;if(W.test(a.data))return!1;var b=T(a.parentNode,"whiteSpace");switch(b){case"pre":case"pre-wrap":case"-moz-pre-wrap":return!1;case"pre-line":if(/[\r\n]/.test(a.data))return!1}return A(a.previousSibling)||A(a.nextSibling)}function C(a){var b,c,d=[];for(b=0;c=a[b++];)d.push(new M(c.startContainer,c.startOffset),new M(c.endContainer,c.endOffset));return d}function D(a,b){for(var c,d,e,f=0,g=a.length;g>f;++f)c=a[f],d=b[2*f],e=b[2*f+1],c.setStartAndEnd(d.node,d.offset,e.node,e.offset)}function E(a,b){return L.isCharacterDataNode(a)?0==b?!!a.previousSibling:b==a.length?!!a.nextSibling:!0:b>0&&bg;++g)"*"==e[g]?k.applyToAnyTagName=!0:k.tagNames.push(e[g].toLowerCase());else k.tagNames=[k.elementTagName]}function K(a,b,c){return new J(a,b,c)}var L=a.dom,M=L.DomPosition,N=L.arrayContains,O=a.util,P=O.forEach,Q="span",R=O.isHostMethod(document,"createElementNS"),S=function(){function a(a,b,c){return b&&c?" ":""}return function(b,c){if("object"==typeof b.classList)b.classList.remove(c);else{var d="string"==typeof b.className,e=d?b.className:b.getAttribute("class");e=e.replace(new RegExp("(^|\\s)"+c+"(\\s|$)"),a),d?b.className=e:b.setAttribute("class",e)}}}(),T=L.getComputedStyleProperty,U=function(){var a=document.createElement("div");return"boolean"==typeof a.isContentEditable?function(a){return a&&1==a.nodeType&&a.isContentEditable}:function(a){return a&&1==a.nodeType&&"false"!=a.contentEditable?"true"==a.contentEditable||U(a.parentNode):!1}}(),V=/^inline(-block|-table)?$/i,W=/[^\r\n\t\f \u200B]/,X=H(!1),Y=H(!0);I.prototype={doMerge:function(a){var b=this.textNodes,c=b[0];if(b.length>1){var d,e=L.getNodeIndex(c),f=[],g=0;P(b,function(b,h){d=b.parentNode,h>0&&(d.removeChild(b),d.hasChildNodes()||L.removeNode(d),a&&P(a,function(a){a.node==b&&(a.node=c,a.offset+=g),a.node==d&&a.offset>e&&(--a.offset,a.offset==e+1&&hi;++i)e=g[i],f=c.getSelfOrAncestorWithClass(e),f&&c.isModifiable(e)&&c.undoToAncestor(f,d);a.setStartAndEnd(g[0],0,h,h.length),c.normalize&&c.postApply(g,a,d,!0),D(b,d)}var k=c.getEmptyElements(a);P(k,function(a){S(a,c.className)})},undoToRanges:function(a){for(var b=a.length;b--;)this.undoToRange(a[b],a);return a},undoToSelection:function(b){var c=a.getSelection(b),d=a.getSelection(b).getAllRanges();this.undoToRanges(d),c.setRanges(d)},isAppliedToRange:function(a){if(a.collapsed||""==a.toString())return!!this.getSelfOrAncestorWithClass(a.commonAncestorContainer);var b=a.getNodes([3]);if(b.length)for(var c,d=0;c=b[d++];)if(!this.isIgnorableWhiteSpaceNode(c)&&u(a,c)&&this.isModifiable(c)&&!this.getSelfOrAncestorWithClass(c))return!1;return!0},isAppliedToRanges:function(a){var b=a.length;if(0==b)return!1;for(;b--;)if(!this.isAppliedToRange(a[b]))return!1;return!0},isAppliedToSelection:function(b){var c=a.getSelection(b);return this.isAppliedToRanges(c.getAllRanges())},toggleRange:function(a){this.isAppliedToRange(a)?this.undoToRange(a):this.applyToRange(a)},toggleSelection:function(a){this.isAppliedToSelection(a)?this.undoToSelection(a):this.applyToSelection(a)},getElementsWithClassIntersectingRange:function(a){var b=[],c=this;return a.getNodes([3],function(a){var d=c.getSelfOrAncestorWithClass(a);d&&!N(b,d)&&b.push(d)}),b},detach:function(){}},J.util={hasClass:f,addClass:g,removeClass:S,getClass:h,hasSameClasses:l,hasAllClasses:m,replaceWithOwnChildren:t,elementsHaveSameNonClassAttributes:w,elementHasNonClassAttributes:x,splitNodeAt:F,isEditableElement:U,isEditingHost:y,isEditable:z},a.CssClassApplier=a.ClassApplier=J,a.createClassApplier=K,O.createAliasForDeprecatedMethod(a,"createCssClassApplier","createClassApplier",b)}),a},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("Highlighter",["ClassApplier"],function(a,b){function c(a,b){return a.characterRange.start-b.characterRange.start}function d(a,b){return b?a.getElementById(b):m(a)}function e(a,b){this.type=a,this.converterCreator=b}function f(a,b){q[a]=new e(a,b)}function g(a){var b=q[a];if(b instanceof e)return b.create();throw new Error("Highlighter type '"+a+"' is not valid")}function h(a,b){this.start=a,this.end=b}function i(a,b,c,d,e,f){e?(this.id=e,p=Math.max(p,e+1)):this.id=p++,this.characterRange=b,this.doc=a,this.classApplier=c,this.converter=d,this.containerElementId=f||null,this.applied=!1}function j(a,b){b=b||"textContent",this.doc=a||document,this.classAppliers={},this.highlights=[],this.converter=g(b)}var k=a.dom,l=k.arrayContains,m=k.getBody,n=a.util.createOptions,o=a.util.forEach,p=1,q={};e.prototype.create=function(){var a=this.converterCreator();return a.type=this.type,a},a.registerHighlighterType=f,h.prototype={ +intersects:function(a){return this.starta.start},isContiguousWith:function(a){return this.start==a.end||this.end==a.start},union:function(a){return new h(Math.min(this.start,a.start),Math.max(this.end,a.end))},intersection:function(a){return new h(Math.max(this.start,a.start),Math.min(this.end,a.end))},getComplements:function(a){var b=[];if(this.start>=a.start){if(this.end<=a.end)return[];b.push(new h(a.end,this.end))}else b.push(new h(this.start,Math.min(this.end,a.start))),this.end>a.end&&b.push(new h(a.end,this.end));return b},toString:function(){return"[CharacterRange("+this.start+", "+this.end+")]"}},h.fromCharacterRange=function(a){return new h(a.start,a.end)};var r={rangeToCharacterRange:function(a,b){var c=a.getBookmark(b);return new h(c.start,c.end)},characterRangeToRange:function(b,c,d){var e=a.createRange(b);return e.moveToBookmark({start:c.start,end:c.end,containerNode:d}),e},serializeSelection:function(a,b){for(var c=a.getAllRanges(),d=c.length,e=[],f=1==d&&a.isBackward(),g=0,h=c.length;h>g;++g)e[g]={characterRange:this.rangeToCharacterRange(c[g],b),backward:f};return e},restoreSelection:function(a,b,c){a.removeAllRanges();for(var d,e,f,g=a.win.document,h=0,i=b.length;i>h;++h)e=b[h],f=e.characterRange,d=this.characterRangeToRange(g,e.characterRange,c),a.addRange(d,e.backward)}};f("textContent",function(){return r}),f("TextRange",function(){var b;return function(){if(!b){var c=a.modules.TextRange;if(!c)throw new Error("TextRange module is missing.");if(!c.supported)throw new Error("TextRange module is present but not supported.");b={rangeToCharacterRange:function(a,b){return h.fromCharacterRange(a.toCharacterRange(b))},characterRangeToRange:function(b,c,d){var e=a.createRange(b);return e.selectCharacters(d,c.start,c.end),e},serializeSelection:function(a,b){return a.saveCharacterRanges(b)},restoreSelection:function(a,b,c){a.restoreCharacterRanges(c,b)}}}return b}}()),i.prototype={getContainerElement:function(){return d(this.doc,this.containerElementId)},getRange:function(){return this.converter.characterRangeToRange(this.doc,this.characterRange,this.getContainerElement())},fromRange:function(a){this.characterRange=this.converter.rangeToCharacterRange(a,this.getContainerElement())},getText:function(){return this.getRange().toString()},containsElement:function(a){return this.getRange().containsNodeContents(a.firstChild)},unapply:function(){this.classApplier.undoToRange(this.getRange()),this.applied=!1},apply:function(){this.classApplier.applyToRange(this.getRange()),this.applied=!0},getHighlightElements:function(){return this.classApplier.getElementsWithClassIntersectingRange(this.getRange())},toString:function(){return"[Highlight(ID: "+this.id+", class: "+this.classApplier.className+", character range: "+this.characterRange.start+" - "+this.characterRange.end+")]"}},j.prototype={addClassApplier:function(a){this.classAppliers[a.className]=a},getHighlightForElement:function(a){for(var b=this.highlights,c=0,d=b.length;d>c;++c)if(b[c].containsElement(a))return b[c];return null},removeHighlights:function(a){for(var b,c=0,d=this.highlights.length;d>c;++c)b=this.highlights[c],l(a,b)&&(b.unapply(),this.highlights.splice(c--,1))},removeAllHighlights:function(){this.removeHighlights(this.highlights)},getIntersectingHighlights:function(a){var b=[],c=this.highlights;return o(a,function(a){o(c,function(c){a.intersectsRange(c.getRange())&&!l(b,c)&&b.push(c)})}),b},highlightCharacterRanges:function(b,c,d){var e,f,g,j=this.highlights,k=this.converter,l=this.doc,m=[],p=b?this.classAppliers[b]:null;d=n(d,{containerElementId:null,exclusive:!0});var q,r,s,t=d.containerElementId,u=d.exclusive;t&&(q=this.doc.getElementById(t),q&&(r=a.createRange(this.doc),r.selectNodeContents(q),s=new h(0,r.toString().length)));var v,w,x,y,z,A;for(e=0,f=c.length;f>e;++e)if(v=c[e],z=[],s&&(v=v.intersection(s)),v.start!=v.end){for(g=0;g0},serialize:function(a){var b,d,e,f,h=this,i=h.highlights;return i.sort(c),a=n(a,{serializeHighlightText:!1,type:h.converter.type}),b=a.type,e=b!=h.converter.type,e&&(f=g(b)),d=["type:"+b],o(i,function(b){var c,g=b.characterRange;e&&(c=b.getContainerElement(),g=f.rangeToCharacterRange(h.converter.characterRangeToRange(h.doc,g,c),c));var i=[g.start,g.end,b.id,b.classApplier.className,b.containerElementId];a.serializeHighlightText&&i.push(b.getText()),d.push(i.join("$"))}),d.join("|")},deserialize:function(a){var b,c,e,f=a.split("|"),j=[],k=f[0],l=!1;if(!k||!(b=/^type:(\w+)$/.exec(k)))throw new Error("Serialized highlights are invalid.");c=b[1],c!=this.converter.type&&(e=g(c),l=!0),f.shift();for(var m,n,o,p,q,r,s=f.length;s-- >0;){if(r=f[s].split("$"),o=new h(+r[0],+r[1]),p=r[4]||null,l&&(q=d(this.doc,p),o=this.converter.rangeToCharacterRange(e.characterRangeToRange(this.doc,o,q),q)),m=this.classAppliers[r[3]],!m)throw new Error("No class applier found for class '"+r[3]+"'");n=new i(this.doc,o,m,this.converter,parseInt(r[2]),p),n.apply(),j.push(n)}this.highlights=j}},a.Highlighter=j,a.createHighlighter=function(a,b){return new j(a,b)}}),a},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("SaveRestore",["WrappedRange"],function(a,b){function c(a,b){return(b||document).getElementById(a)}function d(a,b){var c,d="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),e=o.getDocument(a.startContainer),f=a.cloneRange();return f.collapse(b),c=e.createElement("span"),c.id=d,c.style.lineHeight="0",c.style.display="none",c.className="rangySelectionBoundary",c.appendChild(e.createTextNode(r)),f.insertNode(c),c}function e(a,d,e,f){var g=c(e,a);g?(d[f?"setStartBefore":"setEndBefore"](g),p(g)):b.warn("Marker element has been removed. Cannot restore selection.")}function f(a,b){return b.compareBoundaryPoints(a.START_TO_START,a)}function g(b,c){var e,f,g=a.DomRange.getRangeDocument(b),h=b.toString(),i=q(c);return b.collapsed?(f=d(b,!1),{document:g,markerId:f.id,collapsed:!0}):(f=d(b,!1),e=d(b,!0),{document:g,startMarkerId:e.id,endMarkerId:f.id,collapsed:!1,backward:i,toString:function(){return"original text: '"+h+"', new text: '"+b.toString()+"'"}})}function h(d,f){var g=d.document;"undefined"==typeof f&&(f=!0);var h=a.createRange(g);if(d.collapsed){var i=c(d.markerId,g);if(i){i.style.display="inline";var j=i.previousSibling;j&&3==j.nodeType?(p(i),h.collapseToPoint(j,j.length)):(h.collapseBefore(i),p(i))}else b.warn("Marker element has been removed. Cannot restore selection.")}else e(g,h,d.startMarkerId,!0),e(g,h,d.endMarkerId,!1);return f&&h.normalizeBoundaries(),h}function i(b,d){var e,h,i=[],j=q(d);b=b.slice(0),b.sort(f);for(var k=0,l=b.length;l>k;++k)i[k]=g(b[k],j);for(k=l-1;k>=0;--k)e=b[k],h=a.DomRange.getRangeDocument(e),e.collapsed?e.collapseAfter(c(i[k].markerId,h)):(e.setEndBefore(c(i[k].endMarkerId,h)),e.setStartAfter(c(i[k].startMarkerId,h)));return i}function j(c){if(!a.isSelectionValid(c))return b.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var d=a.getSelection(c),e=d.getAllRanges(),f=1==e.length&&d.isBackward(),g=i(e,f);return f?d.setSingleRange(e[0],f):d.setRanges(e),{win:c,rangeInfos:g,restored:!1}}function k(a){for(var b=[],c=a.length,d=c-1;d>=0;d--)b[d]=h(a[d],!0);return b}function l(b,c){if(!b.restored){var d=b.rangeInfos,e=a.getSelection(b.win),f=k(d),g=d.length;1==g&&c&&a.features.selectionHasExtend&&d[0].backward?(e.removeAllRanges(),e.addRange(f[0],!0)):e.setRanges(f),b.restored=!0}}function m(a,b){var d=c(b,a);d&&p(d)}function n(a){for(var b,c=a.rangeInfos,d=0,e=c.length;e>d;++d)b=c[d],b.collapsed?m(a.doc,b.markerId):(m(a.doc,b.startMarkerId),m(a.doc,b.endMarkerId))}var o=a.dom,p=o.removeNode,q=a.Selection.isDirectionBackward,r="\ufeff";a.util.extend(a,{saveRange:g,restoreRange:h,saveRanges:i,restoreRanges:k,saveSelection:j,restoreSelection:l,removeMarkerElement:m,removeMarkers:n})}),a},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("Serializer",["WrappedSelection"],function(a,b){function c(a){return a.replace(//g,">")}function d(a,b){b=b||[];var e=a.nodeType,f=a.childNodes,g=f.length,h=[e,a.nodeName,g].join(":"),i="",j="";switch(e){case 3:i=c(a.nodeValue);break;case 8:i="";break;default:i="<"+h+">",j=""}i&&b.push(i);for(var k=0;g>k;++k)d(f[k],b);return j&&b.push(j),b}function e(a){var b=d(a).join("");return s(b).toString(16)}function f(a,b,c){var d=[],e=a;for(c=c||t.getDocument(a).documentElement;e&&e!=c;)d.push(t.getNodeIndex(e,!0)),e=e.parentNode;return d.join("/")+":"+b}function g(a,c,d){c||(c=(d||document).documentElement);for(var e,f=a.split(":"),g=c,h=f[0]?f[0].split("/"):[],i=h.length;i--;){if(e=parseInt(h[i],10),!(eg;++g)f[g]=h(e[g],c,d);return f.join("|")}function l(b,c,d){c?d=d||t.getWindow(c):(d=d||window,c=d.document.documentElement);for(var e=b.split("|"),f=a.getSelection(d),g=[],h=0,j=e.length;j>h;++h)g[h]=i(e[h],c,d.document);return f.setRanges(g),f}function m(a,b,c){var d;b?d=c?c.document:t.getDocument(b):(c=c||window,b=c.document.documentElement);for(var e=a.split("|"),f=0,g=e.length;g>f;++f)if(!j(e[f],b,d))return!1;return!0}function n(a){for(var b,c,d=a.split(/[;,]/),e=0,f=d.length;f>e;++e)if(b=d[e].split("="),b[0].replace(/^\s+/,"")==v&&(c=b[1]))return decodeURIComponent(c.replace(/\s+$/,""));return null}function o(a){a=a||window;var b=n(a.document.cookie);b&&l(b,a.doc)}function p(b,c){b=b||window,c="object"==typeof c?c:{};var d=c.expires?";expires="+c.expires.toUTCString():"",e=c.path?";path="+c.path:"",f=c.domain?";domain="+c.domain:"",g=c.secure?";secure":"",h=k(a.getSelection(b));b.document.cookie=encodeURIComponent(v)+"="+encodeURIComponent(h)+d+e+f+g}var q="undefined",r=a.util;typeof encodeURIComponent!=q&&typeof decodeURIComponent!=q||b.fail("encodeURIComponent and/or decodeURIComponent method is missing");var s=function(){function a(a){for(var b,c=[],d=0,e=a.length;e>d;++d)b=a.charCodeAt(d),128>b?c.push(b):2048>b?c.push(b>>6|192,63&b|128):c.push(b>>12|224,b>>6&63|128,63&b|128);return c}function b(){for(var a,b,c=[],d=0;256>d;++d){for(b=d,a=8;a--;)1==(1&b)?b=b>>>1^3988292384:b>>>=1;c[d]=b>>>0}return c}function c(){return d||(d=b()),d}var d=null;return function(b){for(var d,e=a(b),f=-1,g=c(),h=0,i=e.length;i>h;++h)d=255&(f^e[h]),f=f>>>8^g[d];return(-1^f)>>>0}}(),t=a.dom,u=/^([^,]+),([^,\{]+)(\{([^}]+)\})?$/,v="rangySerializedSelection";r.extend(a,{serializePosition:f,deserializePosition:g,serializeRange:h,deserializeRange:i,canDeserializeRange:j,serializeSelection:k,deserializeSelection:l,canDeserializeSelection:m,restoreSelectionFromCookie:o,saveSelectionCookie:p,getElementChecksum:e,nodeToInfoString:d}),r.crc32=s}),a},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("TextRange",["WrappedSelection"],function(a,b){function c(a,b){function c(a,b,c){h.push({start:a,end:b,isWord:c})}for(var d,e,f,g=a.join(""),h=[],i=0;d=b.wordRegex.exec(g);){if(e=d.index,f=e+d[0].length,e>i&&c(i,e,!1),b.includeTrailingSpace)for(;$.test(a[f]);)++f;c(e,f,!0),i=f}return ie;++e)c[e].token=d;return d}function e(a,b,c){for(var e,f=c(a,b),g=[],h=0;e=f[h++];)g.push(d(a,e));return g}function f(a){var b=a||"",c="string"==typeof b?b.split(""):b;return c.sort(function(a,b){return a.charCodeAt(0)-b.charCodeAt(0)}),c.join("").replace(/(.)\1+/g,"$1")}function g(a){var b,c;return a?(b=a.language||_,c={},U(c,ia[b]||ia[_]),U(c,a),c):ia[_]}function h(a,b){var c=V(a,b);return b.hasOwnProperty("wordOptions")&&(c.wordOptions=g(c.wordOptions)),b.hasOwnProperty("characterOptions")&&(c.characterOptions=V(c.characterOptions,ga)),c}function i(a,b){var c=na(a,"display",b),d=a.tagName.toLowerCase();return"block"==c&&fa&&oa.hasOwnProperty(d)?oa[d]:c}function j(a){for(var b=o(a),c=0,d=b.length;d>c;++c)if(1==b[c].nodeType&&"none"==i(b[c]))return!0;return!1}function k(a){var b;return 3==a.nodeType&&(b=a.parentNode)&&"hidden"==na(b,"visibility")}function l(a){return a&&(1==a.nodeType&&!/^(inline(-block|-table)?|none)$/.test(i(a))||9==a.nodeType||11==a.nodeType)}function m(a){return S.isCharacterDataNode(a)||!/^(area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param)$/i.test(a.nodeName)}function n(a){for(var b=[];a.parentNode;)b.unshift(a.parentNode),a=a.parentNode;return b}function o(a){return n(a).concat([a])}function p(a){for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}function q(a,b){return!b&&a.hasChildNodes()?a.firstChild:p(a)}function r(a){var b=a.previousSibling;if(b){for(a=b;a.hasChildNodes();)a=a.lastChild;return a}var c=a.parentNode;return c&&1==c.nodeType?c:null}function s(a){if(!a||3!=a.nodeType)return!1;var b=a.data;if(""===b)return!0;var c=a.parentNode;if(!c||1!=c.nodeType)return!1;var d=na(a.parentNode,"whiteSpace");return/^[\t\n\r ]+$/.test(b)&&/^(normal|nowrap)$/.test(d)||/^[\t\r ]+$/.test(b)&&"pre-line"==d}function t(a){if(""===a.data)return!0;if(!s(a))return!1;var b=a.parentNode;return b?!!j(a):!0}function u(a){var b=a.nodeType;return 7==b||8==b||j(a)||/^(script|style)$/i.test(a.nodeName)||k(a)||t(a)}function v(a,b){var c=a.nodeType;return 7==c||8==c||1==c&&"none"==i(a,b)}function w(){this.store={}}function x(a,b,c){return function(d){var e=this.cache;if(e.hasOwnProperty(a))return pa++,e[a];qa++;var f=b.call(this,c?this[c]:this,d);return e[a]=f,f}}function y(a,b){this.node=a,this.session=b,this.cache=new w,this.positions=new w}function z(a,b){this.offset=b,this.nodeWrapper=a,this.node=a.node,this.session=a.session,this.cache=new w}function A(){return"[Position("+S.inspectNode(this.node)+":"+this.offset+")]"}function B(){return D(),Da=new Ea}function C(){return Da||B()}function D(){Da&&Da.detach(),Da=null}function E(a,c,d,e){function f(){var a=null;return c?(a=h,i||(h=h.previousVisible(),i=!h||d&&h.equals(d))):i||(a=h=h.nextVisible(),i=!h||d&&h.equals(d)),i&&(h=null),a}d&&(c?u(d.node)&&(d=a.previousVisible()):u(d.node)&&(d=d.nextVisible()));var g,h=a,i=!1,j=!1;return{next:function(){if(j)return j=!1,g;for(var a,b;a=f();)if(b=a.getCharacter(e))return g=a,a;return null},rewind:function(){if(!g)throw b.createError("createCharacterIterator: cannot rewind. Only one position can be rewound.");j=!0},dispose:function(){a=d=null}}}function F(a,b,c){function d(a){for(var b,c,d=[],e=a?f:g,h=!1,i=!1;b=e.next();){if(c=b.character,Z.test(c))i&&(i=!1,h=!0);else{if(h){e.rewind();break}i=!0}d.push(b)}return d}var f=E(a,!1,null,b),g=E(a,!0,null,b),h=c.tokenizer,i=d(!0),j=d(!1).reverse(),k=e(j.concat(i),c,h),l=i.length?k.slice(Fa(k,i[0].token)):[],m=j.length?k.slice(0,Fa(k,j.pop().token)+1):[];return{nextEndToken:function(){for(var a,b;1==l.length&&!(a=l[0]).isWord&&(b=d(!0)).length>0;)l=e(a.chars.concat(b),c,h);return l.shift()},previousStartToken:function(){for(var a,b;1==m.length&&!(a=m[0]).isWord&&(b=d(!1)).length>0;)m=e(b.reverse().concat(a.chars),c,h);return m.pop()},dispose:function(){f.dispose(),g.dispose(),l=m=null}}}function G(a,b,c,d,e){var f,g,h,i,j=0,k=a,l=Math.abs(c);if(0!==c){var m=0>c;switch(b){case Q:for(g=E(a,m,null,d);(f=g.next())&&l>j;)++j,k=f;h=f,g.dispose();break;case R:for(var n=F(a,d,e),o=m?n.previousStartToken:n.nextEndToken;(i=o())&&l>j;)i.isWord&&(++j,k=m?i.chars[0]:i.chars[i.chars.length-1]);break;default:throw new Error("movePositionBy: unit '"+b+"' not implemented")}m?(k=k.previousVisible(),j=-j):k&&k.isLeadingSpace&&!k.isTrailingSpace&&(b==R&&(g=E(a,!1,null,d),h=g.next(),g.dispose()),h&&(k=h.previousVisible()))}return{position:k,unitsMoved:j}}function H(a,b,c,d){var e=a.getRangeBoundaryPosition(b,!0),f=a.getRangeBoundaryPosition(b,!1),g=d?f:e,h=d?e:f;return E(g,!!d,h,c)}function I(a,b,c){for(var d,e=[],f=H(a,b,c);d=f.next();)e.push(d);return f.dispose(),e}function J(b,c,d){var e=a.createRange(b.node);return e.setStartAndEnd(b.node,b.offset,c.node,c.offset),!e.expand("word",{wordOptions:d})}function K(a,b,c,d,e){function f(a,b){var c=p[a].previousVisible(),d=p[b-1],f=!e.wholeWordsOnly||J(c,d,e.wordOptions);return{startPos:c,endPos:d,valid:f}}for(var g,h,i,j,k,l,m=aa(e.direction),n=E(a,m,a.session.getRangeBoundaryPosition(d,m),e.characterOptions),o="",p=[],q=null;g=n.next();)if(h=g.character,c||e.caseSensitive||(h=h.toLowerCase()),m?(p.unshift(g),o=h+o):(p.push(g),o+=h),c){if(k=b.exec(o))if(i=k.index,j=i+k[0].length,l){if(!m&&j0){q=f(i,j);break}}else l=!0}else if(-1!=(i=o.indexOf(b))){q=f(i,i+b.length);break}return l&&(q=f(i,j)),n.dispose(),q}function L(a){return function(){var b=!!Da,c=C(),d=[c].concat(T.toArray(arguments)),e=a.apply(this,d);return b||D(),e}}function M(a,b){return L(function(c,d,e,f){typeof e==P&&(e=d,d=Q),f=h(f,ka);var g=a;b&&(g=e>=0,this.collapse(!g));var i=G(c.getRangeBoundaryPosition(this,g),d,e,f.characterOptions,f.wordOptions),j=i.position;return this[g?"setStart":"setEnd"](j.node,j.offset),i.unitsMoved})}function N(a){return L(function(b,c){c=V(c,ga);for(var d,e=H(b,this,c,!a),f=0;(d=e.next())&&Z.test(d.character);)++f;e.dispose();var g=f>0;return g&&this[a?"moveStart":"moveEnd"]("character",a?f:-f,{characterOptions:c}),g})}function O(a){return L(function(b,c){var d=!1;return this.changeEachRange(function(b){d=b[a](c)||d}),d})}var P="undefined",Q="character",R="word",S=a.dom,T=a.util,U=T.extend,V=T.createOptions,W=S.getBody,X=/^[ \t\f\r\n]+$/,Y=/^[ \t\f\r]+$/,Z=/^[\t-\r \u0085\u00A0\u1680\u180E\u2000-\u200B\u2028\u2029\u202F\u205F\u3000]+$/,$=/^[\t \u00A0\u1680\u180E\u2000-\u200B\u202F\u205F\u3000]+$/,_="en",aa=a.Selection.isDirectionBackward,ba=!1,ca=!1,da=!1,ea=!0;!function(){var b=S.createTestElement(document,"

          1

          ",!0),c=b.firstChild,d=a.getSelection();d.collapse(c.lastChild,2),d.setStart(c.firstChild,0),ba=1==(""+d).length,b.innerHTML="1
          ",d.collapse(b,2),d.setStart(b.firstChild,0),ca=1==(""+d).length,b.innerHTML="1

          1

          ",d.collapse(b,2),d.setStart(b.firstChild,0),da=1==(""+d).length,S.removeNode(b),d.removeAllRanges()}();var fa,ga={includeBlockContentTrailingSpace:!0,includeSpaceBeforeBr:!0,includeSpaceBeforeBlock:!0,includePreLineTrailingSpace:!0,ignoreCharacters:""},ha={includeBlockContentTrailingSpace:!ea,includeSpaceBeforeBr:!ca,includeSpaceBeforeBlock:!da,includePreLineTrailingSpace:!0},ia={en:{wordRegex:/[a-z0-9]+('[a-z0-9]+)*/gi,includeTrailingSpace:!1,tokenizer:c}},ja={caseSensitive:!1,withinRange:null,wholeWordsOnly:!1,wrap:!1,direction:"forward",wordOptions:null,characterOptions:null},ka={wordOptions:null,characterOptions:null},la={wordOptions:null,characterOptions:null,trim:!1,trimStart:!0,trimEnd:!0},ma={wordOptions:null,characterOptions:null,direction:"forward"},na=S.getComputedStyleProperty;!function(){var a=document.createElement("table"),b=W(document);b.appendChild(a),fa="block"==na(a,"display"),b.removeChild(a)}();var oa={table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell"};w.prototype={get:function(a){return this.store.hasOwnProperty(a)?this.store[a]:null},set:function(a,b){return this.store[a]=b}};var pa=0,qa=0,ra={getPosition:function(a){var b=this.positions;return b.get(a)||b.set(a,new z(this,a))},toString:function(){return"[NodeWrapper("+S.inspectNode(this.node)+")]"}};y.prototype=ra;var sa="EMPTY",ta="NON_SPACE",ua="UNCOLLAPSIBLE_SPACE",va="COLLAPSIBLE_SPACE",wa="TRAILING_SPACE_BEFORE_BLOCK",xa="TRAILING_SPACE_IN_BLOCK",ya="TRAILING_SPACE_BEFORE_BR",za="PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK",Aa="TRAILING_LINE_BREAK_AFTER_BR",Ba="INCLUDED_TRAILING_LINE_BREAK_AFTER_BR";U(ra,{isCharacterDataNode:x("isCharacterDataNode",S.isCharacterDataNode,"node"),getNodeIndex:x("nodeIndex",S.getNodeIndex,"node"),getLength:x("nodeLength",S.getNodeLength,"node"),containsPositions:x("containsPositions",m,"node"),isWhitespace:x("isWhitespace",s,"node"),isCollapsedWhitespace:x("isCollapsedWhitespace",t,"node"),getComputedDisplay:x("computedDisplay",i,"node"),isCollapsed:x("collapsed",u,"node"),isIgnored:x("ignored",v,"node"),next:x("nextPos",q,"node"),previous:x("previous",r,"node"),getTextNodeInfo:x("textNodeInfo",function(a){var b=null,c=!1,d=na(a.parentNode,"whiteSpace"),e="pre-line"==d;return e?(b=Y,c=!0):"normal"!=d&&"nowrap"!=d||(b=X,c=!0),{node:a,text:a.data,spaceRegex:b,collapseSpaces:c,preLine:e}},"node"),hasInnerText:x("hasInnerText",function(a,b){for(var c=this.session,d=c.getPosition(a.parentNode,this.getNodeIndex()+1),e=c.getPosition(a,0),f=b?d:e,g=b?e:d;f!==g;){if(f.prepopulateChar(),f.isDefinitelyNonEmpty())return!0;f=b?f.previousVisible():f.nextVisible()}return!1},"node"),isRenderedBlock:x("isRenderedBlock",function(a){for(var b=a.getElementsByTagName("br"),c=0,d=b.length;d>c;++c)if(!u(b[c]))return!0;return this.hasInnerText()},"node"),getTrailingSpace:x("trailingSpace",function(a){if("br"==a.tagName.toLowerCase())return"";switch(this.getComputedDisplay()){case"inline":for(var b=a.lastChild;b;){if(!v(b))return 1==b.nodeType?this.session.getNodeWrapper(b).getTrailingSpace():"";b=b.previousSibling}break;case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":break;case"table-cell":return" ";default:return this.isRenderedBlock(!0)?"\n":""}return""},"node"),getLeadingSpace:x("leadingSpace",function(a){switch(this.getComputedDisplay()){case"inline":case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":case"table-cell":break;default:return this.isRenderedBlock(!1)?"\n":""}return""},"node")});var Ca={character:"",characterType:sa,isBr:!1,prepopulateChar:function(){var a=this;if(!a.prepopulatedChar){var b=a.node,c=a.offset,d="",e=sa,f=!1;if(c>0)if(3==b.nodeType){var g=b.data,h=g.charAt(c-1),i=a.nodeWrapper.getTextNodeInfo(),j=i.spaceRegex;i.collapseSpaces?j.test(h)?c>1&&j.test(g.charAt(c-2))||(i.preLine&&"\n"===g.charAt(c)?(d=" ",e=za):(d=" ",e=va)):(d=h,e=ta,f=!0):(d=h,e=ua,f=!0)}else{var k=b.childNodes[c-1];if(k&&1==k.nodeType&&!u(k)&&("br"==k.tagName.toLowerCase()?(d="\n",a.isBr=!0,e=va,f=!1):a.checkForTrailingSpace=!0),!d){var l=b.childNodes[c];l&&1==l.nodeType&&!u(l)&&(a.checkForLeadingSpace=!0)}}a.prepopulatedChar=!0,a.character=d,a.characterType=e,a.isCharInvariant=f}},isDefinitelyNonEmpty:function(){var a=this.characterType;return a==ta||a==ua},resolveLeadingAndTrailingSpaces:function(){if(this.prepopulatedChar||this.prepopulateChar(),this.checkForTrailingSpace){var a=this.session.getNodeWrapper(this.node.childNodes[this.offset-1]).getTrailingSpace();a&&(this.isTrailingSpace=!0,this.character=a,this.characterType=va),this.checkForTrailingSpace=!1}if(this.checkForLeadingSpace){var b=this.session.getNodeWrapper(this.node.childNodes[this.offset]).getLeadingSpace();b&&(this.isLeadingSpace=!0,this.character=b,this.characterType=va),this.checkForLeadingSpace=!1}},getPrecedingUncollapsedPosition:function(a){for(var b,c=this;c=c.previousVisible();)if(b=c.getCharacter(a),""!==b)return c;return null},getCharacter:function(a){function b(){return n||(k=o.getPrecedingUncollapsedPosition(a),n=!0),k}this.resolveLeadingAndTrailingSpaces();var c,d=this.character,e=f(a.ignoreCharacters),g=""!==d&&e.indexOf(d)>-1;if(this.isCharInvariant)return c=g?"":d;var h=["character",a.includeSpaceBeforeBr,a.includeBlockContentTrailingSpace,a.includePreLineTrailingSpace,e].join("_"),i=this.cache.get(h);if(null!==i)return i;var j,k,l="",m=this.characterType==va,n=!1,o=this;return m&&(this.type==Ba?l="\n":" "==d&&(!b()||k.isTrailingSpace||"\n"==k.character||" "==k.character&&k.characterType==va)||("\n"==d&&this.isLeadingSpace?b()&&"\n"!=k.character&&(l="\n"):(j=this.nextUncollapsed(),j&&(j.isBr?this.type=ya:j.isTrailingSpace&&"\n"==j.character?this.type=xa:j.isLeadingSpace&&"\n"==j.character&&(this.type=wa),"\n"==j.character?(this.type!=ya||a.includeSpaceBeforeBr)&&(this.type!=wa||a.includeSpaceBeforeBlock)&&(this.type==xa&&j.isTrailingSpace&&!a.includeBlockContentTrailingSpace||(this.type!=za||j.type!=ta||a.includePreLineTrailingSpace)&&("\n"==d?j.isTrailingSpace?this.isTrailingSpace||this.isBr&&(j.type=Aa,b()&&k.isLeadingSpace&&!k.isTrailingSpace&&"\n"==k.character?j.character="":j.type=Ba):l="\n":" "==d&&(l=" "))):l=d)))),e.indexOf(l)>-1&&(l=""),this.cache.set(h,l),l},equals:function(a){return!!a&&this.node===a.node&&this.offset===a.offset},inspect:A,toString:function(){return this.character}};z.prototype=Ca,U(Ca,{next:x("nextPos",function(a){var b=a.nodeWrapper,c=a.node,d=a.offset,e=b.session;if(!c)return null;var f,g,h;return d==b.getLength()?(f=c.parentNode,g=f?b.getNodeIndex()+1:0):b.isCharacterDataNode()?(f=c,g=d+1):(h=c.childNodes[d],e.getNodeWrapper(h).containsPositions()?(f=h,g=0):(f=c,g=d+1)),f?e.getPosition(f,g):null}),previous:x("previous",function(a){var b,c,d,e=a.nodeWrapper,f=a.node,g=a.offset,h=e.session;return 0==g?(b=f.parentNode,c=b?e.getNodeIndex():0):e.isCharacterDataNode()?(b=f,c=g-1):(d=f.childNodes[g-1],h.getNodeWrapper(d).containsPositions()?(b=d,c=S.getNodeLength(d)):(b=f,c=g-1)),b?h.getPosition(b,c):null}),nextVisible:x("nextVisible",function(a){var b=a.next();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex()+1)),e}),nextUncollapsed:x("nextUncollapsed",function(a){for(var b=a;b=b.nextVisible();)if(b.resolveLeadingAndTrailingSpaces(),""!==b.character)return b;return null}),previousVisible:x("previousVisible",function(a){var b=a.previous();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex())),e})});var Da=null,Ea=function(){function a(a){var b=new w;return{get:function(c){var d=b.get(c[a]);if(d)for(var e,f=0;e=d[f++];)if(e.node===c)return e;return null},set:function(c){var d=c.node[a],e=b.get(d)||b.set(d,[]);e.push(c)}}}function b(){this.initCaches()}var c=T.isHostProperty(document.documentElement,"uniqueID");return b.prototype={initCaches:function(){this.elementCache=c?function(){var a=new w;return{get:function(b){return a.get(b.uniqueID)},set:function(b){a.set(b.node.uniqueID,b)}}}():a("tagName"),this.textNodeCache=a("data"),this.otherNodeCache=a("nodeName")},getNodeWrapper:function(a){var b;switch(a.nodeType){case 1:b=this.elementCache;break;case 3:b=this.textNodeCache;break;default:b=this.otherNodeCache}var c=b.get(a);return c||(c=new y(a,this),b.set(c)),c},getPosition:function(a,b){return this.getNodeWrapper(a).getPosition(b)},getRangeBoundaryPosition:function(a,b){var c=b?"start":"end";return this.getPosition(a[c+"Container"],a[c+"Offset"])},detach:function(){this.elementCache=this.textNodeCache=this.otherNodeCache=null}},b}();U(S,{nextNode:q,previousNode:r});var Fa=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)if(a[c]===b)return c;return-1};U(a.rangePrototype,{moveStart:M(!0,!1),moveEnd:M(!1,!1),move:M(!0,!0),trimStart:N(!0),trimEnd:N(!1),trim:L(function(a,b){var c=this.trimStart(b),d=this.trimEnd(b);return c||d}),expand:L(function(a,b,c){var d=!1;c=h(c,la);var e=c.characterOptions;if(b||(b=Q),b==R){var f,g,i=c.wordOptions,j=a.getRangeBoundaryPosition(this,!0),k=a.getRangeBoundaryPosition(this,!1),l=F(j,e,i),m=l.nextEndToken(),n=m.chars[0].previousVisible();if(this.collapsed)f=m;else{var o=F(k,e,i);f=o.previousStartToken()}return g=f.chars[f.chars.length-1],n.equals(j)||(this.setStart(n.node,n.offset),d=!0),g&&!g.equals(k)&&(this.setEnd(g.node,g.offset),d=!0),c.trim&&(c.trimStart&&(d=this.trimStart(e)||d),c.trimEnd&&(d=this.trimEnd(e)||d)),d}return this.moveEnd(Q,1,c)}),text:L(function(a,b){return this.collapsed?"":I(a,this,V(b,ga)).join("")}),selectCharacters:L(function(a,b,c,d,e){var f={characterOptions:e};b||(b=W(this.getDocument())),this.selectNodeContents(b),this.collapse(!0),this.moveStart("character",c,f),this.collapse(!0),this.moveEnd("character",d-c,f)}),toCharacterRange:L(function(a,b,c){b||(b=W(this.getDocument()));var d,e,f=b.parentNode,g=S.getNodeIndex(b),h=-1==S.comparePoints(this.startContainer,this.endContainer,f,g),i=this.cloneRange();return h?(i.setStartAndEnd(this.startContainer,this.startOffset,f,g),d=-i.text(c).length):(i.setStartAndEnd(f,g,this.startContainer,this.startOffset),d=i.text(c).length),e=d+this.text(c).length,{start:d,end:e}}),findText:L(function(b,c,d){d=h(d,ja),d.wholeWordsOnly&&(d.wordOptions.includeTrailingSpace=!1);var e=aa(d.direction),f=d.withinRange;f||(f=a.createRange(),f.selectNodeContents(this.getDocument()));var g=c,i=!1;"string"==typeof g?d.caseSensitive||(g=g.toLowerCase()):i=!0;var j=b.getRangeBoundaryPosition(this,!e),k=f.comparePoint(j.node,j.offset);-1===k?j=b.getRangeBoundaryPosition(f,!0):1===k&&(j=b.getRangeBoundaryPosition(f,!1)); +for(var l,m=j,n=!1;;)if(l=K(m,g,i,f,d)){if(l.valid)return this.setStartAndEnd(l.startPos.node,l.startPos.offset,l.endPos.node,l.endPos.offset),!0;m=e?l.startPos:l.endPos}else{if(!d.wrap||n)return!1;f=f.cloneRange(),m=b.getRangeBoundaryPosition(f,!e),f.setBoundary(j.node,j.offset,e),n=!0}}),pasteHtml:function(a){if(this.deleteContents(),a){var b=this.createContextualFragment(a),c=b.lastChild;this.insertNode(b),this.collapseAfter(c)}}}),U(a.selectionPrototype,{expand:L(function(a,b,c){this.changeEachRange(function(a){a.expand(b,c)})}),move:L(function(a,b,c,d){var e=0;if(this.focusNode){this.collapse(this.focusNode,this.focusOffset);var f=this.getRangeAt(0);d||(d={}),d.characterOptions=V(d.characterOptions,ha),e=f.move(b,c,d),this.setSingleRange(f)}return e}),trimStart:O("trimStart"),trimEnd:O("trimEnd"),trim:O("trim"),selectCharacters:L(function(b,c,d,e,f,g){var h=a.createRange(c);h.selectCharacters(c,d,e,g),this.setSingleRange(h,f)}),saveCharacterRanges:L(function(a,b,c){for(var d=this.getAllRanges(),e=d.length,f=[],g=1==e&&this.isBackward(),h=0,i=d.length;i>h;++h)f[h]={characterRange:d[h].toCharacterRange(b,c),backward:g,characterOptions:c};return f}),restoreCharacterRanges:L(function(b,c,d){this.removeAllRanges();for(var e,f,g,h=0,i=d.length;i>h;++h)f=d[h],g=f.characterRange,e=a.createRange(c),e.selectCharacters(c,g.start,g.end,f.characterOptions),this.addRange(e,f.backward)}),text:L(function(a,b){for(var c=[],d=0,e=this.rangeCount;e>d;++d)c[d]=this.getRangeAt(d).text(b);return c.join("")})}),a.innerText=function(b,c){var d=a.createRange(b);d.selectNodeContents(b);var e=d.text(c);return e},a.createWordIterator=function(a,b,c){var d=C();c=h(c,ma);var e=d.getPosition(a,b),f=F(e,c.characterOptions,c.wordOptions),g=aa(c.direction);return{next:function(){return g?f.previousStartToken():f.nextEndToken()},dispose:function(){f.dispose(),this.next=function(){}}}},a.noMutation=function(a){var b=C();a(b),D()},a.noMutation.createEntryPointFunction=L,a.textRange={isBlockNode:l,isCollapsedWhitespaceNode:t,createPosition:L(function(a,b,c){return a.getPosition(b,c)})}}),a},this),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="textAngular"),function(){"use strict";var a={ie:function(){for(var a,b=3,c=document.createElement("div"),d=c.getElementsByTagName("i");c.innerHTML="",d[0];);return b>4?b:a}(),webkit:/AppleWebKit\/([\d.]+)/i.test(navigator.userAgent)},b=!1;a.webkit&&(document.addEventListener("mousedown",function(a){var c=a||window.event,d=c.target;if(b&&null!==d){for(var e=!1,f=d;null!==f&&"html"!==f.tagName.toLowerCase()&&!e;)e="true"===f.contentEditable,f=f.parentNode;e||(document.getElementById("textAngular-editableFix-010203040506070809").setSelectionRange(0,0),d.focus(),d.select&&d.select())}b=!1},!1),angular.element(document).ready(function(){angular.element(document.body).append(angular.element(''))}));var c=/^(address|article|aside|audio|blockquote|canvas|dd|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|noscript|ol|output|p|pre|section|table|tfoot|ul|video)$/i,d=/^(ul|li|ol)$/i,e=/^(address|article|aside|audio|blockquote|canvas|dd|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|noscript|ol|output|p|pre|section|table|tfoot|ul|video|li)$/i;String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var f,g,h,i,j,k;if(a.ie>8||void 0===a.ie){for(var l=document.styleSheets,m=0;m
          ");return d[0].innerHTML=c,angular.forEach(a,function(a){var c=[];a.selector&&""!==a.selector?c=d.find(a.selector):a.customAttribute&&""!==a.customAttribute&&(c=b.getByAttribute(d,a.customAttribute)),angular.forEach(c,function(b){b=angular.element(b),a.selector&&""!==a.selector&&a.customAttribute&&""!==a.customAttribute?void 0!==b.attr(a.customAttribute)&&a.renderLogic(b):a.renderLogic(b)})}),d[0].innerHTML}}]).factory("taFixChrome",function(){var a=function(a){if(!a||!angular.isString(a)||a.length<=0)return a;for(var b,c,d,e=/<([^>\/]+?)style=("([^"]+)"|'([^']+)')([^>]*)>/gi,f="",g=0;b=e.exec(a);)c=b[3]||b[4],c&&c.match(/line-height: 1.[0-9]{3,12};|color: inherit; line-height: 1.1;/i)&&(c=c.replace(/( |)font-family: inherit;|( |)line-height: 1.[0-9]{3,12};|( |)color: inherit;/gi,""),d="<"+b[1].trim(),c.trim().length>0&&(d+=" style="+b[2].substring(0,1)+c+b[2].substring(0,1)),d+=b[5].trim()+">",f+=a.substring(g,b.index)+d,g=b.index+b[0].length);return f+=a.substring(g),g>0?f.replace(/(.*?)<\/span>(|)/gi,"$1"):a};return a}).factory("taSanitize",["$sanitize",function(a){function b(a,b){for(var c,d=0,e=0,f=/<[^>]*>/gi;c=f.exec(a);)if(e=c.index,"/"===c[0].substr(1,1)){if(0===d)break;d--}else d++;return b+a.substring(0,e)+angular.element(b)[0].outerHTML.substring(b.length)+a.substring(e)}function c(a){if(!a||!angular.isString(a)||a.length<=0)return a;for(var d,f,g,h,i,k,l=/<([^>\/]+?)style=("([^"]+)"|'([^']+)')([^>]*)>/gi,m="",n="",o=0;f=l.exec(a);){h=f[3]||f[4];var p=new RegExp(j,"i");if(angular.isString(h)&&p.test(h)){i="";for(var q=new RegExp(j,"ig");g=q.exec(h);)for(d=0;d");k=c(a.substring(o,f.index)),n+=m.length>0?b(k,m):k,h=h.replace(new RegExp(j,"ig"),""),n+="<"+f[1].trim(),h.length>0&&(n+=' style="'+h+'"'),n+=f[5]+">",o=f.index+f[0].length,m=i}}return n+=m.length>0?b(a.substring(o),m):a.substring(o)}function d(a){if(!a||!angular.isString(a)||a.length<=0)return a;for(var b,c=/<([^>\/]+?)align=("([^"]+)"|'([^']+)')([^>]*)>/gi,d="",e=0;b=c.exec(a);){d+=a.substring(e,b.index),e=b.index+b[0].length;var f="<"+b[1]+b[5];/style=("([^"]+)"|'([^']+)')/gi.test(f)?f=f.replace(/style=("([^"]+)"|'([^']+)')/i,'style="$2$3 text-align:'+(b[3]||b[4])+';"'):f+=' style="text-align:'+(b[3]||b[4])+';"',f+=">",d+=f}return d+a.substring(e)}for(var e=[{property:"font-weight",values:["bold"],tag:"b"},{property:"font-style",values:["italic"],tag:"i"}],f=[],g=0;g0&&(h+="|"),h+=e[g].values[i];h+=");)",f.push(h)}var j="("+f.join("|")+")";return function(b,e,f){if(!f)try{b=c(b)}catch(g){}b=d(b);var h;try{h=a(b),f&&(h=b)}catch(g){h=e||""}var i,j=h.match(/(]*>.*?<\/pre[^>]*>)/gi),k=h.replace(/(&#(9|10);)*/gi,""),l=/]*>.*?<\/pre[^>]*>/gi,m=0,n=0;for(h="";null!==(i=l.exec(k))&&m=0;e--)d=angular.element("<"+c+">"+f[e].innerHTML+""),b.after(d);b.remove(),a.setSelectionToElementEnd(d[0])},g=function(b){/()$/i.test(b.innerHTML.trim())?a.setSelectionBeforeElement(angular.element(b).find("br")[0]):a.setSelectionToElementEnd(b)},h=function(a,b){var c=angular.element("<"+b+">"+a[0].innerHTML+"");a.after(c),a.remove(),g(c.find("li")[0])},i=function(a,c,d){for(var e="",f=0;f"+a[f].innerHTML+"";var h=angular.element("<"+d+">"+e+"");c.after(h),c.remove(),g(h.find("li")[0])};return function(g,j){return g=b(g),function(k,l,m,n){var o,p,q,r,s,t,u,v=angular.element("<"+g+">");try{u=a.getSelectionElement()}catch(w){}var x=angular.element(u);if(void 0!==u){var y=u.tagName.toLowerCase();if("insertorderedlist"===k.toLowerCase()||"insertunorderedlist"===k.toLowerCase()){var z=b("insertorderedlist"===k.toLowerCase()?"ol":"ul");if(y===z)return f(x,g);if("li"===y&&x.parent()[0].tagName.toLowerCase()===z&&1===x.parent().children().length)return f(x.parent(),g);if("li"===y&&x.parent()[0].tagName.toLowerCase()!==z&&1===x.parent().children().length)return h(x.parent(),z);if(y.match(c)&&!x.hasClass("ta-bind")){if("ol"===y||"ul"===y)return h(x,z);var A=!1;return angular.forEach(x.children(),function(a){a.tagName.match(c)&&(A=!0)}),A?i(x.children(),x,z):i([angular.element("
          "+u.innerHTML+"
          ")[0]],x,z)}if(y.match(c)){if(r=a.getOnlySelectedElements(),0===r.length)p=angular.element("<"+z+">
        • "+u.innerHTML+"
        • "),x.html(""),x.append(p);else{if(1===r.length&&("ol"===r[0].tagName.toLowerCase()||"ul"===r[0].tagName.toLowerCase()))return r[0].tagName.toLowerCase()===z?f(angular.element(r[0]),g):h(angular.element(r[0]),z);q="";var B=[];for(o=0;o"+C[0].innerHTML+"":C[0].childNodes[0].innerHTML,B.unshift(C)}p=angular.element("<"+z+">"+q+""),B.pop().replaceWith(p),angular.forEach(B,function(a){a.remove()})}return void a.setSelectionToElementEnd(p[0])}}else{if("formatblock"===k.toLowerCase()){for(t=m.toLowerCase().replace(/[<>]/gi,""),"default"===t.trim()&&(t=g,m="<"+g+">"),p="li"===y?x.parent():x;!p[0].tagName||!p[0].tagName.match(c)&&!p.parent().attr("contenteditable");)p=p.parent(),y=(p[0].tagName||"").toLowerCase();if(y===t){r=p.children();var D=!1;for(o=0;o=0;o--)r[o].parentNode&&r[o].parentNode.removeChild(r[o])}else for(o=0;o"),v[0].innerHTML=F[o].outerHTML,F[o]=v[0]),E.parent()[0].insertBefore(F[o],E[0]);E.remove()}return void a.setSelectionToElementEnd(p[0])}if("createlink"===k.toLowerCase()){var G='
          ',H="",I=a.getSelection();if(I.collapsed)a.insertHtml(G+m+H,j);else if(rangy.getSelection().getRangeAt(0).canSurroundContents()){var J=angular.element(G+H)[0];rangy.getSelection().getRangeAt(0).surroundContents(J)}return}if("inserthtml"===k.toLowerCase())return void a.insertHtml(m,j)}}try{e[0].execCommand(k,l,m)}catch(w){}}}}]).service("taSelection",["$window","$document","taDOM",function(a,b,d){var f=b[0],g=a.rangy,h=function(a,b){return a.tagName&&a.tagName.match(/^br$/i)&&0===b&&!a.previousSibling?{element:a.parentNode,offset:0}:{element:a,offset:b}},i={getSelection:function(){var a=g.getSelection().getRangeAt(0),b=a.commonAncestorContainer,c={start:h(a.startContainer,a.startOffset),end:h(a.endContainer,a.endOffset),collapsed:a.collapsed};return b=3===b.nodeType?b.parentNode:b,b.parentNode===c.start.element||b.parentNode===c.end.element?c.container=b.parentNode:c.container=b,c},getOnlySelectedElements:function(){var a=g.getSelection().getRangeAt(0),b=a.commonAncestorContainer;return b=3===b.nodeType?b.parentNode:b,a.getNodes([1],function(a){return a.parentNode===b})},getSelectionElement:function(){return i.getSelection().container},setSelection:function(a,b,c){var d=g.createRange();d.setStart(a,b),d.setEnd(a,c),g.getSelection().setSingleRange(d)},setSelectionBeforeElement:function(a){var b=g.createRange();b.selectNode(a),b.collapse(!0),g.getSelection().setSingleRange(b)},setSelectionAfterElement:function(a){var b=g.createRange();b.selectNode(a),b.collapse(!1),g.getSelection().setSingleRange(b)},setSelectionToElementStart:function(a){var b=g.createRange();b.selectNodeContents(a),b.collapse(!0),g.getSelection().setSingleRange(b)},setSelectionToElementEnd:function(a){var b=g.createRange();b.selectNodeContents(a),b.collapse(!1),a.childNodes&&a.childNodes[a.childNodes.length-1]&&"br"===a.childNodes[a.childNodes.length-1].nodeName&&(b.startOffset=b.endOffset=b.startOffset-1),g.getSelection().setSingleRange(b)},insertHtml:function(a,b){var h,j,k,l,m,n,o,p=angular.element("
          "+a+"
          "),q=g.getSelection().getRangeAt(0),r=f.createDocumentFragment(),s=p[0].childNodes,t=!0;if(s.length>0){for(l=[],k=0;k)$/i.test(q.startContainer.innerHTML)&&q.selectNode(q.startContainer)}else t=!0,n=r=f.createTextNode(a);if(t)q.deleteContents();else if(q.collapsed&&q.startContainer!==b)if(q.startContainer.innerHTML&&q.startContainer.innerHTML.match(/^<[^>]*>$/i))h=q.startContainer,1===q.startOffset?(q.setStartAfter(h),q.setEndAfter(h)):(q.setStartBefore(h),q.setEndBefore(h));else{if(3===q.startContainer.nodeType&&q.startContainer.parentNode!==b)for(h=q.startContainer.parentNode,j=h.cloneNode(),d.splitNodes(h.childNodes,h,j,q.startContainer,q.startOffset);!e.test(h.nodeName);){angular.element(h).after(j),h=h.parentNode;var v=j;j=h.cloneNode(),d.splitNodes(h.childNodes,h,j,v)}else h=q.startContainer,j=h.cloneNode(),d.splitNodes(h.childNodes,h,j,void 0,void 0,q.startOffset);if(angular.element(h).after(j),q.setStartAfter(h),q.setEndAfter(h),/^(|)$/i.test(h.innerHTML.trim())&&(q.setStartBefore(h),q.setEndBefore(h),angular.element(h).remove()),/^(|)$/i.test(j.innerHTML.trim())&&angular.element(j).remove(),"li"===h.nodeName.toLowerCase()){for(o=f.createDocumentFragment(),m=0;m"),d.transferChildNodes(r.childNodes[m],p[0]),d.transferNodeAttributes(r.childNodes[m],p[0]),o.appendChild(p[0]);r=o,n&&(n=r.childNodes[r.childNodes.length-1],n=n.childNodes[n.childNodes.length-1])}}else q.deleteContents();q.insertNode(r),n&&i.setSelectionToElementEnd(n)}};return i}]).service("taDOM",function(){var a={getByAttribute:function(b,c){var d=[],e=b.children();return e.length&&angular.forEach(e,function(b){d=d.concat(a.getByAttribute(angular.element(b),c))}),void 0!==b.attr(c)&&d.push(b),d},transferChildNodes:function(a,b){for(b.innerHTML="";a.childNodes.length>0;)b.appendChild(a.childNodes[0]);return b},splitNodes:function(b,c,d,e,f,g){if(!e&&isNaN(g))throw new Error("taDOM.splitNodes requires a splitNode or splitIndex");for(var h=document.createDocumentFragment(),i=document.createDocumentFragment(),j=0;b.length>0&&(isNaN(g)||g!==j)&&b[0]!==e;)h.appendChild(b[0]),j++;for(!isNaN(f)&&f>=0&&b[0]&&(h.appendChild(document.createTextNode(b[0].nodeValue.substring(0,f))),b[0].nodeValue=b[0].nodeValue.substring(f));b.length>0;)i.appendChild(b[0]);a.transferChildNodes(h,c),a.transferChildNodes(i,d)},transferNodeAttributes:function(a,b){for(var c=0;c");return b.html(a),b.text().length<=e}}}}).directive("taMinText",function(){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){var e=parseInt(a.$eval(c.taMinText));if(isNaN(e))throw"Min text must be an integer";c.$observe("taMinText",function(a){if(e=parseInt(a),isNaN(e))throw"Min text must be an integer";d.$dirty&&d.$validate()}),d.$validators.taMinText=function(a){var b=angular.element("
          ");return b.html(a),!b.text().length||b.text().length>=e}}}}),angular.module("textAngular.taBind",["textAngular.factories","textAngular.DOM"]).service("_taBlankTest",[function(){var a=/<(a|abbr|acronym|bdi|bdo|big|cite|code|del|dfn|img|ins|kbd|label|map|mark|q|ruby|rp|rt|s|samp|time|tt|var)[^>]*(>|$)/i;return function(b){return function(c){if(!c)return!0;var d,e=/(^[^<]|>)[^<]/i.exec(c);return e?d=e.index:(c=c.toString().replace(/="[^"]*"/i,"").replace(/="[^"]*"/i,"").replace(/="[^"]*"/i,"").replace(/="[^"]*"/i,""),d=c.indexOf(">")),c=c.trim().substring(d,d+100),/^[^<>]+$/i.test(c)?!1:0===c.length||c===b||/^>(\s| )*<\/[^>]+>$/gi.test(c)?!0:!/>\s*[^\s<]/i.test(c)&&!a.test(c)}}}]).directive("taButton",[function(){return{link:function(a,b,c){b.attr("unselectable","on"),b.on("mousedown",function(a,b){return b&&angular.extend(a,b),a.preventDefault(),!1})}}}]).directive("taBind",["taSanitize","$timeout","$window","$document","taFixChrome","taBrowserTag","taSelection","taSelectableElements","taApplyCustomRenderers","taOptions","_taBlankTest","$parse","taDOM","textAngularManager",function(d,f,i,j,k,l,m,o,p,q,r,s,t,u){return{priority:2,require:["ngModel","?ngModelOptions"],link:function(l,v,w,x){function y(a){var b;return R.forEach(function(c){if(c.keyCode===a.keyCode){var d=(a.metaKey?O:0)+(a.ctrlKey?N:0)+(a.shiftKey?Q:0)+(a.altKey?P:0);if(c.forbiddenModifiers&d)return;c.mustHaveModifiers.every(function(a){return d&a})&&(b=c.specialKey)}}),b}var z,A,B,C,D=x[0],E=x[1]||{},F=void 0!==v.attr("contenteditable")&&v.attr("contenteditable"),G=F||"textarea"===v[0].tagName.toLowerCase()||"input"===v[0].tagName.toLowerCase(),H=!1,I=!1,J=!1,K=w.taUnsafeSanitizer||q.disableSanitizer,L=/^(9|19|20|27|33|34|35|36|37|38|39|40|45|112|113|114|115|116|117|118|119|120|121|122|123|144|145)$/i,M=/^(8|13|32|46|59|61|107|109|173|186|187|188|189|190|191|192|219|220|221|222)$/i,N=1,O=2,P=4,Q=8,R=[{specialKey:"UndoKey",forbiddenModifiers:P+Q,mustHaveModifiers:[O+N],keyCode:90},{specialKey:"RedoKey",forbiddenModifiers:P,mustHaveModifiers:[O+N,Q],keyCode:90},{specialKey:"RedoKey",forbiddenModifiers:P+Q,mustHaveModifiers:[O+N],keyCode:89},{specialKey:"TabKey",forbiddenModifiers:O+Q+P+N,mustHaveModifiers:[],keyCode:9},{specialKey:"ShiftTabKey",forbiddenModifiers:O+P+N,mustHaveModifiers:[Q],keyCode:9}];void 0===w.taDefaultWrap&&(w.taDefaultWrap="p"),""===w.taDefaultWrap?(B="",C=void 0===a.ie?"

          ":a.ie>=11?"


          ":a.ie<=8?"

           

          ":"

           

          "):(B=void 0===a.ie||a.ie>=11?"<"+w.taDefaultWrap+">
          ":a.ie<=8?"<"+w.taDefaultWrap.toUpperCase()+">":"<"+w.taDefaultWrap+">",C=void 0===a.ie||a.ie>=11?"<"+w.taDefaultWrap+">
          ":a.ie<=8?"<"+w.taDefaultWrap.toUpperCase()+"> ":"<"+w.taDefaultWrap+"> "),E.$options||(E.$options={});var S=r(C),T=function(a){if(S(a))return a;var b=angular.element("
          "+a+"
          ");if(0===b.children().length)a="<"+w.taDefaultWrap+">"+a+"";else{var d,e=b[0].childNodes,f=!1;for(d=0;d";else if("#text"===h){var i=g.textContent;a+=i.trim()?"<"+w.taDefaultWrap+">"+i+"":i}else if(h.match(c))a+=g.outerHTML;else{var j=g.outerHTML||g.nodeValue;a+=""!==j.trim()?"<"+w.taDefaultWrap+">"+j+"":j}}else a="<"+w.taDefaultWrap+">"+a+""}return a};w.taPaste&&(A=s(w.taPaste)),v.addClass("ta-bind");var U;l["$undoManager"+(w.id||"")]=D.$undoManager={_stack:[],_index:0,_max:1e3,push:function(a){return"undefined"==typeof a||null===a||"undefined"!=typeof this.current()&&null!==this.current()&&a===this.current()?a:(this._indexthis._max&&this._stack.shift(),this._index=this._stack.length-1,a)},undo:function(){return this.setToIndex(this._index-1)},redo:function(){return this.setToIndex(this._index+1)},setToIndex:function(a){return 0>a||a>this._stack.length-1?void 0:(this._index=a,this.current())},current:function(){return this._stack[this._index]}};var V,W=l["$undoTaBind"+(w.id||"")]=function(){if(!H&&F){var a=D.$undoManager.undo();"undefined"!=typeof a&&null!==a&&(ka(a),Z(a,!1),V&&f.cancel(V),V=f(function(){v[0].focus(),m.setSelectionToElementEnd(v[0])},1))}},X=l["$redoTaBind"+(w.id||"")]=function(){if(!H&&F){var a=D.$undoManager.redo();"undefined"!=typeof a&&null!==a&&(ka(a),Z(a,!1),V&&f.cancel(V),V=f(function(){v[0].focus(),m.setSelectionToElementEnd(v[0])},1))}},Y=function(){if(F)return v[0].innerHTML;if(G)return v.val();throw"textAngular Error: attempting to update non-editable taBind"},Z=function(a,b,c){J=c||!1,"undefined"!=typeof b&&null!==b||(b=F),"undefined"!=typeof a&&null!==a||(a=Y()),S(a)?(""!==D.$viewValue&&D.$setViewValue(""),b&&""!==D.$undoManager.current()&&D.$undoManager.push("")):(ja(),D.$viewValue!==a&&(D.$setViewValue(a),b&&D.$undoManager.push(a))),D.$render()};l["updateTaBind"+(w.id||"")]=function(){H||Z(void 0,void 0,!0)};var $=function(a){return D.$oldViewValue=d(k(a),D.$oldViewValue,K)};if(v.attr("required")&&(D.$validators.required=function(a,b){return!S(a||b)}),D.$parsers.push($),D.$parsers.unshift(T),D.$formatters.push($),D.$formatters.unshift(T),D.$formatters.unshift(function(a){return D.$undoManager.push(a||"")}),G)if(l.events={},F){var _=!1,aa=function(a){if(a&&a.trim().length){if(a.match(/class=["']*Mso(Normal|List)/i)){var b=a.match(/([\s\S]*?)/i);b=b?b[1]:a,b=b.replace(/[\s\S]*?<\/o:p>/gi,"").replace(/class=(["']|)MsoNormal(["']|)/gi,"");var c=angular.element("
          "+b+"
          "),e=angular.element("
          "),g={element:null,lastIndent:[],lastLi:null,isUl:!1};g.lastIndent.peek=function(){var a=this.length;return a>0?this[a-1]:void 0};for(var h=function(a){g.isUl=a,g.element=angular.element(a?"
            ":"
              "),g.lastIndent=[],g.lastIndent.peek=function(){var a=this.length;return a>0?this[a-1]:void 0},g.lastLevelMatch=null},i=0;i<=c[0].childNodes.length;i++)if(c[0].childNodes[i]&&"#text"!==c[0].childNodes[i].nodeName&&"p"===c[0].childNodes[i].tagName.toLowerCase()){var j=angular.element(c[0].childNodes[i]),k=(j.attr("class")||"").match(/MsoList(Bullet|Number|Paragraph)(CxSp(First|Middle|Last)|)/i);if(k){if(j[0].childNodes.length<2||j[0].childNodes[1].childNodes.length<1)continue;var n="bullet"===k[1].toLowerCase()||"number"!==k[1].toLowerCase()&&!(/^[^0-9a-z<]*[0-9a-z]+[^0-9a-z<>]]":"
                "),g.lastLi.append(g.element);else if(null!=g.lastIndent.peek()&&g.lastIndent.peek()>p){for(;null!=g.lastIndent.peek()&&g.lastIndent.peek()>p;)if("li"!==g.element.parent()[0].tagName.toLowerCase()){if(!/[uo]l/i.test(g.element.parent()[0].tagName.toLowerCase()))break;g.element=g.element.parent(),g.lastIndent.pop()}else g.element=g.element.parent();g.isUl="ul"===g.element[0].tagName.toLowerCase(),n!==g.isUl&&(h(n),e.append(g.element))}g.lastLevelMatch=q,p!==g.lastIndent.peek()&&g.lastIndent.push(p),g.lastLi=angular.element("
              1. "),g.element.append(g.lastLi),g.lastLi.html(j.html().replace(/[\s\S]*?/gi,"")),j.remove()}else h(!1),e.append(j)}var r=function(a){a=angular.element(a);for(var b=a[0].childNodes.length-1;b>=0;b--)a.after(a[0].childNodes[b]);a.remove()};angular.forEach(e.find("span"),function(a){a.removeAttribute("lang"),a.attributes.length<=0&&r(a)}),angular.forEach(e.find("font"),r),a=e.html()}else{if(a=a.replace(/<(|\/)meta[^>]*?>/gi,""),a.match(/<[^>]*?(ta-bind)[^>]*?>/)){if(a.match(/<[^>]*?(text-angular)[^>]*?>/)){var s=angular.element("
                "+a+"
                ");s.find("textarea").remove();for(var u=t.getByAttribute(s,"ta-bind"),w=0;w',"")}}else a.match(/^.<\/span>/gi)||(a=a.replace(/<(|\/)span[^>]*?>/gi,"")));a=a.replace(/
                ]*?>/gi,"").replace(/( | )<\/span>/gi," ")}//i.test(a)&&/(|).*/i.test(a)===!1&&(a=a.replace(/.*<\/li(\s.*)?>/i,"
                  $&
                ")),a=a.replace(/^[ |\u00A0]+/gm,function(a){for(var b="",c=0;c").replace(/\t/g,"    "),A&&(a=A(l,{$html:a})||a),a=d(a,"",K),m.insertHtml(a,v[0]),f(function(){D.$setViewValue(Y()),_=!1,v.removeClass("processing-paste")},0)}else _=!1,v.removeClass("processing-paste")};v.on("paste",l.events.paste=function(a,b){if(b&&angular.extend(a,b),H||_)return a.stopPropagation(),a.preventDefault(),!1;_=!0,v.addClass("processing-paste");var c,d=(a.originalEvent||a).clipboardData;if(d&&d.getData&&d.types.length>0){for(var e="",g=0;g
          ');j.find("body").append(k),k[0].focus(),f(function(){i.rangy.restoreSelection(h),aa(k[0].innerHTML),v[0].focus(),k.remove()},0)}),v.on("cut",l.events.cut=function(a){H?a.preventDefault():f(function(){D.$setViewValue(Y())},0)}),v.on("keydown",l.events.keydown=function(a,b){b&&angular.extend(a,b),a.specialKey=y(a);var c;if(q.keyMappings.forEach(function(b){a.specialKey===b.commandKeyCode&&(a.specialKey=void 0),b.testForKey(a)&&(c=b.commandKeyCode),"UndoKey"!==b.commandKeyCode&&"RedoKey"!==b.commandKeyCode||b.enablePropagation||a.preventDefault()}),"undefined"!=typeof c&&(a.specialKey=c),"undefined"==typeof a.specialKey||"UndoKey"===a.specialKey&&"RedoKey"===a.specialKey||(a.preventDefault(),u.sendKeyCommand(l,a)),!H&&("UndoKey"===a.specialKey&&(W(),a.preventDefault()),"RedoKey"===a.specialKey&&(X(),a.preventDefault()),13===a.keyCode&&!a.shiftKey)){var d,f=m.getSelectionElement();if(!f.tagName.match(e))return;var g=angular.element(B);if(/^$/i.test(f.innerHTML.trim())&&"blockquote"===f.parentNode.tagName.toLowerCase()&&!f.nextSibling){d=angular.element(f);var h=d.parent();h.after(g),d.remove(),0===h.children().length&&h.remove(),m.setSelectionToElementStart(g[0]),a.preventDefault()}else/^<[^>]+><\/[^>]+>$/i.test(f.innerHTML.trim())&&"blockquote"===f.tagName.toLowerCase()&&(d=angular.element(f),d.after(g),d.remove(),m.setSelectionToElementStart(g[0]),a.preventDefault())}});var ba;if(v.on("keyup",l.events.keyup=function(a,b){if(b&&angular.extend(a,b),9===a.keyCode){var c=m.getSelection();return void(c.start.element===v[0]&&v.children().length&&m.setSelectionToElementStart(v.children()[0]))}if(U&&f.cancel(U),!H&&!L.test(a.keyCode)){if(""!==B&&13===a.keyCode&&!a.shiftKey){for(var d=m.getSelectionElement();!d.tagName.match(e)&&d!==v[0];)d=d.parentNode;if(d.tagName.toLowerCase()!==w.taDefaultWrap&&"li"!==d.tagName.toLowerCase()&&(""===d.innerHTML.trim()||"
          "===d.innerHTML.trim())){var g=angular.element(B);angular.element(d).replaceWith(g),m.setSelectionToElementStart(g[0])}}var h=Y();""!==B&&""===h.trim()?(ka(B),m.setSelectionToElementStart(v.children()[0])):"<"!==h.substring(0,1)&&""!==w.taDefaultWrap;var i=z!==a.keyCode&&M.test(a.keyCode);ba&&f.cancel(ba),ba=f(function(){Z(h,i,!0)},E.$options.debounce||400),i||(U=f(function(){D.$undoManager.push(h)},250)),z=a.keyCode}}),v.on("blur",l.events.blur=function(){I=!1,H?(J=!0,D.$render()):Z(void 0,void 0,!0)}),w.placeholder&&(a.ie>8||void 0===a.ie)){var ca;if(!w.id)throw"textAngular Error: An unique ID is required for placeholders to work";ca=g("#"+w.id+".placeholder-text:before",'content: "'+w.placeholder+'"'),l.$on("$destroy",function(){h(ca)})}v.on("focus",l.events.focus=function(){I=!0,v.removeClass("placeholder-text"),ja()}),v.on("mouseup",l.events.mouseup=function(){var a=m.getSelection();a.start.element===v[0]&&v.children().length&&m.setSelectionToElementStart(v.children()[0])}),v.on("mousedown",l.events.mousedown=function(a,b){b&&angular.extend(a,b),a.stopPropagation()})}else{v.on("change blur",l.events.change=l.events.blur=function(){H||D.$setViewValue(Y())}),v.on("keydown",l.events.keydown=function(a,b){if(b&&angular.extend(a,b),9===a.keyCode){var c=this.selectionStart,d=this.selectionEnd,e=v.val();if(a.shiftKey){var f=e.lastIndexOf("\n",c),g=e.lastIndexOf(" ",c);-1!==g&&g>=f&&(v.val(e.substring(0,g)+e.substring(g+1)),this.selectionStart=this.selectionEnd=c-1)}else v.val(e.substring(0,c)+" "+e.substring(d)),this.selectionStart=this.selectionEnd=c+1;a.preventDefault()}});var da=function(a,b){for(var c="",d=0;b>d;d++)c+=a;return c},ea=function(a,b,c){for(var d=0;d"):"#text"===e?void(c+=d.textContent):void(d.outerHTML&&(c+="ul"===e||"ol"===e?"\n"+fa(d,b):"\n"+da(" ",b)+d.outerHTML))}),c+="\n"+da(" ",b-1)+a.outerHTML.substring(a.outerHTML.lastIndexOf("<"))};D.$formatters.unshift(function(a){ +var b=angular.element("
          "+a+"
          ")[0].childNodes;return b.length>0&&(a="",ea(b,function(b,c){var d=c.nodeName.toLowerCase();return"#comment"===d?void(a+=""):"#text"===d?void(a+=c.textContent):void(c.outerHTML&&(a.length>0&&(a+="\n"),a+="ul"===d||"ol"===d?""+fa(c,0):""+c.outerHTML))})),a})}var ga,ha=function(a){return l.$emit("ta-element-select",this),a.preventDefault(),!1},ia=function(a,b){if(b&&angular.extend(a,b),!n&&!H){n=!0;var c;c=a.originalEvent?a.originalEvent.dataTransfer:a.dataTransfer,l.$emit("ta-drop-event",this,a,c),f(function(){n=!1,Z(void 0,void 0,!0)},100)}},ja=l["reApplyOnSelectorHandlers"+(w.id||"")]=function(){H||angular.forEach(o,function(a){v.find(a).off("click",ha).on("click",ha)})},ka=function(a){v[0].innerHTML=a},la=!1;D.$render=function(){if(!la){la=!0;var a=D.$viewValue||"";J||(F&&I&&(v.removeClass("placeholder-text"),ga&&f.cancel(ga),ga=f(function(){I||(v[0].focus(),m.setSelectionToElementEnd(v.children()[v.children().length-1])),ga=void 0},1)),F?(ka(w.placeholder?""===a?B:a:""===a?B:a),H?v.off("drop",ia):(ja(),v.on("drop",ia))):"textarea"!==v[0].tagName.toLowerCase()&&"input"!==v[0].tagName.toLowerCase()?ka(p(a)):v.val(a)),F&&w.placeholder&&(""===a?I?v.removeClass("placeholder-text"):v.addClass("placeholder-text"):v.removeClass("placeholder-text")),la=J=!1}},w.taReadonly&&(H=l.$eval(w.taReadonly),H?(v.addClass("ta-readonly"),"textarea"!==v[0].tagName.toLowerCase()&&"input"!==v[0].tagName.toLowerCase()||v.attr("disabled","disabled"),void 0!==v.attr("contenteditable")&&v.attr("contenteditable")&&v.removeAttr("contenteditable")):(v.removeClass("ta-readonly"),"textarea"===v[0].tagName.toLowerCase()||"input"===v[0].tagName.toLowerCase()?v.removeAttr("disabled"):F&&v.attr("contenteditable","true")),l.$watch(w.taReadonly,function(a,b){b!==a&&(a?(v.addClass("ta-readonly"),"textarea"!==v[0].tagName.toLowerCase()&&"input"!==v[0].tagName.toLowerCase()||v.attr("disabled","disabled"),void 0!==v.attr("contenteditable")&&v.attr("contenteditable")&&v.removeAttr("contenteditable"),angular.forEach(o,function(a){v.find(a).on("click",ha)}),v.off("drop",ia)):(v.removeClass("ta-readonly"),"textarea"===v[0].tagName.toLowerCase()||"input"===v[0].tagName.toLowerCase()?v.removeAttr("disabled"):F&&v.attr("contenteditable","true"),angular.forEach(o,function(a){v.find(a).off("click",ha)}),v.on("drop",ia)),H=a)})),F&&!H&&(angular.forEach(o,function(a){v.find(a).on("click",ha)}),v.on("drop",ia),v.on("blur",function(){a.webkit&&(b=!0)}))}}}]);var n=!1,o=angular.module("textAngular",["ngSanitize","textAngularSetup","textAngular.factories","textAngular.DOM","textAngular.validators","textAngular.taBind"]);o.config([function(){angular.forEach(taTools,function(a,b){delete taTools[b]})}]),o.run([function(){if("function"==typeof define&&define.amd)define(function(a){window.rangy=a("rangy"),window.rangy.saveSelection=a("rangy/lib/rangy-selectionsaverestore")});else if("function"==typeof require&&"undefined"!=typeof module&&"object"==typeof exports)window.rangy=require("rangy"),window.rangy.saveSelection=require("rangy/lib/rangy-selectionsaverestore");else{if(!window.rangy)throw"rangy-core.js and rangy-selectionsaverestore.js are required for textAngular to work correctly, rangy-core is not yet loaded.";if(window.rangy.init(),!window.rangy.saveSelection)throw"rangy-selectionsaverestore.js is required for textAngular to work correctly."}}]),o.directive("textAngular",["$compile","$timeout","taOptions","taSelection","taExecCommand","textAngularManager","$window","$document","$animate","$log","$q","$parse",function(a,b,c,d,e,f,g,h,i,j,k,l){return{require:"?ngModel",scope:{},restrict:"EA",priority:2,link:function(m,n,o,p){var q,r,s,t,u,v,w,x,y,z,A,B=o.serial?o.serial:Math.floor(1e16*Math.random());m._name=o.name?o.name:"textAngularEditor"+B;var C=function(a,c,d){b(function(){var b=function(){a.off(c,b),d.apply(this,arguments)};a.on(c,b)},100)};if(y=e(o.taDefaultWrap),angular.extend(m,angular.copy(c),{wrapSelection:function(a,b,c){"undo"===a.toLowerCase()?m["$undoTaBindtaTextElement"+B]():"redo"===a.toLowerCase()?m["$redoTaBindtaTextElement"+B]():(y(a,!1,b,m.defaultTagAttributes),c&&m["reApplyOnSelectorHandlerstaTextElement"+B](),m.displayElements.text[0].focus())},showHtml:m.$eval(o.taShowHtml)||!1}),o.taFocussedClass&&(m.classes.focussed=o.taFocussedClass),o.taTextEditorClass&&(m.classes.textEditor=o.taTextEditorClass),o.taHtmlEditorClass&&(m.classes.htmlEditor=o.taHtmlEditorClass),o.taDefaultTagAttributes)try{angular.extend(m.defaultTagAttributes,angular.fromJson(o.taDefaultTagAttributes))}catch(D){j.error(D)}o.taTextEditorSetup&&(m.setup.textEditorSetup=m.$parent.$eval(o.taTextEditorSetup)),o.taHtmlEditorSetup&&(m.setup.htmlEditorSetup=m.$parent.$eval(o.taHtmlEditorSetup)),o.taFileDrop?m.fileDropHandler=m.$parent.$eval(o.taFileDrop):m.fileDropHandler=m.defaultFileDropHandler,w=n[0].innerHTML,n[0].innerHTML="",m.displayElements={forminput:angular.element(""),html:angular.element(""),text:angular.element("
          "),scrollWindow:angular.element("
          "),popover:angular.element('
          '),popoverArrow:angular.element('
          '),popoverContainer:angular.element('
          '),resize:{overlay:angular.element('
          '),background:angular.element('
          '),anchors:[angular.element('
          '),angular.element('
          '),angular.element('
          '),angular.element('
          ')],info:angular.element('
          ')}},m.displayElements.popover.append(m.displayElements.popoverArrow),m.displayElements.popover.append(m.displayElements.popoverContainer),m.displayElements.scrollWindow.append(m.displayElements.popover),m.displayElements.popover.on("mousedown",function(a,b){return b&&angular.extend(a,b),a.preventDefault(),!1}),m.showPopover=function(a){m.displayElements.popover.css("display","block"),m.reflowPopover(a),i.addClass(m.displayElements.popover,"in"),C(h.find("body"),"click keyup",function(){m.hidePopover()})},m.reflowPopover=function(a){m.displayElements.text[0].offsetHeight-51>a[0].offsetTop?(m.displayElements.popover.css("top",a[0].offsetTop+a[0].offsetHeight+m.displayElements.scrollWindow[0].scrollTop+"px"),m.displayElements.popover.removeClass("top").addClass("bottom")):(m.displayElements.popover.css("top",a[0].offsetTop-54+m.displayElements.scrollWindow[0].scrollTop+"px"),m.displayElements.popover.removeClass("bottom").addClass("top"));var b=m.displayElements.text[0].offsetWidth-m.displayElements.popover[0].offsetWidth,c=a[0].offsetLeft+a[0].offsetWidth/2-m.displayElements.popover[0].offsetWidth/2;m.displayElements.popover.css("left",Math.max(0,Math.min(b,c))+"px"),m.displayElements.popoverArrow.css("margin-left",Math.min(c,Math.max(0,c-b))-11+"px")},m.hidePopover=function(){m.displayElements.popover.css("display",""),m.displayElements.popoverContainer.attr("style",""),m.displayElements.popoverContainer.attr("class","popover-content"),m.displayElements.popover.removeClass("in")},m.displayElements.resize.overlay.append(m.displayElements.resize.background),angular.forEach(m.displayElements.resize.anchors,function(a){m.displayElements.resize.overlay.append(a)}),m.displayElements.resize.overlay.append(m.displayElements.resize.info),m.displayElements.scrollWindow.append(m.displayElements.resize.overlay),m.reflowResizeOverlay=function(a){a=angular.element(a)[0],m.displayElements.resize.overlay.css({display:"block",left:a.offsetLeft-5+"px",top:a.offsetTop-5+"px",width:a.offsetWidth+10+"px",height:a.offsetHeight+10+"px"}),m.displayElements.resize.info.text(a.offsetWidth+" x "+a.offsetHeight)},m.showResizeOverlay=function(a){var b=h.find("body");z=function(c){var d={width:parseInt(a.attr("width")),height:parseInt(a.attr("height")),x:c.clientX,y:c.clientY};(void 0===d.width||isNaN(d.width))&&(d.width=a[0].offsetWidth),(void 0===d.height||isNaN(d.height))&&(d.height=a[0].offsetHeight),m.hidePopover();var e=d.height/d.width,f=function(b){function c(a){return Math.round(Math.max(0,a))}var f={x:Math.max(0,d.width+(b.clientX-d.x)),y:Math.max(0,d.height+(b.clientY-d.y))},g=void 0!==o.taResizeForceAspectRatio,h=o.taResizeMaintainAspectRatio,i=g||h&&!b.shiftKey;if(i){var j=f.y/f.x;f.x=e>j?f.x:f.y/e,f.y=e>j?f.x*e:f.y}var k=angular.element(a);k.css("height",c(f.y)+"px"),k.css("width",c(f.x)+"px"),m.reflowResizeOverlay(a)};b.on("mousemove",f),C(b,"mouseup",function(c){c.preventDefault(),c.stopPropagation(),b.off("mousemove",f),m.showPopover(a)}),c.stopPropagation(),c.preventDefault()},m.displayElements.resize.anchors[3].off("mousedown"),m.displayElements.resize.anchors[3].on("mousedown",z),m.reflowResizeOverlay(a),C(b,"click",function(){m.hideResizeOverlay()})},m.hideResizeOverlay=function(){m.displayElements.resize.anchors[3].off("mousedown",z),m.displayElements.resize.overlay.css("display","")},m.setup.htmlEditorSetup(m.displayElements.html),m.setup.textEditorSetup(m.displayElements.text),m.displayElements.html.attr({id:"taHtmlElement"+B,"ng-show":"showHtml","ta-bind":"ta-bind","ng-model":"html","ng-model-options":n.attr("ng-model-options")}),m.displayElements.text.attr({id:"taTextElement"+B,contentEditable:"true","ta-bind":"ta-bind","ng-model":"html","ng-model-options":n.attr("ng-model-options")}),m.displayElements.scrollWindow.attr({"ng-hide":"showHtml"}),o.taDefaultWrap&&m.displayElements.text.attr("ta-default-wrap",o.taDefaultWrap),o.taUnsafeSanitizer&&(m.displayElements.text.attr("ta-unsafe-sanitizer",o.taUnsafeSanitizer),m.displayElements.html.attr("ta-unsafe-sanitizer",o.taUnsafeSanitizer)),m.displayElements.scrollWindow.append(m.displayElements.text),n.append(m.displayElements.scrollWindow),n.append(m.displayElements.html),m.displayElements.forminput.attr("name",m._name),n.append(m.displayElements.forminput),o.tabindex&&(n.removeAttr("tabindex"),m.displayElements.text.attr("tabindex",o.tabindex),m.displayElements.html.attr("tabindex",o.tabindex)),o.placeholder&&(m.displayElements.text.attr("placeholder",o.placeholder),m.displayElements.html.attr("placeholder",o.placeholder)),o.taDisabled&&(m.displayElements.text.attr("ta-readonly","disabled"),m.displayElements.html.attr("ta-readonly","disabled"),m.disabled=m.$parent.$eval(o.taDisabled),m.$parent.$watch(o.taDisabled,function(a){m.disabled=a,m.disabled?n.addClass(m.classes.disabled):n.removeClass(m.classes.disabled)})),o.taPaste&&(m._pasteHandler=function(a){return l(o.taPaste)(m.$parent,{$html:a})},m.displayElements.text.attr("ta-paste","_pasteHandler($html)")),a(m.displayElements.scrollWindow)(m),a(m.displayElements.html)(m),m.updateTaBindtaTextElement=m["updateTaBindtaTextElement"+B],m.updateTaBindtaHtmlElement=m["updateTaBindtaHtmlElement"+B],n.addClass("ta-root"),m.displayElements.scrollWindow.addClass("ta-text ta-editor "+m.classes.textEditor),m.displayElements.html.addClass("ta-html ta-editor "+m.classes.htmlEditor),m._actionRunning=!1;var E=!1;if(m.startAction=function(){return m._actionRunning=!0,E=g.rangy.saveSelection(),function(){E&&g.rangy.restoreSelection(E)}},m.endAction=function(){m._actionRunning=!1,E&&(m.showHtml?m.displayElements.html[0].focus():m.displayElements.text[0].focus(),g.rangy.removeMarkers(E)),E=!1,m.updateSelectedStyles(),m.showHtml||m["updateTaBindtaTextElement"+B]()},u=function(){m.focussed=!0,n.addClass(m.classes.focussed),x.focus(),n.triggerHandler("focus")},m.displayElements.html.on("focus",u),m.displayElements.text.on("focus",u),v=function(a){return m._actionRunning||h[0].activeElement===m.displayElements.html[0]||h[0].activeElement===m.displayElements.text[0]||(n.removeClass(m.classes.focussed),x.unfocus(),b(function(){m._bUpdateSelectedStyles=!1,n.triggerHandler("blur"),m.focussed=!1},0)),a.preventDefault(),!1},m.displayElements.html.on("blur",v),m.displayElements.text.on("blur",v),m.displayElements.text.on("paste",function(a){n.triggerHandler("paste",a)}),m.queryFormatBlockState=function(a){return!m.showHtml&&a.toLowerCase()===h[0].queryCommandValue("formatBlock").toLowerCase()},m.queryCommandState=function(a){return m.showHtml?"":h[0].queryCommandState(a)},m.switchView=function(){m.showHtml=!m.showHtml,i.enabled(!1,m.displayElements.html),i.enabled(!1,m.displayElements.text),m.showHtml?b(function(){return i.enabled(!0,m.displayElements.html),i.enabled(!0,m.displayElements.text),m.displayElements.html[0].focus()},100):b(function(){return i.enabled(!0,m.displayElements.html),i.enabled(!0,m.displayElements.text),m.displayElements.text[0].focus()},100)},o.ngModel){var F=!0;p.$render=function(){if(F){F=!1;var a=m.$parent.$eval(o.ngModel);void 0!==a&&null!==a||!w||""===w||p.$setViewValue(w)}m.displayElements.forminput.val(p.$viewValue),m.html=p.$viewValue||""},n.attr("required")&&(p.$validators.required=function(a,b){var c=a||b;return!(!c||""===c.trim())})}else m.displayElements.forminput.val(w),m.html=w;if(m.$watch("html",function(a,b){a!==b&&(o.ngModel&&p.$viewValue!==a&&p.$setViewValue(a),m.displayElements.forminput.val(a))}),o.taTargetToolbars)x=f.registerEditor(m._name,m,o.taTargetToolbars.split(","));else{var G=angular.element('
          ');o.taToolbar&&G.attr("ta-toolbar",o.taToolbar),o.taToolbarClass&&G.attr("ta-toolbar-class",o.taToolbarClass),o.taToolbarGroupClass&&G.attr("ta-toolbar-group-class",o.taToolbarGroupClass),o.taToolbarButtonClass&&G.attr("ta-toolbar-button-class",o.taToolbarButtonClass),o.taToolbarActiveButtonClass&&G.attr("ta-toolbar-active-button-class",o.taToolbarActiveButtonClass),o.taFocussedClass&&G.attr("ta-focussed-class",o.taFocussedClass),n.prepend(G),a(G)(m.$parent),x=f.registerEditor(m._name,m,["textAngularToolbar"+B])}m.$on("$destroy",function(){f.unregisterEditor(m._name),angular.element(window).off("blur")}),m.$on("ta-element-select",function(a,b){x.triggerElementSelect(a,b)&&m["reApplyOnSelectorHandlerstaTextElement"+B]()}),m.$on("ta-drop-event",function(a,c,d,e){m.displayElements.text[0].focus(),e&&e.files&&e.files.length>0?(angular.forEach(e.files,function(a){try{k.when(m.fileDropHandler(a,m.wrapSelection)||m.fileDropHandler!==m.defaultFileDropHandler&&k.when(m.defaultFileDropHandler(a,m.wrapSelection))).then(function(){m["updateTaBindtaTextElement"+B]()})}catch(b){j.error(b)}}),d.preventDefault(),d.stopPropagation()):b(function(){m["updateTaBindtaTextElement"+B]()},0)}),m._bUpdateSelectedStyles=!1,angular.element(window).on("blur",function(){m._bUpdateSelectedStyles=!1,m.focussed=!1}),m.updateSelectedStyles=function(){var a;A&&b.cancel(A),void 0!==(a=d.getSelectionElement())&&a.parentNode!==m.displayElements.text[0]?x.updateSelectedStyles(angular.element(a)):x.updateSelectedStyles(),m._bUpdateSelectedStyles&&(A=b(m.updateSelectedStyles,200))},q=function(){return m.focussed?void(m._bUpdateSelectedStyles||(m._bUpdateSelectedStyles=!0,m.$apply(function(){m.updateSelectedStyles()}))):void(m._bUpdateSelectedStyles=!1)},m.displayElements.html.on("keydown",q),m.displayElements.text.on("keydown",q),r=function(){m._bUpdateSelectedStyles=!1},m.displayElements.html.on("keyup",r),m.displayElements.text.on("keyup",r),s=function(a,b){b&&angular.extend(a,b),m.$apply(function(){return x.sendKeyCommand(a)?(m._bUpdateSelectedStyles||m.updateSelectedStyles(),a.preventDefault(),!1):void 0})},m.displayElements.html.on("keypress",s),m.displayElements.text.on("keypress",s),t=function(){m._bUpdateSelectedStyles=!1,m.$apply(function(){m.updateSelectedStyles()})},m.displayElements.html.on("mouseup",t),m.displayElements.text.on("mouseup",t)}}}]),o.service("textAngularManager",["taToolExecuteAction","taTools","taRegisterTool",function(a,b,c){var d={},e={};return{registerEditor:function(c,f,g){if(!c||""===c)throw"textAngular Error: An editor requires a name";if(!f)throw"textAngular Error: An editor requires a scope";if(e[c])throw'textAngular Error: An Editor with name "'+c+'" already exists';var h=[];return angular.forEach(g,function(a){d[a]&&h.push(d[a])}),e[c]={scope:f,toolbars:g,_registerToolbar:function(a){this.toolbars.indexOf(a.name)>=0&&h.push(a)},editorFunctions:{disable:function(){angular.forEach(h,function(a){a.disabled=!0})},enable:function(){angular.forEach(h,function(a){a.disabled=!1})},focus:function(){angular.forEach(h,function(a){a._parent=f,a.disabled=!1,a.focussed=!0,f.focussed=!0})},unfocus:function(){angular.forEach(h,function(a){a.disabled=!0,a.focussed=!1}),f.focussed=!1},updateSelectedStyles:function(a){angular.forEach(h,function(b){angular.forEach(b.tools,function(c){c.activeState&&(b._parent=f,c.active=c.activeState(a))})})},sendKeyCommand:function(c){var d=!1;return(c.ctrlKey||c.metaKey||c.specialKey)&&angular.forEach(b,function(b,e){if(b.commandKeyCode&&(b.commandKeyCode===c.which||b.commandKeyCode===c.specialKey))for(var g=0;g0)for(var k=0;k"),b&&b["class"]?d.addClass(b["class"]):d.addClass(g.classes.toolbarButton),d.attr("name",c.name),d.attr("ta-button","ta-button"),d.attr("ng-disabled","isDisabled()"),d.attr("tabindex","-1"),d.attr("ng-click","executeAction()"),d.attr("ng-class","displayActiveToolClass(active)"),b&&b.tooltiptext&&d.attr("title",b.tooltiptext),b&&!b.display&&!c._display&&(d[0].innerHTML="",b.buttontext&&(d[0].innerHTML=b.buttontext),b.iconclass)){var e=angular.element(""),f=d[0].innerHTML;e.addClass(b.iconclass),d[0].innerHTML="",d.append(e),f&&""!==f&&d.append(" "+f)}return c._lastToolDefinition=angular.copy(b),a(d)(c)};g.tools={},g._parent={disabled:!0,showHtml:!1,queryFormatBlockState:function(){return!1},queryCommandState:function(){return!1}};var k={$window:f,$editor:function(){return g._parent},isDisabled:function(){return"function"!=typeof this.$eval("disabled")&&this.$eval("disabled")||this.$eval("disabled()")||"html"!==this.name&&this.$editor().showHtml||this.$parent.disabled||this.$editor().disabled},displayActiveToolClass:function(a){return a?g.classes.toolbarButtonActive:""},executeAction:e};angular.forEach(g.toolbar,function(a){var b=angular.element("
          ");b.addClass(g.classes.toolbarGroup),angular.forEach(a,function(a){g.tools[a]=angular.extend(g.$new(!0),d[a],k,{name:a}),g.tools[a].$element=j(d[a],g.tools[a]),b.append(g.tools[a].$element)}),h.append(b)}),g.updateToolDisplay=function(a,b,c){var d=g.tools[a];if(d){if(d._lastToolDefinition&&!c&&(b=angular.extend({},d._lastToolDefinition,b)),null===b.buttontext&&null===b.iconclass&&null===b.display)throw'textAngular Error: Tool Definition for updating "'+a+'" does not have a valid display/iconclass/buttontext value';null===b.buttontext&&delete b.buttontext,null===b.iconclass&&delete b.iconclass,null===b.display&&delete b.display;var e=j(b,d);d.$element.replaceWith(e),d.$element=e}},g.addTool=function(a,b,c,e){g.tools[a]=angular.extend(g.$new(!0),d[a],k,{name:a}),g.tools[a].$element=j(d[a],g.tools[a]);var f;void 0===c&&(c=g.toolbar.length-1),f=angular.element(h.children()[c]),void 0===e?(f.append(g.tools[a].$element),g.toolbar[c][g.toolbar[c].length-1]=a):(f.children().eq(e).after(g.tools[a].$element),g.toolbar[c][e]=a)},b.registerToolbar(g),g.$on("$destroy",function(){b.unregisterToolbar(g.name)})}}}])}(),function(a,b,c){"use strict";function d(){this.$get=["$$sanitizeUri",function(a){return function(b){"undefined"!=typeof arguments[1]&&(arguments[1].version="taSanitize");var c=[];return g(b,l(c,function(b,c){return!/^unsafe/.test(a(b,c))})),c.join("")}}]}function e(a){var c=[],d=l(c,b.noop);return d.chars(a),c.join("")}function f(a){var b,c={},d=a.split(",");for(b=0;b=0&&k[f]!=d;f--);if(f>=0){for(e=k.length-1;e>=f;e--)c.end&&c.end(k[e]);k.length=f}}"string"!=typeof a&&(a=null===a||"undefined"==typeof a?"":""+a);var f,g,i,j,k=[],l=a;for(k.last=function(){return k[k.length-1]};a;){if(j="",g=!0,k.last()&&G[k.last()])a=a.replace(new RegExp("([^]*)<\\s*\\/\\s*"+k.last()+"[^>]*>","i"),function(a,b){return b=b.replace(s,"$1").replace(v,"$1"),c.chars&&c.chars(h(b)),""}),e("",k.last());else{if(y.test(a)){if(i=a.match(y)){i[0];c.whitespace&&c.whitespace(i[0]),a=a.replace(i[0],""),g=!1}}else t.test(a)?(i=a.match(t),i&&(c.comment&&c.comment(i[1]),a=a.replace(i[0],""),g=!1)):u.test(a)?(i=a.match(u),i&&(a=a.replace(i[0],""),g=!1)):r.test(a)?(i=a.match(o),i&&(a=a.substring(i[0].length),i[0].replace(o,e),g=!1)):q.test(a)&&(i=a.match(n),i?(i[4]&&(a=a.substring(i[0].length),i[0].replace(n,d)),g=!1):(j+="<",a=a.substring(1)));g&&(f=a.indexOf("<"),j+=0>f?a:a.substring(0,f),a=0>f?"":a.substring(f),c.chars&&c.chars(h(j)))}if(a==l)throw m("badparse","The sanitizer was unable to parse the following block of html: {0}",a);l=a}e()}function h(a){if(!a)return"";var b=N.exec(a),c=b[1],d=b[3],e=b[2];return e&&(M.innerHTML=e.replace(/=b||173==b||b>=1536&&1540>=b||1807==b||6068==b||6069==b||b>=8204&&8207>=b||b>=8232&&8239>=b||b>=8288&&8303>=b||65279==b||b>=65520&&65535>=b?"&#"+b+";":a}).replace(//g,">")}function j(a){var c="",d=a.split(";");return b.forEach(d,function(a){var d=a.split(":");if(2==d.length){var e=O(b.lowercase(d[0])),a=O(b.lowercase(d[1]));(("color"===e||"background-color"===e)&&(a.match(/^rgb\([0-9%,\. ]*\)$/i)||a.match(/^rgba\([0-9%,\. ]*\)$/i)||a.match(/^hsl\([0-9%,\. ]*\)$/i)||a.match(/^hsla\([0-9%,\. ]*\)$/i)||a.match(/^#[0-9a-f]{3,6}$/i)||a.match(/^[a-z]*$/i))||"text-align"===e&&("left"===a||"right"===a||"center"===a||"justify"===a)||"float"===e&&("left"===a||"right"===a||"none"===a)||("width"===e||"height"===e)&&a.match(/[0-9\.]*(px|em|rem|%)/)||"direction"===e&&a.match(/^ltr|rtl|initial|inherit$/))&&(c+=e+": "+a+";")}}),c}function k(a,b,c,d){return!("img"!==a||!b["ta-insert-video"]||"ta-insert-video"!==c&&"allowfullscreen"!==c&&"frameborder"!==c&&("contenteditable"!==c||"false"!==d))}function l(a,c){var d=!1,e=b.bind(a,a.push);return{start:function(a,f,g){a=b.lowercase(a),!d&&G[a]&&(d=a),d||H[a]!==!0||(e("<"),e(a),b.forEach(f,function(d,g){var h=b.lowercase(g),l="img"===a&&"src"===h||"background"===h;("style"===h&&""!==(d=j(d))||k(a,f,h,d)||L[h]===!0&&(I[h]!==!0||c(d,l)))&&(e(" "),e(g),e('="'),e(i(d)),e('"'))}),e(g?"/>":">"))},comment:function(a){e(a)},whitespace:function(a){e(i(a))},end:function(a){a=b.lowercase(a),d||H[a]!==!0||(e("")),a==d&&(d=!1)},chars:function(a){d||e(i(a))}}}var m=b.$$minErr("$sanitize"),n=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,o=/^<\/\s*([\w:-]+)[^>]*>/,p=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,q=/^/g,t=/(^)/,u=/]*?)>/i,v=//g,w=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,x=/([^\#-~| |!])/g,y=/^(\s+)/,z=f("area,br,col,hr,img,wbr,input"),A=f("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),B=f("rp,rt"),C=b.extend({},B,A),D=b.extend({},A,f("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),E=b.extend({},B,f("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),F=f("animate,animateColor,animateMotion,animateTransform,circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,set,stop,svg,switch,text,title,tspan,use"),G=f("script,style"),H=b.extend({},z,D,E,C,F),I=f("background,cite,href,longdesc,src,usemap,xlink:href"),J=f("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,id,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width"),K=f("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,attributeName,attributeType,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan"),L=b.extend({},I,K,J),M=document.createElement("pre"),N=/^(\s*)([\s\S]*?)(\s*)$/,O=function(){return String.prototype.trim?function(a){return b.isString(a)?a.trim():a}:function(a){return b.isString(a)?a.replace(/^\s\s*/,"").replace(/\s\s*$/,""):a}}();b.module("ngSanitize",[]).provider("$sanitize",d),b.module("ngSanitize").filter("linky",["$sanitize",function(a){var c=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"”’]/,d=/^mailto:/;return function(f,g){function h(a){a&&n.push(e(a))}function i(a,c){n.push("'),h(c),n.push("")}if(!f)return f;for(var j,k,l,m=f,n=[];j=m.match(c);)k=j[0],j[2]||j[4]||(k=(j[3]?"http://":"mailto:")+k),l=j.index,h(m.substr(0,l)),i(k,j[0].replace(d,"")),m=m.substring(l+j[0].length);return h(m),a(n.join(""))}}])}(window,window.angular);var taTools={};angular.module("textAngularSetup",[]).constant("taRegisterTool",registerTextAngularTool).value("taTools",taTools).value("taOptions",{forceTextAngularSanitize:!0,keyMappings:[],toolbar:[["h1","h2","h3","h4","h5","h6","p","pre","quote"],["bold","italics","underline","strikeThrough","ul","ol","redo","undo","clear"],["justifyLeft","justifyCenter","justifyRight","justifyFull","indent","outdent"],["html","insertImage","insertLink","insertVideo","wordcount","charcount"]],classes:{focussed:"focussed",toolbar:"btn-toolbar",toolbarGroup:"btn-group",toolbarButton:"btn btn-default",toolbarButtonActive:"active",disabled:"disabled", +textEditor:"form-control",htmlEditor:"form-control"},defaultTagAttributes:{a:{target:""}},setup:{textEditorSetup:function(a){},htmlEditorSetup:function(a){}},defaultFileDropHandler:function(a,b){var c=new FileReader;return"image"===a.type.substring(0,5)?(c.onload=function(){""!==c.result&&b("insertImage",c.result,!0)},c.readAsDataURL(a),!0):!1}}).value("taSelectableElements",["a","img"]).value("taCustomRenderers",[{selector:"img",customAttribute:"ta-insert-video",renderLogic:function(a){var b=angular.element(""),c=a.prop("attributes");angular.forEach(c,function(a){b.attr(a.name,a.value)}),b.attr("src",b.attr("ta-insert-video")),a.replaceWith(b)}}]).value("taTranslations",{html:{tooltip:"Toggle html / Rich Text"},heading:{tooltip:"Heading "},p:{tooltip:"Paragraph"},pre:{tooltip:"Preformatted text"},ul:{tooltip:"Unordered List"},ol:{tooltip:"Ordered List"},quote:{tooltip:"Quote/unquote selection or paragraph"},undo:{tooltip:"Undo"},redo:{tooltip:"Redo"},bold:{tooltip:"Bold"},italic:{tooltip:"Italic"},underline:{tooltip:"Underline"},strikeThrough:{tooltip:"Strikethrough"},justifyLeft:{tooltip:"Align text left"},justifyRight:{tooltip:"Align text right"},justifyFull:{tooltip:"Justify text"},justifyCenter:{tooltip:"Center"},indent:{tooltip:"Increase indent"},outdent:{tooltip:"Decrease indent"},clear:{tooltip:"Clear formatting"},insertImage:{dialogPrompt:"Please enter an image URL to insert",tooltip:"Insert image",hotkey:"the - possibly language dependent hotkey ... for some future implementation"},insertVideo:{tooltip:"Insert video",dialogPrompt:"Please enter a youtube URL to embed"},insertLink:{tooltip:"Insert / edit link",dialogPrompt:"Please enter a URL to insert"},editLink:{reLinkButton:{tooltip:"Relink"},unLinkButton:{tooltip:"Unlink"},targetToggle:{buttontext:"Open in New Window"}},wordcount:{tooltip:"Display words Count"},charcount:{tooltip:"Display characters Count"}}).factory("taToolFunctions",["$window","taTranslations",function(a,b){return{imgOnSelectAction:function(a,b,c){var d=function(){c.updateTaBindtaTextElement(),c.hidePopover()};a.preventDefault(),c.displayElements.popover.css("width","375px");var e=c.displayElements.popoverContainer;e.empty();var f=angular.element('
          '),g=angular.element('');g.on("click",function(a){a.preventDefault(),b.css({width:"100%",height:""}),d()});var h=angular.element('');h.on("click",function(a){a.preventDefault(),b.css({width:"50%",height:""}),d()});var i=angular.element('');i.on("click",function(a){a.preventDefault(),b.css({width:"25%",height:""}),d()});var j=angular.element('');j.on("click",function(a){a.preventDefault(),b.css({width:"",height:""}),d()}),f.append(g),f.append(h),f.append(i),f.append(j),e.append(f),f=angular.element('
          ');var k=angular.element('');k.on("click",function(a){a.preventDefault(),b.css("float","left"),b.css("cssFloat","left"),b.css("styleFloat","left"),d()});var l=angular.element('');l.on("click",function(a){a.preventDefault(),b.css("float","right"),b.css("cssFloat","right"),b.css("styleFloat","right"),d()});var m=angular.element('');m.on("click",function(a){a.preventDefault(),b.css("float",""),b.css("cssFloat",""),b.css("styleFloat",""),d()}),f.append(k),f.append(m),f.append(l),e.append(f),f=angular.element('
          ');var n=angular.element('');n.on("click",function(a){a.preventDefault(),b.remove(),d()}),f.append(n),e.append(f),c.showPopover(b),c.showResizeOverlay(b)},aOnSelectAction:function(c,d,e){c.preventDefault(),e.displayElements.popover.css("width","436px");var f=e.displayElements.popoverContainer;f.empty(),f.css("line-height","28px");var g=angular.element(''+d.attr("href")+"");g.css({display:"inline-block","max-width":"200px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap","vertical-align":"middle"}),f.append(g);var h=angular.element('
          '),i=angular.element('');i.on("click",function(c){c.preventDefault();var f=a.prompt(b.insertLink.dialogPrompt,d.attr("href"));f&&""!==f&&"http://"!==f&&(d.attr("href",f),e.updateTaBindtaTextElement()),e.hidePopover()}),h.append(i);var j=angular.element('');j.on("click",function(a){a.preventDefault(),d.replaceWith(d.contents()),e.updateTaBindtaTextElement(),e.hidePopover()}),h.append(j);var k=angular.element('");"_blank"===d.attr("target")&&k.addClass("active"),k.on("click",function(a){a.preventDefault(),d.attr("target","_blank"===d.attr("target")?"":"_blank"),k.toggleClass("active"),e.updateTaBindtaTextElement()}),h.append(k),f.append(h),e.showPopover(d)},extractYoutubeVideoId:function(a){var b=/(?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/i,c=a.match(b);return c&&c[1]||null}}}]).run(["taRegisterTool","$window","taTranslations","taSelection","taToolFunctions","$sanitize","taOptions",function(a,b,c,d,e,f,g){var h={};if(f("",h),g.forceTextAngularSanitize===!0&&"taSanitize"!==h.version)throw angular.$$minErr("textAngular")("textAngularSetup","The textAngular-sanitize provider has been replaced by another -- have you included angular-sanitize by mistake?");a("html",{iconclass:"fa fa-code",tooltiptext:c.html.tooltip,action:function(){this.$editor().switchView()},activeState:function(){return this.$editor().showHtml}});var i=function(a){return function(){return this.$editor().queryFormatBlockState(a)}},j=function(){return this.$editor().wrapSelection("formatBlock","<"+this.name.toUpperCase()+">")};angular.forEach(["h1","h2","h3","h4","h5","h6"],function(b){a(b.toLowerCase(),{buttontext:b.toUpperCase(),tooltiptext:c.heading.tooltip+b.charAt(1),action:j,activeState:i(b.toLowerCase())})}),a("p",{buttontext:"P",tooltiptext:c.p.tooltip,action:function(){return this.$editor().wrapSelection("formatBlock","

          ")},activeState:function(){return this.$editor().queryFormatBlockState("p")}}),a("pre",{buttontext:"pre",tooltiptext:c.pre.tooltip,action:function(){return this.$editor().wrapSelection("formatBlock","

          ")},activeState:function(){return this.$editor().queryFormatBlockState("pre")}}),a("ul",{iconclass:"fa fa-list-ul",tooltiptext:c.ul.tooltip,action:function(){return this.$editor().wrapSelection("insertUnorderedList",null)},activeState:function(){return this.$editor().queryCommandState("insertUnorderedList")}}),a("ol",{iconclass:"fa fa-list-ol",tooltiptext:c.ol.tooltip,action:function(){return this.$editor().wrapSelection("insertOrderedList",null)},activeState:function(){return this.$editor().queryCommandState("insertOrderedList")}}),a("quote",{iconclass:"fa fa-quote-right",tooltiptext:c.quote.tooltip,action:function(){return this.$editor().wrapSelection("formatBlock","
          ")},activeState:function(){return this.$editor().queryFormatBlockState("blockquote")}}),a("undo",{iconclass:"fa fa-undo",tooltiptext:c.undo.tooltip,action:function(){return this.$editor().wrapSelection("undo",null)}}),a("redo",{iconclass:"fa fa-repeat",tooltiptext:c.redo.tooltip,action:function(){return this.$editor().wrapSelection("redo",null)}}),a("bold",{iconclass:"fa fa-bold",tooltiptext:c.bold.tooltip,action:function(){return this.$editor().wrapSelection("bold",null)},activeState:function(){return this.$editor().queryCommandState("bold")},commandKeyCode:98}),a("justifyLeft",{iconclass:"fa fa-align-left",tooltiptext:c.justifyLeft.tooltip,action:function(){return this.$editor().wrapSelection("justifyLeft",null)},activeState:function(a){if(a&&"#document"===a.nodeName)return!1;var b=!1;return a&&(b="left"===a.css("text-align")||"left"===a.attr("align")||"right"!==a.css("text-align")&&"center"!==a.css("text-align")&&"justify"!==a.css("text-align")&&!this.$editor().queryCommandState("justifyRight")&&!this.$editor().queryCommandState("justifyCenter")&&!this.$editor().queryCommandState("justifyFull")),b=b||this.$editor().queryCommandState("justifyLeft")}}),a("justifyRight",{iconclass:"fa fa-align-right",tooltiptext:c.justifyRight.tooltip,action:function(){return this.$editor().wrapSelection("justifyRight",null)},activeState:function(a){if(a&&"#document"===a.nodeName)return!1;var b=!1;return a&&(b="right"===a.css("text-align")),b=b||this.$editor().queryCommandState("justifyRight")}}),a("justifyFull",{iconclass:"fa fa-align-justify",tooltiptext:c.justifyFull.tooltip,action:function(){return this.$editor().wrapSelection("justifyFull",null)},activeState:function(a){var b=!1;return a&&(b="justify"===a.css("text-align")),b=b||this.$editor().queryCommandState("justifyFull")}}),a("justifyCenter",{iconclass:"fa fa-align-center",tooltiptext:c.justifyCenter.tooltip,action:function(){return this.$editor().wrapSelection("justifyCenter",null)},activeState:function(a){if(a&&"#document"===a.nodeName)return!1;var b=!1;return a&&(b="center"===a.css("text-align")),b=b||this.$editor().queryCommandState("justifyCenter")}}),a("indent",{iconclass:"fa fa-indent",tooltiptext:c.indent.tooltip,action:function(){return this.$editor().wrapSelection("indent",null)},activeState:function(){return this.$editor().queryFormatBlockState("blockquote")},commandKeyCode:"TabKey"}),a("outdent",{iconclass:"fa fa-outdent",tooltiptext:c.outdent.tooltip,action:function(){return this.$editor().wrapSelection("outdent",null)},activeState:function(){return!1},commandKeyCode:"ShiftTabKey"}),a("italics",{iconclass:"fa fa-italic",tooltiptext:c.italic.tooltip,action:function(){return this.$editor().wrapSelection("italic",null)},activeState:function(){return this.$editor().queryCommandState("italic")},commandKeyCode:105}),a("underline",{iconclass:"fa fa-underline",tooltiptext:c.underline.tooltip,action:function(){return this.$editor().wrapSelection("underline",null)},activeState:function(){return this.$editor().queryCommandState("underline")},commandKeyCode:117}),a("strikeThrough",{iconclass:"fa fa-strikethrough",tooltiptext:c.strikeThrough.tooltip,action:function(){return this.$editor().wrapSelection("strikeThrough",null)},activeState:function(){return document.queryCommandState("strikeThrough")}}),a("clear",{iconclass:"fa fa-ban",tooltiptext:c.clear.tooltip,action:function(a,b){var c;this.$editor().wrapSelection("removeFormat",null);var e=angular.element(d.getSelectionElement()),f=function(a){a=angular.element(a);var b=a;angular.forEach(a.children(),function(a){var c=angular.element("

          ");c.html(angular.element(a).html()),b.after(c),b=c}),a.remove()};if(angular.forEach(e.find("ul"),f),angular.forEach(e.find("ol"),f),"li"===e[0].tagName.toLowerCase()){var g=e[0].parentNode.childNodes,h=[],i=[],j=!1;for(c=0;c

          ");if(l.html(angular.element(e[0]).html()),0===h.length||0===i.length)0===i.length?k.after(l):k[0].parentNode.insertBefore(l[0],k[0]),0===h.length&&0===i.length?k.remove():angular.element(e[0]).remove();else{var m=angular.element("<"+k[0].tagName+">"),n=angular.element("<"+k[0].tagName+">");for(c=0;c';return this.$editor().wrapSelection("insertHTML",f,!0)}},onElementSelect:{element:"img",onlyWithAttrs:["ta-insert-video"],action:e.imgOnSelectAction}}),a("insertLink",{tooltiptext:c.insertLink.tooltip,iconclass:"fa fa-link",action:function(){var a;return a=b.prompt(c.insertLink.dialogPrompt,"http://"),a&&""!==a&&"http://"!==a?this.$editor().wrapSelection("createLink",a,!0):void 0},activeState:function(a){return a?"A"===a[0].tagName:!1},onElementSelect:{element:"a",action:e.aOnSelectAction}}),a("wordcount",{display:'
          Words:
          ',disabled:!0,wordcount:0,activeState:function(){var a=this.$editor().displayElements.text,b=a[0].innerHTML||"",c=0;return""!==b.replace(/\s*<[^>]*?>\s*/g,"")&&(c=b.replace(/<\/?(b|i|em|strong|span|u|strikethrough|a|img|small|sub|sup|label)( [^>*?])?>/gi,"").replace(/(<[^>]*?>\s*<[^>]*?>)/gi," ").replace(/(<[^>]*?>)/gi,"").replace(/\s+/gi," ").match(/\S+/g).length),this.wordcount=c,this.$editor().wordcount=c,!1}}),a("charcount",{display:'
          Characters:
          ',disabled:!0,charcount:0,activeState:function(){var a=this.$editor().displayElements.text,b=a[0].innerText||a[0].textContent,c=b.replace(/(\r\n|\n|\r)/gm,"").replace(/^\s+/g," ").replace(/\s+$/g," ").length;return this.charcount=c,this.$editor().charcount=c,!1}})}]),angular.module("ui.navbar",["ui.bootstrap","template/navbar-ul.html","template/navbar-li.html"]).directive("tree",function(){return{restrict:"E",replace:!0,scope:{tree:"="},templateUrl:"template/navbar-ul.html"}}).directive("leaf",["$compile",function(a){return{restrict:"E",replace:!0,scope:{leaf:"="},templateUrl:"template/navbar-li.html",link:function(b,c,d){if(angular.isArray(b.leaf.subtree)){c.append('');for(var e=c.parent(),f=!1;e.length>0&&!f;)e.hasClass("navbar-right")&&(f=!0),e=e.parent();f?c.addClass("dropdown-submenu-right"):c.addClass("dropdown-submenu"),a(c.contents())(b)}}}}]),angular.module("template/navbar-li.html",[]).run(["$templateCache",function(a){a.put("template/navbar-li.html",'
        • \n {{leaf.name}}\n
        • ')}]),angular.module("template/navbar-ul.html",[]).run(["$templateCache",function(a){a.put("template/navbar-ul.html","")}]),function(){"use strict";var a={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,COMMAND:91,MAP:{91:"COMMAND",8:"BACKSPACE",9:"TAB",13:"ENTER",16:"SHIFT",17:"CTRL",18:"ALT",19:"PAUSEBREAK",20:"CAPSLOCK",27:"ESC",32:"SPACE",33:"PAGE_UP",34:"PAGE_DOWN",35:"END",36:"HOME",37:"LEFT",38:"UP",39:"RIGHT",40:"DOWN",43:"+",44:"PRINTSCREEN",45:"INSERT",46:"DELETE",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NUMLOCK",145:"SCROLLLOCK",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},isControl:function(b){var c=b.which;switch(c){case a.COMMAND:case a.SHIFT:case a.CTRL:case a.ALT:return!0}return!!b.metaKey},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a},isVerticalMovement:function(b){return~[a.UP,a.DOWN].indexOf(b)},isHorizontalMovement:function(b){return~[a.LEFT,a.RIGHT,a.BACKSPACE,a.DELETE].indexOf(b)}};void 0===angular.element.prototype.querySelectorAll&&(angular.element.prototype.querySelectorAll=function(a){return angular.element(this[0].querySelectorAll(a))}),void 0===angular.element.prototype.closest&&(angular.element.prototype.closest=function(a){for(var b=this[0],c=b.matches||b.webkitMatchesSelector||b.mozMatchesSelector||b.msMatchesSelector;b;){if(c.bind(b)(a))return b;b=b.parentElement}return!1});var b=0,c=angular.module("ui.select",[]).constant("uiSelectConfig",{theme:"bootstrap",searchEnabled:!0,sortable:!1,placeholder:"",refreshDelay:1e3,closeOnSelect:!0,dropdownPosition:"auto",generateId:function(){return b++},appendToBody:!1}).service("uiSelectMinErr",function(){var a=angular.$$minErr("ui.select");return function(){var b=a.apply(this,arguments),c=b.message.replace(new RegExp("\nhttp://errors.angularjs.org/.*"),"");return new Error(c)}}).directive("uisTranscludeAppend",function(){return{link:function(a,b,c,d,e){e(a,function(a){b.append(a)})}}}).filter("highlight",function(){function a(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(b,c){return c&&b?b.replace(new RegExp(a(c),"gi"),'$&'):b}}).factory("uisOffset",["$document","$window",function(a,b){return function(c){var d=c[0].getBoundingClientRect();return{width:d.width||c.prop("offsetWidth"),height:d.height||c.prop("offsetHeight"),top:d.top+(b.pageYOffset||a[0].documentElement.scrollTop),left:d.left+(b.pageXOffset||a[0].documentElement.scrollLeft)}}}]);c.directive("uiSelectChoices",["uiSelectConfig","uisRepeatParser","uiSelectMinErr","$compile",function(a,b,c,d){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(b){var c=b.parent().attr("theme")||a.theme;return c+"/choices.tpl.html"},compile:function(e,f){if(!f.repeat)throw c("repeat","Expected 'repeat' expression.");return function(e,f,g,h,i){var j=g.groupBy,k=g.groupFilter;if(h.parseRepeatAttr(g.repeat,j,k),h.disableChoiceExpression=g.uiDisableChoice,h.onHighlightCallback=g.onHighlight,h.dropdownPosition=g.position?g.position.toLowerCase():a.dropdownPosition,j){var l=f.querySelectorAll(".ui-select-choices-group");if(1!==l.length)throw c("rows","Expected 1 .ui-select-choices-group but got '{0}'.",l.length);l.attr("ng-repeat",b.getGroupNgRepeatExpression())}var m=f.querySelectorAll(".ui-select-choices-row");if(1!==m.length)throw c("rows","Expected 1 .ui-select-choices-row but got '{0}'.",m.length);m.attr("ng-repeat",h.parserResult.repeatExpression(j)).attr("ng-if","$select.open").attr("ng-click","$select.select("+h.parserResult.itemName+",false,$event)");var n=f.querySelectorAll(".ui-select-choices-row-inner");if(1!==n.length)throw c("rows","Expected 1 .ui-select-choices-row-inner but got '{0}'.",n.length);n.attr("uis-transclude-append",""),d(f,i)(e),e.$watch("$select.search",function(a){a&&!h.open&&h.multiple&&h.activate(!1,!0),h.activeIndex=h.tagging.isActivated?-1:0,h.refresh(g.refresh)}),g.$observe("refreshDelay",function(){var b=e.$eval(g.refreshDelay);h.refreshDelay=void 0!==b?b:a.refreshDelay})}}}}]),c.controller("uiSelectCtrl",["$scope","$element","$timeout","$filter","uisRepeatParser","uiSelectMinErr","uiSelectConfig","$parse",function(b,c,d,e,f,g,h,i){function j(){(n.resetSearchInput||void 0===n.resetSearchInput&&h.resetSearchInput)&&(n.search=o,n.selected&&n.items.length&&!n.multiple&&(n.activeIndex=n.items.indexOf(n.selected)))}function k(a,b){var c,d,e=[];for(c=0;c0||0===n.search.length&&n.tagging.isActivated&&n.activeIndex>-1)&&n.activeIndex--;break;case a.TAB:n.multiple&&!n.open||n.select(n.items[n.activeIndex],!0);break;case a.ENTER:n.open&&(n.tagging.isActivated||n.activeIndex>=0)?n.select(n.items[n.activeIndex]):n.activate(!1,!0);break;case a.ESC:n.close();break;default:c=!1}return c}function m(){var a=c.querySelectorAll(".ui-select-choices-content"),b=a.querySelectorAll(".ui-select-choices-row");if(b.length<1)throw g("choices","Expected multiple .ui-select-choices-row but got '{0}'.",b.length);if(!(n.activeIndex<0)){var d=b[n.activeIndex],e=d.offsetTop+d.clientHeight-a[0].scrollTop,f=a[0].offsetHeight;e>f?a[0].scrollTop+=e-f:e=n.items.length?0:n.activeIndex,-1===n.activeIndex&&n.taggingLabel!==!1&&(n.activeIndex=0),d(function(){n.search=a||n.search,n.searchInput[0].focus(),!n.tagging.isActivated&&n.items.length>1&&m()}))},n.findGroupByName=function(a){return n.groups&&n.groups.filter(function(b){return b.name===a})[0]},n.parseRepeatAttr=function(a,c,d){function e(a){var e=b.$eval(c);if(n.groups=[],angular.forEach(a,function(a){var b=angular.isFunction(e)?e(a):a[e],c=n.findGroupByName(b);c?c.items.push(a):n.groups.push({name:b,items:[a]})}),d){var f=b.$eval(d);angular.isFunction(f)?n.groups=f(n.groups):angular.isArray(f)&&(n.groups=k(n.groups,f))}n.items=[],n.groups.forEach(function(a){n.items=n.items.concat(a.items)})}function h(a){n.items=a}n.setItemsFn=c?e:h,n.parserResult=f.parse(a),n.isGrouped=!!c,n.itemProperty=n.parserResult.itemName;var j=n.parserResult.source,l=function(){var a=j(b);b.$uisSource=Object.keys(a).map(function(b){var c={};return c[n.parserResult.keyName]=b,c.value=a[b],c})};n.parserResult.keyName&&(l(),n.parserResult.source=i("$uisSource"+n.parserResult.filters),b.$watch(j,function(a,b){a!==b&&l()},!0)),n.refreshItems=function(a){a=a||n.parserResult.source(b);var c=n.selected;if(n.isEmpty()||angular.isArray(c)&&!c.length||!n.removeSelected)n.setItemsFn(a);else if(void 0!==a){var d=a.filter(function(a){return c&&c.indexOf(a)<0});n.setItemsFn(d)}"auto"!==n.dropdownPosition&&"up"!==n.dropdownPosition||b.calculateDropdownPos()},b.$watchCollection(n.parserResult.source,function(a){if(void 0===a||null===a)n.items=[];else{if(!angular.isArray(a))throw g("items","Expected an array but got '{0}'.",a);n.refreshItems(a),n.ngModel.$modelValue=null}})};var p;n.refresh=function(a){void 0!==a&&(p&&d.cancel(p),p=d(function(){b.$eval(a)},n.refreshDelay))},n.isActive=function(a){if(!n.open)return!1;var b=n.items.indexOf(a[n.itemProperty]),c=b===n.activeIndex;return!c||0>b&&n.taggingLabel!==!1||0>b&&n.taggingLabel===!1?!1:(c&&!angular.isUndefined(n.onHighlightCallback)&&a.$eval(n.onHighlightCallback),c)},n.isDisabled=function(a){if(n.open){var b,c=n.items.indexOf(a[n.itemProperty]),d=!1;return c>=0&&!angular.isUndefined(n.disableChoiceExpression)&&(b=n.items[c],d=!!a.$eval(n.disableChoiceExpression),b._uiSelectChoiceDisabled=d),d}},n.select=function(a,c,e){if(void 0===a||!a._uiSelectChoiceDisabled){if(!n.items&&!n.search)return;if(!a||!a._uiSelectChoiceDisabled){if(n.tagging.isActivated){if(n.taggingLabel===!1)if(n.activeIndex<0){if(a=void 0!==n.tagging.fct?n.tagging.fct(n.search):n.search,!a||angular.equals(n.items[0],a))return}else a=n.items[n.activeIndex];else if(0===n.activeIndex){if(void 0===a)return;if(void 0!==n.tagging.fct&&"string"==typeof a){if(a=n.tagging.fct(n.search),!a)return}else"string"==typeof a&&(a=a.replace(n.taggingLabel,"").trim())}if(n.selected&&angular.isArray(n.selected)&&n.selected.filter(function(b){return angular.equals(b,a)}).length>0)return void n.close(c)}b.$broadcast("uis:select",a);var f={};f[n.parserResult.itemName]=a,d(function(){n.onSelectCallback(b,{$item:a,$model:n.parserResult.modelMapper(b,f)})}),n.closeOnSelect&&n.close(c),e&&"click"===e.type&&(n.clickTriggeredSelect=!0)}}},n.close=function(a){n.open&&(n.ngModel&&n.ngModel.$setTouched&&n.ngModel.$setTouched(),j(),n.open=!1,b.$broadcast("uis:close",a))},n.setFocus=function(){n.focus||n.focusInput[0].focus()},n.clear=function(a){n.select(void 0),a.stopPropagation(),d(function(){n.focusser[0].focus()},0,!1)},n.toggle=function(a){n.open?(n.close(),a.preventDefault(),a.stopPropagation()):n.activate()},n.isLocked=function(a,b){var c,d=n.selected[b];return d&&!angular.isUndefined(n.lockChoiceExpression)&&(c=!!a.$eval(n.lockChoiceExpression),d._uiSelectChoiceLocked=c),c};var q=null;n.sizeSearchInput=function(){var a=n.searchInput[0],c=n.searchInput.parent().parent()[0],e=function(){return c.clientWidth*!!a.offsetParent},f=function(b){if(0===b)return!1;var c=b-a.offsetLeft-10;return 50>c&&(c=b),n.searchInput.css("width",c+"px"),!0};n.searchInput.css("width","10px"),d(function(){null!==q||f(e())||(q=b.$watch(e,function(a){f(a)&&(q(),q=null)}))})},n.searchInput.on("keydown",function(c){var e=c.which;b.$apply(function(){var b=!1;if((n.items.length>0||n.tagging.isActivated)&&(l(e),n.taggingTokens.isActivated)){for(var f=0;f0&&(b=!0);b&&d(function(){n.searchInput.triggerHandler("tagged");var b=n.search.replace(a.MAP[c.keyCode],"").trim();n.tagging.fct&&(b=n.tagging.fct(b)),b&&n.select(b,!0)})}}),a.isVerticalMovement(e)&&n.items.length>0&&m(),e!==a.ENTER&&e!==a.ESC||(c.preventDefault(),c.stopPropagation())}),n.searchInput.on("paste",function(a){var b=a.originalEvent.clipboardData.getData("text/plain");if(b&&b.length>0&&n.taggingTokens.isActivated&&n.tagging.fct){var c=b.split(n.taggingTokens.tokens[0]);c&&c.length>0&&(angular.forEach(c,function(a){var b=n.tagging.fct(a);b&&n.select(b,!0)}),a.preventDefault(),a.stopPropagation())}}),n.searchInput.on("tagged",function(){d(function(){j()})}),b.$on("$destroy",function(){n.searchInput.off("keyup keydown tagged blur paste")})}]),c.directive("uiSelect",["$document","uiSelectConfig","uiSelectMinErr","uisOffset","$compile","$parse","$timeout",function(a,b,c,d,e,f,g){return{restrict:"EA",templateUrl:function(a,c){var d=c.theme||b.theme;return d+(angular.isDefined(c.multiple)?"/select-multiple.tpl.html":"/select.tpl.html")},replace:!0,transclude:!0,require:["uiSelect","^ngModel"],scope:!0,controller:"uiSelectCtrl",controllerAs:"$select",compile:function(e,h){return angular.isDefined(h.multiple)?e.append("").removeAttr("multiple"):e.append(""),h.inputId&&(e.querySelectorAll("input.ui-select-search")[0].id=h.inputId),function(e,h,i,j,k){function l(a){if(o.open){var b=!1;if(b=window.jQuery?window.jQuery.contains(h[0],a.target):h[0].contains(a.target),!b&&!o.clickTriggeredSelect){var c=["input","button","textarea"],d=angular.element(a.target).controller("uiSelect"),f=d&&d!==o;f||(f=~c.indexOf(a.target.tagName.toLowerCase())),o.close(f),e.$digest()}o.clickTriggeredSelect=!1}}function m(){var b=d(h);r=angular.element('
          '),r[0].style.width=b.width+"px",r[0].style.height=b.height+"px",h.after(r),s=h[0].style.width,a.find("body").append(h),h[0].style.position="absolute",h[0].style.left=b.left+"px",h[0].style.top=b.top+"px",h[0].style.width=b.width+"px"}function n(){null!==r&&(r.replaceWith(h),r=null,h[0].style.position="",h[0].style.left="",h[0].style.top="",h[0].style.width=s)}var o=j[0],p=j[1];o.generatedId=b.generateId(),o.baseTitle=i.title||"Select box",o.focusserTitle=o.baseTitle+" focus",o.focusserId="focusser-"+o.generatedId,o.closeOnSelect=function(){return angular.isDefined(i.closeOnSelect)?f(i.closeOnSelect)():b.closeOnSelect}(),o.onSelectCallback=f(i.onSelect),o.onRemoveCallback=f(i.onRemove),o.limit=angular.isDefined(i.limit)?parseInt(i.limit,10):void 0,o.ngModel=p,o.choiceGrouped=function(a){return o.isGrouped&&a&&a.name},i.tabindex&&i.$observe("tabindex",function(a){o.focusInput.attr("tabindex",a),h.removeAttr("tabindex")}),e.$watch("searchEnabled",function(){var a=e.$eval(i.searchEnabled);o.searchEnabled=void 0!==a?a:b.searchEnabled}),e.$watch("sortable",function(){var a=e.$eval(i.sortable);o.sortable=void 0!==a?a:b.sortable}),i.$observe("disabled",function(){o.disabled=void 0!==i.disabled?i.disabled:!1}),i.$observe("resetSearchInput",function(){var a=e.$eval(i.resetSearchInput);o.resetSearchInput=void 0!==a?a:!0}),i.$observe("tagging",function(){if(void 0!==i.tagging){var a=e.$eval(i.tagging);o.tagging={isActivated:!0,fct:a!==!0?a:void 0}}else o.tagging={isActivated:!1,fct:void 0}}),i.$observe("taggingLabel",function(){void 0!==i.tagging&&("false"===i.taggingLabel?o.taggingLabel=!1:o.taggingLabel=void 0!==i.taggingLabel?i.taggingLabel:"(new)")}),i.$observe("taggingTokens",function(){if(void 0!==i.tagging){var a=void 0!==i.taggingTokens?i.taggingTokens.split("|"):[",","ENTER"];o.taggingTokens={isActivated:!0,tokens:a}}}),angular.isDefined(i.autofocus)&&g(function(){o.setFocus()}),angular.isDefined(i.focusOn)&&e.$on(i.focusOn,function(){g(function(){o.setFocus()})}),a.on("click",l),e.$on("$destroy",function(){a.off("click",l)}),k(e,function(a){var b=angular.element("
          ").append(a),d=b.querySelectorAll(".ui-select-match");if(d.removeAttr("ui-select-match"),d.removeAttr("data-ui-select-match"),1!==d.length)throw c("transcluded","Expected 1 .ui-select-match but got '{0}'.",d.length);h.querySelectorAll(".ui-select-match").replaceWith(d);var e=b.querySelectorAll(".ui-select-choices");if(e.removeAttr("ui-select-choices"),e.removeAttr("data-ui-select-choices"),1!==e.length)throw c("transcluded","Expected 1 .ui-select-choices but got '{0}'.",e.length); +h.querySelectorAll(".ui-select-choices").replaceWith(e)});var q=e.$eval(i.appendToBody);(void 0!==q?q:b.appendToBody)&&(e.$watch("$select.open",function(a){a?m():n()}),e.$on("$destroy",function(){n()}));var r=null,s="",t=null,u="direction-up";e.$watch("$select.open",function(){"auto"!==o.dropdownPosition&&"up"!==o.dropdownPosition||e.calculateDropdownPos()});var v=function(a,b){a=a||d(h),b=b||d(t),t[0].style.position="absolute",t[0].style.top=-1*b.height+"px",h.addClass(u)},w=function(a,b){h.removeClass(u),a=a||d(h),b=b||d(t),t[0].style.position="",t[0].style.top=""};e.calculateDropdownPos=function(){if(o.open){if(t=angular.element(h).querySelectorAll(".ui-select-dropdown"),0===t.length)return;t[0].style.opacity=0,g(function(){if("up"===o.dropdownPosition)v(b,c);else{h.removeClass(u);var b=d(h),c=d(t),e=a[0].documentElement.scrollTop||a[0].body.scrollTop;b.top+b.height+c.height>e+a[0].documentElement.clientHeight?v(b,c):w(b,c)}t[0].style.opacity=1})}else{if(null===t||0===t.length)return;t[0].style.position="",t[0].style.top="",h.removeClass(u)}}}}}}]),c.directive("uiSelectMatch",["uiSelectConfig",function(a){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(b){var c=b.parent().attr("theme")||a.theme,d=b.parent().attr("multiple");return c+(d?"/match-multiple.tpl.html":"/match.tpl.html")},link:function(b,c,d,e){function f(a){e.allowClear=angular.isDefined(a)?""===a?!0:"true"===a.toLowerCase():!1}e.lockChoiceExpression=d.uiLockChoice,d.$observe("placeholder",function(b){e.placeholder=void 0!==b?b:a.placeholder}),d.$observe("allowClear",f),f(d.allowClear),e.multiple&&e.sizeSearchInput()}}}]),c.directive("uiSelectMultiple",["uiSelectMinErr","$timeout",function(b,c){return{restrict:"EA",require:["^uiSelect","^ngModel"],controller:["$scope","$timeout",function(a,b){var c,d=this,e=a.$select;a.$evalAsync(function(){c=a.ngModel}),d.activeMatchIndex=-1,d.updateModel=function(){c.$setViewValue(Date.now()),d.refreshComponent()},d.refreshComponent=function(){e.refreshItems(),e.sizeSearchInput()},d.removeChoice=function(c){var f=e.selected[c];if(!f._uiSelectChoiceLocked){var g={};g[e.parserResult.itemName]=f,e.selected.splice(c,1),d.activeMatchIndex=-1,e.sizeSearchInput(),b(function(){e.onRemoveCallback(a,{$item:f,$model:e.parserResult.modelMapper(a,g)})}),d.updateModel()}},d.getPlaceholder=function(){return e.selected&&e.selected.length?void 0:e.placeholder}}],controllerAs:"$selectMultiple",link:function(d,e,f,g){function h(a){return angular.isNumber(a.selectionStart)?a.selectionStart:a.value.length}function i(b){function c(){switch(b){case a.LEFT:return~n.activeMatchIndex?k:g;case a.RIGHT:return~n.activeMatchIndex&&i!==g?j:(l.activate(),!1);case a.BACKSPACE:return~n.activeMatchIndex?(n.removeChoice(i),k):g;case a.DELETE:return~n.activeMatchIndex?(n.removeChoice(n.activeMatchIndex),i):!1}}var d=h(l.searchInput[0]),e=l.selected.length,f=0,g=e-1,i=n.activeMatchIndex,j=n.activeMatchIndex+1,k=n.activeMatchIndex-1,m=i;return d>0||l.search.length&&b==a.RIGHT?!1:(l.close(),m=c(),l.selected.length&&m!==!1?n.activeMatchIndex=Math.min(g,Math.max(f,m)):n.activeMatchIndex=-1,!0)}function j(a){if(void 0===a||void 0===l.search)return!1;var b=a.filter(function(a){return void 0===l.search.toUpperCase()||void 0===a?!1:a.toUpperCase()===l.search.toUpperCase()}).length>0;return b}function k(a,b){var c=-1;if(angular.isArray(a))for(var d=angular.copy(a),e=0;e=0;e--)b={},b[l.parserResult.itemName]=l.selected[e],a=l.parserResult.modelMapper(d,b),c.unshift(a);return c}),m.$formatters.unshift(function(a){var b,c=l.parserResult.source(d,{$select:{search:""}}),e={};if(!c)return a;var f=[],g=function(a,c){if(a&&a.length){for(var g=a.length-1;g>=0;g--){if(e[l.parserResult.itemName]=a[g],b=l.parserResult.modelMapper(d,e),l.parserResult.trackByExp){var h=/\.(.+)/.exec(l.parserResult.trackByExp);if(h.length>0&&b[h[1]]==c[h[1]])return f.unshift(a[g]),!0}if(angular.equals(b,c))return f.unshift(a[g]),!0}return!1}};if(!a)return f;for(var h=a.length-1;h>=0;h--)g(l.selected,a[h])||g(c,a[h])||f.unshift(a[h]);return f}),d.$watchCollection(function(){return m.$modelValue},function(a,b){b!=a&&(m.$modelValue=null,n.refreshComponent())}),m.$render=function(){if(!angular.isArray(m.$viewValue)){if(!angular.isUndefined(m.$viewValue)&&null!==m.$viewValue)throw b("multiarr","Expected model value to be array but got '{0}'",m.$viewValue);l.selected=[]}l.selected=m.$viewValue,d.$evalAsync()},d.$on("uis:select",function(a,b){l.selected.length>=l.limit||(l.selected.push(b),n.updateModel())}),d.$on("uis:activate",function(){n.activeMatchIndex=-1}),d.$watch("$select.disabled",function(a,b){b&&!a&&l.sizeSearchInput()}),l.searchInput.on("keydown",function(b){var c=b.which;d.$apply(function(){var d=!1;a.isHorizontalMovement(c)&&(d=i(c)),d&&c!=a.TAB&&(b.preventDefault(),b.stopPropagation())})}),l.searchInput.on("keyup",function(b){if(a.isVerticalMovement(b.which)||d.$evalAsync(function(){l.activeIndex=l.taggingLabel===!1?-1:0}),l.tagging.isActivated&&l.search.length>0){if(b.which===a.TAB||a.isControl(b)||a.isFunctionKey(b)||b.which===a.ESC||a.isVerticalMovement(b.which))return;if(l.activeIndex=l.taggingLabel===!1?-1:0,l.taggingLabel===!1)return;var c,e,f,g,h=angular.copy(l.items),i=angular.copy(l.items),m=!1,n=-1;if(void 0!==l.tagging.fct){if(f=l.$filter("filter")(h,{isTag:!0}),f.length>0&&(g=f[0]),h.length>0&&g&&(m=!0,h=h.slice(1,h.length),i=i.slice(1,i.length)),c=l.tagging.fct(l.search),c.isTag=!0,i.filter(function(a){return angular.equals(a,l.tagging.fct(l.search))}).length>0)return;c.isTag=!0}else{if(f=l.$filter("filter")(h,function(a){return a.match(l.taggingLabel)}),f.length>0&&(g=f[0]),e=h[0],void 0!==e&&h.length>0&&g&&(m=!0,h=h.slice(1,h.length),i=i.slice(1,i.length)),c=l.search+" "+l.taggingLabel,k(l.selected,l.search)>-1)return;if(j(i.concat(l.selected)))return void(m&&(h=i,d.$evalAsync(function(){l.activeIndex=0,l.items=h})));if(j(i))return void(m&&(l.items=i.slice(1,i.length)))}m&&(n=k(l.selected,c)),n>-1?h=h.slice(n+1,h.length-1):(h=[],h.push(c),h=h.concat(i)),d.$evalAsync(function(){l.activeIndex=0,l.items=h})}}),l.searchInput.on("blur",function(){c(function(){n.activeMatchIndex=-1})})}}}]),c.directive("uiSelectSingle",["$timeout","$compile",function(b,c){return{restrict:"EA",require:["^uiSelect","^ngModel"],link:function(d,e,f,g){var h=g[0],i=g[1];i.$parsers.unshift(function(a){var b,c={};return c[h.parserResult.itemName]=a,b=h.parserResult.modelMapper(d,c)}),i.$formatters.unshift(function(a){var b,c=h.parserResult.source(d,{$select:{search:""}}),e={};if(c){var f=function(c){return e[h.parserResult.itemName]=c,b=h.parserResult.modelMapper(d,e),b==a};if(h.selected&&f(h.selected))return h.selected;for(var g=c.length-1;g>=0;g--)if(f(c[g]))return c[g]}return a}),d.$watch("$select.selected",function(a){i.$viewValue!==a&&i.$setViewValue(a)}),i.$render=function(){h.selected=i.$viewValue},d.$on("uis:select",function(a,b){h.selected=b}),d.$on("uis:close",function(a,c){b(function(){h.focusser.prop("disabled",!1),c||h.focusser[0].focus()},0,!1)}),d.$on("uis:activate",function(){j.prop("disabled",!0)});var j=angular.element("");c(j)(d),h.focusser=j,h.focusInput=j,e.parent().append(j),j.bind("focus",function(){d.$evalAsync(function(){h.focus=!0})}),j.bind("blur",function(){d.$evalAsync(function(){h.focus=!1})}),j.bind("keydown",function(b){return b.which===a.BACKSPACE?(b.preventDefault(),b.stopPropagation(),h.select(void 0),void d.$apply()):void(b.which===a.TAB||a.isControl(b)||a.isFunctionKey(b)||b.which===a.ESC||(b.which!=a.DOWN&&b.which!=a.UP&&b.which!=a.ENTER&&b.which!=a.SPACE||(b.preventDefault(),b.stopPropagation(),h.activate()),d.$digest()))}),j.bind("keyup input",function(b){b.which===a.TAB||a.isControl(b)||a.isFunctionKey(b)||b.which===a.ESC||b.which==a.ENTER||b.which===a.BACKSPACE||(h.activate(j.val()),j.val(""),d.$digest())})}}}]),c.directive("uiSelectSort",["$timeout","uiSelectConfig","uiSelectMinErr",function(a,b,c){return{require:"^uiSelect",link:function(b,d,e,f){if(null===b[e.uiSelectSort])throw c("sort","Expected a list to sort");var g=angular.extend({axis:"horizontal"},b.$eval(e.uiSelectSortOptions)),h=g.axis,i="dragging",j="dropping",k="dropping-before",l="dropping-after";b.$watch(function(){return f.sortable},function(a){a?d.attr("draggable",!0):d.removeAttr("draggable")}),d.on("dragstart",function(a){d.addClass(i),(a.dataTransfer||a.originalEvent.dataTransfer).setData("text/plain",b.$index)}),d.on("dragend",function(){d.removeClass(i)});var m,n=function(a,b){this.splice(b,0,this.splice(a,1)[0])},o=function(a){a.preventDefault();var b="vertical"===h?a.offsetY||a.layerY||(a.originalEvent?a.originalEvent.offsetY:0):a.offsetX||a.layerX||(a.originalEvent?a.originalEvent.offsetX:0);b
        • '),a.put("bootstrap/match-multiple.tpl.html",' × '),a.put("bootstrap/match.tpl.html",'
          {{$select.placeholder}}
          '),a.put("bootstrap/select-multiple.tpl.html",''),a.put("bootstrap/select.tpl.html",''),a.put("selectize/choices.tpl.html",'
          '),a.put("selectize/match.tpl.html",'
          '),a.put("selectize/select.tpl.html",'
          '),a.put("select2/choices.tpl.html",'
          '),a.put("select2/match-multiple.tpl.html",'
        • '),a.put("select2/match.tpl.html",'{{$select.placeholder}} '),a.put("select2/select-multiple.tpl.html",'
          '),a.put("select2/select.tpl.html",'
          ')}]),function(){window.WebComponents=window.WebComponents||{flags:{}};var a="webcomponents.js",b=document.querySelector('script[src*="'+a+'"]'),c={};if(!c.noOpts){if(location.search.slice(1).split("&").forEach(function(a){var b,d=a.split("=");d[0]&&(b=d[0].match(/wc-(.+)/))&&(c[b[1]]=d[1]||!0)}),b)for(var d,e=0;d=b.attributes[e];e++)"src"!==d.name&&(c[d.name]=d.value||!0);if(c.log&&c.log.split){var f=c.log.split(",");c.log={},f.forEach(function(a){c.log[a]=!0})}else c.log={}}c.shadow=c.shadow||c.shadowdom||c.polyfill,"native"===c.shadow?c.shadow=!1:c.shadow=c.shadow||!HTMLElement.prototype.createShadowRoot,c.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=c.register),WebComponents.flags=c}(),WebComponents.flags.shadow&&("undefined"==typeof WeakMap&&!function(){var a=Object.defineProperty,b=Date.now()%1e9,c=function(){this.name="__st"+(1e9*Math.random()>>>0)+(b++ +"__")};c.prototype={set:function(b,c){var d=b[this.name];return d&&d[0]===b?d[1]=c:a(b,this.name,{value:[b,c],writable:!0}),this},get:function(a){var b;return(b=a[this.name])&&b[0]===a?b[1]:void 0},"delete":function(a){var b=a[this.name];return b&&b[0]===a?(b[0]=b[1]=void 0,!0):!1},has:function(a){var b=a[this.name];return b?b[0]===a:!1}},window.WeakMap=c}(),window.ShadowDOMPolyfill={},function(a){"use strict";function b(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var a=new Function("return true;");return a()}catch(b){return!1}}function c(a){if(!a)throw new Error("Assertion failed")}function d(a,b){for(var c=N(b),d=0;dj;j++)i[j]=new Array(h),i[j][0]=j;for(var k=0;h>k;k++)i[0][k]=k;for(var j=1;g>j;j++)for(var k=1;h>k;k++)if(this.equals(a[b+k-1],d[e+j-1]))i[j][k]=i[j-1][k-1];else{var l=i[j-1][k]+1,m=i[j][k-1]+1;i[j][k]=m>l?l:m}return i},spliceOperationsFromEditDistances:function(a){for(var b=a.length-1,c=a[0].length-1,h=a[b][c],i=[];b>0||c>0;)if(0!=b)if(0!=c){var j,k=a[b-1][c-1],l=a[b-1][c],m=a[b][c-1];j=m>l?k>l?l:k:k>m?m:k,j==k?(k==h?i.push(d):(i.push(e),h=k),b--,c--):j==l?(i.push(g),b--,h=l):(i.push(f),c--,h=m)}else i.push(g),b--;else i.push(f),c--;return i.reverse(),i},calcSplices:function(a,c,h,i,j,k){var l=0,m=0,n=Math.min(h-c,k-j);if(0==c&&0==j&&(l=this.sharedPrefix(a,i,n)),h==a.length&&k==i.length&&(m=this.sharedSuffix(a,i,n-l)),c+=l,j+=l,h-=m,k-=m,h-c==0&&k-j==0)return[];if(c==h){for(var o=b(c,[],0);k>j;)o.removed.push(i[j++]);return[o]}if(j==k)return[b(c,[],h-c)];for(var p=this.spliceOperationsFromEditDistances(this.calcEditDistances(a,c,h,i,j,k)),o=void 0,q=[],r=c,s=j,t=0;td;d++)if(!this.equals(a[d],b[d]))return d;return c},sharedSuffix:function(a,b,c){for(var d=a.length,e=b.length,f=0;c>f&&this.equals(a[--d],b[--e]);)f++;return f},calculateSplices:function(a,b){return this.calcSplices(a,0,a.length,b,0,b.length)},equals:function(a,b){return a===b}},a.ArraySplice=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(){g=!1;var a=f.slice(0);f=[];for(var b=0;b0){for(var k=0;k0&&d.length>0;){var f=c.pop(),g=d.pop();if(f!==g)break;e=f}return e}function k(a,b,c){b instanceof T.Window&&(b=b.document);var e,f=M(b),g=M(c),h=d(c,a),e=j(f,g);e||(e=g.root);for(var i=e;i;i=i.parent)for(var k=0;k0;f--)if(!s(b[f],a,e,b,d))return!1;return!0}function q(a,b,c,d){var e=fa,f=b[0]||c;return s(f,a,e,b,d)}function r(a,b,c,d){for(var e=ga,f=1;f0&&s(c,a,e,b,d)}function s(a,b,c,d,e){var f=U.get(a);if(!f)return!0;var g=e||h(d,a);if(g===a){if(c===ea)return!0;c===ga&&(c=fa)}else if(c===ga&&!b.bubbles)return!0;if("relatedTarget"in b){var i=R(b),j=i.relatedTarget;if(j){if(j instanceof Object&&j.addEventListener){var l=S(j),m=k(b,a,l);if(m===g)return!0}else m=null;Z.set(b,m)}}$.set(b,c);var n=b.type,o=!1;X.set(b,g),Y.set(b,a),f.depth++;for(var p=0,q=f.length;q>p;p++){var r=f[p];if(r.removed)o=!0;else if(!(r.type!==n||!r.capture&&c===ea||r.capture&&c===ga))try{if("function"==typeof r.handler?r.handler.call(a,b):r.handler.handleEvent(b),aa.get(b))return!1}catch(s){K||(K=s)}}if(f.depth--,o&&0===f.depth){var t=f.slice();f.length=0;for(var p=0;pd;d++)b[d]=g(a[d]);return b.length=e,b}function e(a,b){a.prototype[b]=function(){return d(f(this)[b].apply(f(this),arguments))}}var f=a.unsafeUnwrap,g=a.wrap,h={enumerable:!1};c.prototype={item:function(a){return this[a]}},b(c.prototype,"item"),a.wrappers.NodeList=c,a.addWrapNodeListMethod=e,a.wrapNodeList=d}(window.ShadowDOMPolyfill),function(a){"use strict";a.wrapHTMLCollection=a.wrapNodeList,a.wrappers.HTMLCollection=a.wrappers.NodeList}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){A(a instanceof w)}function c(a){var b=new y;return b[0]=a,b.length=1,b}function d(a,b,c){C(b,"childList",{removedNodes:c,previousSibling:a.previousSibling,nextSibling:a.nextSibling})}function e(a,b){C(a,"childList",{removedNodes:b})}function f(a,b,d,e){if(a instanceof DocumentFragment){var f=h(a);P=!0;for(var g=f.length-1;g>=0;g--)a.removeChild(f[g]),f[g].parentNode_=b;P=!1;for(var g=0;ge;e++)d.appendChild(K(b[e]));return d}function q(a){if(void 0!==a.firstChild_)for(var b=a.firstChild_;b;){var c=b;b=b.nextSibling_,c.parentNode_=c.previousSibling_=c.nextSibling_=void 0}a.firstChild_=a.lastChild_=void 0}function r(a){if(a.invalidateShadowRenderer()){for(var b=a.firstChild;b;){A(b.parentNode===a);var c=b.nextSibling,d=K(b),e=d.parentNode;e&&X.call(e,d),b.previousSibling_=b.nextSibling_=b.parentNode_=null,b=c}a.firstChild_=a.lastChild_=null}else for(var c,f=K(a),g=f.firstChild;g;)c=g.nextSibling,X.call(f,g),g=c}function s(a){var b=a.parentNode;return b&&b.invalidateShadowRenderer()}function t(a){for(var b,c=0;ch;h++)f=t(b[h]),!e&&(g=r(f).root)&&g instanceof a.wrappers.ShadowRoot||(d[c++]=f);return c}function c(a){return String(a).replace(/\/deep\/|::shadow|>>>/g," ")}function d(a){return String(a).replace(/:host\(([^\s]+)\)/g,"$1").replace(/([^\s]):host/g,"$1").replace(":host","*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g," ")}function e(a,b){for(var c,d=a.firstElementChild;d;){if(d.matches(b))return d;if(c=e(d,b))return c;d=d.nextElementSibling}return null}function f(a,b){return a.matches(b)}function g(a,b,c){var d=a.localName;return d===b||d===c&&a.namespaceURI===E}function h(){return!0}function i(a,b,c){return a.localName===c}function j(a,b){return a.namespaceURI===b}function k(a,b,c){return a.namespaceURI===b&&a.localName===c}function l(a,b,c,d,e,f){for(var g=a.firstElementChild;g;)d(g,e,f)&&(c[b++]=g),b=l(g,b,c,d,e,f),g=g.nextElementSibling;return b}function m(c,d,e,f,g){var h,i=s(this),j=r(this).root;if(j instanceof a.wrappers.ShadowRoot)return l(this,d,e,c,f,null);if(i instanceof C)h=x.call(i,f);else{if(!(i instanceof D))return l(this,d,e,c,f,null);h=w.call(i,f)}return b(h,d,e,g)}function n(c,d,e,f,g){var h,i=s(this),j=r(this).root;if(j instanceof a.wrappers.ShadowRoot)return l(this,d,e,c,f,g);if(i instanceof C)h=z.call(i,f,g);else{if(!(i instanceof D))return l(this,d,e,c,f,g);h=y.call(i,f,g)}return b(h,d,e,!1)}function o(c,d,e,f,g){var h,i=s(this),j=r(this).root;if(j instanceof a.wrappers.ShadowRoot)return l(this,d,e,c,f,g);if(i instanceof C)h=B.call(i,f,g);else{if(!(i instanceof D))return l(this,d,e,c,f,g);h=A.call(i,f,g)}return b(h,d,e,!1)}var p=a.wrappers.HTMLCollection,q=a.wrappers.NodeList,r=a.getTreeScope,s=a.unsafeUnwrap,t=a.wrap,u=document.querySelector,v=document.documentElement.querySelector,w=document.querySelectorAll,x=document.documentElement.querySelectorAll,y=document.getElementsByTagName,z=document.documentElement.getElementsByTagName,A=document.getElementsByTagNameNS,B=document.documentElement.getElementsByTagNameNS,C=window.Element,D=window.HTMLDocument||window.Document,E="http://www.w3.org/1999/xhtml",F={querySelector:function(b){var d=c(b),f=d!==b;b=d;var g,h=s(this),i=r(this).root;if(i instanceof a.wrappers.ShadowRoot)return e(this,b);if(h instanceof C)g=t(v.call(h,b));else{if(!(h instanceof D))return e(this,b);g=t(u.call(h,b))}return g&&!f&&(i=r(g).root)&&i instanceof a.wrappers.ShadowRoot?e(this,b):g},querySelectorAll:function(a){var b=c(a),d=b!==a;a=b;var e=new q;return e.length=m.call(this,f,0,e,a,d),e}},G={matches:function(b){return b=d(b),a.originalMatches.call(s(this),b)}},H={getElementsByTagName:function(a){var b=new p,c="*"===a?h:g;return b.length=n.call(this,c,0,b,a,a.toLowerCase()),b},getElementsByClassName:function(a){return this.querySelectorAll("."+a)},getElementsByTagNameNS:function(a,b){var c=new p,d=null;return d="*"===a?"*"===b?h:i:"*"===b?j:k,c.length=o.call(this,d,0,c,a||null,b),c}};a.GetElementsByInterface=H,a.SelectorsInterface=F,a.MatchesInterface=G}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){for(;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}function c(a){for(;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}var d=a.wrappers.NodeList,e={get firstElementChild(){return b(this.firstChild)},get lastElementChild(){return c(this.lastChild)},get childElementCount(){for(var a=0,b=this.firstElementChild;b;b=b.nextElementSibling)a++;return a},get children(){for(var a=new d,b=0,c=this.firstElementChild;c;c=c.nextElementSibling)a[b++]=c;return a.length=b,a},remove:function(){var a=this.parentNode;a&&a.removeChild(this)}},f={get nextElementSibling(){return b(this.nextSibling)},get previousElementSibling(){return c(this.previousSibling)}},g={getElementById:function(a){return/[ \t\n\r\f]/.test(a)?null:this.querySelector('[id="'+a+'"]')}};a.ChildNodeInterface=f,a.NonElementParentNodeInterface=g,a.ParentNodeInterface=e}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}var c=a.ChildNodeInterface,d=a.wrappers.Node,e=a.enqueueMutation,f=a.mixin,g=a.registerWrapper,h=a.unsafeUnwrap,i=window.CharacterData;b.prototype=Object.create(d.prototype),f(b.prototype,{get nodeValue(){return this.data},set nodeValue(a){this.data=a},get textContent(){return this.data},set textContent(a){this.data=a},get data(){return h(this).data},set data(a){var b=h(this).data;e(this,"characterData",{oldValue:b}),h(this).data=a}}),f(b.prototype,c),g(i,b,document.createTextNode("")),a.wrappers.CharacterData=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){return a>>>0}function c(a){d.call(this,a)}var d=a.wrappers.CharacterData,e=(a.enqueueMutation,a.mixin),f=a.registerWrapper,g=window.Text;c.prototype=Object.create(d.prototype),e(c.prototype,{splitText:function(a){a=b(a);var c=this.data;if(a>c.length)throw new Error("IndexSizeError");var d=c.slice(0,a),e=c.slice(a);this.data=d;var f=this.ownerDocument.createTextNode(e);return this.parentNode&&this.parentNode.insertBefore(f,this.nextSibling),f}}),f(g,c,document.createTextNode("")),a.wrappers.Text=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){return f(a).getAttribute("class")}function c(a,b){g(a,"attributes",{name:"class",namespace:null,oldValue:b})}function d(b){a.invalidateRendererBasedOnAttribute(b,"class")}function e(a,e,f){var g=a.ownerElement_;if(null==g)return e.apply(a,f);var h=b(g),i=e.apply(a,f);return b(g)!==h&&(c(g,h),d(g)),i}if(!window.DOMTokenList)return void console.warn("Missing DOMTokenList prototype, please include a compatible classList polyfill such as http://goo.gl/uTcepH.");var f=a.unsafeUnwrap,g=a.enqueueMutation,h=DOMTokenList.prototype.add;DOMTokenList.prototype.add=function(){e(this,h,arguments)};var i=DOMTokenList.prototype.remove;DOMTokenList.prototype.remove=function(){e(this,i,arguments)};var j=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(){return e(this,j,arguments)}}(window.ShadowDOMPolyfill),function(a){"use strict";function b(b,c){var d=b.parentNode;if(d&&d.shadowRoot){var e=a.getRendererForHost(d);e.dependsOnAttribute(c)&&e.invalidate()}}function c(a,b,c){k(a,"attributes",{name:b,namespace:null,oldValue:c})}function d(a){g.call(this,a)}var e=a.ChildNodeInterface,f=a.GetElementsByInterface,g=a.wrappers.Node,h=a.ParentNodeInterface,i=a.SelectorsInterface,j=a.MatchesInterface,k=(a.addWrapNodeListMethod,a.enqueueMutation),l=a.mixin,m=(a.oneOf,a.registerWrapper),n=a.unsafeUnwrap,o=a.wrappers,p=window.Element,q=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(a){return p.prototype[a]}),r=q[0],s=p.prototype[r],t=new WeakMap;d.prototype=Object.create(g.prototype),l(d.prototype,{createShadowRoot:function(){var b=new o.ShadowRoot(this);n(this).polymerShadowRoot_=b;var c=a.getRendererForHost(this);return c.invalidate(),b},get shadowRoot(){return n(this).polymerShadowRoot_||null},setAttribute:function(a,d){var e=n(this).getAttribute(a);n(this).setAttribute(a,d),c(this,a,e),b(this,a)},removeAttribute:function(a){var d=n(this).getAttribute(a);n(this).removeAttribute(a),c(this,a,d),b(this,a)},get classList(){var a=t.get(this);if(!a){if(a=n(this).classList,!a)return;a.ownerElement_=this,t.set(this,a)}return a},get className(){return n(this).className},set className(a){this.setAttribute("class",a)},get id(){return n(this).id},set id(a){this.setAttribute("id",a)}}),q.forEach(function(a){"matches"!==a&&(d.prototype[a]=function(a){return this.matches(a)})}),p.prototype.webkitCreateShadowRoot&&(d.prototype.webkitCreateShadowRoot=d.prototype.createShadowRoot),l(d.prototype,e),l(d.prototype,f),l(d.prototype,h),l(d.prototype,i),l(d.prototype,j),m(p,d,document.createElementNS(null,"x")),a.invalidateRendererBasedOnAttribute=b,a.matchesNames=q,a.originalMatches=s,a.wrappers.Element=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){switch(a){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}}function c(a){return a.replace(B,b)}function d(a){return a.replace(C,b)}function e(a){for(var b={},c=0;c"):i+">"+h(a)+"";case Node.TEXT_NODE:var l=a.data;return b&&E[b.localName]?l:d(l);case Node.COMMENT_NODE:return"";default:throw console.error(a),new Error("not implemented")}}function h(a){a instanceof A.HTMLTemplateElement&&(a=a.content);for(var b="",c=a.firstChild;c;c=c.nextSibling)b+=g(c,a);return b}function i(a,b,c){var d=c||"div";a.textContent="";var e=y(a.ownerDocument.createElement(d));e.innerHTML=b;for(var f;f=e.firstChild;)a.appendChild(z(f))}function j(a){p.call(this,a)}function k(a,b){var c=y(a.cloneNode(!1));c.innerHTML=b;for(var d,e=y(document.createDocumentFragment());d=c.firstChild;)e.appendChild(d);return z(e)}function l(b){return function(){return a.renderAllPending(),x(this)[b]}}function m(a){q(j,a,l(a))}function n(b){Object.defineProperty(j.prototype,b,{get:l(b),set:function(c){a.renderAllPending(),x(this)[b]=c},configurable:!0,enumerable:!0})}function o(b){Object.defineProperty(j.prototype,b,{value:function(){return a.renderAllPending(),x(this)[b].apply(x(this),arguments)},configurable:!0,enumerable:!0})}var p=a.wrappers.Element,q=a.defineGetter,r=a.enqueueMutation,s=a.mixin,t=a.nodesWereAdded,u=a.nodesWereRemoved,v=a.registerWrapper,w=a.snapshotNodeList,x=a.unsafeUnwrap,y=a.unwrap,z=a.wrap,A=a.wrappers,B=/[&\u00A0"]/g,C=/[&\u00A0<>]/g,D=e(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),E=e(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),F="http://www.w3.org/1999/xhtml",G=/MSIE/.test(navigator.userAgent),H=window.HTMLElement,I=window.HTMLTemplateElement;j.prototype=Object.create(p.prototype),s(j.prototype,{get innerHTML(){return h(this)},set innerHTML(a){if(G&&E[this.localName])return void(this.textContent=a);var b=w(this.childNodes);this.invalidateShadowRenderer()?this instanceof A.HTMLTemplateElement?i(this.content,a):i(this,a,this.tagName):!I&&this instanceof A.HTMLTemplateElement?i(this.content,a):x(this).innerHTML=a;var c=w(this.childNodes);r(this,"childList",{addedNodes:c,removedNodes:b}),u(b),t(c,this)},get outerHTML(){return g(this,this.parentNode)},set outerHTML(a){var b=this.parentNode;if(b){b.invalidateShadowRenderer();var c=k(b,a);b.replaceChild(c,this)}},insertAdjacentHTML:function(a,b){var c,d;switch(String(a).toLowerCase()){case"beforebegin":c=this.parentNode,d=this;break;case"afterend":c=this.parentNode,d=this.nextSibling;break;case"afterbegin":c=this,d=this.firstChild;break;case"beforeend":c=this,d=null;break;default:return}var e=k(c,b);c.insertBefore(e,d)},get hidden(){return this.hasAttribute("hidden")},set hidden(a){a?this.setAttribute("hidden",""):this.removeAttribute("hidden")}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(m),["scrollLeft","scrollTop"].forEach(n),["focus","getBoundingClientRect","getClientRects","scrollIntoView"].forEach(o),v(H,j,document.createElement("b")),a.wrappers.HTMLElement=j,a.getInnerHTML=h,a.setInnerHTML=i}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.unsafeUnwrap,g=a.wrap,h=window.HTMLCanvasElement;b.prototype=Object.create(c.prototype),d(b.prototype,{getContext:function(){var a=f(this).getContext.apply(f(this),arguments);return a&&g(a)}}),e(h,b,document.createElement("canvas")),a.wrappers.HTMLCanvasElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=window.HTMLContentElement;b.prototype=Object.create(c.prototype),d(b.prototype,{constructor:b,get select(){return this.getAttribute("select")},set select(a){this.setAttribute("select",a)},setAttribute:function(a,b){c.prototype.setAttribute.call(this,a,b),"select"===String(a).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),f&&e(f,b),a.wrappers.HTMLContentElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrapHTMLCollection,g=a.unwrap,h=window.HTMLFormElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get elements(){return f(g(this).elements)}}),e(h,b,document.createElement("form")),a.wrappers.HTMLFormElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}function c(a,b){if(!(this instanceof c))throw new TypeError("DOM object constructor cannot be called as a function.");var e=f(document.createElement("img"));d.call(this,e),g(e,this),void 0!==a&&(e.width=a),void 0!==b&&(e.height=b)}var d=a.wrappers.HTMLElement,e=a.registerWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLImageElement;b.prototype=Object.create(d.prototype),e(h,b,document.createElement("img")),c.prototype=b.prototype,a.wrappers.HTMLImageElement=b,a.wrappers.Image=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=(a.mixin,a.wrappers.NodeList,a.registerWrapper),e=window.HTMLShadowElement;b.prototype=Object.create(c.prototype),b.prototype.constructor=b, +e&&d(e,b),a.wrappers.HTMLShadowElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){if(!a.defaultView)return a;var b=l.get(a);if(!b){for(b=a.implementation.createHTMLDocument("");b.lastChild;)b.removeChild(b.lastChild);l.set(a,b)}return b}function c(a){for(var c,d=b(a.ownerDocument),e=i(d.createDocumentFragment());c=a.firstChild;)e.appendChild(c);return e}function d(a){if(e.call(this,a),!m){var b=c(a);k.set(this,j(b))}}var e=a.wrappers.HTMLElement,f=a.mixin,g=a.registerWrapper,h=a.unsafeUnwrap,i=a.unwrap,j=a.wrap,k=new WeakMap,l=new WeakMap,m=window.HTMLTemplateElement;d.prototype=Object.create(e.prototype),f(d.prototype,{constructor:d,get content(){return m?j(h(this).content):k.get(this)}}),m&&g(m,d),a.wrappers.HTMLTemplateElement=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.registerWrapper,e=window.HTMLMediaElement;e&&(b.prototype=Object.create(c.prototype),d(e,b,document.createElement("audio")),a.wrappers.HTMLMediaElement=b)}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}function c(a){if(!(this instanceof c))throw new TypeError("DOM object constructor cannot be called as a function.");var b=f(document.createElement("audio"));d.call(this,b),g(b,this),b.setAttribute("preload","auto"),void 0!==a&&b.setAttribute("src",a)}var d=a.wrappers.HTMLMediaElement,e=a.registerWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLAudioElement;h&&(b.prototype=Object.create(d.prototype),e(h,b,document.createElement("audio")),c.prototype=b.prototype,a.wrappers.HTMLAudioElement=b,a.wrappers.Audio=c)}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){return a.replace(/\s+/g," ").trim()}function c(a){e.call(this,a)}function d(a,b,c,f){if(!(this instanceof d))throw new TypeError("DOM object constructor cannot be called as a function.");var g=i(document.createElement("option"));e.call(this,g),h(g,this),void 0!==a&&(g.text=a),void 0!==b&&g.setAttribute("value",b),c===!0&&g.setAttribute("selected",""),g.selected=f===!0}var e=a.wrappers.HTMLElement,f=a.mixin,g=a.registerWrapper,h=a.rewrap,i=a.unwrap,j=a.wrap,k=window.HTMLOptionElement;c.prototype=Object.create(e.prototype),f(c.prototype,{get text(){return b(this.textContent)},set text(a){this.textContent=b(String(a))},get form(){return j(i(this).form)}}),g(k,c,document.createElement("option")),d.prototype=c.prototype,a.wrappers.HTMLOptionElement=c,a.wrappers.Option=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.unwrap,g=a.wrap,h=window.HTMLSelectElement;b.prototype=Object.create(c.prototype),d(b.prototype,{add:function(a,b){"object"==typeof b&&(b=f(b)),f(this).add(f(a),b)},remove:function(a){return void 0===a?void c.prototype.remove.call(this):("object"==typeof a&&(a=f(a)),void f(this).remove(a))},get form(){return g(f(this).form)}}),e(h,b,document.createElement("select")),a.wrappers.HTMLSelectElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.unwrap,g=a.wrap,h=a.wrapHTMLCollection,i=window.HTMLTableElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get caption(){return g(f(this).caption)},createCaption:function(){return g(f(this).createCaption())},get tHead(){return g(f(this).tHead)},createTHead:function(){return g(f(this).createTHead())},createTFoot:function(){return g(f(this).createTFoot())},get tFoot(){return g(f(this).tFoot)},get tBodies(){return h(f(this).tBodies)},createTBody:function(){return g(f(this).createTBody())},get rows(){return h(f(this).rows)},insertRow:function(a){return g(f(this).insertRow(a))}}),e(i,b,document.createElement("table")),a.wrappers.HTMLTableElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrapHTMLCollection,g=a.unwrap,h=a.wrap,i=window.HTMLTableSectionElement;b.prototype=Object.create(c.prototype),d(b.prototype,{constructor:b,get rows(){return f(g(this).rows)},insertRow:function(a){return h(g(this).insertRow(a))}}),e(i,b,document.createElement("thead")),a.wrappers.HTMLTableSectionElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrapHTMLCollection,g=a.unwrap,h=a.wrap,i=window.HTMLTableRowElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get cells(){return f(g(this).cells)},insertCell:function(a){return h(g(this).insertCell(a))}}),e(i,b,document.createElement("tr")),a.wrappers.HTMLTableRowElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){switch(a.localName){case"content":return new c(a);case"shadow":return new e(a);case"template":return new f(a)}d.call(this,a)}var c=a.wrappers.HTMLContentElement,d=a.wrappers.HTMLElement,e=a.wrappers.HTMLShadowElement,f=a.wrappers.HTMLTemplateElement,g=(a.mixin,a.registerWrapper),h=window.HTMLUnknownElement;b.prototype=Object.create(d.prototype),g(h,b),a.wrappers.HTMLUnknownElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.Element,d=a.wrappers.HTMLElement,e=a.registerWrapper,f=(a.defineWrapGetter,a.unsafeUnwrap),g=a.wrap,h=a.mixin,i="http://www.w3.org/2000/svg",j=window.SVGElement,k=document.createElementNS(i,"title");if(!("classList"in k)){var l=Object.getOwnPropertyDescriptor(c.prototype,"classList");Object.defineProperty(d.prototype,"classList",l),delete c.prototype.classList}b.prototype=Object.create(c.prototype),h(b.prototype,{get ownerSVGElement(){return g(f(this).ownerSVGElement)}}),e(j,b,document.createElementNS(i,"title")),a.wrappers.SVGElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){m.call(this,a)}var c=a.mixin,d=a.registerWrapper,e=a.unwrap,f=a.wrap,g=window.SVGUseElement,h="http://www.w3.org/2000/svg",i=f(document.createElementNS(h,"g")),j=document.createElementNS(h,"use"),k=i.constructor,l=Object.getPrototypeOf(k.prototype),m=l.constructor;b.prototype=Object.create(l),"instanceRoot"in j&&c(b.prototype,{get instanceRoot(){return f(e(this).instanceRoot)},get animatedInstanceRoot(){return f(e(this).animatedInstanceRoot)}}),d(g,b,j),a.wrappers.SVGUseElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.EventTarget,d=a.mixin,e=a.registerWrapper,f=a.unsafeUnwrap,g=a.wrap,h=window.SVGElementInstance;h&&(b.prototype=Object.create(c.prototype),d(b.prototype,{get correspondingElement(){return g(f(this).correspondingElement)},get correspondingUseElement(){return g(f(this).correspondingUseElement)},get parentNode(){return g(f(this).parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return g(f(this).firstChild)},get lastChild(){return g(f(this).lastChild)},get previousSibling(){return g(f(this).previousSibling)},get nextSibling(){return g(f(this).nextSibling)}}),e(h,b),a.wrappers.SVGElementInstance=b)}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){e(a,this)}var c=a.mixin,d=a.registerWrapper,e=a.setWrapper,f=a.unsafeUnwrap,g=a.unwrap,h=a.unwrapIfNeeded,i=a.wrap,j=window.CanvasRenderingContext2D;c(b.prototype,{get canvas(){return i(f(this).canvas)},drawImage:function(){arguments[0]=h(arguments[0]),f(this).drawImage.apply(f(this),arguments)},createPattern:function(){return arguments[0]=g(arguments[0]),f(this).createPattern.apply(f(this),arguments)}}),d(j,b,document.createElement("canvas").getContext("2d")),a.wrappers.CanvasRenderingContext2D=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){f(a,this)}var c=a.addForwardingProperties,d=a.mixin,e=a.registerWrapper,f=a.setWrapper,g=a.unsafeUnwrap,h=a.unwrapIfNeeded,i=a.wrap,j=window.WebGLRenderingContext;if(j){d(b.prototype,{get canvas(){return i(g(this).canvas)},texImage2D:function(){arguments[5]=h(arguments[5]),g(this).texImage2D.apply(g(this),arguments)},texSubImage2D:function(){arguments[6]=h(arguments[6]),g(this).texSubImage2D.apply(g(this),arguments)}});var k=Object.getPrototypeOf(j.prototype);k!==Object.prototype&&c(k,b.prototype);var l=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};e(j,b,l),a.wrappers.WebGLRenderingContext=b}}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.Node,d=a.GetElementsByInterface,e=a.NonElementParentNodeInterface,f=a.ParentNodeInterface,g=a.SelectorsInterface,h=a.mixin,i=a.registerObject,j=a.registerWrapper,k=window.DocumentFragment;b.prototype=Object.create(c.prototype),h(b.prototype,f),h(b.prototype,g),h(b.prototype,d),h(b.prototype,e),j(k,b,document.createDocumentFragment()),a.wrappers.DocumentFragment=b;var l=i(document.createComment(""));a.wrappers.Comment=l}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b=l(k(a).ownerDocument.createDocumentFragment());c.call(this,b),i(b,this);var e=a.shadowRoot;o.set(this,e),this.treeScope_=new d(this,g(e||a)),n.set(this,a)}var c=a.wrappers.DocumentFragment,d=a.TreeScope,e=a.elementFromPoint,f=a.getInnerHTML,g=a.getTreeScope,h=a.mixin,i=a.rewrap,j=a.setInnerHTML,k=a.unsafeUnwrap,l=a.unwrap,m=a.wrap,n=new WeakMap,o=new WeakMap;b.prototype=Object.create(c.prototype),h(b.prototype,{constructor:b,get innerHTML(){return f(this)},set innerHTML(a){j(this,a),this.invalidateShadowRenderer()},get olderShadowRoot(){return o.get(this)||null},get host(){return n.get(this)||null},invalidateShadowRenderer:function(){return n.get(this).invalidateShadowRenderer()},elementFromPoint:function(a,b){return e(this,this.ownerDocument,a,b)},getSelection:function(){return document.getSelection()},get activeElement(){var a=l(this).ownerDocument.activeElement;if(!a||!a.nodeType)return null;for(var b=m(a);!this.contains(b);){for(;b.parentNode;)b=b.parentNode;if(!b.host)return null;b=b.host}return b}}),a.wrappers.ShadowRoot=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b=l(a).root;return b instanceof n?b.host:null}function c(b,c){if(b.shadowRoot){c=Math.min(b.childNodes.length-1,c);var d=b.childNodes[c];if(d){var e=a.getDestinationInsertionPoints(d);if(e.length>0){var f=e[0].parentNode;f.nodeType==Node.ELEMENT_NODE&&(b=f)}}}return b}function d(a){return a=k(a),b(a)||a}function e(a){g(a,this)}var f=a.registerWrapper,g=a.setWrapper,h=a.unsafeUnwrap,i=a.unwrap,j=a.unwrapIfNeeded,k=a.wrap,l=a.getTreeScope,m=window.Range,n=a.wrappers.ShadowRoot;e.prototype={get startContainer(){return d(h(this).startContainer)},get endContainer(){return d(h(this).endContainer)},get commonAncestorContainer(){return d(h(this).commonAncestorContainer)},setStart:function(a,b){a=c(a,b),h(this).setStart(j(a),b)},setEnd:function(a,b){a=c(a,b),h(this).setEnd(j(a),b)},setStartBefore:function(a){h(this).setStartBefore(j(a))},setStartAfter:function(a){h(this).setStartAfter(j(a))},setEndBefore:function(a){h(this).setEndBefore(j(a))},setEndAfter:function(a){h(this).setEndAfter(j(a))},selectNode:function(a){h(this).selectNode(j(a))},selectNodeContents:function(a){h(this).selectNodeContents(j(a))},compareBoundaryPoints:function(a,b){return h(this).compareBoundaryPoints(a,i(b))},extractContents:function(){return k(h(this).extractContents())},cloneContents:function(){return k(h(this).cloneContents())},insertNode:function(a){h(this).insertNode(j(a))},surroundContents:function(a){h(this).surroundContents(j(a))},cloneRange:function(){return k(h(this).cloneRange())},isPointInRange:function(a,b){return h(this).isPointInRange(j(a),b)},comparePoint:function(a,b){return h(this).comparePoint(j(a),b)},intersectsNode:function(a){return h(this).intersectsNode(j(a))},toString:function(){return h(this).toString()}},m.prototype.createContextualFragment&&(e.prototype.createContextualFragment=function(a){return k(h(this).createContextualFragment(a))}),f(window.Range,e,document.createRange()),a.wrappers.Range=e}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){a.previousSibling_=a.previousSibling,a.nextSibling_=a.nextSibling,a.parentNode_=a.parentNode}function c(c,e,f){var g=H(c),h=H(e),i=f?H(f):null;if(d(e),b(e),f)c.firstChild===f&&(c.firstChild_=f),f.previousSibling_=f.previousSibling;else{c.lastChild_=c.lastChild,c.lastChild===c.firstChild&&(c.firstChild_=c.firstChild);var j=I(g.lastChild);j&&(j.nextSibling_=j.nextSibling)}a.originalInsertBefore.call(g,h,i)}function d(c){var d=H(c),e=d.parentNode;if(e){var f=I(e);b(c),c.previousSibling&&(c.previousSibling.nextSibling_=c),c.nextSibling&&(c.nextSibling.previousSibling_=c),f.lastChild===c&&(f.lastChild_=c),f.firstChild===c&&(f.firstChild_=c),a.originalRemoveChild.call(e,d)}}function e(a){K.set(a,[])}function f(a){var b=K.get(a);return b||K.set(a,b=[]),b}function g(a){for(var b=[],c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d;return b}function h(){for(var a=0;ap;p++){var q=I(f[k++]);h.get(q)||d(q)}for(var r=n.addedCount,s=f[k]&&I(f[k]),p=0;r>p;p++){var t=e[j++],u=t.node;c(b,u,s),h.set(u,!0),t.sync(h)}l+=r}for(var m=l;m=0;e--){var f=d[e],g=p(f);if(g){var h=f.olderShadowRoot;h&&(c=o(h));for(var i=0;i=0;k--)j=Object.create(j);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(a){var b=e[a];b&&(j[a]=function(){E(this)instanceof d||A(this),b.apply(E(this),arguments)})});var l={prototype:j};f&&(l["extends"]=f),d.prototype=e,d.prototype.constructor=d,a.constructorTable.set(j,d),a.nativePrototypeTable.set(e,j);L.call(D(this),b,l);return d},v([window.HTMLDocument||window.Document],["registerElement"])}v([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),v([window.HTMLBodyElement,window.HTMLHeadElement,window.HTMLHtmlElement],w),v([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","createTreeWalker","elementFromPoint","getElementById","getElementsByName","getSelection"]),x(b.prototype,j),x(b.prototype,l),x(b.prototype,o),x(b.prototype,m),x(b.prototype,{get implementation(){var a=G.get(this);return a?a:(a=new g(D(this).implementation),G.set(this,a),a)},get defaultView(){return E(D(this).defaultView)}}),y(window.Document,b,document.implementation.createHTMLDocument("")),window.HTMLDocument&&y(window.HTMLDocument,b),F([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]);var M=document.implementation.createDocument;g.prototype.createDocument=function(){return arguments[2]=D(arguments[2]),E(M.apply(C(this),arguments))},h(g,"createDocumentType"),h(g,"createHTMLDocument"),i(g,"hasFeature"),y(window.DOMImplementation,g),v([window.DOMImplementation],["createDocument","createDocumentType","createHTMLDocument","hasFeature"]),a.adoptNodeNoRemove=d,a.wrappers.DOMImplementation=g,a.wrappers.Document=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.EventTarget,d=a.wrappers.Selection,e=a.mixin,f=a.registerWrapper,g=a.renderAllPending,h=a.unwrap,i=a.unwrapIfNeeded,j=a.wrap,k=window.Window,l=window.getComputedStyle,m=window.getDefaultComputedStyle,n=window.getSelection;b.prototype=Object.create(c.prototype),k.prototype.getComputedStyle=function(a,b){return j(this||window).getComputedStyle(i(a),b)},m&&(k.prototype.getDefaultComputedStyle=function(a,b){return j(this||window).getDefaultComputedStyle(i(a),b)}),k.prototype.getSelection=function(){return j(this||window).getSelection()},delete window.getComputedStyle,delete window.getDefaultComputedStyle,delete window.getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(a){k.prototype[a]=function(){var b=j(this||window);return b[a].apply(b,arguments)},delete window[a]}),e(b.prototype,{getComputedStyle:function(a,b){return g(),l.call(h(this),i(a),b)},getSelection:function(){return g(),new d(n.call(h(this)))},get document(){return j(h(this).document)}}),m&&(b.prototype.getDefaultComputedStyle=function(a,b){return g(),m.call(h(this),i(a),b)}),f(k,b,window),a.wrappers.Window=b}(window.ShadowDOMPolyfill),function(a){"use strict";var b=a.unwrap,c=window.DataTransfer||window.Clipboard,d=c.prototype.setDragImage;d&&(c.prototype.setDragImage=function(a,c,e){d.call(this,b(a),c,e)})}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b;b=a instanceof f?a:new f(a&&e(a)),d(b,this)}var c=a.registerWrapper,d=a.setWrapper,e=a.unwrap,f=window.FormData;f&&(c(f,b,new f),a.wrappers.FormData=b)}(window.ShadowDOMPolyfill),function(a){"use strict";var b=a.unwrapIfNeeded,c=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(a){return c.call(this,b(a))}}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b=c[a],d=window[b];if(d){var e=document.createElement(a),f=e.constructor;window[b]=f}}var c=(a.isWrapperFor,{a:"HTMLAnchorElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",base:"HTMLBaseElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",content:"HTMLContentElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",del:"HTMLModElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",head:"HTMLHeadElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",shadow:"HTMLShadowElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(c).forEach(b),Object.getOwnPropertyNames(a.wrappers).forEach(function(b){window[b]=a.wrappers[b]})}(window.ShadowDOMPolyfill),function(a){function b(a,b){var c="";return Array.prototype.forEach.call(a,function(a){c+=a.textContent+"\n\n"}),b||(c=c.replace(l,"")),c}function c(a){var b=document.createElement("style");return b.textContent=a,b}function d(a){var b=c(a);document.head.appendChild(b);var d=[];if(b.sheet)try{d=b.sheet.cssRules}catch(e){}else console.warn("sheet not found",b);return b.parentNode.removeChild(b),d}function e(){D.initialized=!0,document.body.appendChild(D);var a=D.contentDocument,b=a.createElement("base");b.href=document.baseURI,a.head.appendChild(b)}function f(a){D.initialized||e(),document.body.appendChild(D),a(D.contentDocument),document.body.removeChild(D)}function g(a,b){if(b){var e;if(a.match("@import")&&F){var g=c(a);f(function(a){a.head.appendChild(g.impl),e=Array.prototype.slice.call(g.sheet.cssRules,0),b(e)})}else e=d(a),b(e)}}function h(a){a&&j().appendChild(document.createTextNode(a))}function i(a,b){var d=c(a);d.setAttribute(b,""),d.setAttribute(H,""),document.head.appendChild(d)}function j(){return E||(E=document.createElement("style"),E.setAttribute(H,""),E[H]=!0),E}var k={strictStyling:!1,registry:{},shimStyling:function(a,c,d){var e=this.prepareRoot(a,c,d),f=this.isTypeExtension(d),g=this.makeScopeSelector(c,f),h=b(e,!0);h=this.scopeCssText(h,g),a&&(a.shimmedStyle=h),this.addCssToDocument(h,c)},shimStyle:function(a,b){return this.shimCssText(a.textContent,b)},shimCssText:function(a,b){return a=this.insertDirectives(a),this.scopeCssText(a,b)},makeScopeSelector:function(a,b){return a?b?"[is="+a+"]":a:""},isTypeExtension:function(a){return a&&a.indexOf("-")<0},prepareRoot:function(a,b,c){var d=this.registerRoot(a,b,c);return this.replaceTextInStyles(d.rootStyles,this.insertDirectives),this.removeStyles(a,d.rootStyles),this.strictStyling&&this.applyScopeToContent(a,b),d.scopeStyles},removeStyles:function(a,b){for(var c,d=0,e=b.length;e>d&&(c=b[d]);d++)c.parentNode.removeChild(c)},registerRoot:function(a,b,c){var d=this.registry[b]={root:a,name:b,extendsName:c},e=this.findStyles(a);d.rootStyles=e,d.scopeStyles=d.rootStyles;var f=this.registry[d.extendsName];return f&&(d.scopeStyles=f.scopeStyles.concat(d.scopeStyles)),d},findStyles:function(a){if(!a)return[];var b=a.querySelectorAll("style");return Array.prototype.filter.call(b,function(a){return!a.hasAttribute(I)})},applyScopeToContent:function(a,b){a&&(Array.prototype.forEach.call(a.querySelectorAll("*"),function(a){a.setAttribute(b,"")}),Array.prototype.forEach.call(a.querySelectorAll("template"),function(a){this.applyScopeToContent(a.content,b)},this))},insertDirectives:function(a){return a=this.insertPolyfillDirectivesInCssText(a),this.insertPolyfillRulesInCssText(a)},insertPolyfillDirectivesInCssText:function(a){return a=a.replace(m,function(a,b){return b.slice(0,-2)+"{"}),a.replace(n,function(a,b){return b+" {"})},insertPolyfillRulesInCssText:function(a){return a=a.replace(o,function(a,b){return b.slice(0,-1)}),a.replace(p,function(a,b,c,d){var e=a.replace(b,"").replace(c,"");return d+e})},scopeCssText:function(a,b){var c=this.extractUnscopedRulesFromCssText(a);if(a=this.insertPolyfillHostInCssText(a),a=this.convertColonHost(a),a=this.convertColonHostContext(a),a=this.convertShadowDOMSelectors(a),b){ +var a,d=this;g(a,function(c){a=d.scopeRules(c,b)})}return a=a+"\n"+c,a.trim()},extractUnscopedRulesFromCssText:function(a){for(var b,c="";b=q.exec(a);)c+=b[1].slice(0,-1)+"\n\n";for(;b=r.exec(a);)c+=b[0].replace(b[2],"").replace(b[1],b[3])+"\n\n";return c},convertColonHost:function(a){return this.convertColonRule(a,v,this.colonHostPartReplacer)},convertColonHostContext:function(a){return this.convertColonRule(a,w,this.colonHostContextPartReplacer)},convertColonRule:function(a,b,c){return a.replace(b,function(a,b,d,e){if(b=A,d){for(var f,g=d.split(","),h=[],i=0,j=g.length;j>i&&(f=g[i]);i++)f=f.trim(),h.push(c(b,f,e));return h.join(",")}return b+e})},colonHostContextPartReplacer:function(a,b,c){return b.match(s)?this.colonHostPartReplacer(a,b,c):a+b+c+", "+b+" "+a+c},colonHostPartReplacer:function(a,b,c){return a+b.replace(s,"")+c},convertShadowDOMSelectors:function(a){for(var b=0;b","+","~"],d=a,e="["+b+"]";return c.forEach(function(a){var b=d.split(a);d=b.map(function(a){var b=a.trim().replace(B,"");return b&&c.indexOf(b)<0&&b.indexOf(e)<0&&(a=b.replace(/([^:]*)(:*)(.*)/,"$1"+e+"$2$3")),a}).join(a)}),d},insertPolyfillHostInCssText:function(a){return a.replace(z,t).replace(y,s)},propertiesFromRule:function(a){var b=a.style.cssText;a.style.content&&!a.style.content.match(/['"]+|attr/)&&(b=b.replace(/content:[^;]*;/g,"content: '"+a.style.content+"';"));var c=a.style;for(var d in c)"initial"===c[d]&&(b+=d+": initial; ");return b},replaceTextInStyles:function(a,b){a&&b&&(a instanceof Array||(a=[a]),Array.prototype.forEach.call(a,function(a){a.textContent=b.call(this,a.textContent)},this))},addCssToDocument:function(a,b){a.match("@import")?i(a,b):h(a)}},l=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,m=/\/\*\s*@polyfill ([^*]*\*+([^\/*][^*]*\*+)*\/)([^{]*?){/gim,n=/polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,o=/\/\*\s@polyfill-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim,p=/(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,q=/\/\*\s@polyfill-unscoped-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim,r=/(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,s="-shadowcsshost",t="-shadowcsscontext",u=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",v=new RegExp("("+s+u,"gim"),w=new RegExp("("+t+u,"gim"),x="([>\\s~+[.,{:][\\s\\S]*)?$",y=/\:host/gim,z=/\:host-context/gim,A=s+"-no-combinator",B=new RegExp(s,"gim"),C=(new RegExp(t,"gim"),[/>>>/g,/::shadow/g,/::content/g,/\/deep\//g,/\/shadow\//g,/\/shadow-deep\//g,/\^\^/g,/\^/g]),D=document.createElement("iframe");D.style.display="none";var E,F=navigator.userAgent.match("Chrome"),G="shim-shadowdom",H="shim-shadowdom-css",I="no-shim";if(window.ShadowDOMPolyfill){h("style { display: none !important; }\n");var J=ShadowDOMPolyfill.wrap(document),K=J.querySelector("head");K.insertBefore(j(),K.childNodes[0]),document.addEventListener("DOMContentLoaded",function(){a.urlResolver;if(window.HTMLImports&&!HTMLImports.useNative){var b="link[rel=stylesheet]["+G+"]",c="style["+G+"]";HTMLImports.importer.documentPreloadSelectors+=","+b,HTMLImports.importer.importsPreloadSelectors+=","+b,HTMLImports.parser.documentSelectors=[HTMLImports.parser.documentSelectors,b,c].join(",");var d=HTMLImports.parser.parseGeneric;HTMLImports.parser.parseGeneric=function(a){if(!a[H]){var b=a.__importElement||a;if(!b.hasAttribute(G))return void d.call(this,a);a.__resource&&(b=a.ownerDocument.createElement("style"),b.textContent=a.__resource),HTMLImports.path.resolveUrlsInStyle(b,a.href),b.textContent=k.shimStyle(b),b.removeAttribute(G,""),b.setAttribute(H,""),b[H]=!0,b.parentNode!==K&&(a.parentNode===K?K.replaceChild(b,a):this.addElementToDocument(b)),b.__importParsed=!0,this.markParsingComplete(a),this.parseNext()}};var e=HTMLImports.parser.hasResource;HTMLImports.parser.hasResource=function(a){return"link"===a.localName&&"stylesheet"===a.rel&&a.hasAttribute(G)?a.__resource:e.call(this,a)}}})}a.ShadowCSS=k}(window.WebComponents)),function(a){window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(a){return a}}(window.WebComponents),function(a){"use strict";function b(a){return void 0!==m[a]}function c(){h.call(this),this._isInvalid=!0}function d(a){return""==a&&c.call(this),a.toLowerCase()}function e(a){var b=a.charCodeAt(0);return b>32&&127>b&&-1==[34,35,60,62,63,96].indexOf(b)?a:encodeURIComponent(a)}function f(a){var b=a.charCodeAt(0);return b>32&&127>b&&-1==[34,35,60,62,96].indexOf(b)?a:encodeURIComponent(a)}function g(a,g,h){function i(a){t.push(a)}var j=g||"scheme start",k=0,l="",r=!1,s=!1,t=[];a:for(;(a[k-1]!=o||0==k)&&!this._isInvalid;){var u=a[k];switch(j){case"scheme start":if(!u||!p.test(u)){if(g){i("Invalid scheme.");break a}l="",j="no scheme";continue}l+=u.toLowerCase(),j="scheme";break;case"scheme":if(u&&q.test(u))l+=u.toLowerCase();else{if(":"!=u){if(g){if(o==u)break a;i("Code point not allowed in scheme: "+u);break a}l="",k=0,j="no scheme";continue}if(this._scheme=l,l="",g)break a;b(this._scheme)&&(this._isRelative=!0),j="file"==this._scheme?"relative":this._isRelative&&h&&h._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==u?(this._query="?",j="query"):"#"==u?(this._fragment="#",j="fragment"):o!=u&&" "!=u&&"\n"!=u&&"\r"!=u&&(this._schemeData+=e(u));break;case"no scheme":if(h&&b(h._scheme)){j="relative";continue}i("Missing scheme."),c.call(this);break;case"relative or authority":if("/"!=u||"/"!=a[k+1]){i("Expected /, got: "+u),j="relative";continue}j="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=h._scheme),o==u){this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query,this._username=h._username,this._password=h._password;break a}if("/"==u||"\\"==u)"\\"==u&&i("\\ is an invalid code point."),j="relative slash";else if("?"==u)this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query="?",this._username=h._username,this._password=h._password,j="query";else{if("#"!=u){var v=a[k+1],w=a[k+2];("file"!=this._scheme||!p.test(u)||":"!=v&&"|"!=v||o!=w&&"/"!=w&&"\\"!=w&&"?"!=w&&"#"!=w)&&(this._host=h._host,this._port=h._port,this._username=h._username,this._password=h._password,this._path=h._path.slice(),this._path.pop()),j="relative path";continue}this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query,this._fragment="#",this._username=h._username,this._password=h._password,j="fragment"}break;case"relative slash":if("/"!=u&&"\\"!=u){"file"!=this._scheme&&(this._host=h._host,this._port=h._port,this._username=h._username,this._password=h._password),j="relative path";continue}"\\"==u&&i("\\ is an invalid code point."),j="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=u){i("Expected '/', got: "+u),j="authority ignore slashes";continue}j="authority second slash";break;case"authority second slash":if(j="authority ignore slashes","/"!=u){i("Expected '/', got: "+u);continue}break;case"authority ignore slashes":if("/"!=u&&"\\"!=u){j="authority";continue}i("Expected authority, got: "+u);break;case"authority":if("@"==u){r&&(i("@ already seen."),l+="%40"),r=!0;for(var x=0;x0){var e=c[d-1],f=n(e,a);if(f)return void(c[d-1]=f)}else b(this.observer);c[d]=a},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(a){var b=this.options;b.attributes&&a.addEventListener("DOMAttrModified",this,!0),b.characterData&&a.addEventListener("DOMCharacterDataModified",this,!0),b.childList&&a.addEventListener("DOMNodeInserted",this,!0),(b.childList||b.subtree)&&a.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(a){var b=this.options;b.attributes&&a.removeEventListener("DOMAttrModified",this,!0),b.characterData&&a.removeEventListener("DOMCharacterDataModified",this,!0),b.childList&&a.removeEventListener("DOMNodeInserted",this,!0),(b.childList||b.subtree)&&a.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(a){if(a!==this.target){this.addListeners_(a),this.transientObservedNodes.push(a);var b=q.get(a);b||q.set(a,b=[]),b.push(this)}},removeTransientObservers:function(){var a=this.transientObservedNodes;this.transientObservedNodes=[],a.forEach(function(a){this.removeListeners_(a);for(var b=q.get(a),c=0;cn&&(m=h[n]);n++)g(m)?(k.push(this),i++,c()):(m.addEventListener("load",d),m.addEventListener("error",f));else c()}function g(a){return l?a.__loaded||a["import"]&&"loading"!==a["import"].readyState:a.__importParsed}function h(a){for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)i(b)&&j(b)}function i(a){return"link"===a.localName&&"import"===a.rel}function j(a){var b=a["import"];b?e({target:a}):(a.addEventListener("load",e),a.addEventListener("error",e))}var k="import",l=Boolean(k in document.createElement("link")),m=Boolean(window.ShadowDOMPolyfill),n=function(a){return m?window.ShadowDOMPolyfill.wrapIfNeeded(a):a},o=n(document),p={get:function(){var a=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return n(a)},configurable:!0};Object.defineProperty(document,"_currentScript",p),Object.defineProperty(o,"_currentScript",p);var q=/Trident/.test(navigator.userAgent),r=q?"complete":"interactive",s="readystatechange";l&&(new MutationObserver(function(a){for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)b.addedNodes&&h(b.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var a,b=document.querySelectorAll("link[rel=import]"),c=0,d=b.length;d>c&&(a=b[c]);c++)j(a)}()),b(function(a){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var b=o.createEvent("CustomEvent");b.initCustomEvent("HTMLImportsLoaded",!0,!0,a),o.dispatchEvent(b)}),a.IMPORT_LINK_TYPE=k,a.useNative=l,a.rootDocument=o,a.whenReady=b,a.isIE=q}(window.HTMLImports),function(a){var b=[],c=function(a){b.push(a)},d=function(){b.forEach(function(b){b(a)})};a.addModule=c,a.initializeModules=d}(window.HTMLImports),window.HTMLImports.addModule(function(a){var b=/(url\()([^)]*)(\))/g,c=/(@import[\s]+(?!url\())([^;]*)(;)/g,d={resolveUrlsInStyle:function(a,b){var c=a.ownerDocument,d=c.createElement("a");return a.textContent=this.resolveUrlsInCssText(a.textContent,b,d),a},resolveUrlsInCssText:function(a,d,e){var f=this.replaceUrls(a,e,d,b);return f=this.replaceUrls(f,e,d,c)},replaceUrls:function(a,b,c,d){return a.replace(d,function(a,d,e,f){var g=e.replace(/["']/g,"");return c&&(g=new URL(g,c).href),b.href=g,g=b.href,d+"'"+g+"'"+f})}};a.path=d}),window.HTMLImports.addModule(function(a){var b={async:!0,ok:function(a){return a.status>=200&&a.status<300||304===a.status||0===a.status},load:function(c,d,e){var f=new XMLHttpRequest;return(a.flags.debug||a.flags.bust)&&(c+="?"+Math.random()),f.open("GET",c,b.async),f.addEventListener("readystatechange",function(a){if(4===f.readyState){var c=null;try{var g=f.getResponseHeader("Location");g&&(c="/"===g.substr(0,1)?location.origin+g:g)}catch(a){console.error(a.message)}d.call(e,!b.ok(f)&&f,f.response||f.responseText,c)}}),f.send(),f},loadDocument:function(a,b,c){this.load(a,b,c).responseType="document"}};a.xhr=b}),window.HTMLImports.addModule(function(a){var b=a.xhr,c=a.flags,d=function(a,b){this.cache={},this.onload=a,this.oncomplete=b,this.inflight=0,this.pending={}};d.prototype={addNodes:function(a){this.inflight+=a.length;for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)this.require(b);this.checkDone()},addNode:function(a){this.inflight++,this.require(a),this.checkDone()},require:function(a){var b=a.src||a.href;a.__nodeUrl=b,this.dedupe(b,a)||this.fetch(b,a)},dedupe:function(a,b){if(this.pending[a])return this.pending[a].push(b),!0;return this.cache[a]?(this.onload(a,b,this.cache[a]),this.tail(),!0):(this.pending[a]=[b],!1)},fetch:function(a,d){if(c.load&&console.log("fetch",a,d),a)if(a.match(/^data:/)){var e=a.split(","),f=e[0],g=e[1];g=f.indexOf(";base64")>-1?atob(g):decodeURIComponent(g),setTimeout(function(){this.receive(a,d,null,g)}.bind(this),0)}else{var h=function(b,c,e){this.receive(a,d,b,c,e)}.bind(this);b.load(a,h)}else setTimeout(function(){this.receive(a,d,{error:"href must be specified"},null)}.bind(this),0)},receive:function(a,b,c,d,e){this.cache[a]=d;for(var f,g=this.pending[a],h=0,i=g.length;i>h&&(f=g[h]);h++)this.onload(a,f,d,c,e),this.tail();this.pending[a]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},a.Loader=d}),window.HTMLImports.addModule(function(a){var b=function(a){this.addCallback=a,this.mo=new MutationObserver(this.handler.bind(this))};b.prototype={handler:function(a){for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)"childList"===b.type&&b.addedNodes.length&&this.addedNodes(b.addedNodes)},addedNodes:function(a){this.addCallback&&this.addCallback(a);for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)b.children&&b.children.length&&this.addedNodes(b.children)},observe:function(a){this.mo.observe(a,{childList:!0,subtree:!0})}},a.Observer=b}),window.HTMLImports.addModule(function(a){function b(a){return"link"===a.localName&&a.rel===k}function c(a){var b=d(a);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(b)}function d(a){return a.textContent+e(a)}function e(a){var b=a.ownerDocument;b.__importedScripts=b.__importedScripts||0;var c=a.ownerDocument.baseURI,d=b.__importedScripts?"-"+b.__importedScripts:"";return b.__importedScripts++,"\n//# sourceURL="+c+d+".js\n"}function f(a){var b=a.ownerDocument.createElement("style");return b.textContent=a.textContent,g.resolveUrlsInStyle(b),b}var g=a.path,h=a.rootDocument,i=a.flags,j=a.isIE,k=a.IMPORT_LINK_TYPE,l="link[rel="+k+"]",m={documentSelectors:l,importsSelectors:[l,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var a=this.nextToParse();a&&this.parse(a)},parse:function(a){if(this.isParsed(a))return void(i.parse&&console.log("[%s] is already parsed",a.localName));var b=this[this.map[a.localName]];b&&(this.markParsing(a),b.call(this,a))},parseDynamic:function(a,b){this.dynamicElements.push(a),b||this.parseNext()},markParsing:function(a){i.parse&&console.log("parsing",a),this.parsingElement=a},markParsingComplete:function(a){a.__importParsed=!0,this.markDynamicParsingComplete(a),a.__importElement&&(a.__importElement.__importParsed=!0,this.markDynamicParsingComplete(a.__importElement)),this.parsingElement=null,i.parse&&console.log("completed",a)},markDynamicParsingComplete:function(a){var b=this.dynamicElements.indexOf(a);b>=0&&this.dynamicElements.splice(b,1)},parseImport:function(a){if(a["import"]=a.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(a),a["import"]&&(a["import"].__importParsed=!0),this.markParsingComplete(a),a.__resource&&!a.__error?a.dispatchEvent(new CustomEvent("load",{bubbles:!1})):a.dispatchEvent(new CustomEvent("error",{bubbles:!1})),a.__pending)for(var b;a.__pending.length;)b=a.__pending.shift(),b&&b({target:a});this.parseNext()},parseLink:function(a){b(a)?this.parseImport(a):(a.href=a.href,this.parseGeneric(a))},parseStyle:function(a){var b=a;a=f(a),b.__appliedElement=a,a.__importElement=b,this.parseGeneric(a)},parseGeneric:function(a){this.trackElement(a),this.addElementToDocument(a)},rootImportForElement:function(a){for(var b=a;b.ownerDocument.__importLink;)b=b.ownerDocument.__importLink;return b},addElementToDocument:function(a){var b=this.rootImportForElement(a.__importElement||a);b.parentNode.insertBefore(a,b)},trackElement:function(a,b){var c=this,d=function(e){a.removeEventListener("load",d),a.removeEventListener("error",d),b&&b(e),c.markParsingComplete(a),c.parseNext()};if(a.addEventListener("load",d),a.addEventListener("error",d),j&&"style"===a.localName){var e=!1;if(-1==a.textContent.indexOf("@import"))e=!0;else if(a.sheet){e=!0;for(var f,g=a.sheet.cssRules,h=g?g.length:0,i=0;h>i&&(f=g[i]);i++)f.type===CSSRule.IMPORT_RULE&&(e=e&&Boolean(f.styleSheet))}e&&setTimeout(function(){a.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(b){var d=document.createElement("script");d.__importElement=b,d.src=b.src?b.src:c(b),a.currentScript=b,this.trackElement(d,function(b){d.parentNode&&d.parentNode.removeChild(d),a.currentScript=null}),this.addElementToDocument(d)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(h)||this.nextToParseDynamic())},nextToParseInDoc:function(a,c){if(a&&this._mayParse.indexOf(a)<0){this._mayParse.push(a);for(var d,e=a.querySelectorAll(this.parseSelectorsForNode(a)),f=0,g=e.length;g>f&&(d=e[f]);f++)if(!this.isParsed(d))return this.hasResource(d)?b(d)?this.nextToParseInDoc(d.__doc,d):d:void 0}return c},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(a){var b=a.ownerDocument||a;return b===h?this.documentSelectors:this.importsSelectors},isParsed:function(a){return a.__importParsed},needsDynamicParsing:function(a){return this.dynamicElements.indexOf(a)>=0},hasResource:function(a){return!b(a)||void 0!==a.__doc}};a.parser=m,a.IMPORT_SELECTOR=l}),window.HTMLImports.addModule(function(a){function b(a){return c(a,g)}function c(a,b){return"link"===a.localName&&a.getAttribute("rel")===b}function d(a){return!!Object.getOwnPropertyDescriptor(a,"baseURI")}function e(a,b){var c=document.implementation.createHTMLDocument(g);c._URL=b;var e=c.createElement("base");e.setAttribute("href",b),c.baseURI||d(c)||Object.defineProperty(c,"baseURI",{value:b});var f=c.createElement("meta");return f.setAttribute("charset","utf-8"),c.head.appendChild(f),c.head.appendChild(e),c.body.innerHTML=a,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(c),c}var f=a.flags,g=a.IMPORT_LINK_TYPE,h=a.IMPORT_SELECTOR,i=a.rootDocument,j=a.Loader,k=a.Observer,l=a.parser,m={documents:{},documentPreloadSelectors:h,importsPreloadSelectors:[h].join(","),loadNode:function(a){n.addNode(a)},loadSubtree:function(a){var b=this.marshalNodes(a);n.addNodes(b)},marshalNodes:function(a){return a.querySelectorAll(this.loadSelectorsForNode(a))},loadSelectorsForNode:function(a){var b=a.ownerDocument||a;return b===i?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(a,c,d,g,h){if(f.load&&console.log("loaded",a,c),c.__resource=d,c.__error=g,b(c)){var i=this.documents[a];void 0===i&&(i=g?null:e(d,h||a),i&&(i.__importLink=c,this.bootDocument(i)),this.documents[a]=i),c.__doc=i}l.parseNext()},bootDocument:function(a){this.loadSubtree(a),this.observer.observe(a),l.parseNext()},loadedAll:function(){l.parseNext()}},n=new j(m.loaded.bind(m),m.loadedAll.bind(m));if(m.observer=new k,!document.baseURI){var o={get:function(){var a=document.querySelector("base");return a?a.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",o),Object.defineProperty(i,"baseURI",o)}a.importer=m,a.importLoader=n}),window.HTMLImports.addModule(function(a){var b=a.parser,c=a.importer,d={added:function(a){for(var d,e,f,g,h=0,i=a.length;i>h&&(g=a[h]);h++)d||(d=g.ownerDocument,e=b.isParsed(d)),f=this.shouldLoadNode(g),f&&c.loadNode(g),this.shouldParseNode(g)&&e&&b.parseDynamic(g,f)},shouldLoadNode:function(a){return 1===a.nodeType&&e.call(a,c.loadSelectorsForNode(a))},shouldParseNode:function(a){return 1===a.nodeType&&e.call(a,b.parseSelectorsForNode(a))}};c.observer.addCallback=d.added.bind(d);var e=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector; +}),function(a){function b(){window.HTMLImports.importer.bootDocument(d)}var c=a.initializeModules;a.isIE;if(!a.useNative){c();var d=a.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?b():document.addEventListener("DOMContentLoaded",b)}}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(a){var b=a.flags,c=[],d=function(a){c.push(a)},e=function(){c.forEach(function(b){b(a)})};a.addModule=d,a.initializeModules=e,a.hasNative=Boolean(document.registerElement),a.isIE=/Trident/.test(navigator.userAgent),a.useNative=!b.register&&a.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(a){function b(a,b){c(a,function(a){return b(a)?!0:void d(a,b)}),d(a,b)}function c(a,b,d){var e=a.firstElementChild;if(!e)for(e=a.firstChild;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;for(;e;)b(e,d)!==!0&&c(e,b,d),e=e.nextElementSibling;return null}function d(a,c){for(var d=a.shadowRoot;d;)b(d,c),d=d.olderShadowRoot}function e(a,b){f(a,b,[])}function f(a,b,c){if(a=window.wrap(a),!(c.indexOf(a)>=0)){c.push(a);for(var d,e=a.querySelectorAll("link[rel="+g+"]"),h=0,i=e.length;i>h&&(d=e[h]);h++)d["import"]&&f(d["import"],b,c);b(a)}}var g=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";a.forDocumentTree=e,a.forSubtree=b}),window.CustomElements.addModule(function(a){function b(a,b){return c(a,b)||d(a,b)}function c(b,c){return a.upgrade(b,c)?!0:void(c&&g(b))}function d(a,b){t(a,function(a){return c(a,b)?!0:void 0})}function e(a){x.push(a),w||(w=!0,setTimeout(f))}function f(){w=!1;for(var a,b=x,c=0,d=b.length;d>c&&(a=b[c]);c++)a();x=[]}function g(a){v?e(function(){h(a)}):h(a)}function h(a){a.__upgraded__&&!a.__attached&&(a.__attached=!0,a.attachedCallback&&a.attachedCallback())}function i(a){j(a),t(a,function(a){j(a)})}function j(a){v?e(function(){k(a)}):k(a)}function k(a){a.__upgraded__&&a.__attached&&(a.__attached=!1,a.detachedCallback&&a.detachedCallback())}function l(a){for(var b=a,c=window.wrap(document);b;){if(b==c)return!0;b=b.parentNode||b.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&b.host}}function m(a){if(a.shadowRoot&&!a.shadowRoot.__watched){s.dom&&console.log("watching shadow-root for: ",a.localName);for(var b=a.shadowRoot;b;)p(b),b=b.olderShadowRoot}}function n(a,c){if(s.dom){var d=c[0];if(d&&"childList"===d.type&&d.addedNodes&&d.addedNodes){for(var e=d.addedNodes[0];e&&e!==document&&!e.host;)e=e.parentNode;var f=e&&(e.URL||e._URL||e.host&&e.host.localName)||"";f=f.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",c.length,f||"")}var g=l(a);c.forEach(function(a){"childList"===a.type&&(y(a.addedNodes,function(a){a.localName&&b(a,g)}),y(a.removedNodes,function(a){a.localName&&i(a)}))}),s.dom&&console.groupEnd()}function o(a){for(a=window.wrap(a),a||(a=window.wrap(document));a.parentNode;)a=a.parentNode;var b=a.__observer;b&&(n(a,b.takeRecords()),f())}function p(a){if(!a.__observer){var b=new MutationObserver(n.bind(this,a));b.observe(a,{childList:!0,subtree:!0}),a.__observer=b}}function q(a){a=window.wrap(a),s.dom&&console.group("upgradeDocument: ",a.baseURI.split("/").pop());var c=a===window.wrap(document);b(a,c),p(a),s.dom&&console.groupEnd()}function r(a){u(a,q)}var s=a.flags,t=a.forSubtree,u=a.forDocumentTree,v=window.MutationObserver._isPolyfilled&&s["throttle-attached"];a.hasPolyfillMutations=v,a.hasThrottledAttached=v;var w=!1,x=[],y=Array.prototype.forEach.call.bind(Array.prototype.forEach),z=Element.prototype.createShadowRoot;z&&(Element.prototype.createShadowRoot=function(){var a=z.call(this);return window.CustomElements.watchShadow(this),a}),a.watchShadow=m,a.upgradeDocumentTree=r,a.upgradeDocument=q,a.upgradeSubtree=d,a.upgradeAll=b,a.attached=g,a.takeRecords=o}),window.CustomElements.addModule(function(a){function b(b,d){if("template"===b.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(b),!b.__upgraded__&&b.nodeType===Node.ELEMENT_NODE){var e=b.getAttribute("is"),f=a.getRegisteredDefinition(b.localName)||a.getRegisteredDefinition(e);if(f&&(e&&f.tag==b.localName||!e&&!f["extends"]))return c(b,f,d)}}function c(b,c,e){return g.upgrade&&console.group("upgrade:",b.localName),c.is&&b.setAttribute("is",c.is),d(b,c),b.__upgraded__=!0,f(b),e&&a.attached(b),a.upgradeSubtree(b,e),g.upgrade&&console.groupEnd(),b}function d(a,b){Object.__proto__?a.__proto__=b.prototype:(e(a,b.prototype,b["native"]),a.__proto__=b.prototype)}function e(a,b,c){for(var d={},e=b;e!==c&&e!==HTMLElement.prototype;){for(var f,g=Object.getOwnPropertyNames(e),h=0;f=g[h];h++)d[f]||(Object.defineProperty(a,f,Object.getOwnPropertyDescriptor(e,f)),d[f]=1);e=Object.getPrototypeOf(e)}}function f(a){a.createdCallback&&a.createdCallback()}var g=a.flags;a.upgrade=b,a.upgradeWithDefinition=c,a.implementPrototype=d}),window.CustomElements.addModule(function(a){function b(b,d){var i=d||{};if(!b)throw new Error("document.registerElement: first argument `name` must not be empty");if(b.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(b)+"'.");if(e(b))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(b)+"'. The type name is invalid.");if(j(b))throw new Error("DuplicateDefinitionError: a type with name '"+String(b)+"' is already registered");return i.prototype||(i.prototype=Object.create(HTMLElement.prototype)),i.__name=b.toLowerCase(),i.lifecycle=i.lifecycle||{},i.ancestry=f(i["extends"]),g(i),h(i),c(i.prototype),k(i.__name,i),i.ctor=l(i),i.ctor.prototype=i.prototype,i.prototype.constructor=i.ctor,a.ready&&r(document),i.ctor}function c(a){if(!a.setAttribute._polyfilled){var b=a.setAttribute;a.setAttribute=function(a,c){d.call(this,a,c,b)};var c=a.removeAttribute;a.removeAttribute=function(a){d.call(this,a,null,c)},a.setAttribute._polyfilled=!0}}function d(a,b,c){a=a.toLowerCase();var d=this.getAttribute(a);c.apply(this,arguments);var e=this.getAttribute(a);this.attributeChangedCallback&&e!==d&&this.attributeChangedCallback(a,d,e)}function e(a){for(var b=0;b=0&&u(d,HTMLElement),d)}function o(a,b){var c=a[b];a[b]=function(){var a=c.apply(this,arguments);return s(a),a}}var p,q=a.isIE,r=a.upgradeDocumentTree,s=a.upgradeAll,t=a.upgradeWithDefinition,u=a.implementPrototype,v=a.useNative,w=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],x={},y="http://www.w3.org/1999/xhtml",z=document.createElement.bind(document),A=document.createElementNS.bind(document);p=Object.__proto__||v?function(a,b){return a instanceof b}:function(a,b){if(a instanceof b)return!0;for(var c=a;c;){if(c===b.prototype)return!0;c=c.__proto__}return!1},o(Node.prototype,"cloneNode"),o(document,"importNode"),q&&!function(){var a=document.importNode;document.importNode=function(){var b=a.apply(document,arguments);if(b.nodeType==b.DOCUMENT_FRAGMENT_NODE){var c=document.createDocumentFragment();return c.appendChild(b),c}return b}}(),document.registerElement=b,document.createElement=n,document.createElementNS=m,a.registry=x,a["instanceof"]=p,a.reservedTagList=w,a.getRegisteredDefinition=j,document.register=document.registerElement}),function(a){function b(){f(window.wrap(document)),window.CustomElements.ready=!0;var a=window.requestAnimationFrame||function(a){setTimeout(a,16)};a(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var c=a.useNative,d=a.initializeModules;a.isIE;if(c){var e=function(){};a.watchShadow=e,a.upgrade=e,a.upgradeAll=e,a.upgradeDocumentTree=e,a.upgradeSubtree=e,a.takeRecords=e,a["instanceof"]=function(a,b){return a instanceof b}}else d();var f=a.upgradeDocumentTree,g=a.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(a){return a}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(a){a["import"]&&g(wrap(a["import"]))}),"complete"===document.readyState||a.flags.eager)b();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var h=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(h,b)}else b()}(window.CustomElements),function(a){Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();return d.push.apply(d,arguments),b.apply(a,d)}})}(window.WebComponents),function(a){var b=document.createElement("style");b.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var c=document.querySelector("head");c.insertBefore(b,c.firstChild)}(window.WebComponents),function(a){window.Platform=a}(window.WebComponents),angular.module("ngAudio",[]).directive("ngAudio",["$compile","$q","ngAudio",function(a,b,c){return{restrict:"AEC",scope:{volume:"=",start:"=",currentTime:"=",loop:"=",clickPlay:"=",disablePreload:"="},controller:["$scope","$attrs","$element","$timeout",function(a,b,d,e){function f(){g=c.load(b.ngAudio,a),a.$audio=g,g.unbind()}var g;a.disablePreload||f(),d.on("click",function(){a.clickPlay!==!1&&(a.disablePreload&&f(),g.audio.play(),g.volume=a.volume||g.volume,g.loop=a.loop,g.currentTime=a.start||0,e(function(){g.play()},5))}),d.on("$destroy",function(){g.destroy()})}]}}]).directive("ngAudioHover",["$compile","$q","ngAudio",function(a,b,c){return{restrict:"AEC",controller:["$scope","$attrs","$element","$timeout",function(a,b,d,e){var f=c.load(b.ngAudioHover,a);d.on("mouseover rollover hover",function(){f.audio.play(),f.volume=b.volumeHover||f.volume,f.loop=b.loop,f.currentTime=b.startHover||0}),d.on("$destroy",function(){f.destroy()})}]}}]).service("localAudioFindingService",["$q",function(a){this.find=function(b){var c=a.defer(),d=document.getElementById(b);return d?c.resolve(d):c.reject(b),c.promise}}]).service("remoteAudioFindingService",["$q",function(a){this.find=function(b){var c=a.defer(),d=new Audio;return d.addEventListener("error",function(){c.reject()}),d.addEventListener("loadstart",function(){c.resolve(d)}),setTimeout(function(){d.src=b},1),c.promise}}]).service("cleverAudioFindingService",["$q","localAudioFindingService","remoteAudioFindingService",function(a,b,c){this.find=function(d){var e=a.defer();return d=d.replace("|","/"),b.find(d).then(e.resolve,function(){return c.find(d)}).then(e.resolve,e.reject),e.promise}}]).value("ngAudioGlobals",{muting:!1,songmuting:!1,performance:25,unlock:!0}).factory("NgAudioObject",["cleverAudioFindingService","$rootScope","$interval","$timeout","ngAudioGlobals",function(a,b,c,d,e){return function(d,f){function g(){o.play(),o.pause(),window.removeEventListener("click",g)}function h(){w||(A&&c.cancel(A),l&&l(),k&&k(),w=!0)}function i(){w||(k=x.$watch(function(){return{volume:y.volume,currentTime:y.currentTime,progress:y.progress,muting:y.muting,loop:y.loop,playbackRate:y.playbackRate}},function(a,b){a.currentTime!==b.currentTime&&y.setCurrentTime(a.currentTime),a.progress!==b.progress&&y.setProgress(a.progress),a.volume!==b.volume&&y.setVolume(a.volume),a.playbackRate!==b.playbackRate&&y.setPlaybackRate(a.playbackRate),n=a.loop,a.muting!==b.muting&&y.setMuting(a.muting)},!0))}function j(){k&&k(),o&&(u||e.isMuting?o.volume=0:o.volume=void 0!==y.volume?y.volume:1,p&&(o.play(),p=!1),r&&(o.pause(),o.currentTime=0,r=!1),q&&(o.pause(),q=!1),s&&(o.playbackRate=t,s=!1),m&&(o.volume=m,m=void 0),v&&(y.currentTime=o.currentTime,y.duration=o.duration,y.remaining=o.duration-o.currentTime,y.progress=o.currentTime/o.duration,y.paused=o.paused,y.src=o.src,y.currentTime>=y.duration&&z.forEach(function(a){a(y)}),n&&y.currentTime>=y.duration&&(n!==!0&&(n--,y.loop--),y.setCurrentTime(0),y.play())),u||e.isMuting||(y.volume=o.volume),y.audio=o),i()}var k,l,m,n,o,p=!1,q=!1,r=!1,s=!1,t=!1,u=!1,v=!0,w=!1,x=f||b,y=this;this.id=d,this.safeId=d.replace("/","|"),this.loop=0,this.unbind=function(){v=!1},this.play=function(){return p=!0,this};var z=[];this.complete=function(a){z.push(a)},this.pause=function(){q=!0},this.restart=function(){r=!0},this.stop=function(){this.restart()},this.setVolume=function(a){m=a},this.setPlaybackRate=function(a){t=a,s=!0},this.setMuting=function(a){u=a},this.setProgress=function(a){o&&o.duration&&isFinite(a)&&(o.currentTime=o.duration*a)},this.setCurrentTime=function(a){o&&o.duration&&(o.currentTime=a)},this.destroy=h,x.$on("$destroy",function(){h()}),a.find(d).then(function(a){o=a,e.unlock&&(window.addEventListener("click",g),o.addEventListener("playing",function(){window.removeEventListener("click",g)})),o.addEventListener("canplay",function(){y.canPlay=!0})},function(a){y.error=!0,console.warn(a)});var A=c(j,e.performance);l=x.$watch(function(){return e.performance},function(){c.cancel(A),A=c(j,e.performance)})}}]).service("ngAudio",["NgAudioObject","ngAudioGlobals",function(a,b){this.play=function(b,c){var d=new a(b,c);return d.play(),d},this.load=function(b,c){return new a(b,c)},this.mute=function(){b.muting=!0},this.unmute=function(){b.muting=!1},this.toggleMute=function(){b.muting=!b.muting},this.setUnlock=function(a){b.unlock=a}}]).filter("trackTime",function(){return function(a){var b=Math.floor(0|a),c="",d=0,e=0,f=0;return b>3599?(d=Math.floor(b/3600),e=Math.floor((b-3600*d)/60),f=b-(60*e+3600*d),1==d.toString().length&&(d="0"+Math.floor(b/3600).toString()),1==e.toString().length&&(e="0"+Math.floor((b-3600*d)/60).toString()),1==f.toString().length&&(f="0"+(b-(60*e+3600*d)).toString()),c=d+":"+e+":"+f):b>59?(e=Math.floor(b/60),f=b-60*e,1==e.toString().length&&(e="0"+Math.floor(b/60).toString()),1==f.toString().length&&(f="0"+(b-60*e).toString()),c=e+":"+f):(f=b,1==f.toString().length&&(f="0"+b.toString()),c=b+"s"),"function"==typeof Number.isNaN&&Number.isNaN(c),c}}),function(){"use strict";angular.module("ngEmoticons",["ngSanitize"]).filter("emoticons",["$sce",function(a){var b=[{text:":)","class":"smiley",code:"e60a"},{text:":D","class":"happy",code:"e608"},{text:":d","class":"happy",code:"e608"},{text:":(","class":"sad",code:"e60e"},{text:":/","class":"wondering",code:"e620"},{text:":P","class":"tongue",code:"e60c"},{text:":p","class":"tongue",code:"e60c"},{text:"3:)","class":"evil",code:"e618"},{text:"(^)","class":"thumbsup2",code:"e607"},{text:";)","class":"wink",code:"e610"},{text:":o","class":"shocked",code:"e61a"},{text:"-_-","class":"neutral",code:"e61e"},{text:"(y)","class":"thumbs-up",code:"e606"},{text:":*","class":"heart",code:"e604"},{text:"<3","class":"heart",code:"e604"},{text:"<3","class":"heart",code:"e604"},{text:"</3","class":"heart-broken",code:"e605"},{text:"&#x'+a.code+"")}),c.join(" ")}function h(a){var b=/((href|src)=["']|)(\b(https?|ftp|file):\/\/[-A-Z0-9+()&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,c=a.replace(b,function(a){return''+a+""});return c}function i(a){var b=new RegExp(":("+c.join("|")+"):","g");return a.replace(b,function(a,b){return""})}var j={link:!0,linkTarget:"_self"};return f(j,e),void 0!==d&&null!==d?"object"==typeof d?d:(d=g(d),d=i(d),j.link&&(d=h(d)),a.trustAsHtml(d)):void 0}}]).directive("ngEmoticons",["$filter","$sce","$http","$timeout","$templateCache",function(a,b,c,d,e){var f="",g='
          {{video.description}}
          {{video.views}} {{video.likes}}
          ';return e.put(f,g),{restrict:"AE",scope:!0,templateUrl:function(a,b){return b.emoticonsTemplateUrl||f},link:function(e,f,g){function h(a){return angular.forEach(arguments,function(b){b!==a&&angular.forEach(b,function(b,c){a[c]&&a[c].constructor&&a[c].constructor===Object?h(a[c],b):a[c]=b})}),a}var i=e.$eval(g.emoticonsData),j=e.$eval(g.emoticonsOptions);e.video={},e.image={},e.pdf={},e.audio={};var k={link:!0,linkTarget:"_self",pdf:{embed:!0},image:{embed:!1},audio:{embed:!0},code:{highlight:!0,lineNumbers:!1},basicVideo:!1,video:{embed:!1,width:null,height:null,ytTheme:"dark",details:!1,thumbnailQuality:"medium",ytAuthKey:null}};h(k,j),String.prototype.trunc=function(a,b){var c=this.length>a,d=c?this.substr(0,a-1):this;return d=b&&c?d.substr(0,d.lastIndexOf(" ")):d,c?d+"...":d};var l={calcDimensions:function(a){var b={width:null,height:null};return b.width=a.video.width,b.height=a.video.height,a.video.height&&a.video.width?b:a.video.height?(b.width=a.video.height/390*640,b):a.video.width?(b.height=b.width/640*390,b):(b.width=640,b.height=390,b)},embed:function(a,d){var f=/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com(?:\/embed\/|\/v\/|\/watch\?v=|\/ytscreeningroom\?v=|\/feeds\/api\/videos\/|\/user\S*[^\w\-\s]|\S*[^\w\-\s]))([\w\-]{11})[?=&+%\w-]*/gi;if(a.match(f)){var g=this.calcDimensions(d);return e.video.id=RegExp.$1,d.video.details?c.get("https://www.googleapis.com/youtube/v3/videos?id="+RegExp.$1+"&key="+d.video.ytAuthKey+"&part=snippet,statistics").success(function(a){var c=a.items[0];e.video.host="youtube",e.video.title=c.snippet.title,e.video.thumbnail=c.snippet.thumbnails.medium.url,e.video.description=c.snippet.description.trunc(250,!0).replace(/\n/g," ").replace(/ /g," "),e.video.rawDescription=c.snippet.description,e.video.views=c.statistics.viewCount,e.video.likes=c.statistics.likeCount, +e.video.uploader=c.snippet.channelTitle,e.video.uploaderPage="https://www.youtube.com/channel/"+c.snippet.channelId,e.video.uploadDate=c.snippet.publishedAt,e.video.url=b.trustAsResourceUrl("https://www.youtube.com/watch?v="+c.id),e.video.embedSrc=b.trustAsResourceUrl("https://www.youtube.com/embed/"+e.video.id+"?autoplay=1"),e.video.width=g.width,e.video.height=g.height}):(e.video.width=g.width,e.video.height=g.height,e.video.host="youtube",e.video.embedSrc=b.trustAsResourceUrl("https://www.youtube.com/embed/"+RegExp.$1+"?autoplay=0")),a}var h=/https?:\/\/(?:www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)*/gi;if(a.match(h)){var i=this.calcDimensions(d);e.video.id=RegExp.$3,d.video.details?c.get("https://vimeo.com/api/v2/video/"+RegExp.$3+".json").success(function(a){e.video.host="vimeo",e.video.title=a[0].title,e.video.rawDescription=a[0].description.replace(/\n/g,"
          ").replace(/ /g,"
          "),e.video.description=a[0].description.replace(/((<|<)br\s*\/*(>|>)\r\n)/g," ").trunc(250,!0),e.video.thumbnail=a[0].thumbnail_medium,e.video.views=a[0].stats_number_of_plays,e.video.likes=a[0].stats_number_of_likes,e.video.uploader=a[0].user_name,e.video.uploaderPage=a[0].user_url,e.video.uploadDate=a[0].uploadDate,e.video.url=a[0].url,e.video.embedSrc=b.trustAsResourceUrl("//player.vimeo.com/video/"+a[0].id+"?title=0&byline=0&portrait=0&autoplay=1"),e.video.width=i.width,e.video.height=i.height}):(e.video.width=i.width,e.video.height=i.height,e.video.host="vimeo",e.video.embedSrc=b.trustAsResourceUrl("//player.vimeo.com/video/"+RegExp.$3+"?title=0&byline=0&portrait=0&autoplay=0"))}return a},embedBasic:function(a){var c=/((?:https?):\/\/\S*\.(?:ogv|webm|mp4))/gi;return a.match(c)&&(e.video.basic=b.trustAsResourceUrl(RegExp.$1)),a}},m={embed:function(a){var c=/((?:https?):\/\/\S*\.(?:wav|mp3|ogg))/gi;return a.match(c)&&(e.audio.url=b.trustAsResourceUrl(RegExp.$1)),a}},n={embed:function(a){var b=/((?:https?):\/\/\S*\.(?:gif|jpg|jpeg|tiff|png|svg|webp))/gi;return a.match(b)&&(e.image.url=RegExp.$1),a}},o={encodeCode:function(a){return a=a.replace(/\&/gm,"&"),a=a.replace(//gm,">")},getCode:function(a){var b=this;return a=a.replace(/(`+)(\s|[a-z]+)\s*([\s\S]*?[^`])\s*\1(?!`)/gm,function(a,c,d,e){var f=e;return f=f.replace(/^([ \t]*)/g,""),f=f.replace(/[ \t]*$/g,""),f=b.encodeCode(f),f=f.replace(/:\/\//g,"~P"),'
          '+f+"
          "})}},p={embed:function(a){var c=/((?:https?):\/\/\S*\.(?:pdf|PDF))/gi;return a.match(c)&&(e.pdf.url=b.trustAsResourceUrl(RegExp.$1)),a}};if(k.code.highlight){if(!window.hljs)throw"hlsj (Highlight JS is not defined.";i=o.getCode(i),d(function(){hljs.initHighlighting(),k.code.lineNumbers&&angular.element(".ne-code").each(function(){var a=1,b=$(this).text().split("\n").length,c=$("
            ").addClass("pre-numbering");for(angular.element(this).addClass("has-numbering").parent().append(c),a;b>=a;a++)c.append(angular.element("
          • ").text(a))})},0)}var q=a("emoticons")(i,k).$$unwrapTrustedValue();if(k.video.embed){if(!k.video.ytAuthKey)throw"Youtube authentication key is required to get data from youtube.";q=l.embed(q,k)}k.basicVideo&&(q=l.embedBasic(q)),k.audio.embed&&(q=m.embed(q)),k.image.embed&&(q=n.embed(q)),k.pdf.embed&&(q=p.embed(q)),e.neText=b.trustAsHtml(q)}}}]).directive("neHljs",["$timeout",function(a){return{restrict:"AE",link:function(b,c){a(function(){c.find(".ne-code").each(function(){hljs.highlightBlock(this)})},0)}}}])}(),function(a){"undefined"!=typeof exports?a(exports):(window.hljs=a({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return window.hljs}))}(function(a){function b(a){return a.replace(/&/gm,"&").replace(//gm,">")}function c(a){return a.nodeName.toLowerCase()}function d(a,b){var c=a&&a.exec(b);return c&&0==c.index}function e(a){return/^(no-?highlight|plain|text)$/i.test(a)}function f(a){var b,c,d,f=a.className+" ";if(f+=a.parentNode?a.parentNode.className:"",c=/\blang(?:uage)?-([\w-]+)\b/i.exec(f))return u(c[1])?c[1]:"no-highlight";for(f=f.split(/\s+/),b=0,d=f.length;d>b;b++)if(u(f[b])||e(f[b]))return f[b]}function g(a,b){var c,d={};for(c in a)d[c]=a[c];if(b)for(c in b)d[c]=b[c];return d}function h(a){var b=[];return function d(a,e){for(var f=a.firstChild;f;f=f.nextSibling)3==f.nodeType?e+=f.nodeValue.length:1==f.nodeType&&(b.push({event:"start",offset:e,node:f}),e=d(f,e),c(f).match(/br|hr|img|input/)||b.push({event:"stop",offset:e,node:f}));return e}(a,0),b}function i(a,d,e){function f(){return a.length&&d.length?a[0].offset!=d[0].offset?a[0].offset"}function h(a){k+=""}function i(a){("start"==a.event?g:h)(a.node)}for(var j=0,k="",l=[];a.length||d.length;){var m=f();if(k+=b(e.substr(j,m[0].offset-j)),j=m[0].offset,m==a){l.reverse().forEach(h);do i(m.splice(0,1)[0]),m=f();while(m==a&&m.length&&m[0].offset==j);l.reverse().forEach(g)}else"start"==m[0].event?l.push(m[0].node):l.pop(),i(m.splice(0,1)[0])}return k+b(e.substr(j))}function j(a){function b(a){return a&&a.source||a}function c(c,d){return new RegExp(b(c),"m"+(a.case_insensitive?"i":"")+(d?"g":""))}function d(e,f){if(!e.compiled){if(e.compiled=!0,e.keywords=e.keywords||e.beginKeywords,e.keywords){var h={},i=function(b,c){a.case_insensitive&&(c=c.toLowerCase()),c.split(" ").forEach(function(a){var c=a.split("|");h[c[0]]=[b,c[1]?Number(c[1]):1]})};"string"==typeof e.keywords?i("keyword",e.keywords):Object.keys(e.keywords).forEach(function(a){i(a,e.keywords[a])}),e.keywords=h}e.lexemesRe=c(e.lexemes||/\b\w+\b/,!0),f&&(e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")\\b"),e.begin||(e.begin=/\B|\b/),e.beginRe=c(e.begin),e.end||e.endsWithParent||(e.end=/\B|\b/),e.end&&(e.endRe=c(e.end)),e.terminator_end=b(e.end)||"",e.endsWithParent&&f.terminator_end&&(e.terminator_end+=(e.end?"|":"")+f.terminator_end)),e.illegal&&(e.illegalRe=c(e.illegal)),void 0===e.relevance&&(e.relevance=1),e.contains||(e.contains=[]);var j=[];e.contains.forEach(function(a){a.variants?a.variants.forEach(function(b){j.push(g(a,b))}):j.push("self"==a?e:a)}),e.contains=j,e.contains.forEach(function(a){d(a,e)}),e.starts&&d(e.starts,f);var k=e.contains.map(function(a){return a.beginKeywords?"\\.?("+a.begin+")\\.?":a.begin}).concat([e.terminator_end,e.illegal]).map(b).filter(Boolean);e.terminators=k.length?c(k.join("|"),!0):{exec:function(){return null}}}}d(a)}function k(a,c,e,f){function g(a,b){for(var c=0;c";return f+=a+'">',f+b+g}function o(){if(!y.keywords)return b(B);var a="",c=0;y.lexemesRe.lastIndex=0;for(var d=y.lexemesRe.exec(B);d;){a+=b(B.substr(c,d.index-c));var e=m(y,d);e?(C+=e[1],a+=n(e[0],b(d[0]))):a+=b(d[0]),c=y.lexemesRe.lastIndex,d=y.lexemesRe.exec(B)}return a+b(B.substr(c))}function p(){var a="string"==typeof y.subLanguage;if(a&&!w[y.subLanguage])return b(B);var c=a?k(y.subLanguage,B,!0,z[y.subLanguage]):l(B,y.subLanguage.length?y.subLanguage:void 0);return y.relevance>0&&(C+=c.relevance),a&&(z[y.subLanguage]=c.top),n(c.language,c.value,!1,!0)}function q(){return void 0!==y.subLanguage?p():o()}function r(a,c){var d=a.className?n(a.className,"",!0):"";a.returnBegin?(A+=d,B=""):a.excludeBegin?(A+=b(c)+d,B=""):(A+=d,B=c),y=Object.create(a,{parent:{value:y}})}function s(a,c){if(B+=a,void 0===c)return A+=q(),0;var d=g(c,y);if(d)return A+=q(),r(d,c),d.returnBegin?0:c.length;var e=h(y,c);if(e){var f=y;f.returnEnd||f.excludeEnd||(B+=c),A+=q();do y.className&&(A+=""),C+=y.relevance,y=y.parent;while(y!=e.parent);return f.excludeEnd&&(A+=b(c)),B="",e.starts&&r(e.starts,""),f.returnEnd?0:c.length}if(i(c,y))throw new Error('Illegal lexeme "'+c+'" for mode "'+(y.className||"")+'"');return B+=c,c.length||1}var t=u(a);if(!t)throw new Error('Unknown language: "'+a+'"');j(t);var x,y=f||t,z={},A="";for(x=y;x!=t;x=x.parent)x.className&&(A=n(x.className,"",!0)+A);var B="",C=0;try{for(var D,E,F=0;;){if(y.terminators.lastIndex=F,D=y.terminators.exec(c),!D)break;E=s(c.substr(F,D.index-F),D[0]),F=D.index+E}for(s(c.substr(F)),x=y;x.parent;x=x.parent)x.className&&(A+="");return{relevance:C,value:A,language:a,top:y}}catch(G){if(-1!=G.message.indexOf("Illegal"))return{relevance:0,value:b(c)};throw G}}function l(a,c){c=c||v.languages||Object.keys(w);var d={relevance:0,value:b(a)},e=d;return c.forEach(function(b){if(u(b)){var c=k(b,a,!1);c.language=b,c.relevance>e.relevance&&(e=c),c.relevance>d.relevance&&(e=d,d=c)}}),e.language&&(d.second_best=e),d}function m(a){return v.tabReplace&&(a=a.replace(/^((<[^>]+>|\t)+)/gm,function(a,b){return b.replace(/\t/g,v.tabReplace)})),v.useBR&&(a=a.replace(/\n/g,"
            ")),a}function n(a,b,c){var d=b?x[b]:c,e=[a.trim()];return a.match(/\bhljs\b/)||e.push("hljs"),-1===a.indexOf(d)&&e.push(d),e.join(" ").trim()}function o(a){var b=f(a);if(!e(b)){var c;v.useBR?(c=document.createElementNS("http://www.w3.org/1999/xhtml","div"),c.innerHTML=a.innerHTML.replace(/\n/g,"").replace(//g,"\n")):c=a;var d=c.textContent,g=b?k(b,d,!0):l(d),j=h(c);if(j.length){var o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML=g.value,g.value=i(j,h(o),d)}g.value=m(g.value),a.innerHTML=g.value,a.className=n(a.className,b,g.language),a.result={language:g.language,re:g.relevance},g.second_best&&(a.second_best={language:g.second_best.language,re:g.second_best.relevance})}}function p(a){v=g(v,a)}function q(){if(!q.called){q.called=!0;var a=document.querySelectorAll("pre code");Array.prototype.forEach.call(a,o)}}function r(){addEventListener("DOMContentLoaded",q,!1),addEventListener("load",q,!1)}function s(b,c){var d=w[b]=c(a);d.aliases&&d.aliases.forEach(function(a){x[a]=b})}function t(){return Object.keys(w)}function u(a){return a=(a||"").toLowerCase(),w[a]||w[x[a]]}var v={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},w={},x={};return a.highlight=k,a.highlightAuto=l,a.fixMarkup=m,a.highlightBlock=o,a.configure=p,a.initHighlighting=q,a.initHighlightingOnLoad=r,a.registerLanguage=s,a.listLanguages=t,a.getLanguage=u,a.inherit=g,a.IDENT_RE="[a-zA-Z]\\w*",a.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",a.NUMBER_RE="\\b\\d+(\\.\\d+)?",a.C_NUMBER_RE="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",a.BINARY_NUMBER_RE="\\b(0b[01]+)",a.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",a.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},a.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[a.BACKSLASH_ESCAPE]},a.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[a.BACKSLASH_ESCAPE]},a.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},a.COMMENT=function(b,c,d){var e=a.inherit({className:"comment",begin:b,end:c,contains:[]},d||{});return e.contains.push(a.PHRASAL_WORDS_MODE),e.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),e},a.C_LINE_COMMENT_MODE=a.COMMENT("//","$"),a.C_BLOCK_COMMENT_MODE=a.COMMENT("/\\*","\\*/"),a.HASH_COMMENT_MODE=a.COMMENT("#","$"),a.NUMBER_MODE={className:"number",begin:a.NUMBER_RE,relevance:0},a.C_NUMBER_MODE={className:"number",begin:a.C_NUMBER_RE,relevance:0},a.BINARY_NUMBER_MODE={className:"number",begin:a.BINARY_NUMBER_RE,relevance:0},a.CSS_NUMBER_MODE={className:"number",begin:a.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},a.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[a.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[a.BACKSLASH_ESCAPE]}]},a.TITLE_MODE={className:"title",begin:a.IDENT_RE,relevance:0},a.UNDERSCORE_TITLE_MODE={className:"title",begin:a.UNDERSCORE_IDENT_RE,relevance:0},a.registerLanguage("1c",function(a){var b="[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*",c="возврат дата для если и или иначе иначеесли исключение конецесли конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл число экспорт",d="ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц разделительстрок разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо сигнал симв символтабуляции создатьобъект сокрл сокрлп сокрп сообщить состояние сохранитьзначение сред статусвозврата стрдлина стрзаменить стрколичествострок стрполучитьстроку стрчисловхождений сформироватьпозициюдокумента счетпокоду текущаядата текущеевремя типзначения типзначениястр удалитьобъекты установитьтана установитьтапо фиксшаблон формат цел шаблон",e={className:"dquote",begin:'""'},f={className:"string",begin:'"',end:'"|$',contains:[e]},g={className:"string",begin:"\\|",end:'"|$',contains:[e]};return{case_insensitive:!0,lexemes:b,keywords:{keyword:c,built_in:d},contains:[a.C_LINE_COMMENT_MODE,a.NUMBER_MODE,f,g,{className:"function",begin:"(процедура|функция)",end:"$",lexemes:b,keywords:"процедура функция",contains:[a.inherit(a.TITLE_MODE,{begin:b}),{className:"tail",endsWithParent:!0,contains:[{className:"params",begin:"\\(",end:"\\)",lexemes:b,keywords:"знач",contains:[f,g]},{className:"export",begin:"экспорт",endsWithParent:!0,lexemes:b,keywords:"экспорт",contains:[a.C_LINE_COMMENT_MODE]}]},a.C_LINE_COMMENT_MODE]},{className:"preprocessor",begin:"#",end:"$"},{className:"date",begin:"'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'"}]}}),a.registerLanguage("accesslog",function(a){return{contains:[{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+\\b",relevance:0},{className:"string",begin:'"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)',end:'"',keywords:"GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE",illegal:"\\n",relevance:10},{className:"string",begin:/\[/,end:/\]/,illegal:"\\n"},{className:"string",begin:'"',end:'"',illegal:"\\n"}]}}),a.registerLanguage("actionscript",function(a){var b="[a-zA-Z_$][a-zA-Z0-9_$]*",c="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",d={className:"rest_arg",begin:"[.]{3}",end:b,relevance:10};return{aliases:["as"],keywords:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.C_NUMBER_MODE,{className:"package",beginKeywords:"package",end:"{",contains:[a.TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},a.TITLE_MODE]},{className:"preprocessor",beginKeywords:"import include",end:";"},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[a.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,d]},{className:"type",begin:":",end:c,relevance:10}]}],illegal:/#/}}),a.registerLanguage("apache",function(a){var b={className:"number",begin:"[\\$%]\\d+"};return{aliases:["apacheconf"],case_insensitive:!0,contains:[a.HASH_COMMENT_MODE,{className:"tag",begin:""},{className:"keyword",begin:/\w+/,relevance:0,keywords:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all"},contains:[{className:"sqbracket",begin:"\\s\\[",end:"\\]$"},{className:"cbracket",begin:"[\\$%]\\{",end:"\\}",contains:["self",b]},b,a.QUOTE_STRING_MODE]}}],illegal:/\S/}}),a.registerLanguage("applescript",function(a){var b=a.inherit(a.QUOTE_STRING_MODE,{illegal:""}),c={className:"params",begin:"\\(",end:"\\)",contains:["self",a.C_NUMBER_MODE,b]},d=a.COMMENT("--","$"),e=a.COMMENT("\\(\\*","\\*\\)",{contains:["self",d]}),f=[d,e,a.HASH_COMMENT_MODE];return{aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",constant:"AppleScript false linefeed return pi quote result space tab true",type:"alias application boolean class constant date file integer list number real record string text",command:"activate beep count delay launch log offset read round run say summarize write",property:"character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},contains:[b,a.C_NUMBER_MODE,{className:"type",begin:"\\bPOSIX file\\b"},{className:"command",begin:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{className:"constant",begin:"\\b(text item delimiters|current application|missing value)\\b"},{className:"keyword",begin:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{className:"property",begin:"\\b(POSIX path|(date|time) string|quoted form)\\b"},{className:"function_start",beginKeywords:"on",illegal:"[${=;\\n]",contains:[a.UNDERSCORE_TITLE_MODE,c]}].concat(f),illegal:"//|->|=>|\\[\\["}}),a.registerLanguage("armasm",function(a){return{case_insensitive:!0,aliases:["arm"],lexemes:"\\.?"+a.IDENT_RE,keywords:{literal:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 ",preprocessor:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @ "},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?",end:"\\s"},a.COMMENT("[;@]","$",{relevance:0}),a.C_BLOCK_COMMENT_MODE,a.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"label",variants:[{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"[=#]\\w+"}],relevance:0}]}}),a.registerLanguage("xml",function(a){var b="[A-Za-z0-9\\._:-]+",c={begin:/<\?(php)?(?!\w)/,end:/\?>/,subLanguage:"php"},d={endsWithParent:!0,illegal:/]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],case_insensitive:!0,contains:[{className:"doctype",begin:"",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},a.COMMENT("",{relevance:10}),{className:"cdata",begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{className:"tag",begin:"|$)",end:">",keywords:{title:"style"},contains:[d],starts:{end:"",returnEnd:!0,subLanguage:"css"}},{className:"tag",begin:"|$)",end:">",keywords:{title:"script"},contains:[d],starts:{end:"",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars"]}},c,{className:"pi",begin:/<\?\w+/,end:/\?>/,relevance:10},{className:"tag",begin:"",contains:[{className:"title",begin:/[^ \/><\n\t]+/,relevance:0},d]}]}}),a.registerLanguage("asciidoc",function(a){return{aliases:["adoc"],contains:[a.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),a.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"header",begin:"^(={1,5}) .+?( \\1)?$",relevance:10},{className:"header",begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$",relevance:10},{className:"attribute",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"attribute",begin:"^\\[.+?\\]$",relevance:0},{className:"blockquote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},{className:"bullet",begin:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{className:"label",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},{className:"strong",begin:"\\B\\*(?![\\*\\s])",end:"(\\n{2}|\\*)",contains:[{begin:"\\\\*\\w",relevance:0}]},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0},{className:"emphasis",begin:"_(?![_\\s])",end:"(\\n{2}|_)",relevance:0},{className:"smartquote",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},{className:"horizontal_rule",begin:"^'{3,}[ \\t]*$",relevance:10},{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link_url",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"link_label",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}),a.registerLanguage("aspectj",function(a){var b="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else extends implements break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws privileged aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization staticinitialization withincode target within execution getWithinTypeName handler thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents warning error soft precedence thisAspectInstance",c="get set args call";return{keywords:b,illegal:/<\/|#/,contains:[a.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"aspect",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[{beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},a.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:b+" "+c,excludeEnd:!1}]},{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/,excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[a.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:b,illegal:/["\[\]]/,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",keywords:b+" "+c},a.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,returnBegin:!0,end:/[{;=]/,keywords:b,excludeEnd:!0,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0,keywords:b,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},a.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"}]}}),a.registerLanguage("autohotkey",function(a){var b={className:"escape",begin:"`[\\s\\S]"},c=a.COMMENT(";","$",{relevance:0}),d=[{className:"built_in",begin:"A_[a-zA-Z0-9]+"},{className:"built_in",beginKeywords:"ComSpec Clipboard ClipboardAll ErrorLevel"}];return{case_insensitive:!0,keywords:{keyword:"Break Continue Else Gosub If Loop Return While",literal:"A true false NOT AND OR"},contains:d.concat([b,a.inherit(a.QUOTE_STRING_MODE,{contains:[b]}),c,{className:"number",begin:a.NUMBER_RE,relevance:0},{className:"var_expand",begin:"%",end:"%",illegal:"\\n",contains:[b]},{className:"label",contains:[b],variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{begin:",\\s*,",relevance:10}])}}),a.registerLanguage("autoit",function(a){var b="ByRef Case Const ContinueCase ContinueLoop Default Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",c="True False And Null Not Or",d="Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Opt Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown TCPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend UDPShutdown UDPStartup VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitActive WinWaitClose WinWaitNotActive Array1DToHistogram ArrayAdd ArrayBinarySearch ArrayColDelete ArrayColInsert ArrayCombinations ArrayConcatenate ArrayDelete ArrayDisplay ArrayExtract ArrayFindAll ArrayInsert ArrayMax ArrayMaxIndex ArrayMin ArrayMinIndex ArrayPermute ArrayPop ArrayPush ArrayReverse ArraySearch ArrayShuffle ArraySort ArraySwap ArrayToClip ArrayToString ArrayTranspose ArrayTrim ArrayUnique Assert ChooseColor ChooseFont ClipBoard_ChangeChain ClipBoard_Close ClipBoard_CountFormats ClipBoard_Empty ClipBoard_EnumFormats ClipBoard_FormatStr ClipBoard_GetData ClipBoard_GetDataEx ClipBoard_GetFormatName ClipBoard_GetOpenWindow ClipBoard_GetOwner ClipBoard_GetPriorityFormat ClipBoard_GetSequenceNumber ClipBoard_GetViewer ClipBoard_IsFormatAvailable ClipBoard_Open ClipBoard_RegisterFormat ClipBoard_SetData ClipBoard_SetDataEx ClipBoard_SetViewer ClipPutFile ColorConvertHSLtoRGB ColorConvertRGBtoHSL ColorGetBlue ColorGetCOLORREF ColorGetGreen ColorGetRed ColorGetRGB ColorSetCOLORREF ColorSetRGB Crypt_DecryptData Crypt_DecryptFile Crypt_DeriveKey Crypt_DestroyKey Crypt_EncryptData Crypt_EncryptFile Crypt_GenRandom Crypt_HashData Crypt_HashFile Crypt_Shutdown Crypt_Startup DateAdd DateDayOfWeek DateDaysInMonth DateDiff DateIsLeapYear DateIsValid DateTimeFormat DateTimeSplit DateToDayOfWeek DateToDayOfWeekISO DateToDayValue DateToMonth Date_Time_CompareFileTime Date_Time_DOSDateTimeToArray Date_Time_DOSDateTimeToFileTime Date_Time_DOSDateTimeToStr Date_Time_DOSDateToArray Date_Time_DOSDateToStr Date_Time_DOSTimeToArray Date_Time_DOSTimeToStr Date_Time_EncodeFileTime Date_Time_EncodeSystemTime Date_Time_FileTimeToArray Date_Time_FileTimeToDOSDateTime Date_Time_FileTimeToLocalFileTime Date_Time_FileTimeToStr Date_Time_FileTimeToSystemTime Date_Time_GetFileTime Date_Time_GetLocalTime Date_Time_GetSystemTime Date_Time_GetSystemTimeAdjustment Date_Time_GetSystemTimeAsFileTime Date_Time_GetSystemTimes Date_Time_GetTickCount Date_Time_GetTimeZoneInformation Date_Time_LocalFileTimeToFileTime Date_Time_SetFileTime Date_Time_SetLocalTime Date_Time_SetSystemTime Date_Time_SetSystemTimeAdjustment Date_Time_SetTimeZoneInformation Date_Time_SystemTimeToArray Date_Time_SystemTimeToDateStr Date_Time_SystemTimeToDateTimeStr Date_Time_SystemTimeToFileTime Date_Time_SystemTimeToTimeStr Date_Time_SystemTimeToTzSpecificLocalTime Date_Time_TzSpecificLocalTimeToSystemTime DayValueToDate DebugBugReportEnv DebugCOMError DebugOut DebugReport DebugReportEx DebugReportVar DebugSetup Degree EventLog__Backup EventLog__Clear EventLog__Close EventLog__Count EventLog__DeregisterSource EventLog__Full EventLog__Notify EventLog__Oldest EventLog__Open EventLog__OpenBackup EventLog__Read EventLog__RegisterSource EventLog__Report Excel_BookAttach Excel_BookClose Excel_BookList Excel_BookNew Excel_BookOpen Excel_BookOpenText Excel_BookSave Excel_BookSaveAs Excel_Close Excel_ColumnToLetter Excel_ColumnToNumber Excel_ConvertFormula Excel_Export Excel_FilterGet Excel_FilterSet Excel_Open Excel_PictureAdd Excel_Print Excel_RangeCopyPaste Excel_RangeDelete Excel_RangeFind Excel_RangeInsert Excel_RangeLinkAddRemove Excel_RangeRead Excel_RangeReplace Excel_RangeSort Excel_RangeValidate Excel_RangeWrite Excel_SheetAdd Excel_SheetCopyMove Excel_SheetDelete Excel_SheetList FileCountLines FileCreate FileListToArray FileListToArrayRec FilePrint FileReadToArray FileWriteFromArray FileWriteLog FileWriteToLine FTP_Close FTP_Command FTP_Connect FTP_DecodeInternetStatus FTP_DirCreate FTP_DirDelete FTP_DirGetCurrent FTP_DirPutContents FTP_DirSetCurrent FTP_FileClose FTP_FileDelete FTP_FileGet FTP_FileGetSize FTP_FileOpen FTP_FilePut FTP_FileRead FTP_FileRename FTP_FileTimeLoHiToStr FTP_FindFileClose FTP_FindFileFirst FTP_FindFileNext FTP_GetLastResponseInfo FTP_ListToArray FTP_ListToArray2D FTP_ListToArrayEx FTP_Open FTP_ProgressDownload FTP_ProgressUpload FTP_SetStatusCallback GDIPlus_ArrowCapCreate GDIPlus_ArrowCapDispose GDIPlus_ArrowCapGetFillState GDIPlus_ArrowCapGetHeight GDIPlus_ArrowCapGetMiddleInset GDIPlus_ArrowCapGetWidth GDIPlus_ArrowCapSetFillState GDIPlus_ArrowCapSetHeight GDIPlus_ArrowCapSetMiddleInset GDIPlus_ArrowCapSetWidth GDIPlus_BitmapApplyEffect GDIPlus_BitmapApplyEffectEx GDIPlus_BitmapCloneArea GDIPlus_BitmapConvertFormat GDIPlus_BitmapCreateApplyEffect GDIPlus_BitmapCreateApplyEffectEx GDIPlus_BitmapCreateDIBFromBitmap GDIPlus_BitmapCreateFromFile GDIPlus_BitmapCreateFromGraphics GDIPlus_BitmapCreateFromHBITMAP GDIPlus_BitmapCreateFromHICON GDIPlus_BitmapCreateFromHICON32 GDIPlus_BitmapCreateFromMemory GDIPlus_BitmapCreateFromResource GDIPlus_BitmapCreateFromScan0 GDIPlus_BitmapCreateFromStream GDIPlus_BitmapCreateHBITMAPFromBitmap GDIPlus_BitmapDispose GDIPlus_BitmapGetHistogram GDIPlus_BitmapGetHistogramEx GDIPlus_BitmapGetHistogramSize GDIPlus_BitmapGetPixel GDIPlus_BitmapLockBits GDIPlus_BitmapSetPixel GDIPlus_BitmapUnlockBits GDIPlus_BrushClone GDIPlus_BrushCreateSolid GDIPlus_BrushDispose GDIPlus_BrushGetSolidColor GDIPlus_BrushGetType GDIPlus_BrushSetSolidColor GDIPlus_ColorMatrixCreate GDIPlus_ColorMatrixCreateGrayScale GDIPlus_ColorMatrixCreateNegative GDIPlus_ColorMatrixCreateSaturation GDIPlus_ColorMatrixCreateScale GDIPlus_ColorMatrixCreateTranslate GDIPlus_CustomLineCapClone GDIPlus_CustomLineCapCreate GDIPlus_CustomLineCapDispose GDIPlus_CustomLineCapGetStrokeCaps GDIPlus_CustomLineCapSetStrokeCaps GDIPlus_Decoders GDIPlus_DecodersGetCount GDIPlus_DecodersGetSize GDIPlus_DrawImageFX GDIPlus_DrawImageFXEx GDIPlus_DrawImagePoints GDIPlus_EffectCreate GDIPlus_EffectCreateBlur GDIPlus_EffectCreateBrightnessContrast GDIPlus_EffectCreateColorBalance GDIPlus_EffectCreateColorCurve GDIPlus_EffectCreateColorLUT GDIPlus_EffectCreateColorMatrix GDIPlus_EffectCreateHueSaturationLightness GDIPlus_EffectCreateLevels GDIPlus_EffectCreateRedEyeCorrection GDIPlus_EffectCreateSharpen GDIPlus_EffectCreateTint GDIPlus_EffectDispose GDIPlus_EffectGetParameters GDIPlus_EffectSetParameters GDIPlus_Encoders GDIPlus_EncodersGetCLSID GDIPlus_EncodersGetCount GDIPlus_EncodersGetParamList GDIPlus_EncodersGetParamListSize GDIPlus_EncodersGetSize GDIPlus_FontCreate GDIPlus_FontDispose GDIPlus_FontFamilyCreate GDIPlus_FontFamilyCreateFromCollection GDIPlus_FontFamilyDispose GDIPlus_FontFamilyGetCellAscent GDIPlus_FontFamilyGetCellDescent GDIPlus_FontFamilyGetEmHeight GDIPlus_FontFamilyGetLineSpacing GDIPlus_FontGetHeight GDIPlus_FontPrivateAddFont GDIPlus_FontPrivateAddMemoryFont GDIPlus_FontPrivateCollectionDispose GDIPlus_FontPrivateCreateCollection GDIPlus_GraphicsClear GDIPlus_GraphicsCreateFromHDC GDIPlus_GraphicsCreateFromHWND GDIPlus_GraphicsDispose GDIPlus_GraphicsDrawArc GDIPlus_GraphicsDrawBezier GDIPlus_GraphicsDrawClosedCurve GDIPlus_GraphicsDrawClosedCurve2 GDIPlus_GraphicsDrawCurve GDIPlus_GraphicsDrawCurve2 GDIPlus_GraphicsDrawEllipse GDIPlus_GraphicsDrawImage GDIPlus_GraphicsDrawImagePointsRect GDIPlus_GraphicsDrawImageRect GDIPlus_GraphicsDrawImageRectRect GDIPlus_GraphicsDrawLine GDIPlus_GraphicsDrawPath GDIPlus_GraphicsDrawPie GDIPlus_GraphicsDrawPolygon GDIPlus_GraphicsDrawRect GDIPlus_GraphicsDrawString GDIPlus_GraphicsDrawStringEx GDIPlus_GraphicsFillClosedCurve GDIPlus_GraphicsFillClosedCurve2 GDIPlus_GraphicsFillEllipse GDIPlus_GraphicsFillPath GDIPlus_GraphicsFillPie GDIPlus_GraphicsFillPolygon GDIPlus_GraphicsFillRect GDIPlus_GraphicsFillRegion GDIPlus_GraphicsGetCompositingMode GDIPlus_GraphicsGetCompositingQuality GDIPlus_GraphicsGetDC GDIPlus_GraphicsGetInterpolationMode GDIPlus_GraphicsGetSmoothingMode GDIPlus_GraphicsGetTransform GDIPlus_GraphicsMeasureCharacterRanges GDIPlus_GraphicsMeasureString GDIPlus_GraphicsReleaseDC GDIPlus_GraphicsResetClip GDIPlus_GraphicsResetTransform GDIPlus_GraphicsRestore GDIPlus_GraphicsRotateTransform GDIPlus_GraphicsSave GDIPlus_GraphicsScaleTransform GDIPlus_GraphicsSetClipPath GDIPlus_GraphicsSetClipRect GDIPlus_GraphicsSetClipRegion GDIPlus_GraphicsSetCompositingMode GDIPlus_GraphicsSetCompositingQuality GDIPlus_GraphicsSetInterpolationMode GDIPlus_GraphicsSetPixelOffsetMode GDIPlus_GraphicsSetSmoothingMode GDIPlus_GraphicsSetTextRenderingHint GDIPlus_GraphicsSetTransform GDIPlus_GraphicsTransformPoints GDIPlus_GraphicsTranslateTransform GDIPlus_HatchBrushCreate GDIPlus_HICONCreateFromBitmap GDIPlus_ImageAttributesCreate GDIPlus_ImageAttributesDispose GDIPlus_ImageAttributesSetColorKeys GDIPlus_ImageAttributesSetColorMatrix GDIPlus_ImageDispose GDIPlus_ImageGetDimension GDIPlus_ImageGetFlags GDIPlus_ImageGetGraphicsContext GDIPlus_ImageGetHeight GDIPlus_ImageGetHorizontalResolution GDIPlus_ImageGetPixelFormat GDIPlus_ImageGetRawFormat GDIPlus_ImageGetThumbnail GDIPlus_ImageGetType GDIPlus_ImageGetVerticalResolution GDIPlus_ImageGetWidth GDIPlus_ImageLoadFromFile GDIPlus_ImageLoadFromStream GDIPlus_ImageResize GDIPlus_ImageRotateFlip GDIPlus_ImageSaveToFile GDIPlus_ImageSaveToFileEx GDIPlus_ImageSaveToStream GDIPlus_ImageScale GDIPlus_LineBrushCreate GDIPlus_LineBrushCreateFromRect GDIPlus_LineBrushCreateFromRectWithAngle GDIPlus_LineBrushGetColors GDIPlus_LineBrushGetRect GDIPlus_LineBrushMultiplyTransform GDIPlus_LineBrushResetTransform GDIPlus_LineBrushSetBlend GDIPlus_LineBrushSetColors GDIPlus_LineBrushSetGammaCorrection GDIPlus_LineBrushSetLinearBlend GDIPlus_LineBrushSetPresetBlend GDIPlus_LineBrushSetSigmaBlend GDIPlus_LineBrushSetTransform GDIPlus_MatrixClone GDIPlus_MatrixCreate GDIPlus_MatrixDispose GDIPlus_MatrixGetElements GDIPlus_MatrixInvert GDIPlus_MatrixMultiply GDIPlus_MatrixRotate GDIPlus_MatrixScale GDIPlus_MatrixSetElements GDIPlus_MatrixShear GDIPlus_MatrixTransformPoints GDIPlus_MatrixTranslate GDIPlus_PaletteInitialize GDIPlus_ParamAdd GDIPlus_ParamInit GDIPlus_ParamSize GDIPlus_PathAddArc GDIPlus_PathAddBezier GDIPlus_PathAddClosedCurve GDIPlus_PathAddClosedCurve2 GDIPlus_PathAddCurve GDIPlus_PathAddCurve2 GDIPlus_PathAddCurve3 GDIPlus_PathAddEllipse GDIPlus_PathAddLine GDIPlus_PathAddLine2 GDIPlus_PathAddPath GDIPlus_PathAddPie GDIPlus_PathAddPolygon GDIPlus_PathAddRectangle GDIPlus_PathAddString GDIPlus_PathBrushCreate GDIPlus_PathBrushCreateFromPath GDIPlus_PathBrushGetCenterPoint GDIPlus_PathBrushGetFocusScales GDIPlus_PathBrushGetPointCount GDIPlus_PathBrushGetRect GDIPlus_PathBrushGetWrapMode GDIPlus_PathBrushMultiplyTransform GDIPlus_PathBrushResetTransform GDIPlus_PathBrushSetBlend GDIPlus_PathBrushSetCenterColor GDIPlus_PathBrushSetCenterPoint GDIPlus_PathBrushSetFocusScales GDIPlus_PathBrushSetGammaCorrection GDIPlus_PathBrushSetLinearBlend GDIPlus_PathBrushSetPresetBlend GDIPlus_PathBrushSetSigmaBlend GDIPlus_PathBrushSetSurroundColor GDIPlus_PathBrushSetSurroundColorsWithCount GDIPlus_PathBrushSetTransform GDIPlus_PathBrushSetWrapMode GDIPlus_PathClone GDIPlus_PathCloseFigure GDIPlus_PathCreate GDIPlus_PathCreate2 GDIPlus_PathDispose GDIPlus_PathFlatten GDIPlus_PathGetData GDIPlus_PathGetFillMode GDIPlus_PathGetLastPoint GDIPlus_PathGetPointCount GDIPlus_PathGetPoints GDIPlus_PathGetWorldBounds GDIPlus_PathIsOutlineVisiblePoint GDIPlus_PathIsVisiblePoint GDIPlus_PathIterCreate GDIPlus_PathIterDispose GDIPlus_PathIterGetSubpathCount GDIPlus_PathIterNextMarkerPath GDIPlus_PathIterNextSubpathPath GDIPlus_PathIterRewind GDIPlus_PathReset GDIPlus_PathReverse GDIPlus_PathSetFillMode GDIPlus_PathSetMarker GDIPlus_PathStartFigure GDIPlus_PathTransform GDIPlus_PathWarp GDIPlus_PathWiden GDIPlus_PathWindingModeOutline GDIPlus_PenCreate GDIPlus_PenCreate2 GDIPlus_PenDispose GDIPlus_PenGetAlignment GDIPlus_PenGetColor GDIPlus_PenGetCustomEndCap GDIPlus_PenGetDashCap GDIPlus_PenGetDashStyle GDIPlus_PenGetEndCap GDIPlus_PenGetMiterLimit GDIPlus_PenGetWidth GDIPlus_PenSetAlignment GDIPlus_PenSetColor GDIPlus_PenSetCustomEndCap GDIPlus_PenSetDashCap GDIPlus_PenSetDashStyle GDIPlus_PenSetEndCap GDIPlus_PenSetLineCap GDIPlus_PenSetLineJoin GDIPlus_PenSetMiterLimit GDIPlus_PenSetStartCap GDIPlus_PenSetWidth GDIPlus_RectFCreate GDIPlus_RegionClone GDIPlus_RegionCombinePath GDIPlus_RegionCombineRect GDIPlus_RegionCombineRegion GDIPlus_RegionCreate GDIPlus_RegionCreateFromPath GDIPlus_RegionCreateFromRect GDIPlus_RegionDispose GDIPlus_RegionGetBounds GDIPlus_RegionGetHRgn GDIPlus_RegionTransform GDIPlus_RegionTranslate GDIPlus_Shutdown GDIPlus_Startup GDIPlus_StringFormatCreate GDIPlus_StringFormatDispose GDIPlus_StringFormatGetMeasurableCharacterRangeCount GDIPlus_StringFormatSetAlign GDIPlus_StringFormatSetLineAlign GDIPlus_StringFormatSetMeasurableCharacterRanges GDIPlus_TextureCreate GDIPlus_TextureCreate2 GDIPlus_TextureCreateIA GetIP GUICtrlAVI_Close GUICtrlAVI_Create GUICtrlAVI_Destroy GUICtrlAVI_IsPlaying GUICtrlAVI_Open GUICtrlAVI_OpenEx GUICtrlAVI_Play GUICtrlAVI_Seek GUICtrlAVI_Show GUICtrlAVI_Stop GUICtrlButton_Click GUICtrlButton_Create GUICtrlButton_Destroy GUICtrlButton_Enable GUICtrlButton_GetCheck GUICtrlButton_GetFocus GUICtrlButton_GetIdealSize GUICtrlButton_GetImage GUICtrlButton_GetImageList GUICtrlButton_GetNote GUICtrlButton_GetNoteLength GUICtrlButton_GetSplitInfo GUICtrlButton_GetState GUICtrlButton_GetText GUICtrlButton_GetTextMargin GUICtrlButton_SetCheck GUICtrlButton_SetDontClick GUICtrlButton_SetFocus GUICtrlButton_SetImage GUICtrlButton_SetImageList GUICtrlButton_SetNote GUICtrlButton_SetShield GUICtrlButton_SetSize GUICtrlButton_SetSplitInfo GUICtrlButton_SetState GUICtrlButton_SetStyle GUICtrlButton_SetText GUICtrlButton_SetTextMargin GUICtrlButton_Show GUICtrlComboBoxEx_AddDir GUICtrlComboBoxEx_AddString GUICtrlComboBoxEx_BeginUpdate GUICtrlComboBoxEx_Create GUICtrlComboBoxEx_CreateSolidBitMap GUICtrlComboBoxEx_DeleteString GUICtrlComboBoxEx_Destroy GUICtrlComboBoxEx_EndUpdate GUICtrlComboBoxEx_FindStringExact GUICtrlComboBoxEx_GetComboBoxInfo GUICtrlComboBoxEx_GetComboControl GUICtrlComboBoxEx_GetCount GUICtrlComboBoxEx_GetCurSel GUICtrlComboBoxEx_GetDroppedControlRect GUICtrlComboBoxEx_GetDroppedControlRectEx GUICtrlComboBoxEx_GetDroppedState GUICtrlComboBoxEx_GetDroppedWidth GUICtrlComboBoxEx_GetEditControl GUICtrlComboBoxEx_GetEditSel GUICtrlComboBoxEx_GetEditText GUICtrlComboBoxEx_GetExtendedStyle GUICtrlComboBoxEx_GetExtendedUI GUICtrlComboBoxEx_GetImageList GUICtrlComboBoxEx_GetItem GUICtrlComboBoxEx_GetItemEx GUICtrlComboBoxEx_GetItemHeight GUICtrlComboBoxEx_GetItemImage GUICtrlComboBoxEx_GetItemIndent GUICtrlComboBoxEx_GetItemOverlayImage GUICtrlComboBoxEx_GetItemParam GUICtrlComboBoxEx_GetItemSelectedImage GUICtrlComboBoxEx_GetItemText GUICtrlComboBoxEx_GetItemTextLen GUICtrlComboBoxEx_GetList GUICtrlComboBoxEx_GetListArray GUICtrlComboBoxEx_GetLocale GUICtrlComboBoxEx_GetLocaleCountry GUICtrlComboBoxEx_GetLocaleLang GUICtrlComboBoxEx_GetLocalePrimLang GUICtrlComboBoxEx_GetLocaleSubLang GUICtrlComboBoxEx_GetMinVisible GUICtrlComboBoxEx_GetTopIndex GUICtrlComboBoxEx_GetUnicode GUICtrlComboBoxEx_InitStorage GUICtrlComboBoxEx_InsertString GUICtrlComboBoxEx_LimitText GUICtrlComboBoxEx_ReplaceEditSel GUICtrlComboBoxEx_ResetContent GUICtrlComboBoxEx_SetCurSel GUICtrlComboBoxEx_SetDroppedWidth GUICtrlComboBoxEx_SetEditSel GUICtrlComboBoxEx_SetEditText GUICtrlComboBoxEx_SetExtendedStyle GUICtrlComboBoxEx_SetExtendedUI GUICtrlComboBoxEx_SetImageList GUICtrlComboBoxEx_SetItem GUICtrlComboBoxEx_SetItemEx GUICtrlComboBoxEx_SetItemHeight GUICtrlComboBoxEx_SetItemImage GUICtrlComboBoxEx_SetItemIndent GUICtrlComboBoxEx_SetItemOverlayImage GUICtrlComboBoxEx_SetItemParam GUICtrlComboBoxEx_SetItemSelectedImage GUICtrlComboBoxEx_SetMinVisible GUICtrlComboBoxEx_SetTopIndex GUICtrlComboBoxEx_SetUnicode GUICtrlComboBoxEx_ShowDropDown GUICtrlComboBox_AddDir GUICtrlComboBox_AddString GUICtrlComboBox_AutoComplete GUICtrlComboBox_BeginUpdate GUICtrlComboBox_Create GUICtrlComboBox_DeleteString GUICtrlComboBox_Destroy GUICtrlComboBox_EndUpdate GUICtrlComboBox_FindString GUICtrlComboBox_FindStringExact GUICtrlComboBox_GetComboBoxInfo GUICtrlComboBox_GetCount GUICtrlComboBox_GetCueBanner GUICtrlComboBox_GetCurSel GUICtrlComboBox_GetDroppedControlRect GUICtrlComboBox_GetDroppedControlRectEx GUICtrlComboBox_GetDroppedState GUICtrlComboBox_GetDroppedWidth GUICtrlComboBox_GetEditSel GUICtrlComboBox_GetEditText GUICtrlComboBox_GetExtendedUI GUICtrlComboBox_GetHorizontalExtent GUICtrlComboBox_GetItemHeight GUICtrlComboBox_GetLBText GUICtrlComboBox_GetLBTextLen GUICtrlComboBox_GetList GUICtrlComboBox_GetListArray GUICtrlComboBox_GetLocale GUICtrlComboBox_GetLocaleCountry GUICtrlComboBox_GetLocaleLang GUICtrlComboBox_GetLocalePrimLang GUICtrlComboBox_GetLocaleSubLang GUICtrlComboBox_GetMinVisible GUICtrlComboBox_GetTopIndex GUICtrlComboBox_InitStorage GUICtrlComboBox_InsertString GUICtrlComboBox_LimitText GUICtrlComboBox_ReplaceEditSel GUICtrlComboBox_ResetContent GUICtrlComboBox_SelectString GUICtrlComboBox_SetCueBanner GUICtrlComboBox_SetCurSel GUICtrlComboBox_SetDroppedWidth GUICtrlComboBox_SetEditSel GUICtrlComboBox_SetEditText GUICtrlComboBox_SetExtendedUI GUICtrlComboBox_SetHorizontalExtent GUICtrlComboBox_SetItemHeight GUICtrlComboBox_SetMinVisible GUICtrlComboBox_SetTopIndex GUICtrlComboBox_ShowDropDown GUICtrlDTP_Create GUICtrlDTP_Destroy GUICtrlDTP_GetMCColor GUICtrlDTP_GetMCFont GUICtrlDTP_GetMonthCal GUICtrlDTP_GetRange GUICtrlDTP_GetRangeEx GUICtrlDTP_GetSystemTime GUICtrlDTP_GetSystemTimeEx GUICtrlDTP_SetFormat GUICtrlDTP_SetMCColor GUICtrlDTP_SetMCFont GUICtrlDTP_SetRange GUICtrlDTP_SetRangeEx GUICtrlDTP_SetSystemTime GUICtrlDTP_SetSystemTimeEx GUICtrlEdit_AppendText GUICtrlEdit_BeginUpdate GUICtrlEdit_CanUndo GUICtrlEdit_CharFromPos GUICtrlEdit_Create GUICtrlEdit_Destroy GUICtrlEdit_EmptyUndoBuffer GUICtrlEdit_EndUpdate GUICtrlEdit_Find GUICtrlEdit_FmtLines GUICtrlEdit_GetCueBanner GUICtrlEdit_GetFirstVisibleLine GUICtrlEdit_GetLimitText GUICtrlEdit_GetLine GUICtrlEdit_GetLineCount GUICtrlEdit_GetMargins GUICtrlEdit_GetModify GUICtrlEdit_GetPasswordChar GUICtrlEdit_GetRECT GUICtrlEdit_GetRECTEx GUICtrlEdit_GetSel GUICtrlEdit_GetText GUICtrlEdit_GetTextLen GUICtrlEdit_HideBalloonTip GUICtrlEdit_InsertText GUICtrlEdit_LineFromChar GUICtrlEdit_LineIndex GUICtrlEdit_LineLength GUICtrlEdit_LineScroll GUICtrlEdit_PosFromChar GUICtrlEdit_ReplaceSel GUICtrlEdit_Scroll GUICtrlEdit_SetCueBanner GUICtrlEdit_SetLimitText GUICtrlEdit_SetMargins GUICtrlEdit_SetModify GUICtrlEdit_SetPasswordChar GUICtrlEdit_SetReadOnly GUICtrlEdit_SetRECT GUICtrlEdit_SetRECTEx GUICtrlEdit_SetRECTNP GUICtrlEdit_SetRectNPEx GUICtrlEdit_SetSel GUICtrlEdit_SetTabStops GUICtrlEdit_SetText GUICtrlEdit_ShowBalloonTip GUICtrlEdit_Undo GUICtrlHeader_AddItem GUICtrlHeader_ClearFilter GUICtrlHeader_ClearFilterAll GUICtrlHeader_Create GUICtrlHeader_CreateDragImage GUICtrlHeader_DeleteItem GUICtrlHeader_Destroy GUICtrlHeader_EditFilter GUICtrlHeader_GetBitmapMargin GUICtrlHeader_GetImageList GUICtrlHeader_GetItem GUICtrlHeader_GetItemAlign GUICtrlHeader_GetItemBitmap GUICtrlHeader_GetItemCount GUICtrlHeader_GetItemDisplay GUICtrlHeader_GetItemFlags GUICtrlHeader_GetItemFormat GUICtrlHeader_GetItemImage GUICtrlHeader_GetItemOrder GUICtrlHeader_GetItemParam GUICtrlHeader_GetItemRect GUICtrlHeader_GetItemRectEx GUICtrlHeader_GetItemText GUICtrlHeader_GetItemWidth GUICtrlHeader_GetOrderArray GUICtrlHeader_GetUnicodeFormat GUICtrlHeader_HitTest GUICtrlHeader_InsertItem GUICtrlHeader_Layout GUICtrlHeader_OrderToIndex GUICtrlHeader_SetBitmapMargin GUICtrlHeader_SetFilterChangeTimeout GUICtrlHeader_SetHotDivider GUICtrlHeader_SetImageList GUICtrlHeader_SetItem GUICtrlHeader_SetItemAlign GUICtrlHeader_SetItemBitmap GUICtrlHeader_SetItemDisplay GUICtrlHeader_SetItemFlags GUICtrlHeader_SetItemFormat GUICtrlHeader_SetItemImage GUICtrlHeader_SetItemOrder GUICtrlHeader_SetItemParam GUICtrlHeader_SetItemText GUICtrlHeader_SetItemWidth GUICtrlHeader_SetOrderArray GUICtrlHeader_SetUnicodeFormat GUICtrlIpAddress_ClearAddress GUICtrlIpAddress_Create GUICtrlIpAddress_Destroy GUICtrlIpAddress_Get GUICtrlIpAddress_GetArray GUICtrlIpAddress_GetEx GUICtrlIpAddress_IsBlank GUICtrlIpAddress_Set GUICtrlIpAddress_SetArray GUICtrlIpAddress_SetEx GUICtrlIpAddress_SetFocus GUICtrlIpAddress_SetFont GUICtrlIpAddress_SetRange GUICtrlIpAddress_ShowHide GUICtrlListBox_AddFile GUICtrlListBox_AddString GUICtrlListBox_BeginUpdate GUICtrlListBox_ClickItem GUICtrlListBox_Create GUICtrlListBox_DeleteString GUICtrlListBox_Destroy GUICtrlListBox_Dir GUICtrlListBox_EndUpdate GUICtrlListBox_FindInText GUICtrlListBox_FindString GUICtrlListBox_GetAnchorIndex GUICtrlListBox_GetCaretIndex GUICtrlListBox_GetCount GUICtrlListBox_GetCurSel GUICtrlListBox_GetHorizontalExtent GUICtrlListBox_GetItemData GUICtrlListBox_GetItemHeight GUICtrlListBox_GetItemRect GUICtrlListBox_GetItemRectEx GUICtrlListBox_GetListBoxInfo GUICtrlListBox_GetLocale GUICtrlListBox_GetLocaleCountry GUICtrlListBox_GetLocaleLang GUICtrlListBox_GetLocalePrimLang GUICtrlListBox_GetLocaleSubLang GUICtrlListBox_GetSel GUICtrlListBox_GetSelCount GUICtrlListBox_GetSelItems GUICtrlListBox_GetSelItemsText GUICtrlListBox_GetText GUICtrlListBox_GetTextLen GUICtrlListBox_GetTopIndex GUICtrlListBox_InitStorage GUICtrlListBox_InsertString GUICtrlListBox_ItemFromPoint GUICtrlListBox_ReplaceString GUICtrlListBox_ResetContent GUICtrlListBox_SelectString GUICtrlListBox_SelItemRange GUICtrlListBox_SelItemRangeEx GUICtrlListBox_SetAnchorIndex GUICtrlListBox_SetCaretIndex GUICtrlListBox_SetColumnWidth GUICtrlListBox_SetCurSel GUICtrlListBox_SetHorizontalExtent GUICtrlListBox_SetItemData GUICtrlListBox_SetItemHeight GUICtrlListBox_SetLocale GUICtrlListBox_SetSel GUICtrlListBox_SetTabStops GUICtrlListBox_SetTopIndex GUICtrlListBox_Sort GUICtrlListBox_SwapString GUICtrlListBox_UpdateHScroll GUICtrlListView_AddArray GUICtrlListView_AddColumn GUICtrlListView_AddItem GUICtrlListView_AddSubItem GUICtrlListView_ApproximateViewHeight GUICtrlListView_ApproximateViewRect GUICtrlListView_ApproximateViewWidth GUICtrlListView_Arrange GUICtrlListView_BeginUpdate GUICtrlListView_CancelEditLabel GUICtrlListView_ClickItem GUICtrlListView_CopyItems GUICtrlListView_Create GUICtrlListView_CreateDragImage GUICtrlListView_CreateSolidBitMap GUICtrlListView_DeleteAllItems GUICtrlListView_DeleteColumn GUICtrlListView_DeleteItem GUICtrlListView_DeleteItemsSelected GUICtrlListView_Destroy GUICtrlListView_DrawDragImage GUICtrlListView_EditLabel GUICtrlListView_EnableGroupView GUICtrlListView_EndUpdate GUICtrlListView_EnsureVisible GUICtrlListView_FindInText GUICtrlListView_FindItem GUICtrlListView_FindNearest GUICtrlListView_FindParam GUICtrlListView_FindText GUICtrlListView_GetBkColor GUICtrlListView_GetBkImage GUICtrlListView_GetCallbackMask GUICtrlListView_GetColumn GUICtrlListView_GetColumnCount GUICtrlListView_GetColumnOrder GUICtrlListView_GetColumnOrderArray GUICtrlListView_GetColumnWidth GUICtrlListView_GetCounterPage GUICtrlListView_GetEditControl GUICtrlListView_GetExtendedListViewStyle GUICtrlListView_GetFocusedGroup GUICtrlListView_GetGroupCount GUICtrlListView_GetGroupInfo GUICtrlListView_GetGroupInfoByIndex GUICtrlListView_GetGroupRect GUICtrlListView_GetGroupViewEnabled GUICtrlListView_GetHeader GUICtrlListView_GetHotCursor GUICtrlListView_GetHotItem GUICtrlListView_GetHoverTime GUICtrlListView_GetImageList GUICtrlListView_GetISearchString GUICtrlListView_GetItem GUICtrlListView_GetItemChecked GUICtrlListView_GetItemCount GUICtrlListView_GetItemCut GUICtrlListView_GetItemDropHilited GUICtrlListView_GetItemEx GUICtrlListView_GetItemFocused GUICtrlListView_GetItemGroupID GUICtrlListView_GetItemImage GUICtrlListView_GetItemIndent GUICtrlListView_GetItemParam GUICtrlListView_GetItemPosition GUICtrlListView_GetItemPositionX GUICtrlListView_GetItemPositionY GUICtrlListView_GetItemRect GUICtrlListView_GetItemRectEx GUICtrlListView_GetItemSelected GUICtrlListView_GetItemSpacing GUICtrlListView_GetItemSpacingX GUICtrlListView_GetItemSpacingY GUICtrlListView_GetItemState GUICtrlListView_GetItemStateImage GUICtrlListView_GetItemText GUICtrlListView_GetItemTextArray GUICtrlListView_GetItemTextString GUICtrlListView_GetNextItem GUICtrlListView_GetNumberOfWorkAreas GUICtrlListView_GetOrigin GUICtrlListView_GetOriginX GUICtrlListView_GetOriginY GUICtrlListView_GetOutlineColor GUICtrlListView_GetSelectedColumn GUICtrlListView_GetSelectedCount GUICtrlListView_GetSelectedIndices GUICtrlListView_GetSelectionMark GUICtrlListView_GetStringWidth GUICtrlListView_GetSubItemRect GUICtrlListView_GetTextBkColor GUICtrlListView_GetTextColor GUICtrlListView_GetToolTips GUICtrlListView_GetTopIndex GUICtrlListView_GetUnicodeFormat GUICtrlListView_GetView GUICtrlListView_GetViewDetails GUICtrlListView_GetViewLarge GUICtrlListView_GetViewList GUICtrlListView_GetViewRect GUICtrlListView_GetViewSmall GUICtrlListView_GetViewTile GUICtrlListView_HideColumn GUICtrlListView_HitTest GUICtrlListView_InsertColumn GUICtrlListView_InsertGroup GUICtrlListView_InsertItem GUICtrlListView_JustifyColumn GUICtrlListView_MapIDToIndex GUICtrlListView_MapIndexToID GUICtrlListView_RedrawItems GUICtrlListView_RegisterSortCallBack GUICtrlListView_RemoveAllGroups GUICtrlListView_RemoveGroup GUICtrlListView_Scroll GUICtrlListView_SetBkColor GUICtrlListView_SetBkImage GUICtrlListView_SetCallBackMask GUICtrlListView_SetColumn GUICtrlListView_SetColumnOrder GUICtrlListView_SetColumnOrderArray GUICtrlListView_SetColumnWidth GUICtrlListView_SetExtendedListViewStyle GUICtrlListView_SetGroupInfo GUICtrlListView_SetHotItem GUICtrlListView_SetHoverTime GUICtrlListView_SetIconSpacing GUICtrlListView_SetImageList GUICtrlListView_SetItem GUICtrlListView_SetItemChecked GUICtrlListView_SetItemCount GUICtrlListView_SetItemCut GUICtrlListView_SetItemDropHilited GUICtrlListView_SetItemEx GUICtrlListView_SetItemFocused GUICtrlListView_SetItemGroupID GUICtrlListView_SetItemImage GUICtrlListView_SetItemIndent GUICtrlListView_SetItemParam GUICtrlListView_SetItemPosition GUICtrlListView_SetItemPosition32 GUICtrlListView_SetItemSelected GUICtrlListView_SetItemState GUICtrlListView_SetItemStateImage GUICtrlListView_SetItemText GUICtrlListView_SetOutlineColor GUICtrlListView_SetSelectedColumn GUICtrlListView_SetSelectionMark GUICtrlListView_SetTextBkColor GUICtrlListView_SetTextColor GUICtrlListView_SetToolTips GUICtrlListView_SetUnicodeFormat GUICtrlListView_SetView GUICtrlListView_SetWorkAreas GUICtrlListView_SimpleSort GUICtrlListView_SortItems GUICtrlListView_SubItemHitTest GUICtrlListView_UnRegisterSortCallBack GUICtrlMenu_AddMenuItem GUICtrlMenu_AppendMenu GUICtrlMenu_CalculatePopupWindowPosition GUICtrlMenu_CheckMenuItem GUICtrlMenu_CheckRadioItem GUICtrlMenu_CreateMenu GUICtrlMenu_CreatePopup GUICtrlMenu_DeleteMenu GUICtrlMenu_DestroyMenu GUICtrlMenu_DrawMenuBar GUICtrlMenu_EnableMenuItem GUICtrlMenu_FindItem GUICtrlMenu_FindParent GUICtrlMenu_GetItemBmp GUICtrlMenu_GetItemBmpChecked GUICtrlMenu_GetItemBmpUnchecked GUICtrlMenu_GetItemChecked GUICtrlMenu_GetItemCount GUICtrlMenu_GetItemData GUICtrlMenu_GetItemDefault GUICtrlMenu_GetItemDisabled GUICtrlMenu_GetItemEnabled GUICtrlMenu_GetItemGrayed GUICtrlMenu_GetItemHighlighted GUICtrlMenu_GetItemID GUICtrlMenu_GetItemInfo GUICtrlMenu_GetItemRect GUICtrlMenu_GetItemRectEx GUICtrlMenu_GetItemState GUICtrlMenu_GetItemStateEx GUICtrlMenu_GetItemSubMenu GUICtrlMenu_GetItemText GUICtrlMenu_GetItemType GUICtrlMenu_GetMenu GUICtrlMenu_GetMenuBackground GUICtrlMenu_GetMenuBarInfo GUICtrlMenu_GetMenuContextHelpID GUICtrlMenu_GetMenuData GUICtrlMenu_GetMenuDefaultItem GUICtrlMenu_GetMenuHeight GUICtrlMenu_GetMenuInfo GUICtrlMenu_GetMenuStyle GUICtrlMenu_GetSystemMenu GUICtrlMenu_InsertMenuItem GUICtrlMenu_InsertMenuItemEx GUICtrlMenu_IsMenu GUICtrlMenu_LoadMenu GUICtrlMenu_MapAccelerator GUICtrlMenu_MenuItemFromPoint GUICtrlMenu_RemoveMenu GUICtrlMenu_SetItemBitmaps GUICtrlMenu_SetItemBmp GUICtrlMenu_SetItemBmpChecked GUICtrlMenu_SetItemBmpUnchecked GUICtrlMenu_SetItemChecked GUICtrlMenu_SetItemData GUICtrlMenu_SetItemDefault GUICtrlMenu_SetItemDisabled GUICtrlMenu_SetItemEnabled GUICtrlMenu_SetItemGrayed GUICtrlMenu_SetItemHighlighted GUICtrlMenu_SetItemID GUICtrlMenu_SetItemInfo GUICtrlMenu_SetItemState GUICtrlMenu_SetItemSubMenu GUICtrlMenu_SetItemText GUICtrlMenu_SetItemType GUICtrlMenu_SetMenu GUICtrlMenu_SetMenuBackground GUICtrlMenu_SetMenuContextHelpID GUICtrlMenu_SetMenuData GUICtrlMenu_SetMenuDefaultItem GUICtrlMenu_SetMenuHeight GUICtrlMenu_SetMenuInfo GUICtrlMenu_SetMenuStyle GUICtrlMenu_TrackPopupMenu GUICtrlMonthCal_Create GUICtrlMonthCal_Destroy GUICtrlMonthCal_GetCalendarBorder GUICtrlMonthCal_GetCalendarCount GUICtrlMonthCal_GetColor GUICtrlMonthCal_GetColorArray GUICtrlMonthCal_GetCurSel GUICtrlMonthCal_GetCurSelStr GUICtrlMonthCal_GetFirstDOW GUICtrlMonthCal_GetFirstDOWStr GUICtrlMonthCal_GetMaxSelCount GUICtrlMonthCal_GetMaxTodayWidth GUICtrlMonthCal_GetMinReqHeight GUICtrlMonthCal_GetMinReqRect GUICtrlMonthCal_GetMinReqRectArray GUICtrlMonthCal_GetMinReqWidth GUICtrlMonthCal_GetMonthDelta GUICtrlMonthCal_GetMonthRange GUICtrlMonthCal_GetMonthRangeMax GUICtrlMonthCal_GetMonthRangeMaxStr GUICtrlMonthCal_GetMonthRangeMin GUICtrlMonthCal_GetMonthRangeMinStr GUICtrlMonthCal_GetMonthRangeSpan GUICtrlMonthCal_GetRange GUICtrlMonthCal_GetRangeMax GUICtrlMonthCal_GetRangeMaxStr GUICtrlMonthCal_GetRangeMin GUICtrlMonthCal_GetRangeMinStr GUICtrlMonthCal_GetSelRange GUICtrlMonthCal_GetSelRangeMax GUICtrlMonthCal_GetSelRangeMaxStr GUICtrlMonthCal_GetSelRangeMin GUICtrlMonthCal_GetSelRangeMinStr GUICtrlMonthCal_GetToday GUICtrlMonthCal_GetTodayStr GUICtrlMonthCal_GetUnicodeFormat GUICtrlMonthCal_HitTest GUICtrlMonthCal_SetCalendarBorder GUICtrlMonthCal_SetColor GUICtrlMonthCal_SetCurSel GUICtrlMonthCal_SetDayState GUICtrlMonthCal_SetFirstDOW GUICtrlMonthCal_SetMaxSelCount GUICtrlMonthCal_SetMonthDelta GUICtrlMonthCal_SetRange GUICtrlMonthCal_SetSelRange GUICtrlMonthCal_SetToday GUICtrlMonthCal_SetUnicodeFormat GUICtrlRebar_AddBand GUICtrlRebar_AddToolBarBand GUICtrlRebar_BeginDrag GUICtrlRebar_Create GUICtrlRebar_DeleteBand GUICtrlRebar_Destroy GUICtrlRebar_DragMove GUICtrlRebar_EndDrag GUICtrlRebar_GetBandBackColor GUICtrlRebar_GetBandBorders GUICtrlRebar_GetBandBordersEx GUICtrlRebar_GetBandChildHandle GUICtrlRebar_GetBandChildSize GUICtrlRebar_GetBandCount GUICtrlRebar_GetBandForeColor GUICtrlRebar_GetBandHeaderSize GUICtrlRebar_GetBandID GUICtrlRebar_GetBandIdealSize GUICtrlRebar_GetBandLength GUICtrlRebar_GetBandLParam GUICtrlRebar_GetBandMargins GUICtrlRebar_GetBandMarginsEx GUICtrlRebar_GetBandRect GUICtrlRebar_GetBandRectEx GUICtrlRebar_GetBandStyle GUICtrlRebar_GetBandStyleBreak GUICtrlRebar_GetBandStyleChildEdge GUICtrlRebar_GetBandStyleFixedBMP GUICtrlRebar_GetBandStyleFixedSize GUICtrlRebar_GetBandStyleGripperAlways GUICtrlRebar_GetBandStyleHidden GUICtrlRebar_GetBandStyleHideTitle GUICtrlRebar_GetBandStyleNoGripper GUICtrlRebar_GetBandStyleTopAlign GUICtrlRebar_GetBandStyleUseChevron GUICtrlRebar_GetBandStyleVariableHeight GUICtrlRebar_GetBandText GUICtrlRebar_GetBarHeight GUICtrlRebar_GetBarInfo GUICtrlRebar_GetBKColor GUICtrlRebar_GetColorScheme GUICtrlRebar_GetRowCount GUICtrlRebar_GetRowHeight GUICtrlRebar_GetTextColor GUICtrlRebar_GetToolTips GUICtrlRebar_GetUnicodeFormat GUICtrlRebar_HitTest GUICtrlRebar_IDToIndex GUICtrlRebar_MaximizeBand GUICtrlRebar_MinimizeBand GUICtrlRebar_MoveBand GUICtrlRebar_SetBandBackColor GUICtrlRebar_SetBandForeColor GUICtrlRebar_SetBandHeaderSize GUICtrlRebar_SetBandID GUICtrlRebar_SetBandIdealSize GUICtrlRebar_SetBandLength GUICtrlRebar_SetBandLParam GUICtrlRebar_SetBandStyle GUICtrlRebar_SetBandStyleBreak GUICtrlRebar_SetBandStyleChildEdge GUICtrlRebar_SetBandStyleFixedBMP GUICtrlRebar_SetBandStyleFixedSize GUICtrlRebar_SetBandStyleGripperAlways GUICtrlRebar_SetBandStyleHidden GUICtrlRebar_SetBandStyleHideTitle GUICtrlRebar_SetBandStyleNoGripper GUICtrlRebar_SetBandStyleTopAlign GUICtrlRebar_SetBandStyleUseChevron GUICtrlRebar_SetBandStyleVariableHeight GUICtrlRebar_SetBandText GUICtrlRebar_SetBarInfo GUICtrlRebar_SetBKColor GUICtrlRebar_SetColorScheme GUICtrlRebar_SetTextColor GUICtrlRebar_SetToolTips GUICtrlRebar_SetUnicodeFormat GUICtrlRebar_ShowBand GUICtrlRichEdit_AppendText GUICtrlRichEdit_AutoDetectURL GUICtrlRichEdit_CanPaste GUICtrlRichEdit_CanPasteSpecial GUICtrlRichEdit_CanRedo GUICtrlRichEdit_CanUndo GUICtrlRichEdit_ChangeFontSize GUICtrlRichEdit_Copy GUICtrlRichEdit_Create GUICtrlRichEdit_Cut GUICtrlRichEdit_Deselect GUICtrlRichEdit_Destroy GUICtrlRichEdit_EmptyUndoBuffer GUICtrlRichEdit_FindText GUICtrlRichEdit_FindTextInRange GUICtrlRichEdit_GetBkColor GUICtrlRichEdit_GetCharAttributes GUICtrlRichEdit_GetCharBkColor GUICtrlRichEdit_GetCharColor GUICtrlRichEdit_GetCharPosFromXY GUICtrlRichEdit_GetCharPosOfNextWord GUICtrlRichEdit_GetCharPosOfPreviousWord GUICtrlRichEdit_GetCharWordBreakInfo GUICtrlRichEdit_GetFirstCharPosOnLine GUICtrlRichEdit_GetFont GUICtrlRichEdit_GetLineCount GUICtrlRichEdit_GetLineLength GUICtrlRichEdit_GetLineNumberFromCharPos GUICtrlRichEdit_GetNextRedo GUICtrlRichEdit_GetNextUndo GUICtrlRichEdit_GetNumberOfFirstVisibleLine GUICtrlRichEdit_GetParaAlignment GUICtrlRichEdit_GetParaAttributes GUICtrlRichEdit_GetParaBorder GUICtrlRichEdit_GetParaIndents GUICtrlRichEdit_GetParaNumbering GUICtrlRichEdit_GetParaShading GUICtrlRichEdit_GetParaSpacing GUICtrlRichEdit_GetParaTabStops GUICtrlRichEdit_GetPasswordChar GUICtrlRichEdit_GetRECT GUICtrlRichEdit_GetScrollPos GUICtrlRichEdit_GetSel GUICtrlRichEdit_GetSelAA GUICtrlRichEdit_GetSelText GUICtrlRichEdit_GetSpaceUnit GUICtrlRichEdit_GetText GUICtrlRichEdit_GetTextInLine GUICtrlRichEdit_GetTextInRange GUICtrlRichEdit_GetTextLength GUICtrlRichEdit_GetVersion GUICtrlRichEdit_GetXYFromCharPos GUICtrlRichEdit_GetZoom GUICtrlRichEdit_GotoCharPos GUICtrlRichEdit_HideSelection GUICtrlRichEdit_InsertText GUICtrlRichEdit_IsModified GUICtrlRichEdit_IsTextSelected GUICtrlRichEdit_Paste GUICtrlRichEdit_PasteSpecial GUICtrlRichEdit_PauseRedraw GUICtrlRichEdit_Redo GUICtrlRichEdit_ReplaceText GUICtrlRichEdit_ResumeRedraw GUICtrlRichEdit_ScrollLineOrPage GUICtrlRichEdit_ScrollLines GUICtrlRichEdit_ScrollToCaret GUICtrlRichEdit_SetBkColor GUICtrlRichEdit_SetCharAttributes GUICtrlRichEdit_SetCharBkColor GUICtrlRichEdit_SetCharColor GUICtrlRichEdit_SetEventMask GUICtrlRichEdit_SetFont GUICtrlRichEdit_SetLimitOnText GUICtrlRichEdit_SetModified GUICtrlRichEdit_SetParaAlignment GUICtrlRichEdit_SetParaAttributes GUICtrlRichEdit_SetParaBorder GUICtrlRichEdit_SetParaIndents GUICtrlRichEdit_SetParaNumbering GUICtrlRichEdit_SetParaShading GUICtrlRichEdit_SetParaSpacing GUICtrlRichEdit_SetParaTabStops GUICtrlRichEdit_SetPasswordChar GUICtrlRichEdit_SetReadOnly GUICtrlRichEdit_SetRECT GUICtrlRichEdit_SetScrollPos GUICtrlRichEdit_SetSel GUICtrlRichEdit_SetSpaceUnit GUICtrlRichEdit_SetTabStops GUICtrlRichEdit_SetText GUICtrlRichEdit_SetUndoLimit GUICtrlRichEdit_SetZoom GUICtrlRichEdit_StreamFromFile GUICtrlRichEdit_StreamFromVar GUICtrlRichEdit_StreamToFile GUICtrlRichEdit_StreamToVar GUICtrlRichEdit_Undo GUICtrlSlider_ClearSel GUICtrlSlider_ClearTics GUICtrlSlider_Create GUICtrlSlider_Destroy GUICtrlSlider_GetBuddy GUICtrlSlider_GetChannelRect GUICtrlSlider_GetChannelRectEx GUICtrlSlider_GetLineSize GUICtrlSlider_GetLogicalTics GUICtrlSlider_GetNumTics GUICtrlSlider_GetPageSize GUICtrlSlider_GetPos GUICtrlSlider_GetRange GUICtrlSlider_GetRangeMax GUICtrlSlider_GetRangeMin GUICtrlSlider_GetSel GUICtrlSlider_GetSelEnd GUICtrlSlider_GetSelStart GUICtrlSlider_GetThumbLength GUICtrlSlider_GetThumbRect GUICtrlSlider_GetThumbRectEx GUICtrlSlider_GetTic GUICtrlSlider_GetTicPos GUICtrlSlider_GetToolTips GUICtrlSlider_GetUnicodeFormat GUICtrlSlider_SetBuddy GUICtrlSlider_SetLineSize GUICtrlSlider_SetPageSize GUICtrlSlider_SetPos GUICtrlSlider_SetRange GUICtrlSlider_SetRangeMax GUICtrlSlider_SetRangeMin GUICtrlSlider_SetSel GUICtrlSlider_SetSelEnd GUICtrlSlider_SetSelStart GUICtrlSlider_SetThumbLength GUICtrlSlider_SetTic GUICtrlSlider_SetTicFreq GUICtrlSlider_SetTipSide GUICtrlSlider_SetToolTips GUICtrlSlider_SetUnicodeFormat GUICtrlStatusBar_Create GUICtrlStatusBar_Destroy GUICtrlStatusBar_EmbedControl GUICtrlStatusBar_GetBorders GUICtrlStatusBar_GetBordersHorz GUICtrlStatusBar_GetBordersRect GUICtrlStatusBar_GetBordersVert GUICtrlStatusBar_GetCount GUICtrlStatusBar_GetHeight GUICtrlStatusBar_GetIcon GUICtrlStatusBar_GetParts GUICtrlStatusBar_GetRect GUICtrlStatusBar_GetRectEx GUICtrlStatusBar_GetText GUICtrlStatusBar_GetTextFlags GUICtrlStatusBar_GetTextLength GUICtrlStatusBar_GetTextLengthEx GUICtrlStatusBar_GetTipText GUICtrlStatusBar_GetUnicodeFormat GUICtrlStatusBar_GetWidth GUICtrlStatusBar_IsSimple GUICtrlStatusBar_Resize GUICtrlStatusBar_SetBkColor GUICtrlStatusBar_SetIcon GUICtrlStatusBar_SetMinHeight GUICtrlStatusBar_SetParts GUICtrlStatusBar_SetSimple GUICtrlStatusBar_SetText GUICtrlStatusBar_SetTipText GUICtrlStatusBar_SetUnicodeFormat GUICtrlStatusBar_ShowHide GUICtrlTab_ActivateTab GUICtrlTab_ClickTab GUICtrlTab_Create GUICtrlTab_DeleteAllItems GUICtrlTab_DeleteItem GUICtrlTab_DeselectAll GUICtrlTab_Destroy GUICtrlTab_FindTab GUICtrlTab_GetCurFocus GUICtrlTab_GetCurSel GUICtrlTab_GetDisplayRect GUICtrlTab_GetDisplayRectEx GUICtrlTab_GetExtendedStyle GUICtrlTab_GetImageList GUICtrlTab_GetItem GUICtrlTab_GetItemCount GUICtrlTab_GetItemImage GUICtrlTab_GetItemParam GUICtrlTab_GetItemRect GUICtrlTab_GetItemRectEx GUICtrlTab_GetItemState GUICtrlTab_GetItemText GUICtrlTab_GetRowCount GUICtrlTab_GetToolTips GUICtrlTab_GetUnicodeFormat GUICtrlTab_HighlightItem GUICtrlTab_HitTest GUICtrlTab_InsertItem GUICtrlTab_RemoveImage GUICtrlTab_SetCurFocus GUICtrlTab_SetCurSel GUICtrlTab_SetExtendedStyle GUICtrlTab_SetImageList GUICtrlTab_SetItem GUICtrlTab_SetItemImage GUICtrlTab_SetItemParam GUICtrlTab_SetItemSize GUICtrlTab_SetItemState GUICtrlTab_SetItemText GUICtrlTab_SetMinTabWidth GUICtrlTab_SetPadding GUICtrlTab_SetToolTips GUICtrlTab_SetUnicodeFormat GUICtrlToolbar_AddBitmap GUICtrlToolbar_AddButton GUICtrlToolbar_AddButtonSep GUICtrlToolbar_AddString GUICtrlToolbar_ButtonCount GUICtrlToolbar_CheckButton GUICtrlToolbar_ClickAccel GUICtrlToolbar_ClickButton GUICtrlToolbar_ClickIndex GUICtrlToolbar_CommandToIndex GUICtrlToolbar_Create GUICtrlToolbar_Customize GUICtrlToolbar_DeleteButton GUICtrlToolbar_Destroy GUICtrlToolbar_EnableButton GUICtrlToolbar_FindToolbar GUICtrlToolbar_GetAnchorHighlight GUICtrlToolbar_GetBitmapFlags GUICtrlToolbar_GetButtonBitmap GUICtrlToolbar_GetButtonInfo GUICtrlToolbar_GetButtonInfoEx GUICtrlToolbar_GetButtonParam GUICtrlToolbar_GetButtonRect GUICtrlToolbar_GetButtonRectEx GUICtrlToolbar_GetButtonSize GUICtrlToolbar_GetButtonState GUICtrlToolbar_GetButtonStyle GUICtrlToolbar_GetButtonText GUICtrlToolbar_GetColorScheme GUICtrlToolbar_GetDisabledImageList GUICtrlToolbar_GetExtendedStyle GUICtrlToolbar_GetHotImageList GUICtrlToolbar_GetHotItem GUICtrlToolbar_GetImageList GUICtrlToolbar_GetInsertMark GUICtrlToolbar_GetInsertMarkColor GUICtrlToolbar_GetMaxSize GUICtrlToolbar_GetMetrics GUICtrlToolbar_GetPadding GUICtrlToolbar_GetRows GUICtrlToolbar_GetString GUICtrlToolbar_GetStyle GUICtrlToolbar_GetStyleAltDrag GUICtrlToolbar_GetStyleCustomErase GUICtrlToolbar_GetStyleFlat GUICtrlToolbar_GetStyleList GUICtrlToolbar_GetStyleRegisterDrop GUICtrlToolbar_GetStyleToolTips GUICtrlToolbar_GetStyleTransparent GUICtrlToolbar_GetStyleWrapable GUICtrlToolbar_GetTextRows GUICtrlToolbar_GetToolTips GUICtrlToolbar_GetUnicodeFormat GUICtrlToolbar_HideButton GUICtrlToolbar_HighlightButton GUICtrlToolbar_HitTest GUICtrlToolbar_IndexToCommand GUICtrlToolbar_InsertButton GUICtrlToolbar_InsertMarkHitTest GUICtrlToolbar_IsButtonChecked GUICtrlToolbar_IsButtonEnabled GUICtrlToolbar_IsButtonHidden GUICtrlToolbar_IsButtonHighlighted GUICtrlToolbar_IsButtonIndeterminate GUICtrlToolbar_IsButtonPressed GUICtrlToolbar_LoadBitmap GUICtrlToolbar_LoadImages GUICtrlToolbar_MapAccelerator GUICtrlToolbar_MoveButton GUICtrlToolbar_PressButton GUICtrlToolbar_SetAnchorHighlight GUICtrlToolbar_SetBitmapSize GUICtrlToolbar_SetButtonBitMap GUICtrlToolbar_SetButtonInfo GUICtrlToolbar_SetButtonInfoEx GUICtrlToolbar_SetButtonParam GUICtrlToolbar_SetButtonSize GUICtrlToolbar_SetButtonState GUICtrlToolbar_SetButtonStyle GUICtrlToolbar_SetButtonText GUICtrlToolbar_SetButtonWidth GUICtrlToolbar_SetCmdID GUICtrlToolbar_SetColorScheme GUICtrlToolbar_SetDisabledImageList GUICtrlToolbar_SetDrawTextFlags GUICtrlToolbar_SetExtendedStyle GUICtrlToolbar_SetHotImageList GUICtrlToolbar_SetHotItem GUICtrlToolbar_SetImageList GUICtrlToolbar_SetIndent GUICtrlToolbar_SetIndeterminate GUICtrlToolbar_SetInsertMark GUICtrlToolbar_SetInsertMarkColor GUICtrlToolbar_SetMaxTextRows GUICtrlToolbar_SetMetrics GUICtrlToolbar_SetPadding GUICtrlToolbar_SetParent GUICtrlToolbar_SetRows GUICtrlToolbar_SetStyle GUICtrlToolbar_SetStyleAltDrag GUICtrlToolbar_SetStyleCustomErase GUICtrlToolbar_SetStyleFlat GUICtrlToolbar_SetStyleList GUICtrlToolbar_SetStyleRegisterDrop GUICtrlToolbar_SetStyleToolTips GUICtrlToolbar_SetStyleTransparent GUICtrlToolbar_SetStyleWrapable GUICtrlToolbar_SetToolTips GUICtrlToolbar_SetUnicodeFormat GUICtrlToolbar_SetWindowTheme GUICtrlTreeView_Add GUICtrlTreeView_AddChild GUICtrlTreeView_AddChildFirst GUICtrlTreeView_AddFirst GUICtrlTreeView_BeginUpdate GUICtrlTreeView_ClickItem GUICtrlTreeView_Create GUICtrlTreeView_CreateDragImage GUICtrlTreeView_CreateSolidBitMap GUICtrlTreeView_Delete GUICtrlTreeView_DeleteAll GUICtrlTreeView_DeleteChildren GUICtrlTreeView_Destroy GUICtrlTreeView_DisplayRect GUICtrlTreeView_DisplayRectEx GUICtrlTreeView_EditText GUICtrlTreeView_EndEdit GUICtrlTreeView_EndUpdate GUICtrlTreeView_EnsureVisible GUICtrlTreeView_Expand GUICtrlTreeView_ExpandedOnce GUICtrlTreeView_FindItem GUICtrlTreeView_FindItemEx GUICtrlTreeView_GetBkColor GUICtrlTreeView_GetBold GUICtrlTreeView_GetChecked GUICtrlTreeView_GetChildCount GUICtrlTreeView_GetChildren GUICtrlTreeView_GetCount GUICtrlTreeView_GetCut GUICtrlTreeView_GetDropTarget GUICtrlTreeView_GetEditControl GUICtrlTreeView_GetExpanded GUICtrlTreeView_GetFirstChild GUICtrlTreeView_GetFirstItem GUICtrlTreeView_GetFirstVisible GUICtrlTreeView_GetFocused GUICtrlTreeView_GetHeight GUICtrlTreeView_GetImageIndex GUICtrlTreeView_GetImageListIconHandle GUICtrlTreeView_GetIndent GUICtrlTreeView_GetInsertMarkColor GUICtrlTreeView_GetISearchString GUICtrlTreeView_GetItemByIndex GUICtrlTreeView_GetItemHandle GUICtrlTreeView_GetItemParam GUICtrlTreeView_GetLastChild GUICtrlTreeView_GetLineColor GUICtrlTreeView_GetNext GUICtrlTreeView_GetNextChild GUICtrlTreeView_GetNextSibling GUICtrlTreeView_GetNextVisible GUICtrlTreeView_GetNormalImageList GUICtrlTreeView_GetParentHandle GUICtrlTreeView_GetParentParam GUICtrlTreeView_GetPrev GUICtrlTreeView_GetPrevChild GUICtrlTreeView_GetPrevSibling GUICtrlTreeView_GetPrevVisible GUICtrlTreeView_GetScrollTime GUICtrlTreeView_GetSelected GUICtrlTreeView_GetSelectedImageIndex GUICtrlTreeView_GetSelection GUICtrlTreeView_GetSiblingCount GUICtrlTreeView_GetState GUICtrlTreeView_GetStateImageIndex GUICtrlTreeView_GetStateImageList GUICtrlTreeView_GetText GUICtrlTreeView_GetTextColor GUICtrlTreeView_GetToolTips GUICtrlTreeView_GetTree GUICtrlTreeView_GetUnicodeFormat GUICtrlTreeView_GetVisible GUICtrlTreeView_GetVisibleCount GUICtrlTreeView_HitTest GUICtrlTreeView_HitTestEx GUICtrlTreeView_HitTestItem GUICtrlTreeView_Index GUICtrlTreeView_InsertItem GUICtrlTreeView_IsFirstItem GUICtrlTreeView_IsParent GUICtrlTreeView_Level GUICtrlTreeView_SelectItem GUICtrlTreeView_SelectItemByIndex GUICtrlTreeView_SetBkColor GUICtrlTreeView_SetBold GUICtrlTreeView_SetChecked GUICtrlTreeView_SetCheckedByIndex GUICtrlTreeView_SetChildren GUICtrlTreeView_SetCut GUICtrlTreeView_SetDropTarget GUICtrlTreeView_SetFocused GUICtrlTreeView_SetHeight GUICtrlTreeView_SetIcon GUICtrlTreeView_SetImageIndex GUICtrlTreeView_SetIndent GUICtrlTreeView_SetInsertMark GUICtrlTreeView_SetInsertMarkColor GUICtrlTreeView_SetItemHeight GUICtrlTreeView_SetItemParam GUICtrlTreeView_SetLineColor GUICtrlTreeView_SetNormalImageList GUICtrlTreeView_SetScrollTime GUICtrlTreeView_SetSelected GUICtrlTreeView_SetSelectedImageIndex GUICtrlTreeView_SetState GUICtrlTreeView_SetStateImageIndex GUICtrlTreeView_SetStateImageList GUICtrlTreeView_SetText GUICtrlTreeView_SetTextColor GUICtrlTreeView_SetToolTips GUICtrlTreeView_SetUnicodeFormat GUICtrlTreeView_Sort GUIImageList_Add GUIImageList_AddBitmap GUIImageList_AddIcon GUIImageList_AddMasked GUIImageList_BeginDrag GUIImageList_Copy GUIImageList_Create GUIImageList_Destroy GUIImageList_DestroyIcon GUIImageList_DragEnter GUIImageList_DragLeave GUIImageList_DragMove GUIImageList_Draw GUIImageList_DrawEx GUIImageList_Duplicate GUIImageList_EndDrag GUIImageList_GetBkColor GUIImageList_GetIcon GUIImageList_GetIconHeight GUIImageList_GetIconSize GUIImageList_GetIconSizeEx GUIImageList_GetIconWidth GUIImageList_GetImageCount GUIImageList_GetImageInfoEx GUIImageList_Remove GUIImageList_ReplaceIcon GUIImageList_SetBkColor GUIImageList_SetIconSize GUIImageList_SetImageCount GUIImageList_Swap GUIScrollBars_EnableScrollBar GUIScrollBars_GetScrollBarInfoEx GUIScrollBars_GetScrollBarRect GUIScrollBars_GetScrollBarRGState GUIScrollBars_GetScrollBarXYLineButton GUIScrollBars_GetScrollBarXYThumbBottom GUIScrollBars_GetScrollBarXYThumbTop GUIScrollBars_GetScrollInfo GUIScrollBars_GetScrollInfoEx GUIScrollBars_GetScrollInfoMax GUIScrollBars_GetScrollInfoMin GUIScrollBars_GetScrollInfoPage GUIScrollBars_GetScrollInfoPos GUIScrollBars_GetScrollInfoTrackPos GUIScrollBars_GetScrollPos GUIScrollBars_GetScrollRange GUIScrollBars_Init GUIScrollBars_ScrollWindow GUIScrollBars_SetScrollInfo GUIScrollBars_SetScrollInfoMax GUIScrollBars_SetScrollInfoMin GUIScrollBars_SetScrollInfoPage GUIScrollBars_SetScrollInfoPos GUIScrollBars_SetScrollRange GUIScrollBars_ShowScrollBar GUIToolTip_Activate GUIToolTip_AddTool GUIToolTip_AdjustRect GUIToolTip_BitsToTTF GUIToolTip_Create GUIToolTip_Deactivate GUIToolTip_DelTool GUIToolTip_Destroy GUIToolTip_EnumTools GUIToolTip_GetBubbleHeight GUIToolTip_GetBubbleSize GUIToolTip_GetBubbleWidth GUIToolTip_GetCurrentTool GUIToolTip_GetDelayTime GUIToolTip_GetMargin GUIToolTip_GetMarginEx GUIToolTip_GetMaxTipWidth GUIToolTip_GetText GUIToolTip_GetTipBkColor GUIToolTip_GetTipTextColor GUIToolTip_GetTitleBitMap GUIToolTip_GetTitleText GUIToolTip_GetToolCount GUIToolTip_GetToolInfo GUIToolTip_HitTest GUIToolTip_NewToolRect GUIToolTip_Pop GUIToolTip_PopUp GUIToolTip_SetDelayTime GUIToolTip_SetMargin GUIToolTip_SetMaxTipWidth GUIToolTip_SetTipBkColor GUIToolTip_SetTipTextColor GUIToolTip_SetTitle GUIToolTip_SetToolInfo GUIToolTip_SetWindowTheme GUIToolTip_ToolExists GUIToolTip_ToolToArray GUIToolTip_TrackActivate GUIToolTip_TrackPosition GUIToolTip_Update GUIToolTip_UpdateTipText HexToString IEAction IEAttach IEBodyReadHTML IEBodyReadText IEBodyWriteHTML IECreate IECreateEmbedded IEDocGetObj IEDocInsertHTML IEDocInsertText IEDocReadHTML IEDocWriteHTML IEErrorNotify IEFormElementCheckBoxSelect IEFormElementGetCollection IEFormElementGetObjByName IEFormElementGetValue IEFormElementOptionSelect IEFormElementRadioSelect IEFormElementSetValue IEFormGetCollection IEFormGetObjByName IEFormImageClick IEFormReset IEFormSubmit IEFrameGetCollection IEFrameGetObjByName IEGetObjById IEGetObjByName IEHeadInsertEventScript IEImgClick IEImgGetCollection IEIsFrameSet IELinkClickByIndex IELinkClickByText IELinkGetCollection IELoadWait IELoadWaitTimeout IENavigate IEPropertyGet IEPropertySet IEQuit IETableGetCollection IETableWriteToArray IETagNameAllGetCollection IETagNameGetCollection IE_Example IE_Introduction IE_VersionInfo INetExplorerCapable INetGetSource INetMail INetSmtpMail IsPressed MathCheckDiv Max MemGlobalAlloc MemGlobalFree MemGlobalLock MemGlobalSize MemGlobalUnlock MemMoveMemory MemVirtualAlloc MemVirtualAllocEx MemVirtualFree MemVirtualFreeEx Min MouseTrap NamedPipes_CallNamedPipe NamedPipes_ConnectNamedPipe NamedPipes_CreateNamedPipe NamedPipes_CreatePipe NamedPipes_DisconnectNamedPipe NamedPipes_GetNamedPipeHandleState NamedPipes_GetNamedPipeInfo NamedPipes_PeekNamedPipe NamedPipes_SetNamedPipeHandleState NamedPipes_TransactNamedPipe NamedPipes_WaitNamedPipe Net_Share_ConnectionEnum Net_Share_FileClose Net_Share_FileEnum Net_Share_FileGetInfo Net_Share_PermStr Net_Share_ResourceStr Net_Share_SessionDel Net_Share_SessionEnum Net_Share_SessionGetInfo Net_Share_ShareAdd Net_Share_ShareCheck Net_Share_ShareDel Net_Share_ShareEnum Net_Share_ShareGetInfo Net_Share_ShareSetInfo Net_Share_StatisticsGetSvr Net_Share_StatisticsGetWrk Now NowCalc NowCalcDate NowDate NowTime PathFull PathGetRelative PathMake PathSplit ProcessGetName ProcessGetPriority Radian ReplaceStringInFile RunDos ScreenCapture_Capture ScreenCapture_CaptureWnd ScreenCapture_SaveImage ScreenCapture_SetBMPFormat ScreenCapture_SetJPGQuality ScreenCapture_SetTIFColorDepth ScreenCapture_SetTIFCompression Security__AdjustTokenPrivileges Security__CreateProcessWithToken Security__DuplicateTokenEx Security__GetAccountSid Security__GetLengthSid Security__GetTokenInformation Security__ImpersonateSelf Security__IsValidSid Security__LookupAccountName Security__LookupAccountSid Security__LookupPrivilegeValue Security__OpenProcessToken Security__OpenThreadToken Security__OpenThreadTokenEx Security__SetPrivilege Security__SetTokenInformation Security__SidToStringSid Security__SidTypeStr Security__StringSidToSid SendMessage SendMessageA SetDate SetTime Singleton SoundClose SoundLength SoundOpen SoundPause SoundPlay SoundPos SoundResume SoundSeek SoundStatus SoundStop SQLite_Changes SQLite_Close SQLite_Display2DResult SQLite_Encode SQLite_ErrCode SQLite_ErrMsg SQLite_Escape SQLite_Exec SQLite_FastEncode SQLite_FastEscape SQLite_FetchData SQLite_FetchNames SQLite_GetTable SQLite_GetTable2d SQLite_LastInsertRowID SQLite_LibVersion SQLite_Open SQLite_Query SQLite_QueryFinalize SQLite_QueryReset SQLite_QuerySingleRow SQLite_SafeMode SQLite_SetTimeout SQLite_Shutdown SQLite_SQLiteExe SQLite_Startup SQLite_TotalChanges StringBetween StringExplode StringInsert StringProper StringRepeat StringTitleCase StringToHex TCPIpToName TempFile TicksToTime Timer_Diff Timer_GetIdleTime Timer_GetTimerID Timer_Init Timer_KillAllTimers Timer_KillTimer Timer_SetTimer TimeToTicks VersionCompare viClose viExecCommand viFindGpib viGpibBusReset viGTL viInteractiveControl viOpen viSetAttribute viSetTimeout WeekNumberISO WinAPI_AbortPath WinAPI_ActivateKeyboardLayout WinAPI_AddClipboardFormatListener WinAPI_AddFontMemResourceEx WinAPI_AddFontResourceEx WinAPI_AddIconOverlay WinAPI_AddIconTransparency WinAPI_AddMRUString WinAPI_AdjustBitmap WinAPI_AdjustTokenPrivileges WinAPI_AdjustWindowRectEx WinAPI_AlphaBlend WinAPI_AngleArc WinAPI_AnimateWindow WinAPI_Arc WinAPI_ArcTo WinAPI_ArrayToStruct WinAPI_AssignProcessToJobObject WinAPI_AssocGetPerceivedType WinAPI_AssocQueryString WinAPI_AttachConsole WinAPI_AttachThreadInput WinAPI_BackupRead WinAPI_BackupReadAbort WinAPI_BackupSeek WinAPI_BackupWrite WinAPI_BackupWriteAbort WinAPI_Beep WinAPI_BeginBufferedPaint WinAPI_BeginDeferWindowPos WinAPI_BeginPaint WinAPI_BeginPath WinAPI_BeginUpdateResource WinAPI_BitBlt WinAPI_BringWindowToTop WinAPI_BroadcastSystemMessage WinAPI_BrowseForFolderDlg WinAPI_BufferedPaintClear WinAPI_BufferedPaintInit WinAPI_BufferedPaintSetAlpha WinAPI_BufferedPaintUnInit WinAPI_CallNextHookEx WinAPI_CallWindowProc WinAPI_CallWindowProcW WinAPI_CascadeWindows WinAPI_ChangeWindowMessageFilterEx WinAPI_CharToOem WinAPI_ChildWindowFromPointEx WinAPI_ClientToScreen WinAPI_ClipCursor WinAPI_CloseDesktop WinAPI_CloseEnhMetaFile WinAPI_CloseFigure WinAPI_CloseHandle WinAPI_CloseThemeData WinAPI_CloseWindow WinAPI_CloseWindowStation WinAPI_CLSIDFromProgID WinAPI_CoInitialize WinAPI_ColorAdjustLuma WinAPI_ColorHLSToRGB WinAPI_ColorRGBToHLS WinAPI_CombineRgn WinAPI_CombineTransform WinAPI_CommandLineToArgv WinAPI_CommDlgExtendedError WinAPI_CommDlgExtendedErrorEx WinAPI_CompareString WinAPI_CompressBitmapBits WinAPI_CompressBuffer WinAPI_ComputeCrc32 WinAPI_ConfirmCredentials WinAPI_CopyBitmap WinAPI_CopyCursor WinAPI_CopyEnhMetaFile WinAPI_CopyFileEx WinAPI_CopyIcon WinAPI_CopyImage WinAPI_CopyRect WinAPI_CopyStruct WinAPI_CoTaskMemAlloc WinAPI_CoTaskMemFree WinAPI_CoTaskMemRealloc WinAPI_CoUninitialize WinAPI_Create32BitHBITMAP WinAPI_Create32BitHICON WinAPI_CreateANDBitmap WinAPI_CreateBitmap WinAPI_CreateBitmapIndirect WinAPI_CreateBrushIndirect WinAPI_CreateBuffer WinAPI_CreateBufferFromStruct WinAPI_CreateCaret WinAPI_CreateColorAdjustment WinAPI_CreateCompatibleBitmap WinAPI_CreateCompatibleBitmapEx WinAPI_CreateCompatibleDC WinAPI_CreateDesktop WinAPI_CreateDIB WinAPI_CreateDIBColorTable WinAPI_CreateDIBitmap WinAPI_CreateDIBSection WinAPI_CreateDirectory WinAPI_CreateDirectoryEx WinAPI_CreateEllipticRgn WinAPI_CreateEmptyIcon WinAPI_CreateEnhMetaFile WinAPI_CreateEvent WinAPI_CreateFile WinAPI_CreateFileEx WinAPI_CreateFileMapping WinAPI_CreateFont WinAPI_CreateFontEx WinAPI_CreateFontIndirect WinAPI_CreateGUID WinAPI_CreateHardLink WinAPI_CreateIcon WinAPI_CreateIconFromResourceEx WinAPI_CreateIconIndirect WinAPI_CreateJobObject WinAPI_CreateMargins WinAPI_CreateMRUList WinAPI_CreateMutex WinAPI_CreateNullRgn WinAPI_CreateNumberFormatInfo WinAPI_CreateObjectID WinAPI_CreatePen WinAPI_CreatePoint WinAPI_CreatePolygonRgn WinAPI_CreateProcess WinAPI_CreateProcessWithToken WinAPI_CreateRect WinAPI_CreateRectEx WinAPI_CreateRectRgn WinAPI_CreateRectRgnIndirect WinAPI_CreateRoundRectRgn WinAPI_CreateSemaphore WinAPI_CreateSize WinAPI_CreateSolidBitmap WinAPI_CreateSolidBrush WinAPI_CreateStreamOnHGlobal WinAPI_CreateString WinAPI_CreateSymbolicLink WinAPI_CreateTransform WinAPI_CreateWindowEx WinAPI_CreateWindowStation WinAPI_DecompressBuffer WinAPI_DecryptFile WinAPI_DeferWindowPos WinAPI_DefineDosDevice WinAPI_DefRawInputProc WinAPI_DefSubclassProc WinAPI_DefWindowProc WinAPI_DefWindowProcW WinAPI_DeleteDC WinAPI_DeleteEnhMetaFile WinAPI_DeleteFile WinAPI_DeleteObject WinAPI_DeleteObjectID WinAPI_DeleteVolumeMountPoint WinAPI_DeregisterShellHookWindow WinAPI_DestroyCaret WinAPI_DestroyCursor WinAPI_DestroyIcon WinAPI_DestroyWindow WinAPI_DeviceIoControl WinAPI_DisplayStruct WinAPI_DllGetVersion WinAPI_DllInstall WinAPI_DllUninstall WinAPI_DPtoLP WinAPI_DragAcceptFiles WinAPI_DragFinish WinAPI_DragQueryFileEx WinAPI_DragQueryPoint WinAPI_DrawAnimatedRects WinAPI_DrawBitmap WinAPI_DrawEdge WinAPI_DrawFocusRect WinAPI_DrawFrameControl WinAPI_DrawIcon WinAPI_DrawIconEx WinAPI_DrawLine WinAPI_DrawShadowText WinAPI_DrawText WinAPI_DrawThemeBackground WinAPI_DrawThemeEdge WinAPI_DrawThemeIcon WinAPI_DrawThemeParentBackground WinAPI_DrawThemeText WinAPI_DrawThemeTextEx WinAPI_DuplicateEncryptionInfoFile WinAPI_DuplicateHandle WinAPI_DuplicateTokenEx WinAPI_DwmDefWindowProc WinAPI_DwmEnableBlurBehindWindow WinAPI_DwmEnableComposition WinAPI_DwmExtendFrameIntoClientArea WinAPI_DwmGetColorizationColor WinAPI_DwmGetColorizationParameters WinAPI_DwmGetWindowAttribute WinAPI_DwmInvalidateIconicBitmaps WinAPI_DwmIsCompositionEnabled WinAPI_DwmQueryThumbnailSourceSize WinAPI_DwmRegisterThumbnail WinAPI_DwmSetColorizationParameters WinAPI_DwmSetIconicLivePreviewBitmap WinAPI_DwmSetIconicThumbnail WinAPI_DwmSetWindowAttribute WinAPI_DwmUnregisterThumbnail WinAPI_DwmUpdateThumbnailProperties WinAPI_DWordToFloat WinAPI_DWordToInt WinAPI_EjectMedia WinAPI_Ellipse WinAPI_EmptyWorkingSet WinAPI_EnableWindow WinAPI_EncryptFile WinAPI_EncryptionDisable WinAPI_EndBufferedPaint WinAPI_EndDeferWindowPos WinAPI_EndPaint WinAPI_EndPath WinAPI_EndUpdateResource WinAPI_EnumChildProcess WinAPI_EnumChildWindows WinAPI_EnumDesktops WinAPI_EnumDesktopWindows WinAPI_EnumDeviceDrivers WinAPI_EnumDisplayDevices WinAPI_EnumDisplayMonitors WinAPI_EnumDisplaySettings WinAPI_EnumDllProc WinAPI_EnumFiles WinAPI_EnumFileStreams WinAPI_EnumFontFamilies WinAPI_EnumHardLinks WinAPI_EnumMRUList WinAPI_EnumPageFiles WinAPI_EnumProcessHandles WinAPI_EnumProcessModules WinAPI_EnumProcessThreads WinAPI_EnumProcessWindows WinAPI_EnumRawInputDevices WinAPI_EnumResourceLanguages WinAPI_EnumResourceNames WinAPI_EnumResourceTypes WinAPI_EnumSystemGeoID WinAPI_EnumSystemLocales WinAPI_EnumUILanguages WinAPI_EnumWindows WinAPI_EnumWindowsPopup WinAPI_EnumWindowStations WinAPI_EnumWindowsTop WinAPI_EqualMemory WinAPI_EqualRect WinAPI_EqualRgn WinAPI_ExcludeClipRect WinAPI_ExpandEnvironmentStrings WinAPI_ExtCreatePen WinAPI_ExtCreateRegion WinAPI_ExtFloodFill WinAPI_ExtractIcon WinAPI_ExtractIconEx WinAPI_ExtSelectClipRgn WinAPI_FatalAppExit WinAPI_FatalExit WinAPI_FileEncryptionStatus WinAPI_FileExists WinAPI_FileIconInit WinAPI_FileInUse WinAPI_FillMemory WinAPI_FillPath WinAPI_FillRect WinAPI_FillRgn WinAPI_FindClose WinAPI_FindCloseChangeNotification WinAPI_FindExecutable WinAPI_FindFirstChangeNotification WinAPI_FindFirstFile WinAPI_FindFirstFileName WinAPI_FindFirstStream WinAPI_FindNextChangeNotification WinAPI_FindNextFile WinAPI_FindNextFileName WinAPI_FindNextStream WinAPI_FindResource WinAPI_FindResourceEx WinAPI_FindTextDlg WinAPI_FindWindow WinAPI_FlashWindow WinAPI_FlashWindowEx WinAPI_FlattenPath WinAPI_FloatToDWord WinAPI_FloatToInt WinAPI_FlushFileBuffers WinAPI_FlushFRBuffer WinAPI_FlushViewOfFile WinAPI_FormatDriveDlg WinAPI_FormatMessage WinAPI_FrameRect WinAPI_FrameRgn WinAPI_FreeLibrary WinAPI_FreeMemory WinAPI_FreeMRUList WinAPI_FreeResource WinAPI_GdiComment WinAPI_GetActiveWindow WinAPI_GetAllUsersProfileDirectory WinAPI_GetAncestor WinAPI_GetApplicationRestartSettings WinAPI_GetArcDirection WinAPI_GetAsyncKeyState WinAPI_GetBinaryType WinAPI_GetBitmapBits WinAPI_GetBitmapDimension WinAPI_GetBitmapDimensionEx WinAPI_GetBkColor WinAPI_GetBkMode WinAPI_GetBoundsRect WinAPI_GetBrushOrg WinAPI_GetBufferedPaintBits WinAPI_GetBufferedPaintDC WinAPI_GetBufferedPaintTargetDC WinAPI_GetBufferedPaintTargetRect WinAPI_GetBValue WinAPI_GetCaretBlinkTime WinAPI_GetCaretPos WinAPI_GetCDType WinAPI_GetClassInfoEx WinAPI_GetClassLongEx WinAPI_GetClassName WinAPI_GetClientHeight WinAPI_GetClientRect WinAPI_GetClientWidth WinAPI_GetClipboardSequenceNumber WinAPI_GetClipBox WinAPI_GetClipCursor WinAPI_GetClipRgn WinAPI_GetColorAdjustment WinAPI_GetCompressedFileSize WinAPI_GetCompression WinAPI_GetConnectedDlg WinAPI_GetCurrentDirectory WinAPI_GetCurrentHwProfile WinAPI_GetCurrentObject WinAPI_GetCurrentPosition WinAPI_GetCurrentProcess WinAPI_GetCurrentProcessExplicitAppUserModelID WinAPI_GetCurrentProcessID WinAPI_GetCurrentThemeName WinAPI_GetCurrentThread WinAPI_GetCurrentThreadId WinAPI_GetCursor WinAPI_GetCursorInfo WinAPI_GetDateFormat WinAPI_GetDC WinAPI_GetDCEx WinAPI_GetDefaultPrinter WinAPI_GetDefaultUserProfileDirectory WinAPI_GetDesktopWindow WinAPI_GetDeviceCaps WinAPI_GetDeviceDriverBaseName WinAPI_GetDeviceDriverFileName WinAPI_GetDeviceGammaRamp WinAPI_GetDIBColorTable WinAPI_GetDIBits WinAPI_GetDiskFreeSpaceEx WinAPI_GetDlgCtrlID WinAPI_GetDlgItem WinAPI_GetDllDirectory WinAPI_GetDriveBusType WinAPI_GetDriveGeometryEx WinAPI_GetDriveNumber WinAPI_GetDriveType WinAPI_GetDurationFormat WinAPI_GetEffectiveClientRect WinAPI_GetEnhMetaFile WinAPI_GetEnhMetaFileBits WinAPI_GetEnhMetaFileDescription WinAPI_GetEnhMetaFileDimension WinAPI_GetEnhMetaFileHeader WinAPI_GetErrorMessage WinAPI_GetErrorMode WinAPI_GetExitCodeProcess WinAPI_GetExtended WinAPI_GetFileAttributes WinAPI_GetFileID WinAPI_GetFileInformationByHandle WinAPI_GetFileInformationByHandleEx WinAPI_GetFilePointerEx WinAPI_GetFileSizeEx WinAPI_GetFileSizeOnDisk WinAPI_GetFileTitle WinAPI_GetFileType WinAPI_GetFileVersionInfo WinAPI_GetFinalPathNameByHandle WinAPI_GetFinalPathNameByHandleEx WinAPI_GetFocus WinAPI_GetFontMemoryResourceInfo WinAPI_GetFontName WinAPI_GetFontResourceInfo WinAPI_GetForegroundWindow WinAPI_GetFRBuffer WinAPI_GetFullPathName WinAPI_GetGeoInfo WinAPI_GetGlyphOutline WinAPI_GetGraphicsMode WinAPI_GetGuiResources WinAPI_GetGUIThreadInfo WinAPI_GetGValue WinAPI_GetHandleInformation WinAPI_GetHGlobalFromStream WinAPI_GetIconDimension WinAPI_GetIconInfo WinAPI_GetIconInfoEx WinAPI_GetIdleTime WinAPI_GetKeyboardLayout WinAPI_GetKeyboardLayoutList WinAPI_GetKeyboardState WinAPI_GetKeyboardType WinAPI_GetKeyNameText WinAPI_GetKeyState WinAPI_GetLastActivePopup WinAPI_GetLastError WinAPI_GetLastErrorMessage WinAPI_GetLayeredWindowAttributes WinAPI_GetLocaleInfo WinAPI_GetLogicalDrives WinAPI_GetMapMode WinAPI_GetMemorySize WinAPI_GetMessageExtraInfo WinAPI_GetModuleFileNameEx WinAPI_GetModuleHandle WinAPI_GetModuleHandleEx WinAPI_GetModuleInformation WinAPI_GetMonitorInfo WinAPI_GetMousePos WinAPI_GetMousePosX WinAPI_GetMousePosY WinAPI_GetMUILanguage WinAPI_GetNumberFormat WinAPI_GetObject WinAPI_GetObjectID WinAPI_GetObjectInfoByHandle WinAPI_GetObjectNameByHandle WinAPI_GetObjectType WinAPI_GetOpenFileName WinAPI_GetOutlineTextMetrics WinAPI_GetOverlappedResult WinAPI_GetParent WinAPI_GetParentProcess WinAPI_GetPerformanceInfo WinAPI_GetPEType WinAPI_GetPhysicallyInstalledSystemMemory WinAPI_GetPixel WinAPI_GetPolyFillMode WinAPI_GetPosFromRect WinAPI_GetPriorityClass WinAPI_GetProcAddress WinAPI_GetProcessAffinityMask WinAPI_GetProcessCommandLine WinAPI_GetProcessFileName WinAPI_GetProcessHandleCount WinAPI_GetProcessID WinAPI_GetProcessIoCounters WinAPI_GetProcessMemoryInfo WinAPI_GetProcessName WinAPI_GetProcessShutdownParameters WinAPI_GetProcessTimes WinAPI_GetProcessUser WinAPI_GetProcessWindowStation WinAPI_GetProcessWorkingDirectory WinAPI_GetProfilesDirectory WinAPI_GetPwrCapabilities WinAPI_GetRawInputBuffer WinAPI_GetRawInputBufferLength WinAPI_GetRawInputData WinAPI_GetRawInputDeviceInfo WinAPI_GetRegionData WinAPI_GetRegisteredRawInputDevices WinAPI_GetRegKeyNameByHandle WinAPI_GetRgnBox WinAPI_GetROP2 WinAPI_GetRValue WinAPI_GetSaveFileName WinAPI_GetShellWindow WinAPI_GetStartupInfo WinAPI_GetStdHandle WinAPI_GetStockObject WinAPI_GetStretchBltMode WinAPI_GetString WinAPI_GetSysColor WinAPI_GetSysColorBrush WinAPI_GetSystemDefaultLangID WinAPI_GetSystemDefaultLCID WinAPI_GetSystemDefaultUILanguage WinAPI_GetSystemDEPPolicy WinAPI_GetSystemInfo WinAPI_GetSystemMetrics WinAPI_GetSystemPowerStatus WinAPI_GetSystemTimes WinAPI_GetSystemWow64Directory WinAPI_GetTabbedTextExtent WinAPI_GetTempFileName WinAPI_GetTextAlign WinAPI_GetTextCharacterExtra WinAPI_GetTextColor WinAPI_GetTextExtentPoint32 WinAPI_GetTextFace WinAPI_GetTextMetrics WinAPI_GetThemeAppProperties WinAPI_GetThemeBackgroundContentRect WinAPI_GetThemeBackgroundExtent WinAPI_GetThemeBackgroundRegion WinAPI_GetThemeBitmap WinAPI_GetThemeBool WinAPI_GetThemeColor WinAPI_GetThemeDocumentationProperty WinAPI_GetThemeEnumValue WinAPI_GetThemeFilename WinAPI_GetThemeFont WinAPI_GetThemeInt WinAPI_GetThemeMargins WinAPI_GetThemeMetric WinAPI_GetThemePartSize WinAPI_GetThemePosition WinAPI_GetThemePropertyOrigin WinAPI_GetThemeRect WinAPI_GetThemeString WinAPI_GetThemeSysBool WinAPI_GetThemeSysColor WinAPI_GetThemeSysColorBrush WinAPI_GetThemeSysFont WinAPI_GetThemeSysInt WinAPI_GetThemeSysSize WinAPI_GetThemeSysString WinAPI_GetThemeTextExtent WinAPI_GetThemeTextMetrics WinAPI_GetThemeTransitionDuration WinAPI_GetThreadDesktop WinAPI_GetThreadErrorMode WinAPI_GetThreadLocale WinAPI_GetThreadUILanguage WinAPI_GetTickCount WinAPI_GetTickCount64 WinAPI_GetTimeFormat WinAPI_GetTopWindow WinAPI_GetUDFColorMode WinAPI_GetUpdateRect WinAPI_GetUpdateRgn WinAPI_GetUserDefaultLangID WinAPI_GetUserDefaultLCID WinAPI_GetUserDefaultUILanguage WinAPI_GetUserGeoID WinAPI_GetUserObjectInformation WinAPI_GetVersion WinAPI_GetVersionEx WinAPI_GetVolumeInformation WinAPI_GetVolumeInformationByHandle WinAPI_GetVolumeNameForVolumeMountPoint WinAPI_GetWindow WinAPI_GetWindowDC WinAPI_GetWindowDisplayAffinity WinAPI_GetWindowExt WinAPI_GetWindowFileName WinAPI_GetWindowHeight WinAPI_GetWindowInfo WinAPI_GetWindowLong WinAPI_GetWindowOrg WinAPI_GetWindowPlacement WinAPI_GetWindowRect WinAPI_GetWindowRgn WinAPI_GetWindowRgnBox WinAPI_GetWindowSubclass WinAPI_GetWindowText WinAPI_GetWindowTheme WinAPI_GetWindowThreadProcessId WinAPI_GetWindowWidth WinAPI_GetWorkArea WinAPI_GetWorldTransform WinAPI_GetXYFromPoint WinAPI_GlobalMemoryStatus WinAPI_GradientFill WinAPI_GUIDFromString WinAPI_GUIDFromStringEx WinAPI_HashData WinAPI_HashString WinAPI_HiByte WinAPI_HideCaret WinAPI_HiDWord WinAPI_HiWord WinAPI_InflateRect WinAPI_InitMUILanguage WinAPI_InProcess WinAPI_IntersectClipRect WinAPI_IntersectRect WinAPI_IntToDWord WinAPI_IntToFloat WinAPI_InvalidateRect WinAPI_InvalidateRgn WinAPI_InvertANDBitmap WinAPI_InvertColor WinAPI_InvertRect WinAPI_InvertRgn WinAPI_IOCTL WinAPI_IsAlphaBitmap WinAPI_IsBadCodePtr WinAPI_IsBadReadPtr WinAPI_IsBadStringPtr WinAPI_IsBadWritePtr WinAPI_IsChild WinAPI_IsClassName WinAPI_IsDoorOpen WinAPI_IsElevated WinAPI_IsHungAppWindow WinAPI_IsIconic WinAPI_IsInternetConnected WinAPI_IsLoadKBLayout WinAPI_IsMemory WinAPI_IsNameInExpression WinAPI_IsNetworkAlive WinAPI_IsPathShared WinAPI_IsProcessInJob WinAPI_IsProcessorFeaturePresent WinAPI_IsRectEmpty WinAPI_IsThemeActive WinAPI_IsThemeBackgroundPartiallyTransparent WinAPI_IsThemePartDefined WinAPI_IsValidLocale WinAPI_IsWindow WinAPI_IsWindowEnabled WinAPI_IsWindowUnicode WinAPI_IsWindowVisible WinAPI_IsWow64Process WinAPI_IsWritable WinAPI_IsZoomed WinAPI_Keybd_Event WinAPI_KillTimer WinAPI_LineDDA WinAPI_LineTo WinAPI_LoadBitmap WinAPI_LoadCursor WinAPI_LoadCursorFromFile WinAPI_LoadIcon WinAPI_LoadIconMetric WinAPI_LoadIconWithScaleDown WinAPI_LoadImage WinAPI_LoadIndirectString WinAPI_LoadKeyboardLayout WinAPI_LoadLibrary WinAPI_LoadLibraryEx WinAPI_LoadMedia WinAPI_LoadResource WinAPI_LoadShell32Icon WinAPI_LoadString WinAPI_LoadStringEx WinAPI_LoByte WinAPI_LocalFree WinAPI_LockDevice WinAPI_LockFile WinAPI_LockResource WinAPI_LockWindowUpdate WinAPI_LockWorkStation WinAPI_LoDWord WinAPI_LongMid WinAPI_LookupIconIdFromDirectoryEx WinAPI_LoWord WinAPI_LPtoDP WinAPI_MAKELANGID WinAPI_MAKELCID WinAPI_MakeLong WinAPI_MakeQWord WinAPI_MakeWord WinAPI_MapViewOfFile WinAPI_MapVirtualKey WinAPI_MaskBlt WinAPI_MessageBeep WinAPI_MessageBoxCheck WinAPI_MessageBoxIndirect WinAPI_MirrorIcon WinAPI_ModifyWorldTransform WinAPI_MonitorFromPoint WinAPI_MonitorFromRect WinAPI_MonitorFromWindow WinAPI_Mouse_Event WinAPI_MoveFileEx WinAPI_MoveMemory WinAPI_MoveTo WinAPI_MoveToEx WinAPI_MoveWindow WinAPI_MsgBox WinAPI_MulDiv WinAPI_MultiByteToWideChar WinAPI_MultiByteToWideCharEx WinAPI_NtStatusToDosError WinAPI_OemToChar WinAPI_OffsetClipRgn WinAPI_OffsetPoints WinAPI_OffsetRect WinAPI_OffsetRgn WinAPI_OffsetWindowOrg WinAPI_OpenDesktop WinAPI_OpenFileById WinAPI_OpenFileDlg WinAPI_OpenFileMapping WinAPI_OpenIcon WinAPI_OpenInputDesktop WinAPI_OpenJobObject WinAPI_OpenMutex WinAPI_OpenProcess WinAPI_OpenProcessToken WinAPI_OpenSemaphore WinAPI_OpenThemeData WinAPI_OpenWindowStation WinAPI_PageSetupDlg WinAPI_PaintDesktop WinAPI_PaintRgn WinAPI_ParseURL WinAPI_ParseUserName WinAPI_PatBlt WinAPI_PathAddBackslash WinAPI_PathAddExtension WinAPI_PathAppend WinAPI_PathBuildRoot WinAPI_PathCanonicalize WinAPI_PathCommonPrefix WinAPI_PathCompactPath WinAPI_PathCompactPathEx WinAPI_PathCreateFromUrl WinAPI_PathFindExtension WinAPI_PathFindFileName WinAPI_PathFindNextComponent WinAPI_PathFindOnPath WinAPI_PathGetArgs WinAPI_PathGetCharType WinAPI_PathGetDriveNumber WinAPI_PathIsContentType WinAPI_PathIsDirectory WinAPI_PathIsDirectoryEmpty WinAPI_PathIsExe WinAPI_PathIsFileSpec WinAPI_PathIsLFNFileSpec WinAPI_PathIsRelative WinAPI_PathIsRoot WinAPI_PathIsSameRoot WinAPI_PathIsSystemFolder WinAPI_PathIsUNC WinAPI_PathIsUNCServer WinAPI_PathIsUNCServerShare WinAPI_PathMakeSystemFolder WinAPI_PathMatchSpec WinAPI_PathParseIconLocation WinAPI_PathRelativePathTo WinAPI_PathRemoveArgs WinAPI_PathRemoveBackslash WinAPI_PathRemoveExtension WinAPI_PathRemoveFileSpec WinAPI_PathRenameExtension WinAPI_PathSearchAndQualify WinAPI_PathSkipRoot WinAPI_PathStripPath WinAPI_PathStripToRoot WinAPI_PathToRegion WinAPI_PathUndecorate WinAPI_PathUnExpandEnvStrings WinAPI_PathUnmakeSystemFolder WinAPI_PathUnquoteSpaces WinAPI_PathYetAnotherMakeUniqueName WinAPI_PickIconDlg WinAPI_PlayEnhMetaFile WinAPI_PlaySound WinAPI_PlgBlt WinAPI_PointFromRect WinAPI_PolyBezier WinAPI_PolyBezierTo WinAPI_PolyDraw WinAPI_Polygon WinAPI_PostMessage WinAPI_PrimaryLangId WinAPI_PrintDlg WinAPI_PrintDlgEx WinAPI_PrintWindow WinAPI_ProgIDFromCLSID WinAPI_PtInRect WinAPI_PtInRectEx WinAPI_PtInRegion WinAPI_PtVisible WinAPI_QueryDosDevice WinAPI_QueryInformationJobObject WinAPI_QueryPerformanceCounter WinAPI_QueryPerformanceFrequency WinAPI_RadialGradientFill WinAPI_ReadDirectoryChanges WinAPI_ReadFile WinAPI_ReadProcessMemory WinAPI_Rectangle WinAPI_RectInRegion WinAPI_RectIsEmpty WinAPI_RectVisible WinAPI_RedrawWindow WinAPI_RegCloseKey WinAPI_RegConnectRegistry WinAPI_RegCopyTree WinAPI_RegCopyTreeEx WinAPI_RegCreateKey WinAPI_RegDeleteEmptyKey WinAPI_RegDeleteKey WinAPI_RegDeleteKeyValue WinAPI_RegDeleteTree WinAPI_RegDeleteTreeEx WinAPI_RegDeleteValue WinAPI_RegDisableReflectionKey WinAPI_RegDuplicateHKey WinAPI_RegEnableReflectionKey WinAPI_RegEnumKey WinAPI_RegEnumValue WinAPI_RegFlushKey WinAPI_RegisterApplicationRestart WinAPI_RegisterClass WinAPI_RegisterClassEx WinAPI_RegisterHotKey WinAPI_RegisterPowerSettingNotification WinAPI_RegisterRawInputDevices WinAPI_RegisterShellHookWindow WinAPI_RegisterWindowMessage WinAPI_RegLoadMUIString WinAPI_RegNotifyChangeKeyValue WinAPI_RegOpenKey WinAPI_RegQueryInfoKey WinAPI_RegQueryLastWriteTime WinAPI_RegQueryMultipleValues WinAPI_RegQueryReflectionKey WinAPI_RegQueryValue WinAPI_RegRestoreKey WinAPI_RegSaveKey WinAPI_RegSetValue WinAPI_ReleaseCapture WinAPI_ReleaseDC WinAPI_ReleaseMutex WinAPI_ReleaseSemaphore WinAPI_ReleaseStream WinAPI_RemoveClipboardFormatListener WinAPI_RemoveDirectory WinAPI_RemoveFontMemResourceEx WinAPI_RemoveFontResourceEx WinAPI_RemoveWindowSubclass WinAPI_ReOpenFile WinAPI_ReplaceFile WinAPI_ReplaceTextDlg WinAPI_ResetEvent WinAPI_RestartDlg WinAPI_RestoreDC WinAPI_RGB WinAPI_RotatePoints WinAPI_RoundRect WinAPI_SaveDC WinAPI_SaveFileDlg WinAPI_SaveHBITMAPToFile WinAPI_SaveHICONToFile WinAPI_ScaleWindowExt WinAPI_ScreenToClient WinAPI_SearchPath WinAPI_SelectClipPath WinAPI_SelectClipRgn WinAPI_SelectObject WinAPI_SendMessageTimeout WinAPI_SetActiveWindow WinAPI_SetArcDirection WinAPI_SetBitmapBits WinAPI_SetBitmapDimensionEx WinAPI_SetBkColor WinAPI_SetBkMode WinAPI_SetBoundsRect WinAPI_SetBrushOrg WinAPI_SetCapture WinAPI_SetCaretBlinkTime WinAPI_SetCaretPos WinAPI_SetClassLongEx WinAPI_SetColorAdjustment WinAPI_SetCompression WinAPI_SetCurrentDirectory WinAPI_SetCurrentProcessExplicitAppUserModelID WinAPI_SetCursor WinAPI_SetDCBrushColor WinAPI_SetDCPenColor WinAPI_SetDefaultPrinter WinAPI_SetDeviceGammaRamp WinAPI_SetDIBColorTable WinAPI_SetDIBits WinAPI_SetDIBitsToDevice WinAPI_SetDllDirectory WinAPI_SetEndOfFile WinAPI_SetEnhMetaFileBits WinAPI_SetErrorMode WinAPI_SetEvent WinAPI_SetFileAttributes WinAPI_SetFileInformationByHandleEx WinAPI_SetFilePointer WinAPI_SetFilePointerEx WinAPI_SetFileShortName WinAPI_SetFileValidData WinAPI_SetFocus WinAPI_SetFont WinAPI_SetForegroundWindow WinAPI_SetFRBuffer WinAPI_SetGraphicsMode WinAPI_SetHandleInformation WinAPI_SetInformationJobObject WinAPI_SetKeyboardLayout WinAPI_SetKeyboardState WinAPI_SetLastError WinAPI_SetLayeredWindowAttributes WinAPI_SetLocaleInfo WinAPI_SetMapMode WinAPI_SetMessageExtraInfo WinAPI_SetParent WinAPI_SetPixel WinAPI_SetPolyFillMode WinAPI_SetPriorityClass WinAPI_SetProcessAffinityMask WinAPI_SetProcessShutdownParameters WinAPI_SetProcessWindowStation WinAPI_SetRectRgn WinAPI_SetROP2 WinAPI_SetSearchPathMode WinAPI_SetStretchBltMode WinAPI_SetSysColors WinAPI_SetSystemCursor WinAPI_SetTextAlign WinAPI_SetTextCharacterExtra WinAPI_SetTextColor WinAPI_SetTextJustification WinAPI_SetThemeAppProperties WinAPI_SetThreadDesktop WinAPI_SetThreadErrorMode WinAPI_SetThreadExecutionState WinAPI_SetThreadLocale WinAPI_SetThreadUILanguage WinAPI_SetTimer WinAPI_SetUDFColorMode WinAPI_SetUserGeoID WinAPI_SetUserObjectInformation WinAPI_SetVolumeMountPoint WinAPI_SetWindowDisplayAffinity WinAPI_SetWindowExt WinAPI_SetWindowLong WinAPI_SetWindowOrg WinAPI_SetWindowPlacement WinAPI_SetWindowPos WinAPI_SetWindowRgn WinAPI_SetWindowsHookEx WinAPI_SetWindowSubclass WinAPI_SetWindowText WinAPI_SetWindowTheme WinAPI_SetWinEventHook WinAPI_SetWorldTransform WinAPI_SfcIsFileProtected WinAPI_SfcIsKeyProtected WinAPI_ShellAboutDlg WinAPI_ShellAddToRecentDocs WinAPI_ShellChangeNotify WinAPI_ShellChangeNotifyDeregister WinAPI_ShellChangeNotifyRegister WinAPI_ShellCreateDirectory WinAPI_ShellEmptyRecycleBin WinAPI_ShellExecute WinAPI_ShellExecuteEx WinAPI_ShellExtractAssociatedIcon WinAPI_ShellExtractIcon WinAPI_ShellFileOperation WinAPI_ShellFlushSFCache WinAPI_ShellGetFileInfo WinAPI_ShellGetIconOverlayIndex WinAPI_ShellGetImageList WinAPI_ShellGetKnownFolderIDList WinAPI_ShellGetKnownFolderPath WinAPI_ShellGetLocalizedName WinAPI_ShellGetPathFromIDList WinAPI_ShellGetSetFolderCustomSettings WinAPI_ShellGetSettings WinAPI_ShellGetSpecialFolderLocation WinAPI_ShellGetSpecialFolderPath WinAPI_ShellGetStockIconInfo WinAPI_ShellILCreateFromPath WinAPI_ShellNotifyIcon WinAPI_ShellNotifyIconGetRect WinAPI_ShellObjectProperties WinAPI_ShellOpenFolderAndSelectItems WinAPI_ShellOpenWithDlg WinAPI_ShellQueryRecycleBin WinAPI_ShellQueryUserNotificationState WinAPI_ShellRemoveLocalizedName WinAPI_ShellRestricted WinAPI_ShellSetKnownFolderPath WinAPI_ShellSetLocalizedName WinAPI_ShellSetSettings WinAPI_ShellStartNetConnectionDlg WinAPI_ShellUpdateImage WinAPI_ShellUserAuthenticationDlg WinAPI_ShellUserAuthenticationDlgEx WinAPI_ShortToWord WinAPI_ShowCaret WinAPI_ShowCursor WinAPI_ShowError WinAPI_ShowLastError WinAPI_ShowMsg WinAPI_ShowOwnedPopups WinAPI_ShowWindow WinAPI_ShutdownBlockReasonCreate WinAPI_ShutdownBlockReasonDestroy WinAPI_ShutdownBlockReasonQuery WinAPI_SizeOfResource WinAPI_StretchBlt WinAPI_StretchDIBits WinAPI_StrFormatByteSize WinAPI_StrFormatByteSizeEx WinAPI_StrFormatKBSize WinAPI_StrFromTimeInterval WinAPI_StringFromGUID WinAPI_StringLenA WinAPI_StringLenW WinAPI_StrLen WinAPI_StrokeAndFillPath WinAPI_StrokePath WinAPI_StructToArray WinAPI_SubLangId WinAPI_SubtractRect WinAPI_SwapDWord WinAPI_SwapQWord WinAPI_SwapWord WinAPI_SwitchColor WinAPI_SwitchDesktop WinAPI_SwitchToThisWindow WinAPI_SystemParametersInfo WinAPI_TabbedTextOut WinAPI_TerminateJobObject WinAPI_TerminateProcess WinAPI_TextOut WinAPI_TileWindows WinAPI_TrackMouseEvent WinAPI_TransparentBlt WinAPI_TwipsPerPixelX WinAPI_TwipsPerPixelY WinAPI_UnhookWindowsHookEx WinAPI_UnhookWinEvent WinAPI_UnionRect WinAPI_UnionStruct WinAPI_UniqueHardwareID WinAPI_UnloadKeyboardLayout WinAPI_UnlockFile WinAPI_UnmapViewOfFile WinAPI_UnregisterApplicationRestart WinAPI_UnregisterClass WinAPI_UnregisterHotKey WinAPI_UnregisterPowerSettingNotification WinAPI_UpdateLayeredWindow WinAPI_UpdateLayeredWindowEx WinAPI_UpdateLayeredWindowIndirect WinAPI_UpdateResource WinAPI_UpdateWindow WinAPI_UrlApplyScheme WinAPI_UrlCanonicalize WinAPI_UrlCombine WinAPI_UrlCompare WinAPI_UrlCreateFromPath WinAPI_UrlFixup WinAPI_UrlGetPart WinAPI_UrlHash WinAPI_UrlIs WinAPI_UserHandleGrantAccess WinAPI_ValidateRect WinAPI_ValidateRgn WinAPI_VerQueryRoot WinAPI_VerQueryValue WinAPI_VerQueryValueEx WinAPI_WaitForInputIdle WinAPI_WaitForMultipleObjects WinAPI_WaitForSingleObject WinAPI_WideCharToMultiByte WinAPI_WidenPath WinAPI_WindowFromDC WinAPI_WindowFromPoint WinAPI_WordToShort WinAPI_Wow64EnableWow64FsRedirection WinAPI_WriteConsole WinAPI_WriteFile WinAPI_WriteProcessMemory WinAPI_ZeroMemory WinNet_AddConnection WinNet_AddConnection2 WinNet_AddConnection3 WinNet_CancelConnection WinNet_CancelConnection2 WinNet_CloseEnum WinNet_ConnectionDialog WinNet_ConnectionDialog1 WinNet_DisconnectDialog WinNet_DisconnectDialog1 WinNet_EnumResource WinNet_GetConnection WinNet_GetConnectionPerformance WinNet_GetLastError WinNet_GetNetworkInformation WinNet_GetProviderName WinNet_GetResourceInformation WinNet_GetResourceParent WinNet_GetUniversalName WinNet_GetUser WinNet_OpenEnum WinNet_RestoreConnection WinNet_UseConnection Word_Create Word_DocAdd Word_DocAttach Word_DocClose Word_DocExport Word_DocFind Word_DocFindReplace Word_DocGet Word_DocLinkAdd Word_DocLinkGet Word_DocOpen Word_DocPictureAdd Word_DocPrint Word_DocRangeSet Word_DocSave Word_DocSaveAs Word_DocTableRead Word_DocTableWrite Word_Quit",e={ variants:[a.COMMENT(";","$",{relevance:0}),a.COMMENT("#cs","#ce"),a.COMMENT("#comments-start","#comments-end")]},f={className:"variable",begin:"\\$[A-z0-9_]+"},g={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},h={variants:[a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE]},i={className:"preprocessor",begin:"#",end:"$",keywords:"include include-once NoTrayIcon OnAutoItStartRegister RequireAdmin pragma Au3Stripper_Ignore_Funcs Au3Stripper_Ignore_Variables Au3Stripper_Off Au3Stripper_On Au3Stripper_Parameters AutoIt3Wrapper_Add_Constants AutoIt3Wrapper_Au3Check_Parameters AutoIt3Wrapper_Au3Check_Stop_OnWarning AutoIt3Wrapper_Aut2Exe AutoIt3Wrapper_AutoIt3 AutoIt3Wrapper_AutoIt3Dir AutoIt3Wrapper_Change2CUI AutoIt3Wrapper_Compile_Both AutoIt3Wrapper_Compression AutoIt3Wrapper_EndIf AutoIt3Wrapper_Icon AutoIt3Wrapper_If_Compile AutoIt3Wrapper_If_Run AutoIt3Wrapper_Jump_To_First_Error AutoIt3Wrapper_OutFile AutoIt3Wrapper_OutFile_Type AutoIt3Wrapper_OutFile_X64 AutoIt3Wrapper_PlugIn_Funcs AutoIt3Wrapper_Res_Comment Autoit3Wrapper_Res_Compatibility AutoIt3Wrapper_Res_Description AutoIt3Wrapper_Res_Field AutoIt3Wrapper_Res_File_Add AutoIt3Wrapper_Res_FileVersion AutoIt3Wrapper_Res_FileVersion_AutoIncrement AutoIt3Wrapper_Res_Icon_Add AutoIt3Wrapper_Res_Language AutoIt3Wrapper_Res_LegalCopyright AutoIt3Wrapper_Res_ProductVersion AutoIt3Wrapper_Res_requestedExecutionLevel AutoIt3Wrapper_Res_SaveSource AutoIt3Wrapper_Run_After AutoIt3Wrapper_Run_Au3Check AutoIt3Wrapper_Run_Au3Stripper AutoIt3Wrapper_Run_Before AutoIt3Wrapper_Run_Debug_Mode AutoIt3Wrapper_Run_SciTE_Minimized AutoIt3Wrapper_Run_SciTE_OutputPane_Minimized AutoIt3Wrapper_Run_Tidy AutoIt3Wrapper_ShowProgress AutoIt3Wrapper_Testing AutoIt3Wrapper_Tidy_Stop_OnError AutoIt3Wrapper_UPX_Parameters AutoIt3Wrapper_UseUPX AutoIt3Wrapper_UseX64 AutoIt3Wrapper_Version AutoIt3Wrapper_Versioning AutoIt3Wrapper_Versioning_Parameters Tidy_Off Tidy_On Tidy_Parameters EndRegion Region",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[g,{className:"string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},g,e]},j={className:"constant",begin:"@[A-z0-9_]+"},k={className:"function",beginKeywords:"Func",end:"$",excludeEnd:!0,illegal:"\\$|\\[|%",contains:[a.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[f,g,h]}]};return{case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:b,built_in:d,literal:c},contains:[e,f,g,h,i,j,k]}}),a.registerLanguage("avrasm",function(a){return{case_insensitive:!0,lexemes:"\\.?"+a.IDENT_RE,keywords:{keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",preprocessor:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[a.C_BLOCK_COMMENT_MODE,a.COMMENT(";","$",{relevance:0}),a.C_NUMBER_MODE,a.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},a.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"label",begin:"^[A-Za-z0-9_.$]+:"},{className:"preprocessor",begin:"#",end:"$"},{className:"localvars",begin:"@[0-9]+"}]}}),a.registerLanguage("axapta",function(a){return{keywords:"false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$"},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:":",contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]}]}}),a.registerLanguage("bash",function(a){var b={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},c={className:"string",begin:/"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,b,{className:"variable",begin:/\$\(/,end:/\)/,contains:[a.BACKSLASH_ESCAPE]}]},d={className:"string",begin:/'/,end:/'/};return{aliases:["sh","zsh"],lexemes:/-?[a-z\.]+/,keywords:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[{className:"shebang",begin:/^#![^\n]+sh\s*$/,relevance:10},{className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},a.HASH_COMMENT_MODE,a.NUMBER_MODE,c,d,b]}}),a.registerLanguage("brainfuck",function(a){var b={className:"literal",begin:"[\\+\\-]",relevance:0};return{aliases:["bf"],contains:[a.COMMENT("[^\\[\\]\\.,\\+\\-<> \r\n]","[\\[\\]\\.,\\+\\-<> \r\n]",{returnEnd:!0,relevance:0}),{className:"title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0},{begin:/\+\+|\-\-/,returnBegin:!0,contains:[b]},b]}}),a.registerLanguage("cal",function(a){var b="div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to until while with var",c="false true",d=[a.C_LINE_COMMENT_MODE,a.COMMENT(/\{/,/\}/,{relevance:0}),a.COMMENT(/\(\*/,/\*\)/,{relevance:10})],e={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},f={className:"string",begin:/(#\d+)+/},g={className:"date",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},h={className:"variable",begin:'"',end:'"'},i={className:"function",beginKeywords:"procedure",end:/[:;]/,keywords:"procedure|10",contains:[a.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:b,contains:[e,f]}].concat(d)},j={className:"class",begin:"OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)",returnBegin:!0,contains:[a.TITLE_MODE,i]};return{case_insensitive:!0,keywords:{keyword:b,literal:c},illegal:/\/\*/,contains:[e,f,g,h,a.NUMBER_MODE,j,i]}}),a.registerLanguage("capnproto",function(a){return{aliases:["capnp"],keywords:{keyword:"struct enum interface union group import using const annotation extends in of on as with from fixed",built_in:"Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 Text Data AnyPointer AnyStruct Capability List",literal:"true false"},contains:[a.QUOTE_STRING_MODE,a.NUMBER_MODE,a.HASH_COMMENT_MODE,{className:"shebang",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"number",begin:/@\d+\b/},{className:"class",beginKeywords:"struct enum",end:/\{/,illegal:/\n/,contains:[a.inherit(a.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"class",beginKeywords:"interface",end:/\{/,illegal:/\n/,contains:[a.inherit(a.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]}]}}),a.registerLanguage("ceylon",function(a){var b="assembly module package import alias class interface object given value assign void function new of extends satisfies abstracts in out return break continue throw assert dynamic if else switch case for while try catch finally then let this outer super is exists nonempty",c="shared abstract formal default actual variable late native deprecatedfinal sealed annotation suppressWarnings small",d="doc by license see throws tagged",e=c+" "+d,f={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:b,relevance:10},g=[{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[f]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return f.contains=g,{keywords:{keyword:b,annotation:e},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[a.C_LINE_COMMENT_MODE,a.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"annotation",begin:'@[a-z]\\w*(?:\\:"[^"]*")?'}].concat(g)}}),a.registerLanguage("clojure",function(a){var b={built_in:"def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},c="a-zA-Z_\\-!.?+*=<>&#'",d="["+c+"]["+c+"0-9/;:]*",e="[-+]?\\d+(\\.\\d+)?",f={begin:d,relevance:0},g={className:"number",begin:e,relevance:0},h=a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),i=a.COMMENT(";","$",{relevance:0}),j={className:"literal",begin:/\b(true|false|nil)\b/},k={className:"collection",begin:"[\\[\\{]",end:"[\\]\\}]"},l={className:"comment",begin:"\\^"+d},m=a.COMMENT("\\^\\{","\\}"),n={className:"attribute",begin:"[:]"+d},o={className:"list",begin:"\\(",end:"\\)"},p={endsWithParent:!0,relevance:0},q={keywords:b,lexemes:d,className:"keyword",begin:d,starts:p},r=[o,h,l,m,i,n,k,g,j,f];return o.contains=[a.COMMENT("comment",""),q,p],p.contains=r,k.contains=r,{aliases:["clj"],illegal:/\S/,contains:[o,h,l,m,i,n,k,g,j]}}),a.registerLanguage("clojure-repl",function(a){return{contains:[{className:"prompt",begin:/^([\w.-]+|\s*#_)=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}),a.registerLanguage("cmake",function(a){return{aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or",operator:"equal less greater strless strgreater strequal matches"},contains:[{className:"envvar",begin:"\\${",end:"}"},a.HASH_COMMENT_MODE,a.QUOTE_STRING_MODE,a.NUMBER_MODE]}}),a.registerLanguage("coffeescript",function(a){var b={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},c="[A-Za-z$_][0-9A-Za-z$_]*",d={className:"subst",begin:/#\{/,end:/}/,keywords:b},e=[a.BINARY_NUMBER_MODE,a.inherit(a.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[a.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[a.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[a.BACKSLASH_ESCAPE,d]},{begin:/"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,d]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[d,a.HASH_COMMENT_MODE]},{begin:"//[gim]*",relevance:0},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{className:"property",begin:"@"+c},{begin:"`",end:"`",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];d.contains=e;var f=a.inherit(a.TITLE_MODE,{begin:c}),g="(\\(.*\\))?\\s*\\B[-=]>",h={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:b,contains:["self"].concat(e)}]};return{aliases:["coffee","cson","iced"],keywords:b,illegal:/\/\*/,contains:e.concat([a.COMMENT("###","###"),a.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+c+"\\s*=\\s*"+g,end:"[-=]>",returnBegin:!0,contains:[f,h]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:g,end:"[-=]>",returnBegin:!0,contains:[h]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[f]},f]},{className:"attribute",begin:c+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}),a.registerLanguage("cpp",function(a){var b={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[a.inherit(a.QUOTE_STRING_MODE,{begin:'((u8?|U)|L)?"'}),{begin:'(u8?|U)?R"',end:'"',contains:[a.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},d={className:"number",variants:[{begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{begin:a.C_NUMBER_RE}]},e={className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line pragma ifdef ifndef",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[c,{className:"string",begin:"<",end:">",illegal:"\\n"}]},c,d,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},f=a.IDENT_RE+"\\s*\\(",g={keyword:"int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf",literal:"true false nullptr NULL"};return{aliases:["c","cc","h","c++","h++","hpp"],keywords:g,illegal:"",keywords:g,contains:["self",b]},{begin:a.IDENT_RE+"::",keywords:g},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"("+a.IDENT_RE+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:g,illegal:/[^\w\s\*&]/,contains:[{begin:f,returnBegin:!0,contains:[a.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,c,d]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,e]}]}}),a.registerLanguage("crmsh",function(a){var b="primitive rsc_template",c="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml",d="property rsc_defaults op_defaults",e="params meta operations op rule attributes utilization",f="read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\",g="number string",h="Master Started Slave Stopped start promote demote stop monitor true false";return{aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:e,operator:f,type:g,literal:h},contains:[a.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{className:"identifier",end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:b,starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{className:"pragma",end:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{begin:"\\b("+c.split(" ").join("|")+")\\s+",keywords:c,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:d,starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},a.QUOTE_STRING_MODE,{className:"pragma",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"number",begin:"[-]?(infinity|inf)",relevance:0},{className:"variable",begin:/([A-Za-z\$_\#][\w_-]+)=/,relevance:0},{className:"tag",begin:"",relevance:0}]}}),a.registerLanguage("crystal",function(a){function b(a,b){var c=[{begin:a,end:b}];return c[0].contains=c,c}var c="(_[uif](8|16|32|64))?",d="[a-zA-Z_]\\w*[!?=]?",e="!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",f="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\][=?]?",g={keyword:"abstract alias as asm begin break case class def do else elsif end ensure enum extend for fun if ifdef include instance_sizeof is_a? lib macro module next of out pointerof private protected rescue responds_to? return require self sizeof struct super then type typeof union unless until when while with yield __DIR__ __FILE__ __LINE__",literal:"false nil true"},h={className:"subst",begin:"#{",end:"}",keywords:g},i={className:"expansion",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:g,relevance:10},j={className:"string",contains:[a.BACKSLASH_ESCAPE,h],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%w?\\(",end:"\\)",contains:b("\\(","\\)")},{begin:"%w?\\[",end:"\\]",contains:b("\\[","\\]")},{begin:"%w?{",end:"}",contains:b("{","}")},{begin:"%w?<",end:">",contains:b("<",">")},{begin:"%w?/",end:"/"},{begin:"%w?%",end:"%"},{begin:"%w?-",end:"-"},{begin:"%w?\\|",end:"\\|"}],relevance:0},k={begin:"("+e+")\\s*",contains:[{className:"regexp",contains:[a.BACKSLASH_ESCAPE,h],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\(",end:"\\)",contains:b("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:b("\\[","\\]")},{begin:"%r{",end:"}",contains:b("{","}")},{begin:"%r<",end:">",contains:b("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}]}],relevance:0},l={className:"regexp",contains:[a.BACKSLASH_ESCAPE,h],variants:[{begin:"%r\\(",end:"\\)",contains:b("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:b("\\[","\\]")},{begin:"%r{",end:"}",contains:b("{","}")},{begin:"%r<",end:">",contains:b("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}],relevance:0},m={className:"annotation",begin:"@\\[",end:"\\]",relevance:5},n=[i,j,k,l,m,a.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[a.HASH_COMMENT_MODE,a.inherit(a.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{className:"inheritance",begin:"<\\s*",contains:[{className:"parent",begin:"("+a.IDENT_RE+"::)?"+a.IDENT_RE}]}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[a.HASH_COMMENT_MODE,a.inherit(a.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"})],relevance:10},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[a.inherit(a.TITLE_MODE,{begin:f,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[a.inherit(a.TITLE_MODE,{begin:f,endsParent:!0})],relevance:5},{className:"constant",begin:"(::)?(\\b[A-Z]\\w*(::)?)+",relevance:0},{className:"symbol",begin:a.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[j,{begin:f}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]*[01])"+c},{begin:"\\b0o([0-7_]*[0-7])"+c},{begin:"\\b0x([A-Fa-f0-9_]*[A-Fa-f0-9])"+c},{begin:"\\b(([0-9][0-9_]*[0-9]|[0-9])(\\.[0-9_]*[0-9])?([eE][+-]?[0-9_]*[0-9])?)"+c}],relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?|%)(\\w+))"}];return h.contains=n,m.contains=n,i.contains=n.slice(1),{aliases:["cr"],lexemes:d,keywords:g,contains:n}}),a.registerLanguage("cs",function(a){var b="abstract as base bool break byte case catch char checked const continue decimal dynamic default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null when object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield",c=a.IDENT_RE+"(<"+a.IDENT_RE+">)?";return{aliases:["csharp"],keywords:b,illegal:/::/,contains:[a.COMMENT("///","$",{returnBegin:!0,contains:[{className:"xmlDocTag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line region endregion pragma checksum"},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:]/,contains:[a.TITLE_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[{className:"title",begin:"[a-zA-Z](\\.?\\w)*",relevance:0},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new return throw await",relevance:0},{className:"function",begin:"("+c+"\\s+)+"+a.IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,contains:[{begin:a.IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[a.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:b,relevance:0,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]}]}}),a.registerLanguage("css",function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*",c={className:"function",begin:b+"\\(",returnBegin:!0,excludeEnd:!0,end:"\\("},d={className:"rule",begin:/[A-Z\_\.\-]+\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{className:"value",endsWithParent:!0,excludeEnd:!0,contains:[c,a.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,a.C_BLOCK_COMMENT_MODE,{className:"hexcolor",begin:"#[0-9A-Fa-f]+"},{className:"important",begin:"!important"}]}}]};return{case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[a.C_BLOCK_COMMENT_MODE,{className:"id",begin:/\#[A-Za-z0-9_-]+/},{className:"class",begin:/\.[A-Za-z0-9_-]+/},{className:"attr_selector",begin:/\[/,end:/\]/,illegal:"$"},{className:"pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"']+/},{className:"at_rule",begin:"@(font-face|page)",lexemes:"[a-z-]+",keywords:"font-face page"},{className:"at_rule",begin:"@",end:"[{;]",contains:[{className:"keyword",begin:/\S+/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,contains:[c,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.CSS_NUMBER_MODE]}]},{className:"tag",begin:b,relevance:0},{className:"rules",begin:"{",end:"}",illegal:/\S/,contains:[a.C_BLOCK_COMMENT_MODE,d]}]}}),a.registerLanguage("d",function(a){var b={keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},c="(0|[1-9][\\d_]*)",d="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",e="0[bB][01_]+",f="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",g="0[xX]"+f,h="([eE][+-]?"+d+")",i="("+d+"(\\.\\d*|"+h+")|\\d+\\."+d+d+"|\\."+c+h+"?)",j="(0[xX]("+f+"\\."+f+"|\\.?"+f+")[pP][+-]?"+d+")",k="("+c+"|"+e+"|"+g+")",l="("+j+"|"+i+")",m="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",n={className:"number",begin:"\\b"+k+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},o={className:"number",begin:"\\b("+l+"([fF]|L|i|[fF]i|Li)?|"+k+"(i|[fF]i|Li))",relevance:0},p={className:"string",begin:"'("+m+"|.)",end:"'",illegal:"."},q={begin:m,relevance:0},r={className:"string",begin:'"',contains:[q],end:'"[cwd]?'},s={className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},t={className:"string",begin:"`",end:"`[cwd]?"},u={className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},v={className:"string",begin:'q"\\{',end:'\\}"'},w={className:"shebang",begin:"^#!",end:"$",relevance:5},x={className:"preprocessor",begin:"#(line)",end:"$",relevance:5},y={className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"},z=a.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{lexemes:a.UNDERSCORE_IDENT_RE,keywords:b,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,z,u,r,s,t,v,o,n,p,w,x,y]}}),a.registerLanguage("markdown",function(a){return{aliases:["md","mkdown","mkd"],contains:[{className:"header",variants:[{begin:"^#{1,6}",end:"$"},{begin:"^.+?\\n[=-]{2,}$"}]},{begin:"<",end:">",subLanguage:"xml",relevance:0},{className:"bullet",begin:"^([*+-]|(\\d+\\.))\\s+"},{className:"strong",begin:"[*_]{2}.+?[*_]{2}"},{className:"emphasis",variants:[{begin:"\\*.+?\\*"},{begin:"_.+?_",relevance:0}]},{className:"blockquote",begin:"^>\\s+",end:"$"},{className:"code",variants:[{begin:"`.+?`"},{begin:"^( {4}| )",end:"$",relevance:0}]},{className:"horizontal_rule",begin:"^[-\\*]{3,}",end:"$"},{begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"link_label",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link_url",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"link_reference",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},{begin:"^\\[.+\\]:",returnBegin:!0,contains:[{className:"link_reference",begin:"\\[",end:"\\]:",excludeBegin:!0,excludeEnd:!0,starts:{className:"link_url",end:"$"}}]}]}}),a.registerLanguage("dart",function(a){var b={className:"subst",begin:"\\$\\{",end:"}",keywords:"true false null this is new super"},c={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{ begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[a.BACKSLASH_ESCAPE,b]},{begin:'"""',end:'"""',contains:[a.BACKSLASH_ESCAPE,b]},{begin:"'",end:"'",illegal:"\\n",contains:[a.BACKSLASH_ESCAPE,b]},{begin:'"',end:'"',illegal:"\\n",contains:[a.BACKSLASH_ESCAPE,b]}]};b.contains=[a.C_NUMBER_MODE,c];var d={keyword:"assert break case catch class const continue default do else enum extends false final finally for if in is new null rethrow return super switch this throw true try var void while with",literal:"abstract as dynamic export external factory get implements import library operator part set static typedef",built_in:"print Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set Stopwatch String StringBuffer StringSink Symbol Type Uri bool double int num document window querySelector querySelectorAll Element ElementList"};return{keywords:d,contains:[c,a.COMMENT("/\\*\\*","\\*/",{subLanguage:"markdown"}),a.COMMENT("///","$",{subLanguage:"markdown"}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},a.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"},{begin:"=>"}]}}),a.registerLanguage("delphi",function(a){var b="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure",c=[a.C_LINE_COMMENT_MODE,a.COMMENT(/\{/,/\}/,{relevance:0}),a.COMMENT(/\(\*/,/\*\)/,{relevance:10})],d={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},e={className:"string",begin:/(#\d+)+/},f={begin:a.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[a.TITLE_MODE]},g={className:"function",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[a.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:b,contains:[d,e]}].concat(c)};return{case_insensitive:!0,keywords:b,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[d,e,a.NUMBER_MODE,f,g].concat(c)}}),a.registerLanguage("diff",function(a){return{aliases:["patch"],contains:[{className:"chunk",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"header",variants:[{begin:/Index: /,end:/$/},{begin:/=====/,end:/=====$/},{begin:/^\-\-\-/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+\+\+/,end:/$/},{begin:/\*{5}/,end:/\*{5}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"change",begin:"^\\!",end:"$"}]}}),a.registerLanguage("django",function(a){var b={className:"filter",begin:/\|[A-Za-z]+:?/,keywords:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone",contains:[{className:"argument",begin:/"/,end:/"/},{className:"argument",begin:/'/,end:/'/}]};return{aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[a.COMMENT(/\{%\s*comment\s*%}/,/\{%\s*endcomment\s*%}/),a.COMMENT(/\{#/,/#}/),{className:"template_tag",begin:/\{%/,end:/%}/,keywords:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor in ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup by as ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim",contains:[b]},{className:"variable",begin:/\{\{/,end:/}}/,contains:[b]}]}}),a.registerLanguage("dns",function(a){return{aliases:["bind","zone"],keywords:{keyword:"IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT"},contains:[a.COMMENT(";","$"),{className:"operator",beginKeywords:"$TTL $GENERATE $INCLUDE $ORIGIN"},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|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number",begin:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"}]}}),a.registerLanguage("dockerfile",function(a){return{aliases:["docker"],case_insensitive:!0,keywords:{built_ins:"from maintainer cmd expose add copy entrypoint volume user workdir onbuild run env label"},contains:[a.HASH_COMMENT_MODE,{keywords:{built_in:"run cmd entrypoint volume add copy workdir onbuild label"},begin:/^ *(onbuild +)?(run|cmd|entrypoint|volume|add|copy|workdir|label) +/,starts:{end:/[^\\]\n/,subLanguage:"bash"}},{keywords:{built_in:"from maintainer expose env user onbuild"},begin:/^ *(onbuild +)?(from|maintainer|expose|env|user|onbuild) +/,end:/[^\\]\n/,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.NUMBER_MODE,a.HASH_COMMENT_MODE]}]}}),a.registerLanguage("dos",function(a){var b=a.COMMENT(/@?rem\b/,/$/,{relevance:10}),c={className:"label",begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)",relevance:0};return{aliases:["bat","cmd"],case_insensitive:!0,illegal:/\/\*/,keywords:{flow:"if else goto for in do call exit not exist errorlevel defined",operator:"equ neq lss leq gtr geq",keyword:"shift cd dir echo setlocal endlocal set pause copy",stream:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux",winutils:"ping net ipconfig taskkill xcopy ren del",built_in:"append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color comp compact convert date dir diskcomp diskcopy doskey erase fs find findstr format ftype graftabl help keyb label md mkdir mode more move path pause print popd pushd promt rd recover rem rename replace restore rmdir shiftsort start subst time title tree type ver verify vol"},contains:[{className:"envvar",begin:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{className:"function",begin:c.begin,end:"goto:eof",contains:[a.inherit(a.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),b]},{className:"number",begin:"\\b\\d+",relevance:0},b]}}),a.registerLanguage("dust",function(a){var b="if eq ne lt lte gt gte select default math sep";return{aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"expression",begin:"{",end:"}",relevance:0,contains:[{className:"begin-block",begin:"#[a-zA-Z- .]+",keywords:b},{className:"string",begin:'"',end:'"'},{className:"end-block",begin:"\\/[a-zA-Z- .]+",keywords:b},{className:"variable",begin:"[a-zA-Z-.]+",keywords:b,relevance:0}]}]}}),a.registerLanguage("elixir",function(a){var b="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?",c="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",d="and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote",e={className:"subst",begin:"#\\{",end:"}",lexemes:b,keywords:d},f={className:"string",contains:[a.BACKSLASH_ESCAPE,e],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},g={className:"function",beginKeywords:"def defp defmacro",end:/\B\b/,contains:[a.inherit(a.TITLE_MODE,{begin:b,endsParent:!0})]},h=a.inherit(g,{className:"class",beginKeywords:"defmodule defrecord",end:/\bdo\b|$|;/}),i=[f,a.HASH_COMMENT_MODE,h,g,{className:"constant",begin:"(\\b[A-Z_]\\w*(.)?)+",relevance:0},{className:"symbol",begin:":",contains:[f,{begin:c}],relevance:0},{className:"symbol",begin:b+":",relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"->"},{begin:"("+a.RE_STARTERS_RE+")\\s*",contains:[a.HASH_COMMENT_MODE,{className:"regexp",illegal:"\\n",contains:[a.BACKSLASH_ESCAPE,e],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}],relevance:0}];return e.contains=i,{lexemes:b,keywords:d,contains:i}}),a.registerLanguage("elm",function(a){var b=[a.COMMENT("--","$"),a.COMMENT("{-","-}",{contains:["self"]})],c={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},d={className:"container",begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"}].concat(b)},e={className:"container",begin:"{",end:"}",contains:d.contains};return{keywords:"let in if then else case of where module import exposing type alias as infix infixl infixr port",contains:[{className:"module",begin:"\\bmodule\\b",end:"where",keywords:"module where",contains:[d].concat(b),illegal:"\\W\\.|;"},{className:"import",begin:"\\bimport\\b",end:"$",keywords:"import|0 as exposing",contains:[d].concat(b),illegal:"\\W\\.|;"},{className:"typedef",begin:"\\btype\\b",end:"$",keywords:"type alias",contains:[c,d,e].concat(b)},{className:"infix",beginKeywords:"infix infixl infixr",end:"$",contains:[a.C_NUMBER_MODE].concat(b)},{className:"foreign",begin:"\\bport\\b",end:"$",keywords:"port",contains:b},a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,c,a.inherit(a.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),{begin:"->|<-"}].concat(b)}}),a.registerLanguage("ruby",function(a){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",c="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",d={className:"doctag",begin:"@[A-Za-z]+"},e={className:"value",begin:"#<",end:">"},f=[a.COMMENT("#","$",{contains:[d]}),a.COMMENT("^\\=begin","^\\=end",{contains:[d],relevance:10}),a.COMMENT("^__END__","\\n$")],g={className:"subst",begin:"#\\{",end:"}",keywords:c},h={className:"string",contains:[a.BACKSLASH_ESCAPE,g],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},i={className:"params",begin:"\\(",end:"\\)",keywords:c},j=[h,e,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[a.inherit(a.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{className:"inheritance",begin:"<\\s*",contains:[{className:"parent",begin:"("+a.IDENT_RE+"::)?"+a.IDENT_RE}]}].concat(f)},{className:"function",beginKeywords:"def",end:"$|;",contains:[a.inherit(a.TITLE_MODE,{begin:b}),i].concat(f)},{className:"constant",begin:"(::)?(\\b[A-Z]\\w*(::)?)+",relevance:0},{className:"symbol",begin:a.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[h,{begin:b}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"("+a.RE_STARTERS_RE+")\\s*",contains:[e,{className:"regexp",contains:[a.BACKSLASH_ESCAPE,g],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(f),relevance:0}].concat(f);g.contains=j,i.contains=j;var k="[>?]>",l="[\\w#]+\\(\\w+\\):\\d+:\\d+>",m="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",n=[{begin:/^\s*=>/,className:"status",starts:{end:"$",contains:j}},{className:"prompt",begin:"^("+k+"|"+l+"|"+m+")",starts:{end:"$",contains:j}}];return{aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:f.concat(n).concat(j)}}),a.registerLanguage("erb",function(a){return{subLanguage:"xml",contains:[a.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}),a.registerLanguage("erlang-repl",function(a){return{keywords:{special_functions:"spawn spawn_link self",reserved:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"prompt",begin:"^[0-9]+> ",relevance:10},a.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"constant",begin:"\\?(::)?([A-Z]\\w*(::)?)+"},{className:"arrow",begin:"->"},{className:"ok",begin:"ok"},{className:"exclamation_mark",begin:"!"},{className:"function_or_atom",begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{className:"variable",begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}),a.registerLanguage("erlang",function(a){var b="[a-z'][a-zA-Z0-9_']*",c="("+b+":"+b+"|"+b+")",d={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},e=a.COMMENT("%","$"),f={className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},g={begin:"fun\\s+"+b+"/\\d+"},h={begin:c+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{className:"function_name",begin:c,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},i={className:"tuple",begin:"{",end:"}",relevance:0},j={className:"variable",begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},k={className:"variable",begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},l={begin:"#"+a.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{className:"record_name",begin:"#"+a.UNDERSCORE_IDENT_RE,relevance:0},{begin:"{",end:"}",relevance:0}]},m={beginKeywords:"fun receive if try case",end:"end",keywords:d};m.contains=[e,g,a.inherit(a.APOS_STRING_MODE,{className:""}),m,h,a.QUOTE_STRING_MODE,f,i,j,k,l];var n=[e,g,m,h,a.QUOTE_STRING_MODE,f,i,j,k,l];h.contains[1].contains=n,i.contains=n,l.contains[1].contains=n;var o={className:"params",begin:"\\(",end:"\\)",contains:n};return{aliases:["erl"],keywords:d,illegal:"(",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[o,a.inherit(a.TITLE_MODE,{begin:b})],starts:{end:";|\\.",keywords:d,contains:n}},e,{className:"pp",begin:"^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,lexemes:"-"+a.IDENT_RE,keywords:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",contains:[o]},f,a.QUOTE_STRING_MODE,l,j,k,i,{begin:/\.$/}]}}),a.registerLanguage("fix",function(a){return{contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"attribute"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}}),a.registerLanguage("fortran",function(a){var b={className:"params",begin:"\\(",end:"\\)"},c={constant:".False. .True.",type:"integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image"};return{case_insensitive:!0,aliases:["f90","f95"],keywords:c,illegal:/\/\*/,contains:[a.inherit(a.APOS_STRING_MODE,{className:"string",relevance:0}),a.inherit(a.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[a.UNDERSCORE_TITLE_MODE,b]},a.COMMENT("!","$",{relevance:0}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}),a.registerLanguage("fsharp",function(a){var b={begin:"<",end:">",contains:[a.inherit(a.TITLE_MODE,{begin:/'[a-zA-Z0-9_]+/})]};return{aliases:["fs"],keywords:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",illegal:/\/\*/,contains:[{className:"keyword",begin:/\b(yield|return|let|do)!/},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:'"""',end:'"""'},a.COMMENT("\\(\\*","\\*\\)"),{className:"class",beginKeywords:"type",end:"\\(|=|$",excludeEnd:!0,contains:[a.UNDERSCORE_TITLE_MODE,b]},{className:"annotation",begin:"\\[<",end:">\\]",relevance:10},{className:"attribute",begin:"\\B('[A-Za-z])\\b",contains:[a.BACKSLASH_ESCAPE]},a.C_LINE_COMMENT_MODE,a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),a.C_NUMBER_MODE]}}),a.registerLanguage("gams",function(a){var b="abort acronym acronyms alias all and assign binary card diag display else1 eps eq equation equations file files for1 free ge gt if inf integer le loop lt maximizing minimizing model models na ne negative no not option options or ord parameter parameters positive prod putpage puttl repeat sameas scalar scalars semicont semiint set1 sets smax smin solve sos1 sos2 sum system table then until using variable variables while1 xor yes";return{aliases:["gms"],case_insensitive:!0,keywords:b,contains:[{className:"section",beginKeywords:"sets parameters variables equations",end:";",contains:[{begin:"/",end:"/",contains:[a.NUMBER_MODE]}]},{className:"string",begin:"\\*{3}",end:"\\*{3}"},a.NUMBER_MODE,{className:"number",begin:"\\$[a-zA-Z0-9]+"}]}}),a.registerLanguage("gcode",function(a){var b="[A-Z_][A-Z0-9_.]*",c="\\%",d={literal:"",built_in:"",keyword:"IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT EQ LT GT NE GE LE OR XOR"},e={className:"preprocessor",begin:"([O])([0-9]+)"},f=[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.COMMENT(/\(/,/\)/),a.inherit(a.C_NUMBER_MODE,{begin:"([-+]?([0-9]*\\.?[0-9]+\\.?))|"+a.C_NUMBER_RE}),a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),{className:"keyword",begin:"([G])([0-9]+\\.?[0-9]?)"},{className:"title",begin:"([M])([0-9]+\\.?[0-9]?)"},{className:"title",begin:"(VC|VS|#)",end:"(\\d+)"},{className:"title",begin:"(VZOFX|VZOFY|VZOFZ)"},{className:"built_in",begin:"(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)",end:"([-+]?([0-9]*\\.?[0-9]+\\.?))(\\])"},{className:"label",variants:[{begin:"N",end:"\\d+",illegal:"\\W"}]}];return{aliases:["nc"],case_insensitive:!0,lexemes:b,keywords:d,contains:[{className:"preprocessor",begin:c},e].concat(f)}}),a.registerLanguage("gherkin",function(a){return{aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",contains:[{className:"keyword",begin:"\\*"},a.COMMENT("@[^@\r\n ]+","$"),{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},a.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},a.QUOTE_STRING_MODE]}}),a.registerLanguage("glsl",function(a){return{keywords:{keyword:"atomic_uint attribute bool break bvec2 bvec3 bvec4 case centroid coherent const continue default discard dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 do double dvec2 dvec3 dvec4 else flat float for highp if iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray in inout int invariant isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 layout lowp mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 mediump noperspective out patch precision readonly restrict return sample sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow smooth struct subroutine switch uimage1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint uniform usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D usamplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 varying vec2 vec3 vec4 void volatile while writeonly",built_in:"gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffsetgl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_PerVertex gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicCounter atomicCounterDecrement atomicCounterIncrement barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow gl_TextureMatrix gl_TextureMatrixInverse",literal:"true false"},illegal:'"',contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$"}]}}),a.registerLanguage("go",function(a){var b={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer", constant:"true false iota nil",typename:"bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],keywords:b,illegal:"",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"symbol",begin:":\\w+"},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attribute",begin:"\\w+",relevance:0},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{className:"bullet",begin:"^\\s*[=~]\\s*",relevance:0},{begin:"#{",starts:{end:"}",subLanguage:"ruby"}}]}}),a.registerLanguage("handlebars",function(a){var b="each in with if else unless bindattr action collection debugger log outlet template unbound view yield";return{aliases:["hbs","html.hbs","html.handlebars"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"expression",begin:"{{",end:"}}",contains:[{className:"begin-block",begin:"#[a-zA-Z- .]+",keywords:b},{className:"string",begin:'"',end:'"'},{className:"end-block",begin:"\\/[a-zA-Z- .]+",keywords:b},{className:"variable",begin:"[a-zA-Z-.]+",keywords:b}]}]}}),a.registerLanguage("haskell",function(a){var b=[a.COMMENT("--","$"),a.COMMENT("{-","-}",{contains:["self"]})],c={className:"pragma",begin:"{-#",end:"#-}"},d={className:"preprocessor",begin:"^#",end:"$"},e={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},f={className:"container",begin:"\\(",end:"\\)",illegal:'"',contains:[c,d,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},a.inherit(a.TITLE_MODE,{begin:"[_a-z][\\w']*"})].concat(b)},g={className:"container",begin:"{",end:"}",contains:f.contains};return{aliases:["hs"],keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",contains:[{className:"module",begin:"\\bmodule\\b",end:"where",keywords:"module where",contains:[f].concat(b),illegal:"\\W\\.|;"},{className:"import",begin:"\\bimport\\b",end:"$",keywords:"import|0 qualified as hiding",contains:[f].concat(b),illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where",keywords:"class family instance where",contains:[e,f].concat(b)},{className:"typedef",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[c,e,f,g].concat(b)},{className:"default",beginKeywords:"default",end:"$",contains:[e,f].concat(b)},{className:"infix",beginKeywords:"infix infixl infixr",end:"$",contains:[a.C_NUMBER_MODE].concat(b)},{className:"foreign",begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",contains:[e,a.QUOTE_STRING_MODE].concat(b)},{className:"shebang",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},c,d,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,e,a.inherit(a.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),{begin:"->|<-"}].concat(b)}}),a.registerLanguage("haxe",function(a){var b="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)";return{aliases:["hx"],keywords:{keyword:"break callback case cast catch class continue default do dynamic else enum extends extern for function here if implements import in inline interface never new override package private public return static super switch this throw trace try typedef untyped using var while",literal:"true false null"},contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.C_NUMBER_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},a.TITLE_MODE]},{className:"preprocessor",begin:"#",end:"$",keywords:"if else elseif end error"},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[a.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{className:"type",begin:":",end:b,relevance:10}]}]}}),a.registerLanguage("http",function(a){return{aliases:["https"],illegal:"\\S",contains:[{className:"status",begin:"^HTTP/[0-9\\.]+",end:"$",contains:[{className:"number",begin:"\\b\\d{3}\\b"}]},{className:"request",begin:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",returnBegin:!0,end:"$",contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0}]},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,illegal:"\\n|\\s|=",starts:{className:"string",end:"$"}},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}]}}),a.registerLanguage("inform7",function(a){var b="\\[",c="\\]";return{aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:b,end:c}]},{className:"title",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,end:":",contains:[{begin:"\\b\\(This",end:"\\)"}]},{className:"comment",begin:b,end:c,contains:["self"]}]}}),a.registerLanguage("ini",function(a){var b={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]};return{aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a.COMMENT(";","$"),a.HASH_COMMENT_MODE,{className:"title",begin:/^\s*\[+/,end:/\]+/},{className:"setting",begin:/^[a-z0-9\[\]_-]+\s*=\s*/,end:"$",contains:[{className:"value",endsWithParent:!0,keywords:"on off true false yes no",contains:[{className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},b,{className:"number",begin:/([\+\-]+)?[\d]+_[\d_]+/},a.NUMBER_MODE],relevance:0}]}]}}),a.registerLanguage("irpf90",function(a){var b={className:"params",begin:"\\(",end:"\\)"},c={constant:".False. .True.",type:"integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here"};return{case_insensitive:!0,keywords:c,illegal:/\/\*/,contains:[a.inherit(a.APOS_STRING_MODE,{className:"string",relevance:0}),a.inherit(a.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[a.UNDERSCORE_TITLE_MODE,b]},a.COMMENT("!","$",{relevance:0}),a.COMMENT("begin_doc","end_doc",{relevance:10}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}),a.registerLanguage("java",function(a){var b=a.UNDERSCORE_IDENT_RE+"(<"+a.UNDERSCORE_IDENT_RE+">)?",c="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",d="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",e={className:"number",begin:d,relevance:0};return{aliases:["jsp"],keywords:c,illegal:/<\/|#/,contains:[a.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"("+b+"\\s+)+"+a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:c,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:c,relevance:0,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},e,{className:"annotation",begin:"@[A-Za-z]+"}]}}),a.registerLanguage("javascript",function(a){return{aliases:["js"],keywords:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},contains:[{className:"pi",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[a.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:a.C_NUMBER_RE}],relevance:0},{begin:"("+a.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.REGEXP_MODE,{begin:/\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{begin:/\$[(.]/},{begin:"\\."+a.IDENT_RE,relevance:0},{beginKeywords:"import",end:"[;$]",keywords:"import from as",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},a.UNDERSCORE_TITLE_MODE]}],illegal:/#/}}),a.registerLanguage("json",function(a){var b={literal:"true false null"},c=[a.QUOTE_STRING_MODE,a.C_NUMBER_MODE],d={className:"value",end:",",endsWithParent:!0,excludeEnd:!0,contains:c,keywords:b},e={begin:"{",end:"}",contains:[{className:"attribute",begin:'\\s*"',end:'"\\s*:\\s*',excludeBegin:!0,excludeEnd:!0,contains:[a.BACKSLASH_ESCAPE],illegal:"\\n",starts:d}],illegal:"\\S"},f={begin:"\\[",end:"\\]",contains:[a.inherit(d,{className:null})],illegal:"\\S"};return c.splice(c.length,0,e,f),{contains:c,keywords:b,illegal:"\\S"}}),a.registerLanguage("julia",function(a){var b={keyword:"in abstract baremodule begin bitstype break catch ccall const continue do else elseif end export finally for function global if immutable import importall let local macro module quote return try type typealias using while",literal:"true false ANY ARGS CPU_CORES C_NULL DL_LOAD_PATH DevNull ENDIAN_BOM ENV I|0 Inf Inf16 Inf32 InsertionSort JULIA_HOME LOAD_PATH MS_ASYNC MS_INVALIDATE MS_SYNC MergeSort NaN NaN16 NaN32 OS_NAME QuickSort RTLD_DEEPBIND RTLD_FIRST RTLD_GLOBAL RTLD_LAZY RTLD_LOCAL RTLD_NODELETE RTLD_NOLOAD RTLD_NOW RoundDown RoundFromZero RoundNearest RoundToZero RoundUp STDERR STDIN STDOUT VERSION WORD_SIZE catalan cglobal e|0 eu|0 eulergamma golden im nothing pi γ π φ",built_in:"ASCIIString AbstractArray AbstractRNG AbstractSparseArray Any ArgumentError Array Associative Base64Pipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError Box CFILE Cchar Cdouble Cfloat Char CharString Cint Clong Clonglong ClusterManager Cmd Coff_t Colon Complex Complex128 Complex32 Complex64 Condition Cptrdiff_t Cshort Csize_t Cssize_t Cuchar Cuint Culong Culonglong Cushort Cwchar_t DArray DataType DenseArray Diagonal Dict DimensionMismatch DirectIndexString Display DivideError DomainError EOFError EachLine Enumerate ErrorException Exception Expr Factorization FileMonitor FileOffset Filter Float16 Float32 Float64 FloatRange FloatingPoint Function GetfieldNode GotoNode Hermitian IO IOBuffer IOStream IPv4 IPv6 InexactError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException IntrinsicFunction KeyError LabelNode LambdaStaticData LineNumberNode LoadError LocalProcess MIME MathConst MemoryError MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode Nothing Number ObjectIdDict OrdinalRange OverflowError ParseError PollingFileWatcher ProcessExitedException ProcessGroup Ptr QuoteNode Range Range1 Ranges Rational RawFD Real Regex RegexMatch RemoteRef RepString RevString RopeString RoundingMode Set SharedArray Signed SparseMatrixCSC StackOverflowError Stat StatStruct StepRange String SubArray SubString SymTridiagonal Symbol SymbolNode Symmetric SystemError Task TextDisplay Timer TmStruct TopNode Triangular Tridiagonal Type TypeConstructor TypeError TypeName TypeVar UTF16String UTF32String UTF8String UdpSocket Uint Uint128 Uint16 Uint32 Uint64 Uint8 UndefRefError UndefVarError UniformScaling UnionType UnitRange Unsigned Vararg VersionNumber WString WeakKeyDict WeakRef Woodbury Zip"},c="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",d={lexemes:c,keywords:b},e={className:"type-annotation",begin:/::/},f={className:"subtype",begin:/<:/},g={className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},h={className:"char",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},i={className:"subst",begin:/\$\(/,end:/\)/,keywords:b},j={className:"variable",begin:"\\$"+c},k={className:"string",contains:[a.BACKSLASH_ESCAPE,i,j],variants:[{begin:/\w*"/,end:/"\w*/},{begin:/\w*"""/,end:/"""\w*/}]},l={className:"string",contains:[a.BACKSLASH_ESCAPE,i,j],begin:"`",end:"`"},m={className:"macrocall",begin:"@"+c},n={className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]};return d.contains=[g,h,e,f,k,l,m,n,a.HASH_COMMENT_MODE],i.contains=d.contains,d}),a.registerLanguage("kotlin",function(a){var b="val var get set class trait object public open private protected final enum if else do while for when break continue throw try catch finally import package is as in return fun override default companion reified inline volatile transient native";return{keywords:{typename:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null",keyword:b},contains:[a.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"type",begin://,returnBegin:!0,excludeEnd:!1,relevance:0},{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:b,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,illegal:/\([^\(,\s:]+,/,contains:[{className:"typename",begin:/:\s*/,end:/\s*[=\)]/,excludeBegin:!0,returnEnd:!0,relevance:0}]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{className:"class",beginKeywords:"class trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[a.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"typename",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0}]},{className:"variable",beginKeywords:"var val",end:/\s*[=:$]/,excludeEnd:!0},a.QUOTE_STRING_MODE,{className:"shebang",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},a.C_NUMBER_MODE]}}),a.registerLanguage("lasso",function(a){var b="[a-zA-Z_][a-zA-Z0-9_.]*",c="<\\?(lasso(script)?|=)",d="\\]|\\?>",e={literal:"true false none minimal full all void bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"error_code error_msg error_pop error_push error_reset cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},f=a.COMMENT("",{relevance:0}),g={className:"preprocessor",begin:"\\[noprocess\\]",starts:{className:"markup",end:"\\[/noprocess\\]",returnEnd:!0,contains:[f]}},h={className:"preprocessor",begin:"\\[/noprocess|"+c},i={className:"variable",begin:"'"+b+"'"},j=[a.COMMENT("/\\*\\*!","\\*/"),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.inherit(a.C_NUMBER_MODE,{begin:a.C_NUMBER_RE+"|(infinity|nan)\\b"}),a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{className:"variable",variants:[{begin:"[#$]"+b},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"tag",begin:"::\\s*",end:b,illegal:"\\W"},{className:"attribute",variants:[{begin:"-(?!infinity)"+a.UNDERSCORE_IDENT_RE,relevance:0},{begin:"(\\.\\.\\.)"}]},{className:"subst",variants:[{begin:"->\\s*",contains:[i]},{begin:"->|\\\\|&&?|\\|\\||!(?!=|>)|(and|or|not)\\b",relevance:0}]},{className:"built_in",begin:"\\.\\.?\\s*",relevance:0,contains:[i]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[a.inherit(a.TITLE_MODE,{begin:a.UNDERSCORE_IDENT_RE+"(=(?!>))?"})]}];return{aliases:["ls","lassoscript"],case_insensitive:!0,lexemes:b+"|&[lg]t;",keywords:e,contains:[{className:"preprocessor",begin:d,relevance:0,starts:{className:"markup",end:"\\[|"+c,returnEnd:!0,relevance:0,contains:[f]}},g,h,{className:"preprocessor",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",lexemes:b+"|&[lg]t;",keywords:e,contains:[{className:"preprocessor",begin:d,relevance:0,starts:{className:"markup",end:"\\[noprocess\\]|"+c,returnEnd:!0,contains:[f]}},g,h].concat(j)}},{className:"preprocessor",begin:"\\[",relevance:0},{className:"shebang",begin:"^#!.+lasso9\\b",relevance:10}].concat(j)}}),a.registerLanguage("less",function(a){var b="[\\w-]+",c="("+b+"|@{"+b+"})",d=[],e=[],f=function(a){return{className:"string",begin:"~?"+a+".*?"+a}},g=function(a,b,c){return{className:a,begin:b,relevance:c}},h=function(b,c,d){return a.inherit({className:b,begin:c+"\\(",end:"\\(",returnBegin:!0,excludeEnd:!0,relevance:0},d)},i={begin:"\\(",end:"\\)",contains:e,relevance:0};e.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,f("'"),f('"'),a.CSS_NUMBER_MODE,g("hexcolor","#[0-9A-Fa-f]+\\b"),h("function","(url|data-uri)",{starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}}),h("function",b),i,g("variable","@@?"+b,10),g("variable","@{"+b+"}"),g("built_in","~?`[^`]*?`"),{className:"attribute",begin:b+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0});var j=e.concat({begin:"{",end:"}",contains:d}),k={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(e)},l={className:"attribute",begin:c,end:":",excludeEnd:!0,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE],illegal:/\S/,starts:{end:"[;}]",returnEnd:!0,contains:e,illegal:"[<=$]"}},m={className:"at_rule",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:e,relevance:0}},n={className:"variable",variants:[{begin:"@"+b+"\\s*:",relevance:15},{begin:"@"+b}],starts:{end:"[;}]",returnEnd:!0,contains:j}},o={variants:[{begin:"[\\.#:&\\[]",end:"[;{}]"},{begin:c+"[^;]*{",end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,k,g("keyword","all\\b"),g("variable","@{"+b+"}"),g("tag",c+"%?",0),g("id","#"+c),g("class","\\."+c,0),g("keyword","&",0),h("pseudo",":not"),h("keyword",":extend"),g("pseudo","::?"+c),{className:"attr_selector",begin:"\\[",end:"\\]"},{begin:"\\(",end:"\\)",contains:j},{begin:"!important"}]};return d.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,m,n,o,l),{case_insensitive:!0,illegal:"[=>'/<($\"]",contains:d}}),a.registerLanguage("lisp",function(a){var b="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*",c="\\|[^]*?\\|",d="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?",e={className:"shebang",begin:"^#!",end:"$"},f={className:"literal",begin:"\\b(t{1}|nil)\\b"},g={className:"number",variants:[{begin:d,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+d+" +"+d,end:"\\)"}]},h=a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),i=a.COMMENT(";","$",{relevance:0}),j={className:"variable",begin:"\\*",end:"\\*"},k={className:"keyword",begin:"[:&]"+b},l={begin:b,relevance:0},m={begin:c},n={begin:"\\(",end:"\\)",contains:["self",f,h,g,l]},o={className:"quoted",contains:[g,h,j,k,n,l],variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:"quote"},{begin:"'"+c}]},p={className:"quoted",variants:[{begin:"'"+b},{begin:"#'"+b+"(::"+b+")*"}]},q={className:"list",begin:"\\(\\s*",end:"\\)"},r={endsWithParent:!0,relevance:0};return q.contains=[{className:"keyword",variants:[{begin:b},{begin:c}]},r],r.contains=[o,p,q,f,g,h,i,j,k,m,l],{illegal:/\S/,contains:[g,e,f,h,i,o,p,q,l]}}),a.registerLanguage("livecodeserver",function(a){var b={className:"variable",begin:"\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+",relevance:0},c=[a.C_BLOCK_COMMENT_MODE,a.HASH_COMMENT_MODE,a.COMMENT("--","$"),a.COMMENT("[^:]//","$")],d=a.inherit(a.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),e=a.inherit(a.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if", @@ -75,44 +75,44 @@ relevance:0},{begin:"#[a-zA-Z\\ \\.]+"}]}]}}),a.registerLanguage("rust",function return-1==c.indexOf(a)&&-1==f.indexOf(a)&&-1==d.indexOf(a)});g=g.concat(e);var h={className:"string",relevance:0,variants:[{begin:'"',end:'"',contains:[{begin:'""'}]},{begin:"'",end:"'",contains:[{begin:"''"}]}]},i={className:"number",begin:a.NUMBER_RE,relevance:0},j={className:"string",variants:[a.QUOTE_STRING_MODE,{begin:"'\\\\?.",end:"'",illegal:"."}]},k={className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line pragma ifdef ifndef",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[j,{className:"string",begin:"<",end:">",illegal:"\\n"}]},j,i,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]};return{aliases:["sqf"],case_insensitive:!0,keywords:{keyword:c.join(" "),built_in:g.join(" "),literal:f.join(" ")},contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,i,h,k]}}),a.registerLanguage("sql",function(a){var b=a.COMMENT("--","$");return{case_insensitive:!0,illegal:/[<>{}*]/,contains:[{className:"operator",beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke",end:/;/,endsWithParent:!0,keywords:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes c cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle d data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration e each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract f failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function g general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http i id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists k keep keep_duplicates key keys kill l language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim m main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex n name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding p package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime t table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[a.BACKSLASH_ESCAPE,{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[a.BACKSLASH_ESCAPE,{begin:'""'}]},{className:"string",begin:"`",end:"`",contains:[a.BACKSLASH_ESCAPE]},a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE,b]},a.C_BLOCK_COMMENT_MODE,b]}}),a.registerLanguage("stata",function(a){return{aliases:["do","ado"],case_insensitive:!0,keywords:"if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate g gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l la lab labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize meqparse mer merg merge mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5",contains:[{className:"label",variants:[{begin:"\\$\\{?[a-zA-Z0-9_]+\\}?"},{begin:"`[a-zA-Z0-9_]+'"}]},{className:"string",variants:[{begin:'`"[^\r\n]*?"\''},{begin:'"[^\r\n"]*"'}]},{className:"literal",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\(|$)"}]},a.COMMENT("^[ ]*\\*.*$",!1),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]}}),a.registerLanguage("step21",function(a){var b="[A-Z_][A-Z0-9_.]*",c="END-ISO-10303-21;",d={literal:"",built_in:"",keyword:"HEADER ENDSEC DATA"},e={className:"preprocessor",begin:"ISO-10303-21;",relevance:10},f=[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.COMMENT("/\\*\\*!","\\*/"),a.C_NUMBER_MODE,a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"label",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}];return{aliases:["p21","step","stp"],case_insensitive:!0,lexemes:b,keywords:d,contains:[{className:"preprocessor",begin:c,relevance:10},e].concat(f)}}),a.registerLanguage("stylus",function(a){var b={className:"variable",begin:"\\$"+a.IDENT_RE},c={className:"hexcolor",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})",relevance:10},d=["charset","css","debug","extend","font-face","for","import","include","media","mixin","page","warn","while"],e=["after","before","first-letter","first-line","active","first-child","focus","hover","lang","link","visited"],f=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],g="[\\.\\s\\n\\[\\:,]",h=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-ligatures","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"],i=["\\{","\\}","\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"]; return{aliases:["styl"],case_insensitive:!1,illegal:"("+i.join("|")+")",keywords:"if else for in",contains:[a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,c,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+g,returnBegin:!0,contains:[{className:"class",begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"+g,returnBegin:!0,contains:[{className:"id",begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\b("+f.join("|")+")"+g,returnBegin:!0,contains:[{className:"tag",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"}]},{className:"pseudo",begin:"&?:?:\\b("+e.join("|")+")"+g},{className:"at_rule",begin:"@("+d.join("|")+")\\b"},b,a.CSS_NUMBER_MODE,a.NUMBER_MODE,{className:"function",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[c,b,a.APOS_STRING_MODE,a.CSS_NUMBER_MODE,a.NUMBER_MODE,a.QUOTE_STRING_MODE]}]},{className:"attribute",begin:"\\b("+h.reverse().join("|")+")\\b"}]}}),a.registerLanguage("swift",function(a){var b={keyword:"__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},c={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},d=a.COMMENT("/\\*","\\*/",{contains:["self"]}),e={className:"subst",begin:/\\\(/,end:"\\)",keywords:b,contains:[]},f={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0},g=a.inherit(a.QUOTE_STRING_MODE,{contains:[e,a.BACKSLASH_ESCAPE]});return e.contains=[f],{keywords:b,contains:[g,a.C_LINE_COMMENT_MODE,d,c,f,{className:"func",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/,illegal:/\(/}),{className:"generics",begin://,illegal:/>/},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:b,contains:["self",f,g,a.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:b,end:"\\{",excludeEnd:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/})]},{className:"preprocessor",begin:"(@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain)"},{beginKeywords:"import",end:/$/,contains:[a.C_LINE_COMMENT_MODE,d]}]}}),a.registerLanguage("tcl",function(a){return{aliases:["tk"],keywords:"after append apply array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock close concat continue dde dict encoding eof error eval exec exit expr fblocked fconfigure fcopy file fileevent filename flush for foreach format gets glob global history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename return safe scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update uplevel upvar variable vwait while",contains:[a.COMMENT(";[ \\t]*#","$"),a.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"symbol",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",excludeEnd:!0,variants:[{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*\\(([a-zA-Z0-9_])*\\)",end:"[^a-zA-Z0-9_\\}\\$]"},{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"(\\))?[^a-zA-Z0-9_\\}\\$]"}]},{className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null})]},{className:"number",variants:[a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE]}]}}),a.registerLanguage("tex",function(a){var b={className:"command",begin:"\\\\[a-zA-Zа-яА-я]+[\\*]?"},c={className:"command",begin:"\\\\[^a-zA-Zа-яА-я0-9]"},d={className:"special",begin:"[{}\\[\\]\\&#~]",relevance:0};return{contains:[{begin:"\\\\[a-zA-Zа-яА-я]+[\\*]? *= *-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",returnBegin:!0,contains:[b,c,{className:"number",begin:" *=",end:"-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",excludeBegin:!0}],relevance:10},b,c,d,{className:"formula",begin:"\\$\\$",end:"\\$\\$",contains:[b,c,d],relevance:0},{className:"formula",begin:"\\$",end:"\\$",contains:[b,c,d],relevance:0},a.COMMENT("%","$",{relevance:0})]}}),a.registerLanguage("thrift",function(a){var b="bool byte i16 i32 i64 double string binary";return{keywords:{keyword:"namespace const typedef struct enum service exception void oneway set list map required optional",built_in:b,literal:"true false"},contains:[a.QUOTE_STRING_MODE,a.NUMBER_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[a.inherit(a.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",end:">",keywords:b,contains:["self"]}]}}),a.registerLanguage("tp",function(a){var b={className:"number",begin:"[1-9][0-9]*",relevance:0},c={className:"comment",begin:":[^\\]]+"},d={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER| TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",b,c]},e={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",b,a.QUOTE_STRING_MODE,c]};return{keywords:{keyword:"ABORT ACC ADJUST AND AP_LD BREAK CALL CNT COL CONDITION CONFIG DA DB DIV DETECT ELSE END ENDFOR ERR_NUM ERROR_PROG FINE FOR GP GUARD INC IF JMP LINEAR_MAX_SPEED LOCK MOD MONITOR OFFSET Offset OR OVERRIDE PAUSE PREG PTH RT_LD RUN SELECT SKIP Skip TA TB TO TOOL_OFFSET Tool_Offset UF UT UFRAME_NUM UTOOL_NUM UNLOCK WAIT X Y Z W P R STRLEN SUBSTR FINDSTR VOFFSET",constant:"ON OFF max_speed LPOS JPOS ENABLE DISABLE START STOP RESET"},contains:[d,e,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},a.COMMENT("//","[;$]"),a.COMMENT("!","[;$]"),a.COMMENT("--eg:","$"),a.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},a.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}),a.registerLanguage("twig",function(a){var b={className:"params",begin:"\\(",end:"\\)"},c="attribute block constant cycle date dump include max min parent random range source template_from_string",d={className:"function",beginKeywords:c,relevance:0,contains:[b]},e={className:"filter",begin:/\|[A-Za-z_]+:?/,keywords:"abs batch capitalize convert_encoding date date_modify default escape first format join json_encode keys last length lower merge nl2br number_format raw replace reverse round slice sort split striptags title trim upper url_encode",contains:[d]},f="autoescape block do embed extends filter flush for if import include macro sandbox set spaceless use verbatim";return f=f+" "+f.split(" ").map(function(a){return"end"+a}).join(" "),{aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[a.COMMENT(/\{#/,/#}/),{className:"template_tag",begin:/\{%/,end:/%}/,keywords:f,contains:[e,d]},{className:"variable",begin:/\{\{/,end:/}}/,contains:[e,d]}]}}),a.registerLanguage("typescript",function(a){var b={keyword:"in if for while finally var new function|0 do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void"};return{aliases:["ts"],keywords:b,contains:[{className:"pi",begin:/^\s*['"]use strict['"]/,relevance:0},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:a.C_NUMBER_RE}],relevance:0},{begin:"("+a.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.REGEXP_MODE],relevance:0},{className:"function",begin:"function",end:/[\{;]/,excludeEnd:!0,keywords:b,contains:["self",a.inherit(a.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:b,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE],illegal:/["'\(]/}],illegal:/\[|%/,relevance:0},{className:"constructor",beginKeywords:"constructor",end:/\{/,excludeEnd:!0,relevance:10},{className:"module",beginKeywords:"module",end:/\{/,excludeEnd:!0},{className:"interface",beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+a.IDENT_RE,relevance:0}]}}),a.registerLanguage("vala",function(a){return{keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface delegate namespace",end:"{",excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[a.UNDERSCORE_TITLE_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,{className:"preprocessor",begin:"^#",end:"$",relevance:2},{className:"constant",begin:" [A-Z_]+ ",relevance:0}]}}),a.registerLanguage("vbnet",function(a){return{aliases:["vb"],case_insensitive:!0,keywords:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},illegal:"//|{|}|endif|gosub|variant|wend",contains:[a.inherit(a.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),a.COMMENT("'","$",{returnBegin:!0,contains:[{className:"xmlDocTag",begin:"'''|",contains:[a.PHRASAL_WORDS_MODE]},{className:"xmlDocTag",begin:"",contains:[a.PHRASAL_WORDS_MODE]}]}),a.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$",keywords:"if else elseif end region externalsource"}]}}),a.registerLanguage("vbscript",function(a){return{aliases:["vbs"],case_insensitive:!0,keywords:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},illegal:"//",contains:[a.inherit(a.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),a.COMMENT(/'/,/$/,{relevance:0}),a.C_NUMBER_MODE]}}),a.registerLanguage("vbscript-html",function(a){return{subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}),a.registerLanguage("verilog",function(a){return{aliases:["v"],case_insensitive:!0,keywords:{keyword:"always and assign begin buf bufif0 bufif1 case casex casez cmos deassign default defparam disable edge else end endcase endfunction endmodule endprimitive endspecify endtable endtask event for force forever fork function if ifnone initial inout input join macromodule module nand negedge nmos nor not notif0 notif1 or output parameter pmos posedge primitive pulldown pullup rcmos release repeat rnmos rpmos rtran rtranif0 rtranif1 specify specparam table task timescale tran tranif0 tranif1 wait while xnor xor",typename:"highz0 highz1 integer large medium pull0 pull1 real realtime reg scalared signed small strong0 strong1 supply0 supply0 supply1 supply1 time tri tri0 tri1 triand trior trireg vectored wand weak0 weak1 wire wor"},contains:[a.C_BLOCK_COMMENT_MODE,a.C_LINE_COMMENT_MODE,a.QUOTE_STRING_MODE,{className:"number",begin:"\\b(\\d+'(b|h|o|d|B|H|O|D))?[0-9xzXZ]+",contains:[a.BACKSLASH_ESCAPE],relevance:0},{className:"typename",begin:"\\.\\w+",relevance:0},{className:"value",begin:"#\\((?!parameter).+\\)"},{className:"keyword",begin:"\\+|-|\\*|/|%|<|>|=|#|`|\\!|&|\\||@|:|\\^|~|\\{|\\}",relevance:0}]}}),a.registerLanguage("vhdl",function(a){var b="\\d(_|\\d)*",c="[eE][-+]?"+b,d=b+"(\\."+b+")?("+c+")?",e="\\w+",f=b+"#"+e+"(\\."+e+")?#("+c+")?",g="\\b("+f+"|"+d+")";return{case_insensitive:!0,keywords:{keyword:"abs access after alias all and architecture array assert attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor",typename:"boolean bit character severity_level integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_ulogic std_ulogic_vector std_logic std_logic_vector unsigned signed boolean_vector integer_vector real_vector time_vector"},illegal:"{",contains:[a.C_BLOCK_COMMENT_MODE,a.COMMENT("--","$"),a.QUOTE_STRING_MODE,{className:"number",begin:g,relevance:0},{className:"literal",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[a.BACKSLASH_ESCAPE]},{className:"attribute",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[a.BACKSLASH_ESCAPE]}]}}),a.registerLanguage("vim",function(a){return{lexemes:/[!#@\w]+/,keywords:{keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw d|0 delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu g|0 go gr grepa gu gv ha h|0 helpf helpg helpt hi hid his i|0 ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs n|0 new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf q|0 quita qa r|0 rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv s|0 sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync t|0 tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up v|0 ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"abs acos add and append argc argidx argv asin atan atan2 browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call ceil changenr char2nr cindent clearmatches col complete complete_add complete_check confirm copy cos cosh count cscope_connection cursor deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists exp expand extend feedkeys filereadable filewritable filter finddir findfile float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getloclist getmatches getpid getpos getqflist getreg getregtype gettabvar gettabwinvar getwinposx getwinposy getwinvar glob globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert invert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime log log10 luaeval map maparg mapcheck match matchadd matcharg matchdelete matchend matchlist matchstr max min mkdir mode mzeval nextnonblank nr2char or pathshorten pow prevnonblank printf pumvisible py3eval pyeval range readfile reltime reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat resolve reverse round screenattr screenchar screencol screenrow search searchdecl searchpair searchpairpos searchpos server2client serverlist setbufvar setcmdpos setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar setwinvar sha256 shellescape shiftwidth simplify sin sinh sort soundfold spellbadword spellsuggest split sqrt str2float str2nr strchars strdisplaywidth strftime stridx string strlen strpart strridx strtrans strwidth submatch substitute synconcealed synID synIDattr synIDtrans synstack system tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname tolower toupper tr trunc type undofile undotree values virtcol visualmode wildmenumode winbufnr wincol winheight winline winnr winrestcmd winrestview winsaveview winwidth writefile xor"},illegal:/[{:]/,contains:[a.NUMBER_MODE,a.APOS_STRING_MODE,{className:"string",begin:/"((\\")|[^"\n])*("|\n)/},{className:"variable",begin:/[bwtglsav]:[\w\d_]*/},{className:"function",beginKeywords:"function function!",end:"$",relevance:0,contains:[a.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]}]}}),a.registerLanguage("x86asm",function(a){return{case_insensitive:!0,lexemes:"\\.?"+a.IDENT_RE,keywords:{keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63", literal:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l",pseudo:"db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times",preprocessor:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public ",built_in:"bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[a.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},a.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"},{begin:"\\.[A-Za-z0-9]+"}],relevance:0},{className:"label",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"argument",begin:"%[0-9]+",relevance:0},{className:"built_in",begin:"%!S+",relevance:0}]}}),a.registerLanguage("xl",function(a){var b="ObjectLoader Animate MovieCredits Slides Filters Shading Materials LensFlare Mapping VLCAudioVideo StereoDecoder PointCloud NetworkAccess RemoteControl RegExp ChromaKey Snowfall NodeJS Speech Charts",c={keyword:"if then else do while until for loop import with is as where when by data constant",literal:"true false nil",type:"integer real text name boolean symbol infix prefix postfix block tree",built_in:"in mod rem and or xor not abs sign floor ceil sqrt sin cos tan asin acos atan exp expm1 log log2 log10 log1p pi at",module:b,id:"text_length text_range text_find text_replace contains page slide basic_slide title_slide title subtitle fade_in fade_out fade_at clear_color color line_color line_width texture_wrap texture_transform texture scale_?x scale_?y scale_?z? translate_?x translate_?y translate_?z? rotate_?x rotate_?y rotate_?z? rectangle circle ellipse sphere path line_to move_to quad_to curve_to theme background contents locally time mouse_?x mouse_?y mouse_buttons"},d={className:"constant",begin:"[A-Z][A-Z_0-9]+",relevance:0},e={className:"variable",begin:"([A-Z][a-z_0-9]+)+",relevance:0},f={className:"id",begin:"[a-z][a-z_0-9]+",relevance:0},g={className:"string",begin:'"',end:'"',illegal:"\\n"},h={className:"string",begin:"'",end:"'",illegal:"\\n"},i={className:"string",begin:"<<",end:">>"},j={className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?",relevance:10},k={className:"import",beginKeywords:"import",end:"$",keywords:{keyword:"import",module:b},relevance:0,contains:[g]},l={className:"function",begin:"[a-z].*->"};return{aliases:["tao"],lexemes:/[a-zA-Z][a-zA-Z0-9_?]*/,keywords:c,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,g,h,i,l,k,d,e,f,j,a.NUMBER_MODE]}}),a.registerLanguage("xquery",function(a){var b="for let if while then else return where group by xquery encoding versionmodule namespace boundary-space preserve strip default collation base-uri orderingcopy-namespaces order declare import schema namespace function option in allowing emptyat tumbling window sliding window start when only end when previous next stable ascendingdescending empty greatest least some every satisfies switch case typeswitch try catch andor to union intersect instance of treat as castable cast map array delete insert intoreplace value rename copy modify update",c="false true xs:string xs:integer element item xs:date xs:datetime xs:float xs:double xs:decimal QName xs:anyURI xs:long xs:int xs:short xs:byte attribute",d={className:"variable",begin:/\$[a-zA-Z0-9\-]+/,relevance:5},e={className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},f={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},g={className:"decorator",begin:"%\\w+"},h={className:"comment",begin:"\\(:",end:":\\)",relevance:10,contains:[{className:"doc",begin:"@\\w+"}]},i={begin:"{",end:"}"},j=[d,f,e,h,g,i];return i.contains=j,{aliases:["xpath","xq"],case_insensitive:!1,lexemes:/[a-zA-Z\$][a-zA-Z0-9_:\-]*/,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{keyword:b,literal:c},contains:j}}),a.registerLanguage("zephir",function(a){var b={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null})]},c={variants:[a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE]};return{aliases:["zep"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var let while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally int uint long ulong char uchar double float bool boolean stringlikely unlikely",contains:[a.C_LINE_COMMENT_MODE,a.HASH_COMMENT_MODE,a.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:a.UNDERSCORE_IDENT_RE}),{className:"string",begin:"<<<['\"]?\\w+['\"]?$",end:"^\\w+;",contains:[a.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[a.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",a.C_BLOCK_COMMENT_MODE,b,c]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[a.UNDERSCORE_TITLE_MODE]},{begin:"=>"},b,c]}}),a}),function(){"use strict";function a(a){return("0"+a).slice(-2)}function b(c,d){var e=c.getDay(),f=c.getDate(),g=c.getMonth(),h=c.getFullYear(),i=c.getHours(),l=c.getMinutes(),m=c.getSeconds();return d.replace(/%([%aAbBcdeHIlmMpPSwyYZz])/g,function(d){var n,o=d[1];switch(o){case"%":return"%";case"a":return j[e].slice(0,3);case"A":return j[e];case"b":return k[g].slice(0,3);case"B":return k[g];case"c":return c.toString();case"d":return a(f);case"e":return f;case"H":return a(i);case"I":return a(b(c,"%l"));case"l":return 0===i||12===i?12:(i+12)%12;case"m":return a(g+1);case"M":return a(l);case"p":return i>11?"PM":"AM";case"P":return i>11?"pm":"am";case"S":return a(m);case"w":return e;case"y":return a(h%100);case"Y":return h;case"Z":return n=c.toString().match(/\((\w+)\)$/),n?n[1]:"";case"z":return n=c.toString().match(/\w([+-]\d\d\d\d) /),n?n[1]:""}})}function c(a){this.date=a}function d(){if(null!==l)return l;if(!("Intl"in window))return!1;var a={day:"numeric",month:"short"},b=new window.Intl.DateTimeFormat(void 0,a),c=b.format(new Date(0));return l=!!c.match(/^\d/)}function e(){if(null!==m)return m;if(!("Intl"in window))return!0;var a={day:"numeric",month:"short",year:"numeric"},b=new window.Intl.DateTimeFormat(void 0,a),c=b.format(new Date(0));return m=!!c.match(/\d,/)}function f(a){var b=new Date;return b.getUTCFullYear()===a.getUTCFullYear()}function g(){var a,b,c;for(b=0,c=p.length;c>b;b++)a=p[b],a.textContent=a.getFormattedDate()}function h(a){var c={weekday:{"short":"%a","long":"%A"},day:{numeric:"%e","2-digit":"%d"},month:{"short":"%b","long":"%B"},year:{numeric:"%Y","2-digit":"%y"}},e=d()?"weekday day month year":"weekday month day, year";for(var f in c){var g=c[f][a.getAttribute(f)];e=e.replace(f,g||"")}return e=e.replace(/(\s,)|(,\s$)/,""),b(a._date,e).replace(/\s+/," ").trim()}function i(a){var c={hour:a.getAttribute("hour"),minute:a.getAttribute("minute"),second:a.getAttribute("second")};for(var d in c)c[d]||delete c[d];if(0!==Object.keys(c).length){if("Intl"in window){var e=new window.Intl.DateTimeFormat(void 0,c);return e.format(a._date)}var f=c.second?"%H:%M:%S":"%H:%M";return b(a._date,f)}}var j=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],k=["January","February","March","April","May","June","July","August","September","October","November","December"];c.prototype.toString=function(){var a=this.timeElapsed();return a?a:"on "+this.formatDate()},c.prototype.timeElapsed=function(){var a=(new Date).getTime()-this.date.getTime(),b=Math.round(a/1e3),c=Math.round(b/60),d=Math.round(c/60),e=Math.round(d/24);return 0>a?"just now":10>b?"just now":45>b?b+" seconds ago":90>b?"a minute ago":45>c?c+" minutes ago":90>c?"an hour ago":24>d?d+" hours ago":36>d?"a day ago":30>e?e+" days ago":null},c.prototype.timeAgo=function(){var a=(new Date).getTime()-this.date.getTime(),b=Math.round(a/1e3),c=Math.round(b/60),d=Math.round(c/60),e=Math.round(d/24),f=Math.round(e/30),g=Math.round(f/12);return 0>a?"just now":10>b?"just now":45>b?b+" seconds ago":90>b?"a minute ago":45>c?c+" minutes ago":90>c?"an hour ago":24>d?d+" hours ago":36>d?"a day ago":30>e?e+" days ago":45>e?"a month ago":12>f?f+" months ago":18>f?"a year ago":g+" years ago"},c.prototype.microTimeAgo=function(){var a=(new Date).getTime()-this.date.getTime(),b=a/1e3,c=b/60,d=c/60,e=d/24,f=e/30,g=f/12;return 1>c?"1m":60>c?Math.round(c)+"m":24>d?Math.round(d)+"h":365>e?Math.round(e)+"d":Math.round(g)+"y"};var l=null,m=null;c.prototype.formatDate=function(){var a=d()?"%e %b":"%b %e";return f(this.date)||(a+=e()?", %Y":" %Y"),b(this.date,a)},c.prototype.formatTime=function(){if("Intl"in window){var a=new window.Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit"});return a.format(this.date)}return b(this.date,"%l:%M%P")};var n,o,p=[];o="HTMLTimeElement"in window?Object.create(window.HTMLTimeElement.prototype):Object.create(window.HTMLElement.prototype),o.attributeChangedCallback=function(a,b,c){if("datetime"===a){var d=Date.parse(c);this._date=isNaN(d)?null:new Date(d)}var e=this.getFormattedTitle();e&&this.setAttribute("title",e);var f=this.getFormattedDate();f&&(this.textContent=f)},o.getFormattedTitle=function(){if(this._date){if(this.hasAttribute("title"))return this.getAttribute("title");if("Intl"in window){var a={day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"},b=new window.Intl.DateTimeFormat(void 0,a);return b.format(this._date)}return this._date.toLocaleString()}};var q=Object.create(o);q.createdCallback=function(){var a=this.getAttribute("datetime");a&&this.attributeChangedCallback("datetime",null,a)},q.getFormattedDate=function(){return this._date?new c(this._date).toString():void 0},q.attachedCallback=function(){p.push(this),n||(g(),n=setInterval(g,6e4))},q.detachedCallback=function(){var a=p.indexOf(this);-1!==a&&p.splice(a,1),p.length||n&&(clearInterval(n),n=null)};var r=Object.create(q);r.getFormattedDate=function(){if(this._date){var a=this.getAttribute("format");return"micro"===a?new c(this._date).microTimeAgo():new c(this._date).timeAgo()}};var s=Object.create(o);s.createdCallback=function(){var a;(a=this.getAttribute("datetime"))&&this.attributeChangedCallback("datetime",null,a),(a=this.getAttribute("format"))&&this.attributeChangedCallback("format",null,a)},s.getFormattedDate=function(){if(this._date){var a=h(this)||"",b=i(this)||"";return(a+" "+b).trim()}},window.RelativeTimeElement=document.registerElement("relative-time",{prototype:q,"extends":"time"}),window.TimeAgoElement=document.registerElement("time-ago",{prototype:r,"extends":"time"}),window.LocalTimeElement=document.registerElement("local-time",{prototype:s,"extends":"time"})}(),function(a){"use strict";function b(b,c){if(c=c||{},c.worker&&y.WORKERS_SUPPORTED){var d=k();return d.userStep=c.step,d.userChunk=c.chunk,d.userComplete=c.complete,d.userError=c.error,c.step=r(c.step),c.chunk=r(c.chunk),c.complete=r(c.complete),c.error=r(c.error),delete c.worker,void d.postMessage({input:b,config:c,workerId:d.id})}var h=null;return"string"==typeof b?h=c.download?new e(c):new g(c):(a.File&&b instanceof File||b instanceof Object)&&(h=new f(c)),h.stream(b)}function c(a,b){function c(){"object"==typeof b&&("string"==typeof b.delimiter&&1==b.delimiter.length&&-1==y.BAD_DELIMITERS.indexOf(b.delimiter)&&(i=b.delimiter),("boolean"==typeof b.quotes||b.quotes instanceof Array)&&(h=b.quotes),"string"==typeof b.newline&&(j=b.newline))}function d(a){if("object"!=typeof a)return[];var b=[];for(var c in a)b.push(c);return b}function e(a,b){var c="";"string"==typeof a&&(a=JSON.parse(a)),"string"==typeof b&&(b=JSON.parse(b));var d=a instanceof Array&&a.length>0,e=!(b[0]instanceof Array);if(d){for(var g=0;g0&&(c+=i),c+=f(a[g],g);b.length>0&&(c+=j)}for(var h=0;hl;l++){l>0&&(c+=i);var m=d&&e?a[l]:l;c+=f(b[h][m],l)}h-1||" "==a.charAt(0)||" "==a.charAt(a.length-1);return c?'"'+a+'"':a}function g(a,b){for(var c=0;c-1)return!0;return!1}var h=!1,i=",",j="\r\n";if(c(),"string"==typeof a&&(a=JSON.parse(a)),a instanceof Array){if(!a.length||a[0]instanceof Array)return e(null,a);if("object"==typeof a[0])return e(d(a[0]),a)}else if("object"==typeof a)return"string"==typeof a.data&&(a.data=JSON.parse(a.data)),a.data instanceof Array&&(a.fields||(a.fields=a.data[0]instanceof Array?a.fields:d(a.data[0])),a.data[0]instanceof Array||"object"==typeof a.data[0]||(a.data=[a.data])),e(a.fields||[],a.data||[]);throw"exception: Unable to serialize unrecognized input"}function d(b){function c(a){var b=p(a);b.chunkSize=parseInt(b.chunkSize),a.step||a.chunk||(b.chunkSize=null),this._handle=new h(b),this._handle.streamer=this,this._config=b}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},c.call(this,b),this.parseChunk=function(b){if(this.isFirstChunk&&r(this._config.beforeFirstChunk)){var c=this._config.beforeFirstChunk(b);void 0!==c&&(b=c)}this.isFirstChunk=!1;var d=this._partialLine+b;this._partialLine="";var e=this._handle.parse(d,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var f=e.meta.cursor;this._finished||(this._partialLine=d.substring(f-this._baseIndex),this._baseIndex=f),e&&e.data&&(this._rowCount+=e.data.length);var g=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(u)a.postMessage({results:e,workerId:y.WORKER_ID,finished:g});else if(r(this._config.chunk)){if(this._config.chunk(e,this._handle),this._paused)return;e=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(e.data),this._completeResults.errors=this._completeResults.errors.concat(e.errors),this._completeResults.meta=e.meta),!g||!r(this._config.complete)||e&&e.meta.aborted||this._config.complete(this._completeResults),g||e&&e.meta.paused||this._nextChunk(),e}},this._sendError=function(b){r(this._config.error)?this._config.error(b):u&&this._config.error&&a.postMessage({workerId:y.WORKER_ID,error:b,finished:!1})}}function e(a){function b(a){var b=a.getResponseHeader("Content-Range");return parseInt(b.substr(b.lastIndexOf("/")+1))}a=a||{},a.chunkSize||(a.chunkSize=y.RemoteChunkSize),d.call(this,a);var c;t?this._nextChunk=function(){this._readChunk(),this._chunkLoaded()}:this._nextChunk=function(){this._readChunk()},this.stream=function(a){this._input=a,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(c=new XMLHttpRequest,t||(c.onload=q(this._chunkLoaded,this),c.onerror=q(this._chunkError,this)),c.open("GET",this._input,!t),this._config.chunkSize){var a=this._start+this._config.chunkSize-1;c.setRequestHeader("Range","bytes="+this._start+"-"+a),c.setRequestHeader("If-None-Match","webkit-no-cache")}try{c.send()}catch(b){this._chunkError(b.message)}t&&0==c.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==c.readyState){if(c.status<200||c.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>b(c),this.parseChunk(c.responseText)}},this._chunkError=function(a){var b=c.statusText||a;this._sendError(b)}}function f(a){a=a||{},a.chunkSize||(a.chunkSize=y.LocalChunkSize),d.call(this,a);var b,c,e="undefined"!=typeof FileReader;this.stream=function(a){this._input=a,c=a.slice||a.webkitSlice||a.mozSlice,e?(b=new FileReader,b.onload=q(this._chunkLoaded,this),b.onerror=q(this._chunkError,this)):b=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(a.target.result)},this._chunkError=function(){this._sendError(b.error)}}function g(a){a=a||{},d.call(this,a);var b,c;this.stream=function(a){return b=a,c=a,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var a=this._config.chunkSize,b=a?c.substr(0,a):c;return c=a?c.substr(a):"",this._finished=!c,this.parseChunk(b)}}}function h(a){function b(){if(v&&m&&(j("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+y.DefaultDelimiter+"'"),m=!1),a.skipEmptyLines)for(var b=0;b=u.length?(c.__parsed_extra||(c.__parsed_extra=[]),c.__parsed_extra.push(v.data[b][d])):c[u[d]]=v.data[b][d])}a.header&&(v.data[b]=c,d>u.length?j("FieldMismatch","TooManyFields","Too many fields: expected "+u.length+" fields but parsed "+d,b):d1&&(j+=Math.abs(n-e),e=n):e=n}l.data.length>0&&(k/=l.data.length),("undefined"==typeof d||d>j)&&k>1.99&&(d=j,c=h)}return a.delimiter=c,{successful:!!c,bestDelimiter:c}}function g(a){a=a.substr(0,1048576);var b=a.split("\r");if(1==b.length)return"\n";for(var c=0,d=0;d=b.length/2?"\r\n":"\r"}function h(a){var b=n.test(a);return b?parseFloat(a):a}function j(a,b,c,d){v.errors.push({type:a,code:b,message:c,row:d})}var k,l,m,n=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,o=this,q=0,s=!1,t=!1,u=[],v={data:[],errors:[],meta:{}};if(r(a.step)){var w=a.step;a.step=function(d){if(v=d,c())b();else{if(b(),0==v.data.length)return;q+=d.data.length,a.preview&&q>a.preview?l.abort():w(v,o)}}}this.parse=function(c,d,e){if(a.newline||(a.newline=g(c)),m=!1,!a.delimiter){var h=f(c);h.successful?a.delimiter=h.bestDelimiter:(m=!0,a.delimiter=y.DefaultDelimiter),v.meta.delimiter=a.delimiter}var j=p(a);return a.preview&&a.header&&j.preview++,k=c,l=new i(j),v=l.parse(k,d,e),b(),s?{meta:{paused:!0}}:v||{meta:{paused:!1}}},this.paused=function(){return s},this.pause=function(){s=!0,l.abort(),k=k.substr(l.getCharIndex())},this.resume=function(){s=!1,o.streamer.parseChunk(k)},this.aborted=function(){return t},this.abort=function(){t=!0,l.abort(),v.meta.aborted=!0,r(a.complete)&&a.complete(v),k=""}}function i(a){a=a||{};var b=a.delimiter,c=a.newline,d=a.comments,e=a.step,f=a.preview,g=a.fastMode;if(("string"!=typeof b||y.BAD_DELIMITERS.indexOf(b)>-1)&&(b=","),d===b)throw"Comment character same as delimiter";d===!0?d="#":("string"!=typeof d||y.BAD_DELIMITERS.indexOf(d)>-1)&&(d=!1),"\n"!=c&&"\r"!=c&&"\r\n"!=c&&(c="\n");var h=0,i=!1;this.parse=function(a,j,k){function l(a){v.push(a),y=h}function m(b){return k?o():("undefined"==typeof b&&(b=a.substr(h)),x.push(b),h=q,l(x),u&&p(),o())}function n(b){h=b,l(x),x=[],C=a.indexOf(c,h)}function o(a){return{data:v,errors:w,meta:{delimiter:b,linebreak:c,aborted:i,truncated:!!a,cursor:y+(j||0)}}}function p(){e(o()),v=[],w=[]}if("string"!=typeof a)throw"Input must be a string";var q=a.length,r=b.length,s=c.length,t=d.length,u="function"==typeof e;h=0;var v=[],w=[],x=[],y=0;if(!a)return o();if(g||g!==!1&&-1===a.indexOf('"')){for(var z=a.split(c),A=0;A=f)return v=v.slice(0,f),o(!0)}}return o()}for(var B=a.indexOf(b,h),C=a.indexOf(c,h);;)if('"'!=a[h])if(d&&0===x.length&&a.substr(h,t)===d){if(-1==C)return o();h=C+s,C=a.indexOf(c,h),B=a.indexOf(b,h)}else if(-1!==B&&(C>B||-1===C))x.push(a.substring(h,B)),h=B+r,B=a.indexOf(b,h);else{if(-1===C)break;if(x.push(a.substring(h,C)),n(C+s),u&&(p(),i))return o();if(f&&v.length>=f)return o(!0)}else{var D=h;for(h++;;){var D=a.indexOf('"',D+1);if(-1===D)return k||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:v.length,index:h}),m();if(D===q-1){var E=a.substring(h,D).replace(/""/g,'"');return m(E)}if('"'!=a[D+1]){if(a[D+1]==b){x.push(a.substring(h,D).replace(/""/g,'"')),h=D+1+r,B=a.indexOf(b,h),C=a.indexOf(c,h);break}if(a.substr(D+1,s)===c){if(x.push(a.substring(h,D).replace(/""/g,'"')),n(D+1+s),B=a.indexOf(b,h),u&&(p(),i))return o();if(f&&v.length>=f)return o(!0);break}}else D++}}return m()},this.abort=function(){i=!0},this.getCharIndex=function(){return h}}function j(){var a=document.getElementsByTagName("script");return a.length?a[a.length-1].src:""}function k(){if(!y.WORKERS_SUPPORTED)return!1;if(!v&&null===y.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var b=y.SCRIPT_PATH||s;b+=(-1!==b.indexOf("?")?"&":"?")+"papaworker";var c=new a.Worker(b);return c.onmessage=l,c.id=x++,w[c.id]=c,c}function l(a){var b=a.data,c=w[b.workerId],d=!1;if(b.error)c.userError(b.error,b.file);else if(b.results&&b.results.data){var e=function(){d=!0,m(b.workerId,{data:[],errors:[],meta:{aborted:!0}})},f={abort:e,pause:n,resume:n};if(r(c.userStep)){for(var g=0;g@*'+~#";.,=\- \/${}%?`]/g,root:"#"},a.jstree.create=function(b,c){var d=new a.jstree.core(++e),f=c;return c=a.extend(!0,{},a.jstree.defaults,c),f&&f.plugins&&(c.plugins=f.plugins),a.each(c.plugins,function(a,b){"core"!==a&&(d=d.plugin(b,c[b]))}),a(b).data("jstree",d),d.init(b,c),d},a.jstree.destroy=function(){a(".jstree:jstree").jstree("destroy"),a(k).off(".jstree")},a.jstree.core=function(a){this._id=a,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},a.jstree.reference=function(b){var c=null,d=null;if(!b||!b.id||b.tagName&&b.nodeType||(b=b.id),!d||!d.length)try{d=a(b)}catch(e){}if(!d||!d.length)try{d=a("#"+b.replace(a.jstree.idregex,"\\$&"))}catch(e){}return d&&d.length&&(d=d.closest(".jstree")).length&&(d=d.data("jstree"))?c=d:a(".jstree").each(function(){var d=a(this).data("jstree");return d&&d._model.data[b]?(c=d,!1):void 0}),c},a.fn.jstree=function(c){var d="string"==typeof c,e=Array.prototype.slice.call(arguments,1),f=null;return c!==!0||this.length?(this.each(function(){var g=a.jstree.reference(this),h=d&&g?g[c]:null;return f=d&&h?h.apply(g,e):null,g||d||c!==b&&!a.isPlainObject(c)||a.jstree.create(this,c),(g&&!d||c===!0)&&(f=g||!1),null!==f&&f!==b?!1:void 0}),null!==f&&f!==b?f:this):!1},a.expr[":"].jstree=a.expr.createPseudo(function(c){return function(c){return a(c).hasClass("jstree")&&a(c).data("jstree")!==b}}),a.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:a.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0},a.jstree.core.prototype={plugin:function(b,c){var d=a.jstree.plugins[b];return d?(this._data[b]={},d.prototype=this,new d(c,this)):this},init:function(b,c){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[a.jstree.root]={id:a.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=a(b).addClass("jstree jstree-"+this._id),this.settings=c,this._data.core.ready=!1,this._data.core.loaded=!1, -this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html(""),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().height()||24,this.trigger("loading"),this.load_node(a.jstree.root)},destroy:function(a){if(this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(b){}a||this.element.empty(),this.teardown()},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var b="",c=null,d=0;this.element.on("dblclick.jstree",function(a){if(a.target.tagName&&"input"===a.target.tagName.toLowerCase())return!0;if(k.selection&&k.selection.empty)k.selection.empty();else if(window.getSelection){var b=window.getSelection();try{b.removeAllRanges(),b.collapse()}catch(c){}}}).on("mousedown.jstree",a.proxy(function(a){a.target===this.element[0]&&(a.preventDefault(),d=+new Date)},this)).on("mousedown.jstree",".jstree-ocl",function(a){a.preventDefault()}).on("click.jstree",".jstree-ocl",a.proxy(function(a){this.toggle_node(a.target)},this)).on("dblclick.jstree",".jstree-anchor",a.proxy(function(a){return a.target.tagName&&"input"===a.target.tagName.toLowerCase()?!0:void(this.settings.core.dblclick_toggle&&this.toggle_node(a.target))},this)).on("click.jstree",".jstree-anchor",a.proxy(function(b){b.preventDefault(),b.currentTarget!==k.activeElement&&a(b.currentTarget).focus(),this.activate_node(b.currentTarget,b)},this)).on("keydown.jstree",".jstree-anchor",a.proxy(function(b){if(b.target.tagName&&"input"===b.target.tagName.toLowerCase())return!0;if(32!==b.which&&13!==b.which&&(b.shiftKey||b.ctrlKey||b.altKey||b.metaKey))return!0;var c=null;switch(this._data.core.rtl&&(37===b.which?b.which=39:39===b.which&&(b.which=37)),b.which){case 32:b.ctrlKey&&(b.type="click",a(b.currentTarget).trigger(b));break;case 13:b.type="click",a(b.currentTarget).trigger(b);break;case 37:b.preventDefault(),this.is_open(b.currentTarget)?this.close_node(b.currentTarget):(c=this.get_parent(b.currentTarget),c&&c.id!==a.jstree.root&&this.get_node(c,!0).children(".jstree-anchor").focus());break;case 38:b.preventDefault(),c=this.get_prev_dom(b.currentTarget),c&&c.length&&c.children(".jstree-anchor").focus();break;case 39:b.preventDefault(),this.is_closed(b.currentTarget)?this.open_node(b.currentTarget,function(a){this.get_node(a,!0).children(".jstree-anchor").focus()}):this.is_open(b.currentTarget)&&(c=this.get_node(b.currentTarget,!0).children(".jstree-children")[0],c&&a(this._firstChild(c)).children(".jstree-anchor").focus());break;case 40:b.preventDefault(),c=this.get_next_dom(b.currentTarget),c&&c.length&&c.children(".jstree-anchor").focus();break;case 106:this.open_all();break;case 36:b.preventDefault(),c=this._firstChild(this.get_container_ul()[0]),c&&a(c).children(".jstree-anchor").filter(":visible").focus();break;case 35:b.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().focus()}},this)).on("load_node.jstree",a.proxy(function(b,c){c.status&&(c.node.id!==a.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(a.proxy(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var b,c,d=[];for(b=0,c=this._data.core.selected.length;c>b;b++)d=d.concat(this._model.data[this._data.core.selected[b]].parents);for(d=a.vakata.array_unique(d),b=0,c=d.length;c>b;b++)this.open_node(d[b],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}},this),0))},this)).on("keypress.jstree",a.proxy(function(d){if(d.target.tagName&&"input"===d.target.tagName.toLowerCase())return!0;c&&clearTimeout(c),c=setTimeout(function(){b=""},500);var e=String.fromCharCode(d.which).toLowerCase(),f=this.element.find(".jstree-anchor").filter(":visible"),g=f.index(k.activeElement)||0,h=!1;if(b+=e,b.length>1){if(f.slice(g).each(a.proxy(function(c,d){return 0===a(d).text().toLowerCase().indexOf(b)?(a(d).focus(),h=!0,!1):void 0},this)),h)return;if(f.slice(0,g).each(a.proxy(function(c,d){return 0===a(d).text().toLowerCase().indexOf(b)?(a(d).focus(),h=!0,!1):void 0},this)),h)return}if(new RegExp("^"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(b)){if(f.slice(g+1).each(a.proxy(function(b,c){return a(c).text().toLowerCase().charAt(0)===e?(a(c).focus(),h=!0,!1):void 0},this)),h)return;if(f.slice(0,g+1).each(a.proxy(function(b,c){return a(c).text().toLowerCase().charAt(0)===e?(a(c).focus(),h=!0,!1):void 0},this)),h)return}},this)).on("init.jstree",a.proxy(function(){var a=this.settings.core.themes;this._data.core.themes.dots=a.dots,this._data.core.themes.stripes=a.stripes,this._data.core.themes.icons=a.icons,this.set_theme(a.name||"default",a.url),this.set_theme_variant(a.variant)},this)).on("loading.jstree",a.proxy(function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"]()},this)).on("blur.jstree",".jstree-anchor",a.proxy(function(b){this._data.core.focused=null,a(b.currentTarget).filter(".jstree-hovered").mouseleave(),this.element.attr("tabindex","0")},this)).on("focus.jstree",".jstree-anchor",a.proxy(function(b){var c=this.get_node(b.currentTarget);c&&c.id&&(this._data.core.focused=c.id),this.element.find(".jstree-hovered").not(b.currentTarget).mouseleave(),a(b.currentTarget).mouseenter(),this.element.attr("tabindex","-1")},this)).on("focus.jstree",a.proxy(function(){if(+new Date-d>500&&!this._data.core.focused){d=0;var a=this.get_node(this.element.attr("aria-activedescendant"),!0);a&&a.find("> .jstree-anchor").focus()}},this)).on("mouseenter.jstree",".jstree-anchor",a.proxy(function(a){this.hover_node(a.currentTarget)},this)).on("mouseleave.jstree",".jstree-anchor",a.proxy(function(a){this.dehover_node(a.currentTarget)},this))},unbind:function(){this.element.off(".jstree"),a(k).off(".jstree-"+this._id)},trigger:function(a,b){b||(b={}),b.instance=this,this.element.triggerHandler(a.replace(".jstree","")+".jstree",b)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(b){var c=this.settings.core.strings;return a.isFunction(c)?c.call(this,b):c&&c[b]?c[b]:b},_firstChild:function(a){for(a=a?a.firstChild:null;null!==a&&1!==a.nodeType;)a=a.nextSibling;return a},_nextSibling:function(a){for(a=a?a.nextSibling:null;null!==a&&1!==a.nodeType;)a=a.nextSibling;return a},_previousSibling:function(a){for(a=a?a.previousSibling:null;null!==a&&1!==a.nodeType;)a=a.previousSibling;return a},get_node:function(b,c){b&&b.id&&(b=b.id);var d;try{if(this._model.data[b])b=this._model.data[b];else if("string"==typeof b&&this._model.data[b.replace(/^#/,"")])b=this._model.data[b.replace(/^#/,"")];else if("string"==typeof b&&(d=a("#"+b.replace(a.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[d.closest(".jstree-node").attr("id")])b=this._model.data[d.closest(".jstree-node").attr("id")];else if((d=a(b,this.element)).length&&this._model.data[d.closest(".jstree-node").attr("id")])b=this._model.data[d.closest(".jstree-node").attr("id")];else{if(!(d=a(b,this.element)).length||!d.hasClass("jstree"))return!1;b=this._model.data[a.jstree.root]}return c&&(b=b.id===a.jstree.root?this.element:a("#"+b.id.replace(a.jstree.idregex,"\\$&"),this.element)),b}catch(e){return!1}},get_path:function(b,c,d){if(b=b.parents?b:this.get_node(b),!b||b.id===a.jstree.root||!b.parents)return!1;var e,f,g=[];for(g.push(d?b.id:b.text),e=0,f=b.parents.length;f>e;e++)g.push(d?b.parents[e]:this.get_text(b.parents[e]));return g=g.reverse().slice(1),c?g.join(c):g},get_next_dom:function(b,c){var d;if(b=this.get_node(b,!0),b[0]===this.element[0]){for(d=this._firstChild(this.get_container_ul()[0]);d&&0===d.offsetHeight;)d=this._nextSibling(d);return d?a(d):!1}if(!b||!b.length)return!1;if(c){d=b[0];do d=this._nextSibling(d);while(d&&0===d.offsetHeight);return d?a(d):!1}if(b.hasClass("jstree-open")){for(d=this._firstChild(b.children(".jstree-children")[0]);d&&0===d.offsetHeight;)d=this._nextSibling(d);if(null!==d)return a(d)}d=b[0];do d=this._nextSibling(d);while(d&&0===d.offsetHeight);return null!==d?a(d):b.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(b,c){var d;if(b=this.get_node(b,!0),b[0]===this.element[0]){for(d=this.get_container_ul()[0].lastChild;d&&0===d.offsetHeight;)d=this._previousSibling(d);return d?a(d):!1}if(!b||!b.length)return!1;if(c){d=b[0];do d=this._previousSibling(d);while(d&&0===d.offsetHeight);return d?a(d):!1}d=b[0];do d=this._previousSibling(d);while(d&&0===d.offsetHeight);if(null!==d){for(b=a(d);b.hasClass("jstree-open");)b=b.children(".jstree-children").first().children(".jstree-node:visible:last");return b}return d=b[0].parentNode.parentNode,d&&d.className&&-1!==d.className.indexOf("jstree-node")?a(d):!1},get_parent:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.parent:!1},get_children_dom:function(a){return a=this.get_node(a,!0),a[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):a&&a.length?a.children(".jstree-children").children(".jstree-node"):!1},is_parent:function(a){return a=this.get_node(a),a&&(a.state.loaded===!1||a.children.length>0)},is_loaded:function(a){return a=this.get_node(a),a&&a.state.loaded},is_loading:function(a){return a=this.get_node(a),a&&a.state&&a.state.loading},is_open:function(a){return a=this.get_node(a),a&&a.state.opened},is_closed:function(a){return a=this.get_node(a),a&&this.is_parent(a)&&!a.state.opened},is_leaf:function(a){return!this.is_parent(a)},load_node:function(b,c){var d,e,f,g,h;if(a.isArray(b))return this._load_nodes(b.slice(),c),!0;if(b=this.get_node(b),!b)return c&&c.call(this,b,!1),!1;if(b.state.loaded){for(b.state.loaded=!1,d=0,e=b.children_d.length;e>d;d++){for(f=0,g=b.parents.length;g>f;f++)this._model.data[b.parents[f]].children_d=a.vakata.array_remove_item(this._model.data[b.parents[f]].children_d,b.children_d[d]);this._model.data[b.children_d[d]].state.selected&&(h=!0,this._data.core.selected=a.vakata.array_remove_item(this._data.core.selected,b.children_d[d])),delete this._model.data[b.children_d[d]]}b.children=[],b.children_d=[],h&&this.trigger("changed",{action:"load_node",node:b,selected:this._data.core.selected})}return b.state.failed=!1,b.state.loading=!0,this.get_node(b,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(b,a.proxy(function(a){b=this._model.data[b.id],b.state.loading=!1,b.state.loaded=a,b.state.failed=!b.state.loaded;var d=this.get_node(b,!0),e=0,f=0,g=this._model.data,h=!1;for(e=0,f=b.children.length;f>e;e++)if(g[b.children[e]]&&!g[b.children[e]].state.hidden){h=!0;break}b.state.loaded&&!h&&d&&d.length&&!d.hasClass("jstree-leaf")&&d.removeClass("jstree-closed jstree-open").addClass("jstree-leaf"),d.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:b,status:a}),c&&c.call(this,b,a)},this)),!0},_load_nodes:function(a,b,c){var d,e,f=!0,g=function(){this._load_nodes(a,b,!0)},h=this._model.data,i=[];for(d=0,e=a.length;e>d;d++)!h[a[d]]||(h[a[d]].state.loaded||h[a[d]].state.failed)&&c||(this.is_loading(a[d])||this.load_node(a[d],g),f=!1);if(f){for(d=0,e=a.length;e>d;d++)h[a[d]]&&h[a[d]].state.loaded&&i.push(a[d]);b&&!b.done&&(b.call(this,i),b.done=!0)}},load_all:function(b,c){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var d,e,f=[],g=this._model.data,h=g[b.id].children_d;for(b.state&&!b.state.loaded&&f.push(b.id),d=0,e=h.length;e>d;d++)g[h[d]]&&g[h[d]].state&&!g[h[d]].state.loaded&&f.push(h[d]);f.length?this._load_nodes(f,function(){this.load_all(b,c)}):(c&&c.call(this,b),this.trigger("load_all",{node:b}))},_load_node:function(b,c){var d,e=this.settings.core.data;return e?a.isFunction(e)?e.call(this,b,a.proxy(function(d){d===!1&&c.call(this,!1),this["string"==typeof d?"_append_html_data":"_append_json_data"](b,"string"==typeof d?a(a.parseHTML(d)).filter(function(){return 3!==this.nodeType}):d,function(a){c.call(this,a)})},this)):"object"==typeof e?e.url?(e=a.extend(!0,{},e),a.isFunction(e.url)&&(e.url=e.url.call(this,b)),a.isFunction(e.data)&&(e.data=e.data.call(this,b)),a.ajax(e).done(a.proxy(function(d,e,f){var g=f.getResponseHeader("Content-Type");return g&&-1!==g.indexOf("json")||"object"==typeof d?this._append_json_data(b,d,function(a){c.call(this,a)}):g&&-1!==g.indexOf("html")||"string"==typeof d?this._append_html_data(b,a(a.parseHTML(d)).filter(function(){return 3!==this.nodeType}),function(a){c.call(this,a)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:b.id,xhr:f})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1))},this)).fail(a.proxy(function(a){c.call(this,!1),this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:b.id,xhr:a})},this.settings.core.error.call(this,this._data.core.last_error)},this))):(d=a.isArray(e)||a.isPlainObject(e)?JSON.parse(JSON.stringify(e)):e,b.id===a.jstree.root?this._append_json_data(b,d,function(a){c.call(this,a)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:b.id})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1))):"string"==typeof e?b.id===a.jstree.root?this._append_html_data(b,a(a.parseHTML(e)).filter(function(){return 3!==this.nodeType}),function(a){c.call(this,a)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:b.id})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1)):c.call(this,!1):b.id===a.jstree.root?this._append_html_data(b,this._data.core.original_container_html.clone(!0),function(a){c.call(this,a)}):c.call(this,!1)},_node_changed:function(a){a=this.get_node(a),a&&this._model.changed.push(a.id)},_append_html_data:function(b,c,d){b=this.get_node(b),b.children=[],b.children_d=[];var e,f,g,h=c.is("ul")?c.children():c,i=b.id,j=[],k=[],l=this._model.data,m=l[i],n=this._data.core.selected.length;for(h.each(a.proxy(function(b,c){e=this._parse_model_from_html(a(c),i,m.parents.concat()),e&&(j.push(e),k.push(e),l[e].children_d.length&&(k=k.concat(l[e].children_d)))},this)),m.children=j,m.children_d=k,f=0,g=m.parents.length;g>f;f++)l[m.parents[f]].children_d=l[m.parents[f]].children_d.concat(k);this.trigger("model",{nodes:k,parent:i}),i!==a.jstree.root?(this._node_changed(i),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==n&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),d.call(this,!0)},_append_json_data:function(b,c,d,e){if(null!==this.element){b=this.get_node(b),b.children=[],b.children_d=[],c.d&&(c=c.d,"string"==typeof c&&(c=JSON.parse(c))),a.isArray(c)||(c=[c]);var f=null,g={df:this._model.default_state,dat:c,par:b.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},h=function(a,b){a.data&&(a=a.data);var c,d,e,f,g=a.dat,h=a.par,i=[],j=[],k=[],l=a.df,m=a.t_id,n=a.t_cnt,o=a.m,p=o[h],q=a.sel,r=function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e,f,g,h,i=a.id.toString(),j={id:i,text:a.text||"",icon:a.icon!==b?a.icon:!0,parent:c,parents:d,children:a.children||[],children_d:a.children_d||[],data:a.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(e in l)l.hasOwnProperty(e)&&(j.state[e]=l[e]);if(a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(j.icon=a.data.jstree.icon),(j.icon===b||null===j.icon||""===j.icon)&&(j.icon=!0),a&&a.data&&(j.data=a.data,a.data.jstree))for(e in a.data.jstree)a.data.jstree.hasOwnProperty(e)&&(j.state[e]=a.data.jstree[e]);if(a&&"object"==typeof a.state)for(e in a.state)a.state.hasOwnProperty(e)&&(j.state[e]=a.state[e]);if(a&&"object"==typeof a.li_attr)for(e in a.li_attr)a.li_attr.hasOwnProperty(e)&&(j.li_attr[e]=a.li_attr[e]);if(j.li_attr.id||(j.li_attr.id=i),a&&"object"==typeof a.a_attr)for(e in a.a_attr)a.a_attr.hasOwnProperty(e)&&(j.a_attr[e]=a.a_attr[e]);for(a&&a.children&&a.children===!0&&(j.state.loaded=!1,j.children=[],j.children_d=[]),o[j.id]=j,e=0,f=j.children.length;f>e;e++)g=r(o[j.children[e]],j.id,d),h=o[g],j.children_d.push(g),h.children_d.length&&(j.children_d=j.children_d.concat(h.children_d));return delete a.data,delete a.children,o[j.id].original=a,j.state.selected&&k.push(j.id),j.id},s=function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e,f,g,h,i,j=!1;do j="j"+m+"_"+ ++n;while(o[j]);i={id:!1,text:"string"==typeof a?a:"",icon:"object"==typeof a&&a.icon!==b?a.icon:!0,parent:c,parents:d,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(e in l)l.hasOwnProperty(e)&&(i.state[e]=l[e]);if(a&&a.id&&(i.id=a.id.toString()),a&&a.text&&(i.text=a.text),a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(i.icon=a.data.jstree.icon),(i.icon===b||null===i.icon||""===i.icon)&&(i.icon=!0),a&&a.data&&(i.data=a.data,a.data.jstree))for(e in a.data.jstree)a.data.jstree.hasOwnProperty(e)&&(i.state[e]=a.data.jstree[e]);if(a&&"object"==typeof a.state)for(e in a.state)a.state.hasOwnProperty(e)&&(i.state[e]=a.state[e]);if(a&&"object"==typeof a.li_attr)for(e in a.li_attr)a.li_attr.hasOwnProperty(e)&&(i.li_attr[e]=a.li_attr[e]);if(i.li_attr.id&&!i.id&&(i.id=i.li_attr.id.toString()),i.id||(i.id=j),i.li_attr.id||(i.li_attr.id=i.id),a&&"object"==typeof a.a_attr)for(e in a.a_attr)a.a_attr.hasOwnProperty(e)&&(i.a_attr[e]=a.a_attr[e]);if(a&&a.children&&a.children.length){for(e=0,f=a.children.length;f>e;e++)g=s(a.children[e],i.id,d),h=o[g],i.children.push(g),h.children_d.length&&(i.children_d=i.children_d.concat(h.children_d));i.children_d=i.children_d.concat(i.children)}return a&&a.children&&a.children===!0&&(i.state.loaded=!1,i.children=[],i.children_d=[]),delete a.data,delete a.children,i.original=a,o[i.id]=i,i.state.selected&&k.push(i.id),i.id};if(g.length&&g[0].id!==b&&g[0].parent!==b){for(d=0,e=g.length;e>d;d++)g[d].children||(g[d].children=[]),o[g[d].id.toString()]=g[d];for(d=0,e=g.length;e>d;d++)o[g[d].parent.toString()].children.push(g[d].id.toString()),p.children_d.push(g[d].id.toString());for(d=0,e=p.children.length;e>d;d++)c=r(o[p.children[d]],h,p.parents.concat()),j.push(c),o[c].children_d.length&&(j=j.concat(o[c].children_d));for(d=0,e=p.parents.length;e>d;d++)o[p.parents[d]].children_d=o[p.parents[d]].children_d.concat(j);f={cnt:n,mod:o,sel:q,par:h,dpc:j,add:k}}else{for(d=0,e=g.length;e>d;d++)c=s(g[d],h,p.parents.concat()),c&&(i.push(c),j.push(c),o[c].children_d.length&&(j=j.concat(o[c].children_d)));for(p.children=i,p.children_d=j,d=0,e=p.parents.length;e>d;d++)o[p.parents[d]].children_d=o[p.parents[d]].children_d.concat(j);f={cnt:n,mod:o,sel:q,par:h,dpc:j,add:k}}return"undefined"!=typeof window&&"undefined"!=typeof window.document?f:void postMessage(f)},i=function(b,c){if(null!==this.element){if(this._cnt=b.cnt,this._model.data=b.mod,c){var e,f,g=b.add,h=b.sel,i=this._data.core.selected.slice(),j=this._model.data;if(h.length!==i.length||a.vakata.array_unique(h.concat(i)).length!==h.length){for(e=0,f=h.length;f>e;e++)-1===a.inArray(h[e],g)&&-1===a.inArray(h[e],i)&&(j[h[e]].state.selected=!1);for(e=0,f=i.length;f>e;e++)-1===a.inArray(i[e],h)&&(j[i[e]].state.selected=!0)}}b.add.length&&(this._data.core.selected=this._data.core.selected.concat(b.add)),this.trigger("model",{nodes:b.dpc,parent:b.par}),b.par!==a.jstree.root?(this._node_changed(b.par),this.redraw()):this.redraw(!0),b.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),d.call(this,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+h.toString()],{type:"text/javascript"}))),!this._data.core.working||e?(this._data.core.working=!0,f=new window.Worker(this._wrk),f.onmessage=a.proxy(function(a){i.call(this,a.data,!0);try{f.terminate(),f=null}catch(b){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1},this),g.par?f.postMessage(g):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([b,c,d,!0])}catch(j){i.call(this,h(g),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else i.call(this,h(g),!1)}},_parse_model_from_html:function(c,d,e){e=e?[].concat(e):[],d&&e.unshift(d);var f,g,h,i,j,k=this._model.data,l={id:!1,text:!1,icon:!0,parent:d,parents:e,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(h in this._model.default_state)this._model.default_state.hasOwnProperty(h)&&(l.state[h]=this._model.default_state[h]);if(i=a.vakata.attributes(c,!0),a.each(i,function(b,c){return c=a.trim(c),c.length?(l.li_attr[b]=c,void("id"===b&&(l.id=c.toString()))):!0}),i=c.children("a").first(),i.length&&(i=a.vakata.attributes(i,!0),a.each(i,function(b,c){c=a.trim(c),c.length&&(l.a_attr[b]=c)})),i=c.children("a").first().length?c.children("a").first().clone():c.clone(),i.children("ins, i, ul").remove(),i=i.html(),i=a("
            ").html(i),l.text=this.settings.core.force_text?i.text():i.html(),i=c.data(),l.data=i?a.extend(!0,{},i):null,l.state.opened=c.hasClass("jstree-open"),l.state.selected=c.children("a").hasClass("jstree-clicked"),l.state.disabled=c.children("a").hasClass("jstree-disabled"),l.data&&l.data.jstree)for(h in l.data.jstree)l.data.jstree.hasOwnProperty(h)&&(l.state[h]=l.data.jstree[h]);i=c.children("a").children(".jstree-themeicon"),i.length&&(l.icon=i.hasClass("jstree-themeicon-hidden")?!1:i.attr("rel")),l.state.icon!==b&&(l.icon=l.state.icon),(l.icon===b||null===l.icon||""===l.icon)&&(l.icon=!0),i=c.children("ul").children("li");do j="j"+this._id+"_"+ ++this._cnt;while(k[j]);return l.id=l.li_attr.id?l.li_attr.id.toString():j,i.length?(i.each(a.proxy(function(b,c){f=this._parse_model_from_html(a(c),l.id,e),g=this._model.data[f],l.children.push(f),g.children_d.length&&(l.children_d=l.children_d.concat(g.children_d))},this)),l.children_d=l.children_d.concat(l.children)):c.hasClass("jstree-closed")&&(l.state.loaded=!1),l.li_attr["class"]&&(l.li_attr["class"]=l.li_attr["class"].replace("jstree-closed","").replace("jstree-open","")),l.a_attr["class"]&&(l.a_attr["class"]=l.a_attr["class"].replace("jstree-clicked","").replace("jstree-disabled","")),k[l.id]=l,l.state.selected&&this._data.core.selected.push(l.id),l.id},_parse_model_from_flat_json:function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e,f,g,h,i=a.id.toString(),j=this._model.data,k=this._model.default_state,l={id:i,text:a.text||"",icon:a.icon!==b?a.icon:!0,parent:c,parents:d,children:a.children||[],children_d:a.children_d||[],data:a.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(e in k)k.hasOwnProperty(e)&&(l.state[e]=k[e]);if(a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(l.icon=a.data.jstree.icon),(l.icon===b||null===l.icon||""===l.icon)&&(l.icon=!0),a&&a.data&&(l.data=a.data,a.data.jstree))for(e in a.data.jstree)a.data.jstree.hasOwnProperty(e)&&(l.state[e]=a.data.jstree[e]);if(a&&"object"==typeof a.state)for(e in a.state)a.state.hasOwnProperty(e)&&(l.state[e]=a.state[e]);if(a&&"object"==typeof a.li_attr)for(e in a.li_attr)a.li_attr.hasOwnProperty(e)&&(l.li_attr[e]=a.li_attr[e]);if(l.li_attr.id||(l.li_attr.id=i),a&&"object"==typeof a.a_attr)for(e in a.a_attr)a.a_attr.hasOwnProperty(e)&&(l.a_attr[e]=a.a_attr[e]);for(a&&a.children&&a.children===!0&&(l.state.loaded=!1,l.children=[],l.children_d=[]),j[l.id]=l,e=0,f=l.children.length;f>e;e++)g=this._parse_model_from_flat_json(j[l.children[e]],l.id,d),h=j[g],l.children_d.push(g),h.children_d.length&&(l.children_d=l.children_d.concat(h.children_d));return delete a.data,delete a.children,j[l.id].original=a,l.state.selected&&this._data.core.selected.push(l.id),l.id},_parse_model_from_json:function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e,f,g,h,i,j=!1,k=this._model.data,l=this._model.default_state;do j="j"+this._id+"_"+ ++this._cnt;while(k[j]);i={id:!1,text:"string"==typeof a?a:"",icon:"object"==typeof a&&a.icon!==b?a.icon:!0,parent:c,parents:d,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(e in l)l.hasOwnProperty(e)&&(i.state[e]=l[e]);if(a&&a.id&&(i.id=a.id.toString()),a&&a.text&&(i.text=a.text),a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(i.icon=a.data.jstree.icon),(i.icon===b||null===i.icon||""===i.icon)&&(i.icon=!0),a&&a.data&&(i.data=a.data,a.data.jstree))for(e in a.data.jstree)a.data.jstree.hasOwnProperty(e)&&(i.state[e]=a.data.jstree[e]);if(a&&"object"==typeof a.state)for(e in a.state)a.state.hasOwnProperty(e)&&(i.state[e]=a.state[e]);if(a&&"object"==typeof a.li_attr)for(e in a.li_attr)a.li_attr.hasOwnProperty(e)&&(i.li_attr[e]=a.li_attr[e]);if(i.li_attr.id&&!i.id&&(i.id=i.li_attr.id.toString()),i.id||(i.id=j),i.li_attr.id||(i.li_attr.id=i.id),a&&"object"==typeof a.a_attr)for(e in a.a_attr)a.a_attr.hasOwnProperty(e)&&(i.a_attr[e]=a.a_attr[e]);if(a&&a.children&&a.children.length){for(e=0,f=a.children.length;f>e;e++)g=this._parse_model_from_json(a.children[e],i.id,d),h=k[g],i.children.push(g),h.children_d.length&&(i.children_d=i.children_d.concat(h.children_d));i.children_d=i.children_d.concat(i.children)}return a&&a.children&&a.children===!0&&(i.state.loaded=!1,i.children=[],i.children_d=[]),delete a.data,delete a.children,i.original=a,k[i.id]=i,i.state.selected&&this._data.core.selected.push(i.id),i.id},_redraw:function(){var b,c,d,e=this._model.force_full_redraw?this._model.data[a.jstree.root].children.concat([]):this._model.changed.concat([]),f=k.createElement("UL"),g=this._data.core.focused;for(c=0,d=e.length;d>c;c++)b=this.redraw_node(e[c],!0,this._model.force_full_redraw),b&&this._model.force_full_redraw&&f.appendChild(b);this._model.force_full_redraw&&(f.className=this.get_container_ul()[0].className,f.setAttribute("role","group"),this.element.empty().append(f)),null!==g&&(b=this.get_node(g,!0),b&&b.length&&b.children(".jstree-anchor")[0]!==k.activeElement?b.children(".jstree-anchor").focus():this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:e})},redraw:function(a){a&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(b){var c=this.get_node(b),d=!1,e=!1,f=!1,g=k;if(!c)return!1;if(c.id===a.jstree.root)return this.redraw(!0);if(b=this.get_node(b,!0),!b||!b.length)return!1;if(b.children(".jstree-children").remove(),b=b[0],c.children.length&&c.state.loaded){for(f=g.createElement("UL"),f.setAttribute("role","group"),f.className="jstree-children",d=0,e=c.children.length;e>d;d++)f.appendChild(this.redraw_node(c.children[d],!0,!0));b.appendChild(f)}},redraw_node:function(b,c,d,e){var f=this.get_node(b),g=!1,h=!1,i=!1,j=!1,m=!1,n=!1,o="",p=k,q=this._model.data,r=!1,s=null,t=0,u=0,v=!1,w=!1;if(!f)return!1;if(f.id===a.jstree.root)return this.redraw(!0);if(c=c||0===f.children.length,b=k.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(f.id[0])?"\\3"+f.id[0]+" "+f.id.substr(1).replace(a.jstree.idregex,"\\$&"):f.id.replace(a.jstree.idregex,"\\$&"))):k.getElementById(f.id))b=a(b),d||(g=b.parent().parent()[0],g===this.element[0]&&(g=null),h=b.index()),c||!f.children.length||b.children(".jstree-children").length||(c=!0),c||(i=b.children(".jstree-children")[0]),r=b.children(".jstree-anchor")[0]===k.activeElement,b.remove();else if(c=!0,!d){if(g=f.parent!==a.jstree.root?a("#"+f.parent.replace(a.jstree.idregex,"\\$&"),this.element)[0]:null,!(null===g||g&&q[f.parent].state.opened))return!1;h=a.inArray(f.id,null===g?q[a.jstree.root].children:q[f.parent].children)}b=l.cloneNode(!0),o="jstree-node ";for(j in f.li_attr)if(f.li_attr.hasOwnProperty(j)){if("id"===j)continue;"class"!==j?b.setAttribute(j,f.li_attr[j]):o+=f.li_attr[j]}for(f.a_attr.id||(f.a_attr.id=f.id+"_anchor"),b.setAttribute("aria-selected",!!f.state.selected),b.setAttribute("aria-level",f.parents.length),b.setAttribute("aria-labelledby",f.a_attr.id),f.state.disabled&&b.setAttribute("aria-disabled",!0),j=0,m=f.children.length;m>j;j++)if(!q[f.children[j]].state.hidden){v=!0;break}if(null!==f.parent&&q[f.parent]&&!f.state.hidden&&(j=a.inArray(f.id,q[f.parent].children),w=f.id,-1!==j))for(j++,m=q[f.parent].children.length;m>j&&(q[q[f.parent].children[j]].state.hidden||(w=q[f.parent].children[j]),w===f.id);j++);f.state.hidden&&(o+=" jstree-hidden"),f.state.loaded&&!v?o+=" jstree-leaf":(o+=f.state.opened&&f.state.loaded?" jstree-open":" jstree-closed",b.setAttribute("aria-expanded",f.state.opened&&f.state.loaded)),w===f.id&&(o+=" jstree-last"),b.id=f.id,b.className=o,o=(f.state.selected?" jstree-clicked":"")+(f.state.disabled?" jstree-disabled":"");for(m in f.a_attr)if(f.a_attr.hasOwnProperty(m)){if("href"===m&&"#"===f.a_attr[m])continue;"class"!==m?b.childNodes[1].setAttribute(m,f.a_attr[m]):o+=" "+f.a_attr[m]}if(o.length&&(b.childNodes[1].className="jstree-anchor "+o),(f.icon&&f.icon!==!0||f.icon===!1)&&(f.icon===!1?b.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===f.icon.indexOf("/")&&-1===f.icon.indexOf(".")?b.childNodes[1].childNodes[0].className+=" "+f.icon+" jstree-themeicon-custom":(b.childNodes[1].childNodes[0].style.backgroundImage="url("+f.icon+")",b.childNodes[1].childNodes[0].style.backgroundPosition="center center",b.childNodes[1].childNodes[0].style.backgroundSize="auto",b.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?b.childNodes[1].appendChild(p.createTextNode(f.text)):b.childNodes[1].innerHTML+=f.text,c&&f.children.length&&(f.state.opened||e)&&f.state.loaded){for(n=p.createElement("UL"),n.setAttribute("role","group"),n.className="jstree-children",j=0,m=f.children.length;m>j;j++)n.appendChild(this.redraw_node(f.children[j],c,!0));b.appendChild(n)}if(i&&b.appendChild(i),!d){for(g||(g=this.element[0]),j=0,m=g.childNodes.length;m>j;j++)if(g.childNodes[j]&&g.childNodes[j].className&&-1!==g.childNodes[j].className.indexOf("jstree-children")){s=g.childNodes[j];break}s||(s=p.createElement("UL"),s.setAttribute("role","group"),s.className="jstree-children",g.appendChild(s)),g=s,hf;f++)this.open_node(c[f],d,e);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?(e=e===b?this.settings.core.animation:e,this.is_closed(c)?this.is_loaded(c)?(h=this.get_node(c,!0),i=this,h.length&&(e&&h.children(".jstree-children").length&&h.children(".jstree-children").stop(!0,!0),c.children.length&&!this._firstChild(h.children(".jstree-children")[0])&&this.draw_children(c),e?(this.trigger("before_open",{node:c}),h.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").attr("aria-expanded",!0).children(".jstree-children").stop(!0,!0).slideDown(e,function(){this.style.display="",i.trigger("after_open",{node:c})})):(this.trigger("before_open",{node:c}),h[0].className=h[0].className.replace("jstree-closed","jstree-open"),h[0].setAttribute("aria-expanded",!0))),c.state.opened=!0,d&&d.call(this,c,!0),h.length||this.trigger("before_open",{node:c}),this.trigger("open_node",{node:c}),e&&h.length||this.trigger("after_open",{node:c}),!0):this.is_loading(c)?setTimeout(a.proxy(function(){this.open_node(c,d,e)},this),500):void this.load_node(c,function(a,b){return b?this.open_node(a,d,e):d?d.call(this,a,!1):!1}):(d&&d.call(this,c,!1),!1)):!1},_open_to:function(b){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var c,d,e=b.parents;for(c=0,d=e.length;d>c;c+=1)c!==a.jstree.root&&this.open_node(e[c],!1,0);return a("#"+b.id.replace(a.jstree.idregex,"\\$&"),this.element)},close_node:function(c,d){var e,f,g,h;if(a.isArray(c)){for(c=c.slice(),e=0,f=c.length;f>e;e++)this.close_node(c[e],d);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?this.is_closed(c)?!1:(d=d===b?this.settings.core.animation:d,g=this,h=this.get_node(c,!0),h.length&&(d?h.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").attr("aria-expanded",!1).children(".jstree-children").stop(!0,!0).slideUp(d,function(){this.style.display="",h.children(".jstree-children").remove(),g.trigger("after_close",{node:c})}):(h[0].className=h[0].className.replace("jstree-open","jstree-closed"),h.attr("aria-expanded",!1).children(".jstree-children").remove())),c.state.opened=!1,this.trigger("close_node",{node:c}),void(d&&h.length||this.trigger("after_close",{node:c}))):!1},toggle_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.toggle_node(b[c]);return!0}return this.is_closed(b)?this.open_node(b):this.is_open(b)?this.close_node(b):void 0},open_all:function(b,c,d){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var e,f,g,h=b.id===a.jstree.root?this.get_container_ul():this.get_node(b,!0);if(!h.length){for(e=0,f=b.children_d.length;f>e;e++)this.is_closed(this._model.data[b.children_d[e]])&&(this._model.data[b.children_d[e]].state.opened=!0);return this.trigger("open_all",{node:b})}d=d||h,g=this,h=this.is_closed(b)?h.find(".jstree-closed").addBack():h.find(".jstree-closed"),h.each(function(){g.open_node(this,function(a,b){b&&this.is_parent(a)&&this.open_all(a,c,d)},c||0)}),0===d.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(d)})},close_all:function(b,c){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var d,e,f=b.id===a.jstree.root?this.get_container_ul():this.get_node(b,!0),g=this;for(f.length&&(f=this.is_open(b)?f.find(".jstree-open").addBack():f.find(".jstree-open"),a(f.get().reverse()).each(function(){g.close_node(this,c||0)})),d=0,e=b.children_d.length;e>d;d++)this._model.data[b.children_d[d]].state.opened=!1;this.trigger("close_all",{node:b})},is_disabled:function(a){return a=this.get_node(a),a&&a.state&&a.state.disabled},enable_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.enable_node(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.state.disabled=!1,this.get_node(b,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),void this.trigger("enable_node",{node:b})):!1},disable_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.disable_node(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.state.disabled=!0,this.get_node(b,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),void this.trigger("disable_node",{node:b})):!1},hide_node:function(b,c){var d,e;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.hide_node(b[d],!0);return this.redraw(),!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?void(b.state.hidden||(b.state.hidden=!0,this._node_changed(b.parent),c||this.redraw(),this.trigger("hide_node",{node:b}))):!1},show_node:function(b,c){var d,e;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.show_node(b[d],!0);return this.redraw(),!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?void(b.state.hidden&&(b.state.hidden=!1,this._node_changed(b.parent),c||this.redraw(),this.trigger("show_node",{node:b}))):!1},hide_all:function(b){var c,d=this._model.data,e=[];for(c in d)d.hasOwnProperty(c)&&c!==a.jstree.root&&!d[c].state.hidden&&(d[c].state.hidden=!0,e.push(c));return this._model.force_full_redraw=!0,b||this.redraw(),this.trigger("hide_all",{nodes:e}),e},show_all:function(b){var c,d=this._model.data,e=[];for(c in d)d.hasOwnProperty(c)&&c!==a.jstree.root&&d[c].state.hidden&&(d[c].state.hidden=!1,e.push(c));return this._model.force_full_redraw=!0,b||this.redraw(),this.trigger("show_all",{nodes:e}),e},activate_node:function(a,c){if(this.is_disabled(a))return!1;if(c&&"object"==typeof c||(c={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==b?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(c.metaKey||c.ctrlKey||c.shiftKey)&&(!c.shiftKey||this._data.core.last_clicked&&this.get_parent(a)&&this.get_parent(a)===this._data.core.last_clicked.parent))if(c.shiftKey){var d,e,f=this.get_node(a).id,g=this._data.core.last_clicked.id,h=this.get_node(this._data.core.last_clicked.parent).children,i=!1;for(d=0,e=h.length;e>d;d+=1)h[d]===f&&(i=!i),h[d]===g&&(i=!i),this.is_disabled(h[d])||!i&&h[d]!==f&&h[d]!==g?this.deselect_node(h[d],!0,c):this.select_node(h[d],!0,!1,c);this.trigger("changed",{action:"select_node",node:this.get_node(a),selected:this._data.core.selected,event:c})}else this.is_selected(a)?this.deselect_node(a,!1,c):this.select_node(a,!1,!1,c);else!this.settings.core.multiple&&(c.metaKey||c.ctrlKey||c.shiftKey)&&this.is_selected(a)?this.deselect_node(a,!1,c):(this.deselect_all(!0),this.select_node(a,!1,!1,c),this._data.core.last_clicked=this.get_node(a));this.trigger("activate_node",{node:this.get_node(a),event:c})},hover_node:function(a){if(a=this.get_node(a,!0),!a||!a.length||a.children(".jstree-hovered").length)return!1;var b=this.element.find(".jstree-hovered"),c=this.element;b&&b.length&&this.dehover_node(b),a.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(a)}),setTimeout(function(){c.attr("aria-activedescendant",a[0].id)},0)},dehover_node:function(a){return a=this.get_node(a,!0),a&&a.length&&a.children(".jstree-hovered").length?(a.children(".jstree-anchor").removeClass("jstree-hovered"),void this.trigger("dehover_node",{node:this.get_node(a)})):!1},select_node:function(b,c,d,e){var f,g,h;if(a.isArray(b)){for(b=b.slice(),g=0,h=b.length;h>g;g++)this.select_node(b[g],c,d,e);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=this.get_node(b,!0),void(b.state.selected||(b.state.selected=!0,this._data.core.selected.push(b.id),d||(f=this._open_to(b)),f&&f.length&&f.attr("aria-selected",!0).children(".jstree-anchor").addClass("jstree-clicked"),this.trigger("select_node",{node:b,selected:this._data.core.selected,event:e}),c||this.trigger("changed",{action:"select_node",node:b,selected:this._data.core.selected,event:e})))):!1},deselect_node:function(b,c,d){var e,f,g;if(a.isArray(b)){for(b=b.slice(),e=0,f=b.length;f>e;e++)this.deselect_node(b[e],c,d);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(g=this.get_node(b,!0),void(b.state.selected&&(b.state.selected=!1,this._data.core.selected=a.vakata.array_remove_item(this._data.core.selected,b.id),g.length&&g.attr("aria-selected",!1).children(".jstree-anchor").removeClass("jstree-clicked"),this.trigger("deselect_node",{node:b,selected:this._data.core.selected,event:d}),c||this.trigger("changed",{action:"deselect_node",node:b,selected:this._data.core.selected,event:d})))):!1},select_all:function(b){var c,d,e=this._data.core.selected.concat([]);for(this._data.core.selected=this._model.data[a.jstree.root].children_d.concat(),c=0,d=this._data.core.selected.length;d>c;c++)this._model.data[this._data.core.selected[c]]&&(this._model.data[this._data.core.selected[c]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),b||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:e})},deselect_all:function(a){var b,c,d=this._data.core.selected.concat([]);for(b=0,c=this._data.core.selected.length;c>b;b++)this._model.data[this._data.core.selected[b]]&&(this._model.data[this._data.core.selected[b]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").parent().attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:d}),a||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:d})},is_selected:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.state.selected:!1},get_selected:function(b){return b?a.map(this._data.core.selected,a.proxy(function(a){return this.get_node(a)},this)):this._data.core.selected.slice()},get_top_selected:function(b){var c,d,e,f,g=this.get_selected(!0),h={};for(c=0,d=g.length;d>c;c++)h[g[c].id]=g[c];for(c=0,d=g.length;d>c;c++)for(e=0,f=g[c].children_d.length;f>e;e++)h[g[c].children_d[e]]&&delete h[g[c].children_d[e]];g=[];for(c in h)h.hasOwnProperty(c)&&g.push(c);return b?a.map(g,a.proxy(function(a){return this.get_node(a)},this)):g},get_bottom_selected:function(b){var c,d,e=this.get_selected(!0),f=[];for(c=0,d=e.length;d>c;c++)e[c].children.length||f.push(e[c].id);return b?a.map(f,a.proxy(function(a){return this.get_node(a)},this)):f},get_state:function(){var b,c={core:{open:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}};for(b in this._model.data)this._model.data.hasOwnProperty(b)&&b!==a.jstree.root&&(this._model.data[b].state.opened&&c.core.open.push(b),this._model.data[b].state.selected&&c.core.selected.push(b));return c},set_state:function(c,d){if(c){if(c.core){var e,f;if(c.core.open)return a.isArray(c.core.open)&&c.core.open.length?this._load_nodes(c.core.open,function(a){this.open_node(a,!1,0),delete c.core.open,this.set_state(c,d)},!0):(delete c.core.open,this.set_state(c,d)),!1;if(c.core.scroll)return c.core.scroll&&c.core.scroll.left!==b&&this.element.scrollLeft(c.core.scroll.left),c.core.scroll&&c.core.scroll.top!==b&&this.element.scrollTop(c.core.scroll.top),delete c.core.scroll,this.set_state(c,d),!1;if(c.core.selected)return e=this,this.deselect_all(),a.each(c.core.selected,function(a,b){e.select_node(b,!1,!0)}),delete c.core.selected,this.set_state(c,d),!1;for(f in c)c.hasOwnProperty(f)&&"core"!==f&&-1===a.inArray(f,this.settings.plugins)&&delete c[f];if(a.isEmptyObject(c.core))return delete c.core,this.set_state(c,d),!1}return a.isEmptyObject(c)?(c=null,d&&d.call(this),this.trigger("set_state"),!1):!0}return!1},refresh:function(b,c){this._data.core.state=c===!0?{}:this.get_state(),c&&a.isFunction(c)&&(this._data.core.state=c.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[a.jstree.root]={id:a.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var d=this.get_container_ul()[0].className;b||(this.element.html(""),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(a.jstree.root,function(b,c){c&&(this.get_container_ul()[0].className=d,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(a.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(b){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var c=[],d=[];this._data.core.selected.concat([]);d.push(b.id),b.state.opened===!0&&c.push(b.id),this.get_node(b,!0).find(".jstree-open").each(function(){c.push(this.id)}),this._load_nodes(d,a.proxy(function(a){this.open_node(c,!1,0),this.select_node(this._data.core.selected),this.trigger("refresh_node",{node:b,nodes:a})},this))},set_id:function(b,c){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var d,e,f=this._model.data;for(c=c.toString(),f[b.parent].children[a.inArray(b.id,f[b.parent].children)]=c,d=0,e=b.parents.length;e>d;d++)f[b.parents[d]].children_d[a.inArray(b.id,f[b.parents[d]].children_d)]=c;for(d=0,e=b.children.length;e>d;d++)f[b.children[d]].parent=c;for(d=0,e=b.children_d.length;e>d;d++)f[b.children_d[d]].parents[a.inArray(b.id,f[b.children_d[d]].parents)]=c;return d=a.inArray(b.id,this._data.core.selected),-1!==d&&(this._data.core.selected[d]=c),d=this.get_node(b.id,!0),d&&(d.attr("id",c).children(".jstree-anchor").attr("id",c+"_anchor").end().attr("aria-labelledby",c+"_anchor"),this.element.attr("aria-activedescendant")===b.id&&this.element.attr("aria-activedescendant",c)),delete f[b.id],b.id=c,b.li_attr.id=c,f[c]=b,!0},get_text:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.text:!1},set_text:function(b,c){var d,e;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.set_text(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.text=c,this.get_node(b,!0).length&&this.redraw_node(b.id),this.trigger("set_text",{obj:b,text:c}),!0):!1},get_json:function(b,c,d){if(b=this.get_node(b||a.jstree.root),!b)return!1;c&&c.flat&&!d&&(d=[]);var e,f,g={id:b.id,text:b.text,icon:this.get_icon(b),li_attr:a.extend(!0,{},b.li_attr),a_attr:a.extend(!0,{},b.a_attr),state:{},data:c&&c.no_data?!1:a.extend(!0,{},b.data)};if(c&&c.flat?g.parent=b.parent:g.children=[],!c||!c.no_state)for(e in b.state)b.state.hasOwnProperty(e)&&(g.state[e]=b.state[e]);if(c&&c.no_id&&(delete g.id,g.li_attr&&g.li_attr.id&&delete g.li_attr.id,g.a_attr&&g.a_attr.id&&delete g.a_attr.id),c&&c.flat&&b.id!==a.jstree.root&&d.push(g),!c||!c.no_children)for(e=0,f=b.children.length;f>e;e++)c&&c.flat?this.get_json(b.children[e],c,d):g.children.push(this.get_json(b.children[e],c));return c&&c.flat?d:b.id===a.jstree.root?g.children:g},create_node:function(c,d,e,f,g){if(null===c&&(c=a.jstree.root),c=this.get_node(c),!c)return!1;if(e=e===b?"last":e,!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(c))return this.load_node(c,function(){this.create_node(c,d,e,f,!0)});d||(d={text:this.get_string("New node")}),"string"==typeof d&&(d={text:d}),d.text===b&&(d.text=this.get_string("New node"));var h,i,j,k;switch(c.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":h=this.get_node(c.parent),e=a.inArray(c.id,h.children),c=h;break;case"after":h=this.get_node(c.parent),e=a.inArray(c.id,h.children)+1,c=h;break;case"inside":case"first":e=0;break;case"last":e=c.children.length;break;default:e||(e=0)}if(e>c.children.length&&(e=c.children.length),d.id||(d.id=!0),!this.check("create_node",d,c,e))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(d.id===!0&&delete d.id,d=this._parse_model_from_json(d,c.id,c.parents.concat()),!d)return!1;for(h=this.get_node(d),i=[],i.push(d),i=i.concat(h.children_d),this.trigger("model",{nodes:i,parent:c.id}),c.children_d=c.children_d.concat(i),j=0,k=c.parents.length;k>j;j++)this._model.data[c.parents[j]].children_d=this._model.data[c.parents[j]].children_d.concat(i);for(d=h,h=[],j=0,k=c.children.length;k>j;j++)h[j>=e?j+1:j]=c.children[j];return h[e]=d.id,c.children=h,this.redraw_node(c,!0),f&&f.call(this,this.get_node(d)),this.trigger("create_node",{node:this.get_node(d),parent:c.id,position:e}),d.id},rename_node:function(b,c){var d,e,f;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.rename_node(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=b.text,this.check("rename_node",b,this.get_parent(b),c)?(this.set_text(b,c),this.trigger("rename_node",{node:b,text:c,old:f}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1)):!1},delete_node:function(b){var c,d,e,f,g,h,i,j,k,l,m,n;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.delete_node(b[c]);return!0}if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;if(e=this.get_node(b.parent),f=a.inArray(b.id,e.children),l=!1,!this.check("delete_node",b,e,f))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==f&&(e.children=a.vakata.array_remove(e.children,f)),g=b.children_d.concat([]),g.push(b.id),j=0,k=g.length;k>j;j++){for(h=0,i=b.parents.length;i>h;h++)f=a.inArray(g[j],this._model.data[b.parents[h]].children_d),-1!==f&&(this._model.data[b.parents[h]].children_d=a.vakata.array_remove(this._model.data[b.parents[h]].children_d,f));this._model.data[g[j]].state.selected&&(l=!0,f=a.inArray(g[j],this._data.core.selected),-1!==f&&(this._data.core.selected=a.vakata.array_remove(this._data.core.selected,f)))}for(this.trigger("delete_node",{node:b,parent:e.id}),l&&this.trigger("changed",{action:"delete_node",node:b,selected:this._data.core.selected,parent:e.id}),j=0,k=g.length;k>j;j++)delete this._model.data[g[j]];return-1!==a.inArray(this._data.core.focused,g)&&(this._data.core.focused=null,m=this.element[0].scrollTop,n=this.element[0].scrollLeft,e.id===a.jstree.root?this.get_node(this._model.data[a.jstree.root].children[0],!0).children(".jstree-anchor").focus():this.get_node(e,!0).children(".jstree-anchor").focus(),this.element[0].scrollTop=m,this.element[0].scrollLeft=n),this.redraw_node(e,!0),!0},check:function(b,c,d,e,f){c=c&&c.id?c:this.get_node(c),d=d&&d.id?d:this.get_node(d);var g=b.match(/^move_node|copy_node|create_node$/i)?d:c,h=this.settings.core.check_callback;return"move_node"!==b&&"copy_node"!==b||f&&f.is_multi||c.id!==d.id&&a.inArray(c.id,d.children)!==e&&-1===a.inArray(d.id,c.children_d)?(g&&g.data&&(g=g.data),g&&g.functions&&(g.functions[b]===!1||g.functions[b]===!0)?(g.functions[b]===!1&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+b,data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})}),g.functions[b]):h===!1||a.isFunction(h)&&h.call(this,b,c,d,e,f)===!1||h&&h[b]===!1?(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+b,data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1):!0):(this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1)},last_error:function(){return this._data.core.last_error},move_node:function(c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(d=this.get_node(d),e=e===b?0:e,!d)return!1;if(!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(d))return this.load_node(d,function(){this.move_node(c,d,e,f,!0,!1,i)});if(a.isArray(c)){if(1!==c.length){for(j=0,k=c.length;k>j;j++)(r=this.move_node(c[j],d,e,f,g,!1,i))&&(d=r,e="after");return this.redraw(),!0}c=c[0]}if(c=c&&c.id?c:this.get_node(c),!c||c.id===a.jstree.root)return!1;if(l=(c.parent||a.jstree.root).toString(),n=e.toString().match(/^(before|after)$/)&&d.id!==a.jstree.root?this.get_node(d.parent):d,o=i?i:this._model.data[c.id]?this:a.jstree.reference(c.id),p=!o||!o._id||this._id!==o._id,m=o&&o._id&&l&&o._model.data[l]&&o._model.data[l].children?a.inArray(c.id,o._model.data[l].children):-1,o&&o._id&&(c=o._model.data[c.id]),p)return(r=this.copy_node(c,d,e,f,g,!1,i))?(o&&o.delete_node(c),r):!1;switch(d.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":e=a.inArray(d.id,n.children);break;case"after":e=a.inArray(d.id,n.children)+1;break;case"inside":case"first":e=0;break;case"last":e=n.children.length;break;default:e||(e=0)}if(e>n.children.length&&(e=n.children.length),!this.check("move_node",c,n,e,{core:!0,origin:i,is_multi:o&&o._id&&o._id!==this._id,is_foreign:!o||!o._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(c.parent===n.id){for(q=n.children.concat(),r=a.inArray(c.id,q),-1!==r&&(q=a.vakata.array_remove(q,r),e>r&&e--),r=[],s=0,t=q.length;t>s;s++)r[s>=e?s+1:s]=q[s];r[e]=c.id,n.children=r,this._node_changed(n.id),this.redraw(n.id===a.jstree.root)}else{for(r=c.children_d.concat(),r.push(c.id),s=0,t=c.parents.length;t>s;s++){for(q=[],w=o._model.data[c.parents[s]].children_d,u=0,v=w.length;v>u;u++)-1===a.inArray(w[u],r)&&q.push(w[u]);o._model.data[c.parents[s]].children_d=q}for(o._model.data[l].children=a.vakata.array_remove_item(o._model.data[l].children,c.id),s=0,t=n.parents.length;t>s;s++)this._model.data[n.parents[s]].children_d=this._model.data[n.parents[s]].children_d.concat(r);for(q=[],s=0,t=n.children.length;t>s;s++)q[s>=e?s+1:s]=n.children[s];for(q[e]=c.id,n.children=q,n.children_d.push(c.id),n.children_d=n.children_d.concat(c.children_d),c.parent=n.id,r=n.parents.concat(),r.unshift(n.id),w=c.parents.length,c.parents=r,r=r.concat(),s=0,t=c.children_d.length;t>s;s++)this._model.data[c.children_d[s]].parents=this._model.data[c.children_d[s]].parents.slice(0,-1*w),Array.prototype.push.apply(this._model.data[c.children_d[s]].parents,r);(l===a.jstree.root||n.id===a.jstree.root)&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(l),this._node_changed(n.id)),h||this.redraw()}return f&&f.call(this,c,n,e),this.trigger("move_node",{node:c,parent:n.id,position:e,old_parent:l,old_position:m,is_multi:o&&o._id&&o._id!==this._id,is_foreign:!o||!o._id,old_instance:o,new_instance:this}),c.id},copy_node:function(c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r,s,t;if(d=this.get_node(d),e=e===b?0:e,!d)return!1;if(!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(d))return this.load_node(d,function(){this.copy_node(c,d,e,f,!0,!1,i)});if(a.isArray(c)){if(1!==c.length){for(j=0,k=c.length;k>j;j++)(m=this.copy_node(c[j],d,e,f,g,!0,i))&&(d=m,e="after");return this.redraw(),!0}c=c[0]}if(c=c&&c.id?c:this.get_node(c),!c||c.id===a.jstree.root)return!1;switch(q=(c.parent||a.jstree.root).toString(),r=e.toString().match(/^(before|after)$/)&&d.id!==a.jstree.root?this.get_node(d.parent):d,s=i?i:this._model.data[c.id]?this:a.jstree.reference(c.id),t=!s||!s._id||this._id!==s._id,s&&s._id&&(c=s._model.data[c.id]),d.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":e=a.inArray(d.id,r.children);break;case"after":e=a.inArray(d.id,r.children)+1;break;case"inside":case"first":e=0;break;case"last":e=r.children.length;break;default:e||(e=0)}if(e>r.children.length&&(e=r.children.length),!this.check("copy_node",c,r,e,{core:!0,origin:i,is_multi:s&&s._id&&s._id!==this._id,is_foreign:!s||!s._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(p=s?s.get_json(c,{no_id:!0,no_data:!0,no_state:!0}):c,!p)return!1;if(p.id===!0&&delete p.id,p=this._parse_model_from_json(p,r.id,r.parents.concat()),!p)return!1;for(m=this.get_node(p),c&&c.state&&c.state.loaded===!1&&(m.state.loaded=!1),l=[],l.push(p),l=l.concat(m.children_d),this.trigger("model",{nodes:l,parent:r.id}),n=0,o=r.parents.length;o>n;n++)this._model.data[r.parents[n]].children_d=this._model.data[r.parents[n]].children_d.concat(l);for(l=[],n=0,o=r.children.length;o>n;n++)l[n>=e?n+1:n]=r.children[n];return l[e]=m.id,r.children=l,r.children_d.push(m.id),r.children_d=r.children_d.concat(m.children_d),r.id===a.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(r.id),h||this.redraw(r.id===a.jstree.root),f&&f.call(this,m,r,e),this.trigger("copy_node",{node:m,original:c,parent:r.id,position:e,old_parent:q,old_position:s&&s._id&&q&&s._model.data[q]&&s._model.data[q].children?a.inArray(c.id,s._model.data[q].children):-1,is_multi:s&&s._id&&s._id!==this._id,is_foreign:!s||!s._id,old_instance:s,new_instance:this}),m.id},cut:function(b){if(b||(b=this._data.core.selected.concat()),a.isArray(b)||(b=[b]),!b.length)return!1;var c,d,e,i=[];for(d=0,e=b.length;e>d;d++)c=this.get_node(b[d]),c&&c.id&&c.id!==a.jstree.root&&i.push(c);return i.length?(f=i,h=this,g="move_node",void this.trigger("cut",{node:b})):!1},copy:function(b){if(b||(b=this._data.core.selected.concat()),a.isArray(b)||(b=[b]),!b.length)return!1;var c,d,e,i=[];for(d=0,e=b.length;e>d;d++)c=this.get_node(b[d]),c&&c.id&&c.id!==a.jstree.root&&i.push(c);return i.length?(f=i,h=this,g="copy_node",void this.trigger("copy",{node:b})):!1},get_buffer:function(){return{mode:g,node:f,inst:h}},can_paste:function(){return g!==!1&&f!==!1},paste:function(a,b){return a=this.get_node(a),a&&g&&g.match(/^(copy_node|move_node)$/)&&f?(this[g](f,a,b,!1,!1,!1,h)&&this.trigger("paste",{parent:a.id,node:f,mode:g}),f=!1,g=!1,void(h=!1)):!1},clear_buffer:function(){f=!1,g=!1,h=!1,this.trigger("clear_buffer")},edit:function(b,c,d){var e,f,g,h,i,j,k,l,m,n=!1;return(b=this.get_node(b))?this.settings.core.check_callback===!1?(this._data.core.last_error={error:"check",plugin:"core",id:"core_07",reason:"Could not edit node because of check_callback"},this.settings.core.error.call(this,this._data.core.last_error),!1):(m=b,c="string"==typeof c?c:b.text,this.set_text(b,""),b=this._open_to(b),m.text=c,e=this._data.core.rtl,f=this.element.width(),this._data.core.focused=m.id,g=b.children(".jstree-anchor").focus(),h=a(""),i=c,j=a("
            ",{css:{position:"absolute",top:"-200px",left:e?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),k=a("",{value:i,"class":"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:a.proxy(function(c){c.stopImmediatePropagation(),c.preventDefault();var e,f=h.children(".jstree-rename-input"),k=f.val(),l=this.settings.core.force_text;""===k&&(k=i),j.remove(),h.replaceWith(g),h.remove(),i=l?i:a("
            ").append(a.parseHTML(i)).html(),this.set_text(b,i),e=!!this.rename_node(b,l?a("
            ").text(k).text():a("
            ").append(a.parseHTML(k)).html()),e||this.set_text(b,i),this._data.core.focused=m.id,setTimeout(a.proxy(function(){var a=this.get_node(m.id,!0);a.length&&(this._data.core.focused=m.id,a.children(".jstree-anchor").focus())},this),0),d&&d.call(this,m,e,n)},this),keydown:function(a){var b=a.which;27===b&&(n=!0,this.value=i),(27===b||13===b||37===b||38===b||39===b||40===b||32===b)&&a.stopImmediatePropagation(),(27===b||13===b)&&(a.preventDefault(),this.blur())},click:function(a){a.stopImmediatePropagation()},mousedown:function(a){a.stopImmediatePropagation()},keyup:function(a){k.width(Math.min(j.text("pW"+this.value).width(),f))},keypress:function(a){return 13===a.which?!1:void 0}}),l={fontFamily:g.css("fontFamily")||"",fontSize:g.css("fontSize")||"",fontWeight:g.css("fontWeight")||"",fontStyle:g.css("fontStyle")||"",fontStretch:g.css("fontStretch")||"",fontVariant:g.css("fontVariant")||"",letterSpacing:g.css("letterSpacing")||"",wordSpacing:g.css("wordSpacing")||""},h.attr("class",g.attr("class")).append(g.contents().clone()).append(k),g.replaceWith(h),j.css(l),void k.css(l).width(Math.min(j.text("pW"+k[0].value).width(),f))[0].select()):!1},set_theme:function(b,c){if(!b)return!1;if(c===!0){var d=this.settings.core.themes.dir;d||(d=a.jstree.path+"/themes"),c=d+"/"+b+"/style.css"}c&&-1===a.inArray(c,i)&&(a("head").append(''),i.push(c)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=b,this.element.addClass("jstree-"+b),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+b+"-responsive"),this.trigger("set_theme",{theme:b})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(a){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=a,a&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},set_icon:function(c,d){var e,f,g,h;if(a.isArray(c)){for(c=c.slice(),e=0,f=c.length;f>e;e++)this.set_icon(c[e],d);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?(h=c.icon,c.icon=d===!0||null===d||d===b||""===d?!0:d,g=this.get_node(c,!0).children(".jstree-anchor").children(".jstree-themeicon"),d===!1?this.hide_icon(c):d===!0||null===d||d===b||""===d?(g.removeClass("jstree-themeicon-custom "+h).css("background","").removeAttr("rel"),h===!1&&this.show_icon(c)):-1===d.indexOf("/")&&-1===d.indexOf(".")?(g.removeClass(h).css("background",""),g.addClass(d+" jstree-themeicon-custom").attr("rel",d),h===!1&&this.show_icon(c)):(g.removeClass(h).css("background",""),g.addClass("jstree-themeicon-custom").css("background","url('"+d+"') center center no-repeat").attr("rel",d),h===!1&&this.show_icon(c)),!0):!1},get_icon:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.icon:!1},hide_icon:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.hide_icon(b[c]);return!0}return b=this.get_node(b),b&&b!==a.jstree.root?(b.icon=!1,this.get_node(b,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0):!1},show_icon:function(b){var c,d,e;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.show_icon(b[c]);return!0}return b=this.get_node(b),b&&b!==a.jstree.root?(e=this.get_node(b,!0),b.icon=e.length?e.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"):!0,b.icon||(b.icon=!0),e.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"), -!0):!1}},a.vakata={},a.vakata.attributes=function(b,c){b=a(b)[0];var d=c?{}:[];return b&&b.attributes&&a.each(b.attributes,function(b,e){-1===a.inArray(e.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==e.value&&""!==a.trim(e.value)&&(c?d[e.name]=e.value:d.push(e.name))}),d},a.vakata.array_unique=function(a){var c,d,e=[],f={};for(c=0,d=a.length;d>c;c++)f[a[c]]===b&&(e.push(a[c]),f[a[c]]=!0);return e},a.vakata.array_remove=function(a,b,c){var d=a.slice((c||b)+1||a.length);return a.length=0>b?a.length+b:b,a.push.apply(a,d),a},a.vakata.array_remove_item=function(b,c){var d=a.inArray(c,b);return-1!==d?a.vakata.array_remove(b,d):b},a.jstree.plugins.changed=function(a,b){var c=[];this.trigger=function(a,d){var e,f;if(d||(d={}),"changed"===a.replace(".jstree","")){d.changed={selected:[],deselected:[]};var g={};for(e=0,f=c.length;f>e;e++)g[c[e]]=1;for(e=0,f=d.selected.length;f>e;e++)g[d.selected[e]]?g[d.selected[e]]=2:d.changed.selected.push(d.selected[e]);for(e=0,f=c.length;f>e;e++)1===g[c[e]]&&d.changed.deselected.push(c[e]);c=d.selected.slice()}b.trigger.call(this,a,d)},this.refresh=function(a,d){return c=[],b.refresh.apply(this,arguments)}};var m=k.createElement("I");m.className="jstree-icon jstree-checkbox",m.setAttribute("role","presentation"),a.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0},a.jstree.plugins.checkbox=function(c,d){this.bind=function(){d.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",a.proxy(function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")},this)).on("loading.jstree",a.proxy(function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()},this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",a.proxy(function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(a.proxy(this._undetermined,this),50)},this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",a.proxy(function(a,b){var c,d,e=this._model.data,f=(e[b.parent],b.nodes);for(c=0,d=f.length;d>c;c++)e[f[c]].state.checked=e[f[c]].state.checked||e[f[c]].original&&e[f[c]].original.state&&e[f[c]].original.state.checked,e[f[c]].state.checked&&this._data.checkbox.selected.push(f[c])},this)),(-1!==this.settings.checkbox.cascade.indexOf("up")||-1!==this.settings.checkbox.cascade.indexOf("down"))&&this.element.on("model.jstree",a.proxy(function(b,c){var d,e,f,g,h,i,j=this._model.data,k=j[c.parent],l=c.nodes,m=[],n=this.settings.checkbox.cascade,o=this.settings.checkbox.tie_selection;if(-1!==n.indexOf("down"))if(k.state[o?"selected":"checked"]){for(e=0,f=l.length;f>e;e++)j[l[e]].state[o?"selected":"checked"]=!0;this._data[o?"core":"checkbox"].selected=this._data[o?"core":"checkbox"].selected.concat(l)}else for(e=0,f=l.length;f>e;e++)if(j[l[e]].state[o?"selected":"checked"]){for(g=0,h=j[l[e]].children_d.length;h>g;g++)j[j[l[e]].children_d[g]].state[o?"selected":"checked"]=!0;this._data[o?"core":"checkbox"].selected=this._data[o?"core":"checkbox"].selected.concat(j[l[e]].children_d)}if(-1!==n.indexOf("up")){for(e=0,f=k.children_d.length;f>e;e++)j[k.children_d[e]].children.length||m.push(j[k.children_d[e]].parent);for(m=a.vakata.array_unique(m),g=0,h=m.length;h>g;g++)for(k=j[m[g]];k&&k.id!==a.jstree.root;){for(d=0,e=0,f=k.children.length;f>e;e++)d+=j[k.children[e]].state[o?"selected":"checked"];if(d!==f)break;k.state[o?"selected":"checked"]=!0,this._data[o?"core":"checkbox"].selected.push(k.id),i=this.get_node(k,!0),i&&i.length&&i.attr("aria-selected",!0).children(".jstree-anchor").addClass(o?"jstree-clicked":"jstree-checked"),k=this.get_node(k.parent)}}this._data[o?"core":"checkbox"].selected=a.vakata.array_unique(this._data[o?"core":"checkbox"].selected)},this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",a.proxy(function(b,c){var d,e,f,g,h=c.node,i=this._model.data,j=this.get_node(h.parent),k=this.get_node(h,!0),l=this.settings.checkbox.cascade,m=this.settings.checkbox.tie_selection;if(-1!==l.indexOf("down"))for(this._data[m?"core":"checkbox"].selected=a.vakata.array_unique(this._data[m?"core":"checkbox"].selected.concat(h.children_d)),d=0,e=h.children_d.length;e>d;d++)g=i[h.children_d[d]],g.state[m?"selected":"checked"]=!0,g&&g.original&&g.original.state&&g.original.state.undetermined&&(g.original.state.undetermined=!1);if(-1!==l.indexOf("up"))for(;j&&j.id!==a.jstree.root;){for(f=0,d=0,e=j.children.length;e>d;d++)f+=i[j.children[d]].state[m?"selected":"checked"];if(f!==e)break;j.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(j.id),g=this.get_node(j,!0),g&&g.length&&g.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),j=this.get_node(j.parent)}-1!==l.indexOf("down")&&k.length&&k.find(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked").parent().attr("aria-selected",!0)},this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",a.proxy(function(b,c){var d,e,f,g=this.get_node(a.jstree.root),h=this._model.data;for(d=0,e=g.children_d.length;e>d;d++)f=h[g.children_d[d]],f&&f.original&&f.original.state&&f.original.state.undetermined&&(f.original.state.undetermined=!1)},this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",a.proxy(function(b,c){var d,e,f,g=c.node,h=this.get_node(g,!0),i=this.settings.checkbox.cascade,j=this.settings.checkbox.tie_selection;if(g&&g.original&&g.original.state&&g.original.state.undetermined&&(g.original.state.undetermined=!1),-1!==i.indexOf("down"))for(d=0,e=g.children_d.length;e>d;d++)f=this._model.data[g.children_d[d]],f.state[j?"selected":"checked"]=!1,f&&f.original&&f.original.state&&f.original.state.undetermined&&(f.original.state.undetermined=!1);if(-1!==i.indexOf("up"))for(d=0,e=g.parents.length;e>d;d++)f=this._model.data[g.parents[d]],f.state[j?"selected":"checked"]=!1,f&&f.original&&f.original.state&&f.original.state.undetermined&&(f.original.state.undetermined=!1),f=this.get_node(g.parents[d],!0),f&&f.length&&f.attr("aria-selected",!1).children(".jstree-anchor").removeClass(j?"jstree-clicked":"jstree-checked");for(f=[],d=0,e=this._data[j?"core":"checkbox"].selected.length;e>d;d++)-1!==i.indexOf("down")&&-1!==a.inArray(this._data[j?"core":"checkbox"].selected[d],g.children_d)||-1!==i.indexOf("up")&&-1!==a.inArray(this._data[j?"core":"checkbox"].selected[d],g.parents)||f.push(this._data[j?"core":"checkbox"].selected[d]);this._data[j?"core":"checkbox"].selected=a.vakata.array_unique(f),-1!==i.indexOf("down")&&h.length&&h.find(".jstree-anchor").removeClass(j?"jstree-clicked":"jstree-checked").parent().attr("aria-selected",!1)},this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",a.proxy(function(b,c){for(var d,e,f,g,h=this.get_node(c.parent),i=this._model.data,j=this.settings.checkbox.tie_selection;h&&h.id!==a.jstree.root&&!h.state[j?"selected":"checked"];){for(f=0,d=0,e=h.children.length;e>d;d++)f+=i[h.children[d]].state[j?"selected":"checked"];if(!(e>0&&f===e))break;h.state[j?"selected":"checked"]=!0,this._data[j?"core":"checkbox"].selected.push(h.id),g=this.get_node(h,!0),g&&g.length&&g.attr("aria-selected",!0).children(".jstree-anchor").addClass(j?"jstree-clicked":"jstree-checked"),h=this.get_node(h.parent)}},this)).on("move_node.jstree",a.proxy(function(b,c){var d,e,f,g,h,i=c.is_multi,j=c.old_parent,k=this.get_node(c.parent),l=this._model.data,m=this.settings.checkbox.tie_selection;if(!i)for(d=this.get_node(j);d&&d.id!==a.jstree.root&&!d.state[m?"selected":"checked"];){for(e=0,f=0,g=d.children.length;g>f;f++)e+=l[d.children[f]].state[m?"selected":"checked"];if(!(g>0&&e===g))break;d.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(d.id),h=this.get_node(d,!0),h&&h.length&&h.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),d=this.get_node(d.parent)}for(d=k;d&&d.id!==a.jstree.root;){for(e=0,f=0,g=d.children.length;g>f;f++)e+=l[d.children[f]].state[m?"selected":"checked"];if(e===g)d.state[m?"selected":"checked"]||(d.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(d.id),h=this.get_node(d,!0),h&&h.length&&h.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"));else{if(!d.state[m?"selected":"checked"])break;d.state[m?"selected":"checked"]=!1,this._data[m?"core":"checkbox"].selected=a.vakata.array_remove_item(this._data[m?"core":"checkbox"].selected,d.id),h=this.get_node(d,!0),h&&h.length&&h.attr("aria-selected",!1).children(".jstree-anchor").removeClass(m?"jstree-clicked":"jstree-checked")}d=this.get_node(d.parent)}},this))},this._undetermined=function(){if(null!==this.element){var c,d,e,f,g={},h=this._model.data,i=this.settings.checkbox.tie_selection,j=this._data[i?"core":"checkbox"].selected,k=[],l=this;for(c=0,d=j.length;d>c;c++)if(h[j[c]]&&h[j[c]].parents)for(e=0,f=h[j[c]].parents.length;f>e;e++)g[h[j[c]].parents[e]]===b&&h[j[c]].parents[e]!==a.jstree.root&&(g[h[j[c]].parents[e]]=!0,k.push(h[j[c]].parents[e]));for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var i,j=l.get_node(this);if(j.state.loaded){for(c=0,d=j.children_d.length;d>c;c++)if(i=h[j.children_d[c]],!i.state.loaded&&i.original&&i.original.state&&i.original.state.undetermined&&i.original.state.undetermined===!0)for(g[i.id]===b&&i.id!==a.jstree.root&&(g[i.id]=!0,k.push(i.id)),e=0,f=i.parents.length;f>e;e++)g[i.parents[e]]===b&&i.parents[e]!==a.jstree.root&&(g[i.parents[e]]=!0,k.push(i.parents[e]))}else if(j.original&&j.original.state&&j.original.state.undetermined&&j.original.state.undetermined===!0)for(g[j.id]===b&&j.id!==a.jstree.root&&(g[j.id]=!0,k.push(j.id)),e=0,f=j.parents.length;f>e;e++)g[j.parents[e]]===b&&j.parents[e]!==a.jstree.root&&(g[j.parents[e]]=!0,k.push(j.parents[e]))}),this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),c=0,d=k.length;d>c;c++)h[k[c]].state[i?"selected":"checked"]||(j=this.get_node(k[c],!0),j&&j.length&&j.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined"))}},this.redraw_node=function(b,c,e,f){if(b=d.redraw_node.apply(this,arguments)){var g,h,i=null,j=null;for(g=0,h=b.childNodes.length;h>g;g++)if(b.childNodes[g]&&b.childNodes[g].className&&-1!==b.childNodes[g].className.indexOf("jstree-anchor")){i=b.childNodes[g];break}i&&(!this.settings.checkbox.tie_selection&&this._model.data[b.id].state.checked&&(i.className+=" jstree-checked"),j=m.cloneNode(!1),this._model.data[b.id].state.checkbox_disabled&&(j.className+=" jstree-checkbox-disabled"),i.insertBefore(j,i.childNodes[0]))}return e||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(a.proxy(this._undetermined,this),50)),b},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(b){b=this.get_node(b);var c,d,e=this.settings.checkbox.cascade,f=this.settings.checkbox.tie_selection,g=this._data[f?"core":"checkbox"].selected,h=this._model.data;if(!b||b.state[f?"selected":"checked"]===!0||-1===e.indexOf("undetermined")||-1===e.indexOf("down")&&-1===e.indexOf("up"))return!1;if(!b.state.loaded&&b.original.state.undetermined===!0)return!0;for(c=0,d=b.children_d.length;d>c;c++)if(-1!==a.inArray(b.children_d[c],g)||!h[b.children_d[c]].state.loaded&&h[b.children_d[c]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(b){var c,d,e;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.disable_checkbox(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(e=this.get_node(b,!0),void(b.state.checkbox_disabled||(b.state.checkbox_disabled=!0,e&&e.length&&e.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:b})))):!1},this.enable_checkbox=function(b){var c,d,e;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.enable_checkbox(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(e=this.get_node(b,!0),void(b.state.checkbox_disabled&&(b.state.checkbox_disabled=!1,e&&e.length&&e.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:b})))):!1},this.activate_node=function(b,c){return a(c.target).hasClass("jstree-checkbox-disabled")?!1:(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||a(c.target).hasClass("jstree-checkbox"))&&(c.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!a(c.target).hasClass("jstree-checkbox")?d.activate_node.call(this,b,c):this.is_disabled(b)?!1:(this.is_checked(b)?this.uncheck_node(b,c):this.check_node(b,c),void this.trigger("activate_node",{node:this.get_node(b)})))},this.check_node=function(b,c){if(this.settings.checkbox.tie_selection)return this.select_node(b,!1,!0,c);var d,e,f;if(a.isArray(b)){for(b=b.slice(),e=0,f=b.length;f>e;e++)this.check_node(b[e],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(d=this.get_node(b,!0),void(b.state.checked||(b.state.checked=!0,this._data.checkbox.selected.push(b.id),d&&d.length&&d.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:b,selected:this._data.checkbox.selected,event:c})))):!1},this.uncheck_node=function(b,c){if(this.settings.checkbox.tie_selection)return this.deselect_node(b,!1,c);var d,e,f;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.uncheck_node(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=this.get_node(b,!0),void(b.state.checked&&(b.state.checked=!1,this._data.checkbox.selected=a.vakata.array_remove_item(this._data.checkbox.selected,b.id),f.length&&f.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:b,selected:this._data.checkbox.selected,event:c})))):!1},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var b,c;this._data.checkbox.selected.concat([]);for(this._data.checkbox.selected=this._model.data[a.jstree.root].children_d.concat(),b=0,c=this._data.checkbox.selected.length;c>b;b++)this._model.data[this._data.checkbox.selected[b]]&&(this._model.data[this._data.checkbox.selected[b]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var a,b,c=this._data.checkbox.selected.concat([]);for(a=0,b=this._data.checkbox.selected.length;b>a;a++)this._model.data[this._data.checkbox.selected[a]]&&(this._model.data[this._data.checkbox.selected[a]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:c})},this.is_checked=function(b){return this.settings.checkbox.tie_selection?this.is_selected(b):(b=this.get_node(b),b&&b.id!==a.jstree.root?b.state.checked:!1)},this.get_checked=function(b){return this.settings.checkbox.tie_selection?this.get_selected(b):b?a.map(this._data.checkbox.selected,a.proxy(function(a){return this.get_node(a)},this)):this._data.checkbox.selected},this.get_top_checked=function(b){if(this.settings.checkbox.tie_selection)return this.get_top_selected(b);var c,d,e,f,g=this.get_checked(!0),h={};for(c=0,d=g.length;d>c;c++)h[g[c].id]=g[c];for(c=0,d=g.length;d>c;c++)for(e=0,f=g[c].children_d.length;f>e;e++)h[g[c].children_d[e]]&&delete h[g[c].children_d[e]];g=[];for(c in h)h.hasOwnProperty(c)&&g.push(c);return b?a.map(g,a.proxy(function(a){return this.get_node(a)},this)):g},this.get_bottom_checked=function(b){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(b);var c,d,e=this.get_checked(!0),f=[];for(c=0,d=e.length;d>c;c++)e[c].children.length||f.push(e[c].id);return b?a.map(f,a.proxy(function(a){return this.get_node(a)},this)):f},this.load_node=function(b,c){var e,f,g,h;if(!a.isArray(b)&&!this.settings.checkbox.tie_selection&&(h=this.get_node(b),h&&h.state.loaded))for(e=0,f=h.children_d.length;f>e;e++)this._model.data[h.children_d[e]].state.checked&&(g=!0,this._data.checkbox.selected=a.vakata.array_remove_item(this._data.checkbox.selected,h.children_d[e]));return d.load_node.apply(this,arguments)},this.get_state=function(){var a=d.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection?a:(a.checkbox=this._data.checkbox.selected.slice(),a)},this.set_state=function(b,c){var e=d.set_state.apply(this,arguments);if(e&&b.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var f=this;a.each(b.checkbox,function(a,b){f.check_node(b)})}return delete b.checkbox,this.set_state(b,c),!1}return e},this.refresh=function(a,b){return this.settings.checkbox.tie_selection||(this._data.checkbox.selected=[]),d.refresh.apply(this,arguments)}},a.jstree.defaults.conditionalselect=function(){return!0},a.jstree.plugins.conditionalselect=function(a,b){this.activate_node=function(a,c){this.settings.conditionalselect.call(this,this.get_node(a),c)&&b.activate_node.call(this,a,c)}},a.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(b,c){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.create_node(d,{},"last",function(a){setTimeout(function(){c.edit(a)},0)})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.edit(d)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.delete_node(c.get_selected()):c.delete_node(d)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.cut(c.get_top_selected()):c.cut(d)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.copy(c.get_top_selected()):c.copy(d)}},paste:{separator_before:!1,icon:!1,_disabled:function(b){return!a.jstree.reference(b.reference).can_paste()},separator_after:!1,label:"Paste",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.paste(d)}}}}}}},a.jstree.plugins.contextmenu=function(c,d){this.bind=function(){d.bind.call(this);var b,c,e=0,f=null;this.element.on("contextmenu.jstree",".jstree-anchor",a.proxy(function(a,b){a.preventDefault(),e=a.ctrlKey?+new Date:0,(b||f)&&(e=+new Date+1e4),f&&clearTimeout(f),this.is_loading(a.currentTarget)||this.show_contextmenu(a.currentTarget,a.pageX,a.pageY,a)},this)).on("click.jstree",".jstree-anchor",a.proxy(function(b){this._data.contextmenu.visible&&(!e||+new Date-e>250)&&a.vakata.context.hide(),e=0},this)).on("touchstart.jstree",".jstree-anchor",function(d){d.originalEvent&&d.originalEvent.changedTouches&&d.originalEvent.changedTouches[0]&&(b=d.pageX,c=d.pageY,f=setTimeout(function(){a(d.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(a){f&&a.originalEvent&&a.originalEvent.changedTouches&&a.originalEvent.changedTouches[0]&&(Math.abs(b-a.pageX)>50||Math.abs(c-a.pageY)>50)&&clearTimeout(f)}).on("touchend.vakata.jstree",function(a){f&&clearTimeout(f)}),a(k).on("context_hide.vakata.jstree",a.proxy(function(){this._data.contextmenu.visible=!1},this))},this.teardown=function(){this._data.contextmenu.visible&&a.vakata.context.hide(),d.teardown.call(this)},this.show_contextmenu=function(c,d,e,f){if(c=this.get_node(c),!c||c.id===a.jstree.root)return!1;var g=this.settings.contextmenu,h=this.get_node(c,!0),i=h.children(".jstree-anchor"),j=!1,k=!1;(g.show_at_node||d===b||e===b)&&(j=i.offset(),d=j.left,e=j.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(c)&&this.activate_node(c,f),k=g.items,a.isFunction(k)&&(k=k.call(this,c,a.proxy(function(a){this._show_contextmenu(c,d,e,a)},this))),a.isPlainObject(k)&&this._show_contextmenu(c,d,e,k)},this._show_contextmenu=function(b,c,d,e){var f=this.get_node(b,!0),g=f.children(".jstree-anchor");a(k).one("context_show.vakata.jstree",a.proxy(function(b,c){var d="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";a(c.element).addClass(d)},this)),this._data.contextmenu.visible=!0,a.vakata.context.show(g,{x:c,y:d},e),this.trigger("show_contextmenu",{node:b,x:c,y:d})}},function(a){var b=!1,c={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};a.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(b){a(k).triggerHandler("context_"+b+".vakata",{reference:c.reference,element:c.element,position:{x:c.position_x,y:c.position_y}})},_execute:function(b){return b=c.items[b],b&&(!b._disabled||a.isFunction(b._disabled)&&!b._disabled({item:b,reference:c.reference,element:c.element}))&&b.action?b.action.call(null,{item:b,reference:c.reference,element:c.element,position:{x:c.position_x,y:c.position_y}}):!1},_parse:function(b,d){if(!b)return!1;d||(c.html="",c.items=[]);var e,f="",g=!1;return d&&(f+=""),d||(c.html=f,a.vakata.context._trigger("parse")),f.length>10?f:!1},_show_submenu:function(c){if(c=a(c),c.length&&c.children("ul").length){var d=c.children("ul"),e=c.offset().left+c.outerWidth(),f=c.offset().top,g=d.width(),h=d.height(),i=a(window).width()+a(window).scrollLeft(),j=a(window).height()+a(window).scrollTop();b?c[e-(g+10+c.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):c[e+g+10>i?"addClass":"removeClass"]("vakata-context-right"),f+h+10>j&&d.css("bottom","-1px"),d.show()}},show:function(d,e,f){var g,h,i,j,k,l,m,n,o=!0;switch(c.element&&c.element.length&&c.element.width(""),o){case!e&&!d:return!1;case!!e&&!!d:c.reference=d,c.position_x=e.x,c.position_y=e.y;break;case!e&&!!d:c.reference=d,g=d.offset(),c.position_x=g.left+d.outerHeight(),c.position_y=g.top;break;case!!e&&!d:c.position_x=e.x,c.position_y=e.y}d&&!f&&a(d).data("vakata_contextmenu")&&(f=a(d).data("vakata_contextmenu")),a.vakata.context._parse(f)&&c.element.html(c.html),c.items.length&&(c.element.appendTo("body"),h=c.element,i=c.position_x,j=c.position_y,k=h.width(),l=h.height(),m=a(window).width()+a(window).scrollLeft(),n=a(window).height()+a(window).scrollTop(),b&&(i-=h.outerWidth()-a(d).outerWidth(),im&&(i=m-(k+20)),j+l+20>n&&(j=n-(l+20)),c.element.css({left:i,top:j}).show().find("a").first().focus().parent().addClass("vakata-context-hover"),c.is_visible=!0,a.vakata.context._trigger("show"))},hide:function(){c.is_visible&&(c.element.hide().find("ul").hide().end().find(":focus").blur().end().detach(),c.is_visible=!1,a.vakata.context._trigger("hide"))}},a(function(){b="rtl"===a("body").css("direction");var d=!1;c.element=a("
              "),c.element.on("mouseenter","li",function(b){b.stopImmediatePropagation(),a.contains(this,b.relatedTarget)||(d&&clearTimeout(d),c.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),a(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),a.vakata.context._show_submenu(this))}).on("mouseleave","li",function(b){a.contains(this,b.relatedTarget)||a(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(b){a(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),a.vakata.context.settings.hide_onmouseleave&&(d=setTimeout(function(b){return function(){a.vakata.context.hide()}}(this),a.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(b){b.preventDefault(),a(this).blur().parent().hasClass("vakata-context-disabled")||a.vakata.context._execute(a(this).attr("rel"))===!1||a.vakata.context.hide()}).on("keydown","a",function(b){var d=null;switch(b.which){case 13:case 32:b.type="mouseup",b.preventDefault(),a(b.currentTarget).trigger(b);break;case 37:c.is_visible&&(c.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 38:c.is_visible&&(d=c.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first(),d.length||(d=c.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),d.addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 39:c.is_visible&&(c.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 40:c.is_visible&&(d=c.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first(),d.length||(d=c.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),d.addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 27:a.vakata.context.hide(),b.preventDefault()}}).on("keydown",function(a){a.preventDefault();var b=c.element.find(".vakata-contextmenu-shortcut-"+a.which).parent();b.parent().not(".vakata-context-disabled")&&b.click()}),a(k).on("mousedown.vakata.jstree",function(b){c.is_visible&&!a.contains(c.element[0],b.target)&&a.vakata.context.hide()}).on("context_show.vakata.jstree",function(a,d){c.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),b&&c.element.addClass("vakata-context-rtl").css("direction","rtl"),c.element.find("ul").hide().end()})})}(a),a.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1},a.jstree.plugins.dnd=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",a.proxy(function(b){if(this.settings.dnd.large_drag_target&&a(b.target).closest(".jstree-node")[0]!==b.currentTarget)return!0;if("touchstart"===b.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var c=this.get_node(b.target),d=this.is_selected(c)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,e=d>1?d+" "+this.get_string("nodes"):this.get_text(b.currentTarget);return this.settings.core.force_text&&(e=a.vakata.html.escape(e)),c&&c.id&&c.id!==a.jstree.root&&(1===b.which||"touchstart"===b.type)&&(this.settings.dnd.is_draggable===!0||a.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,d>1?this.get_top_selected(!0):[c],b))?(this.element.trigger("mousedown.jstree"),a.vakata.dnd.start(b,{jstree:!0,origin:this,obj:this.get_node(c,!0),nodes:d>1?this.get_top_selected():[c.id]},'
              '+e+'
              ')):void 0},this))}},a(function(){var b=!1,c=!1,d=!1,e=!1,f=a('
               
              ').hide();a(k).on("dnd_start.vakata.jstree",function(a,c){b=!1,d=!1,c&&c.data&&c.data.jstree&&f.appendTo("body")}).on("dnd_move.vakata.jstree",function(g,h){if(e&&clearTimeout(e),h&&h.data&&h.data.jstree&&(!h.event.target.id||"jstree-marker"!==h.event.target.id)){d=h.event;var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w=a.jstree.reference(h.event.target),x=!1,y=!1,z=!1;if(w&&w._data&&w._data.dnd)if(f.attr("class","jstree-"+w.get_theme()+(w.settings.core.themes.responsive?" jstree-dnd-responsive":"")),h.helper.children().attr("class","jstree-"+w.get_theme()+" jstree-"+w.get_theme()+"-"+w.get_theme_variant()+" "+(w.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(h.event.metaKey||h.event.ctrlKey))?"show":"hide"](),h.event.target!==w.element[0]&&h.event.target!==w.get_container_ul()[0]||0!==w.get_container_ul().children().length){if(x=w.settings.dnd.large_drop_target?a(h.event.target).closest(".jstree-node").children(".jstree-anchor"):a(h.event.target).closest(".jstree-anchor"),x&&x.length&&x.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(y=x.offset(),z=h.event.pageY-y.top,k=x.outerHeight(),n=k/3>z?["b","i","a"]:z>k-k/3?["a","i","b"]:z>k/2?["i","a","b"]:["i","b","a"],a.each(n,function(d,g){switch(g){case"b":i=y.left-6,j=y.top,l=w.get_parent(x),m=x.parent().index();break;case"i":u=w.settings.dnd.inside_pos,v=w.get_node(x.parent()),i=y.left-2,j=y.top+k/2+1,l=v.id,m="first"===u?0:"last"===u?v.children.length:Math.min(u,v.children.length);break;case"a":i=y.left-6,j=y.top+k,l=w.get_parent(x),m=x.parent().index()+1}for(o=!0,p=0,q=h.data.nodes.length;q>p;p++)if(r=h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(h.event.metaKey||h.event.ctrlKey))?"copy_node":"move_node", -s=m,"move_node"===r&&"a"===g&&h.data.origin&&h.data.origin===w&&l===w.get_parent(h.data.nodes[p])&&(t=w.get_node(l),s>a.inArray(h.data.nodes[p],t.children)&&(s-=1)),o=o&&(w&&w.settings&&w.settings.dnd&&w.settings.dnd.check_while_dragging===!1||w.check(r,h.data.origin&&h.data.origin!==w?h.data.origin.get_node(h.data.nodes[p]):h.data.nodes[p],l,s,{dnd:!0,ref:w.get_node(x.parent()),pos:g,origin:h.data.origin,is_multi:h.data.origin&&h.data.origin!==w,is_foreign:!h.data.origin})),!o){w&&w.last_error&&(c=w.last_error());break}return"i"===g&&x.parent().is(".jstree-closed")&&w.settings.dnd.open_timeout&&(e=setTimeout(function(a,b){return function(){a.open_node(b)}}(w,x),w.settings.dnd.open_timeout)),o?(b={ins:w,par:l,pos:"i"!==g||"last"!==u||0!==m||w.is_loaded(v)?m:"last"},f.css({left:i+"px",top:j+"px"}).show(),h.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),c={},n=!0,!1):void 0}),n===!0))return}else{for(o=!0,p=0,q=h.data.nodes.length;q>p&&(o=o&&w.check(h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(h.event.metaKey||h.event.ctrlKey))?"copy_node":"move_node",h.data.origin&&h.data.origin!==w?h.data.origin.get_node(h.data.nodes[p]):h.data.nodes[p],a.jstree.root,"last",{dnd:!0,ref:w.get_node(a.jstree.root),pos:"i",origin:h.data.origin,is_multi:h.data.origin&&h.data.origin!==w,is_foreign:!h.data.origin}),o);p++);if(o)return b={ins:w,par:a.jstree.root,pos:"last"},f.hide(),void h.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok")}b=!1,h.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),f.hide()}}).on("dnd_scroll.vakata.jstree",function(a,c){c&&c.data&&c.data.jstree&&(f.hide(),b=!1,d=!1,c.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(g,h){if(e&&clearTimeout(e),h&&h.data&&h.data.jstree){f.hide().detach();var i,j,k=[];if(b){for(i=0,j=h.data.nodes.length;j>i;i++)k[i]=h.data.origin?h.data.origin.get_node(h.data.nodes[i]):h.data.nodes[i];b.ins[h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(h.event.metaKey||h.event.ctrlKey))?"copy_node":"move_node"](k,b.par,b.pos,!1,!1,!1,h.data.origin)}else i=a(h.event.target).closest(".jstree"),i.length&&c&&c.error&&"check"===c.error&&(i=i.jstree(!0),i&&i.settings.core.error.call(this,c));d=!1,b=!1}}).on("keyup.jstree keydown.jstree",function(b,c){c=a.vakata.dnd._get(),c&&c.data&&c.data.jstree&&(c.helper.find(".jstree-copy").first()[c.data.origin&&(c.data.origin.settings.dnd.always_copy||c.data.origin.settings.dnd.copy&&(b.metaKey||b.ctrlKey))?"show":"hide"](),d&&(d.metaKey=b.metaKey,d.ctrlKey=b.ctrlKey,a.vakata.dnd._trigger("move",d)))})}),function(a){a.vakata.html={div:a("
              "),escape:function(b){return a.vakata.html.div.text(b).html()},strip:function(b){return a.vakata.html.div.empty().append(a.parseHTML(b)).text()}};var b={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};a.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:50},_trigger:function(b,c){var d=a.vakata.dnd._get();d.event=c,a(k).triggerHandler("dnd_"+b+".vakata",d)},_get:function(){return{data:b.data,element:b.element,helper:b.helper}},_clean:function(){b.helper&&b.helper.remove(),b.scroll_i&&(clearInterval(b.scroll_i),b.scroll_i=!1),b={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},a(k).off("mousemove.vakata.jstree touchmove.vakata.jstree",a.vakata.dnd.drag),a(k).off("mouseup.vakata.jstree touchend.vakata.jstree",a.vakata.dnd.stop)},_scroll:function(c){if(!b.scroll_e||!b.scroll_l&&!b.scroll_t)return b.scroll_i&&(clearInterval(b.scroll_i),b.scroll_i=!1),!1;if(!b.scroll_i)return b.scroll_i=setInterval(a.vakata.dnd._scroll,100),!1;if(c===!0)return!1;var d=b.scroll_e.scrollTop(),e=b.scroll_e.scrollLeft();b.scroll_e.scrollTop(d+b.scroll_t*a.vakata.dnd.settings.scroll_speed),b.scroll_e.scrollLeft(e+b.scroll_l*a.vakata.dnd.settings.scroll_speed),(d!==b.scroll_e.scrollTop()||e!==b.scroll_e.scrollLeft())&&a.vakata.dnd._trigger("scroll",b.scroll_e)},start:function(c,d,e){"touchstart"===c.type&&c.originalEvent&&c.originalEvent.changedTouches&&c.originalEvent.changedTouches[0]&&(c.pageX=c.originalEvent.changedTouches[0].pageX,c.pageY=c.originalEvent.changedTouches[0].pageY,c.target=k.elementFromPoint(c.originalEvent.changedTouches[0].pageX-window.pageXOffset,c.originalEvent.changedTouches[0].pageY-window.pageYOffset)),b.is_drag&&a.vakata.dnd.stop({});try{c.currentTarget.unselectable="on",c.currentTarget.onselectstart=function(){return!1},c.currentTarget.style&&(c.currentTarget.style.MozUserSelect="none")}catch(f){}return b.init_x=c.pageX,b.init_y=c.pageY,b.data=d,b.is_down=!0,b.element=c.currentTarget,b.target=c.target,b.is_touch="touchstart"===c.type,e!==!1&&(b.helper=a("
              ").html(e).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),a(k).on("mousemove.vakata.jstree touchmove.vakata.jstree",a.vakata.dnd.drag),a(k).on("mouseup.vakata.jstree touchend.vakata.jstree",a.vakata.dnd.stop),!1},drag:function(c){if("touchmove"===c.type&&c.originalEvent&&c.originalEvent.changedTouches&&c.originalEvent.changedTouches[0]&&(c.pageX=c.originalEvent.changedTouches[0].pageX,c.pageY=c.originalEvent.changedTouches[0].pageY,c.target=k.elementFromPoint(c.originalEvent.changedTouches[0].pageX-window.pageXOffset,c.originalEvent.changedTouches[0].pageY-window.pageYOffset)),b.is_down){if(!b.is_drag){if(!(Math.abs(c.pageX-b.init_x)>(b.is_touch?a.vakata.dnd.settings.threshold_touch:a.vakata.dnd.settings.threshold)||Math.abs(c.pageY-b.init_y)>(b.is_touch?a.vakata.dnd.settings.threshold_touch:a.vakata.dnd.settings.threshold)))return;b.helper&&(b.helper.appendTo("body"),b.helper_w=b.helper.outerWidth()),b.is_drag=!0,a.vakata.dnd._trigger("start",c)}var d=!1,e=!1,f=!1,g=!1,h=!1,i=!1,j=!1,l=!1,m=!1,n=!1;return b.scroll_t=0,b.scroll_l=0,b.scroll_e=!1,a(a(c.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(a(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var d=a(this),e=d.offset();return this.scrollHeight>this.offsetHeight&&(e.top+d.height()-c.pageYthis.offsetWidth&&(e.left+d.width()-c.pageXg&&c.pageY-jg&&g-(c.pageY-j)i&&c.pageX-li&&i-(c.pageX-l)f&&(m=f-50),h&&n+b.helper_w>h&&(n=h-(b.helper_w+2)),b.helper.css({left:n+"px",top:m+"px"})),a.vakata.dnd._trigger("move",c),!1}},stop:function(c){if("touchend"===c.type&&c.originalEvent&&c.originalEvent.changedTouches&&c.originalEvent.changedTouches[0]&&(c.pageX=c.originalEvent.changedTouches[0].pageX,c.pageY=c.originalEvent.changedTouches[0].pageY,c.target=k.elementFromPoint(c.originalEvent.changedTouches[0].pageX-window.pageXOffset,c.originalEvent.changedTouches[0].pageY-window.pageYOffset)),b.is_drag)a.vakata.dnd._trigger("stop",c);else if("touchend"===c.type&&c.target===b.target){var d=setTimeout(function(){a(c.target).click()},100);a(c.target).one("click",function(){d&&clearTimeout(d)})}return a.vakata.dnd._clean(),!1}}}(a),a.jstree.defaults.massload=null,a.jstree.plugins.massload=function(b,c){this.init=function(a,b){c.init.call(this,a,b),this._data.massload={}},this._load_nodes=function(b,d,e){var f=this.settings.massload;return e&&!a.isEmptyObject(this._data.massload)?c._load_nodes.call(this,b,d,e):a.isFunction(f)?f.call(this,b,a.proxy(function(a){if(a)for(var f in a)a.hasOwnProperty(f)&&(this._data.massload[f]=a[f]);c._load_nodes.call(this,b,d,e)},this)):"object"==typeof f&&f&&f.url?(f=a.extend(!0,{},f),a.isFunction(f.url)&&(f.url=f.url.call(this,b)),a.isFunction(f.data)&&(f.data=f.data.call(this,b)),a.ajax(f).done(a.proxy(function(a,f,g){if(a)for(var h in a)a.hasOwnProperty(h)&&(this._data.massload[h]=a[h]);c._load_nodes.call(this,b,d,e)},this)).fail(a.proxy(function(a){c._load_nodes.call(this,b,d,e)},this))):c._load_nodes.call(this,b,d,e)},this._load_node=function(b,d){var e=this._data.massload[b.id];return e?this["string"==typeof e?"_append_html_data":"_append_json_data"](b,"string"==typeof e?a(a.parseHTML(e)).filter(function(){return 3!==this.nodeType}):e,function(a){d.call(this,a),delete this._data.massload[b.id]}):c._load_node.call(this,b,d)}},a.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},a.jstree.plugins.search=function(c,d){this.bind=function(){d.bind.call(this),this._data.search.str="",this._data.search.dom=a(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",a.proxy(function(b,c){if(this._data.search.som&&c.res.length){var d,e,f=this._model.data,g=[];for(d=0,e=c.res.length;e>d;d++)f[c.res[d]]&&!f[c.res[d]].state.hidden&&(g.push(c.res[d]),g=g.concat(f[c.res[d]].parents),this._data.search.smc&&(g=g.concat(f[c.res[d]].children_d)));g=a.vakata.array_remove_item(a.vakata.array_unique(g),a.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(g)}},this)).on("clear_search.jstree",a.proxy(function(a,b){this._data.search.som&&b.res.length&&this.show_node(this._data.search.hdn)},this))},this.search=function(c,d,e,f,g,h){if(c===!1||""===a.trim(c.toString()))return this.clear_search();f=this.get_node(f),f=f&&f.id?f.id:null,c=c.toString();var i,j,k=this.settings.search,l=k.ajax?k.ajax:!1,m=this._model.data,n=null,o=[],p=[];if(this._data.search.res.length&&!g&&this.clear_search(),e===b&&(e=k.show_only_matches),h===b&&(h=k.show_only_matches_children),!d&&l!==!1)return a.isFunction(l)?l.call(this,c,a.proxy(function(b){b&&b.d&&(b=b.d),this._load_nodes(a.isArray(b)?a.vakata.array_unique(b):[],function(){this.search(c,!0,e,f,g)},!0)},this),f):(l=a.extend({},l),l.data||(l.data={}),l.data.str=c,f&&(l.data.inside=f),a.ajax(l).fail(a.proxy(function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(l)},this.settings.core.error.call(this,this._data.core.last_error)},this)).done(a.proxy(function(b){b&&b.d&&(b=b.d),this._load_nodes(a.isArray(b)?a.vakata.array_unique(b):[],function(){this.search(c,!0,e,f,g)},!0)},this)));if(g||(this._data.search.str=c,this._data.search.dom=a(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=e,this._data.search.smc=h),n=new a.vakata.search(c,!0,{caseSensitive:k.case_sensitive,fuzzy:k.fuzzy}),a.each(m[f?f:a.jstree.root].children_d,function(a,b){var d=m[b];d.text&&(!k.search_leaves_only||d.state.loaded&&0===d.children.length)&&(k.search_callback&&k.search_callback.call(this,c,d)||!k.search_callback&&n.search(d.text).isMatch)&&(o.push(b),p=p.concat(d.parents))}),o.length){for(p=a.vakata.array_unique(p),i=0,j=p.length;j>i;i++)p[i]!==a.jstree.root&&m[p[i]]&&this.open_node(p[i],null,0)===!0&&this._data.search.opn.push(p[i]);g?(this._data.search.dom=this._data.search.dom.add(a(this.element[0].querySelectorAll("#"+a.map(o,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=a.vakata.array_unique(this._data.search.res.concat(o))):(this._data.search.dom=a(this.element[0].querySelectorAll("#"+a.map(o,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=o),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:c,res:this._data.search.res,show_only_matches:e})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=a(this.element[0].querySelectorAll("#"+a.map(this._data.search.res,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=a()},this.redraw_node=function(b,c,e,f){if(b=d.redraw_node.apply(this,arguments),b&&-1!==a.inArray(b.id,this._data.search.res)){var g,h,i=null;for(g=0,h=b.childNodes.length;h>g;g++)if(b.childNodes[g]&&b.childNodes[g].className&&-1!==b.childNodes[g].className.indexOf("jstree-anchor")){i=b.childNodes[g];break}i&&(i.className+=" jstree-search")}return b}},function(a){a.vakata.search=function(b,c,d){d=d||{},d=a.extend({},a.vakata.search.defaults,d),d.fuzzy!==!1&&(d.fuzzy=!0),b=d.caseSensitive?b:b.toLowerCase();var e,f,g,h,i=d.location,j=d.distance,k=d.threshold,l=b.length;return l>32&&(d.fuzzy=!1),d.fuzzy&&(e=1<c;c++)a[b.charAt(c)]=0;for(c=0;l>c;c++)a[b.charAt(c)]|=1<c;c++){for(j=0,m=v;m>j;)g(c,i+m)<=t?j=m:v=m,m=Math.floor((v-j)/2+j);for(v=m,o=Math.max(1,i-m+1),p=Math.min(i+m,s)+l,q=new Array(p+2),q[p+1]=(1<=o;h--)if(r=f[a.charAt(h-1)],0===c?q[h]=(q[h+1]<<1|1)&r:q[h]=(q[h+1]<<1|1)&r|((n[h+1]|n[h])<<1|1)|n[h+1],q[h]&e&&(w=g(c,h-1),t>=w)){if(t=w,u=h-1,x.push(u),!(u>i))break;o=Math.max(1,2*i-u)}if(g(c+1,i)>t)break;n=q}return{isMatch:u>=0,score:w}},c===!0?{search:h}:h(c)},a.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(a),a.jstree.defaults.sort=function(a,b){return this.get_text(a)>this.get_text(b)?1:-1},a.jstree.plugins.sort=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("model.jstree",a.proxy(function(a,b){this.sort(b.parent,!0)},this)).on("rename_node.jstree create_node.jstree",a.proxy(function(a,b){this.sort(b.parent||b.node.parent,!1),this.redraw_node(b.parent||b.node.parent,!0)},this)).on("move_node.jstree copy_node.jstree",a.proxy(function(a,b){this.sort(b.parent,!1),this.redraw_node(b.parent,!0)},this))},this.sort=function(b,c){var d,e;if(b=this.get_node(b),b&&b.children&&b.children.length&&(b.children.sort(a.proxy(this.settings.sort,this)),c))for(d=0,e=b.children_d.length;e>d;d++)this.sort(b.children_d[d],!1)}};var n=!1;a.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1},a.jstree.plugins.state=function(b,c){this.bind=function(){c.bind.call(this);var b=a.proxy(function(){this.element.on(this.settings.state.events,a.proxy(function(){n&&clearTimeout(n),n=setTimeout(a.proxy(function(){this.save_state()},this),100)},this)),this.trigger("state_ready")},this);this.element.on("ready.jstree",a.proxy(function(a,c){this.element.one("restore_state.jstree",b),this.restore_state()||b()},this))},this.save_state=function(){var b={state:this.get_state(),ttl:this.settings.state.ttl,sec:+new Date};a.vakata.storage.set(this.settings.state.key,JSON.stringify(b))},this.restore_state=function(){var b=a.vakata.storage.get(this.settings.state.key);if(b)try{b=JSON.parse(b)}catch(c){return!1}return b&&b.ttl&&b.sec&&+new Date-b.sec>b.ttl?!1:(b&&b.state&&(b=b.state),b&&a.isFunction(this.settings.state.filter)&&(b=this.settings.state.filter.call(this,b)),b?(this.element.one("set_state.jstree",function(c,d){d.instance.trigger("restore_state",{state:a.extend(!0,{},b)})}),this.set_state(b),!0):!1)},this.clear_state=function(){return a.vakata.storage.del(this.settings.state.key)}},function(a,b){a.vakata.storage={set:function(a,b){return window.localStorage.setItem(a,b)},get:function(a){return window.localStorage.getItem(a)},del:function(a){return window.localStorage.removeItem(a)}}}(a),a.jstree.defaults.types={"default":{}},a.jstree.defaults.types[a.jstree.root]={},a.jstree.plugins.types=function(c,d){this.init=function(c,e){var f,g;if(e&&e.types&&e.types["default"])for(f in e.types)if("default"!==f&&f!==a.jstree.root&&e.types.hasOwnProperty(f))for(g in e.types["default"])e.types["default"].hasOwnProperty(g)&&e.types[f][g]===b&&(e.types[f][g]=e.types["default"][g]);d.init.call(this,c,e),this._model.data[a.jstree.root].type=a.jstree.root},this.refresh=function(b,c){d.refresh.call(this,b,c),this._model.data[a.jstree.root].type=a.jstree.root},this.bind=function(){this.element.on("model.jstree",a.proxy(function(c,d){var e,f,g=this._model.data,h=d.nodes,i=this.settings.types,j="default";for(e=0,f=h.length;f>e;e++)j="default",g[h[e]].original&&g[h[e]].original.type&&i[g[h[e]].original.type]&&(j=g[h[e]].original.type),g[h[e]].data&&g[h[e]].data.jstree&&g[h[e]].data.jstree.type&&i[g[h[e]].data.jstree.type]&&(j=g[h[e]].data.jstree.type),g[h[e]].type=j,g[h[e]].icon===!0&&i[j].icon!==b&&(g[h[e]].icon=i[j].icon);g[a.jstree.root].type=a.jstree.root},this)),d.bind.call(this)},this.get_json=function(b,c,e){var f,g,h=this._model.data,i=c?a.extend(!0,{},c,{no_id:!1}):{},j=d.get_json.call(this,b,i,e);if(j===!1)return!1;if(a.isArray(j))for(f=0,g=j.length;g>f;f++)j[f].type=j[f].id&&h[j[f].id]&&h[j[f].id].type?h[j[f].id].type:"default",c&&c.no_id&&(delete j[f].id,j[f].li_attr&&j[f].li_attr.id&&delete j[f].li_attr.id,j[f].a_attr&&j[f].a_attr.id&&delete j[f].a_attr.id);else j.type=j.id&&h[j.id]&&h[j.id].type?h[j.id].type:"default",c&&c.no_id&&(j=this._delete_ids(j));return j},this._delete_ids=function(b){if(a.isArray(b)){for(var c=0,d=b.length;d>c;c++)b[c]=this._delete_ids(b[c]);return b}return delete b.id,b.li_attr&&b.li_attr.id&&delete b.li_attr.id,b.a_attr&&b.a_attr.id&&delete b.a_attr.id,b.children&&a.isArray(b.children)&&(b.children=this._delete_ids(b.children)),b},this.check=function(c,e,f,g,h){if(d.check.call(this,c,e,f,g,h)===!1)return!1;e=e&&e.id?e:this.get_node(e),f=f&&f.id?f:this.get_node(f);var i,j,k,l,m=e&&e.id?h&&h.origin?h.origin:a.jstree.reference(e.id):null;switch(m=m&&m._model&&m._model.data?m._model.data:null,c){case"create_node":case"move_node":case"copy_node":if("move_node"!==c||-1===a.inArray(e.id,f.children)){if(i=this.get_rules(f),i.max_children!==b&&-1!==i.max_children&&i.max_children===f.children.length)return this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;if(i.valid_children!==b&&-1!==i.valid_children&&-1===a.inArray(e.type||"default",i.valid_children))return this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;if(m&&e.children_d&&e.parents){for(j=0,k=0,l=e.children_d.length;l>k;k++)j=Math.max(j,m[e.children_d[k]].parents.length);j=j-e.parents.length+1}(0>=j||j===b)&&(j=1);do{if(i.max_depth!==b&&-1!==i.max_depth&&i.max_depthf;f++)this.set_type(c[f],d);return!0}return e=this.settings.types,c=this.get_node(c),e[d]&&c?(h=c.type,i=this.get_icon(c),c.type=d,(i===!0||e[h]&&e[h].icon!==b&&i===e[h].icon)&&this.set_icon(c,e[d].icon!==b?e[d].icon:!0),!0):!1}},a.jstree.defaults.unique={case_sensitive:!1,duplicate:function(a,b){return a+" ("+b+")"}},a.jstree.plugins.unique=function(c,d){this.check=function(b,c,e,f,g){if(d.check.call(this,b,c,e,f,g)===!1)return!1;if(c=c&&c.id?c:this.get_node(c),e=e&&e.id?e:this.get_node(e),!e||!e.children)return!0;var h,i,j="rename_node"===b?f:c.text,k=[],l=this.settings.unique.case_sensitive,m=this._model.data;for(h=0,i=e.children.length;i>h;h++)k.push(l?m[e.children[h]].text:m[e.children[h]].text.toLowerCase());switch(l||(j=j.toLowerCase()),b){case"delete_node":return!0;case"rename_node":return h=-1===a.inArray(j,k)||c.text&&c.text[l?"toString":"toLowerCase"]()===j,h||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+j+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),h;case"create_node":return h=-1===a.inArray(j,k),h||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+j+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),h;case"copy_node":return h=-1===a.inArray(j,k),h||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+j+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),h;case"move_node":return h=c.parent===e.id&&(!g||!g.is_multi)||-1===a.inArray(j,k),h||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+j+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),h}return!0},this.create_node=function(c,e,f,g,h){if(!e||e.text===b){if(null===c&&(c=a.jstree.root),c=this.get_node(c),!c)return d.create_node.call(this,c,e,f,g,h);if(f=f===b?"last":f,!f.toString().match(/^(before|after)$/)&&!h&&!this.is_loaded(c))return d.create_node.call(this,c,e,f,g,h);e||(e={});var i,j,k,l,m,n=this._model.data,o=this.settings.unique.case_sensitive,p=this.settings.unique.duplicate;for(j=i=this.get_string("New node"),k=[],l=0,m=c.children.length;m>l;l++)k.push(o?n[c.children[l]].text:n[c.children[l]].text.toLowerCase());for(l=1;-1!==a.inArray(o?j:j.toLowerCase(),k);)j=p.call(this,i,++l).toString();e.text=j}return d.create_node.call(this,c,e,f,g,h)}};var o=k.createElement("DIV");if(o.setAttribute("unselectable","on"),o.setAttribute("role","presentation"),o.className="jstree-wholerow",o.innerHTML=" ",a.jstree.plugins.wholerow=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("ready.jstree set_state.jstree",a.proxy(function(){this.hide_dots()},this)).on("init.jstree loading.jstree ready.jstree",a.proxy(function(){this.get_container_ul().addClass("jstree-wholerow-ul")},this)).on("deselect_all.jstree",a.proxy(function(a,b){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")},this)).on("changed.jstree",a.proxy(function(a,b){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var c,d,e=!1;for(c=0,d=b.selected.length;d>c;c++)e=this.get_node(b.selected[c],!0),e&&e.length&&e.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("open_node.jstree",a.proxy(function(a,b){this.get_node(b.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("hover_node.jstree dehover_node.jstree",a.proxy(function(a,b){"hover_node"===a.type&&this.is_disabled(b.node)||this.get_node(b.node,!0).children(".jstree-wholerow")["hover_node"===a.type?"addClass":"removeClass"]("jstree-wholerow-hovered")},this)).on("contextmenu.jstree",".jstree-wholerow",a.proxy(function(b){b.preventDefault();var c=a.Event("contextmenu",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey,pageX:b.pageX,pageY:b.pageY});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c)},this)).on("click.jstree",".jstree-wholerow",function(b){b.stopImmediatePropagation();var c=a.Event("click",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).focus()}).on("click.jstree",".jstree-leaf > .jstree-ocl",a.proxy(function(b){b.stopImmediatePropagation();var c=a.Event("click",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).focus()},this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",a.proxy(function(a){return a.stopImmediatePropagation(),this.is_disabled(a.currentTarget)||this.hover_node(a.currentTarget),!1},this)).on("mouseleave.jstree",".jstree-node",a.proxy(function(a){this.dehover_node(a.currentTarget)},this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),c.teardown.call(this)},this.redraw_node=function(b,d,e,f){if(b=c.redraw_node.apply(this,arguments)){var g=o.cloneNode(!0);-1!==a.inArray(b.id,this._data.core.selected)&&(g.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===b.id&&(g.className+=" jstree-wholerow-hovered"),b.insertBefore(g,b.childNodes[0])}return b}},k.registerElement&&Object&&Object.create){var p=Object.create(HTMLElement.prototype);p.createdCallback=function(){var b,c={core:{},plugins:[]};for(b in a.jstree.plugins)a.jstree.plugins.hasOwnProperty(b)&&this.attributes[b]&&(c.plugins.push(b),this.getAttribute(b)&&JSON.parse(this.getAttribute(b))&&(c[b]=JSON.parse(this.getAttribute(b))));for(b in a.jstree.defaults.core)a.jstree.defaults.core.hasOwnProperty(b)&&this.attributes[b]&&(c.core[b]=JSON.parse(this.getAttribute(b))||this.getAttribute(b));a(this).jstree(c)};try{k.registerElement("vakata-jstree",{prototype:p})}catch(q){}}}}),function(a){"use strict";function b(){var b=1;this.nodesFingerprint=function(a){return a.__uiNodeId||(a.__uiNodeId=b++),""+a.__uiNodeId+(a.id||"")+(a.text||"")+(a.type||"")},this.changeWatcher=function(b,c){var d,e=function(){var d,e,f=[];if(b)for(var h=a.isFunction(b)?b():b,i=0,j=h.length;j>i;i++)e=h[i],d=c(e),g[d]=e,f.push(d);return f},f=function(a,b){var c,d,e=[],f={};for(c=0,d=b.length;d>c;c++)f[b[c]]=!0;for(c=0,d=a.length;d>c;c++)f[a[c]]||e.push(a[c]);return e},g={},h=function(a,b){var e,h,i,j,k={},l=f(b,a);for(e=0,h=l.length;h>e;e++){var m=l[e];i=g[m],delete g[m];var n=c(i);n===m?d.onRemoved(i):(k[n]=m,d.onChanged(i))}var o=f(a,b);for(e=0,h=o.length;h>e;e++)j=o[e],i=g[j],k[j]||d.onAdded(i)};return d={subscribe:function(a,b){a.$watch(e,function(a,c){b&&b(a,c)===!1||h(a,c)},!0)},onAdded:a.noop,onChanged:a.noop,onRemoved:a.noop}}}function c(){return{restrict:"A",scope:{treeData:"=ngModel",shouldApply:"&"},controller:"jsTreeCtrl",link:function(b,c,d,e){function f(a,b,c){if(c.treeEvents)for(var d=c.treeEvents.split(";"),e=0;e0){var f=d[e].split(":")[0],g=f+".jstree",h=d[e].split(":")[1];a.tree.on(g,a.$parent.$eval(h))}}function g(){var c=d.jsTree?b.$parent.$eval(d.jsTree):{};h={},a.copy(c,h);var e=JSON.stringify(h);return h.core?h.core.data=b.treeData:h.core={data:b.treeData},e}var h=null,i=e.changeWatcher(b.treeData,e.nodesFingerprint),j=!1;b.destroy=function(){if(d.tree)if(-1!==d.tree.indexOf(".")){var a=d.tree.split(".");b.tree=b.$parent[a[0]][a[1]]=c}else b.tree=b.$parent[d.tree]=c;else b.tree=c;b.tree.jstree("destroy")},b.init=function(){b.tree.jstree(h),f(b,c,d)},i.onChanged=function(c){a.isDefined(b.tree.jstree(!0).set_type)&&b.tree.jstree(!0).set_type(c.id,c.type),b.tree.jstree(!0).rename_node(c.id,c.text)},i.onAdded=function(a){for(;j;);j=!0;var c=b.tree.jstree(!0).get_node(a.parent),d=b.tree.jstree(!0).create_node(c,a,"inside",function(){j=!1});d||(j=!1)},i.onRemoved=function(a){b.tree.jstree(!0).delete_node(a.id)},i.subscribe(b,function(){return b.shouldApply?b.shouldApply():!0}),b.$watch(g,function(){b.destroy(),b.init()})}}}var d=a.module("ngJsTree",[]);d.controller("jsTreeCtrl",b),d.directive("jsTree",c)}(angular),function(a){"use strict";if(a.URL=a.URL||a.webkitURL,a.Blob&&a.URL)try{return void new Blob}catch(b){}var c=a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||function(a){var b=function(a){return Object.prototype.toString.call(a).match(/^\[object\s(.*)\]$/)[1]},c=function(){this.data=[]},d=function(a,b,c){this.data=a,this.size=a.length,this.type=b,this.encoding=c},e=c.prototype,f=d.prototype,g=a.FileReaderSync,h=function(a){this.code=this[this.name=a]},i="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),j=i.length,k=a.URL||a.webkitURL||a,l=k.createObjectURL,m=k.revokeObjectURL,n=k,o=a.btoa,p=a.atob,q=a.ArrayBuffer,r=a.Uint8Array,s=/^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;for(d.fake=f.fake=!0;j--;)h.prototype[i[j]]=j+1;return k.createObjectURL||(n=a.URL=function(a){var b,c=document.createElementNS("http://www.w3.org/1999/xhtml","a");return c.href=a,"origin"in c||("data:"===c.protocol.toLowerCase()?c.origin=null:(b=a.match(s),c.origin=b&&b[1])),c}),n.createObjectURL=function(a){var b,c=a.type;return null===c&&(c="application/octet-stream"),a instanceof d?(b="data:"+c,"base64"===a.encoding?b+";base64,"+a.data:"URI"===a.encoding?b+","+decodeURIComponent(a.data):o?b+";base64,"+o(a.data):b+","+encodeURIComponent(a.data)):l?l.call(k,a):void 0},n.revokeObjectURL=function(a){"data:"!==a.substring(0,5)&&m&&m.call(k,a)},e.append=function(a){var c=this.data;if(r&&(a instanceof q||a instanceof r)){for(var e="",f=new r(a),i=0,j=f.length;j>i;i++)e+=String.fromCharCode(f[i]);c.push(e)}else if("Blob"===b(a)||"File"===b(a)){if(!g)throw new h("NOT_READABLE_ERR");var k=new g;c.push(k.readAsBinaryString(a))}else a instanceof d?"base64"===a.encoding&&p?c.push(p(a.data)):"URI"===a.encoding?c.push(decodeURIComponent(a.data)):"raw"===a.encoding&&c.push(a.data):("string"!=typeof a&&(a+=""),c.push(unescape(encodeURIComponent(a))))},e.getBlob=function(a){return arguments.length||(a=null),new d(this.data.join(""),a,"raw")},e.toString=function(){return"[object BlobBuilder]"},f.slice=function(a,b,c){var e=arguments.length;return 3>e&&(c=null),new d(this.data.slice(a,e>1?b:this.data.length),c,this.encoding)},f.toString=function(){return"[object Blob]"},f.close=function(){this.size=0,delete this.data},c}(a);a.Blob=function(a,b){var d=b?b.type||"":"",e=new c;if(a)for(var f=0,g=a.length;g>f;f++)Uint8Array&&a[f]instanceof Uint8Array?e.append(a[f].buffer):e.append(a[f]);var h=e.getBlob(d);return!h.slice&&h.webkitSlice&&(h.slice=h.webkitSlice), -h};var d=Object.getPrototypeOf||function(a){return a.__proto__};a.Blob.prototype=d(new a.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this);var saveAs=saveAs||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},p=function(b,i){b=o(b);var l,p,q,r=this,s=b.type,t=!1,u=function(){n(r,"writestart progress write writeend".split(" "))},v=function(){if((t||!l)&&(l=c().createObjectURL(b)),p)p.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}r.readyState=r.DONE,u(),m(l)},w=function(a){return function(){return r.readyState!==r.DONE?a.apply(this,arguments):void 0}},x={create:!0,exclusive:!1};return r.readyState=r.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),r.readyState=r.DONE,u(),void m(l)):(a.chrome&&s&&s!==j&&(q=b.slice||b.webkitSlice,b=q.call(b,0,b.size,j),t=!0),g&&"download"!==i&&(i+=".download"),(s===j||g)&&(p=a),h?(k+=b.size,void h(a.TEMPORARY,k,w(function(a){a.root.getDirectory("saved",x,w(function(a){var c=function(){a.getFile(i,x,w(function(a){a.createWriter(w(function(c){c.onwriteend=function(b){p.location.href=a.toURL(),r.readyState=r.DONE,n(r,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&v()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=r["on"+a]}),c.write(b),r.abort=function(){c.abort(),r.readyState=r.DONE},r.readyState=r.WRITING}),v)}),v)};a.getFile(i,{create:!1},w(function(a){a.remove(),c()}),w(function(a){a.code===a.NOT_FOUND_ERR?c():v()}))}),v)}),v)):void v())},q=p.prototype,r=function(a,b){return new p(a,b)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b){return navigator.msSaveOrOpenBlob(o(a),b)}:(q.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},q.readyState=q.INIT=0,q.WRITING=1,q.DONE=2,q.error=q.onwritestart=q.onprogress=q.onwrite=q.onabort=q.onerror=q.onwriteend=null,r)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs}),function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gi;i++)e+=String.fromCharCode(f[i]);c.push(e)}else if("Blob"===b(a)||"File"===b(a)){if(!g)throw new h("NOT_READABLE_ERR");var k=new g;c.push(k.readAsBinaryString(a))}else a instanceof d?"base64"===a.encoding&&p?c.push(p(a.data)):"URI"===a.encoding?c.push(decodeURIComponent(a.data)):"raw"===a.encoding&&c.push(a.data):("string"!=typeof a&&(a+=""),c.push(unescape(encodeURIComponent(a))))},e.getBlob=function(a){return arguments.length||(a=null),new d(this.data.join(""),a,"raw")},e.toString=function(){return"[object BlobBuilder]"},f.slice=function(a,b,c){var e=arguments.length;return 3>e&&(c=null),new d(this.data.slice(a,e>1?b:this.data.length),c,this.encoding)},f.toString=function(){return"[object Blob]"},f.close=function(){this.size=0,delete this.data},c}(a);a.Blob=function(a,b){var d=b?b.type||"":"",e=new c;if(a)for(var f=0,g=a.length;g>f;f++)Uint8Array&&a[f]instanceof Uint8Array?e.append(a[f].buffer):e.append(a[f]);var h=e.getBlob(d);return!h.slice&&h.webkitSlice&&(h.slice=h.webkitSlice),h};var d=Object.getPrototypeOf||function(a){return a.__proto__};a.Blob.prototype=d(new a.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this)},{}],2:[function(a,b,c){var d=d||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(a){var b=new MouseEvent("click");a.dispatchEvent(b)},g=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),h=a.webkitRequestFileSystem,i=a.requestFileSystem||h||a.mozRequestFileSystem,j=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},k="application/octet-stream",l=0,m=500,n=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,m)},o=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){j(f)}}},p=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},q=function(b,j,m){m||(b=p(b));var q,r,s,t=this,u=b.type,v=!1,w=function(){o(t,"writestart progress write writeend".split(" "))},x=function(){if(r&&g&&"undefined"!=typeof FileReader){var d=new FileReader;return d.onloadend=function(){var a=d.result;r.location.href="data:attachment/file"+a.slice(a.search(/[,;]/)),t.readyState=t.DONE,w()},d.readAsDataURL(b),void(t.readyState=t.INIT)}if((v||!q)&&(q=c().createObjectURL(b)),r)r.location.href=q;else{var e=a.open(q,"_blank");void 0==e&&g&&(a.location.href=q)}t.readyState=t.DONE,w(),n(q)},y=function(a){return function(){return t.readyState!==t.DONE?a.apply(this,arguments):void 0}},z={create:!0,exclusive:!1};return t.readyState=t.INIT,j||(j="download"),e?(q=c().createObjectURL(b),void setTimeout(function(){d.href=q,d.download=j,f(d),w(),n(q),t.readyState=t.DONE})):(a.chrome&&u&&u!==k&&(s=b.slice||b.webkitSlice,b=s.call(b,0,b.size,k),v=!0),h&&"download"!==j&&(j+=".download"),(u===k||h)&&(r=a),i?(l+=b.size,void i(a.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",z,y(function(a){var c=function(){a.getFile(j,z,y(function(a){a.createWriter(y(function(c){c.onwriteend=function(b){r.location.href=a.toURL(),t.readyState=t.DONE,o(t,"writeend",b),n(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&x()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=t["on"+a]}),c.write(b),t.abort=function(){c.abort(),t.readyState=t.DONE},t.readyState=t.WRITING}),x)}),x)};a.getFile(j,{create:!1},y(function(a){a.remove(),c()}),y(function(a){a.code===a.NOT_FOUND_ERR?c():x()}))}),x)}),x)):void x())},r=q.prototype,s=function(a,b,c){return new q(a,b,c)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b,c){return c||(a=p(a)),navigator.msSaveOrOpenBlob(a,b||"download")}:(r.abort=function(){var a=this;a.readyState=a.DONE,o(a,"abort")},r.readyState=r.INIT=0,r.WRITING=1,r.DONE=2,r.error=r.onwritestart=r.onprogress=r.onwrite=r.onabort=r.onerror=r.onwriteend=null,s)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof b&&b.exports?b.exports.saveAs=d:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define([],function(){return d})},{}],3:[function(a,b,c){"use strict";angular.module("ngFileSaver",[]).factory("FileSaver",["Blob","SaveAs","FileSaverUtils",a("./angular-file-saver.service")]).factory("FileSaverUtils",[a("./utils/utils.service.js")]).factory("Blob",["$window",a("./dependencies/blob-bundle.service.js")]).factory("SaveAs",[a("./dependencies/file-saver-bundle.service.js")])},{"./angular-file-saver.service":4,"./dependencies/blob-bundle.service.js":5,"./dependencies/file-saver-bundle.service.js":6,"./utils/utils.service.js":7}],4:[function(a,b,c){"use strict";b.exports=function(a,b,c){function d(a,d,e){try{b(a,d,e)}catch(f){c.handleErrors(f.message)}}return{saveAs:function(a,b,e){return c.isBlobInstance(a)||c.handleErrors("Data argument should be a blob instance"),c.isString(b)||c.handleErrors("Filename argument should be a string"),d(a,b,e)}}}},{}],5:[function(a,b,c){"use strict";a("Blob.js"),b.exports=function(a){return a.Blob}},{"Blob.js":1}],6:[function(a,b,c){"use strict";b.exports=function(){return a("FileSaver.js").saveAs||function(){}}},{"FileSaver.js":2}],7:[function(a,b,c){"use strict";b.exports=function(){return{handleErrors:function(a){throw new Error(a)},isString:function(a){return"string"==typeof a||a instanceof String},isUndefined:function(a){return"undefined"==typeof a},isBlobInstance:function(a){return a instanceof Blob}}}},{}]},{},[3]),function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return Ba.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function e(a){va.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function f(a,b){var c=!0;return o(function(){return c&&(e(a),c=!1),b.apply(this,arguments)},b)}function g(a,b){sb[a]||(e(b),sb[a]=!0)}function h(a,b){return function(c){return r(a.call(this,c),b)}}function i(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function j(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function k(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function l(){}function m(a,b){b!==!1&&H(a),p(this,a),this._d=new Date(+a._d),ub===!1&&(ub=!0,va.updateOffset(this),ub=!1)}function n(a){var b=A(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=va.localeData(),this._bubble()}function o(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function p(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Ka.length>0)for(c in Ka)d=Ka[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function q(a){return 0>a?Math.ceil(a):Math.floor(a)}function r(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.lengthd;d++)(c&&a[d]!==b[d]||!c&&C(a[d])!==C(b[d]))&&g++;return g+f}function z(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=lb[a]||mb[b]||b}return a}function A(a){var b,d,e={};for(d in a)c(a,d)&&(b=z(d),b&&(e[b]=a[d]));return e}function B(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}va[b]=function(e,f){var g,h,i=va._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=va().utc().set(d,a);return i.call(va._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function C(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function D(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function E(a,b,c){return ja(va([a,11,31+b-c]),b,c).week}function F(a){return G(a)?366:365}function G(a){return a%4===0&&a%100!==0||a%400===0}function H(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[Da]<0||a._a[Da]>11?Da:a._a[Ea]<1||a._a[Ea]>D(a._a[Ca],a._a[Da])?Ea:a._a[Fa]<0||a._a[Fa]>24||24===a._a[Fa]&&(0!==a._a[Ga]||0!==a._a[Ha]||0!==a._a[Ia])?Fa:a._a[Ga]<0||a._a[Ga]>59?Ga:a._a[Ha]<0||a._a[Ha]>59?Ha:a._a[Ia]<0||a._a[Ia]>999?Ia:-1,a._pf._overflowDayOfYear&&(Ca>b||b>Ea)&&(b=Ea),a._pf.overflow=b)}function I(b){return null==b._isValid&&(b._isValid=!isNaN(b._d.getTime())&&b._pf.overflow<0&&!b._pf.empty&&!b._pf.invalidMonth&&!b._pf.nullInput&&!b._pf.invalidFormat&&!b._pf.userInvalidated,b._strict&&(b._isValid=b._isValid&&0===b._pf.charsLeftOver&&0===b._pf.unusedTokens.length&&b._pf.bigHour===a)),b._isValid}function J(a){return a?a.toLowerCase().replace("_","-"):a}function K(a){for(var b,c,d,e,f=0;f0;){if(d=L(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&y(e,c,!0)>=b-1)break;b--}f++}return null}function L(a){var b=null;if(!Ja[a]&&La)try{b=va.locale(),require("./locale/"+a),va.locale(b)}catch(c){}return Ja[a]}function M(a,b){var c,d;return b._isUTC?(c=b.clone(),d=(va.isMoment(a)||x(a)?+a:+va(a))-+c,c._d.setTime(+c._d+d),va.updateOffset(c,!1),c):va(a).local()}function N(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function O(a){var b,c,d=a.match(Pa);for(b=0,c=d.length;c>b;b++)rb[d[b]]?d[b]=rb[d[b]]:d[b]=N(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function P(a,b){return a.isValid()?(b=Q(b,a.localeData()),nb[b]||(nb[b]=O(b)),nb[b](a)):a.localeData().invalidDate()}function Q(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Qa.lastIndex=0;d>=0&&Qa.test(a);)a=a.replace(Qa,c),Qa.lastIndex=0,d-=1;return a}function R(a,b){var c,d=b._strict;switch(a){case"Q":return _a;case"DDDD":return bb;case"YYYY":case"GGGG":case"gggg":return d?cb:Ta;case"Y":case"G":case"g":return eb;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?db:Ua;case"S":if(d)return _a;case"SS":if(d)return ab;case"SSS":if(d)return bb;case"DDD":return Sa;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Wa;case"a":case"A":return b._locale._meridiemParse;case"x":return Za;case"X":return $a;case"Z":case"ZZ":return Xa;case"T":return Ya;case"SSSS":return Va;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?ab:Ra;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Ra;case"Do":return d?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return c=new RegExp($(Z(a.replace("\\","")),"i"))}}function S(a){a=a||"";var b=a.match(Xa)||[],c=b[b.length-1]||[],d=(c+"").match(jb)||["-",0,0],e=+(60*d[1])+C(d[2]);return"+"===d[0]?e:-e}function T(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[Da]=3*(C(b)-1));break;case"M":case"MM":null!=b&&(e[Da]=C(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b,a,c._strict),null!=d?e[Da]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Ea]=C(b));break;case"Do":null!=b&&(e[Ea]=C(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=C(b));break;case"YY":e[Ca]=va.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Ca]=C(b);break;case"a":case"A":c._meridiem=b;break;case"h":case"hh":c._pf.bigHour=!0;case"H":case"HH":e[Fa]=C(b);break;case"m":case"mm":e[Ga]=C(b);break;case"s":case"ss":e[Ha]=C(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Ia]=C(1e3*("0."+b));break;case"x":c._d=new Date(C(b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=S(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=C(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=va.parseTwoDigitYear(b)}}function U(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[Ca],ja(va(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[Ca],ja(va(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=ka(d,e,f,h,g),a._a[Ca]=i.year,a._dayOfYear=i.dayOfYear}function V(a){var c,d,e,f,g=[];if(!a._d){for(e=X(a),a._w&&null==a._a[Ea]&&null==a._a[Da]&&U(a),a._dayOfYear&&(f=b(a._a[Ca],e[Ca]),a._dayOfYear>F(f)&&(a._pf._overflowDayOfYear=!0),d=fa(f,0,a._dayOfYear),a._a[Da]=d.getUTCMonth(),a._a[Ea]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Fa]&&0===a._a[Ga]&&0===a._a[Ha]&&0===a._a[Ia]&&(a._nextDay=!0,a._a[Fa]=0),a._d=(a._useUTC?fa:ea).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[Fa]=24)}}function W(a){var b;a._d||(b=A(a._i),a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],V(a))}function X(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function Y(b){if(b._f===va.ISO_8601)return void aa(b);b._a=[],b._pf.empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=Q(b._f,b._locale).match(Pa)||[],c=0;c0&&b._pf.unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),rb[f]?(d?b._pf.empty=!1:b._pf.unusedTokens.push(f),T(f,d,b)):b._strict&&!d&&b._pf.unusedTokens.push(f);b._pf.charsLeftOver=i-j,h.length>0&&b._pf.unusedInput.push(h),b._pf.bigHour===!0&&b._a[Fa]<=12&&(b._pf.bigHour=a),b._a[Fa]=k(b._locale,b._a[Fa],b._meridiem),V(b),H(b)}function Z(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function $(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function _(a){var b,c,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(NaN));for(f=0;fg)&&(e=g,c=b));o(a,c||b)}function aa(a){var b,c,d=a._i,e=fb.exec(d);if(e){for(a._pf.iso=!0,b=0,c=hb.length;c>b;b++)if(hb[b][1].exec(d)){a._f=hb[b][0]+(e[6]||" ");break}for(b=0,c=ib.length;c>b;b++)if(ib[b][1].exec(d)){a._f+=ib[b][0];break}d.match(Xa)&&(a._f+="Z"),Y(a)}else a._isValid=!1}function ba(a){aa(a),a._isValid===!1&&(delete a._isValid,va.createFromInputFallback(a))}function ca(a,b){var c,d=[];for(c=0;ca&&h.setFullYear(a),h}function fa(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function ga(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function ha(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function ia(a,b,c){var d=va.duration(a).abs(),e=Aa(d.as("s")),f=Aa(d.as("m")),g=Aa(d.as("h")),h=Aa(d.as("d")),i=Aa(d.as("M")),j=Aa(d.as("y")),k=e0,k[4]=c,ha.apply({},k)}function ja(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=va(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ka(a,b,c,d,e){var f,g,h=fa(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:F(a-1)+g}}function la(b){var c,d=b._i,e=b._f;return b._locale=b._locale||va.localeData(b._l),null===d||e===a&&""===d?va.invalid({nullInput:!0}):("string"==typeof d&&(b._i=d=b._locale.preparse(d)),va.isMoment(d)?new m(d,!0):(e?w(e)?_(b):Y(b):da(b),c=new m(b),c._nextDay&&(c.add(1,"d"),c._nextDay=a),c))}function ma(a,b){var c,d;if(1===b.length&&w(b[0])&&(b=b[0]),!b.length)return va();for(c=b[0],d=1;d=0?"+":"-";return b+r(Math.abs(a),6)},gg:function(){return r(this.weekYear()%100,2)},gggg:function(){return r(this.weekYear(),4)},ggggg:function(){return r(this.weekYear(),5)},GG:function(){return r(this.isoWeekYear()%100,2)},GGGG:function(){return r(this.isoWeekYear(),4)},GGGGG:function(){return r(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return C(this.milliseconds()/100)},SS:function(){return r(C(this.milliseconds()/10),2)},SSS:function(){return r(this.milliseconds(),3)},SSSS:function(){return r(this.milliseconds(),3)},Z:function(){var a=this.utcOffset(),b="+";return 0>a&&(a=-a,b="-"),b+r(C(a/60),2)+":"+r(C(a)%60,2)},ZZ:function(){var a=this.utcOffset(),b="+";return 0>a&&(a=-a,b="-"),b+r(C(a/60),2)+r(C(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},sb={},tb=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],ub=!1;pb.length;)xa=pb.pop(),rb[xa+"o"]=i(rb[xa],xa);for(;qb.length;)xa=qb.pop(),rb[xa+xa]=h(rb[xa],2);rb.DDDD=h(rb.DDD,3),o(l.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=va.utc([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=va([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.apply(b,[c]):d},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(a){return a},postformat:function(a){return a},week:function(a){return ja(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy; -},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),va=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),la(g)},va.suppressDeprecationWarnings=!1,va.createFromInputFallback=f("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),va.min=function(){var a=[].slice.call(arguments,0);return ma("isBefore",a)},va.max=function(){var a=[].slice.call(arguments,0);return ma("isAfter",a)},va.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),la(g).utc()},va.unix=function(a){return va(1e3*a)},va.duration=function(a,b){var d,e,f,g,h=a,i=null;return va.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=Na.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:C(i[Ea])*d,h:C(i[Fa])*d,m:C(i[Ga])*d,s:C(i[Ha])*d,ms:C(i[Ia])*d}):(i=Oa.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):null==h?h={}:"object"==typeof h&&("from"in h||"to"in h)&&(g=t(va(h.from),va(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new n(h),va.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},va.version=ya,va.defaultFormat=gb,va.ISO_8601=function(){},va.momentProperties=Ka,va.updateOffset=function(){},va.relativeTimeThreshold=function(b,c){return ob[b]===a?!1:c===a?ob[b]:(ob[b]=c,!0)},va.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return va.locale(a,b)}),va.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?va.defineLocale(a,b):va.localeData(a),c&&(va.duration._locale=va._locale=c)),va._locale._abbr},va.defineLocale=function(a,b){return null!==b?(b.abbr=a,Ja[a]||(Ja[a]=new l),Ja[a].set(b),va.locale(a),Ja[a]):(delete Ja[a],null)},va.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return va.localeData(a)}),va.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return va._locale;if(!w(a)){if(b=L(a))return b;a=[a]}return K(a)},va.isMoment=function(a){return a instanceof m||null!=a&&c(a,"_isAMomentObject")},va.isDuration=function(a){return a instanceof n};for(xa=tb.length-1;xa>=0;--xa)B(tb[xa]);va.normalizeUnits=function(a){return z(a)},va.invalid=function(a){var b=va.utc(NaN);return null!=a?o(b._pf,a):b._pf.userInvalidated=!0,b},va.parseZone=function(){return va.apply(null,arguments).parseZone()},va.parseTwoDigitYear=function(a){return C(a)+(C(a)>68?1900:2e3)},va.isDate=x,o(va.fn=m.prototype,{clone:function(){return va(this)},valueOf:function(){return+this._d-6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=va(this).utc();return 00:!1},parsingFlags:function(){return o({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.utcOffset(0,a)},local:function(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(a){var b=P(this,a||va.defaultFormat);return this.localeData().postformat(b)},add:u(1,"add"),subtract:u(-1,"subtract"),diff:function(a,b,c){var d,e,f=M(a,this),g=6e4*(f.utcOffset()-this.utcOffset());return b=z(b),"year"===b||"month"===b||"quarter"===b?(e=j(this,f),"quarter"===b?e/=3:"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:q(e)},from:function(a,b){return va.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(va(),a)},calendar:function(a){var b=a||va(),c=M(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,va(b)))},isLeapYear:function(){return G(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=ga(a,this.localeData()),this.add(a-b,"d")):b},month:qa("Month",!0),startOf:function(a){switch(a=z(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(b){return b=z(b),b===a||"millisecond"===b?this:this.startOf(b).add(1,"isoWeek"===b?"week":b).subtract(1,"ms")},isAfter:function(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=va.isMoment(a)?a:va(a),+this>+a):(c=va.isMoment(a)?+a:+va(a),c<+this.clone().startOf(b))},isBefore:function(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=va.isMoment(a)?a:va(a),+a>+this):(c=va.isMoment(a)?+a:+va(a),+this.clone().endOf(b)a?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=va.apply(null,arguments),a>this?this:a}),zone:f("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}),utcOffset:function(a,b){var c,d=this._offset||0;return null!=a?("string"==typeof a&&(a=S(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateUtcOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.add(c,"m"),d!==a&&(!b||this._changeInProgress?v(this,va.duration(a-d,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,va.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?d:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(S(this._i)),this},hasAlignedHourOffset:function(a){return a=a?va(a).utcOffset():0,(this.utcOffset()-a)%60===0},daysInMonth:function(){return D(this.year(),this.month())},dayOfYear:function(a){var b=Aa((va(this).startOf("day")-va(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=ja(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=ja(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=ja(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return E(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return E(this.year(),a.dow,a.doy)},get:function(a){return a=z(a),this[a]()},set:function(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else a=z(a),"function"==typeof this[a]&&this[a](b);return this},locale:function(b){var c;return b===a?this._locale._abbr:(c=va.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}}),va.fn.millisecond=va.fn.milliseconds=qa("Milliseconds",!1),va.fn.second=va.fn.seconds=qa("Seconds",!1),va.fn.minute=va.fn.minutes=qa("Minutes",!1),va.fn.hour=va.fn.hours=qa("Hours",!0),va.fn.date=qa("Date",!0),va.fn.dates=f("dates accessor is deprecated. Use date instead.",qa("Date",!0)),va.fn.year=qa("FullYear",!0),va.fn.years=f("years accessor is deprecated. Use year instead.",qa("FullYear",!0)),va.fn.days=va.fn.day,va.fn.months=va.fn.month,va.fn.weeks=va.fn.week,va.fn.isoWeeks=va.fn.isoWeek,va.fn.quarters=va.fn.quarter,va.fn.toJSON=va.fn.toISOString,va.fn.isUTC=va.fn.isUtc,o(va.duration.fn=n.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=q(d/1e3),g.seconds=a%60,b=q(a/60),g.minutes=b%60,c=q(b/60),g.hours=c%24,e+=q(c/24),h=q(ra(e)),e-=q(sa(h)),f+=q(e/30),e%=30,h+=q(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return q(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12)},humanize:function(a){var b=ia(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=va.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=va.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=z(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=z(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*ra(b),"month"===a?c:c/12;switch(b=this._days+Math.round(sa(this._months/12)),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:va.fn.lang,locale:va.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),va.duration.fn.toString=va.duration.fn.toISOString;for(xa in kb)c(kb,xa)&&ta(xa.toLowerCase());va.duration.fn.asMilliseconds=function(){return this.as("ms")},va.duration.fn.asSeconds=function(){return this.as("s")},va.duration.fn.asMinutes=function(){return this.as("m")},va.duration.fn.asHours=function(){return this.as("h")},va.duration.fn.asDays=function(){return this.as("d")},va.duration.fn.asWeeks=function(){return this.as("weeks")},va.duration.fn.asMonths=function(){return this.as("M")},va.duration.fn.asYears=function(){return this.as("y")},va.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===C(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),La?module.exports=va:"function"==typeof define&&define.amd?(define(function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(za.moment=wa),va}),ua(!0)):ua()}.call(this),function(a,b){if("function"==typeof define&&define.amd)define(["moment","jquery","exports"],function(c,d,e){a.daterangepicker=b(a,e,c,d)});else if("undefined"!=typeof exports){var c,d=require("moment");try{c=require("jquery")}catch(e){if(c=window.jQuery,!c)throw new Error("jQuery dependency not found")}b(a,exports,d,c)}else a.daterangepicker=b(a,{},a.moment,a.jQuery||a.Zepto||a.ender||a.$)}(this,function(a,b,c,d){var e=function(a,b,c){this.parentEl="body",this.element=d(a),this.isShowing=!1;var e='';("object"!=typeof b||null===b)&&(b={}),this.parentEl=d("object"==typeof b&&b.parentEl&&d(b.parentEl).length?b.parentEl:this.parentEl),this.container=d(e).appendTo(this.parentEl),this.setOptions(b,c);var f=this.container;d.each(this.buttonClasses,function(a,b){f.find("button").addClass(b)}),this.container.find(".daterangepicker_start_input label").html(this.locale.fromLabel),this.container.find(".daterangepicker_end_input label").html(this.locale.toLabel),this.applyClass.length&&this.container.find(".applyBtn").addClass(this.applyClass),this.cancelClass.length&&this.container.find(".cancelBtn").addClass(this.cancelClass),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".calendar").on("click.daterangepicker",".prev",d.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",d.proxy(this.clickNext,this)).on("click.daterangepicker","td.available",d.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",d.proxy(this.hoverDate,this)).on("mouseleave.daterangepicker","td.available",d.proxy(this.updateFormInputs,this)).on("change.daterangepicker","select.yearselect",d.proxy(this.updateMonthYear,this)).on("change.daterangepicker","select.monthselect",d.proxy(this.updateMonthYear,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",d.proxy(this.updateTime,this)),this.container.find(".ranges").on("click.daterangepicker","button.applyBtn",d.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",d.proxy(this.clickCancel,this)).on("click.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",d.proxy(this.showCalendars,this)).on("change.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",d.proxy(this.inputsChanged,this)).on("keydown.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",d.proxy(this.inputsKeydown,this)).on("click.daterangepicker","li",d.proxy(this.clickRange,this)).on("mouseenter.daterangepicker","li",d.proxy(this.enterRange,this)).on("mouseleave.daterangepicker","li",d.proxy(this.updateFormInputs,this)),this.element.is("input")?this.element.on({"click.daterangepicker":d.proxy(this.show,this),"focus.daterangepicker":d.proxy(this.show,this),"keyup.daterangepicker":d.proxy(this.updateFromControl,this)}):this.element.on("click.daterangepicker",d.proxy(this.toggle,this))};e.prototype={constructor:e,setOptions:function(a,b){if(this.startDate=c().startOf("day"),this.endDate=c().endOf("day"),this.timeZone=c().zone(),this.minDate=!1,this.maxDate=!1,this.dateLimit=!1,this.showDropdowns=!1,this.showWeekNumbers=!1,this.timePicker=!1,this.timePickerSeconds=!1,this.timePickerIncrement=30,this.timePicker12Hour=!0,this.singleDatePicker=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.buttonClasses=["btn","btn-small btn-sm"],this.applyClass="btn-success",this.cancelClass="btn-default",this.format="MM/DD/YYYY",this.separator=" - ",this.locale={applyLabel:"Apply",cancelLabel:"Cancel",fromLabel:"From",toLabel:"To",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:c.weekdaysMin(),monthNames:c.monthsShort(),firstDay:c.localeData()._week.dow},this.cb=function(){},"string"==typeof a.format&&(this.format=a.format),"string"==typeof a.separator&&(this.separator=a.separator),"string"==typeof a.startDate&&(this.startDate=c(a.startDate,this.format)),"string"==typeof a.endDate&&(this.endDate=c(a.endDate,this.format)),"string"==typeof a.minDate&&(this.minDate=c(a.minDate,this.format)),"string"==typeof a.maxDate&&(this.maxDate=c(a.maxDate,this.format)),"object"==typeof a.startDate&&(this.startDate=c(a.startDate)),"object"==typeof a.endDate&&(this.endDate=c(a.endDate)),"object"==typeof a.minDate&&(this.minDate=c(a.minDate)),"object"==typeof a.maxDate&&(this.maxDate=c(a.maxDate)),"string"==typeof a.applyClass&&(this.applyClass=a.applyClass),"string"==typeof a.cancelClass&&(this.cancelClass=a.cancelClass),"object"==typeof a.dateLimit&&(this.dateLimit=a.dateLimit),"object"==typeof a.locale&&("object"==typeof a.locale.daysOfWeek&&(this.locale.daysOfWeek=a.locale.daysOfWeek.slice()),"object"==typeof a.locale.monthNames&&(this.locale.monthNames=a.locale.monthNames.slice()),"number"==typeof a.locale.firstDay&&(this.locale.firstDay=a.locale.firstDay),"string"==typeof a.locale.applyLabel&&(this.locale.applyLabel=a.locale.applyLabel),"string"==typeof a.locale.cancelLabel&&(this.locale.cancelLabel=a.locale.cancelLabel),"string"==typeof a.locale.fromLabel&&(this.locale.fromLabel=a.locale.fromLabel),"string"==typeof a.locale.toLabel&&(this.locale.toLabel=a.locale.toLabel),"string"==typeof a.locale.weekLabel&&(this.locale.weekLabel=a.locale.weekLabel),"string"==typeof a.locale.customRangeLabel&&(this.locale.customRangeLabel=a.locale.customRangeLabel)),"string"==typeof a.opens&&(this.opens=a.opens),"boolean"==typeof a.showWeekNumbers&&(this.showWeekNumbers=a.showWeekNumbers),"string"==typeof a.buttonClasses&&(this.buttonClasses=[a.buttonClasses]),"object"==typeof a.buttonClasses&&(this.buttonClasses=a.buttonClasses),"boolean"==typeof a.showDropdowns&&(this.showDropdowns=a.showDropdowns),"boolean"==typeof a.singleDatePicker&&(this.singleDatePicker=a.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof a.timePicker&&(this.timePicker=a.timePicker),"boolean"==typeof a.timePickerSeconds&&(this.timePickerSeconds=a.timePickerSeconds),"number"==typeof a.timePickerIncrement&&(this.timePickerIncrement=a.timePickerIncrement),"boolean"==typeof a.timePicker12Hour&&(this.timePicker12Hour=a.timePicker12Hour),0!=this.locale.firstDay)for(var e=this.locale.firstDay;e>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),e--;var f,g,h;if("undefined"==typeof a.startDate&&"undefined"==typeof a.endDate&&d(this.element).is("input[type=text]")){var i=d(this.element).val(),j=i.split(this.separator);f=g=null,2==j.length?(f=c(j[0],this.format),g=c(j[1],this.format)):this.singleDatePicker&&""!==i&&(f=c(i,this.format),g=c(i,this.format)),null!==f&&null!==g&&(this.startDate=f,this.endDate=g)}if("string"==typeof a.timeZone||"number"==typeof a.timeZone?(this.timeZone=a.timeZone,this.startDate.zone(this.timeZone),this.endDate.zone(this.timeZone)):this.timeZone=c(this.startDate).zone(),"object"==typeof a.ranges){for(h in a.ranges)f="string"==typeof a.ranges[h][0]?c(a.ranges[h][0],this.format):c(a.ranges[h][0]),g="string"==typeof a.ranges[h][1]?c(a.ranges[h][1],this.format):c(a.ranges[h][1]),this.minDate&&f.isBefore(this.minDate)&&(f=c(this.minDate)),this.maxDate&&g.isAfter(this.maxDate)&&(g=c(this.maxDate)),this.minDate&&g.isBefore(this.minDate)||this.maxDate&&f.isAfter(this.maxDate)||(this.ranges[h]=[f,g]);var k="
                ";for(h in this.ranges)k+="
              • "+h+"
              • ";k+="
              • "+this.locale.customRangeLabel+"
              • ",k+="
              ",this.container.find(".ranges ul").remove(),this.container.find(".ranges").prepend(k)}if("function"==typeof b&&(this.cb=b),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day")),this.singleDatePicker?(this.opens="right",this.container.addClass("single"),this.container.find(".calendar.right").show(),this.container.find(".calendar.left").hide(),this.timePicker?this.container.find(".ranges .daterangepicker_start_input, .ranges .daterangepicker_end_input").hide():this.container.find(".ranges").hide(),this.container.find(".calendar.right").hasClass("single")||this.container.find(".calendar.right").addClass("single")):(this.container.removeClass("single"),this.container.find(".calendar.right").removeClass("single"),this.container.find(".ranges").show()),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.oldChosenLabel=this.chosenLabel,this.leftCalendar={month:c([this.startDate.year(),this.startDate.month(),1,this.startDate.hour(),this.startDate.minute(),this.startDate.second()]),calendar:[]},this.rightCalendar={month:c([this.endDate.year(),this.endDate.month(),1,this.endDate.hour(),this.endDate.minute(),this.endDate.second()]),calendar:[]},"right"==this.opens||"center"==this.opens){var l=this.container.find(".calendar.first"),m=this.container.find(".calendar.second");m.hasClass("single")&&(m.removeClass("single"),l.addClass("single")),l.removeClass("left").addClass("right"),m.removeClass("right").addClass("left"),this.singleDatePicker&&(l.show(),m.hide())}"undefined"!=typeof a.ranges||this.singleDatePicker||this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),this.updateView(),this.updateCalendars()},setStartDate:function(a){"string"==typeof a&&(this.startDate=c(a,this.format).zone(this.timeZone)),"object"==typeof a&&(this.startDate=c(a)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.oldStartDate=this.startDate.clone(),this.updateView(),this.updateCalendars(),this.updateInputText()},setEndDate:function(a){"string"==typeof a&&(this.endDate=c(a,this.format).zone(this.timeZone)),"object"==typeof a&&(this.endDate=c(a)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.oldEndDate=this.endDate.clone(),this.updateView(),this.updateCalendars(),this.updateInputText()},updateView:function(){this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute()),this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute()),this.updateFormInputs()},updateFormInputs:function(){this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.format)),this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.format)),this.startDate.isSame(this.endDate)||this.startDate.isBefore(this.endDate)?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled")},updateFromControl:function(){if(this.element.is("input")&&this.element.val().length){var a=this.element.val().split(this.separator),b=null,d=null;2===a.length&&(b=c(a[0],this.format).zone(this.timeZone),d=c(a[1],this.format).zone(this.timeZone)),(this.singleDatePicker||null===b||null===d)&&(b=c(this.element.val(),this.format).zone(this.timeZone),d=b),d.isBefore(b)||(this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.startDate=b,this.endDate=d,this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.notify(),this.updateCalendars())}},notify:function(){this.updateView(),this.cb(this.startDate,this.endDate,this.chosenLabel)},move:function(){var a={top:0,left:0},b=d(window).width();this.parentEl.is("body")||(a={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},b=this.parentEl[0].clientWidth+this.parentEl.offset().left),"left"==this.opens?(this.container.css({top:this.element.offset().top+this.element.outerHeight()-a.top,right:b-this.element.offset().left-this.element.outerWidth(),left:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):"center"==this.opens?(this.container.css({top:this.element.offset().top+this.element.outerHeight()-a.top,left:this.element.offset().left-a.left+this.element.outerWidth()/2-this.container.outerWidth()/2,right:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):(this.container.css({top:this.element.offset().top+this.element.outerHeight()-a.top,left:this.element.offset().left-a.left,right:"auto"}),this.container.offset().left+this.container.outerWidth()>d(window).width()&&this.container.css({left:"auto",right:0}))},toggle:function(a){this.element.hasClass("active")?this.hide():this.show()},show:function(a){this.isShowing||(this.element.addClass("active"),this.container.show(),this.move(),this._outsideClickProxy=d.proxy(function(a){this.outsideClick(a)},this),d(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),this.isShowing=!0,this.element.trigger("show.daterangepicker",this))},outsideClick:function(a){var b=d(a.target);"focusin"==a.type||b.closest(this.element).length||b.closest(this.container).length||b.closest(".calendar-date").length||this.hide()},hide:function(a){this.isShowing&&(d(document).off(".daterangepicker"),this.element.removeClass("active"),this.container.hide(),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.notify(),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.isShowing=!1,this.element.trigger("hide.daterangepicker",this))},enterRange:function(a){var b=a.target.innerHTML;if(b==this.locale.customRangeLabel)this.updateView();else{var c=this.ranges[b];this.container.find("input[name=daterangepicker_start]").val(c[0].format(this.format)),this.container.find("input[name=daterangepicker_end]").val(c[1].format(this.format))}},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},inputsChanged:function(a){var b=d(a.target),e=c(b.val(),this.format);if(e.isValid()){var f,g;"daterangepicker_start"===b.attr("name")?(f=e,g=this.endDate):(f=this.startDate,g=e),this.setCustomDates(f,g)}},inputsKeydown:function(a){13===a.keyCode&&(this.inputsChanged(a),this.notify())},updateInputText:function(){this.element.is("input")&&!this.singleDatePicker?this.element.val(this.startDate.format(this.format)+this.separator+this.endDate.format(this.format)):this.element.is("input")&&this.element.val(this.endDate.format(this.format))},clickRange:function(a){var b=a.target.innerHTML;if(this.chosenLabel=b,b==this.locale.customRangeLabel)this.showCalendars();else{var c=this.ranges[b];this.startDate=c[0],this.endDate=c[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute()),this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute()),this.updateCalendars(),this.updateInputText(),this.hideCalendars(),this.hide(),this.element.trigger("apply.daterangepicker",this)}},clickPrev:function(a){var b=d(a.target).parents(".calendar");b.hasClass("left")?this.leftCalendar.month.subtract(1,"month"):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(a){var b=d(a.target).parents(".calendar");b.hasClass("left")?this.leftCalendar.month.add(1,"month"):this.rightCalendar.month.add(1,"month"),this.updateCalendars()},hoverDate:function(a){var b=d(a.target).attr("data-title"),c=b.substr(1,1),e=b.substr(3,1),f=d(a.target).parents(".calendar");f.hasClass("left")?this.container.find("input[name=daterangepicker_start]").val(this.leftCalendar.calendar[c][e].format(this.format)):this.container.find("input[name=daterangepicker_end]").val(this.rightCalendar.calendar[c][e].format(this.format))},setCustomDates:function(a,b){if(this.chosenLabel=this.locale.customRangeLabel,a.isAfter(b)){var d=this.endDate.diff(this.startDate);b=c(a).add(d,"ms")}this.startDate=a,this.endDate=b,this.updateView(),this.updateCalendars()},clickDate:function(a){var b,e,f=d(a.target).attr("data-title"),g=f.substr(1,1),h=f.substr(3,1),i=d(a.target).parents(".calendar");if(i.hasClass("left")){if(b=this.leftCalendar.calendar[g][h],e=this.endDate,"object"==typeof this.dateLimit){var j=c(b).add(this.dateLimit).startOf("day");e.isAfter(j)&&(e=j)}}else if(b=this.startDate,e=this.rightCalendar.calendar[g][h],"object"==typeof this.dateLimit){var k=c(e).subtract(this.dateLimit).startOf("day");b.isBefore(k)&&(b=k)}this.singleDatePicker&&i.hasClass("left")?e=b.clone():this.singleDatePicker&&i.hasClass("right")&&(b=e.clone()),i.find("td").removeClass("active"),d(a.target).addClass("active"),this.setCustomDates(b,e),this.timePicker||e.endOf("day"),this.singleDatePicker&&!this.timePicker&&this.clickApply()},clickApply:function(a){this.updateInputText(),this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(a){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.chosenLabel=this.oldChosenLabel,this.updateView(),this.updateCalendars(),this.hide(),this.element.trigger("cancel.daterangepicker",this)},updateMonthYear:function(a){var b=d(a.target).closest(".calendar").hasClass("left"),c=b?"left":"right",e=this.container.find(".calendar."+c),f=parseInt(e.find(".monthselect").val(),10),g=e.find(".yearselect").val();this[c+"Calendar"].month.month(f).year(g),this.updateCalendars()},updateTime:function(a){var b=d(a.target).closest(".calendar"),c=b.hasClass("left"),e=parseInt(b.find(".hourselect").val(),10),f=parseInt(b.find(".minuteselect").val(),10),g=0;if(this.timePickerSeconds&&(g=parseInt(b.find(".secondselect").val(),10)),this.timePicker12Hour){var h=b.find(".ampmselect").val();"PM"===h&&12>e&&(e+=12),"AM"===h&&12===e&&(e=0)}if(c){var i=this.startDate.clone();i.hour(e),i.minute(f),i.second(g), -this.startDate=i,this.leftCalendar.month.hour(e).minute(f).second(g),this.singleDatePicker&&(this.endDate=i.clone())}else{var j=this.endDate.clone();j.hour(e),j.minute(f),j.second(g),this.endDate=j,this.singleDatePicker&&(this.startDate=j.clone()),this.rightCalendar.month.hour(e).minute(f).second(g)}this.updateView(),this.updateCalendars()},updateCalendars:function(){this.leftCalendar.calendar=this.buildCalendar(this.leftCalendar.month.month(),this.leftCalendar.month.year(),this.leftCalendar.month.hour(),this.leftCalendar.month.minute(),this.leftCalendar.month.second(),"left"),this.rightCalendar.calendar=this.buildCalendar(this.rightCalendar.month.month(),this.rightCalendar.month.year(),this.rightCalendar.month.hour(),this.rightCalendar.month.minute(),this.rightCalendar.month.second(),"right"),this.container.find(".calendar.left").empty().html(this.renderCalendar(this.leftCalendar.calendar,this.startDate,this.minDate,this.maxDate,"left")),this.container.find(".calendar.right").empty().html(this.renderCalendar(this.rightCalendar.calendar,this.endDate,this.singleDatePicker?this.minDate:this.startDate,this.maxDate,"right")),this.container.find(".ranges li").removeClass("active");var a=!0,b=0;for(var c in this.ranges)this.timePicker?this.startDate.isSame(this.ranges[c][0])&&this.endDate.isSame(this.ranges[c][1])&&(a=!1,this.chosenLabel=this.container.find(".ranges li:eq("+b+")").addClass("active").html()):this.startDate.format("YYYY-MM-DD")==this.ranges[c][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[c][1].format("YYYY-MM-DD")&&(a=!1,this.chosenLabel=this.container.find(".ranges li:eq("+b+")").addClass("active").html()),b++;a&&(this.chosenLabel=this.container.find(".ranges li:last").addClass("active").html(),this.showCalendars())},buildCalendar:function(a,b,d,e,f,g){var h,i=c([b,a]).daysInMonth(),j=c([b,a,1]),k=c([b,a,i]),l=c(j).subtract(1,"month").month(),m=c(j).subtract(1,"month").year(),n=c([m,l]).daysInMonth(),o=j.day(),p=[];for(p.firstDay=j,p.lastDay=k,h=0;6>h;h++)p[h]=[];var q=n-o+this.locale.firstDay+1;q>n&&(q-=7),o==this.locale.firstDay&&(q=n-6);var r,s,t=c([m,l,q,12,e,f]).zone(this.timeZone);for(h=0,r=0,s=0;42>h;h++,r++,t=c(t).add(24,"hour"))h>0&&r%7===0&&(r=0,s++),p[s][r]=t.clone().hour(d),t.hour(12),this.minDate&&p[s][r].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&p[s][r].isBefore(this.minDate)&&"left"==g&&(p[s][r]=this.minDate.clone()),this.maxDate&&p[s][r].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&p[s][r].isAfter(this.maxDate)&&"right"==g&&(p[s][r]=this.maxDate.clone());return p},renderDropdowns:function(a,b,c){for(var d=a.month(),e=a.year(),f=c&&c.year()||e+5,g=b&&b.year()||e-50,h='";for(var l='",h+l},renderCalendar:function(a,b,c,e,f){var g='
              ';g+='',g+="",g+="",this.showWeekNumbers&&(g+=""),g+=!c||c.isBefore(a.firstDay)?'':"";var h=this.locale.monthNames[a[1][1].month()]+a[1][1].format(" YYYY");this.showDropdowns&&(h=this.renderDropdowns(a[1][1],c,e)),g+='",g+=!e||e.isAfter(a.lastDay)?'':"",g+="",g+="",this.showWeekNumbers&&(g+='"),d.each(this.locale.daysOfWeek,function(a,b){g+=""}),g+="",g+="",g+="";for(var i=0;6>i;i++){g+="",this.showWeekNumbers&&(g+='");for(var j=0;7>j;j++){var k="available ";k+=a[i][j].month()==a[1][1].month()?"":"off",c&&a[i][j].isBefore(c,"day")||e&&a[i][j].isAfter(e,"day")?k=" off disabled ":a[i][j].format("YYYY-MM-DD")==b.format("YYYY-MM-DD")?(k+=" active ",a[i][j].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&(k+=" start-date "),a[i][j].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&(k+=" end-date ")):a[i][j]>=this.startDate&&a[i][j]<=this.endDate&&(k+=" in-range ",a[i][j].isSame(this.startDate)&&(k+=" start-date "),a[i][j].isSame(this.endDate)&&(k+=" end-date "));var l="r"+i+"c"+j;g+='"}g+=""}g+="",g+="
              '+h+"
              '+this.locale.weekLabel+""+b+"
              '+a[i][0].week()+"'+a[i][j].date()+"
              ",g+="
              ";var m;if(this.timePicker){g+='
              ',g+=' : ",g+=' ",this.timePickerSeconds){for(g+=': "}if(this.timePicker12Hour){g+='"}g+="
              "}return g},remove:function(){this.container.remove(),this.element.off(".daterangepicker"),this.element.removeData("daterangepicker")}},d.fn.daterangepicker=function(a,b){return this.each(function(){var c=d(this);c.data("daterangepicker")&&c.data("daterangepicker").remove(),c.data("daterangepicker",new e(c,a,b))}),this}}),function(a){"use strict";a.module("ngBootstrap",[]).directive("input",["$compile","$parse","$filter",function(b,c,d){return{restrict:"E",require:"?ngModel",link:function(b,e,f,g){function h(a){return moment.isMoment(a)?a.toDate():a}function i(a){return moment.isMoment(a)?a:moment(a)}function j(a){return d("date")(h(a),l.format.replace(/Y/g,"y").replace(/D/g,"d"))}function k(a){return[j(a.startDate),j(a.endDate)].join(l.separator)}if("daterange"===f.type&&null!==g){var l={};l.format=f.format||"YYYY-MM-DD",l.separator=f.separator||" - ",l.minDate=f.minDate&&moment(f.minDate),l.maxDate=f.maxDate&&moment(f.maxDate),l.dateLimit=f.limit&&moment.duration.apply(this,f.limit.split(" ").map(function(a,b){return 0===b&&parseInt(a,10)||a})),l.ranges=f.ranges&&c(f.ranges)(b),l.locale=f.locale&&c(f.locale)(b),l.opens=f.opens||c(f.opens)(b),f.enabletimepicker&&(l.timePicker=!0,a.extend(l,c(f.enabletimepicker)(b))),g.$render=function(){g.$viewValue&&g.$viewValue.startDate&&e.val(k(g.$viewValue))},b.$watch(function(){return f.ngModel},function(a,c){return b[a]&&b[a].startDate?void(c===a&&(e.data("daterangepicker").startDate=i(b[a].startDate),e.data("daterangepicker").endDate=i(b[a].endDate),e.data("daterangepicker").updateView(),e.data("daterangepicker").updateCalendars(),e.data("daterangepicker").updateInputText())):void g.$setViewValue({startDate:moment().startOf("day"),endDate:moment().startOf("day")})}),e.daterangepicker(l,function(c,d,e){var f=g.$viewValue;a.equals(c,f.startDate)&&a.equals(d,f.endDate)||b.$apply(function(){g.$setViewValue({startDate:moment.isMoment(f.startDate)?c:c.toDate(),endDate:moment.isMoment(f.endDate)?d:d.toDate()}),g.$render()})})}}}}])}(angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/popup.html","uib/template/datepicker/year.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$injector",function(a,b){var c=b.has("$animateCss")?b.get("$animateCss"):null;return{link:function(b,d,e){function f(){d.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),c?c(d,{addClass:"in",easing:"ease",to:{height:d[0].scrollHeight+"px"}}).start()["finally"](g):a.addClass(d,"in",{to:{height:d[0].scrollHeight+"px"}}).then(g)}function g(){d.removeClass("collapsing").addClass("collapse").css({height:"auto"})}function h(){return d.hasClass("collapse")||d.hasClass("in")?(d.css({height:d[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),void(c?c(d,{removeClass:"in",to:{height:"0"}}).start()["finally"](i):a.removeClass(d,"in",{to:{height:"0"}}).then(i))):i()}function i(){d.css({height:"0"}),d.removeClass("collapsing").addClass("collapse")}b.$eval(e.uibCollapse)||d.addClass("in").addClass("collapse").css({height:"auto"}),b.$watch(e.uibCollapse,function(a){a?h():f()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)}}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){a&&(b.find("span").html(""),b.find("span").append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);(!a||angular.isDefined(d.uncheckable))&&b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":null)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;s.length;)s.shift()}function g(a){if(angular.isUndefined(p[a].index))return p[a];for(var b=0,c=p.length;c>b;++b)if(p[b].index===a)return p[b]}function h(c,d,g){t||(angular.extend(c,{direction:g,active:!0}),angular.extend(o.currentSlide||{},{direction:g,active:!1}),e.enabled(b)&&!a.$currentTransition&&c.$element&&o.slides.length>1&&(c.$element.data(q,c.direction),o.currentSlide&&o.currentSlide.$element&&o.currentSlide.$element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",c.$element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),s.length)){var d=s.pop(),g=a.indexOfSlide(d),i=g>o.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})),o.currentSlide=c,r=d,k())}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null,f())}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=-1,s=[];o.currentSlide=null;var t=!1;o.addSlide=function(b,c){b.$element=c,p.push(b),1===p.length||b.active?(a.$currentTransition&&(a.$currentTransition=null),o.select(p[p.length-1]),1===p.length&&a.play()):b.active=!1},o.getCurrentIndex=function(){return o.currentSlide&&angular.isDefined(o.currentSlide.index)?+o.currentSlide.index:r},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(g(b),"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(g(b),"prev")},o.removeSlide=function(a){angular.isDefined(a.index)&&p.sort(function(a,b){return+a.index>+b.index});var b=s.indexOf(a);-1!==b&&s.splice(b,1);var c=p.indexOf(a);p.splice(c,1),d(function(){p.length>0&&a.active?c>=p.length?o.select(p[c-1]):o.select(p[c]):r>c&&r--}),0===p.length&&(o.currentSlide=null,f())},o.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b&&b!==o.currentSlide&&!a.$currentTransition?h(b,d,c):b&&b!==o.currentSlide&&a.$currentTransition&&(s.push(b),b.active=!1)},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:p.indexOf(a)},a.isActive=function(a){return o.currentSlide===a},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},a.$on("$destroy",function(){t=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j)}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","orderByFilter",function(a,b,c){function d(a){var b=[],d=a.split(""),e=a.indexOf("'");if(e>-1){var f=!1;a=a.split("");for(var g=e;g-1){a=a.split(""),d[e]="("+c.regex+")",a[e]="$";for(var f=e+1,g=e+c.key.length;g>f;f++)d[f]="",a[f]="$";a=a.join(""),b.push({index:e,apply:c.apply,matcher:c.regex})}}),{regex:new RegExp("^"+d.join("")+"$"),map:c(b,"index")}}function e(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function f(a){return parseInt(a,10)}function g(a,b){return a&&b?k(a,b):a}function h(a,b){return a&&b?k(a,b,!0):a}function i(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function j(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function k(a,b,c){c=c?-1:1;var d=i(b,a.getTimezoneOffset());return j(a,c*(d-a.getTimezoneOffset()))}var l,m,n=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){l=b.id,this.parsers={},m=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a}},{key:"yy",regex:"\\d{2}",apply:function(a){this.year=+a+2e3}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|")},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|")},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=f(c+d),this.minutes+=f(c+e)}},{key:"ww",regex:"[0-4][0-9]|5[0-3]"},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]"},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s")},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|")},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|")},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|")}]},this.init(),this.parse=function(c,f,g){if(!angular.isString(c)||!f)return c;f=b.DATETIME_FORMATS[f]||f,f=f.replace(n,"\\$&"),b.id!==l&&this.init(),this.parsers[f]||(this.parsers[f]=d(f));var h=this.parsers[f],i=h.regex,j=h.map,k=c.match(i),m=!1;if(k&&k.length){var o,p;angular.isDate(g)&&!isNaN(g.getTime())?o={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),o={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(m=!0),s.apply&&s.apply.call(o,k[q])}var t=m?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=m?Date.prototype.setUTCHours:Date.prototype.setHours;return e(o.year,o.month,o.date)&&(!angular.isDate(g)||isNaN(g.getTime())||m?(p=new Date(0),t.call(p,o.year,o.month,o.date),u.call(p,o.hours||0,o.minutes||0,o.seconds||0,o.milliseconds||0)):(p=new Date(g),t.call(p,o.year,o.month,o.date),u.call(p,o.hours,o.minutes,o.seconds,o.milliseconds))),p}},this.toTimezone=g,this.fromTimezone=h,this.timezoneToOffset=i,this.addDateMinutes=j,this.convertTimezoneToLocal=k}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},e={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/};return{getRawNode:function(a){return a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(){if(angular.isUndefined(c)){var b=angular.element('
              ');a.find("body").append(b),c=b[0].offsetWidth-b[0].clientWidth,c=isFinite(c)?c:0,b.remove()}return c},scrollParent:function(c,e){c=this.getRawNode(c);var f=e?d.hidden:d.normal,g=a[0].documentElement,h=b.getComputedStyle(c),i="absolute"===h.position,j=c.parentElement||g;if(j===g||"fixed"===h.position)return g;for(;j.parentElement&&j!==g;){var k=b.getComputedStyle(j);if(i&&"static"!==k.position&&(i=!1),!i&&f.test(k.overflow+k.overflowY+k.overflowX))break;j=j.parentElement}return j},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1?!0:!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=e.auto.test(a);return b&&(a=a.replace(e.auto,"")),a=a.split("-"),a[0]=a[0]||"top",e.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",e.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,f){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=f?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(e.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":e.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=!0,f=a.querySelector(".tooltip-inner");if(f||(d=!1,f=a.querySelector(".popover-inner")),f){var g=d?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css({top:"",bottom:"",right:"",left:"",margin:""});var h="border-"+c[0]+"-width",i=b.getComputedStyle(g)[h],j="border-";j+=e.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],j+="-radius";var k=b.getComputedStyle(d?f:a)[j],l={top:"auto",bottom:"auto",left:"auto",right:"auto",margin:0};switch(c[0]){case"top":l.bottom=d?"0":"-"+i;break;case"bottom":l.top=d?"0":"-"+i;break;case"left":l.right=d?"0":"-"+i;break;case"right":l.left=d?"0":"-"+i}l[c[1]]=k,angular.element(g).css(l)}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRows:4,yearColumns:5,minDate:null,maxDate:null,shortcutPropagation:!1,ngModelOptions:{}}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i){var j=this,k={$setViewValue:angular.noop},l={};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle"],function(c){j[c]=angular.isDefined(b[c])?d(b[c])(a.$parent):g[c]}),angular.forEach(["showWeeks","startingDay","yearRows","yearColumns","shortcutPropagation"],function(c){ -j[c]=angular.isDefined(b[c])?a.$parent.$eval(b[c]):g[c]}),angular.forEach(["minDate","maxDate"],function(c){b[c]?a.$parent.$watch(b[c],function(a){j[c]=a?angular.isDate(a)?i.fromTimezone(new Date(a),l.timezone):new Date(f(a,"medium")):null,j.refreshView()}):j[c]=g[c]?i.fromTimezone(new Date(g[c]),l.timezone):null}),angular.forEach(["minMode","maxMode"],function(c){b[c]?a.$parent.$watch(b[c],function(d){j[c]=a[c]=angular.isDefined(d)?d:b[c],("minMode"===c&&j.modes.indexOf(a.datepickerMode)j.modes.indexOf(j[c]))&&(a.datepickerMode=j[c])}):j[c]=a[c]=g[c]||null}),a.datepickerMode=a.datepickerMode||g.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined(b.initDate)?(this.activeDate=i.fromTimezone(a.$parent.$eval(b.initDate),l.timezone)||new Date,a.$parent.$watch(b.initDate,function(a){a&&(k.$isEmpty(k.$modelValue)||k.$invalid)&&(j.activeDate=i.fromTimezone(a,l.timezone),j.refreshView())})):this.activeDate=new Date,a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,j.refreshView()}),a.isActive=function(b){return 0===j.compare(b.date,j.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){k=a,l=a.$options||g.ngModelOptions,k.$modelValue&&(this.activeDate=k.$modelValue),k.$render=function(){j.render()}},this.render=function(){if(k.$viewValue){var a=new Date(k.$viewValue),b=!isNaN(a);b?this.activeDate=i.fromTimezone(a,l.timezone):h||e.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=k.$viewValue?new Date(k.$viewValue):null;b=i.fromTimezone(b,l.timezone),k.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=k.$viewValue?new Date(k.$viewValue):null;d=i.fromTimezone(d,l.timezone);var e={date:b,label:f(b,c.replace(/d!/,"dd")).replace(/M!/,"MM"),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),current:0===this.compare(b,new Date),customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=e),j.activeDate&&0===this.compare(e.date,j.activeDate)&&(a.activeDt=e),e},this.isDisabled=function(c){return a.disabled||this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===j.minMode){var c=k.$viewValue?i.fromTimezone(new Date(k.$viewValue),l.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=i.toTimezone(c,l.timezone),k.$setViewValue(c),k.$render()}else j.activeDate=b,a.datepickerMode=j.modes[j.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=j.activeDate.getFullYear()+a*(j.step.years||0),c=j.activeDate.getMonth()+a*(j.step.months||0);j.activeDate.setFullYear(b,c,1),j.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===j.maxMode&&1===b||a.datepickerMode===j.minMode&&-1===b||(a.datepickerMode=j.modes[j.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var m=function(){j.element[0].focus()};a.$on("uib:datepicker.focus",m),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),j.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(j.isDisabled(j.activeDate))return;a.select(j.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(j.handleKeyDown(c,b),j.refreshView()):a.toggleMode("up"===c?1:-1)}}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).constant("uibDatepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepicker/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0,onOpenFocus:!0,altInputFormats:[]}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function o(b){var c=j.parse(b,t,a.date);if(isNaN(c))for(var d=0;d
              "),a.ngModelOptions=angular.copy(C),a.ngModelOptions.timezone=null,z.attr({"ng-model":"date","ng-model-options":"ngModelOptions","ng-change":"dateSelection(date)","template-url":x}),A=angular.element(z.children()[0]),A.attr("template-url",y),G&&"month"===c.type&&(A.attr("datepicker-mode",'"month"'),A.attr("min-mode","month")),c.datepickerOptions){var l=a.$parent.$eval(c.datepickerOptions);l&&l.initDate&&(a.initDate=j.fromTimezone(l.initDate,C.timezone),A.attr("init-date","initDate"),delete l.initDate),angular.forEach(l,function(a,b){A.attr(n(b),a)})}angular.forEach(["minMode","maxMode"],function(b){c[b]&&(a.$parent.$watch(function(){return c[b]},function(c){a.watchData[b]=c}),A.attr(n(b),"watchData."+b))}),angular.forEach(["datepickerMode","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]),f={get:function(){return d(a.$parent)}};if(A.attr(n(b),"watchData."+b),"datepickerMode"===b){var g=d.assign;f.set=function(b){g(a.$parent,b)}}Object.defineProperty(a.watchData,b,f)}}),angular.forEach(["minDate","maxDate","initDate"],function(b){if(c[b]){var d=e(c[b]);a.$parent.$watch(d,function(c){("minDate"===b||"maxDate"===b)&&(F[b]=angular.isDate(c)?j.fromTimezone(new Date(c),C.timezone):new Date(i(c,"medium"))),a.watchData[b]=F[b]||j.fromTimezone(new Date(c),C.timezone)}),A.attr(n(b),"watchData."+b)}}),c.dateDisabled&&A.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRows","yearColumns"],function(a){angular.isDefined(c[a])&&A.attr(n(a),c[a])}),c.customClass&&A.attr("custom-class","customClass({ date: date, mode: mode })"),G?B.$formatters.push(function(b){return a.date=j.fromTimezone(b,C.timezone),b}):(B.$$parserName="date",B.$validators.date=q,B.$parsers.unshift(p),B.$formatters.push(function(b){return B.$isEmpty(b)?(a.date=b,b):(a.date=j.fromTimezone(b,C.timezone),t=t.replace(/M!/,"MM").replace(/d!/,"dd"),i(a.date,t))})),B.$viewChangeListeners.push(function(){a.date=o(B.$viewValue)}),b.bind("keydown",s),D=d(z)(a),z.remove(),v?f.find("body").append(D):b.after(D),a.$on("$destroy",function(){a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),D.remove(),b.unbind("keydown",s),f.unbind("click",r)})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,F.minDate)<0||a.watchData.maxDate&&a.compare(b,F.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?i(a.date,t):null;b.val(d),B.$setViewValue(d),u&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&a.$parent.$watch(e(c.ngDisabled),function(b){a.disabled=b}),a.$watch("isOpen",function(c){c?a.disabled?a.isOpen=!1:(a.position=v?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){w&&a.$broadcast("uib:datepicker.focus"),f.bind("click",r)},0,!1)):f.unbind("click",r)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.on("click",d),a.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.off("click",d),a.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b;if(g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var x=angular.element('');n.dropdownMenu.replaceWith(x),n.dropdownMenu=x}f.close(o),n.selectedOption=null}angular.isFunction(r)&&r(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c0&&(b=t.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function l(){if(p&&-1===i()){var a=q;m(p,q,function(){a=null}),p=void 0,q=void 0}}function m(a,c,d,e){function g(){g.done||(g.done=!0,b(a,{event:"leave"}).start().then(function(){a.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(v.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function n(a){if(a.isDefaultPrevented())return a;var b=t.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){v.dismiss(b.key,"escape key press")}));break;case 9:v.loadFocusElementList(b);var c=!1;a.shiftKey?v.isFocusInFirstItem(a)&&(c=v.focusLastFocusableElement()):v.isFocusInLastItem(a)&&(c=v.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p,q,r,s="modal-open",t=h.createNew(),u=g.createNew(),v={NOW_CLOSING_EVENT:"modal.stack.now-closing"},w=0,x="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(i,function(a){q&&(q.index=a)}),c.on("keydown",n),e.$on("$destroy",function(){c.off("keydown",n)}),v.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||s;k(!1),t.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),u.put(h,b);var j=f.appendTo,l=i();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!p&&(q=e.$new(!0),q.modalOptions=f,q.index=l,p=angular.element('
              '),p.attr("backdrop-class",f.backdropClass),f.animation&&p.attr("modal-animation","true"),d(p)(q),a.enter(p,j));var m=angular.element('
              ');m.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:t.length()-1,animate:"animate"}).html(f.content),f.animation&&m.attr("modal-animation","true"),a.enter(m,j).then(function(){d(m)(f.scope),a.addClass(j,h)}),t.top().value.modalDomEl=m,t.top().value.modalOpener=g,v.clearFocusListCache()},v.close=function(a,b){var c=t.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),j(a,c.value.modalOpener),!0):!c},v.dismiss=function(a,b){var c=t.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),j(a,c.value.modalOpener),!0):!c},v.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},v.getTop=function(){return t.top()},v.modalRendered=function(a){var b=t.get(a);b&&b.value.renderDeferred.resolve()},v.focusFirstFocusableElement=function(){return r.length>0?(r[0].focus(),!0):!1},v.focusLastFocusableElement=function(){return r.length>0?(r[r.length-1].focus(),!0):!1},v.isFocusInFirstItem=function(a){return r.length>0?(a.target||a.srcElement)===r[0]:!1},v.isFocusInLastItem=function(a){return r.length>0?(a.target||a.srcElement)===r[r.length-1]:!1},v.clearFocusListCache=function(){r=[],w=0},v.loadFocusElementList=function(a){if((void 0===r||!r.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(r=b[0].querySelectorAll(x))}},v}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i={};e.controller&&(i.$scope=d,i.$uibModalInstance=p,angular.forEach(a[1],function(a,b){i[b]=a}),g=f(e.controller,i),e.controllerAs&&(e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),d[e.controllerAs]=g)),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b.init=function(e,f){b.ngModelCtrl=e,b.config=f,e.$render=function(){b.render()},d.itemsPerPage?c.$parent.$watch(a(d.itemsPerPage),function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()}):b.itemsPerPage=f.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()}}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0, -link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var m=f(h,h,h===a);c.push(m)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var n=f(d-1,"...",!1);c.unshift(n)}if(l){if(3===d){var o=f(2,"2",!1);c.unshift(o)}var p=f(1,"1",!1);c.unshift(p)}}if(b>e){if(!l||b-2>e){var q=f(e+1,"...",!1);c.push(q)}if(l){if(e===b-2){var r=f(b-1,b-1,!1);c.push(r)}var s=f(b,b,!1);c.push(s)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()});var m=this.render;this.render=function(){m(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
              ';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){M.isOpen?q():m()}function m(){(!L||a.$eval(d[k+"Enable"]))&&(u(),x(),M.popupDelay?G||(G=g(r,M.popupDelay,!1)):r())}function q(){s(),M.popupCloseDelay?H||(H=g(t,M.popupCloseDelay,!1)):t()}function r(){return s(),u(),M.content?(v(),void M.$evalAsync(function(){M.isOpen=!0,y(!0),R()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){M&&M.$evalAsync(function(){M.isOpen=!1,y(!1),M.animation?F||(F=g(w,150,!1)):w()})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=M.$new(),D=c(E,function(a){J?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){M.title=d[k+"Title"],P?M.content=P(a):M.content=d[e],M.popupClass=d[k+"Class"],M.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);M.popupDelay=isNaN(b)?n.popupDelay:b,M.popupCloseDelay=isNaN(c)?n.popupCloseDelay:c}function y(b){O&&angular.isFunction(O.assign)&&O.assign(a,b)}function z(){Q.length=0,P?(Q.push(a.$watch(P,function(a){M.content=a,!a&&M.isOpen&&t()})),Q.push(E.$watch(function(){N||(N=!0,E.$$postDigest(function(){N=!1,M&&M.isOpen&&R()}))}))):Q.push(d.$observe(e,function(a){M.content=a,!a&&M.isOpen?t():R()})),Q.push(d.$observe(k+"Title",function(a){M.title=a,M.isOpen&&R()})),Q.push(d.$observe(k+"Placement",function(a){M.placement=a?a:n.placement,M.isOpen&&R()}))}function A(){Q.length&&(angular.forEach(Q,function(a){a()}),Q.length=0)}function B(a){M&&M.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];S(),K=p(a),"none"!==K.show&&K.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===K.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(K.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J=angular.isDefined(n.appendToBody)?n.appendToBody:!1,K=p(void 0),L=angular.isDefined(d[k+"Enable"]),M=a.$new(!0),N=!1,O=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,P=n.useContentExp?l(d[e]):!1,Q=[],R=function(){D&&D.html()&&(I||(I=g(function(){D.css({top:0,left:0});var a=i.positionElements(b,D,M.placement,J);D.css({top:a.top+"px",left:a.left+"px",visibility:"visible"}),n.placementClassPrefix&&D.removeClass("top bottom left right"),D.removeClass(n.placementClassPrefix+"top "+n.placementClassPrefix+"top-left "+n.placementClassPrefix+"top-right "+n.placementClassPrefix+"bottom "+n.placementClassPrefix+"bottom-left "+n.placementClassPrefix+"bottom-right "+n.placementClassPrefix+"left "+n.placementClassPrefix+"left-top "+n.placementClassPrefix+"left-bottom "+n.placementClassPrefix+"right "+n.placementClassPrefix+"right-top "+n.placementClassPrefix+"right-bottom");var c=a.placement.split("-");D.addClass(c[0],n.placementClassPrefix+a.placement),i.positionArrow(D,a.placement),I=null},0,!1)))};M.origScope=a,M.isOpen=!1,o.add(M,{close:t}),M.contentExp=function(){return M.content},d.$observe("disabled",function(a){a&&s(),a&&M.isOpen&&t()}),O&&a.$watch(O,function(a){M&&!a===M.isOpen&&j()});var S=function(){K.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),K.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var T=a.$eval(d[k+"Animation"]);M.animation=angular.isDefined(T)?!!T:n.animation;var U,V=k+"AppendToBody";U=V in d&&void 0===d[V]?!0:a.$eval(d[V]),J=angular.isDefined(U)?U:J,J&&a.$on("$locationChangeSuccess",function(){M.isOpen&&t()}),a.$on("$destroy",function(){S(),w(),o.remove(M),M=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}else c.addClass("top");b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect(),a.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e===c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"uib/template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:"uib/template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===t[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes;return b>=0&&60>b?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a){return null===a?"":angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function l(a){m(),s.$setViewValue(new Date(r)),n(a)}function m(){s.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(s.$modelValue){var c=r.getHours(),d=r.getMinutes(),e=r.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c),"m"!==b&&(a.minutes=k(d)),a.meridian=r.getHours()<12?t[0]:t[1],"s"!==b&&(a.seconds=k(e)),a.meridian=r.getHours()<12?t[0]:t[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=t[0]}function o(a){r=q(r,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}var r=new Date,s={$setViewValue:angular.noop},t=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){s=b,s.$render=this.render,s.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var u=g.hourStep;c.hourStep&&a.$parent.$watch(d(c.hourStep),function(a){u=+a});var v=g.minuteStep;c.minuteStep&&a.$parent.$watch(d(c.minuteStep),function(a){v=+a});var w;a.$parent.$watch(d(c.min),function(a){var b=new Date(a);w=isNaN(b)?void 0:b});var x;a.$parent.$watch(d(c.max),function(a){var b=new Date(a);x=isNaN(b)?void 0:b});var y=!1;c.ngDisabled&&a.$parent.$watch(d(c.ngDisabled),function(a){y=a}),a.noIncrementHours=function(){var a=p(r,60*u);return y||a>x||r>a&&w>a},a.noDecrementHours=function(){var a=p(r,60*-u);return y||w>a||a>r&&a>x},a.noIncrementMinutes=function(){var a=p(r,v);return y||a>x||r>a&&w>a},a.noDecrementMinutes=function(){var a=p(r,-v);return y||w>a||a>r&&a>x},a.noIncrementSeconds=function(){var a=q(r,z);return y||a>x||r>a&&w>a},a.noDecrementSeconds=function(){var a=q(r,-z);return y||w>a||a>r&&a>x},a.noToggleMeridian=function(){return r.getHours()<12?y||p(r,720)>x:y||p(r,-720)0};b.bind("mousewheel wheel",function(b){y||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){y||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){y||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){y||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){y||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){y||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){s.$setViewValue(null),s.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();s.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(a),r.setMinutes(b),w>r||r>x?e(!0):l("h")):e(!0)},b.bind("blur",function(b){s.$setTouched(),null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();s.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(b),r.setMinutes(a),w>r||r>x?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){s.$setTouched(),null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();s.$setDirty(),angular.isDefined(a)?(r.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=s.$viewValue;isNaN(b)?(s.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(r=b),w>r||r>x?(s.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*u*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-u*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*v)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-v)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(z)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-z)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(r.getHours()<12?60:-60)):a.meridian=a.meridian===t[0]?t[1]:t[0])},a.blur=function(){s.$setTouched()}}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1);var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("
              "),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("
              ");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(a){if(0!==N.matches.length&&-1!==r.indexOf(a.which)){if(-1===N.activeIdx&&(9===a.which||13===a.which))return U(),void N.$digest();a.preventDefault();var b;switch(a.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,a)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,a)});break;case 27:a.stopPropagation(),U(),N.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$viewValue="",b.val("")),w=!1,x=!1});var aa=function(a){b[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(U(),j.$$phase||N.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'
              \n
              \n

              \n
              {{heading}}
              \n

              \n
              \n
              \n
              \n
              \n
              \n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){ -a.put("uib/template/accordion/accordion.html",'
              ')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'
              \n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'
              \n \n \n \n
              ')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
              {{::label.abbr}}
              {{ weekNumbers[$index] }}\n \n
              \n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
              \n \n
              \n')}]),angular.module("uib/template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/popup.html",'\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
              \n \n
              \n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'
              \n
              \n
              \n
              \n')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-html-unsafe-popup.html",'
              \n
              \n
              \n
              \n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'
              \n
              \n
              \n
              \n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'
              \n
              \n
              \n
              \n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'
              \n
              \n\n
              \n

              \n
              \n
              \n
              \n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'
              \n
              \n\n
              \n

              \n
              \n
              \n
              \n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'
              \n
              \n\n
              \n

              \n
              \n
              \n
              \n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'
              \n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'
              ')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'
              \n
              \n
              \n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'
            • \n
              {{heading}}
              \n
            • \n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'
              \n \n
              \n
              \n
              \n
              \n
              \n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
                
              \n \n :\n \n :\n \n
                
              \n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.tabs").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),function(a){"use strict";"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a():"undefined"!=typeof Package?Sortable=a():window.Sortable=a()}(function(){"use strict";function a(a,b){if(!a||!a.nodeType||1!==a.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(a);this.el=a,this.options=b=r({},b),a[L]=this;var c={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(a.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",ignore:"a, img",filter:null,animation:0,setData:function(a,b){a.setData("Text",b.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1};for(var d in c)!(d in b)&&(b[d]=c[d]);V(b);for(var f in this)"_"===f.charAt(0)&&(this[f]=this[f].bind(this));this.nativeDraggable=b.forceFallback?!1:P,e(a,"mousedown",this._onTapStart),e(a,"touchstart",this._onTapStart),this.nativeDraggable&&(e(a,"dragover",this),e(a,"dragenter",this)),T.push(this._onDragOver),b.store&&this.sort(b.store.get(this))}function b(a){v&&v.state!==a&&(h(v,"display",a?"none":""),!a&&v.state&&w.insertBefore(v,s),v.state=a)}function c(a,b,c){if(a){c=c||N,b=b.split(".");var d=b.shift().toUpperCase(),e=new RegExp("\\s("+b.join("|")+")(?=\\s)","g");do if(">*"===d&&a.parentNode===c||(""===d||a.nodeName.toUpperCase()==d)&&(!b.length||((" "+a.className+" ").match(e)||[]).length==b.length))return a;while(a!==c&&(a=a.parentNode))}return null}function d(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.preventDefault()}function e(a,b,c){a.addEventListener(b,c,!1)}function f(a,b,c){a.removeEventListener(b,c,!1)}function g(a,b,c){if(a)if(a.classList)a.classList[c?"add":"remove"](b);else{var d=(" "+a.className+" ").replace(K," ").replace(" "+b+" "," ");a.className=(d+(c?" "+b:"")).replace(K," ")}}function h(a,b,c){var d=a&&a.style;if(d){if(void 0===c)return N.defaultView&&N.defaultView.getComputedStyle?c=N.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];b in d||(b="-webkit-"+b),d[b]=c+("string"==typeof c?"":"px")}}function i(a,b,c){if(a){var d=a.getElementsByTagName(b),e=0,f=d.length;if(c)for(;f>e;e++)c(d[e],e);return d}return[]}function j(a,b,c,d,e,f,g){var h=N.createEvent("Event"),i=(a||b[L]).options,j="on"+c.charAt(0).toUpperCase()+c.substr(1);h.initEvent(c,!0,!0),h.to=b,h.from=e||b,h.item=d||b,h.clone=v,h.oldIndex=f,h.newIndex=g,b.dispatchEvent(h),i[j]&&i[j].call(a,h)}function k(a,b,c,d,e,f){var g,h,i=a[L],j=i.options.onMove;return g=N.createEvent("Event"),g.initEvent("move",!0,!0),g.to=b,g.from=a,g.dragged=c,g.draggedRect=d,g.related=e||b,g.relatedRect=f||b.getBoundingClientRect(),a.dispatchEvent(g),j&&(h=j.call(i,g)),h}function l(a){a.draggable=!1}function m(){R=!1}function n(a,b){var c=a.lastElementChild,d=c.getBoundingClientRect();return(b.clientY-(d.top+d.height)>5||b.clientX-(d.right+d.width)>5)&&c}function o(a){for(var b=a.tagName+a.className+a.src+a.href+a.textContent,c=b.length,d=0;c--;)d+=b.charCodeAt(c);return d.toString(36)}function p(a){var b=0;if(!a||!a.parentNode)return-1;for(;a&&(a=a.previousElementSibling);)"TEMPLATE"!==a.nodeName.toUpperCase()&&b++;return b}function q(a,b){var c,d;return function(){void 0===c&&(c=arguments,d=this,setTimeout(function(){1===c.length?a.call(d,c[0]):a.apply(d,c),c=void 0},b))}}function r(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J={},K=/\s+/g,L="Sortable"+(new Date).getTime(),M=window,N=M.document,O=M.parseInt,P=!!("draggable"in N.createElement("div")),Q=function(a){return a=N.createElement("x"),a.style.cssText="pointer-events:auto","auto"===a.style.pointerEvents}(),R=!1,S=Math.abs,T=([].slice,[]),U=q(function(a,b,c){if(c&&b.scroll){var d,e,f,g,h=b.scrollSensitivity,i=b.scrollSpeed,j=a.clientX,k=a.clientY,l=window.innerWidth,m=window.innerHeight;if(z!==c&&(y=b.scroll,z=c,y===!0)){y=c;do if(y.offsetWidth=l-j)-(h>=j),g=(h>=m-k)-(h>=k),(f||g)&&(d=M)),(J.vx!==f||J.vy!==g||J.el!==d)&&(J.el=d,J.vx=f,J.vy=g,clearInterval(J.pid),d&&(J.pid=setInterval(function(){d===M?M.scrollTo(M.pageXOffset+f*i,M.pageYOffset+g*i):(g&&(d.scrollTop+=g*i),f&&(d.scrollLeft+=f*i))},24)))}},30),V=function(a){var b=a.group;b&&"object"==typeof b||(b=a.group={name:b}),["pull","put"].forEach(function(a){a in b||(b[a]=!0)}),a.groups=" "+b.name+(b.put.join?" "+b.put.join(" "):"")+" "};return a.prototype={constructor:a,_onTapStart:function(a){var b=this,d=this.el,e=this.options,f=a.type,g=a.touches&&a.touches[0],h=(g||a).target,i=h,k=e.filter;if(!("mousedown"===f&&0!==a.button||e.disabled)&&(h=c(h,e.draggable,d))){if(D=p(h),"function"==typeof k){if(k.call(this,a,h,this))return j(b,i,"filter",h,d,D),void a.preventDefault()}else if(k&&(k=k.split(",").some(function(a){return a=c(i,a.trim(),d),a?(j(b,a,"filter",h,d,D),!0):void 0})))return void a.preventDefault();(!e.handle||c(i,e.handle,d))&&this._prepareDragStart(a,g,h)}},_prepareDragStart:function(a,b,c){var d,f=this,h=f.el,j=f.options,k=h.ownerDocument;c&&!s&&c.parentNode===h&&(G=a,w=h,s=c,t=s.parentNode,x=s.nextSibling,F=j.group,d=function(){f._disableDelayedDrag(),s.draggable=!0,g(s,f.options.chosenClass,!0),f._triggerDragStart(b)},j.ignore.split(",").forEach(function(a){i(s,a.trim(),l)}),e(k,"mouseup",f._onDrop),e(k,"touchend",f._onDrop),e(k,"touchcancel",f._onDrop),j.delay?(e(k,"mouseup",f._disableDelayedDrag),e(k,"touchend",f._disableDelayedDrag),e(k,"touchcancel",f._disableDelayedDrag),e(k,"mousemove",f._disableDelayedDrag),e(k,"touchmove",f._disableDelayedDrag),f._dragStartTimer=setTimeout(d,j.delay)):d())},_disableDelayedDrag:function(){var a=this.el.ownerDocument;clearTimeout(this._dragStartTimer),f(a,"mouseup",this._disableDelayedDrag),f(a,"touchend",this._disableDelayedDrag),f(a,"touchcancel",this._disableDelayedDrag),f(a,"mousemove",this._disableDelayedDrag),f(a,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(a){a?(G={target:s,clientX:a.clientX,clientY:a.clientY},this._onDragStart(G,"touch")):this.nativeDraggable?(e(s,"dragend",this),e(w,"dragstart",this._onDragStart)):this._onDragStart(G,!0);try{N.selection?N.selection.empty():window.getSelection().removeAllRanges()}catch(b){}},_dragStarted:function(){w&&s&&(g(s,this.options.ghostClass,!0),a.active=this,j(this,w,"start",s,w,D))},_emulateDragOver:function(){if(H){if(this._lastX===H.clientX&&this._lastY===H.clientY)return;this._lastX=H.clientX,this._lastY=H.clientY,Q||h(u,"display","none");var a=N.elementFromPoint(H.clientX,H.clientY),b=a,c=" "+this.options.group.name,d=T.length;if(b)do{if(b[L]&&b[L].options.groups.indexOf(c)>-1){for(;d--;)T[d]({clientX:H.clientX,clientY:H.clientY,target:a,rootEl:b});break}a=b}while(b=b.parentNode);Q||h(u,"display","")}},_onTouchMove:function(b){if(G){a.active||this._dragStarted(),this._appendGhost();var c=b.touches?b.touches[0]:b,d=c.clientX-G.clientX,e=c.clientY-G.clientY,f=b.touches?"translate3d("+d+"px,"+e+"px,0)":"translate("+d+"px,"+e+"px)";I=!0,H=c,h(u,"webkitTransform",f),h(u,"mozTransform",f),h(u,"msTransform",f),h(u,"transform",f),b.preventDefault()}},_appendGhost:function(){if(!u){var a,b=s.getBoundingClientRect(),c=h(s),d=this.options;u=s.cloneNode(!0),g(u,d.ghostClass,!1),g(u,d.fallbackClass,!0),h(u,"top",b.top-O(c.marginTop,10)),h(u,"left",b.left-O(c.marginLeft,10)),h(u,"width",b.width),h(u,"height",b.height),h(u,"opacity","0.8"),h(u,"position","fixed"),h(u,"zIndex","100000"),h(u,"pointerEvents","none"),d.fallbackOnBody&&N.body.appendChild(u)||w.appendChild(u),a=u.getBoundingClientRect(),h(u,"width",2*b.width-a.width),h(u,"height",2*b.height-a.height)}},_onDragStart:function(a,b){var c=a.dataTransfer,d=this.options;this._offUpEvents(),"clone"==F.pull&&(v=s.cloneNode(!0),h(v,"display","none"),w.insertBefore(v,s)),b?("touch"===b?(e(N,"touchmove",this._onTouchMove),e(N,"touchend",this._onDrop),e(N,"touchcancel",this._onDrop)):(e(N,"mousemove",this._onTouchMove),e(N,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,50)):(c&&(c.effectAllowed="move",d.setData&&d.setData.call(this,c,s)),e(N,"drop",this),setTimeout(this._dragStarted,0))},_onDragOver:function(a){var d,e,f,g=this.el,i=this.options,j=i.group,l=j.put,o=F===j,p=i.sort;if(void 0!==a.preventDefault&&(a.preventDefault(),!i.dragoverBubble&&a.stopPropagation()),I=!0,F&&!i.disabled&&(o?p||(f=!w.contains(s)):F.pull&&l&&(F.name===j.name||l.indexOf&&~l.indexOf(F.name)))&&(void 0===a.rootEl||a.rootEl===this.el)){if(U(a,i,this.el),R)return;if(d=c(a.target,i.draggable,g),e=s.getBoundingClientRect(),f)return b(!0),void(v||x?w.insertBefore(s,v||x):p||w.appendChild(s));if(0===g.children.length||g.children[0]===u||g===a.target&&(d=n(g,a))){if(d){if(d.animated)return;r=d.getBoundingClientRect()}b(o),k(w,g,s,e,d,r)!==!1&&(s.contains(g)||(g.appendChild(s),t=g),this._animate(e,s),d&&this._animate(r,d))}else if(d&&!d.animated&&d!==s&&void 0!==d.parentNode[L]){A!==d&&(A=d,B=h(d),C=h(d.parentNode)); -var q,r=d.getBoundingClientRect(),y=r.right-r.left,z=r.bottom-r.top,D=/left|right|inline/.test(B.cssFloat+B.display)||"flex"==C.display&&0===C["flex-direction"].indexOf("row"),E=d.offsetWidth>s.offsetWidth,G=d.offsetHeight>s.offsetHeight,H=(D?(a.clientX-r.left)/y:(a.clientY-r.top)/z)>.5,J=d.nextElementSibling,K=k(w,g,s,e,d,r);if(K!==!1){if(R=!0,setTimeout(m,30),b(o),1===K||-1===K)q=1===K;else if(D){var M=s.offsetTop,N=d.offsetTop;q=M===N?d.previousElementSibling===s&&!E||H&&E:N>M}else q=J!==s&&!G||H&&G;s.contains(g)||(q&&!J?g.appendChild(s):d.parentNode.insertBefore(s,q?J:d)),t=s.parentNode,this._animate(e,s),this._animate(r,d)}}}},_animate:function(a,b){var c=this.options.animation;if(c){var d=b.getBoundingClientRect();h(b,"transition","none"),h(b,"transform","translate3d("+(a.left-d.left)+"px,"+(a.top-d.top)+"px,0)"),b.offsetWidth,h(b,"transition","all "+c+"ms"),h(b,"transform","translate3d(0,0,0)"),clearTimeout(b.animated),b.animated=setTimeout(function(){h(b,"transition",""),h(b,"transform",""),b.animated=!1},c)}},_offUpEvents:function(){var a=this.el.ownerDocument;f(N,"touchmove",this._onTouchMove),f(a,"mouseup",this._onDrop),f(a,"touchend",this._onDrop),f(a,"touchcancel",this._onDrop)},_onDrop:function(b){var c=this.el,d=this.options;clearInterval(this._loopId),clearInterval(J.pid),clearTimeout(this._dragStartTimer),f(N,"mousemove",this._onTouchMove),this.nativeDraggable&&(f(N,"drop",this),f(c,"dragstart",this._onDragStart)),this._offUpEvents(),b&&(I&&(b.preventDefault(),!d.dropBubble&&b.stopPropagation()),u&&u.parentNode.removeChild(u),s&&(this.nativeDraggable&&f(s,"dragend",this),l(s),g(s,this.options.ghostClass,!1),g(s,this.options.chosenClass,!1),w!==t?(E=p(s),E>=0&&(j(null,t,"sort",s,w,D,E),j(this,w,"sort",s,w,D,E),j(null,t,"add",s,w,D,E),j(this,w,"remove",s,w,D,E))):(v&&v.parentNode.removeChild(v),s.nextSibling!==x&&(E=p(s),E>=0&&(j(this,w,"update",s,w,D,E),j(this,w,"sort",s,w,D,E)))),a.active&&((null===E||-1===E)&&(E=D),j(this,w,"end",s,w,D,E),this.save())),w=s=t=u=x=v=y=z=G=H=I=E=A=B=F=a.active=null)},handleEvent:function(a){var b=a.type;"dragover"===b||"dragenter"===b?s&&(this._onDragOver(a),d(a)):("drop"===b||"dragend"===b)&&this._onDrop(a)},toArray:function(){for(var a,b=[],d=this.el.children,e=0,f=d.length,g=this.options;f>e;e++)a=d[e],c(a,g.draggable,this.el)&&b.push(a.getAttribute(g.dataIdAttr)||o(a));return b},sort:function(a){var b={},d=this.el;this.toArray().forEach(function(a,e){var f=d.children[e];c(f,this.options.draggable,d)&&(b[a]=f)},this),a.forEach(function(a){b[a]&&(d.removeChild(b[a]),d.appendChild(b[a]))})},save:function(){var a=this.options.store;a&&a.set(this)},closest:function(a,b){return c(a,b||this.options.draggable,this.el)},option:function(a,b){var c=this.options;return void 0===b?c[a]:(c[a]=b,void("group"===a&&V(c)))},destroy:function(){var a=this.el;a[L]=null,f(a,"mousedown",this._onTapStart),f(a,"touchstart",this._onTapStart),this.nativeDraggable&&(f(a,"dragover",this),f(a,"dragenter",this)),Array.prototype.forEach.call(a.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),T.splice(T.indexOf(this._onDragOver),1),this._onDrop(),this.el=a=null}},a.utils={on:e,off:f,css:h,find:i,is:function(a,b){return!!c(a,b,a)},extend:r,throttle:q,closest:c,toggleClass:g,index:p},a.create=function(b,c){return new a(b,c)},a.version="1.4.2",a}),function(a){"use strict";"function"==typeof define&&define.amd?define(["angular","./Sortable"],a):"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?(require("angular"),a(angular,require("./Sortable")),module.exports="ng-sortable"):window.angular&&window.Sortable&&a(angular,Sortable)}(function(a,b){"use strict";var c="Sortable:ng-sortable";a.module("ng-sortable",[]).constant("ngSortableVersion","0.4.0").constant("ngSortableConfig",{}).directive("ngSortable",["$parse","ngSortableConfig",function(d,e){var f,g,h=function(a,b){var c=[].filter.call(a.childNodes,function(a){return 8===a.nodeType&&-1!==a.nodeValue.indexOf("ngRepeat:")})[0];if(!c)return function(){return null};c=c.nodeValue.match(/ngRepeat:\s*(?:\(.*?,\s*)?([^\s)]+)[\s)]+in\s+([^\s|]+)/);var e=d(c[2]);return function(){return e(b.$parent)||[]}};return{restrict:"AC",scope:{ngSortable:"=?"},link:function(d,i){function j(a,b){var c="on"+a.type.charAt(0).toUpperCase()+a.type.substr(1),d=p();n[c]&&n[c]({model:b||d[a.newIndex],models:d,oldIndex:a.oldIndex,newIndex:a.newIndex})}function k(e){var h=p();if(h){var i=e.oldIndex,j=e.newIndex;if(m!==e.from){var k=e.from[c]();f=k[i],e.clone?(f=a.copy(f),k.splice(b.utils.index(e.clone),0,k.splice(i,1)[0]),e.from.removeChild(e.clone)):k.splice(i,1),h.splice(j,0,f),e.from.insertBefore(e.item,g)}else h.splice(j,0,h.splice(i,1)[0]);d.$apply()}}var l,m=i[0],n=a.extend(d.ngSortable||{},e),o=[],p=h(m,d);m[c]=p,l=b.create(m,Object.keys(n).reduce(function(a,b){return a[b]=a[b]||n[b],a},{onStart:function(a){g=a.item.nextSibling,j(a),d.$apply()},onEnd:function(a){j(a,f),d.$apply()},onAdd:function(a){k(a),j(a,f),d.$apply()},onUpdate:function(a){k(a),j(a)},onRemove:function(a){j(a,f)},onSort:function(a){j(a)}})),i.on("$destroy",function(){a.forEach(o,function(a){a()}),l.destroy(),m[c]=null,m=null,o=null,l=null,g=null}),a.forEach(["sort","disabled","draggable","handle","animation","group","ghostClass","filter","onStart","onEnd","onAdd","onUpdate","onRemove","onSort"],function(a){o.push(d.$watch("ngSortable."+a,function(b){void 0!==b&&(n[a]=b,/^on[A-Z]/.test(a)||l.option(a,b))}))})}}}])}),function(a){"use strict";"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a(require("./Sortable")):"function"==typeof define&&define.amd?define(["./Sortable"],a):window.SortableMixin=a(Sortable)}(function(a){"use strict";function b(a){return a.sortableOptions&&a.sortableOptions.model||g.model}function c(a){var c=b(a),d=a.state&&a.state[c]||a.props[c];return d.slice()}function d(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var e,f,g={ref:"list",model:"items",animation:100,onStart:"handleStart",onEnd:"handleEnd",onAdd:"handleAdd",onUpdate:"handleUpdate",onRemove:"handleRemove",onSort:"handleSort",onFilter:"handleFilter",onMove:"handleMove"},h={sortableMixinVersion:"0.1.1",_sortableInstance:null,componentDidMount:function(){var h,i=d(d({},g),this.sortableOptions||{}),j=d({},i),k=function(a,b){var c=this[i[a]];c&&c.call(this,b,this._sortableInstance)}.bind(this);"onStart onEnd onAdd onSort onUpdate onRemove onFilter onMove".split(" ").forEach(function(a){j[a]=function(d){if("onStart"===a)e=d.item.nextElementSibling,f=this;else if("onAdd"===a||"onUpdate"===a){d.from.insertBefore(d.item,e);var g,h,i={},l={},m=d.oldIndex,n=d.newIndex,o=c(this);"onAdd"===a?(g=c(f),h=g.splice(m,1)[0],o.splice(n,0,h),l[b(f)]=g):o.splice(n,0,o.splice(m,1)[0]),i[b(this)]=o,j.stateHandler?this[j.stateHandler](i):this.setState(i),this!==f&&f.setState(l)}setTimeout(function(){k(a,d)},0)}.bind(this)},this),h=this.getDOMNode()?(this.refs[i.ref]||this).getDOMNode():this.refs[i.ref]||this,this._sortableInstance=a.create(h,j)},componentWillReceiveProps:function(a){var c={},d=b(this),e=a[d];e&&(c[d]=e,this.setState(c))},componentWillUnmount:function(){this._sortableInstance.destroy(),this._sortableInstance=null}};return h}),function(a,b){"use strict";angular.module("adf",["adf.provider","ui.bootstrap"]).value("adfTemplatePath","../src/templates/").value("rowTemplate",'').value("columnTemplate",'').value("adfVersion","0.11.0"),angular.module("adf").directive("adfDashboardColumn",["$log","$compile","$rootScope","adfTemplatePath","rowTemplate","dashboard",function(a,b,c,d,e,f){function g(a,b,d){var e=b.widgets;a.$apply(function(){e.splice(d.newIndex,0,e.splice(d.oldIndex,1)[0]),c.$broadcast("adfWidgetMovedInColumn")})}function h(a,b){for(var c=null,d=0;d0)for(var c=a.widgets.shift();c;)b.widgets.push(c),c=a.widgets.shift()}function i(a,b,c){return c=c||0,angular.isDefined(a.rows)&&angular.forEach(a.rows,function(a){angular.forEach(a.columns,function(a){a.widgets||(a.widgets=[]),angular.isDefined(b[c])&&(angular.isDefined(a.rows)||(h(b[c],a),c++)),c=i(a,b,c)})}),c}function j(a,b){return b=b||[],angular.isDefined(a.rows)&&angular.forEach(a.rows,function(a){angular.forEach(a.columns,function(a){b.push(a),j(a,b)})}),b}function k(a,b){var c=j(a),d=0;for(a.rows=angular.copy(b.rows);d{}
            ',e='
            \n
            \n loading ...\n
            \n
            ',f=function(){return!0};this.widget=function(b,c){var d=angular.extend({reload:!1,frameless:!1},c);if(d.edit){var e={reload:!0,immediate:!1,apply:f};angular.extend(e,d.edit),d.edit=e}return a[b]=d,this},this.widgetsPath=function(a){return b=a,this},this.structure=function(a,b){return c[a]=b,this},this.messageTemplate=function(a){return d=a,this},this.loadingTemplate=function(a){return e=a,this},this.$get=function(){var f=0;return{widgets:a,widgetsPath:b,structures:c,messageTemplate:d,loadingTemplate:e,id:function(){return(new Date).getTime()+"-"+ ++f},idEquals:function(a,b){return a&&b&&a.toString()===b.toString()}}}}),angular.module("adf").directive("adfDashboardRow",["$compile","adfTemplatePath","columnTemplate",function(a,b,c){return{restrict:"E",replace:!0,scope:{row:"=",adfModel:"=",editMode:"=",continuousEditMode:"=",options:"="},templateUrl:b+"dashboard-row.html",link:function(b,d){angular.isDefined(b.row.columns)&&angular.isArray(b.row.columns)&&a(c)(b,function(a){d.append(a)})}}}]),angular.module("adf").directive("adfWidgetContent",["$log","$q","$sce","$http","$templateCache","$compile","$controller","$injector","dashboard",function(a,b,c,d,e,f,g,h,i){function j(a){var b=a;return a.indexOf("{widgetsPath}")>=0&&(b=a.replace("{widgetsPath}",i.widgetsPath).replace("//","/"),0===b.indexOf("/")&&(b=b.substring(1))),b}function k(a){var f=b.defer();if(a.template)f.resolve(a.template);else if(a.templateUrl){var g=e.get(a.templateUrl);if(g)f.resolve(g);else{var h=c.getTrustedResourceUrl(j(a.templateUrl));d.get(h).success(function(b){e.put(a.templateUrl,b),f.resolve(b)}).error(function(){f.reject("could not load template")})}}return f.promise}function l(c,d,e){var j=c.model,l=c.content;d.html(i.loadingTemplate);var m=c.$new();j.config||(j.config={}),m.config=j.config;var n={$scope:m,widget:j,config:j.config},o={};return o.$tpl=k(l),l.resolve&&angular.forEach(l.resolve,function(a,b){angular.isString(a)?o[b]=h.get(a):o[b]=h.invoke(a,a,n)}),b.all(o).then(function(a){angular.extend(a,n);var b=a.$tpl;if(d.html(b),l.controller){var c=g(l.controller,a);l.controllerAs&&(m[l.controllerAs]=c),d.children().data("$ngControllerController",c)}f(d.contents())(m)},function(b){var c="Could not resolve all promises";b&&(c+=": "+b),a.warn(c),d.html(i.messageTemplate.replace(/{}/g,c))}),e&&e.$destroy(),m}return{replace:!0,restrict:"EA",transclude:!1,scope:{model:"=",content:"="},link:function(a,b){var c=l(a,b,null);a.$on("widgetConfigChanged",function(){c=l(a,b,c)}),a.$on("widgetReload",function(){c=l(a,b,c)})}}}]),angular.module("adf").directive("adfWidget",["$injector","$q","$log","$uibModal","$rootScope","dashboard","adfTemplatePath",function(a,b,c,d,e,f,g){function h(a){var b=a.definition;if(b){var d=f.widgets[b.type];if(d){b.title||(b.title=d.title),b.titleTemplateUrl||(b.titleTemplateUrl=g+"widget-title.html",d.titleTemplateUrl&&(b.titleTemplateUrl=d.titleTemplateUrl)),b.titleTemplateUrl||(b.frameless=d.frameless),b.styleClass||(b.styleClass=d.styleClass),b.wid||(b.wid=f.id()),a.widget=angular.copy(d);var e=b.config;e?angular.isString(e)&&(e=angular.fromJson(e)):e={},a.config=e,a.widgetState||(a.widgetState={},a.widgetState.isCollapsed=d.collapsed===!0?d.collapsed:!1)}else c.warn("could not find widget "+b.type)}else c.debug("definition not specified, widget was probably removed")}function i(f,h){var i=f.definition;if(i){var j=function(){var a=f.col;if(a){var b=a.widgets.indexOf(i);b>=0&&a.widgets.splice(b,1)}h.remove(),e.$broadcast("adfWidgetRemovedFromColumn")};f.remove=function(){if(f.options.enableConfirmDelete){var a=f.$new(),b=g+"widget-delete.html";i.deleteTemplateUrl&&(b=i.deleteTemplateUrl);var c={scope:a,templateUrl:b,backdrop:"static"},e=d.open(c);a.closeDialog=function(){e.close(),a.$destroy()},a.deleteDialog=function(){j(),a.closeDialog()}}else j()},f.reload=function(){f.$broadcast("widgetReload")},f.edit=function(){function c(a){var c;if("boolean"==typeof a){var d=b.defer();a?d.resolve():d.reject(),c=d.promise}else c=b.when(a);return c}var e=f.$new();e.definition=angular.copy(i);var h=g+"widget-edit.html";i.editTemplateUrl&&(h=i.editTemplateUrl);var j={scope:e,templateUrl:h,backdrop:"static"},k=d.open(j);e.closeDialog=function(){k.close(),e.$destroy()},e.saveDialog=function(){e.validationError=null;var b=f.widget,d=b.edit.apply,g={widget:b,definition:e.definition,config:e.definition.config},h=a.invoke(d,d,g);c(h).then(function(){i.title=e.definition.title,angular.extend(i.config,e.definition.config),b.edit&&b.edit.reload&&f.$broadcast("widgetConfigChanged"),e.closeDialog()},function(a){a?e.validationError=a:e.validationError="Validation durring apply failed"})}}}else c.debug("widget not found")}return{replace:!0,restrict:"EA",transclude:!1,templateUrl:g+"widget.html",scope:{definition:"=",col:"=column",editMode:"=",options:"=",widgetState:"="},controller:["$scope",function(a){a.$on("adfDashboardCollapseExpand",function(b,c){a.widgetState.isCollapsed=c.collapseExpandStatus}),a.$on("adfWidgetEnterEditMode",function(b,c){f.idEquals(a.definition.wid,c.wid)&&a.edit()}),a.widgetClasses=function(b,c){var d=c.styleClass||"";return(!b.frameless||a.editMode)&&(d+=" panel panel-default"),d},a.openFullScreen=function(){var b=a.definition,c=a.$new(),e={scope:c,templateUrl:g+"widget-fullscreen.html",size:b.modalSize||"lg",backdrop:"static",windowClass:b.fullScreen?"dashboard-modal widget-fullscreen":"dashboard-modal"},f=d.open(e);c.closeDialog=function(){f.close(),c.$destroy()}}}],compile:function(){return{pre:h,post:i}}}}]),angular.module("adf").run(["$templateCache",function(a){a.put("../src/templates/dashboard-column.html",'
            '),a.put("../src/templates/dashboard-edit.html",' '),a.put("../src/templates/dashboard-row.html","
            "),a.put("../src/templates/dashboard-title.html",'

            {{model.title}}

            '),a.put("../src/templates/dashboard.html",'
            '),a.put("../src/templates/widget-add.html",' '),a.put("../src/templates/widget-delete.html",' '),a.put("../src/templates/widget-edit.html",'
            '),a.put("../src/templates/widget-fullscreen.html",' '),a.put("../src/templates/widget-title.html",'

            {{definition.title}}

            '),a.put("../src/templates/widget.html",'
            ')}])}(window),angular.module("adf.structures.base",["adf"]).config(["dashboardProvider",function(a){a.structure("6-6",{rows:[{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]}]}).structure("4-8",{rows:[{columns:[{styleClass:"col-md-4",widgets:[]},{styleClass:"col-md-8",widgets:[]}]}]}).structure("12/4-4-4",{rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-4"},{styleClass:"col-md-4"},{styleClass:"col-md-4"}]}]}).structure("12/6-6",{rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]}]}).structure("12/6-6/12",{rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]},{columns:[{styleClass:"col-md-12"}]}]}).structure("3-9 (12/6-6)",{rows:[{columns:[{styleClass:"col-md-3"},{styleClass:"col-md-9",rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]}]}]}]})}]),function(a,b){"use strict";angular.module("adf.widget.clock",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("clock",{title:"Clock",description:"Displays date and time",templateUrl:"{widgetsPath}/clock/src/view.html",controller:"clockController",controllerAs:"clock",config:{timePattern:"HH:mm:ss",datePattern:"YYYY-MM-DD"},edit:{templateUrl:"{widgetsPath}/clock/src/edit.html"}})}]).controller("clockController",["$scope","$interval","config",function(a,b,c){function d(){var a=new moment;e.time=a.format(c.timePattern),e.date=a.format(c.datePattern)}var e=this;d();var f=b(d,1e3);a.$on("$destroy",function(){b.cancel(f)})}]),angular.module("adf.widget.clock").run(["$templateCache",function(a){a.put("{widgetsPath}/clock/src/edit.html",'

            For the list of possible patterns, please have a look at moment.js documentation

            '),a.put("{widgetsPath}/clock/src/view.html","
            {{clock.time}}
            {{clock.date}}
            ")}])}(window),function(a,b){"use strict";angular.module("adf.widget.iframe",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("iframe",{title:"iframe",description:"Embed an external page into the dashboard",templateUrl:"{widgetsPath}/iframe/src/view.html",controller:"iframeController",controllerAs:"iframe",edit:{templateUrl:"{widgetsPath}/iframe/src/edit.html"},config:{height:"420px"}})}]).controller("iframeController",["$sce","config",function(a,b){b.url&&(this.url=a.trustAsResourceUrl(b.url))}]),angular.module("adf.widget.iframe").run(["$templateCache",function(a){a.put("{widgetsPath}/iframe/src/edit.html","
            "),a.put("{widgetsPath}/iframe/src/view.html",'
            Please insert a url in the widget configuration
            ')}])}(window),function(){"use strict";angular.module("ui.grid.i18n",[]),angular.module("ui.grid",["ui.grid.i18n"])}(),function(){"use strict";angular.module("ui.grid").constant("uiGridConstants",{LOG_DEBUG_MESSAGES:!0,LOG_WARN_MESSAGES:!0,LOG_ERROR_MESSAGES:!0,CUSTOM_FILTERS:/CUSTOM_FILTERS/g,COL_FIELD:/COL_FIELD/g,MODEL_COL_FIELD:/MODEL_COL_FIELD/g,TOOLTIP:/title=\"TOOLTIP\"/g,DISPLAY_CELL_TEMPLATE:/DISPLAY_CELL_TEMPLATE/g,TEMPLATE_REGEXP:/<.+>/,FUNC_REGEXP:/(\([^)]*\))?$/,DOT_REGEXP:/\./g,APOS_REGEXP:/'/g,BRACKET_REGEXP:/^(.*)((?:\s*\[\s*\d+\s*\]\s*)|(?:\s*\[\s*"(?:[^"\\]|\\.)*"\s*\]\s*)|(?:\s*\[\s*'(?:[^'\\]|\\.)*'\s*\]\s*))(.*)$/,COL_CLASS_PREFIX:"ui-grid-col",events:{GRID_SCROLL:"uiGridScroll",COLUMN_MENU_SHOWN:"uiGridColMenuShown",ITEM_DRAGGING:"uiGridItemDragStart",COLUMN_HEADER_CLICK:"uiGridColumnHeaderClick"},keymap:{TAB:9,STRG:17,CAPSLOCK:20,CTRL:17,CTRLRIGHT:18,CTRLR:18,SHIFT:16,RETURN:13,ENTER:13,BACKSPACE:8,BCKSP:8,ALT:18,ALTR:17,ALTRIGHT:17,SPACE:32,WIN:91,MAC:91,FN:null,PG_UP:33,PG_DOWN:34,UP:38,DOWN:40,LEFT:37,RIGHT:39,ESC:27,DEL:46,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123},ASC:"asc",DESC:"desc",filter:{STARTS_WITH:2,ENDS_WITH:4,EXACT:8,CONTAINS:16,GREATER_THAN:32,GREATER_THAN_OR_EQUAL:64,LESS_THAN:128,LESS_THAN_OR_EQUAL:256,NOT_EQUAL:512,SELECT:"select",INPUT:"input"},aggregationTypes:{sum:2,count:4,avg:8,min:16,max:32},CURRENCY_SYMBOLS:["ƒ","$","£","$","¤","¥","៛","₩","₱","฿","₫"],scrollDirection:{UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",NONE:"none"},dataChange:{ALL:"all",EDIT:"edit",ROW:"row",COLUMN:"column",OPTIONS:"options"},scrollbars:{NEVER:0,ALWAYS:1}})}(),angular.module("ui.grid").directive("uiGridCell",["$compile","$parse","gridUtil","uiGridConstants",function(a,b,c,d){var e={priority:0,scope:!1,require:"?^uiGrid",compile:function(){return{pre:function(b,e,f,g){function h(){var a=b.col.compiledElementFn;a(b,function(a,b){e.append(a)})}if(g&&b.col.compiledElementFn)h();else if(g&&!b.col.compiledElementFn)b.col.getCompiledElementFn().then(function(a){a(b,function(a,b){e.append(a)})});else{var i=b.col.cellTemplate.replace(d.MODEL_COL_FIELD,"row.entity."+c.preEval(b.col.field)).replace(d.COL_FIELD,"grid.getCellValue(row, col)"),j=a(i)(b);e.append(j)}},post:function(a,b,c,e){var f=a.col.getColClass(!1);b.addClass(f);var g,h=function(c){var d=b;g&&(d.removeClass(g),g=null),g=angular.isFunction(a.col.cellClass)?a.col.cellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.cellClass,d.addClass(g)};a.col.cellClass&&h();var i=a.grid.registerDataChangeCallback(h,[d.dataChange.COLUMN,d.dataChange.EDIT]),j=function(c,d){if(c!==d){(g||a.col.cellClass)&&h(); -var e=a.col.getColClass(!1);e!==f&&(b.removeClass(f),b.addClass(e),f=e)}},k=a.$watch("row",j),l=function(){i(),k()};a.$on("$destroy",l),b.on("$destroy",l)}}}};return e}]),function(){angular.module("ui.grid").service("uiGridColumnMenuService",["i18nService","uiGridConstants","gridUtil",function(a,b,c){var d={initialize:function(a,b){a.grid=b.grid,b.columnMenuScope=a,a.menuShown=!1},setColMenuItemWatch:function(a){var b=a.$watch("col.menuItems",function(b,c){"undefined"!=typeof b&&b&&angular.isArray(b)?(b.forEach(function(b){"undefined"!=typeof b.context&&b.context||(b.context={}),b.context.col=a.col}),a.menuItems=a.defaultMenuItems.concat(b)):a.menuItems=a.defaultMenuItems});a.$on("$destroy",b)},sortable:function(a){return a.grid.options.enableSorting&&"undefined"!=typeof a.col&&a.col&&a.col.enableSorting?!0:!1},isActiveSort:function(a,b){return"undefined"!=typeof a.col&&"undefined"!=typeof a.col.sort&&"undefined"!=typeof a.col.sort.direction&&a.col.sort.direction===b},suppressRemoveSort:function(a){return a.col&&a.col.suppressRemoveSort?!0:!1},hideable:function(a){return"undefined"!=typeof a.col&&a.col&&a.col.colDef&&a.col.colDef.enableHiding===!1?!1:!0},getDefaultMenuItems:function(c){return[{title:a.getSafeText("sort.ascending"),icon:"ui-grid-icon-sort-alt-up",action:function(a){a.stopPropagation(),c.sortColumn(a,b.ASC)},shown:function(){return d.sortable(c)},active:function(){return d.isActiveSort(c,b.ASC)}},{title:a.getSafeText("sort.descending"),icon:"ui-grid-icon-sort-alt-down",action:function(a){a.stopPropagation(),c.sortColumn(a,b.DESC)},shown:function(){return d.sortable(c)},active:function(){return d.isActiveSort(c,b.DESC)}},{title:a.getSafeText("sort.remove"),icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),c.unsortColumn()},shown:function(){return d.sortable(c)&&"undefined"!=typeof c.col&&"undefined"!=typeof c.col.sort&&"undefined"!=typeof c.col.sort.direction&&null!==c.col.sort.direction&&!d.suppressRemoveSort(c)}},{title:a.getSafeText("column.hide"),icon:"ui-grid-icon-cancel",shown:function(){return d.hideable(c)},action:function(a){a.stopPropagation(),c.hideColumn()}},{title:a.getSafeText("columnMenu.close"),screenReaderOnly:!0,shown:function(){return!0},action:function(a){a.stopPropagation()}}]},getColumnElementPosition:function(a,b,d){var e={};return e.left=d[0].offsetLeft,e.top=d[0].offsetTop,e.parentLeft=d[0].offsetParent.offsetLeft,e.offset=0,b.grid.options.offsetLeft&&(e.offset=b.grid.options.offsetLeft),e.height=c.elementHeight(d,!0),e.width=c.elementWidth(d,!0),e},repositionMenu:function(a,b,d,e,f){var g=e[0].querySelectorAll(".ui-grid-menu"),h=b.renderContainer?b.renderContainer:"body",i=(b.grid.renderContainers[h],c.closestElm(f,".ui-grid-render-container")),j=i.getBoundingClientRect().left-a.grid.element[0].getBoundingClientRect().left,k=i.querySelectorAll(".ui-grid-viewport")[0].scrollLeft,l=b.lastMenuWidth?b.lastMenuWidth:a.lastMenuWidth?a.lastMenuWidth:170,m=b.lastMenuPaddingRight?b.lastMenuPaddingRight:a.lastMenuPaddingRight?a.lastMenuPaddingRight:10;if(0!==g.length){var n=g[0].querySelectorAll(".ui-grid-menu-mid");0===n.length||angular.element(n).hasClass("ng-hide")||(l=c.elementWidth(g,!0),a.lastMenuWidth=l,b.lastMenuWidth=l,m=parseInt(c.getStyles(angular.element(g)[0]).paddingRight,10),a.lastMenuPaddingRight=m,b.lastMenuPaddingRight=m)}var o=d.left+j-k+d.parentLeft+d.width-l+m;oc)d=b;else{if(c>a&&!d)return d=b,!0;if(c>a&&d)return!0}}),d){var g=d.getColClass();b.focus.bySelector(e,".ui-grid-header-cell."+g+" .ui-grid-header-cell-primary-focus",!0).then(angular.noop,function(a){return"canceled"!==a?c():void 0})}else c()})};f.hideColumn=function(){f.col.colDef.visible=!1,f.col.visible=!1,f.grid.queueGridRefresh(),f.hideMenu(),f.grid.api.core.notifyDataChange(c.dataChange.COLUMN),f.grid.api.core.raise.columnVisibilityChanged(f.col),j()}},controller:["$scope",function(a){var b=this;a.$watch("menuItems",function(a,c){b.menuItems=a})}]};return f}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFilter",["$compile","$templateCache","i18nService","gridUtil",function(a,b,c,d){return{compile:function(){return{pre:function(b,c,d,e){b.col.updateFilters=function(d){if(c.children().remove(),d){var e=b.col.filterHeaderTemplate;c.append(a(e)(b))}},b.$on("$destroy",function(){delete b.col.updateFilters})},post:function(a,b,e,f){a.aria=c.getSafeText("headerCell.aria"),a.removeFilter=function(a,c){a.term=null,d.focus.bySelector(b,".ui-grid-filter-input-"+c)}}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooterCell",["$timeout","gridUtil","uiGridConstants","$compile",function(a,b,c,d){var e={priority:0,scope:{col:"=",row:"=",renderIndex:"="},replace:!0,require:"^uiGrid",compile:function(a,b,e){return{pre:function(a,b,c,e){var f=d(a.col.footerCellTemplate)(a);b.append(f)},post:function(a,b,d,e){a.grid=e.grid;var f=a.col.getColClass(!1);b.addClass(f);var g,h=function(c){var d=b;g&&(d.removeClass(g),g=null),g=angular.isFunction(a.col.footerCellClass)?a.col.footerCellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.footerCellClass,d.addClass(g)};a.col.footerCellClass&&h(),a.col.updateAggregationValue();var i=a.grid.registerDataChangeCallback(h,[c.dataChange.COLUMN]);a.grid.api.core.on.rowsRendered(a,a.col.updateAggregationValue),a.grid.api.core.on.rowsRendered(a,h),a.$on("$destroy",i)}}}};return e}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooter",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d,e){return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(a,c){return{pre:function(a,c,e,f){var g=f[0],h=f[1];a.grid=g.grid,a.colContainer=h.colContainer,h.footer=c;var i=a.grid.options.footerTemplate;d.getTemplate(i).then(function(d){var e=angular.element(d),f=b(e)(a);if(c.append(f),h){var g=c[0].getElementsByClassName("ui-grid-footer-viewport")[0];g&&(h.footerViewport=g)}})},post:function(a,b,c,e){var f=e[0],g=e[1];f.grid;d.disableAnimations(b),g.footer=b;var h=b[0].getElementsByClassName("ui-grid-footer-viewport")[0];h&&(g.footerViewport=h)}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGridFooter",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d,e){return{restrict:"EA",replace:!0,require:"^uiGrid",scope:!0,compile:function(a,c){return{pre:function(a,c,e,f){a.grid=f.grid;var g=a.grid.options.gridFooterTemplate;d.getTemplate(g).then(function(d){var e=angular.element(d),f=b(e)(a);c.append(f)})},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGroupPanel",["$compile","uiGridConstants","gridUtil",function(a,b,c){var d="ui-grid/ui-grid-group-panel";return{restrict:"EA",replace:!0,require:"?^uiGrid",scope:!1,compile:function(b,e){return{pre:function(b,e,f,g){var h=b.grid.options.groupPanelTemplate||d;c.getTemplate(h).then(function(c){var d=angular.element(c),f=a(d)(b);e.append(f)})},post:function(a,b,c,d){b.bind("$destroy",function(){})}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeaderCell",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants","ScrollEvent","i18nService",function(a,b,c,d,e,f,g,h){var i=500,j=500,k={priority:0,scope:{col:"=",row:"=",renderIndex:"="},require:["^uiGrid","^uiGridRenderContainer"],replace:!0,compile:function(){return{pre:function(b,c,d){var e=a(b.col.headerCellTemplate)(b);c.append(e)},post:function(a,c,e,g){var k=g[0],l=g[1];a.i18n={headerCell:h.getSafeText("headerCell"),sort:h.getSafeText("sort")},a.isSortPriorityVisible=function(){return a.col.sort.priority&&a.grid.columns.some(function(b,c){return b.sort.priority&&b!==a.col})},a.getSortDirectionAriaLabel=function(){var b=a.col,c=b.sort.direction===f.ASC?a.i18n.sort.ascending:b.sort.direction===f.DESC?a.i18n.sort.descending:a.i18n.sort.none,d=c;return a.isSortPriorityVisible()&&(d=d+". "+a.i18n.headerCell.priority+" "+b.sort.priority),d},a.grid=k.grid,a.renderContainer=k.grid.renderContainers[l.containerId];var m=a.col.getColClass(!1);c.addClass(m),a.menuShown=!1,a.asc=f.ASC,a.desc=f.DESC;var n,o,p=(angular.element(c[0].querySelectorAll(".ui-grid-header-cell-menu")),angular.element(c[0].querySelectorAll(".ui-grid-cell-contents"))),q=[];a.downFn=function(e){e.stopPropagation(),"undefined"!=typeof e.originalEvent&&void 0!==e.originalEvent&&(e=e.originalEvent),e.button&&0!==e.button||(o=e.pageX,a.mousedownStartTime=(new Date).getTime(),a.mousedownTimeout=b(function(){},i),a.mousedownTimeout.then(function(){a.colMenu&&k.columnMenuScope.showMenu(a.col,c,e)}),k.fireEvent(f.events.COLUMN_HEADER_CLICK,{event:e,columnName:a.col.colDef.name}),a.offAllEvents(),"touchstart"===e.type?(d.on("touchend",a.upFn),d.on("touchmove",a.moveFn)):"mousedown"===e.type&&(d.on("mouseup",a.upFn),d.on("mousemove",a.moveFn)))},a.upFn=function(c){c.stopPropagation(),b.cancel(a.mousedownTimeout),a.offAllEvents(),a.onDownEvents(c.type);var d=(new Date).getTime(),e=d-a.mousedownStartTime;e>i||a.sortable&&a.handleClick(c)},a.moveFn=function(c){var d=c.pageX-o;0!==d&&(b.cancel(a.mousedownTimeout),a.offAllEvents(),a.onDownEvents(c.type))},a.clickFn=function(b){b.stopPropagation(),p.off("click",a.clickFn)},a.offAllEvents=function(){p.off("touchstart",a.downFn),p.off("mousedown",a.downFn),d.off("touchend",a.upFn),d.off("mouseup",a.upFn),d.off("touchmove",a.moveFn),d.off("mousemove",a.moveFn),p.off("click",a.clickFn)},a.onDownEvents=function(c){switch(c){case"touchmove":case"touchend":p.on("click",a.clickFn),p.on("touchstart",a.downFn),b(function(){p.on("mousedown",a.downFn)},j);break;case"mousemove":case"mouseup":p.on("click",a.clickFn),p.on("mousedown",a.downFn),b(function(){p.on("touchstart",a.downFn)},j);break;default:p.on("click",a.clickFn),p.on("touchstart",a.downFn),p.on("mousedown",a.downFn)}};var r=function(d){var e=c;n&&(e.removeClass(n),n=null),n=angular.isFunction(a.col.headerCellClass)?a.col.headerCellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.headerCellClass,e.addClass(n),b(function(){var b=a.grid.renderContainers.right?a.grid.renderContainers.right:a.grid.renderContainers.body;a.isLastCol=a.col===b.visibleColumnCache[b.visibleColumnCache.length-1]}),k.grid.options.enableSorting&&a.col.enableSorting?a.sortable=!0:a.sortable=!1;var g=a.filterable;k.grid.options.enableFiltering&&a.col.enableFiltering?a.filterable=!0:a.filterable=!1,g!==a.filterable&&("undefined"!=typeof a.col.updateFilters&&a.col.updateFilters(a.filterable),a.filterable?(a.col.filters.forEach(function(b,c){q.push(a.$watch("col.filters["+c+"].term",function(a,b){a!==b&&(k.grid.api.core.raise.filterChanged(),k.grid.api.core.notifyDataChange(f.dataChange.COLUMN),k.grid.queueGridRefresh())}))}),a.$on("$destroy",function(){q.forEach(function(a){a()})})):q.forEach(function(a){a()})),a.col.grid.options&&a.col.grid.options.enableColumnMenus!==!1&&a.col.colDef&&a.col.colDef.enableColumnMenu!==!1?a.colMenu=!0:a.colMenu=!1,a.offAllEvents(),(a.sortable||a.colMenu)&&(a.onDownEvents(),a.$on("$destroy",function(){a.offAllEvents()}))};r();var s=a.grid.registerDataChangeCallback(r,[f.dataChange.COLUMN]);a.$on("$destroy",s),a.handleClick=function(b){var c=!1;b.shiftKey&&(c=!0),k.grid.sortColumn(a.col,c).then(function(){k.columnMenuScope&&k.columnMenuScope.hideMenu(),k.grid.refresh()})},a.toggleMenu=function(b){b.stopPropagation(),k.columnMenuScope.menuShown&&k.columnMenuScope.col===a.col?k.columnMenuScope.hideMenu():k.columnMenuScope.showMenu(a.col,c)}}}}};return k}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeader",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout","ScrollEvent",function(a,b,c,d,e,f){var g="ui-grid/ui-grid-header",h="ui-grid/ui-grid-no-header";return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(a,c){return{pre:function(a,c,e,i){function j(){m.header=m.colContainer.header=c;var a=c[0].getElementsByClassName("ui-grid-header-canvas");a.length>0?m.headerCanvas=m.colContainer.headerCanvas=a[0]:m.headerCanvas=null}function k(a){if(!l.grid.isScrollingHorizontally){var b=d.normalizeScrollLeft(m.headerViewport,l.grid),c=m.colContainer.scrollHorizontal(b),e=new f(l.grid,null,m.colContainer,f.Sources.ViewPortScroll);e.newScrollLeft=b,c>-1&&(e.x={percentage:c}),l.grid.scrollContainers(null,e)}}var l=i[0],m=i[1];a.grid=l.grid,a.colContainer=m.colContainer,j();var n;n=a.grid.options.showHeader?a.grid.options.headerTemplate?a.grid.options.headerTemplate:g:h,d.getTemplate(n).then(function(d){var e=angular.element(d),f=b(e)(a);if(c.replaceWith(f),c=f,j(),m){var g=c[0].getElementsByClassName("ui-grid-header-viewport")[0];g&&(m.headerViewport=g,angular.element(g).on("scroll",k),a.$on("$destroy",function(){angular.element(g).off("scroll",k)}))}a.grid.queueRefresh()})},post:function(a,b,c,e){function f(){var a=h.colContainer.visibleColumnCache,b="",c=0;return a.forEach(function(a){b+=a.getColClassDefinition(),c+=a.drawnWidth}),h.colContainer.canvasWidth=c,b}var g=e[0],h=e[1];g.grid;d.disableAnimations(b),h.header=b;var i=b[0].getElementsByClassName("ui-grid-header-viewport")[0];i&&(h.headerViewport=i),g&&g.grid.registerStyleComputation({priority:15,func:f})}}}}}])}(),function(){angular.module("ui.grid").service("uiGridGridMenuService",["gridUtil","i18nService","uiGridConstants",function(a,b,c){var d={initialize:function(a,b){b.gridMenuScope=a,a.grid=b,a.registeredMenuItems=[],a.$on("$destroy",function(){a.grid&&a.grid.gridMenuScope&&(a.grid.gridMenuScope=null),a.grid&&(a.grid=null),a.registeredMenuItems&&(a.registeredMenuItems=null)}),a.registeredMenuItems=[],b.api.registerMethod("core","addToGridMenu",d.addToGridMenu),b.api.registerMethod("core","removeFromGridMenu",d.removeFromGridMenu)},addToGridMenu:function(b,c){angular.isArray(c)?b.gridMenuScope?(b.gridMenuScope.registeredMenuItems=b.gridMenuScope.registeredMenuItems?b.gridMenuScope.registeredMenuItems:[],b.gridMenuScope.registeredMenuItems=b.gridMenuScope.registeredMenuItems.concat(c)):a.logError("Asked to addToGridMenu, but gridMenuScope not present. Timing issue? Please log issue with ui-grid"):a.logError("addToGridMenu: menuItems must be an array, and is not, not adding any items")},removeFromGridMenu:function(b,c){var d=-1;b&&b.gridMenuScope&&b.gridMenuScope.registeredMenuItems.forEach(function(b,e){b.id===c&&(d>-1?a.logError("removeFromGridMenu: found multiple items with the same id, removing only the last"):d=e)}),d>-1&&b.gridMenuScope.registeredMenuItems.splice(d,1)},getMenuItems:function(c){var e=[];c.grid.options.gridMenuCustomItems&&(angular.isArray(c.grid.options.gridMenuCustomItems)?e=e.concat(c.grid.options.gridMenuCustomItems):a.logError("gridOptions.gridMenuCustomItems must be an array, and is not"));var f=[{title:b.getSafeText("gridMenu.clearAllFilters"),action:function(a){c.grid.clearAllFilters(void 0,!0,void 0)},shown:function(){return c.grid.options.enableFiltering},order:100}];return e=e.concat(f),e=e.concat(c.registeredMenuItems),c.grid.options.gridMenuShowHideColumns!==!1&&(e=e.concat(d.showHideColumns(c))),e.sort(function(a,b){return a.order-b.order}),e},showHideColumns:function(a){var c=[];return a.grid.options.columnDefs&&0!==a.grid.options.columnDefs.length&&0!==a.grid.columns.length?(c.push({title:b.getSafeText("gridMenu.columns"),order:300}),a.grid.options.gridMenuTitleFilter=a.grid.options.gridMenuTitleFilter?a.grid.options.gridMenuTitleFilter:function(a){return a},a.grid.options.columnDefs.forEach(function(b,e){if(b.enableHiding!==!1){var f={icon:"ui-grid-icon-ok",action:function(a){a.stopPropagation(),d.toggleColumnVisibility(this.context.gridCol)},shown:function(){return this.context.gridCol.colDef.visible===!0||void 0===this.context.gridCol.colDef.visible},context:{gridCol:a.grid.getColumn(b.name||b.field)},leaveOpen:!0,order:301+2*e};d.setMenuItemTitle(f,b,a.grid),c.push(f),f={icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),d.toggleColumnVisibility(this.context.gridCol)},shown:function(){return!(this.context.gridCol.colDef.visible===!0||void 0===this.context.gridCol.colDef.visible)},context:{gridCol:a.grid.getColumn(b.name||b.field)},leaveOpen:!0,order:301+2*e+1},d.setMenuItemTitle(f,b,a.grid),c.push(f)}}),c):c},setMenuItemTitle:function(b,c,d){var e=d.options.gridMenuTitleFilter(c.displayName||a.readableColumnName(c.name)||c.field);"string"==typeof e?b.title=e:e.then?(b.title="",e.then(function(a){b.title=a},function(a){b.title=a})):(a.logError("Expected gridMenuTitleFilter to return a string or a promise, it has returned neither, bad config"),b.title="badconfig")},toggleColumnVisibility:function(a){a.colDef.visible=!(a.colDef.visible===!0||void 0===a.colDef.visible),a.grid.refresh(),a.grid.api.core.notifyDataChange(c.dataChange.COLUMN),a.grid.api.core.raise.columnVisibilityChanged(a)}};return d}]).directive("uiGridMenuButton",["gridUtil","uiGridConstants","uiGridGridMenuService","i18nService",function(a,b,c,d){return{priority:0,scope:!0,require:["^uiGrid"],templateUrl:"ui-grid/ui-grid-menu-button",replace:!0,link:function(b,e,f,g){var h=g[0];b.i18n={aria:d.getSafeText("gridMenu.aria")},c.initialize(b,h.grid),b.shown=!1,b.toggleMenu=function(){b.shown?(b.$broadcast("hide-menu"),b.shown=!1):(b.menuItems=c.getMenuItems(b),b.$broadcast("show-menu"),b.shown=!0)},b.$on("menu-hidden",function(){b.shown=!1,a.focus.bySelector(e,".ui-grid-icon-container")})}}}])}(),function(){angular.module("ui.grid").directive("uiGridMenu",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants","i18nService",function(a,b,c,d,e,f,g){var h={priority:0,scope:{menuItems:"=",autoHide:"=?"},require:"?^uiGrid",templateUrl:"ui-grid/uiGridMenu",replace:!1,link:function(a,d,h,i){var j;a.dynamicStyles="",i&&(j=i.grid.gridHeight-30,a.dynamicStyles=[".grid"+i.grid.id+" .ui-grid-menu-mid {","max-height: "+j+"px;","}"].join(" ")),a.i18n={close:g.getSafeText("columnMenu.close")},a.showMenu=function(c,f){a.shown?a.shownMid||(a.shownMid=!0,a.$emit("menu-shown")):(a.shown=!0,b(function(){a.shownMid=!0,a.$emit("menu-shown")}));var g="click";f&&f.originalEvent&&f.originalEvent.type&&"touchstart"===f.originalEvent.type&&(g=f.originalEvent.type),angular.element(document).off("click touchstart",k),b(function(){angular.element(document).on(g,k)}),e.focus.bySelector(d,"button[type=button]",!0)},a.hideMenu=function(c,d){a.shown&&(a.shownMid=!1,b(function(){a.shownMid||(a.shown=!1,a.$emit("menu-hidden"))},200)),angular.element(document).off("click touchstart",k)},a.$on("hide-menu",function(b,c){a.hideMenu(b,c)}),a.$on("show-menu",function(b,c){a.showMenu(b,c)});var k=function(){a.shown&&a.$apply(function(){a.hideMenu()})};("undefined"==typeof a.autoHide||void 0===a.autoHide)&&(a.autoHide=!0),a.autoHide&&angular.element(c).on("resize",k),a.$on("$destroy",function(){angular.element(document).off("click touchstart",k)}),a.$on("$destroy",function(){angular.element(c).off("resize",k)}),i&&a.$on("$destroy",i.grid.api.core.on.scrollBegin(a,k)),a.$on("$destroy",a.$on(f.events.ITEM_DRAGGING,k))},controller:["$scope","$element","$attrs",function(a,b,c){}]};return h}]).directive("uiGridMenuItem",["gridUtil","$compile","i18nService",function(a,b,c){var d={priority:0,scope:{name:"=",active:"=",action:"=",icon:"=",shown:"=",context:"=",templateUrl:"=",leaveOpen:"=",screenReaderOnly:"="},require:["?^uiGrid","^uiGridMenu"],templateUrl:"ui-grid/uiGridMenuItem",replace:!1,compile:function(d,e){return{pre:function(c,d,e,f){f[0],f[1];c.templateUrl&&a.getTemplate(c.templateUrl).then(function(a){var e=angular.element(a),f=b(e)(c);d.replaceWith(f)})},post:function(b,d,e,f){var g=f[0];f[1];("undefined"==typeof b.shown||null===b.shown)&&(b.shown=function(){return!0}),b.itemShown=function(){var a={};return b.context&&(a.context=b.context),"undefined"!=typeof g&&g&&(a.grid=g.grid),b.shown.call(a)},b.itemAction=function(c,e){if(a.logDebug("itemAction"),c.stopPropagation(),"function"==typeof b.action){var f={};b.context&&(f.context=b.context),"undefined"!=typeof g&&g&&(f.grid=g.grid),b.action.call(f,c,e),b.leaveOpen?a.focus.bySelector(angular.element(a.closestElm(d,".ui-grid-menu-items")),"button[type=button]",!0):b.$emit("hide-menu")}},b.i18n=c.get()}}}};return d}])}(),function(){"use strict";var a=angular.module("ui.grid");angular.forEach([{tag:"Src",method:"attr"},{tag:"Text",method:"text"},{tag:"Href",method:"attr"},{tag:"Class",method:"addClass"},{tag:"Html",method:"html"},{tag:"Alt",method:"attr"},{tag:"Style",method:"css"},{tag:"Value",method:"attr"},{tag:"Id",method:"attr"},{tag:"Id",directiveName:"IdGrid",method:"attr",appendGridId:!0},{tag:"Title",method:"attr"},{tag:"Label",method:"attr",aria:!0},{tag:"Labelledby",method:"attr",aria:!0},{tag:"Labelledby",directiveName:"LabelledbyGrid",appendGridId:!0,method:"attr",aria:!0},{tag:"Describedby",method:"attr",aria:!0},{tag:"Describedby",directiveName:"DescribedbyGrid",appendGridId:!0,method:"attr",aria:!0}],function(b){var c="uiGridOneBind",d=(b.aria?c+"Aria":c)+(b.directiveName?b.directiveName:b.tag);a.directive(d,["gridUtil",function(a){return{restrict:"A",require:["?uiGrid","?^uiGrid"],link:function(c,e,f,g){var h=function(b){var e;if(c.grid)e=c.grid;else if(c.col&&c.col.grid)e=c.col.grid;else if(!g.some(function(a){return a&&a.grid?(e=a.grid,!0):void 0}))throw a.logError("["+d+"] A valid grid could not be found to bind id. Are you using this directive within the correct scope? Trying to generate id: [gridID]-"+b),new Error("No valid grid could be found");if(e){var f=new RegExp(e.id.toString());f.test(b)||(b=e.id.toString()+"-"+b)}return b},i=c.$watch(f[d],function(a){if(a){if(b.appendGridId){var c=null;angular.forEach(a.split(" "),function(a){c=(c?c+" ":"")+h(a)}),a=c}switch(b.method){case"attr":b.aria?e[b.method]("aria-"+b.tag.toLowerCase(),a):e[b.method](b.tag.toLowerCase(),a);break;case"addClass":if(angular.isObject(a)&&!angular.isArray(a)){var d=[],f=!1;if(angular.forEach(a,function(a,b){null!==a&&"undefined"!=typeof a&&(f=!0,a&&d.push(b))}),!f)return;a=d}if(!a)return;e.addClass(angular.isArray(a)?a.join(" "):a);break;default:e[b.method](a)}i()}},!0)}}}])})}(),function(){"use strict";var a=angular.module("ui.grid");a.directive("uiGridRenderContainer",["$timeout","$document","uiGridConstants","gridUtil","ScrollEvent",function(a,b,c,d,e){return{replace:!0,transclude:!0,templateUrl:"ui-grid/uiGridRenderContainer",require:["^uiGrid","uiGridRenderContainer"],scope:{containerId:"=",rowContainerName:"=",colContainerName:"=",bindScrollHorizontal:"=",bindScrollVertical:"=",enableVerticalScrollbar:"=",enableHorizontalScrollbar:"="},controller:"uiGridRenderContainer as RenderContainer",compile:function(){return{pre:function(a,b,c,d){var e=d[0],f=d[1],g=a.grid=e.grid;if(!a.rowContainerName)throw"No row render container name specified";if(!a.colContainerName)throw"No column render container name specified";if(!g.renderContainers[a.rowContainerName])throw"Row render container '"+a.rowContainerName+"' is not registered.";if(!g.renderContainers[a.colContainerName])throw"Column render container '"+a.colContainerName+"' is not registered.";var h=a.rowContainer=g.renderContainers[a.rowContainerName],i=a.colContainer=g.renderContainers[a.colContainerName];f.containerId=a.containerId,f.rowContainer=h,f.colContainer=i},post:function(a,b,c,f){function g(){var b="",c=l.canvasWidth,d=l.getViewportWidth(),e=k.getCanvasHeight(),f=k.getViewportHeight();l.needsHScrollbarPlaceholder()&&(f-=j.scrollbarHeight);var g,i;return g=i=l.getHeaderViewportWidth(),b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-canvas { width: "+c+"px; height: "+e+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { width: "+(c+j.scrollbarWidth)+"px; }",b+=o.explicitHeaderCanvasHeight?"\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { height: "+o.explicitHeaderCanvasHeight+"px; }":"\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { height: inherit; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-viewport { width: "+d+"px; height: "+f+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-viewport { width: "+g+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-footer-canvas { width: "+(c+j.scrollbarWidth)+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-footer-viewport { width: "+i+"px; }"}var h=f[0],i=f[1],j=h.grid,k=i.rowContainer,l=i.colContainer,m=null,n=null,o=j.renderContainers[a.containerId];b.addClass("ui-grid-render-container-"+a.containerId),d.on.mousewheel(b,function(a){var b=new e(j,k,l,e.Sources.RenderContainerMouseWheel);if(0!==a.deltaY){var c=-1*a.deltaY*a.deltaFactor;m=i.viewport[0].scrollTop,b.verticalScrollLength=k.getVerticalScrollLength();var f=(m+c)/b.verticalScrollLength;f>=1&&mf?f=0:f>1&&(f=1),b.y={percentage:f,pixels:c}}if(0!==a.deltaX){var g=a.deltaX*a.deltaFactor;n=d.normalizeScrollLeft(i.viewport,j),b.horizontalScrollLength=l.getCanvasWidth()-l.getViewportWidth();var h=(n+g)/b.horizontalScrollLength;0>h?h=0:h>1&&(h=1),b.x={percentage:h,pixels:g}}0!==a.deltaY&&(b.atTop(m)||b.atBottom(m))||0!==a.deltaX&&(b.atLeft(n)||b.atRight(n))||(a.preventDefault(),a.stopPropagation(),b.fireThrottledScrollingEvent("",b))}),b.bind("$destroy",function(){b.unbind("keydown"),["touchstart","touchmove","touchend","keydown","wheel","mousewheel","DomMouseScroll","MozMousePixelScroll"].forEach(function(a){b.unbind(a)})}),h.grid.registerStyleComputation({priority:6,func:g})}}}}}]),a.controller("uiGridRenderContainer",["$scope","gridUtil",function(a,b){}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridRow",["gridUtil",function(a){return{replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:{row:"=uiGridRow",rowRenderIndex:"="},compile:function(){return{pre:function(a,b,c,d){function e(){a.row.getRowTemplateFn.then(function(c){var d=a.$new();c(d,function(a,c){h&&(h.remove(),i.$destroy()),b.empty().append(a),h=a,i=d})})}var f=d[0],g=d[1];f.grid;a.grid=f.grid,a.colContainer=g.colContainer;var h,i;e(),a.$watch("row.getRowTemplateFn",function(a,b){a!==b&&e()})},post:function(a,b,c,d){}}}}}])}(),function(){angular.module("ui.grid").directive("uiGridStyle",["gridUtil","$interpolate",function(a,b){return{link:function(a,c,d,e){var f=b(c.text(),!0);f&&a.$watch(f,function(a){c.text(a)})}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridViewport",["gridUtil","ScrollEvent","uiGridConstants","$log",function(a,b,c,d){return{replace:!0,scope:{},controllerAs:"Viewport",templateUrl:"ui-grid/uiGridViewport",require:["^uiGrid","^uiGridRenderContainer"],link:function(c,d,e,f){function g(e){var f=d[0].scrollTop,g=a.normalizeScrollLeft(d,p),h=n.scrollVertical(f),i=o.scrollHorizontal(g),j=new b(p,n,o,b.Sources.ViewPortScroll);j.newScrollLeft=g,j.newScrollTop=f,i>-1&&(j.x={percentage:i}),h>-1&&(j.y={percentage:h}),p.scrollContainers(c.$parent.containerId,j)}function h(a){m.prevScrollArgs=a;var b=a.getNewScrollTop(n,m.viewport);d[0].scrollTop=b}function i(b){m.prevScrollArgs=b;var c=b.getNewScrollLeft(o,m.viewport);d[0].scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p)}function j(b){var c=b.getNewScrollLeft(o,m.viewport);m.headerViewport&&(m.headerViewport.scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p))}function k(b){var c=b.getNewScrollLeft(o,m.viewport);m.footerViewport&&(m.footerViewport.scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p))}var l=f[0],m=f[1];c.containerCtrl=m;var n=m.rowContainer,o=m.colContainer,p=l.grid;c.grid=l.grid,c.rowContainer=m.rowContainer,c.colContainer=m.colContainer,m.viewport=d,d.on("scroll",g);c.$parent.bindScrollVertical&&p.addVerticalScrollSync(c.$parent.containerId,h),c.$parent.bindScrollHorizontal&&(p.addHorizontalScrollSync(c.$parent.containerId,i),p.addHorizontalScrollSync(c.$parent.containerId+"header",j),p.addHorizontalScrollSync(c.$parent.containerId+"footer",k))},controller:["$scope",function(a){this.rowStyle=function(b){var c=a.rowContainer,d=a.colContainer,e={};if(0===b&&0!==c.currentTopRow){var f=c.currentTopRow*c.grid.options.rowHeight;e["margin-top"]=f+"px"}return 0!==d.currentFirstColumn&&(d.grid.isRTL()?e["margin-right"]=d.columnOffset+"px":e["margin-left"]=d.columnOffset+"px"),e}}]}}])}(),function(){angular.module("ui.grid").directive("uiGridVisible",function(){return function(a,b,c){a.$watch(c.uiGridVisible,function(a){b[a?"removeClass":"addClass"]("ui-grid-invisible")})}})}(),function(){"use strict";function a(a,b,c,d,e,f){return{templateUrl:"ui-grid/ui-grid",scope:{uiGrid:"="},replace:!0,transclude:!0,controller:"uiGridController",compile:function(){return{post:function(a,b,g,h){function i(){b[0].offsetWidth<=0&&p>q?(setTimeout(i,o),q++):c(k)}function j(){angular.element(d).on("resize",m),b.on("$destroy",function(){angular.element(d).off("resize",m)}),a.$watch(function(){return n.hasLeftContainer()},function(a,b){a!==b&&n.refreshCanvas(!0)}),a.$watch(function(){return n.hasRightContainer()},function(a,b){a!==b&&n.refreshCanvas(!0)})}function k(){n.gridWidth=a.gridWidth=e.elementWidth(b),n.canvasWidth=h.grid.gridWidth,n.gridHeight=a.gridHeight=e.elementHeight(b),n.gridHeight<=n.options.rowHeight&&n.options.enableMinHeightCheck&&l(),n.refreshCanvas(!0)}function l(){var c=n.options.minRowsToShow*n.options.rowHeight,d=n.options.showHeader?n.options.headerRowHeight:0,g=n.calcFooterHeight(),h=0;n.options.enableHorizontalScrollbar===f.scrollbars.ALWAYS&&(h=e.getScrollbarWidth());var i=0;if(angular.forEach(n.options.columnDefs,function(a){a.hasOwnProperty("filter")?1>i&&(i=1):a.hasOwnProperty("filters")&&i(n.grid.rowHeaderColumns?n.grid.rowHeaderColumns.length:0);!g&&!c.uiGridColumns&&0===n.grid.options.columnDefs.length&&b.length>0&&n.grid.buildColumnDefsFromData(b),!g&&(n.grid.options.columnDefs.length>0||b.length>0)&&d.push(n.grid.buildColumns().then(function(){n.grid.preCompileCellTemplates()})),e.all(d).then(function(){n.grid.modifyRows(p).then(function(){n.grid.redrawInPlace(!0),a.$evalAsync(function(){n.grid.refreshCanvas(!0),n.grid.callDataChangeCallbacks(f.dataChange.ROW)})})})}}var n=this;n.grid=h.createGrid(a.uiGrid),n.grid.appScope=n.grid.appScope||a.$parent,b.addClass("grid"+n.grid.id),n.grid.rtl="rtl"===d.getStyles(b[0]).direction,a.grid=n.grid,c.uiGridColumns&&c.$observe("uiGridColumns",function(a){n.grid.options.columnDefs=a,n.grid.buildColumns().then(function(){n.grid.preCompileCellTemplates(),n.grid.refreshCanvas(!0)})});var o=[];n.grid.options.fastWatch?(n.uiGrid=a.uiGrid,angular.isString(a.uiGrid.data)?(o.push(a.$parent.$watch(a.uiGrid.data,m)),o.push(a.$parent.$watch(function(){return n.grid.appScope[a.uiGrid.data]?n.grid.appScope[a.uiGrid.data].length:void 0},m))):(o.push(a.$parent.$watch(function(){return a.uiGrid.data},m)),o.push(a.$parent.$watch(function(){return a.uiGrid.data.length},m))),o.push(a.$parent.$watch(function(){return a.uiGrid.columnDefs},l)),o.push(a.$parent.$watch(function(){return a.uiGrid.columnDefs.length},l))):(angular.isString(a.uiGrid.data)?o.push(a.$parent.$watchCollection(a.uiGrid.data,m)):o.push(a.$parent.$watchCollection(function(){return a.uiGrid.data},m)),o.push(a.$parent.$watchCollection(function(){return a.uiGrid.columnDefs},l)));var p,q=a.$watch(function(){return n.grid.styleComputations},function(){n.grid.refreshCanvas(!0)});a.$on("$destroy",function(){o.forEach(function(a){a()}),q()}),n.fireEvent=function(b,c){("undefined"==typeof c||void 0===c)&&(c={}),("undefined"==typeof c.grid||void 0===c.grid)&&(c.grid=n.grid),a.$broadcast(b,c)},n.innerCompile=function(b){k(b)(a)}}]),angular.module("ui.grid").directive("uiGrid",a),a.$inject=["$compile","$templateCache","$timeout","$window","gridUtil","uiGridConstants"]}(),function(){"use strict";angular.module("ui.grid").directive("uiGridPinnedContainer",["gridUtil",function(a){return{restrict:"EA",replace:!0,template:'
            ',scope:{side:"=uiGridPinnedContainer"},require:"^uiGrid",compile:function(){return{post:function(a,b,c,d){function e(){var a=this,b=0;a.visibleColumnCache.forEach(function(a){b+=a.drawnWidth});var c=a.getViewportAdjustment();return b+=c.width}function f(){if("left"===a.side||"right"===a.side){for(var b=h.renderContainers[a.side].visibleColumnCache,c=0,d=0;d0?b[0]:null},p.prototype.getColDef=function(a){var b=this.options.columnDefs.filter(function(b){return b.name===a});return b.length>0?b[0]:null},p.prototype.assignTypes=function(){var a=this;a.options.columnDefs.forEach(function(b,c){if(!b.type){var e=new g(b,c,a),f=a.rows.length>0?a.rows[0]:null;f?b.type=d.guessType(a.getCellValue(f,e)):b.type="string"}})},p.prototype.isRowHeaderColumn=function(a){return-1!==this.rowHeaderColumns.indexOf(a)},p.prototype.addRowHeaderColumn=function(a){var b=this,c=new g(a,d.nextUid(),b);c.isRowHeader=!0,b.isRTL()?(b.createRightContainer(),c.renderContainer="right"):(b.createLeftContainer(),c.renderContainer="left"),b.columnBuilders[0](a,c,b.options).then(function(){c.enableFiltering=!1,c.enableSorting=!1,c.enableHiding=!1,b.rowHeaderColumns.push(c),b.buildColumns().then(function(){b.preCompileCellTemplates(),b.queueGridRefresh()})})},p.prototype.getOnlyDataColumns=function(){var a=this,b=[];return a.columns.forEach(function(c){-1===a.rowHeaderColumns.indexOf(c)&&b.push(c)}),b},p.prototype.buildColumns=function(b){var c={orderByColumnDefs:!1};angular.extend(c,b);var e,f=this,h=[],i=f.rowHeaderColumns.length;for(e=0;ee;e++)f.columns[e+i].name!==f.options.columnDefs[e].name?j[e+i]=f.getColumn(f.options.columnDefs[e].name):j[e+i]=f.columns[e+i];f.columns.length=0,Array.prototype.splice.apply(f.columns,[0,0].concat(j))}return a.all(h).then(function(){f.rows.length>0&&f.assignTypes()})},p.prototype.preCompileCellTemplates=function(){var a=this,c=function(c){var d=c.cellTemplate.replace(e.MODEL_COL_FIELD,a.getQualifiedColField(c));d=d.replace(e.COL_FIELD,"grid.getCellValue(row, col)");var f=b(d);c.compiledElementFn=f,c.compiledElementFnDefer&&c.compiledElementFnDefer.resolve(c.compiledElementFn)};this.columns.forEach(function(a){a.cellTemplate?c(a):a.cellTemplatePromise&&a.cellTemplatePromise.then(function(){c(a)})})},p.prototype.getQualifiedColField=function(a){return"row.entity."+d.preEval(a.field)},p.prototype.createLeftContainer=function(){this.hasLeftContainer()||(this.renderContainers.left=new l("left",this,{disableColumnOffset:!0}))},p.prototype.createRightContainer=function(){this.hasRightContainer()||(this.renderContainers.right=new l("right",this,{disableColumnOffset:!0}))},p.prototype.hasLeftContainer=function(){return void 0!==this.renderContainers.left},p.prototype.hasRightContainer=function(){return void 0!==this.renderContainers.right},p.prototype.preprocessColDef=function(a){var b=this;if(!a.field&&!a.name)throw new Error("colDef.name or colDef.field property is required");if(void 0===a.name&&void 0!==a.field){for(var c=a.field,d=2;b.getColumn(c);)c=a.field+d.toString(),d++;a.name=c}},p.prototype.newInN=function(a,b,c,d){for(var e=this,f=[],g=0;g0?d[0]:null},p.prototype.modifyRows=function(b){var c=this,d=c.rows.slice(0),e=c.rowHashMap||c.createRowHashMap();c.rowHashMap=c.createRowHashMap(),c.rows.length=0,b.forEach(function(a,b){var f;f=c.options.enableRowHashing?e.get(a):c.getRow(a,d),f||(f=c.processRowBuilders(new h(a,b,c))),c.rows.push(f),c.rowHashMap.put(a,f)}),c.assignTypes();var f=a.when(c.processRowsProcessors(c.rows)).then(function(a){return c.setVisibleRows(a)}),g=a.when(c.processColumnsProcessors(c.columns)).then(function(a){return c.setVisibleColumns(a)});return a.all([f,g])},p.prototype.addRows=function(a){for(var b=this,c=b.rows.length,d=0;dd)d+=e.drawnWidth,c++;else{for(var g=0,h=f;h>=f-c;h--)g+=a.columns[h].drawnWidth;b>g&&c++}}),c},p.prototype.getBodyHeight=function(){var a=this.getViewportHeight();return a},p.prototype.getViewportHeight=function(){var a=this,b=this.gridHeight-this.headerHeight-this.footerHeight,c=a.getViewportAdjustment();return b+=c.height},p.prototype.getViewportWidth=function(){var a=this,b=this.gridWidth,c=a.getViewportAdjustment();return b+=c.width},p.prototype.getHeaderViewportWidth=function(){var a=this.getViewportWidth();return a},p.prototype.addVerticalScrollSync=function(a,b){this.verticalScrollSyncCallBackFns[a]=b},p.prototype.addHorizontalScrollSync=function(a,b){this.horizontalScrollSyncCallBackFns[a]=b},p.prototype.scrollContainers=function(a,b){if(b.y){var c=["body","left","right"];this.flagScrollingVertically(b),"body"===a?c=["left","right"]:"left"===a?c=["body","right"]:"right"===a&&(c=["body","left"]);for(var d=0;db&&(b=a.sort.priority)}),b+1},p.prototype.resetColumnSorting=function(a){var b=this;b.columns.forEach(function(b){b===a||b.suppressRemoveSort||(b.sort={})})},p.prototype.getColumnSorting=function(){var a,b=this,c=[];return a=b.columns.slice(0),a.sort(j.prioritySort).forEach(function(a){a.sort&&"undefined"!=typeof a.sort.direction&&a.sort.direction&&(a.sort.direction===e.ASC||a.sort.direction===e.DESC)&&c.push(a)}),c},p.prototype.sortColumn=function(b,c,d){var e=this,f=null;if("undefined"==typeof b||!b)throw new Error("No column parameter provided");if("boolean"==typeof c?d=c:f=c,d?b.sort.priority||(b.sort.priority=e.getNextColumnSortPriority()):(e.resetColumnSorting(b),b.sort.priority=0,b.sort.priority=e.getNextColumnSortPriority()),f)b.sort.direction=f;else{var g=b.sortDirectionCycle.indexOf(b.sort.direction?b.sort.direction:null);g=(g+1)%b.sortDirectionCycle.length,b.colDef&&b.suppressRemoveSort&&!b.sortDirectionCycle[g]&&(g=(g+1)%b.sortDirectionCycle.length),b.sortDirectionCycle[g]?b.sort.direction=b.sortDirectionCycle[g]:b.sort={}}return e.api.core.raise.sortChanged(e,e.getColumnSorting()),a.when(b)},p.prototype.renderingComplete=function(){angular.isFunction(this.options.onRegisterApi)&&this.options.onRegisterApi(this.api),this.api.core.raise.renderingComplete(this.api)},p.prototype.createRowHashMap=function(){var a=this,b=new o;return b.grid=a,b},p.prototype.refresh=function(b){var c=this,d=c.processRowsProcessors(c.rows).then(function(a){c.setVisibleRows(a)}),e=c.processColumnsProcessors(c.columns).then(function(a){c.setVisibleColumns(a)});return a.all([d,e]).then(function(){c.redrawInPlace(b),c.refreshCanvas(!0)})},p.prototype.refreshRows=function(){var a=this;return a.processRowsProcessors(a.rows).then(function(b){a.setVisibleRows(b),a.redrawInPlace(),a.refreshCanvas(!0)})},p.prototype.refreshCanvas=function(b){var c=this;b&&c.buildStyles();var e=a.defer(),f=[];for(var g in c.renderContainers)if(c.renderContainers.hasOwnProperty(g)){var h=c.renderContainers[g];if(null===h.canvasWidth||isNaN(h.canvasWidth))continue;(h.header||h.headerCanvas)&&(h.explicitHeaderHeight=h.explicitHeaderHeight||null,h.explicitHeaderCanvasHeight=h.explicitHeaderCanvasHeight||null,f.push(h))}return f.length>0?(b&&c.buildStyles(),m(function(){var a,g,h=!1,i=0,j=0,k=function(a,b){return a!==b&&(h=!0),b};for(a=0;ao?0:o,g.innerHeaderHeight=o,!g.explicitHeaderHeight&&o>i&&(i=o)}if(g.headerCanvas){var p=g.headerCanvasHeight=k(g.headerCanvasHeight,parseInt(d.outerElementHeight(g.headerCanvas),10));!g.explicitHeaderCanvasHeight&&p>j&&(j=p)}}for(a=0;a0&&"undefined"!=typeof g.headerHeight&&null!==g.headerHeight&&(g.explicitHeaderHeight||g.headerHeight0&&"undefined"!=typeof g.headerCanvasHeight&&null!==g.headerCanvasHeight&&(g.explicitHeaderCanvasHeight||g.headerCanvasHeight0},p.prototype.hasRightContainerColumns=function(){return this.hasRightContainer()&&this.renderContainers.right.renderedColumns.length>0},p.prototype.scrollToIfNecessary=function(b,c){var d=this,e=new n(d,"uiGrid.scrollToIfNecessary"),f=d.renderContainers.body.visibleRowCache,g=d.renderContainers.body.visibleColumnCache,h=d.renderContainers.body.prevScrollTop+d.headerHeight;h=0>h?0:h;var i=d.renderContainers.body.prevScrollLeft,j=d.renderContainers.body.prevScrollTop+d.gridHeight-d.renderContainers.body.headerHeight-d.footerHeight-d.scrollbarWidth,k=d.renderContainers.body.prevScrollLeft+Math.ceil(d.renderContainers.body.getViewportWidth());if(null!==b){var l=f.indexOf(b),m=d.renderContainers.body.getCanvasHeight()-d.renderContainers.body.getViewportHeight(),o=l*d.options.rowHeight+d.headerHeight;o=0>o?0:o;var p,q;h>o?(p=d.renderContainers.body.prevScrollTop-(h-o),q=p/m,e.y={percentage:q}):o>j&&(p=o-j+d.renderContainers.body.prevScrollTop,q=p/m,e.y={percentage:q})}if(null!==c){for(var r=g.indexOf(c),s=d.renderContainers.body.getCanvasWidth()-d.renderContainers.body.getViewportWidth(),t=0,u=0;r>u;u++){var v=g[u];t+=v.drawnWidth}t=0>t?0:t;var w=t+c.drawnWidth;w=0>w?0:w;var x,y;i>t?(x=d.renderContainers.body.prevScrollLeft-(i-t),y=x/s,y=y>1?1:y,e.x={percentage:y}):w>k&&(x=w-k+d.renderContainers.body.prevScrollLeft,y=x/s,y=y>1?1:y,e.x={percentage:y})}var z=a.defer();if(e.y||e.x){e.withDelay=!1,d.scrollContainers("",e);var A=d.api.core.on.scrollEnd(null,function(){z.resolve(e),A()})}else z.resolve();return z.promise},p.prototype.scrollTo=function(a,b){var c=null,d=null;return null!==a&&"undefined"!=typeof a&&(c=this.getRow(a)),null!==b&&"undefined"!=typeof b&&(d=this.getColumn(b.name?b.name:b.field)),this.scrollToIfNecessary(c,d)},p.prototype.clearAllFilters=function(a,b,c){return void 0===a&&(a=!0),void 0===b&&(b=!1),void 0===c&&(c=!1),this.columns.forEach(function(a){a.filters.forEach(function(a){a.term=void 0,b&&(a.condition=void 0),c&&(a.flags=void 0)})}),a?this.refreshRows():void 0},o.prototype={put:function(a,b){this[this.grid.options.rowIdentity(a)]=b},get:function(a){return this[this.grid.options.rowIdentity(a)]},remove:function(a){var b=this[a=this.grid.options.rowIdentity(a)];return delete this[a],b}},p}])}(),function(){angular.module("ui.grid").factory("GridApi",["$q","$rootScope","gridUtil","uiGridConstants","GridRow","uiGridGridMenuService",function(a,b,c,d,e,f){function g(a,c,d,e){return b.$on(a,function(a){var b=Array.prototype.slice.call(arguments);b.splice(0,1),c.apply(e?e:d.api,b)})}var h=function(a){this.grid=a,this.listeners=[],this.registerEvent("core","renderingComplete"),this.registerEvent("core","filterChanged"),this.registerMethod("core","setRowInvisible",e.prototype.setRowInvisible),this.registerMethod("core","clearRowInvisible",e.prototype.clearRowInvisible),this.registerMethod("core","getVisibleRows",this.grid.getVisibleRows),this.registerEvent("core","rowsVisibleChanged"),this.registerEvent("core","rowsRendered"),this.registerEvent("core","scrollBegin"),this.registerEvent("core","scrollEnd"),this.registerEvent("core","canvasHeightChanged")};return h.prototype.suppressEvents=function(a,b){var c=this,d=angular.isArray(a)?a:[a],e=c.listeners.filter(function(a){return d.some(function(b){return a.handler===b})});e.forEach(function(a){a.dereg()}),b(),e.forEach(function(a){a.dereg=g(a.eventId,a.handler,c.grid,a._this)})},h.prototype.registerEvent=function(a,d){var e=this;e[a]||(e[a]={});var f=e[a];f.on||(f.on={},f.raise={});var h=e.grid.id+a+d;f.raise[d]=function(){b.$emit.apply(b,[h].concat(Array.prototype.slice.call(arguments)))},f.on[d]=function(b,f,i){if(null!==b&&"undefined"==typeof b.$on)return void c.logError("asked to listen on "+a+".on."+d+" but scope wasn't passed in the input parameters. It is legitimate to pass null, but you've passed something else, so you probably forgot to provide scope rather than did it deliberately, not registering");var j=g(h,f,e.grid,i),k={handler:f,dereg:j,eventId:h,scope:b,_this:i};e.listeners.push(k);var l=function(){k.dereg();var a=e.listeners.indexOf(k);e.listeners.splice(a,1)};return b&&b.$on("$destroy",function(){l()}),l}},h.prototype.registerEventsFromObject=function(a){var b=this,c=[];angular.forEach(a,function(a,b){var d={name:b,events:[]};angular.forEach(a,function(a,b){d.events.push(b)}),c.push(d)}),c.forEach(function(a){a.events.forEach(function(c){b.registerEvent(a.name,c)})})},h.prototype.registerMethod=function(a,b,d,e){this[a]||(this[a]={});var f=this[a];f[b]=c.createBoundedWrapper(e||this.grid,d)},h.prototype.registerMethodsFromObject=function(a,b){var c=this,d=[];angular.forEach(a,function(a,b){var c={name:b,methods:[]};angular.forEach(a,function(a,b){c.methods.push({name:b,fn:a})}),d.push(c)}),d.forEach(function(a){a.methods.forEach(function(d){c.registerMethod(a.name,d.name,d.fn,b)})})},h}])}(),function(){angular.module("ui.grid").factory("GridColumn",["gridUtil","uiGridConstants","i18nService",function(a,b,c){function d(a,c,d){var e=this;e.grid=d,e.uid=c,e.updateColumnDef(a,!0),e.aggregationValue=void 0,e.updateAggregationValue=function(){if(!e.aggregationType)return void(e.aggregationValue=void 0);var a=0,c=e.grid.getVisibleRows(),d=function(){var a=[];return c.forEach(function(b){var c=e.grid.getCellValue(b,e),d=Number(c);isNaN(d)||a.push(d)}),a};angular.isFunction(e.aggregationType)?e.aggregationValue=e.aggregationType(c,e):e.aggregationType===b.aggregationTypes.count?e.aggregationValue=e.grid.getVisibleRowCount():e.aggregationType===b.aggregationTypes.sum?(d().forEach(function(b){a+=b}),e.aggregationValue=a):e.aggregationType===b.aggregationTypes.avg?(d().forEach(function(b){a+=b}),a/=d().length,e.aggregationValue=a):e.aggregationType===b.aggregationTypes.min?e.aggregationValue=Math.min.apply(null,d()):e.aggregationType===b.aggregationTypes.max?e.aggregationValue=Math.max.apply(null,d()):e.aggregationValue=" "},this.getAggregationValue=function(){return e.aggregationValue}}return d.prototype.hideColumn=function(){this.colDef.visible=!1},d.prototype.setPropertyOrDefault=function(a,b,c){var d=this;"undefined"!=typeof a[b]&&a[b]?d[b]=a[b]:"undefined"!=typeof d[b]?d[b]=d[b]:d[b]=c?c:{}},d.prototype.updateColumnDef=function(c,d){var e=this;if(e.colDef=c,void 0===c.name)throw new Error("colDef.name is required for column at index "+e.grid.options.columnDefs.indexOf(c));if(e.displayName=void 0===c.displayName?a.readableColumnName(c.name):c.displayName,!angular.isNumber(e.width)||!e.hasCustomWidth||c.allowCustomWidthOverride){var f=c.width,g="Cannot parse column width '"+f+"' for column named '"+c.name+"'";if(e.hasCustomWidth=!1,angular.isString(f)||angular.isNumber(f))if(angular.isString(f))if(a.endsWith(f,"%")){var h=f.replace(/%/g,""),i=parseInt(h,10);if(isNaN(i))throw new Error(g); -e.width=f}else if(f.match(/^(\d+)$/))e.width=parseInt(f.match(/^(\d+)$/)[1],10);else{if(!f.match(/^\*+$/))throw new Error(g);e.width=f}else e.width=f;else e.width="*"}["minWidth","maxWidth"].forEach(function(a){var b=c[a],d="Cannot parse column "+a+" '"+b+"' for column named '"+c.name+"'";if(angular.isString(b)||angular.isNumber(b))if(angular.isString(b)){if(!b.match(/^(\d+)$/))throw new Error(d);e[a]=parseInt(b.match(/^(\d+)$/)[1],10)}else e[a]=b;else e[a]="minWidth"===a?30:9e3}),e.field=void 0===c.field?c.name:c.field,"string"!=typeof e.field&&a.logError("Field is not a string, this is likely to break the code, Field is: "+e.field),e.name=c.name,e.displayName=void 0===c.displayName?a.readableColumnName(c.name):c.displayName,e.aggregationType=angular.isDefined(c.aggregationType)?c.aggregationType:null,e.footerCellTemplate=angular.isDefined(c.footerCellTemplate)?c.footerCellTemplate:null,"undefined"==typeof c.cellTooltip||c.cellTooltip===!1?e.cellTooltip=!1:c.cellTooltip===!0?e.cellTooltip=function(a,b){return e.grid.getCellValue(a,b)}:"function"==typeof c.cellTooltip?e.cellTooltip=c.cellTooltip:e.cellTooltip=function(a,b){return b.colDef.cellTooltip},"undefined"==typeof c.headerTooltip||c.headerTooltip===!1?e.headerTooltip=!1:c.headerTooltip===!0?e.headerTooltip=function(a){return a.displayName}:"function"==typeof c.headerTooltip?e.headerTooltip=c.headerTooltip:e.headerTooltip=function(a){return a.colDef.headerTooltip},e.footerCellClass=c.footerCellClass,e.cellClass=c.cellClass,e.headerCellClass=c.headerCellClass,e.cellFilter=c.cellFilter?c.cellFilter:"",e.sortCellFiltered=c.sortCellFiltered?!0:!1,e.filterCellFiltered=c.filterCellFiltered?!0:!1,e.headerCellFilter=c.headerCellFilter?c.headerCellFilter:"",e.footerCellFilter=c.footerCellFilter?c.footerCellFilter:"",e.visible=a.isNullOrUndefined(c.visible)||c.visible,e.headerClass=c.headerClass,e.enableSorting="undefined"!=typeof c.enableSorting?c.enableSorting:!0,e.sortingAlgorithm=c.sortingAlgorithm,e.sortDirectionCycle="undefined"!=typeof c.sortDirectionCycle?c.sortDirectionCycle:[null,b.ASC,b.DESC],"undefined"==typeof e.suppressRemoveSort&&(e.suppressRemoveSort="undefined"!=typeof c.suppressRemoveSort?c.suppressRemoveSort:!1),e.enableFiltering="undefined"!=typeof c.enableFiltering?c.enableFiltering:!0,e.setPropertyOrDefault(c,"menuItems",[]),d&&e.setPropertyOrDefault(c,"sort");var j=[];c.filter?j.push(c.filter):c.filters?j=c.filters:j.push({}),d?(e.setPropertyOrDefault(c,"filter"),e.setPropertyOrDefault(c,"filters",j)):e.filters.length===j.length&&e.filters.forEach(function(a,b){"undefined"!=typeof j[b].placeholder&&(a.placeholder=j[b].placeholder),"undefined"!=typeof j[b].ariaLabel&&(a.ariaLabel=j[b].ariaLabel),"undefined"!=typeof j[b].flags&&(a.flags=j[b].flags),"undefined"!=typeof j[b].type&&(a.type=j[b].type),"undefined"!=typeof j[b].selectOptions&&(a.selectOptions=j[b].selectOptions)})},d.prototype.unsort=function(){this.sort={},this.grid.api.core.raise.sortChanged(this.grid,this.grid.getColumnSorting())},d.prototype.getColClass=function(a){var c=b.COL_CLASS_PREFIX+this.uid;return a?"."+c:c},d.prototype.isPinnedLeft=function(){return"left"===this.renderContainer},d.prototype.isPinnedRight=function(){return"right"===this.renderContainer},d.prototype.getColClassDefinition=function(){return" .grid"+this.grid.id+" "+this.getColClass(!0)+" { min-width: "+this.drawnWidth+"px; max-width: "+this.drawnWidth+"px; }"},d.prototype.getRenderContainer=function(){var a=this,b=a.renderContainer;return(null===b||""===b||void 0===b)&&(b="body"),a.grid.renderContainers[b]},d.prototype.showColumn=function(){this.colDef.visible=!0},d.prototype.getAggregationText=function(){var a=this;if(a.colDef.aggregationHideLabel)return"";if(a.colDef.aggregationLabel)return a.colDef.aggregationLabel;switch(a.colDef.aggregationType){case b.aggregationTypes.count:return c.getSafeText("aggregation.count");case b.aggregationTypes.sum:return c.getSafeText("aggregation.sum");case b.aggregationTypes.avg:return c.getSafeText("aggregation.avg");case b.aggregationTypes.min:return c.getSafeText("aggregation.min");case b.aggregationTypes.max:return c.getSafeText("aggregation.max");default:return""}},d.prototype.getCellTemplate=function(){var a=this;return a.cellTemplatePromise},d.prototype.getCompiledElementFn=function(){var a=this;return a.compiledElementFnDefer.promise},d}])}(),function(){angular.module("ui.grid").factory("GridOptions",["gridUtil","uiGridConstants",function(a,b){return{initialize:function(c){return c.onRegisterApi=c.onRegisterApi||angular.noop(),c.data=c.data||[],c.columnDefs=c.columnDefs||[],c.excludeProperties=c.excludeProperties||["$$hashKey"],c.enableRowHashing=c.enableRowHashing!==!1,c.rowIdentity=c.rowIdentity||function(b){return a.hashKey(b)},c.getRowIdentity=c.getRowIdentity||function(a){return a.$$hashKey},c.flatEntityAccess=c.flatEntityAccess===!0,c.showHeader="undefined"!=typeof c.showHeader?c.showHeader:!0,c.showHeader?c.headerRowHeight="undefined"!=typeof c.headerRowHeight?c.headerRowHeight:30:c.headerRowHeight=0,c.rowHeight=c.rowHeight||30,c.minRowsToShow="undefined"!=typeof c.minRowsToShow?c.minRowsToShow:10,c.showGridFooter=c.showGridFooter===!0,c.showColumnFooter=c.showColumnFooter===!0,c.columnFooterHeight="undefined"!=typeof c.columnFooterHeight?c.columnFooterHeight:30,c.gridFooterHeight="undefined"!=typeof c.gridFooterHeight?c.gridFooterHeight:30,c.columnWidth="undefined"!=typeof c.columnWidth?c.columnWidth:50,c.maxVisibleColumnCount="undefined"!=typeof c.maxVisibleColumnCount?c.maxVisibleColumnCount:200,c.virtualizationThreshold="undefined"!=typeof c.virtualizationThreshold?c.virtualizationThreshold:20,c.columnVirtualizationThreshold="undefined"!=typeof c.columnVirtualizationThreshold?c.columnVirtualizationThreshold:10,c.excessRows="undefined"!=typeof c.excessRows?c.excessRows:4,c.scrollThreshold="undefined"!=typeof c.scrollThreshold?c.scrollThreshold:4,c.excessColumns="undefined"!=typeof c.excessColumns?c.excessColumns:4,c.horizontalScrollThreshold="undefined"!=typeof c.horizontalScrollThreshold?c.horizontalScrollThreshold:2,c.aggregationCalcThrottle="undefined"!=typeof c.aggregationCalcThrottle?c.aggregationCalcThrottle:500,c.wheelScrollThrottle="undefined"!=typeof c.wheelScrollThrottle?c.wheelScrollThrottle:70,c.scrollDebounce="undefined"!=typeof c.scrollDebounce?c.scrollDebounce:300,c.enableSorting=c.enableSorting!==!1,c.enableFiltering=c.enableFiltering===!0,c.enableColumnMenus=c.enableColumnMenus!==!1,c.enableVerticalScrollbar="undefined"!=typeof c.enableVerticalScrollbar?c.enableVerticalScrollbar:b.scrollbars.ALWAYS,c.enableHorizontalScrollbar="undefined"!=typeof c.enableHorizontalScrollbar?c.enableHorizontalScrollbar:b.scrollbars.ALWAYS,c.enableMinHeightCheck=c.enableMinHeightCheck!==!1,c.minimumColumnSize="undefined"!=typeof c.minimumColumnSize?c.minimumColumnSize:10,c.rowEquality=c.rowEquality||function(a,b){return a===b},c.headerTemplate=c.headerTemplate||null,c.footerTemplate=c.footerTemplate||"ui-grid/ui-grid-footer",c.gridFooterTemplate=c.gridFooterTemplate||"ui-grid/ui-grid-grid-footer",c.rowTemplate=c.rowTemplate||"ui-grid/ui-grid-row",c.appScopeProvider=c.appScopeProvider||null,c}}}])}(),function(){angular.module("ui.grid").factory("GridRenderContainer",["gridUtil","uiGridConstants",function(a,b){function c(a,b,c){var d=this;d.name=a,d.grid=b,d.visibleRowCache=[],d.visibleColumnCache=[],d.renderedRows=[],d.renderedColumns=[],d.prevScrollTop=0,d.prevScrolltopPercentage=0,d.prevRowScrollIndex=0,d.prevScrollLeft=0,d.prevScrollleftPercentage=0,d.prevColumnScrollIndex=0,d.columnStyles="",d.viewportAdjusters=[],d.hasHScrollbar=!1,d.hasVScrollbar=!1,d.canvasHeightShouldUpdate=!0,d.$$canvasHeight=0,c&&angular.isObject(c)&&angular.extend(d,c),b.registerStyleComputation({priority:5,func:function(){return d.updateColumnWidths(),d.columnStyles}})}return c.prototype.reset=function(){this.visibleColumnCache.length=0,this.visibleRowCache.length=0,this.renderedRows.length=0,this.renderedColumns.length=0},c.prototype.containsColumn=function(a){return-1!==this.visibleColumnCache.indexOf(a)},c.prototype.minRowsToRender=function(){for(var a=this,b=0,c=0,d=a.getViewportHeight(),e=a.visibleRowCache.length-1;d>c&&e>=0;e--)c+=a.visibleRowCache[e].height,b++;return b},c.prototype.minColumnsToRender=function(){for(var a=this,b=this.getViewportWidth(),c=0,d=0,e=0;ed)d+=f.drawnWidth?f.drawnWidth:0,c++;else{for(var g=0,h=e;h>=e-c;h--)g+=a.visibleColumnCache[h].drawnWidth?a.visibleColumnCache[h].drawnWidth:0;b>g&&c++}}return c},c.prototype.getVisibleRowCount=function(){return this.visibleRowCache.length},c.prototype.registerViewportAdjuster=function(a){this.viewportAdjusters.push(a)},c.prototype.removeViewportAdjuster=function(a){var b=this.viewportAdjusters.indexOf(a);b>-1&&this.viewportAdjusters.splice(b,1)},c.prototype.getViewportAdjustment=function(){var a=this,b={height:0,width:0};return a.viewportAdjusters.forEach(function(a){b=a.call(this,b)}),b},c.prototype.getMargin=function(a){var b=this,c=0;return b.viewportAdjusters.forEach(function(b){var d=b.call(this,{height:0,width:0});d.side&&d.side===a&&(c+=-1*d.width)}),c},c.prototype.getViewportHeight=function(){var a=this,b=a.headerHeight?a.headerHeight:a.grid.headerHeight,c=a.grid.gridHeight-b-a.grid.footerHeight,d=a.getViewportAdjustment();return c+=d.height},c.prototype.getViewportWidth=function(){var a=this,b=a.grid.gridWidth,c=a.getViewportAdjustment();return b+=c.width},c.prototype.getHeaderViewportWidth=function(){var a=this.getViewportWidth();return a},c.prototype.getCanvasHeight=function(){var a=this;if(!a.canvasHeightShouldUpdate)return a.$$canvasHeight;var b=a.$$canvasHeight;return a.$$canvasHeight=0,a.visibleRowCache.forEach(function(b){a.$$canvasHeight+=b.height}),a.canvasHeightShouldUpdate=!1,a.grid.api.core.raise.canvasHeightChanged(b,a.$$canvasHeight),a.$$canvasHeight},c.prototype.getVerticalScrollLength=function(){return this.getCanvasHeight()-this.getViewportHeight()+this.grid.scrollbarHeight},c.prototype.getCanvasWidth=function(){var a=this,b=a.canvasWidth;return b},c.prototype.setRenderedRows=function(a){this.renderedRows.length=a.length;for(var b=0;b0&&(this.grid.scrollDirection=b.scrollDirection.DOWN),0>d&&(this.grid.scrollDirection=b.scrollDirection.UP);var e=this.getVerticalScrollLength();return c=a/e,c>1&&(c=1),0>c&&(c=0),this.adjustScrollVertical(a,c),c}},c.prototype.scrollHorizontal=function(a){var c=-1;if(a!==this.prevScrollLeft){var d=a-this.prevScrollLeft;d>0&&(this.grid.scrollDirection=b.scrollDirection.RIGHT),0>d&&(this.grid.scrollDirection=b.scrollDirection.LEFT);var e=this.canvasWidth-this.getViewportWidth();return c=0!==e?a/e:0,this.adjustScrollHorizontal(a,c),c}},c.prototype.adjustScrollVertical=function(a,b,c){(this.prevScrollTop!==a||c)&&(("undefined"==typeof a||void 0===a||null===a)&&(a=(this.getCanvasHeight()-this.getViewportHeight())*b),this.adjustRows(a,b,!1),this.prevScrollTop=a,this.prevScrolltopPercentage=b,this.grid.queueRefresh())},c.prototype.adjustScrollHorizontal=function(a,b,c){(this.prevScrollLeft!==a||c)&&(("undefined"==typeof a||void 0===a||null===a)&&(a=(this.getCanvasWidth()-this.getViewportWidth())*b),this.adjustColumns(a,b),this.prevScrollLeft=a,this.prevScrollleftPercentage=b,this.grid.queueRefresh())},c.prototype.adjustRows=function(a,b,c){var d=this,e=d.minRowsToRender(),f=d.visibleRowCache,g=f.length-e;"undefined"!=typeof b&&null!==b||!a||(b=a/d.getVerticalScrollLength());var h=Math.ceil(Math.min(g,g*b));h>g&&(h=g);var i=[];if(f.length>d.grid.options.virtualizationThreshold){if("undefined"!=typeof a&&null!==a){if(!d.grid.suppressParentScrollDown&&d.prevScrollToph)return;if(!d.grid.suppressParentScrollUp&&d.prevScrollTop>a&&h>d.prevRowScrollIndex-d.grid.options.scrollThreshold&&g>h)return}var j={},k={};j=Math.max(0,h-d.grid.options.excessRows),k=Math.min(f.length,h+e+d.grid.options.excessRows),i=[j,k]}else{var l=d.visibleRowCache.length;i=[0,Math.max(l,e+d.grid.options.excessRows)]}d.updateViewableRowRange(i),d.prevRowScrollIndex=h},c.prototype.adjustColumns=function(a,b){var c=this,d=c.minColumnsToRender(),e=c.visibleColumnCache,f=e.length-d;if(("undefined"==typeof b||null===b)&&a){var g=c.getCanvasWidth()-c.getViewportWidth();b=a/g}var h=Math.ceil(Math.min(f,f*b));h>f&&(h=f);var i=[];if(e.length>c.grid.options.columnVirtualizationThreshold&&c.getCanvasWidth()>c.getViewportWidth()){var j=Math.max(0,h-c.grid.options.excessColumns),k=Math.min(e.length,h+d+c.grid.options.excessColumns);i=[j,k]}else{var l=c.visibleColumnCache.length;i=[0,Math.max(l,d+c.grid.options.excessColumns)]}c.updateViewableColumnRange(i),c.prevColumnScrollIndex=h},c.prototype.updateViewableRowRange=function(a){var b=this.visibleRowCache.slice(a[0],a[1]);this.currentTopRow=a[0],this.setRenderedRows(b)},c.prototype.updateViewableColumnRange=function(a){var b=this.visibleColumnCache.slice(a[0],a[1]);this.currentFirstColumn=a[0],this.setRenderedColumns(b)},c.prototype.headerCellWrapperStyle=function(){var a=this;if(0!==a.currentFirstColumn){var b=a.columnOffset;return a.grid.isRTL()?{"margin-right":b+"px"}:{"margin-left":b+"px"}}return null},c.prototype.updateColumnWidths=function(){var b=this,c=[],d=0,e=0,f="",g=b.grid.getViewportWidth()-b.grid.scrollbarWidth,h=[];angular.forEach(b.grid.renderContainers,function(a,b){h=h.concat(a.visibleColumnCache)}),h.forEach(function(b,f){var h=0;b.visible&&(angular.isNumber(b.width)?(h=parseInt(b.width,10),e+=h,b.drawnWidth=h):a.endsWith(b.width,"%")?(h=parseInt(parseInt(b.width.replace(/%/g,""),10)/100*g),h>b.maxWidth&&(h=b.maxWidth),h0){var j=i/d;c.forEach(function(a){var b=parseInt(a.width.length*j,10);b>a.maxWidth&&(b=a.maxWidth),b0&&(a.drawnWidth++,e++,l--,m=!0)},l=g-e,m=!0;l>0&&m;)m=!1,c.forEach(k);var n=function(a){a.drawnWidth>a.minWidth&&o>0&&(a.drawnWidth--,e--,o--,m=!0)},o=e-g;for(m=!0;o>0&&m;)m=!1,c.forEach(n);var p=0;b.visibleColumnCache.forEach(function(a){a.visible&&(p+=a.drawnWidth)}),h.forEach(function(a){f+=a.getColClassDefinition()}),b.canvasWidth=p,this.columnStyles=f},c.prototype.needsHScrollbarPlaceholder=function(){return this.grid.options.enableHorizontalScrollbar&&!this.hasHScrollbar&&!this.grid.disableScrolling},c.prototype.getViewportStyle=function(){var a=this,c={};return a.hasHScrollbar=!1,a.hasVScrollbar=!1,a.grid.disableScrolling?(c["overflow-x"]="hidden",c["overflow-y"]="hidden",c):("body"===a.name?(a.hasHScrollbar=a.grid.options.enableHorizontalScrollbar!==b.scrollbars.NEVER,a.grid.isRTL()?a.grid.hasLeftContainerColumns()||(a.hasVScrollbar=a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER):a.grid.hasRightContainerColumns()||(a.hasVScrollbar=a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER)):"left"===a.name?a.hasVScrollbar=a.grid.isRTL()?a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER:!1:a.hasVScrollbar=a.grid.isRTL()?!1:a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER,c["overflow-x"]=a.hasHScrollbar?"scroll":"hidden",c["overflow-y"]=a.hasVScrollbar?"scroll":"hidden",c)},c}])}(),function(){angular.module("ui.grid").factory("GridRow",["gridUtil",function(a){function b(b,c,d){this.grid=d,this.entity=b,this.uid=a.nextUid(),this.visible=!0,this.$$height=d.options.rowHeight}return Object.defineProperty(b.prototype,"height",{get:function(){return this.$$height},set:function(a){a!==this.$$height&&(this.grid.updateCanvasHeight(),this.$$height=a)}}),b.prototype.getQualifiedColField=function(a){return"row."+this.getEntityQualifiedColField(a)},b.prototype.getEntityQualifiedColField=function(b){return a.preEval("entity."+b.field)},b.prototype.setRowInvisible=function(a){a&&a.setThisRowInvisible&&a.setThisRowInvisible("user")},b.prototype.clearRowInvisible=function(a){a&&a.clearThisRowInvisible&&a.clearThisRowInvisible("user")},b.prototype.setThisRowInvisible=function(a,b){this.invisibleReason||(this.invisibleReason={}),this.invisibleReason[a]=!0,this.evaluateRowVisibility(b)},b.prototype.clearThisRowInvisible=function(a,b){"undefined"!=typeof this.invisibleReason&&delete this.invisibleReason[a],this.evaluateRowVisibility(b)},b.prototype.evaluateRowVisibility=function(a){var b=!0;"undefined"!=typeof this.invisibleReason&&angular.forEach(this.invisibleReason,function(a,c){a&&(b=!1)}),("undefined"==typeof this.visible||this.visible!==b)&&(this.visible=b,a||(this.grid.queueGridRefresh(),this.grid.api.core.raise.rowsVisibleChanged(this)))},b}])}(),function(){"use strict";angular.module("ui.grid").factory("GridRowColumn",["$parse","$filter",function(a,b){var c=function d(a,b){if(!(this instanceof d))throw"Using GridRowColumn as a function insead of as a constructor. Must be called with `new` keyword";this.row=a,this.col=b};return c.prototype.getIntersectionValueRaw=function(){var b=a(this.row.getEntityQualifiedColField(this.col)),c=this.row;return b(c)},c.prototype.getIntersectionValueFiltered=function(){var a=this.getIntersectionValueRaw();if(this.col.cellFilter&&""!==this.col.cellFilter){var c=function(a){try{return b(a)}catch(c){return null}},d=c(this.col.cellFilter);if(d)a=d(a);else{var e,f=/([^:]*):([^:]*):?([\s\S]+)?/;null!==(e=f.exec(this.col.cellFilter))&&(a=b(e[1])(a,e[2],e[3]))}}return a},c}])}(),function(){angular.module("ui.grid").factory("ScrollEvent",["gridUtil",function(a){function b(b,c,d,e){var f=this;if(!b)throw new Error("grid argument is required");f.grid=b,f.source=e,f.withDelay=!0,f.sourceRowContainer=c,f.sourceColContainer=d,f.newScrollLeft=null,f.newScrollTop=null,f.x=null,f.y=null,f.verticalScrollLength=-9999999,f.horizontalScrollLength=-999999,f.fireThrottledScrollingEvent=a.throttle(function(a){f.grid.scrollContainers(a,f)},f.grid.options.wheelScrollThrottle,{trailing:!0})}return b.prototype.getNewScrollLeft=function(b,c){var d=this;if(!d.newScrollLeft){var e,f=b.getCanvasWidth()-b.getViewportWidth(),g=a.normalizeScrollLeft(c,d.grid);if("undefined"!=typeof d.x.percentage&&void 0!==d.x.percentage)e=d.x.percentage;else{if("undefined"==typeof d.x.pixels||void 0===d.x.pixels)throw new Error("No percentage or pixel value provided for scroll event X axis");e=d.x.percentage=(g+d.x.pixels)/f}return Math.max(0,e*f)}return d.newScrollLeft},b.prototype.getNewScrollTop=function(a,b){var c=this;if(!c.newScrollTop){var d,e=a.getVerticalScrollLength(),f=b[0].scrollTop;if("undefined"!=typeof c.y.percentage&&void 0!==c.y.percentage)d=c.y.percentage;else{if("undefined"==typeof c.y.pixels||void 0===c.y.pixels)throw new Error("No percentage or pixel value provided for scroll event Y axis");d=c.y.percentage=(f+c.y.pixels)/e}return Math.max(0,d*e)}return c.newScrollTop},b.prototype.atTop=function(a){return this.y&&(0===this.y.percentage||this.verticalScrollLength<0)&&0===a},b.prototype.atBottom=function(a){return this.y&&(1===this.y.percentage||0===this.verticalScrollLength)&&a>0},b.prototype.atLeft=function(a){return this.x&&(0===this.x.percentage||this.horizontalScrollLength<0)&&0===a},b.prototype.atRight=function(a){return this.x&&(1===this.x.percentage||0===this.horizontalScrollLength)&&a>0},b.Sources={ViewPortScroll:"ViewPortScroll",RenderContainerMouseWheel:"RenderContainerMouseWheel",RenderContainerTouchMove:"RenderContainerTouchMove",Other:99},b}])}(),function(){"use strict";angular.module("ui.grid").service("gridClassFactory",["gridUtil","$q","$compile","$templateCache","uiGridConstants","Grid","GridColumn","GridRow",function(a,b,c,d,e,f,g,h){var i={createGrid:function(d){d="undefined"!=typeof d?d:{},d.id=a.newId();var e=new f(d);if(e.options.rowTemplate){var g=b.defer();e.getRowTemplateFn=g.promise,a.getTemplate(e.options.rowTemplate).then(function(a){var b=c(a);g.resolve(b)},function(a){throw new Error("Couldn't fetch/use row template '"+e.options.rowTemplate+"'")})}return e.registerColumnBuilder(i.defaultColumnBuilder),e.registerRowBuilder(i.rowTemplateAssigner),e.registerRowsProcessor(function(a){return a.forEach(function(a){a.evaluateRowVisibility(!0)},50),a}),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.visible=!0}),a},50),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.colDef.visible===!1&&(a.visible=!1)}),a},50),e.registerRowsProcessor(e.searchRows,100),e.options.externalSort&&angular.isFunction(e.options.externalSort)?e.registerRowsProcessor(e.options.externalSort,200):e.registerRowsProcessor(e.sortByColumn,200),e},defaultColumnBuilder:function(c,d,f){var g=[],h=function(b,f,h,i,j){c[b]?d[f]=c[b]:d[f]=h,g.push(a.getTemplate(d[f]).then(function(a){angular.isFunction(a)&&(a=a());var c="cellTooltip"===j?"col.cellTooltip(row,col)":"col.headerTooltip(col)";j&&d[j]===!1?a=a.replace(e.TOOLTIP,""):j&&d[j]&&(a=a.replace(e.TOOLTIP,'title="{{'+c+' CUSTOM_FILTERS }}"')),i?d[b]=a.replace(e.CUSTOM_FILTERS,function(){return d[i]?"|"+d[i]:""}):d[b]=a},function(a){throw new Error("Couldn't fetch/use colDef."+b+" '"+c[b]+"'")}))};return h("cellTemplate","providedCellTemplate","ui-grid/uiGridCell","cellFilter","cellTooltip"),d.cellTemplatePromise=g[0],h("headerCellTemplate","providedHeaderCellTemplate","ui-grid/uiGridHeaderCell","headerCellFilter","headerTooltip"),h("footerCellTemplate","providedFooterCellTemplate","ui-grid/uiGridFooterCell","footerCellFilter"),h("filterHeaderTemplate","providedFilterHeaderTemplate","ui-grid/ui-grid-filter"),d.compiledElementFnDefer=b.defer(),b.all(g)},rowTemplateAssigner:function(d){var e=this;if(d.rowTemplate){var f=b.defer();d.getRowTemplateFn=f.promise,a.getTemplate(d.rowTemplate).then(function(a){var b=c(a);f.resolve(b)},function(a){throw new Error("Couldn't fetch/use row template '"+d.rowTemplate+"'")})}else d.rowTemplate=e.options.rowTemplate,d.getRowTemplateFn=e.getRowTemplateFn;return d.getRowTemplateFn}};return i}])}(),function(){function a(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var b=angular.module("ui.grid");b.service("rowSearcher",["gridUtil","uiGridConstants",function(b,c){var d=c.filter.CONTAINS,e={};return e.getTerm=function(a){if("undefined"==typeof a.term)return a.term;var b=a.term;return"string"==typeof b&&(b=b.trim()),b},e.stripTerm=function(b){var c=e.getTerm(b);return"string"==typeof c?a(c.replace(/(^\*|\*$)/g,"")):c},e.guessCondition=function(a){if("undefined"==typeof a.term||!a.term)return d;var b=e.getTerm(a);if(/\*/.test(b)){var c="";a.flags&&a.flags.caseSensitive||(c+="i");var f=b.replace(/(\\)?\*/g,function(a,b){return b?a:"[\\s\\S]*?"});return new RegExp("^"+f+"$",c)}return d},e.setupFilters=function(a){for(var d=[],f=a.length,g=0;f>g;g++){var h=a[g];if(h.noTerm||!b.isNullOrUndefined(h.term)){var i={},j="";h.flags&&h.flags.caseSensitive||(j+="i"),b.isNullOrUndefined(h.term)||(i.term=e.stripTerm(h)),h.condition?i.condition=h.condition:i.condition=e.guessCondition(h),i.flags=angular.extend({caseSensitive:!1,date:!1},h.flags),i.condition===c.filter.STARTS_WITH&&(i.startswithRE=new RegExp("^"+i.term,j)),i.condition===c.filter.ENDS_WITH&&(i.endswithRE=new RegExp(i.term+"$",j)),i.condition===c.filter.CONTAINS&&(i.containsRE=new RegExp(i.term,j)),i.condition===c.filter.EXACT&&(i.exactRE=new RegExp("^"+i.term+"$",j)),d.push(i)}}return d},e.runColumnFilter=function(a,b,d,e){var f,g=typeof e.condition,h=e.term;if(f=d.filterCellFiltered?a.getCellDisplayValue(b,d):a.getCellValue(b,d),e.condition instanceof RegExp)return e.condition.test(f);if("function"===g)return e.condition(h,f,b,d);if(e.startswithRE)return e.startswithRE.test(f);if(e.endswithRE)return e.endswithRE.test(f);if(e.containsRE)return e.containsRE.test(f);if(e.exactRE)return e.exactRE.test(f);if(e.condition===c.filter.NOT_EQUAL){var i=new RegExp("^"+h+"$");return!i.exec(f)}if("number"==typeof f&&"string"==typeof h){var j=parseFloat(h.replace(/\\\./,".").replace(/\\\-/,"-"));isNaN(j)||(h=j)}return e.flags.date===!0&&(f=new Date(f),h=new Date(h.replace(/\\/g,""))),e.condition===c.filter.GREATER_THAN?f>h:e.condition===c.filter.GREATER_THAN_OR_EQUAL?f>=h:e.condition===c.filter.LESS_THAN?h>f:e.condition===c.filter.LESS_THAN_OR_EQUAL?h>=f:!0},e.searchColumn=function(a,b,c,d){if(a.options.useExternalFiltering)return!0;for(var f=d.length,g=0;f>g;g++){var h=d[g],i=e.runColumnFilter(a,b,c,h);if(!i)return!1}return!0},e.search=function(a,c,d){if(c){if(!a.options.enableFiltering)return c;for(var f=[],g=d.length,h=function(a){var c=!1;return a.forEach(function(a){(!b.isNullOrUndefined(a.term)&&""!==a.term||a.noTerm)&&(c=!0)}),c},i=0;g>i;i++){var j=d[i];"undefined"!=typeof j.filters&&h(j.filters)&&f.push({col:j,filters:e.setupFilters(j.filters)})}if(f.length>0){for(var k=function(a,b,c,d){b.visible&&!e.searchColumn(a,b,c,d)&&(b.visible=!1)},l=function(a,b){for(var d=c.length,e=0;d>e;e++)k(a,c[e],b.col,b.filters)},m=f.length,n=0;m>n;n++)l(a,f[n]);a.api.core.raise.rowsVisibleChanged&&a.api.core.raise.rowsVisibleChanged()}return c}},e}])}(),function(){var a=angular.module("ui.grid");a.service("rowSorter",["$parse","uiGridConstants",function(a,b){var c="("+b.CURRENCY_SYMBOLS.map(function(a){return"\\"+a}).join("|")+")?",d=(new RegExp("^[-+]?"+c+"[\\d,.]+"+c+"%?$"),{colSortFnCache:{}});return d.guessSortFn=function(a){switch(a){case"number":return d.sortNumber;case"numberStr":return d.sortNumberStr;case"boolean":return d.sortBool;case"string":return d.sortAlpha;case"date":return d.sortDate;case"object":return d.basicSort;default:throw new Error("No sorting function found for type:"+a)}},d.handleNulls=function(a,b){if(!a&&0!==a&&a!==!1||!b&&0!==b&&b!==!1){if(!a&&0!==a&&a!==!1&&!b&&0!==b&&b!==!1)return 0;if(!a&&0!==a&&a!==!1)return 1;if(!b&&0!==b&&b!==!1)return-1}return null},d.basicSort=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a===b?0:b>a?-1:1},d.sortNumber=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a-b},d.sortNumberStr=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e,f,g=!1,h=!1;return e=parseFloat(a.replace(/[^0-9.-]/g,"")),isNaN(e)&&(g=!0),f=parseFloat(b.replace(/[^0-9.-]/g,"")),isNaN(f)&&(h=!0),g&&h?0:g?1:h?-1:e-f},d.sortAlpha=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e=a.toString().toLowerCase(),f=b.toString().toLowerCase();return e===f?0:e.localeCompare(f)},d.sortDate=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;a instanceof Date||(a=new Date(a)),b instanceof Date||(b=new Date(b));var e=a.getTime(),f=b.getTime();return e===f?0:f>e?-1:1},d.sortBool=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a&&b?0:a||b?a?1:-1:0},d.getSortFn=function(a,b,c){var e;return d.colSortFnCache[b.colDef.name]?e=d.colSortFnCache[b.colDef.name]:void 0!==b.sortingAlgorithm?(e=b.sortingAlgorithm,d.colSortFnCache[b.colDef.name]=b.sortingAlgorithm):b.sortCellFiltered&&b.cellFilter?(e=d.sortAlpha,d.colSortFnCache[b.colDef.name]=e):(e=d.guessSortFn(b.colDef.type),e?d.colSortFnCache[b.colDef.name]=e:e=d.sortAlpha),e},d.prioritySort=function(a,b){return void 0!==a.sort.priority&&void 0!==b.sort.priority?a.sort.priorityf;f+=2){var i=h[f];if("margin"===c){var j=parseFloat(e[c+i]);isNaN(j)||(g+=j)}if(d){if("content"===c){var k=parseFloat(e["padding"+i]);isNaN(k)||(g-=k)}if("margin"!==c){var l=parseFloat(e["border"+i+"Width"]);isNaN(l)||(g-=l)}}else{var m=parseFloat(e["padding"+i]);if(isNaN(m)||(g+=m),"padding"!==c){var n=parseFloat(e["border"+i+"Width"]);isNaN(n)||(g+=n)}}}return g}function c(c,d,e){var f,h=!0,i=a(c),j="border-box"===i.boxSizing;if(0>=f||null==f){if(f=i[d],(0>f||null==f)&&(f=c.style[d]),g.test(f))return f;h=j&&!0,f=parseFloat(f)||0}var k=f+b(c,d,e||(j?"border":"content"),h,i);return k}function d(b){b=angular.element(b)[0];var c=b.parentElement;return c||(c=document.getElementsByTagName("body")[0]),parseInt(a(c).fontSize)||parseInt(a(b).fontSize)||16}var e,f=angular.module("ui.grid");"function"!=typeof Function.prototype.bind&&(e=function(){var a=Array.prototype.slice;return function(b){var c=this,d=a.call(arguments,1);return d.length?function(){return arguments.length?c.apply(b,d.concat(a.call(arguments))):c.apply(b,d)}:function(){return arguments.length?c.apply(b,arguments):c.call(b)}}});var g=new RegExp("^("+/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source+")(?!px)[a-z%]+$","i"),h=/^(block|none|table(?!-c[ea]).+)/,i={position:"absolute",visibility:"hidden",display:"block"},j=["0","0","0","0"],k="uiGrid-";f.service("gridUtil",["$log","$window","$document","$http","$templateCache","$timeout","$interval","$injector","$q","$interpolate","uiGridConstants",function(f,g,l,m,n,o,p,q,r,s,t){function u(a,b){var c=angular.element(this),d=0,e=0,f=0,g=0;if(b.originalEvent&&(b=b.originalEvent),"detail"in b&&(f=-1*b.detail),"wheelDelta"in b&&(f=b.wheelDelta),"wheelDeltaY"in b&&(f=b.wheelDeltaY),"wheelDeltaX"in b&&(e=-1*b.wheelDeltaX),"axis"in b&&b.axis===b.HORIZONTAL_AXIS&&(e=-1*f,f=0),d=0===f?e:f,"deltaY"in b&&(f=-1*b.deltaY,d=f),"deltaX"in b&&(e=b.deltaX,0===f&&(d=-1*e)),0!==f||0!==e){if(1===b.deltaMode){var h=c.data("mousewheel-line-height");d*=h,f*=h,e*=h}else if(2===b.deltaMode){var i=c.data("mousewheel-page-height");d*=i,f*=i,e*=i}g=Math.max(Math.abs(f),Math.abs(e)),(!z||z>g)&&(z=g,w(b,g)&&(z/=40)),d=Math[d>=1?"floor":"ceil"](d/z),e=Math[e>=1?"floor":"ceil"](e/z),f=Math[f>=1?"floor":"ceil"](f/z),b.deltaMode=0;var j={originalEvent:b,deltaX:e,deltaY:f,deltaFactor:z,preventDefault:function(){b.preventDefault()},stopPropagation:function(){b.stopPropagation()}};y&&clearTimeout(y),y=setTimeout(v,200),a.call(c[0],j)}}function v(){z=null}function w(a,b){return"mousewheel"===a.type&&b%120===0}var x={augmentWidthOrHeight:b,getStyles:a,createBoundedWrapper:function(a,b){return function(){return b.apply(a,arguments)}},readableColumnName:function(a){return"undefined"==typeof a||void 0===a||null===a?a:("string"!=typeof a&&(a=String(a)),a.replace(/_+/g," ").replace(/^[A-Z]+$/,function(a){return angular.lowercase(angular.uppercase(a.charAt(0))+a.slice(1))}).replace(/([\w\u00C0-\u017F]+)/g,function(a){return angular.uppercase(a.charAt(0))+a.slice(1)}).replace(/(\w+?(?=[A-Z]))/g,"$1 "))},getColumnsFromData:function(a,b){var c=[];if(!a||"undefined"==typeof a[0]||void 0===a[0])return[];angular.isUndefined(b)&&(b=[]);var d=a[0];return angular.forEach(d,function(a,d){-1===b.indexOf(d)&&c.push({ -name:d})}),c},newId:function(){var a=(new Date).getTime();return function(){return a+=1}}(),getTemplate:function(a){if(n.get(a))return x.postProcessTemplate(n.get(a));if(a.hasOwnProperty("then"))return a.then(x.postProcessTemplate);try{if(angular.element(a).length>0)return r.when(a).then(x.postProcessTemplate)}catch(b){}return x.logDebug("fetching url",a),m({method:"GET",url:a}).then(function(b){var c=b.data.trim();return n.put(a,c),c},function(b){throw new Error("Could not get template "+a+": "+b)}).then(x.postProcessTemplate)},postProcessTemplate:function(a){var b=s.startSymbol(),c=s.endSymbol();return("{{"!==b||"}}"!==c)&&(a=a.replace(/\{\{/g,b),a=a.replace(/\}\}/g,c)),r.when(a)},guessType:function(a){var b=typeof a;switch(b){case"number":case"boolean":case"string":return b;default:return angular.isDate(a)?"date":"object"}},elementWidth:function(a){},elementHeight:function(a){},getScrollbarWidth:function(){var a=document.createElement("div");a.style.visibility="hidden",a.style.width="100px",a.style.msOverflowStyle="scrollbar",document.body.appendChild(a);var b=a.offsetWidth;a.style.overflow="scroll";var c=document.createElement("div");c.style.width="100%",a.appendChild(c);var d=c.offsetWidth;return a.parentNode.removeChild(a),b-d},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},fakeElement:function(a,b,c,d){var e,f,g=angular.element(a).clone()[0];for(f in b)g.style[f]=b[f];return angular.element(document.body).append(g),e=c.call(g,g),angular.element(g).remove(),e},normalizeWheelEvent:function(a){var b,c,d,e=a||window.event,f=([].slice.call(arguments,1),0),g=0,h=0,i=0,j=0;return e.originalEvent&&(e=e.originalEvent),e.wheelDelta&&(f=e.wheelDelta),e.detail&&(f=-1*e.detail),h=f,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(h=0,g=-1*f),e.deltaY&&(h=-1*e.deltaY,f=h),e.deltaX&&(g=e.deltaX,f=-1*g),void 0!==e.wheelDeltaY&&(h=e.wheelDeltaY),void 0!==e.wheelDeltaX&&(g=e.wheelDeltaX),i=Math.abs(f),(!b||b>i)&&(b=i),j=Math.max(Math.abs(h),Math.abs(g)),(!c||c>j)&&(c=j),d=f>0?"floor":"ceil",f=Math[d](f/b),g=Math[d](g/c),h=Math[d](h/c),{delta:f,deltaX:g,deltaY:h}},isTouchEnabled:function(){var a;return("ontouchstart"in g||g.DocumentTouch&&l instanceof DocumentTouch)&&(a=!0),a},isNullOrUndefined:function(a){return void 0===a||null===a?!0:!1},endsWith:function(a,b){return a&&b&&"string"==typeof a?-1!==a.indexOf(b,a.length-b.length):!1},arrayContainsObjectWithProperty:function(a,b,c){var d=!1;return angular.forEach(a,function(a){a[b]===c&&(d=!0)}),d},numericAndNullSort:function(a,b){return null===a?1:null===b?-1:null===a&&null===b?0:a-b},disableAnimations:function(a){var b;try{b=q.get("$animate"),angular.version.major>1||1===angular.version.major&&angular.version.minor>=4?b.enabled(a,!1):b.enabled(!1,a)}catch(c){}},enableAnimations:function(a){var b;try{return b=q.get("$animate"),angular.version.major>1||1===angular.version.major&&angular.version.minor>=4?b.enabled(a,!0):b.enabled(!0,a),b}catch(c){}},nextUid:function(){for(var a,b=j.length;b;){if(b--,a=j[b].charCodeAt(0),57===a)return j[b]="A",k+j.join("");if(90!==a)return j[b]=String.fromCharCode(a+1),k+j.join("");j[b]="0"}return j.unshift("0"),k+j.join("")},hashKey:function(a){var b,c=typeof a;return"object"===c&&null!==a?"function"==typeof(b=a.$$hashKey)?b=a.$$hashKey():"undefined"!=typeof a.$$hashKey&&a.$$hashKey?b=a.$$hashKey:void 0===b&&(b=a.$$hashKey=x.nextUid()):b=a,c+":"+b},resetUids:function(){j=["0","0","0"]},logError:function(a){t.LOG_ERROR_MESSAGES&&f.error(a)},logWarn:function(a){t.LOG_WARN_MESSAGES&&f.warn(a)},logDebug:function(){t.LOG_DEBUG_MESSAGES&&f.debug.apply(f,arguments)}};x.focus={queue:[],byId:function(a,b){this._purgeQueue();var c=o(function(){var c=(b&&b.id?b.id+"-":"")+a,d=g.document.getElementById(c);d?d.focus():x.logWarn("[focus.byId] Element id "+c+" was not found.")});return this.queue.push(c),c},byElement:function(a){if(!angular.isElement(a))return x.logWarn("Trying to focus on an element that isn't an element."),r.reject("not-element");a=angular.element(a),this._purgeQueue();var b=o(function(){a&&a[0].focus()});return this.queue.push(b),b},bySelector:function(a,b,c){var d=this;if(!angular.isElement(a))throw new Error("The parent element is not an element.");a=angular.element(a);var e=function(){var c=a[0].querySelector(b);return d.byElement(c)};if(this._purgeQueue(),c){var f=o(e);return this.queue.push(o(e)),f}return e()},_purgeQueue:function(){this.queue.forEach(function(a){o.cancel(a)}),this.queue=[]}},["width","height"].forEach(function(b){var d=angular.uppercase(b.charAt(0))+b.substr(1);x["element"+d]=function(d,e){var f=d;if(f&&"undefined"!=typeof f.length&&f.length&&(f=d[0]),f){var g=a(f);return 0===f.offsetWidth&&h.test(g.display)?x.swap(f,i,function(){return c(f,b,e)}):c(f,b,e)}return null},x["outerElement"+d]=function(a,b){return a?x["element"+d].call(this,a,b?"margin":"border"):null}}),x.closestElm=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c;["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].some(function(a){return"function"==typeof document.body[a]?(c=a,!0):!1});for(var d;null!==a;){if(d=a.parentElement,null!==d&&d[c](b))return d;a=d}return null},x.type=function(a){var b=Function.prototype.toString.call(a.constructor);return b.match(/function (.*?)\(/)[1]},x.getBorderSize=function(b,c){"undefined"!=typeof b.length&&b.length&&(b=b[0]);var d=a(b);c=c?"border"+c.charAt(0).toUpperCase()+c.slice(1):"border",c+="Width";var e=parseInt(d[c],10);return isNaN(e)?0:e},x.detectBrowser=function(){var a=g.navigator.userAgent,b={chrome:/chrome/i,safari:/safari/i,firefox:/firefox/i,ie:/internet explorer|trident\//i};for(var c in b)if(b[c].test(a))return c;return"unknown"},x.rtlScrollType=function B(){if(B.type)return B.type;var a=angular.element('
            A
            ')[0],b="reverse";return document.body.appendChild(a),a.scrollLeft>0?b="default":(a.scrollLeft=1,0===a.scrollLeft&&(b="negative")),angular.element(a).remove(),B.type=b,b},x.normalizeScrollLeft=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c=a.scrollLeft;if(b.isRTL())switch(x.rtlScrollType()){case"default":return a.scrollWidth-c-a.clientWidth;case"negative":return Math.abs(c);case"reverse":return c}return c},x.denormalizeScrollLeft=function(a,b,c){if("undefined"!=typeof a.length&&a.length&&(a=a[0]),c.isRTL())switch(x.rtlScrollType()){case"default":var d=a.scrollWidth-a.clientWidth;return d-b;case"negative":return-1*b;case"reverse":return b}return b},x.preEval=function(a){var b=t.BRACKET_REGEXP.exec(a);if(b)return(b[1]?x.preEval(b[1]):b[1])+b[2]+(b[3]?x.preEval(b[3]):b[3]);a=a.replace(t.APOS_REGEXP,"\\'");var c=a.split(t.DOT_REGEXP),d=[c.shift()];return angular.forEach(c,function(a){d.push(a.replace(t.FUNC_REGEXP,"']$1"))}),d.join("['")},x.debounce=function(a,b,c){function d(){g=this,f=arguments;var d=function(){e=null,c||(h=a.apply(g,f))},i=c&&!e;return e&&o.cancel(e),e=o(d,b),i&&(h=a.apply(g,f)),h}var e,f,g,h;return d.cancel=function(){o.cancel(e),e=null},d},x.throttle=function(a,b,c){function d(b){g=+new Date,a.apply(e,f),p(function(){h=null},0,1)}c=c||{};var e,f,g=0,h=null;return function(){if(e=this,f=arguments,null===h){var a=+new Date-g;a>b?d():c.trailing&&(h=p(d,b-a,1))}}},x.on={},x.off={},x._events={},x.addOff=function(a){x.off[a]=function(b,c){var d=x._events[a].indexOf(c);d>0&&x._events[a].removeAt(d)}};var y,z,A="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];return x.on.mousewheel=function(a,b){if(a&&b){var c=angular.element(a);c.data("mousewheel-line-height",d(c)),c.data("mousewheel-page-height",x.elementHeight(c)),c.data("mousewheel-callbacks")||c.data("mousewheel-callbacks",{});var f=c.data("mousewheel-callbacks");f[b]=(Function.prototype.bind||e).call(u,c[0],b);for(var g=A.length;g;)c.on(A[--g],f[b])}},x.off.mousewheel=function(a,b){var c=angular.element(a),d=c.data("mousewheel-callbacks"),e=d[b];if(e)for(var f=A.length;f;)c.off(A[--f],e);delete d[b],0===Object.keys(d).length&&(c.removeData("mousewheel-line-height"),c.removeData("mousewheel-page-height"),c.removeData("mousewheel-callbacks"))},x}]),f.filter("px",function(){return function(a){return a.match(/^[\d\.]+$/)?a+"px":a}})}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){var b={aggregate:{label:"položky"},groupPanel:{description:"Přesuňte záhlaví zde pro vytvoření skupiny dle sloupce."},search:{placeholder:"Hledat...",showingItems:"Zobrazuji položky:",selectedItems:"Vybrané položky:",totalItems:"Celkem položek:",size:"Velikost strany:",first:"První strana",next:"Další strana",previous:"Předchozí strana",last:"Poslední strana"},menu:{text:"Vyberte sloupec:"},sort:{ascending:"Seřadit od A-Z",descending:"Seřadit od Z-A",remove:"Odebrat seřazení"},column:{hide:"Schovat sloupec"},aggregation:{count:"celkem řádků: ",sum:"celkem: ",avg:"avg: ",min:"min.: ",max:"max.: "},pinning:{pinLeft:"Zamknout vlevo",pinRight:"Zamknout vpravo",unpin:"Odemknout"},gridMenu:{columns:"Sloupce:",importerTitle:"Importovat soubor",exporterAllAsCsv:"Exportovat všechna data do csv",exporterVisibleAsCsv:"Exportovat viditelná data do csv",exporterSelectedAsCsv:"Exportovat vybraná data do csv",exporterAllAsPdf:"Exportovat všechna data do pdf",exporterVisibleAsPdf:"Exportovat viditelná data do pdf",exporterSelectedAsPdf:"Exportovat vybraná data do pdf",clearAllFilters:"Odstranit všechny filtry"},importer:{noHeaders:"Názvy sloupců se nepodařilo získat, obsahuje soubor záhlaví?",noObjects:"Data se nepodařilo zpracovat, obsahuje soubor řádky mimo záhlaví?",invalidCsv:"Soubor nelze zpracovat, jedná se o CSV?",invalidJson:"Soubor nelze zpracovat, je to JSON?",jsonNotArray:"Soubor musí obsahovat json. Ukončuji.."},pagination:{sizes:"položek na stránku",totalItems:"položek"},grouping:{group:"Seskupit",ungroup:"Odebrat seskupení",aggregate_count:"Agregace: Count",aggregate_sum:"Agregace: Sum",aggregate_max:"Agregace: Max",aggregate_min:"Agregace: Min",aggregate_avg:"Agregace: Avg",aggregate_remove:"Agregace: Odebrat"}};return a.add("cs",b),a.add("cz",b),a.add("cs-cz",b),a.add("cs-CZ",b),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("da",{aggregate:{label:"artikler"},groupPanel:{description:"Grupér rækker udfra en kolonne ved at trække dens overskift hertil."},search:{placeholder:"Søg...",showingItems:"Viste rækker:",selectedItems:"Valgte rækker:",totalItems:"Rækker totalt:",size:"Side størrelse:",first:"Første side",next:"Næste side",previous:"Forrige side",last:"Sidste side"},menu:{text:"Vælg kolonner:"},sort:{ascending:"Sorter stigende",descending:"Sorter faldende",none:"Sorter ingen",remove:"Fjern sortering"},column:{hide:"Skjul kolonne"},aggregation:{count:"antal rækker: ",sum:"sum: ",avg:"gns: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("de",{headerCell:{aria:{defaultFilterLabel:"Filter für Spalte",removeFilter:"Filter löschen",columnMenuButtonLabel:"Spaltenmenü"},priority:"Priorität:",filterLabel:"Filter für Spalte: "},aggregate:{label:"Eintrag"},groupPanel:{description:"Ziehen Sie eine Spaltenüberschrift hierhin, um nach dieser Spalte zu gruppieren."},search:{placeholder:"Suche...",showingItems:"Zeige Einträge:",selectedItems:"Ausgewählte Einträge:",totalItems:"Einträge gesamt:",size:"Einträge pro Seite:",first:"Erste Seite",next:"Nächste Seite",previous:"Vorherige Seite",last:"Letzte Seite"},menu:{text:"Spalten auswählen:"},sort:{ascending:"aufsteigend sortieren",descending:"absteigend sortieren",none:"keine Sortierung",remove:"Sortierung zurücksetzen"},column:{hide:"Spalte ausblenden"},aggregation:{count:"Zeilen insgesamt: ",sum:"gesamt: ",avg:"Durchschnitt: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Links anheften",pinRight:"Rechts anheften",unpin:"Lösen"},columnMenu:{close:"Schließen"},gridMenu:{aria:{buttonLabel:"Tabellenmenü"},columns:"Spalten:",importerTitle:"Datei importieren",exporterAllAsCsv:"Alle Daten als CSV exportieren",exporterVisibleAsCsv:"sichtbare Daten als CSV exportieren",exporterSelectedAsCsv:"markierte Daten als CSV exportieren",exporterAllAsPdf:"Alle Daten als PDF exportieren",exporterVisibleAsPdf:"sichtbare Daten als PDF exportieren",exporterSelectedAsPdf:"markierte Daten als CSV exportieren",clearAllFilters:"Alle Filter zurücksetzen"},importer:{noHeaders:"Es konnten keine Spaltennamen ermittelt werden. Sind in der Datei Spaltendefinitionen enthalten?",noObjects:"Es konnten keine Zeileninformationen gelesen werden, Sind in der Datei außer den Spaltendefinitionen auch Daten enthalten?",invalidCsv:"Die Datei konnte nicht eingelesen werden, ist es eine gültige CSV-Datei?",invalidJson:"Die Datei konnte nicht eingelesen werden. Enthält sie gültiges JSON?",jsonNotArray:"Die importierte JSON-Datei muß ein Array enthalten. Breche Import ab."},pagination:{aria:{pageToFirst:"Zum Anfang",pageBack:"Seite zurück",pageSelected:"Ausgwählte Seite",pageForward:"Seite vor",pageToLast:"Zum Ende"},sizes:"Einträge pro Seite",totalItems:"Einträge",through:"bis",of:"von"},grouping:{group:"Gruppieren",ungroup:"Gruppierung aufheben",aggregate_count:"Agg: Anzahl",aggregate_sum:"Agg: Summe",aggregate_max:"Agg: Maximum",aggregate_min:"Agg: Minimum",aggregate_avg:"Agg: Mittelwert",aggregate_remove:"Aggregation entfernen"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("en",{headerCell:{aria:{defaultFilterLabel:"Filter for column",removeFilter:"Remove Filter",columnMenuButtonLabel:"Column Menu"},priority:"Priority:",filterLabel:"Filter for column: "},aggregate:{label:"items"},groupPanel:{description:"Drag a column header here and drop it to group by that column."},search:{placeholder:"Search...",showingItems:"Showing Items:",selectedItems:"Selected Items:",totalItems:"Total Items:",size:"Page Size:",first:"First Page",next:"Next Page",previous:"Previous Page",last:"Last Page"},menu:{text:"Choose Columns:"},sort:{ascending:"Sort Ascending",descending:"Sort Descending",none:"Sort None",remove:"Remove Sort"},column:{hide:"Hide Column"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin Left",pinRight:"Pin Right",unpin:"Unpin"},columnMenu:{close:"Close"},gridMenu:{aria:{buttonLabel:"Grid Menu"},columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."},pagination:{aria:{pageToFirst:"Page to first",pageBack:"Page back",pageSelected:"Selected page",pageForward:"Page forward",pageToLast:"Page to last"},sizes:"items per page",totalItems:"items",through:"through",of:"of"},grouping:{group:"Group",ungroup:"Ungroup",aggregate_count:"Agg: Count",aggregate_sum:"Agg: Sum",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Avg",aggregate_remove:"Agg: Remove"},validate:{error:"Error:",minLength:"Value should be at least THRESHOLD characters long.",maxLength:"Value should be at most THRESHOLD characters long.",required:"A value is needed."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("es",{aggregate:{label:"Artículos"},groupPanel:{description:"Arrastre un encabezado de columna aquí y suéltelo para agrupar por esa columna."},search:{placeholder:"Buscar...",showingItems:"Artículos Mostrados:",selectedItems:"Artículos Seleccionados:",totalItems:"Artículos Totales:",size:"Tamaño de Página:",first:"Primera Página",next:"Página Siguiente",previous:"Página Anterior",last:"Última Página"},menu:{text:"Elegir columnas:"},sort:{ascending:"Orden Ascendente",descending:"Orden Descendente",remove:"Sin Ordenar"},column:{hide:"Ocultar la columna"},aggregation:{count:"filas totales: ",sum:"total: ",avg:"media: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fijar a la Izquierda",pinRight:"Fijar a la Derecha",unpin:"Quitar Fijación"},gridMenu:{columns:"Columnas:",importerTitle:"Importar archivo",exporterAllAsCsv:"Exportar todo como csv",exporterVisibleAsCsv:"Exportar vista como csv",exporterSelectedAsCsv:"Exportar selección como csv",exporterAllAsPdf:"Exportar todo como pdf",exporterVisibleAsPdf:"Exportar vista como pdf",exporterSelectedAsPdf:"Exportar selección como pdf",clearAllFilters:"Limpiar todos los filtros"},importer:{noHeaders:"No fue posible derivar los nombres de las columnas, ¿tiene encabezados el archivo?",noObjects:"No fue posible obtener registros, ¿contiene datos el archivo, aparte de los encabezados?",invalidCsv:"No fue posible procesar el archivo, ¿es un CSV válido?",invalidJson:"No fue posible procesar el archivo, ¿es un Json válido?",jsonNotArray:"El archivo json importado debe contener un array, abortando."},pagination:{sizes:"registros por página",totalItems:"registros",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Cont",aggregate_sum:"Agr: Sum",aggregate_max:"Agr: Máx",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Prom",aggregate_remove:"Agr: Quitar"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fa",{aggregate:{label:"قلم"},groupPanel:{description:"عنوان یک ستون را بگیر و به گروهی از آن ستون رها کن."},search:{placeholder:"جستجو...",showingItems:"نمایش اقلام:",selectedItems:"قلم‌های انتخاب شده:",totalItems:"مجموع اقلام:",size:"اندازه‌ی صفحه:",first:"اولین صفحه",next:"صفحه‌ی‌بعدی",previous:"صفحه‌ی‌ قبلی",last:"آخرین صفحه"},menu:{text:"ستون‌های انتخابی:"},sort:{ascending:"ترتیب صعودی",descending:"ترتیب نزولی",remove:"حذف مرتب کردن"},column:{hide:"پنهان‌کردن ستون"},aggregation:{count:"تعداد: ",sum:"مجموع: ",avg:"میانگین: ",min:"کمترین: ",max:"بیشترین: "},pinning:{pinLeft:"پین کردن سمت چپ",pinRight:"پین کردن سمت راست",unpin:"حذف پین"},gridMenu:{columns:"ستون‌ها:",importerTitle:"وارد کردن فایل",exporterAllAsCsv:"خروجی تمام داده‌ها در فایل csv",exporterVisibleAsCsv:"خروجی داده‌های قابل مشاهده در فایل csv",exporterSelectedAsCsv:"خروجی داده‌های انتخاب‌شده در فایل csv",exporterAllAsPdf:"خروجی تمام داده‌ها در فایل pdf",exporterVisibleAsPdf:"خروجی داده‌های قابل مشاهده در فایل pdf",exporterSelectedAsPdf:"خروجی داده‌های انتخاب‌شده در فایل pdf",clearAllFilters:"پاک کردن تمام فیلتر"},importer:{noHeaders:"نام ستون قابل استخراج نیست. آیا فایل عنوان دارد؟",noObjects:"اشیا قابل استخراج نیستند. آیا به جز عنوان‌ها در فایل داده وجود دارد؟",invalidCsv:"فایل قابل پردازش نیست. آیا فرمت csv معتبر است؟",invalidJson:"فایل قابل پردازش نیست. آیا فرمت json معتبر است؟",jsonNotArray:"فایل json وارد شده باید حاوی آرایه باشد. عملیات ساقط شد."},pagination:{sizes:"اقلام در هر صفحه",totalItems:"اقلام",of:"از"},grouping:{group:"گروه‌بندی",ungroup:"حذف گروه‌بندی",aggregate_count:"Agg: تعداد",aggregate_sum:"Agg: جمع",aggregate_max:"Agg: بیشینه",aggregate_min:"Agg: کمینه",aggregate_avg:"Agg: میانگین",aggregate_remove:"Agg: حذف"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fi",{aggregate:{label:"rivit"},groupPanel:{description:"Raahaa ja pudota otsikko tähän ryhmittääksesi sarakkeen mukaan."},search:{placeholder:"Hae...",showingItems:"Näytetään rivejä:",selectedItems:"Valitut rivit:",totalItems:"Rivejä yht.:",size:"Näytä:",first:"Ensimmäinen sivu",next:"Seuraava sivu",previous:"Edellinen sivu",last:"Viimeinen sivu"},menu:{text:"Valitse sarakkeet:"},sort:{ascending:"Järjestä nouseva",descending:"Järjestä laskeva",remove:"Poista järjestys"},column:{hide:"Piilota sarake"},aggregation:{count:"Rivejä yht.: ",sum:"Summa: ",avg:"K.a.: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Lukitse vasemmalle",pinRight:"Lukitse oikealle",unpin:"Poista lukitus"},gridMenu:{columns:"Sarakkeet:",importerTitle:"Tuo tiedosto",exporterAllAsCsv:"Vie tiedot csv-muodossa",exporterVisibleAsCsv:"Vie näkyvä tieto csv-muodossa",exporterSelectedAsCsv:"Vie valittu tieto csv-muodossa",exporterAllAsPdf:"Vie tiedot pdf-muodossa",exporterVisibleAsPdf:"Vie näkyvä tieto pdf-muodossa",exporterSelectedAsPdf:"Vie valittu tieto pdf-muodossa",clearAllFilters:"Puhdista kaikki suodattimet"},importer:{noHeaders:"Sarakkeen nimiä ei voitu päätellä, onko tiedostossa otsikkoriviä?",noObjects:"Tietoja ei voitu lukea, onko tiedostossa muuta kuin otsikkot?",invalidCsv:"Tiedostoa ei voitu käsitellä, oliko se CSV-muodossa?",invalidJson:"Tiedostoa ei voitu käsitellä, oliko se JSON-muodossa?",jsonNotArray:"Tiedosto ei sisältänyt taulukkoa, lopetetaan."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fr",{aggregate:{label:"éléments"},groupPanel:{description:"Faites glisser une en-tête de colonne ici pour créer un groupe de colonnes."},search:{placeholder:"Recherche...",showingItems:"Affichage des éléments :",selectedItems:"Éléments sélectionnés :",totalItems:"Nombre total d'éléments:",size:"Taille de page:",first:"Première page",next:"Page Suivante",previous:"Page précédente",last:"Dernière page"},menu:{text:"Choisir des colonnes :"},sort:{ascending:"Trier par ordre croissant",descending:"Trier par ordre décroissant",remove:"Enlever le tri"},column:{hide:"Cacher la colonne"},aggregation:{count:"lignes totales: ",sum:"total: ",avg:"moy: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Épingler à gauche",pinRight:"Épingler à droite",unpin:"Détacher"},gridMenu:{columns:"Colonnes:",importerTitle:"Importer un fichier",exporterAllAsCsv:"Exporter toutes les données en CSV",exporterVisibleAsCsv:"Exporter les données visibles en CSV",exporterSelectedAsCsv:"Exporter les données sélectionnées en CSV",exporterAllAsPdf:"Exporter toutes les données en PDF",exporterVisibleAsPdf:"Exporter les données visibles en PDF",exporterSelectedAsPdf:"Exporter les données sélectionnées en PDF",clearAllFilters:"Nettoyez tous les filtres"},importer:{noHeaders:"Impossible de déterminer le nom des colonnes, le fichier possède-t-il une en-tête ?",noObjects:"Aucun objet trouvé, le fichier possède-t-il des données autres que l'en-tête ?",invalidCsv:"Le fichier n'a pas pu être traité, le CSV est-il valide ?",invalidJson:"Le fichier n'a pas pu être traité, le JSON est-il valide ?",jsonNotArray:"Le fichier JSON importé doit contenir un tableau, abandon."},pagination:{sizes:"éléments par page",totalItems:"éléments",of:"sur"},grouping:{group:"Grouper",ungroup:"Dégrouper",aggregate_count:"Agg: Compte",aggregate_sum:"Agg: Somme",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Moy",aggregate_remove:"Agg: Retirer"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("he",{aggregate:{label:"items"},groupPanel:{description:"גרור עמודה לכאן ושחרר בכדי לקבץ עמודה זו."},search:{placeholder:"חפש...",showingItems:"מציג:",selectedItems:'סה"כ נבחרו:',totalItems:'סה"כ רשומות:',size:"תוצאות בדף:",first:"דף ראשון",next:"דף הבא",previous:"דף קודם",last:"דף אחרון"},menu:{text:"בחר עמודות:"},sort:{ascending:"סדר עולה",descending:"סדר יורד",remove:"בטל"},column:{hide:"טור הסתר"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clean all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("hy",{aggregate:{label:"տվյալներ"},groupPanel:{description:"Ըստ սյան խմբավորելու համար քաշեք և գցեք վերնագիրն այստեղ։"},search:{placeholder:"Փնտրում...",showingItems:"Ցուցադրված տվյալներ՝",selectedItems:"Ընտրված:",totalItems:"Ընդամենը՝",size:"Տողերի քանակը էջում՝",first:"Առաջին էջ",next:"Հաջորդ էջ",previous:"Նախորդ էջ",last:"Վերջին էջ"},menu:{text:"Ընտրել սյուները:"},sort:{ascending:"Աճման կարգով",descending:"Նվազման կարգով",remove:"Հանել "},column:{hide:"Թաքցնել սյունը"},aggregation:{count:"ընդամենը տող՝ ",sum:"ընդամենը՝ ",avg:"միջին՝ ",min:"մին՝ ",max:"մաքս՝ "},pinning:{pinLeft:"Կպցնել ձախ կողմում",pinRight:"Կպցնել աջ կողմում",unpin:"Արձակել"},gridMenu:{columns:"Սյուներ:",importerTitle:"Ներմուծել ֆայլ",exporterAllAsCsv:"Արտահանել ամբողջը CSV",exporterVisibleAsCsv:"Արտահանել երևացող տվյալները CSV",exporterSelectedAsCsv:"Արտահանել ընտրված տվյալները CSV",exporterAllAsPdf:"Արտահանել PDF",exporterVisibleAsPdf:"Արտահանել երևացող տվյալները PDF",exporterSelectedAsPdf:"Արտահանել ընտրված տվյալները PDF",clearAllFilters:"Մաքրել բոլոր ֆիլտրերը"},importer:{noHeaders:"Հնարավոր չեղավ որոշել սյան վերնագրերը։ Արդյո՞ք ֆայլը ունի վերնագրեր։",noObjects:"Հնարավոր չեղավ կարդալ տվյալները։ Արդյո՞ք ֆայլում կան տվյալներ։",invalidCsv:"Հնարավոր չեղավ մշակել ֆայլը։ Արդյո՞ք այն վավեր CSV է։",invalidJson:"Հնարավոր չեղավ մշակել ֆայլը։ Արդյո՞ք այն վավեր Json է։",jsonNotArray:"Ներմուծված json ֆայլը պետք է պարունակի զանգված, կասեցվում է։"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("it",{aggregate:{label:"elementi"},groupPanel:{description:"Trascina un'intestazione all'interno del gruppo della colonna."},search:{placeholder:"Ricerca...",showingItems:"Mostra:",selectedItems:"Selezionati:",totalItems:"Totali:",size:"Tot Pagine:",first:"Prima",next:"Prossima",previous:"Precedente",last:"Ultima"},menu:{text:"Scegli le colonne:"},sort:{ascending:"Asc.",descending:"Desc.",remove:"Annulla ordinamento"},column:{hide:"Nascondi"},aggregation:{count:"righe totali: ",sum:"tot: ",avg:"media: ",min:"minimo: ",max:"massimo: "},pinning:{pinLeft:"Blocca a sx",pinRight:"Blocca a dx",unpin:"Blocca in alto"},gridMenu:{columns:"Colonne:",importerTitle:"Importa",exporterAllAsCsv:"Esporta tutti i dati in CSV",exporterVisibleAsCsv:"Esporta i dati visibili in CSV",exporterSelectedAsCsv:"Esporta i dati selezionati in CSV",exporterAllAsPdf:"Esporta tutti i dati in PDF",exporterVisibleAsPdf:"Esporta i dati visibili in PDF",exporterSelectedAsPdf:"Esporta i dati selezionati in PDF",clearAllFilters:"Pulire tutti i filtri"},importer:{noHeaders:"Impossibile reperire i nomi delle colonne, sicuro che siano indicati all'interno del file?",noObjects:"Impossibile reperire gli oggetti, sicuro che siano indicati all'interno del file?",invalidCsv:"Impossibile elaborare il file, sicuro che sia un CSV?",invalidJson:"Impossibile elaborare il file, sicuro che sia un JSON valido?",jsonNotArray:"Errore! Il file JSON da importare deve contenere un array."},grouping:{group:"Raggruppa",ungroup:"Separa",aggregate_count:"Agg: N. Elem.",aggregate_sum:"Agg: Somma",aggregate_max:"Agg: Massimo",aggregate_min:"Agg: Minimo",aggregate_avg:"Agg: Media",aggregate_remove:"Agg: Rimuovi"},validate:{error:"Errore:",minLength:"Lunghezza minima pari a THRESHOLD caratteri.",maxLength:"Lunghezza massima pari a THRESHOLD caratteri.",required:"Necessario inserire un valore."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ja",{aggregate:{label:"項目"},groupPanel:{description:"ここに列ヘッダをドラッグアンドドロップして、その列でグループ化します。"},search:{placeholder:"検索...",showingItems:"表示中の項目:",selectedItems:"選択した項目:",totalItems:"項目の総数:",size:"ページサイズ:",first:"最初のページ",next:"次のページ",previous:"前のページ",last:"前のページ"},menu:{text:"列の選択:"},sort:{ascending:"昇順に並べ替え",descending:"降順に並べ替え",remove:"並べ替えの解除"},column:{hide:"列の非表示"},aggregation:{count:"合計行数: ",sum:"合計: ",avg:"平均: ",min:"最小: ",max:"最大: "},pinning:{pinLeft:"左に固定",pinRight:"右に固定",unpin:"固定解除"},gridMenu:{columns:"列:",importerTitle:"ファイルのインポート",exporterAllAsCsv:"すべてのデータをCSV形式でエクスポート",exporterVisibleAsCsv:"表示中のデータをCSV形式でエクスポート",exporterSelectedAsCsv:"選択したデータをCSV形式でエクスポート",exporterAllAsPdf:"すべてのデータをPDF形式でエクスポート",exporterVisibleAsPdf:"表示中のデータをPDF形式でエクスポート",exporterSelectedAsPdf:"選択したデータをPDF形式でエクスポート",clearAllFilters:"すべてのフィルタを清掃してください"},importer:{noHeaders:"列名を取得できません。ファイルにヘッダが含まれていることを確認してください。",noObjects:"オブジェクトを取得できません。ファイルにヘッダ以外のデータが含まれていることを確認してください。",invalidCsv:"ファイルを処理できません。ファイルが有効なCSV形式であることを確認してください。",invalidJson:"ファイルを処理できません。ファイルが有効なJSON形式であることを確認してください。",jsonNotArray:"インポートしたJSONファイルには配列が含まれている必要があります。処理を中止します。"},pagination:{sizes:"項目/ページ",totalItems:"項目"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ko",{aggregate:{label:"아이템"},groupPanel:{description:"컬럼으로 그룹핑하기 위해서는 컬럼 헤더를 끌어 떨어뜨려 주세요."},search:{placeholder:"검색...",showingItems:"항목 보여주기:",selectedItems:"선택 항목:",totalItems:"전체 항목:",size:"페이지 크기:",first:"첫번째 페이지",next:"다음 페이지",previous:"이전 페이지",last:"마지막 페이지"},menu:{text:"컬럼을 선택하세요:"},sort:{ascending:"오름차순 정렬",descending:"내림차순 정렬",remove:"소팅 제거"},column:{hide:"컬럼 제거"},aggregation:{count:"전체 갯수: ",sum:"전체: ",avg:"평균: ",min:"최소: ",max:"최대: "},pinning:{pinLeft:"왼쪽 핀",pinRight:"오른쪽 핀",unpin:"핀 제거"},gridMenu:{columns:"컬럼:",importerTitle:"파일 가져오기",exporterAllAsCsv:"csv로 모든 데이터 내보내기",exporterVisibleAsCsv:"csv로 보이는 데이터 내보내기",exporterSelectedAsCsv:"csv로 선택된 데이터 내보내기",exporterAllAsPdf:"pdf로 모든 데이터 내보내기",exporterVisibleAsPdf:"pdf로 보이는 데이터 내보내기",exporterSelectedAsPdf:"pdf로 선택 데이터 내보내기",clearAllFilters:"모든 필터를 청소"},importer:{noHeaders:"컬럼명이 지정되어 있지 않습니다. 파일에 헤더가 명시되어 있는지 확인해 주세요.",noObjects:"데이터가 지정되어 있지 않습니다. 데이터가 파일에 있는지 확인해 주세요.",invalidCsv:"파일을 처리할 수 없습니다. 올바른 csv인지 확인해 주세요.",invalidJson:"파일을 처리할 수 없습니다. 올바른 json인지 확인해 주세요.",jsonNotArray:"json 파일은 배열을 포함해야 합니다."},pagination:{sizes:"페이지당 항목",totalItems:"전체 항목"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){ -a.decorator("i18nService",["$delegate",function(a){return a.add("nl",{aggregate:{label:"items"},groupPanel:{description:"Sleep hier een kolomnaam heen om op te groeperen."},search:{placeholder:"Zoeken...",showingItems:"Getoonde items:",selectedItems:"Geselecteerde items:",totalItems:"Totaal aantal items:",size:"Items per pagina:",first:"Eerste pagina",next:"Volgende pagina",previous:"Vorige pagina",last:"Laatste pagina"},menu:{text:"Kies kolommen:"},sort:{ascending:"Sorteer oplopend",descending:"Sorteer aflopend",remove:"Verwijder sortering"},column:{hide:"Verberg kolom"},aggregation:{count:"Aantal rijen: ",sum:"Som: ",avg:"Gemiddelde: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Zet links vast",pinRight:"Zet rechts vast",unpin:"Maak los"},gridMenu:{columns:"Kolommen:",importerTitle:"Importeer bestand",exporterAllAsCsv:"Exporteer alle data als csv",exporterVisibleAsCsv:"Exporteer zichtbare data als csv",exporterSelectedAsCsv:"Exporteer geselecteerde data als csv",exporterAllAsPdf:"Exporteer alle data als pdf",exporterVisibleAsPdf:"Exporteer zichtbare data als pdf",exporterSelectedAsPdf:"Exporteer geselecteerde data als pdf",clearAllFilters:"Reinig alle filters"},importer:{noHeaders:"Kolomnamen kunnen niet worden afgeleid. Heeft het bestand een header?",noObjects:"Objecten kunnen niet worden afgeleid. Bevat het bestand data naast de headers?",invalidCsv:"Het bestand kan niet verwerkt worden. Is het een valide csv bestand?",invalidJson:"Het bestand kan niet verwerkt worden. Is het valide json?",jsonNotArray:"Het json bestand moet een array bevatten. De actie wordt geannuleerd."},pagination:{sizes:"items per pagina",totalItems:"items",of:"van de"},grouping:{group:"Groepeer",ungroup:"Groepering opheffen",aggregate_count:"Agg: Aantal",aggregate_sum:"Agg: Som",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Gem",aggregate_remove:"Agg: Verwijder"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pl",{headerCell:{aria:{defaultFilterLabel:"Filter dla kolumny",removeFilter:"Usuń filter",columnMenuButtonLabel:"Menu kolumny"},priority:"Prioritet:",filterLabel:"Filtr dla kolumny: "},aggregate:{label:"pozycji"},groupPanel:{description:"Przeciągnij nagłówek kolumny tutaj, aby pogrupować według niej."},search:{placeholder:"Szukaj...",showingItems:"Widoczne pozycje:",selectedItems:"Zaznaczone pozycje:",totalItems:"Wszystkich pozycji:",size:"Rozmiar strony:",first:"Pierwsza strona",next:"Następna strona",previous:"Poprzednia strona",last:"Ostatnia strona"},menu:{text:"Wybierz kolumny:"},sort:{ascending:"Sortuj rosnąco",descending:"Sortuj malejąco",none:"Brak sortowania",remove:"Wyłącz sortowanie"},column:{hide:"Ukryj kolumne"},aggregation:{count:"Razem pozycji: ",sum:"Razem: ",avg:"Średnia: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Przypnij do lewej",pinRight:"Przypnij do prawej",unpin:"Odepnij"},columnMenu:{close:"Zamknij"},gridMenu:{aria:{buttonLabel:"Menu Grida"},columns:"Kolumny:",importerTitle:"Importuj plik",exporterAllAsCsv:"Eksportuj wszystkie dane do csv",exporterVisibleAsCsv:"Eksportuj widoczne dane do csv",exporterSelectedAsCsv:"Eksportuj zaznaczone dane do csv",exporterAllAsPdf:"Eksportuj wszystkie dane do pdf",exporterVisibleAsPdf:"Eksportuj widoczne dane do pdf",exporterSelectedAsPdf:"Eksportuj zaznaczone dane do pdf",clearAllFilters:"Wyczyść filtry"},importer:{noHeaders:"Nie udało się wczytać nazw kolumn. Czy plik posiada nagłówek?",noObjects:"Nie udalo się wczytać pozycji. Czy plik zawiera dane??",invalidCsv:"Nie udało się przetworzyć pliku, jest to prawidlowy plik CSV??",invalidJson:"Nie udało się przetworzyć pliku, jest to prawidlowy plik Json?",jsonNotArray:"Importowany plik json musi zawierać tablicę, importowanie przerwane."},pagination:{aria:{pageToFirst:"Pierwsza strona",pageBack:"Poprzednia strona",pageSelected:"Wybrana strona",pageForward:"Następna strona",pageToLast:"Ostatnia strona"},sizes:"pozycji na stronę",totalItems:"pozycji",through:"do",of:"z"},grouping:{group:"Grupuj",ungroup:"Rozgrupuj",aggregate_count:"Zbiorczo: Razem",aggregate_sum:"Zbiorczo: Suma",aggregate_max:"Zbiorczo: Max",aggregate_min:"Zbiorczo: Min",aggregate_avg:"Zbiorczo: Średnia",aggregate_remove:"Zbiorczo: Usuń"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pt-br",{headerCell:{aria:{defaultFilterLabel:"Filtro por coluna",removeFilter:"Remover filtro",columnMenuButtonLabel:"Menu coluna"},priority:"Prioridade:",filterLabel:"Filtro por coluna: "},aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Items Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da Página:",first:"Primeira Página",next:"Próxima Página",previous:"Página Anterior",last:"Última Página"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",none:"Nenhuma Ordem",remove:"Remover Ordenação"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},columnMenu:{close:"Fechar"},gridMenu:{aria:{buttonLabel:"Menu Grid"},columns:"Colunas:",importerTitle:"Importar arquivo",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados visíveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados visíveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf",clearAllFilters:"Limpar todos os filtros"},importer:{noHeaders:"Nomes de colunas não puderam ser derivados. O arquivo tem um cabeçalho?",noObjects:"Objetos não puderam ser derivados. Havia dados no arquivo, além dos cabeçalhos?",invalidCsv:"Arquivo não pode ser processado. É um CSV válido?",invalidJson:"Arquivo não pode ser processado. É um Json válido?",jsonNotArray:"Arquivo json importado tem que conter um array. Abortando."},pagination:{aria:{pageToFirst:"Primeira página",pageBack:"Página anterior",pageSelected:"Página Selecionada",pageForward:"Proxima",pageToLast:"Anterior"},sizes:"itens por página",totalItems:"itens",through:"através dos",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Contar",aggregate_sum:"Agr: Soma",aggregate_max:"Agr: Max",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Med",aggregate_remove:"Agr: Remover"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pt",{headerCell:{aria:{defaultFilterLabel:"Filtro por coluna",removeFilter:"Remover filtro",columnMenuButtonLabel:"Menu coluna"},priority:"Prioridade:",filterLabel:"Filtro por coluna: "},aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Itens Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da Página:",first:"Primeira Página",next:"Próxima Página",previous:"Página Anterior",last:"Última Página"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",none:"Nenhuma Ordem",remove:"Remover Ordenação"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},columnMenu:{close:"Fechar"},gridMenu:{aria:{buttonLabel:"Menu Grid"},columns:"Colunas:",importerTitle:"Importar ficheiro",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados visíveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados visíveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf",clearAllFilters:"Limpar todos os filtros"},importer:{noHeaders:"Nomes de colunas não puderam ser derivados. O ficheiro tem um cabeçalho?",noObjects:"Objetos não puderam ser derivados. Havia dados no ficheiro, além dos cabeçalhos?",invalidCsv:"Ficheiro não pode ser processado. É um CSV válido?",invalidJson:"Ficheiro não pode ser processado. É um Json válido?",jsonNotArray:"Ficheiro json importado tem que conter um array. Interrompendo."},pagination:{aria:{pageToFirst:"Primeira página",pageBack:"Página anterior",pageSelected:"Página Selecionada",pageForward:"Próxima",pageToLast:"Anterior"},sizes:"itens por página",totalItems:"itens",through:"através dos",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Contar",aggregate_sum:"Agr: Soma",aggregate_max:"Agr: Max",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Med",aggregate_remove:"Agr: Remover"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ro",{headerCell:{aria:{defaultFilterLabel:"Filtru pentru coloana",removeFilter:"Sterge filtru",columnMenuButtonLabel:"Column Menu"},priority:"Prioritate:",filterLabel:"Filtru pentru coloana:"},aggregate:{label:"Elemente"},groupPanel:{description:"Trage un cap de coloana aici pentru a grupa elementele dupa coloana respectiva"},search:{placeholder:"Cauta...",showingItems:"Arata elementele:",selectedItems:"Elementele selectate:",totalItems:"Total elemente:",size:"Marime pagina:",first:"Prima pagina",next:"Pagina urmatoare",previous:"Pagina anterioara",last:"Ultima pagina"},menu:{text:"Alege coloane:"},sort:{ascending:"Ordoneaza crescator",descending:"Ordoneaza descrescator",none:"Fara ordonare",remove:"Sterge ordonarea"},column:{hide:"Ascunde coloana"},aggregation:{count:"total linii: ",sum:"total: ",avg:"medie: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin la stanga",pinRight:"Pin la dreapta",unpin:"Sterge pinul"},columnMenu:{close:"Inchide"},gridMenu:{aria:{buttonLabel:"Grid Menu"},columns:"Coloane:",importerTitle:"Incarca fisier",exporterAllAsCsv:"Exporta toate datele ca csv",exporterVisibleAsCsv:"Exporta datele vizibile ca csv",exporterSelectedAsCsv:"Exporta datele selectate ca csv",exporterAllAsPdf:"Exporta toate datele ca pdf",exporterVisibleAsPdf:"Exporta datele vizibile ca pdf",exporterSelectedAsPdf:"Exporta datele selectate ca csv pdf",clearAllFilters:"Sterge toate filtrele"},importer:{noHeaders:"Numele coloanelor nu a putut fi incarcat, acest fisier are un header?",noObjects:"Datele nu au putut fi incarcate, exista date in fisier in afara numelor de coloane?",invalidCsv:"Fisierul nu a putut fi procesat, ati incarcat un CSV valid ?",invalidJson:"Fisierul nu a putut fi procesat, ati incarcat un Json valid?",jsonNotArray:"Json-ul incarcat trebuie sa contina un array, inchidere."},pagination:{aria:{pageToFirst:"Prima pagina",pageBack:"O pagina inapoi",pageSelected:"Pagina selectata",pageForward:"O pagina inainte",pageToLast:"Ultima pagina"},sizes:"Elemente per pagina",totalItems:"elemente",through:"prin",of:"of"},grouping:{group:"Grupeaza",ungroup:"Opreste gruparea",aggregate_count:"Agg: Count",aggregate_sum:"Agg: Sum",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Avg",aggregate_remove:"Agg: Remove"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ru",{headerCell:{aria:{defaultFilterLabel:"Фильтр столбца",removeFilter:"Удалить фильтр",columnMenuButtonLabel:"Меню столбца"},priority:"Приоритет:",filterLabel:"Фильтр столбца: "},aggregate:{label:"элементы"},groupPanel:{description:"Для группировки по столбцу перетащите сюда его название."},search:{placeholder:"Поиск...",showingItems:"Показать элементы:",selectedItems:"Выбранные элементы:",totalItems:"Всего элементов:",size:"Размер страницы:",first:"Первая страница",next:"Следующая страница",previous:"Предыдущая страница",last:"Последняя страница"},menu:{text:"Выбрать столбцы:"},sort:{ascending:"По возрастанию",descending:"По убыванию",none:"Без сортировки",remove:"Убрать сортировку"},column:{hide:"Спрятать столбец"},aggregation:{count:"всего строк: ",sum:"итого: ",avg:"среднее: ",min:"мин: ",max:"макс: "},pinning:{pinLeft:"Закрепить слева",pinRight:"Закрепить справа",unpin:"Открепить"},columnMenu:{close:"Закрыть"},gridMenu:{aria:{buttonLabel:"Меню"},columns:"Столбцы:",importerTitle:"Импортировать файл",exporterAllAsCsv:"Экспортировать всё в CSV",exporterVisibleAsCsv:"Экспортировать видимые данные в CSV",exporterSelectedAsCsv:"Экспортировать выбранные данные в CSV",exporterAllAsPdf:"Экспортировать всё в PDF",exporterVisibleAsPdf:"Экспортировать видимые данные в PDF",exporterSelectedAsPdf:"Экспортировать выбранные данные в PDF",clearAllFilters:"Очистите все фильтры"},importer:{noHeaders:"Не удалось получить названия столбцов, есть ли в файле заголовок?",noObjects:"Не удалось получить данные, есть ли в файле строки кроме заголовка?",invalidCsv:"Не удалось обработать файл, это правильный CSV-файл?",invalidJson:"Не удалось обработать файл, это правильный JSON?",jsonNotArray:"Импортируемый JSON-файл должен содержать массив, операция отменена."},pagination:{aria:{pageToFirst:"Первая страница",pageBack:"Предыдущая страница",pageSelected:"Выбранная страница",pageForward:"Следующая страница",pageToLast:"Последняя страница"},sizes:"строк на страницу",totalItems:"строк",through:"по",of:"из"},grouping:{group:"Группировать",ungroup:"Разгруппировать",aggregate_count:"Группировать: Count",aggregate_sum:"Для группы: Сумма",aggregate_max:"Для группы: Максимум",aggregate_min:"Для группы: Минимум",aggregate_avg:"Для группы: Среднее",aggregate_remove:"Для группы: Пусто"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sk",{aggregate:{label:"items"},groupPanel:{description:"Pretiahni sem názov stĺpca pre zoskupenie podľa toho stĺpca."},search:{placeholder:"Hľadaj...",showingItems:"Zobrazujem položky:",selectedItems:"Vybraté položky:",totalItems:"Počet položiek:",size:"Počet:",first:"Prvá strana",next:"Ďalšia strana",previous:"Predchádzajúca strana",last:"Posledná strana"},menu:{text:"Vyberte stĺpce:"},sort:{ascending:"Zotriediť vzostupne",descending:"Zotriediť zostupne",remove:"Vymazať triedenie"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sv",{aggregate:{label:"Artiklar"},groupPanel:{description:"Dra en kolumnrubrik hit och släpp den för att gruppera efter den kolumnen."},search:{placeholder:"Sök...",showingItems:"Visar artiklar:",selectedItems:"Valda artiklar:",totalItems:"Antal artiklar:",size:"Sidstorlek:",first:"Första sidan",next:"Nästa sida",previous:"Föregående sida",last:"Sista sidan"},menu:{text:"Välj kolumner:"},sort:{ascending:"Sortera stigande",descending:"Sortera fallande",remove:"Inaktivera sortering"},column:{hide:"Göm kolumn"},aggregation:{count:"Antal rader: ",sum:"Summa: ",avg:"Genomsnitt: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Fäst vänster",pinRight:"Fäst höger",unpin:"Lösgör"},gridMenu:{columns:"Kolumner:",importerTitle:"Importera fil",exporterAllAsCsv:"Exportera all data som CSV",exporterVisibleAsCsv:"Exportera synlig data som CSV",exporterSelectedAsCsv:"Exportera markerad data som CSV",exporterAllAsPdf:"Exportera all data som PDF",exporterVisibleAsPdf:"Exportera synlig data som PDF",exporterSelectedAsPdf:"Exportera markerad data som PDF",clearAllFilters:"Rengör alla filter"},importer:{noHeaders:"Kolumnnamn kunde inte härledas. Har filen ett sidhuvud?",noObjects:"Objekt kunde inte härledas. Har filen data undantaget sidhuvud?",invalidCsv:"Filen kunde inte behandlas, är den en giltig CSV?",invalidJson:"Filen kunde inte behandlas, är den en giltig JSON?",jsonNotArray:"Importerad JSON-fil måste innehålla ett fält. Import avbruten."},pagination:{sizes:"Artiklar per sida",totalItems:"Artiklar"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ta",{aggregate:{label:"உருப்படிகள்"},groupPanel:{description:"ஒரு பத்தியை குழுவாக அமைக்க அப்பத்தியின் தலைப்பை இங்கே இழுத்து வரவும் "},search:{placeholder:"தேடல் ...",showingItems:"உருப்படிகளை காண்பித்தல்:",selectedItems:"தேர்ந்தெடுக்கப்பட்ட உருப்படிகள்:",totalItems:"மொத்த உருப்படிகள்:",size:"பக்க அளவு: ",first:"முதல் பக்கம்",next:"அடுத்த பக்கம்",previous:"முந்தைய பக்கம் ",last:"இறுதி பக்கம்"},menu:{text:"பத்திகளை தேர்ந்தெடு:"},sort:{ascending:"மேலிருந்து கீழாக",descending:"கீழிருந்து மேலாக",remove:"வரிசையை நீக்கு"},column:{hide:"பத்தியை மறைத்து வை "},aggregation:{count:"மொத்த வரிகள்:",sum:"மொத்தம்: ",avg:"சராசரி: ",min:"குறைந்தபட்ச: ",max:"அதிகபட்ச: "},pinning:{pinLeft:"இடதுபுறமாக தைக்க ",pinRight:"வலதுபுறமாக தைக்க",unpin:"பிரி"},gridMenu:{columns:"பத்திகள்:",importerTitle:"கோப்பு : படித்தல்",exporterAllAsCsv:"எல்லா தரவுகளையும் கோப்பாக்கு: csv",exporterVisibleAsCsv:"இருக்கும் தரவுகளை கோப்பாக்கு: csv",exporterSelectedAsCsv:"தேர்ந்தெடுத்த தரவுகளை கோப்பாக்கு: csv",exporterAllAsPdf:"எல்லா தரவுகளையும் கோப்பாக்கு: pdf",exporterVisibleAsPdf:"இருக்கும் தரவுகளை கோப்பாக்கு: pdf",exporterSelectedAsPdf:"தேர்ந்தெடுத்த தரவுகளை கோப்பாக்கு: pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"பத்தியின் தலைப்புகளை பெற இயலவில்லை, கோப்பிற்கு தலைப்பு உள்ளதா?",noObjects:"இலக்குகளை உருவாக்க முடியவில்லை, கோப்பில் தலைப்புகளை தவிர தரவு ஏதேனும் உள்ளதா? ",invalidCsv:"சரிவர நடைமுறை படுத்த இயலவில்லை, கோப்பு சரிதானா? - csv",invalidJson:"சரிவர நடைமுறை படுத்த இயலவில்லை, கோப்பு சரிதானா? - json",jsonNotArray:"படித்த கோப்பில் வரிசைகள் உள்ளது, நடைமுறை ரத்து செய் : json"},pagination:{sizes:"உருப்படிகள் / பக்கம்",totalItems:"உருப்படிகள் "},grouping:{group:"குழு",ungroup:"பிரி",aggregate_count:"மதிப்பீட்டு : எண்ணு",aggregate_sum:"மதிப்பீட்டு : கூட்டல்",aggregate_max:"மதிப்பீட்டு : அதிகபட்சம்",aggregate_min:"மதிப்பீட்டு : குறைந்தபட்சம்",aggregate_avg:"மதிப்பீட்டு : சராசரி",aggregate_remove:"மதிப்பீட்டு : நீக்கு"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("tr",{headerCell:{aria:{defaultFilterLabel:"Sütun için filtre",removeFilter:"Filtreyi Kaldır",columnMenuButtonLabel:"Sütun Menüsü"},priority:"Öncelik:",filterLabel:"Sütun için filtre: "},aggregate:{label:"kayıtlar"},groupPanel:{description:"Sütuna göre gruplamak için sütun başlığını buraya sürükleyin ve bırakın."},search:{placeholder:"Arama...",showingItems:"Gösterilen Kayıt:",selectedItems:"Seçili Kayıt:",totalItems:"Toplam Kayıt:",size:"Sayfa Boyutu:",first:"İlk Sayfa",next:"Sonraki Sayfa",previous:"Önceki Sayfa",last:"Son Sayfa"},menu:{text:"Sütunları Seç:"},sort:{ascending:"Artan Sırada Sırala",descending:"Azalan Sırada Sırala",none:"Sıralama Yapma",remove:"Sıralamayı Kaldır"},column:{hide:"Sütunu Gizle"},aggregation:{count:"toplam satır: ",sum:"toplam: ",avg:"ort: ",min:"min: ",max:"maks: "},pinning:{pinLeft:"Sola Sabitle",pinRight:"Sağa Sabitle",unpin:"Sabitlemeyi Kaldır"},columnMenu:{close:"Kapat"},gridMenu:{aria:{buttonLabel:"Tablo Menü"},columns:"Sütunlar:",importerTitle:"Dosya içeri aktar",exporterAllAsCsv:"Bütün veriyi CSV olarak dışarı aktar",exporterVisibleAsCsv:"Görünen veriyi CSV olarak dışarı aktar",exporterSelectedAsCsv:"Seçili veriyi CSV olarak dışarı aktar",exporterAllAsPdf:"Bütün veriyi PDF olarak dışarı aktar",exporterVisibleAsPdf:"Görünen veriyi PDF olarak dışarı aktar",exporterSelectedAsPdf:"Seçili veriyi PDF olarak dışarı aktar",clearAllFilters:"Bütün filtreleri kaldır"},importer:{noHeaders:"Sütun isimleri üretilemiyor, dosyanın bir başlığı var mı?",noObjects:"Nesneler üretilemiyor, dosyada başlıktan başka bir veri var mı?",invalidCsv:"Dosya işlenemedi, geçerli bir CSV dosyası mı?",invalidJson:"Dosya işlenemedi, geçerli bir Json dosyası mı?",jsonNotArray:"Alınan Json dosyasında bir dizi bulunmalıdır, işlem iptal ediliyor."},pagination:{aria:{pageToFirst:"İlk sayfaya",pageBack:"Geri git",pageSelected:"Seçili sayfa",pageForward:"İleri git",pageToLast:"Sona git"},sizes:"Sayfadaki nesne sayısı",totalItems:"kayıtlar",through:"",of:""},grouping:{group:"Grupla",ungroup:"Gruplama",aggregate_count:"Yekun: Sayı",aggregate_sum:"Yekun: Toplam",aggregate_max:"Yekun: Maks",aggregate_min:"Yekun: Min",aggregate_avg:"Yekun: Ort",aggregate_remove:"Yekun: Sil"}}),a}])}])}(),function(){var a=["uiT","uiTranslate"],b=["t","uiTranslate"],c=angular.module("ui.grid.i18n");c.constant("i18nConstants",{MISSING:"[MISSING]",UPDATE_EVENT:"$uiI18n",LOCALE_DIRECTIVE_ALIAS:"uiI18n",DEFAULT_LANG:"en"}),c.service("i18nService",["$log","i18nConstants","$rootScope",function(a,b,c){var d={_langs:{},current:null,get:function(a){return this._langs[a.toLowerCase()]},add:function(a,b){var c=a.toLowerCase();this._langs[c]||(this._langs[c]={}),angular.extend(this._langs[c],b)},getAllLangs:function(){var a=[];if(!this._langs)return a;for(var b in this._langs)a.push(b);return a},setCurrent:function(a){this.current=a.toLowerCase()},getCurrentLang:function(){return this.current}},e={add:function(a,b){"object"==typeof a?angular.forEach(a,function(a){a&&d.add(a,b)}):d.add(a,b)},getAllLangs:function(){return d.getAllLangs()},get:function(a){var b=a?a:e.getCurrentLang();return d.get(b)},getSafeText:function(a,c){var f=c?c:e.getCurrentLang(),g=d.get(f);if(!g)return b.MISSING;for(var h=a.split("."),i=g,j=0;jf?0===g?new d(a,c[h]):new d(e[g-1],c[h]):new d(a,c[h])},f.prototype.getRowColRight=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=f===c.length-1?0:f+1;return f>h?g===e.length-1?new d(a,c[h]):new d(e[g+1],c[h]):new d(a,c[h])},f.prototype.getRowColDown=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);return-1===f&&(f=0),g===e.length-1?new d(a,c[f]):new d(e[g+1],c[f])},f.prototype.getRowColPageDown=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=this.bodyContainer.minRowsToRender();return g>=e.length-h?new d(e[e.length-1],c[f]):new d(e[g+h],c[f])},f.prototype.getRowColUp=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);return-1===f&&(f=0),0===g?new d(a,c[f]):new d(e[g-1],c[f])},f.prototype.getRowColPageUp=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=this.bodyContainer.minRowsToRender();return 0>g-h?new d(e[0],c[f]):new d(e[g-h],c[f])},f}]),a.service("uiGridCellNavService",["gridUtil","uiGridConstants","uiGridCellNavConstants","$q","uiGridCellNavFactory","GridRowColumn","ScrollEvent",function(a,b,c,d,e,f,g){var h={initializeGrid:function(a){a.registerColumnBuilder(h.cellNavColumnBuilder),a.cellNav={},a.cellNav.lastRowCol=null,a.cellNav.focusedCells=[],h.defaultGridOptions(a.options);var b={events:{cellNav:{navigate:function(a,b){},viewPortKeyDown:function(a,b){},viewPortKeyPress:function(a,b){}}},methods:{cellNav:{scrollToFocus:function(b,c){return h.scrollToFocus(a,b,c)},getFocusedCell:function(){return a.cellNav.lastRowCol},getCurrentSelection:function(){return a.cellNav.focusedCells},rowColSelectIndex:function(b){for(var c=-1,d=0;db&&(c+=a.drawnWidth)});var e=0===d?0:(d+1)/a.renderContainers.body.visibleColumnCache.length;return c+=b.drawnWidth*e}};return h}]),a.directive("uiGridCellnav",["gridUtil","uiGridCellNavService","uiGridCellNavConstants","uiGridConstants","GridRowColumn","$timeout","$compile",function(a,b,c,d,e,f,g){return{replace:!0,priority:-150,require:"^uiGrid",scope:!1,controller:function(){},compile:function(){return{pre:function(a,f,g,h){var i=a,j=h.grid;b.initializeGrid(j),h.cellNav={},h.cellNav.makeRowCol=function(a){return a instanceof e||(a=new e(a.row,a.col)),a},h.cellNav.getActiveCell=function(){var a=f[0].getElementsByClassName("ui-grid-cell-focus");return a.length>0?a[0]:void 0},h.cellNav.broadcastCellNav=j.cellNav.broadcastCellNav=function(a,b,d){b=!(void 0===b||!b),a=h.cellNav.makeRowCol(a),h.cellNav.broadcastFocus(a,b,d),i.$broadcast(c.CELL_NAV_EVENT,a,b,d)},h.cellNav.clearFocus=j.cellNav.clearFocus=function(){j.cellNav.focusedCells=[],i.$broadcast(c.CELL_NAV_EVENT)},h.cellNav.broadcastFocus=function(a,b,c){b=!(void 0===b||!b),a=h.cellNav.makeRowCol(a);var d=a.row,f=a.col,g=h.grid.api.cellNav.rowColSelectIndex(a);if(null===j.cellNav.lastRowCol||-1===g){var i=new e(d,f);(null===j.cellNav.lastRowCol||j.cellNav.lastRowCol.row!==i.row||j.cellNav.lastRowCol.col!==i.col)&&(j.api.cellNav.raise.navigate(i,j.cellNav.lastRowCol),j.cellNav.lastRowCol=i),h.grid.options.modifierKeysToMultiSelectCells&&b?j.cellNav.focusedCells.push(a):j.cellNav.focusedCells=[a]}else j.options.modifierKeysToMultiSelectCells&&b&&g>=0&&j.cellNav.focusedCells.splice(g,1)},h.cellNav.handleKeyDown=function(a){var e=b.getDirection(a);if(null===e)return null;var f="body";a.uiGridTargetRenderContainerId&&(f=a.uiGridTargetRenderContainerId);var g=h.grid.api.cellNav.getFocusedCell();if(g){var i=h.grid.renderContainers[f].cellNav.getNextRowCol(e,g.row,g.col),k=h.grid.renderContainers[f].cellNav.getFocusableCols(),l=h.grid.api.cellNav.rowColSelectIndex(i);return e===c.direction.LEFT&&i.col===k[k.length-1]&&i.row===g.row&&a.keyCode===d.keymap.TAB&&a.shiftKey?(j.cellNav.focusedCells.splice(l,1),h.cellNav.clearFocus(),!0):e!==c.direction.RIGHT||i.col!==k[0]||i.row!==g.row||a.keyCode!==d.keymap.TAB||a.shiftKey?(j.scrollToIfNecessary(i.row,i.col).then(function(){h.cellNav.broadcastCellNav(i)}),a.stopPropagation(),a.preventDefault(),!1):(j.cellNav.focusedCells.splice(l,1),h.cellNav.clearFocus(),!0)}}},post:function(a,b,d,e){function f(){var d='
             
            ',e=g(d)(a);b.prepend(e),a.$on(c.CELL_NAV_EVENT,function(a,b,c,d){function f(a){a!==e.text()&&(e[0].style.clip="rect(0px,0px,0px,0px)",e[0].innerHTML="",e[0].style.visibility="hidden",e[0].style.visibility="visible",""!==a&&(e[0].style.clip="auto",e[0].appendChild(document.createTextNode(a+" ")),e[0].style.visibility="hidden",e[0].style.visibility="visible"))}if(!d||"focus"!==d.type){for(var g=[],i=h.api.cellNav.getCurrentSelection(),j=0;j
            ')(b);d.append(o),o.on("focus",function(a){a.uiGridTargetRenderContainerId=m;var b=j.grid.api.cellNav.getFocusedCell();null===b&&(b=j.grid.renderContainers[m].cellNav.getNextRowCol(g.direction.DOWN,null,null),b.row&&b.col&&j.cellNav.broadcastCellNav(b))}),l.setAriaActivedescendant=function(a){d.attr("aria-activedescendant",a)},l.removeAriaActivedescendant=function(a){d.attr("aria-activedescendant")===a&&d.attr("aria-activedescendant","")},j.focus=function(){c.focus.byElement(o[0])};var p=null;o.on("keydown",function(a){a.uiGridTargetRenderContainerId=m;var b=j.grid.api.cellNav.getFocusedCell(),c=j.cellNav.handleKeyDown(a);null===c&&(j.grid.api.cellNav.raise.viewPortKeyDown(a,b),p=b)}),o.on("keypress",function(b){p&&(a(function(){j.grid.api.cellNav.raise.viewPortKeyPress(b,p)},4),p=null)}),b.$on("$destroy",function(){o.off()})}}}}}}}]),a.directive("uiGridViewport",["$timeout","$document","gridUtil","uiGridConstants","uiGridCellNavService","uiGridCellNavConstants","$log","$compile",function(a,b,c,d,e,f,g,h){return{replace:!0,priority:-99999,require:["^uiGrid","^uiGridRenderContainer","?^uiGridCellnav"],scope:!1,compile:function(){return{pre:function(a,b,c,d){},post:function(a,b,c,d){var e=d[0],f=d[1];if(e.grid.api.cellNav){var g=f.containerId;if("body"===g){var h=e.grid;h.api.core.on.scrollBegin(a,function(a){var b=e.grid.api.cellNav.getFocusedCell();null!==b&&f.colContainer.containsColumn(b.col)&&e.cellNav.clearFocus()}),h.api.core.on.scrollEnd(a,function(a){var b=e.grid.api.cellNav.getFocusedCell();null!==b&&f.colContainer.containsColumn(b.col)&&e.cellNav.broadcastCellNav(b)}),h.api.cellNav.on.navigate(a,function(){e.focus()})}}}}}}}]),a.directive("uiGridCell",["$timeout","$document","uiGridCellNavService","gridUtil","uiGridCellNavConstants","uiGridConstants","GridRowColumn",function(a,b,c,d,e,f,g){return{priority:-150,restrict:"A",require:["^uiGrid","?^uiGridCellnav"],scope:!1,link:function(a,b,c,d){function f(a){a.preventDefault()}function h(){if(!a.focused){var c=b.find("div");c.addClass("ui-grid-cell-focus"),b.attr("aria-selected",!0),k.setAriaActivedescendant(b.attr("id")),a.focused=!0}}function i(){if(a.focused){var c=b.find("div");c.removeClass("ui-grid-cell-focus"),b.attr("aria-selected",!1),k.removeAriaActivedescendant(b.attr("id")),a.focused=!1}}var j=d[0],k=d[1];if(j.grid.api.cellNav&&a.col.colDef.allowCellFocus){var l=j.grid;a.focused=!1,b.attr("tabindex",-1),b.find("div").on("click",function(b){j.cellNav.broadcastCellNav(new g(a.row,a.col),b.ctrlKey||b.metaKey,b),b.stopPropagation(),a.$apply()}),b.on("mousedown",f),j.grid.api.edit&&(j.grid.api.edit.on.beginCellEdit(a,function(){b.off("mousedown",f)}),j.grid.api.edit.on.afterCellEdit(a,function(){b.on("mousedown",f)}),j.grid.api.edit.on.cancelCellEdit(a,function(){b.on("mousedown",f)})),b.on("focus",function(b){j.cellNav.broadcastCellNav(new g(a.row,a.col),!1,b),b.stopPropagation(),a.$apply()}),a.$on(e.CELL_NAV_EVENT,function(b,c,d){var e=l.cellNav.focusedCells.some(function(b,c){return b.row===a.row&&b.col===a.col});e?h():i()}),a.$on("$destroy",function(){b.find("div").off(),b.off()})}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.edit",["ui.grid"]);a.constant("uiGridEditConstants",{EDITABLE_CELL_TEMPLATE:/EDITABLE_CELL_TEMPLATE/g,EDITABLE_CELL_DIRECTIVE:/editable_cell_directive/g,events:{BEGIN_CELL_EDIT:"uiGridEventBeginCellEdit",END_CELL_EDIT:"uiGridEventEndCellEdit",CANCEL_CELL_EDIT:"uiGridEventCancelCellEdit"}}),a.service("uiGridEditService",["$q","uiGridConstants","gridUtil",function(a,b,c){var d={initializeGrid:function(a){d.defaultGridOptions(a.options),a.registerColumnBuilder(d.editColumnBuilder),a.edit={};var b={events:{edit:{afterCellEdit:function(a,b,c,d){},beginCellEdit:function(a,b,c){},cancelCellEdit:function(a,b){}}},methods:{edit:{}}};a.api.registerEventsFromObject(b.events)},defaultGridOptions:function(a){a.cellEditableCondition=void 0===a.cellEditableCondition?!0:a.cellEditableCondition,a.enableCellEditOnFocus=void 0===a.enableCellEditOnFocus?!1:a.enableCellEditOnFocus},editColumnBuilder:function(b,d,e){var f=[];return b.enableCellEdit=void 0===b.enableCellEdit?void 0===e.enableCellEdit?"object"!==b.type:e.enableCellEdit:b.enableCellEdit,b.cellEditableCondition=void 0===b.cellEditableCondition?e.cellEditableCondition:b.cellEditableCondition,b.enableCellEdit&&(b.editableCellTemplate=b.editableCellTemplate||e.editableCellTemplate||"ui-grid/cellEditor",f.push(c.getTemplate(b.editableCellTemplate).then(function(a){d.editableCellTemplate=a},function(a){throw new Error("Couldn't fetch/use colDef.editableCellTemplate '"+b.editableCellTemplate+"'")}))),b.enableCellEditOnFocus=void 0===b.enableCellEditOnFocus?e.enableCellEditOnFocus:b.enableCellEditOnFocus,a.all(f)},isStartEditKey:function(a){return a.metaKey||a.keyCode===b.keymap.ESC||a.keyCode===b.keymap.SHIFT||a.keyCode===b.keymap.CTRL||a.keyCode===b.keymap.ALT||a.keyCode===b.keymap.WIN||a.keyCode===b.keymap.CAPSLOCK||a.keyCode===b.keymap.LEFT||a.keyCode===b.keymap.TAB&&a.shiftKey||a.keyCode===b.keymap.RIGHT||a.keyCode===b.keymap.TAB||a.keyCode===b.keymap.UP||a.keyCode===b.keymap.ENTER&&a.shiftKey||a.keyCode===b.keymap.DOWN||a.keyCode===b.keymap.ENTER?!1:!0}};return d}]),a.directive("uiGridEdit",["gridUtil","uiGridEditService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["uiGridEditConstants",function(a){return{replace:!0,priority:-99998,require:["^uiGrid","^uiGridRenderContainer"],scope:!1,compile:function(){return{post:function(b,c,d,e){var f=e[0];if(f.grid.api.edit&&f.grid.api.cellNav){var g=e[1].containerId;"body"===g&&(b.$on(a.events.CANCEL_CELL_EDIT,function(){f.focus()}),b.$on(a.events.END_CELL_EDIT,function(){f.focus()}))}}}}}}]),a.directive("uiGridCell",["$compile","$injector","$timeout","uiGridConstants","uiGridEditConstants","gridUtil","$parse","uiGridEditService","$rootScope","$q",function(a,b,c,d,e,f,g,h,i,j){var k=500;if(b.has("uiGridCellNavService")){b.get("uiGridCellNavService")}return{priority:-100,restrict:"A",scope:!1,require:"?^uiGrid",link:function(b,l,m,n){function o(){l.on("dblclick",u),l.on("touchstart",p),n&&n.grid.api.cellNav&&(G=n.grid.api.cellNav.on.viewPortKeyDown(b,function(a,c){null!==c&&(c.row!==b.row||c.col!==b.col||b.col.colDef.enableCellEditOnFocus||s(a))}),F=n.grid.api.cellNav.on.navigate(b,function(a,d){b.col.colDef.enableCellEditOnFocus&&(d&&a.row===d.row&&a.col===d.col||a.row!==b.row||a.col!==b.col||c(function(){u()}))})),b.beginEditEventsWired=!0}function p(a){"undefined"!=typeof a.originalEvent&&void 0!==a.originalEvent&&(a=a.originalEvent),l.on("touchend",q),C=c(function(){},k),C.then(function(){setTimeout(u,0),l.off("touchend",q)})}function q(a){c.cancel(C),l.off("touchend",q)}function r(){l.off("dblclick",u),l.off("keydown",s),l.off("touchstart",p),F(),G(),b.beginEditEventsWired=!1}function s(a){h.isStartEditKey(a)&&u(a)}function t(a,c){return!c.isSaving&&(angular.isFunction(a.colDef.cellEditableCondition)?a.colDef.cellEditableCondition(b):a.colDef.cellEditableCondition)}function u(a){b.grid.api.core.scrollToIfNecessary(b.row,b.col).then(function(){v(a)})}function v(h){if(!E&&t(b.col,b.row)){B=g(b.row.getQualifiedColField(b.col)),A=B(b),z=b.col.editableCellTemplate,z=b.col.colDef.editModelField?z.replace(d.MODEL_COL_FIELD,f.preEval("row.entity."+b.col.colDef.editModelField)):z.replace(d.MODEL_COL_FIELD,b.row.getQualifiedColField(b.col)),z=z.replace(d.COL_FIELD,"grid.getCellValue(row, col)");var k=b.col.colDef.editDropdownFilter?"|"+b.col.colDef.editDropdownFilter:"";z=z.replace(d.CUSTOM_FILTERS,k);var m="text";switch(b.col.colDef.type){case"boolean":m="checkbox";break;case"number":m="number";break;case"date":m="date"}z=z.replace("INPUT_TYPE",m);var n=b.col.colDef.editDropdownOptionsFunction;if(n)j.when(n(b.row.entity,b.col.colDef)).then(function(a){b.editDropdownOptionsArray=a});else{var o=b.col.colDef.editDropdownRowEntityOptionsArrayPath;o?b.editDropdownOptionsArray=y(b.row.entity,o):b.editDropdownOptionsArray=b.col.colDef.editDropdownOptionsArray}b.editDropdownIdLabel=b.col.colDef.editDropdownIdLabel?b.col.colDef.editDropdownIdLabel:"id",b.editDropdownValueLabel=b.col.colDef.editDropdownValueLabel?b.col.colDef.editDropdownValueLabel:"value";var p=function(){E=!0,r();var c=angular.element(z);l.append(c),D=b.$new(),a(c)(D);var d=angular.element(l.children()[0]);d.addClass("ui-grid-cell-contents-hidden")};i.$$phase?p():b.$apply(p);var q=b.col.grid.api.core.on.scrollBegin(b,function(){b.grid.disableScrolling||(w(),b.grid.api.edit.raise.afterCellEdit(b.row.entity,b.col.colDef,B(b),A),q(),s(),u())}),s=b.$on(e.events.END_CELL_EDIT,function(){w(),b.grid.api.edit.raise.afterCellEdit(b.row.entity,b.col.colDef,B(b),A),s(),q(),u()}),u=b.$on(e.events.CANCEL_CELL_EDIT,function(){x(),u(),q(),s()});b.$broadcast(e.events.BEGIN_CELL_EDIT,h),c(function(){b.grid.api.edit.raise.beginCellEdit(b.row.entity,b.col.colDef,h)})}}function w(){if(b.grid.disableScrolling=!1,E){n&&n.grid.api.cellNav&&n.focus();var a=angular.element(l.children()[0]);D.$destroy(),angular.element(l.children()[1]).remove(),a.removeClass("ui-grid-cell-contents-hidden"),E=!1,o(),b.grid.api.core.notifyDataChange(d.dataChange.EDIT)}}function x(){b.grid.disableScrolling=!1,E&&(B.assign(b,A),b.$apply(),b.grid.api.edit.raise.cancelCellEdit(b.row.entity,b.col.colDef),w())}function y(a,b){b=b.replace(/\[(\w+)\]/g,".$1"),b=b.replace(/^\./,"");for(var c=b.split(".");c.length;){var d=c.shift();if(!(d in a))return;a=a[d]}return a}var z,A,B,C,D,E=!1;if(b.col.colDef.enableCellEdit){var F=function(){},G=function(){},H=function(){b.col.colDef.enableCellEdit&&b.row.enableCellEdit!==!1?b.beginEditEventsWired||o():b.beginEditEventsWired&&r()};H();var I=b.$watch("row",function(a,b){a!==b&&H()});b.$on("$destroy",I)}}}}]),a.directive("uiGridEditor",["gridUtil","uiGridConstants","uiGridEditConstants","$timeout","uiGridEditService",function(a,b,c,d,e){return{scope:!0,require:["?^uiGrid","?^uiGridRenderContainer","ngModel"],compile:function(){return{pre:function(a,b,c){},post:function(a,f,g,h){var i,j,k;h[0]&&(i=h[0]),h[1]&&(j=h[1]),h[2]&&(k=h[2]),a.$on(c.events.BEGIN_CELL_EDIT,function(b,c){if(d(function(){if(f[0].focus(),!a.col.colDef.enableCellEditOnFocus&&i&&i.grid.api.cellNav)try{f[0].setSelectionRange(f[0].value.length,f[0].value.length)}catch(b){}else f[0].select()}),i&&i.grid.api.cellNav)var g=i.grid.api.cellNav.on.viewPortKeyPress(a,function(a,b){e.isStartEditKey(a)&&(k.$setViewValue(String.fromCharCode("number"==typeof a.which?a.which:a.keyCode),a),k.$render()),g()});f.on("blur",function(b){a.stopEdit(b)})}),a.deepEdit=!1,a.stopEdit=function(b){a.inputForm&&!a.inputForm.$valid?(b.stopPropagation(),a.$emit(c.events.CANCEL_CELL_EDIT)):a.$emit(c.events.END_CELL_EDIT),a.deepEdit=!1},f.on("click",function(b){"checkbox"!==f[0].type&&(a.deepEdit=!0,d(function(){a.grid.disableScrolling=!0}))}),f.on("keydown",function(d){switch(d.keyCode){case b.keymap.ESC:d.stopPropagation(),a.$emit(c.events.CANCEL_CELL_EDIT)}if(!a.deepEdit||d.keyCode!==b.keymap.LEFT&&d.keyCode!==b.keymap.RIGHT&&d.keyCode!==b.keymap.UP&&d.keyCode!==b.keymap.DOWN)if(i&&i.grid.api.cellNav)d.uiGridTargetRenderContainerId=j.containerId,null!==i.cellNav.handleKeyDown(d)&&a.stopEdit(d);else switch(d.keyCode){case b.keymap.ENTER:case b.keymap.TAB:d.stopPropagation(),d.preventDefault(),a.stopEdit(d)}else d.stopPropagation();return!0})}}}}}]),a.directive("uiGridEditor",["$filter",function(a){function b(a){if("undefined"==typeof a||""===a)return null;var b=a.split("-");if(3!==b.length)return null;var c=parseInt(b[0],10),d=parseInt(b[1],10),e=parseInt(b[2],10);return 1>d||1>c||1>e?null:new Date(c,d-1,e)}return{priority:-100,require:"?ngModel",link:function(c,d,e,f){2===angular.version.minor&&e.type&&"date"===e.type&&f&&(f.$formatters.push(function(b){return f.$setValidity(null,!b||!isNaN(b.getTime())),a("date")(b,"yyyy-MM-dd")}),f.$parsers.push(function(a){if(a&&a.length>0){var c=b(a);return f.$setValidity(null,c&&!isNaN(c.getTime())),c}return f.$setValidity(null,!0),null}))}}}]),a.directive("uiGridEditDropdown",["uiGridConstants","uiGridEditConstants",function(a,b){return{require:["?^uiGrid","?^uiGridRenderContainer"],scope:!0,compile:function(){return{pre:function(a,b,c){},post:function(c,d,e,f){var g=f[0],h=f[1];c.$on(b.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].style.width=d[0].parentElement.offsetWidth-1+"px",d.on("blur",function(a){c.stopEdit(a)})}),c.stopEdit=function(a){c.$emit(b.events.END_CELL_EDIT)},d.on("keydown",function(d){switch(d.keyCode){case a.keymap.ESC:d.stopPropagation(),c.$emit(b.events.CANCEL_CELL_EDIT)}if(g&&g.grid.api.cellNav)d.uiGridTargetRenderContainerId=h.containerId,null!==g.cellNav.handleKeyDown(d)&&c.stopEdit(d);else switch(d.keyCode){case a.keymap.ENTER:case a.keymap.TAB:d.stopPropagation(),d.preventDefault(),c.stopEdit(d)}return!0})}}}}}]),a.directive("uiGridEditFileChooser",["gridUtil","uiGridConstants","uiGridEditConstants","$timeout",function(a,b,c,d){return{scope:!0,require:["?^uiGrid","?^uiGridRenderContainer"],compile:function(){return{pre:function(a,b,c){},post:function(b,d,e,f){var g,h;f[0]&&(g=f[0]),f[1]&&(h=f[1]);var i=(g.grid,function(d){var e=d.srcElement||d.target;e&&e.files&&e.files.length>0?("function"==typeof b.col.colDef.editFileChooserCallback?b.col.colDef.editFileChooserCallback(b.row,b.col,e.files):a.logError("You need to set colDef.editFileChooserCallback to use the file chooser"),e.form.reset(),b.$emit(c.events.END_CELL_EDIT)):b.$emit(c.events.CANCEL_CELL_EDIT)});d[0].addEventListener("change",i,!1),b.$on(c.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].select(),d.on("blur",function(a){b.$emit(c.events.END_CELL_EDIT)})})}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.expandable",["ui.grid"]);a.service("uiGridExpandableService",["gridUtil","$compile",function(a,b){var c={initializeGrid:function(b){b.expandable={},b.expandable.expandedAll=!1,b.options.enableExpandable=b.options.enableExpandable!==!1,b.options.expandableRowHeight=b.options.expandableRowHeight||150,b.options.expandableRowHeaderWidth=b.options.expandableRowHeaderWidth||40,b.options.enableExpandable&&!b.options.expandableRowTemplate&&(a.logError("You have not set the expandableRowTemplate, disabling expandable module"),b.options.enableExpandable=!1);var d={events:{expandable:{rowExpandedBeforeStateChanged:function(a,b){},rowExpandedStateChanged:function(a,b){}}},methods:{expandable:{toggleRowExpansion:function(a){var d=b.getRow(a);null!==d&&c.toggleRowExpansion(b,d)},expandAllRows:function(){c.expandAllRows(b)},collapseAllRows:function(){c.collapseAllRows(b)},toggleAllRows:function(){c.toggleAllRows(b)}}}};b.api.registerEventsFromObject(d.events),b.api.registerMethodsFromObject(d.methods)},toggleRowExpansion:function(a,b){a.api.expandable.raise.rowExpandedBeforeStateChanged(b),b.isExpanded=!b.isExpanded,angular.isUndefined(b.expandedRowHeight)&&(b.expandedRowHeight=a.options.expandableRowHeight),b.isExpanded?b.height=b.grid.options.rowHeight+b.expandedRowHeight:(b.height=b.grid.options.rowHeight,a.expandable.expandedAll=!1),a.api.expandable.raise.rowExpandedStateChanged(b)},expandAllRows:function(a,b){a.renderContainers.body.visibleRowCache.forEach(function(b){b.isExpanded||c.toggleRowExpansion(a,b)}),a.expandable.expandedAll=!0,a.queueGridRefresh()},collapseAllRows:function(a){a.renderContainers.body.visibleRowCache.forEach(function(b){b.isExpanded&&c.toggleRowExpansion(a,b)}),a.expandable.expandedAll=!1,a.queueGridRefresh()},toggleAllRows:function(a){a.expandable.expandedAll?c.collapseAllRows(a):c.expandAllRows(a)}};return c}]),a.directive("uiGridExpandable",["uiGridExpandableService","$templateCache",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,d,e,f){if(f.grid.options.enableExpandableRowHeader!==!1){var g={name:"expandableButtons",displayName:"",exporterSuppressExport:!0,enableColumnResizing:!1,enableColumnMenu:!1,width:f.grid.options.expandableRowHeaderWidth||40};g.cellTemplate=b.get("ui-grid/expandableRowHeader"),g.headerCellTemplate=b.get("ui-grid/expandableTopRowHeader"),f.grid.addRowHeaderColumn(g)}a.initializeGrid(f.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGrid",["uiGridExpandableService","$templateCache",function(a,b){return{replace:!0,priority:599,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,b,c,d){d.grid.api.core.on.renderingComplete(a,function(){a.row&&a.row.grid&&a.row.grid.options&&a.row.grid.options.enableExpandable&&(d.grid.parentRow=a.row)})},post:function(a,b,c,d){}}}}}]),a.directive("uiGridExpandableRow",["uiGridExpandableService","$timeout","$compile","uiGridConstants","gridUtil","$interval","$log",function(a,b,c,d,e,f,g){return{replace:!1,priority:0,scope:!1,compile:function(){return{pre:function(a,b,d,f){e.getTemplate(a.grid.options.expandableRowTemplate).then(function(d){if(a.grid.options.expandableRowScope){var e=a.grid.options.expandableRowScope;for(var f in e)e.hasOwnProperty(f)&&(a[f]=e[f])}var g=c(d)(a);b.append(g),a.row.expandedRendered=!0})},post:function(a,b,c,d){a.$on("$destroy",function(){a.row.expandedRendered=!1})}}}}}]),a.directive("uiGridRow",["$compile","gridUtil","$templateCache",function(a,b,c){return{priority:-200,scope:!1,compile:function(a,b){return{pre:function(a,b,c,d){a.expandableRow={},a.expandableRow.shouldRenderExpand=function(){var b="body"===a.colContainer.name&&a.grid.options.enableExpandable!==!1&&a.row.isExpanded&&(!a.grid.isScrollingVertically||a.row.expandedRendered);return b},a.expandableRow.shouldRenderFiller=function(){var b=a.row.isExpanded&&("body"!==a.colContainer.name||a.grid.isScrollingVertically&&!a.row.expandedRendered);return b}},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["$compile","gridUtil","$templateCache",function(a,b,c){return{priority:-200,scope:!1,compile:function(a,b){var d=angular.element(a.children().children()[0]),e=c.get("ui-grid/expandableScrollFiller"),f=c.get("ui-grid/expandableRow");return d.append(f),d.append(e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.exporter",["ui.grid"]);a.constant("uiGridExporterConstants",{featureName:"exporter",ALL:"all",VISIBLE:"visible",SELECTED:"selected",CSV_CONTENT:"CSV_CONTENT",BUTTON_LABEL:"BUTTON_LABEL",FILE_NAME:"FILE_NAME"}),a.service("uiGridExporterService",["$q","uiGridExporterConstants","gridUtil","$compile","$interval","i18nService",function(a,b,c,d,e,f){var g={delay:100,initializeGrid:function(a){a.exporter={},this.defaultGridOptions(a.options);var b={events:{exporter:{}},methods:{exporter:{csvExport:function(b,c){g.csvExport(a,b,c)},pdfExport:function(b,c){g.pdfExport(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods),a.api.core.addToGridMenu?g.addToMenu(a):e(function(){a.api.core.addToGridMenu&&g.addToMenu(a)},this.delay,1)},defaultGridOptions:function(a){a.exporterSuppressMenu=a.exporterSuppressMenu===!0,a.exporterMenuLabel=a.exporterMenuLabel?a.exporterMenuLabel:"Export",a.exporterSuppressColumns=a.exporterSuppressColumns?a.exporterSuppressColumns:[],a.exporterCsvColumnSeparator=a.exporterCsvColumnSeparator?a.exporterCsvColumnSeparator:",",a.exporterCsvFilename=a.exporterCsvFilename?a.exporterCsvFilename:"download.csv",a.exporterPdfFilename=a.exporterPdfFilename?a.exporterPdfFilename:"download.pdf",a.exporterOlderExcelCompatibility=a.exporterOlderExcelCompatibility===!0,a.exporterPdfDefaultStyle=a.exporterPdfDefaultStyle?a.exporterPdfDefaultStyle:{fontSize:11},a.exporterPdfTableStyle=a.exporterPdfTableStyle?a.exporterPdfTableStyle:{margin:[0,5,0,15]},a.exporterPdfTableHeaderStyle=a.exporterPdfTableHeaderStyle?a.exporterPdfTableHeaderStyle:{bold:!0,fontSize:12,color:"black"},a.exporterPdfHeader=a.exporterPdfHeader?a.exporterPdfHeader:null,a.exporterPdfFooter=a.exporterPdfFooter?a.exporterPdfFooter:null,a.exporterPdfOrientation=a.exporterPdfOrientation?a.exporterPdfOrientation:"landscape",a.exporterPdfPageSize=a.exporterPdfPageSize?a.exporterPdfPageSize:"A4",a.exporterPdfMaxGridWidth=a.exporterPdfMaxGridWidth?a.exporterPdfMaxGridWidth:720,a.exporterMenuAllData=void 0!==a.exporterMenuAllData?a.exporterMenuAllData:!0,a.exporterMenuVisibleData=void 0!==a.exporterMenuVisibleData?a.exporterMenuVisibleData:!0,a.exporterMenuSelectedData=void 0!==a.exporterMenuSelectedData?a.exporterMenuSelectedData:!0,a.exporterMenuCsv=void 0!==a.exporterMenuCsv?a.exporterMenuCsv:!0,a.exporterMenuPdf=void 0!==a.exporterMenuPdf?a.exporterMenuPdf:!0,a.exporterPdfCustomFormatter=a.exporterPdfCustomFormatter&&"function"==typeof a.exporterPdfCustomFormatter?a.exporterPdfCustomFormatter:function(a){return a},a.exporterHeaderFilterUseName=a.exporterHeaderFilterUseName===!0,a.exporterFieldCallback=a.exporterFieldCallback?a.exporterFieldCallback:function(a,b,c,d){return d},a.exporterAllDataFn=a.exporterAllDataFn?a.exporterAllDataFn:null,null==a.exporterAllDataFn&&a.exporterAllDataPromise&&(a.exporterAllDataFn=a.exporterAllDataPromise)},addToMenu:function(a){a.api.core.addToGridMenu(a,[{title:f.getSafeText("gridMenu.exporterAllAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.ALL,b.ALL)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuAllData},order:200},{title:f.getSafeText("gridMenu.exporterVisibleAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.VISIBLE,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuVisibleData},order:201},{title:f.getSafeText("gridMenu.exporterSelectedAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.SELECTED,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuSelectedData&&this.grid.api.selection&&this.grid.api.selection.getSelectedRows().length>0},order:202},{title:f.getSafeText("gridMenu.exporterAllAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.ALL,b.ALL)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuAllData},order:203},{title:f.getSafeText("gridMenu.exporterVisibleAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.VISIBLE,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuVisibleData},order:204},{title:f.getSafeText("gridMenu.exporterSelectedAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.SELECTED,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuSelectedData&&this.grid.api.selection&&this.grid.api.selection.getSelectedRows().length>0},order:205}])},csvExport:function(a,b,c){var d=this;this.loadAllDataIfNeeded(a,b,c).then(function(){var e=a.options.showHeader?d.getColumnHeaders(a,c):[],f=d.getData(a,b,c),g=d.formatAsCsv(e,f,a.options.exporterCsvColumnSeparator);d.downloadFile(a.options.exporterCsvFilename,g,a.options.exporterOlderExcelCompatibility)})},loadAllDataIfNeeded:function(c,d,e){if(d===b.ALL&&c.rows.length!==c.options.totalItems&&c.options.exporterAllDataFn)return c.options.exporterAllDataFn().then(function(){c.modifyRows(c.options.data)});var f=a.defer();return f.resolve(),f.promise},getColumnHeaders:function(a,c){var d,e=[];if(c===b.ALL)d=a.columns;else{var f=a.renderContainers.left?a.renderContainers.left.visibleColumnCache.filter(function(a){return a.visible}):[],g=a.renderContainers.body?a.renderContainers.body.visibleColumnCache.filter(function(a){return a.visible}):[],h=a.renderContainers.right?a.renderContainers.right.visibleColumnCache.filter(function(a){return a.visible}):[];d=f.concat(g,h)}return d.forEach(function(b,c){b.colDef.exporterSuppressExport!==!0&&-1===a.options.exporterSuppressColumns.indexOf(b.name)&&e.push({name:b.field,displayName:a.options.exporterHeaderFilter?a.options.exporterHeaderFilterUseName?a.options.exporterHeaderFilter(b.name):a.options.exporterHeaderFilter(b.displayName):b.displayName,width:b.drawnWidth?b.drawnWidth:b.width,align:"number"===b.colDef.type?"right":"left"})}),e},getData:function(a,d,e,f){var g,h,i=[];switch(d){case b.ALL:g=a.rows;break;case b.VISIBLE:g=a.getVisibleRows();break;case b.SELECTED:a.api.selection?g=a.api.selection.getSelectedGridRows():c.logError("selection feature must be enabled to allow selected rows to be exported")}if(e===b.ALL)h=a.columns;else{var j=a.renderContainers.left?a.renderContainers.left.visibleColumnCache.filter(function(a){return a.visible}):[],k=a.renderContainers.body?a.renderContainers.body.visibleColumnCache.filter(function(a){return a.visible}):[],l=a.renderContainers.right?a.renderContainers.right.visibleColumnCache.filter(function(a){return a.visible}):[];h=j.concat(k,l)}return g.forEach(function(c,d){if(c.exporterEnableExporting!==!1){var g=[];h.forEach(function(d,h){if((d.visible||e===b.ALL)&&d.colDef.exporterSuppressExport!==!0&&-1===a.options.exporterSuppressColumns.indexOf(d.name)){var i=f?a.getCellDisplayValue(c,d):a.getCellValue(c,d),j={value:a.options.exporterFieldCallback(a,c,d,i)};d.colDef.exporterPdfAlign&&(j.alignment=d.colDef.exporterPdfAlign),g.push(j)}}),i.push(g)}}),i},formatAsCsv:function(a,b,c){var d=this,e=a.map(function(a){return{value:a.displayName}}),f=e.length>0?d.formatRowAsCsv(this,c)(e)+"\n":"";return f+=b.map(this.formatRowAsCsv(this,c)).join("\n")},formatRowAsCsv:function(a,b){return function(c){return c.map(a.formatFieldAsCsv).join(b)}},formatFieldAsCsv:function(a){return null==a.value?"":"number"==typeof a.value?a.value:"boolean"==typeof a.value?a.value?"TRUE":"FALSE":"string"==typeof a.value?'"'+a.value.replace(/"/g,'""')+'"':JSON.stringify(a.value)},isIE:function(){var a=navigator.userAgent.search(/(?:Edge|MSIE|Trident\/.*; rv:)/),b=!1;return-1!==a&&(b=!0),b},downloadFile:function(a,b,c){var d,e,f=document,g=f.createElement("a"),h="application/octet-stream;charset=utf-8";if(e=this.isIE(),e&&10>e){var i=f.createElement("iframe");return document.body.appendChild(i),i.contentWindow.document.open("text/html","replace"),i.contentWindow.document.write("sep=,\r\n"+b),i.contentWindow.document.close(),i.contentWindow.focus(),i.contentWindow.document.execCommand("SaveAs",!0,a),document.body.removeChild(i),!0}if(navigator.msSaveBlob)return navigator.msSaveOrOpenBlob(new Blob([c?"\ufeff":"",b],{type:h}),a);if("download"in g){var j=new Blob([c?"\ufeff":"",b],{type:h});d=URL.createObjectURL(j),g.setAttribute("download",a)}else d="data:"+h+","+encodeURIComponent(b),g.setAttribute("target","_blank");g.href=d,g.setAttribute("style","display:none;"),f.body.appendChild(g),setTimeout(function(){if(g.click)g.click();else if(document.createEvent){var a=document.createEvent("MouseEvents");a.initEvent("click",!0,!0),g.dispatchEvent(a)}f.body.removeChild(g)},this.delay)},pdfExport:function(a,b,c){var d=this;this.loadAllDataIfNeeded(a,b,c).then(function(){var e=d.getColumnHeaders(a,c),f=d.getData(a,b,c),g=d.prepareAsPdf(a,e,f);d.isIE()||-1!==navigator.appVersion.indexOf("Edge")?d.downloadPDF(a.options.exporterPdfFilename,g):pdfMake.createPdf(g).open()})},downloadPDF:function(a,b){var c,d=document;d.createElement("a");c=this.isIE();var e,f=pdfMake.createPdf(b);f.getBuffer(function(b){if(e=new Blob([b]),navigator.msSaveBlob)return navigator.msSaveBlob(e,a);if(c){var f=d.createElement("iframe");return document.body.appendChild(f),f.contentWindow.document.open("text/html","replace"),f.contentWindow.document.write(e),f.contentWindow.document.close(),f.contentWindow.focus(),f.contentWindow.document.execCommand("SaveAs",!0,a),document.body.removeChild(f),!0}})},prepareAsPdf:function(a,b,c){var d=this.calculatePdfHeaderWidths(a,b),e=b.map(function(a){return{text:a.displayName,style:"tableHeader"}}),f=c.map(this.formatRowAsPdf(this)),g=[e].concat(f),h={ -pageOrientation:a.options.exporterPdfOrientation,pageSize:a.options.exporterPdfPageSize,content:[{style:"tableStyle",table:{headerRows:1,widths:d,body:g}}],styles:{tableStyle:a.options.exporterPdfTableStyle,tableHeader:a.options.exporterPdfTableHeaderStyle},defaultStyle:a.options.exporterPdfDefaultStyle};return a.options.exporterPdfLayout&&(h.layout=a.options.exporterPdfLayout),a.options.exporterPdfHeader&&(h.header=a.options.exporterPdfHeader),a.options.exporterPdfFooter&&(h.footer=a.options.exporterPdfFooter),a.options.exporterPdfCustomFormatter&&(h=a.options.exporterPdfCustomFormatter(h)),h},calculatePdfHeaderWidths:function(a,b){var c=0;b.forEach(function(a){"number"==typeof a.width&&(c+=a.width)});var d=0;b.forEach(function(a){if("*"===a.width&&(d+=100),"string"==typeof a.width&&a.width.match(/(\d)*%/)){var b=parseInt(a.width.match(/(\d)*%/)[0]);a.width=c*b/100,d+=a.width}});var e=c+d;return b.map(function(b){return"*"===b.width?b.width:b.width*a.options.exporterPdfMaxGridWidth/e})},formatRowAsPdf:function(a){return function(b){return b.map(a.formatFieldAsPdfString)}},formatFieldAsPdfString:function(a){var b;return b=null==a.value?"":"number"==typeof a.value?a.value.toString():"boolean"==typeof a.value?a.value?"TRUE":"FALSE":"string"==typeof a.value?a.value.replace(/"/g,'""'):JSON.stringify(a.value).replace(/^"/,"").replace(/"$/,""),a.alignment&&"string"==typeof a.alignment&&(b={text:b,alignment:a.alignment}),b}};return g}]),a.directive("uiGridExporter",["uiGridExporterConstants","uiGridExporterService","gridUtil","$compile",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(e.grid),e.grid.exporter.$scope=a}}}])}(),function(){"use strict";var a=angular.module("ui.grid.grouping",["ui.grid","ui.grid.treeBase"]);a.constant("uiGridGroupingConstants",{featureName:"grouping",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridGroupingService",["$q","uiGridGroupingConstants","gridUtil","rowSorter","GridRow","gridClassFactory","i18nService","uiGridConstants","uiGridTreeBaseService",function(a,b,c,d,e,f,g,h,i){var j={initializeGrid:function(a,b){i.initializeGrid(a,b),a.grouping={},a.grouping.groupHeaderCache={},j.defaultGridOptions(a.options),a.registerRowsProcessor(j.groupRows,400),a.registerColumnBuilder(j.groupingColumnBuilder),a.registerColumnsProcessor(j.groupingColumnProcessor,400);var c={events:{grouping:{aggregationChanged:{},groupingChanged:{}}},methods:{grouping:{getGrouping:function(b){var c=j.getGrouping(a);return c.grouping.forEach(function(a){a.colName=a.col.name,delete a.col}),c.aggregations.forEach(function(a){a.colName=a.col.name,delete a.col}),c.aggregations=c.aggregations.filter(function(a){return!a.aggregation.source||"grouping"!==a.aggregation.source}),b&&(c.rowExpandedStates=j.getRowExpandedStates(a.grouping.groupingHeaderCache)),c},setGrouping:function(b){j.setGrouping(a,b)},groupColumn:function(b){var c=a.getColumn(b);j.groupColumn(a,c)},ungroupColumn:function(b){var c=a.getColumn(b);j.ungroupColumn(a,c)},clearGrouping:function(){j.clearGrouping(a)},aggregateColumn:function(b,c,d){var e=a.getColumn(b);j.aggregateColumn(a,e,c,d)}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods),a.api.core.on.sortChanged(b,j.tidyPriorities)},defaultGridOptions:function(a){a.enableGrouping=a.enableGrouping!==!1,a.groupingShowCounts=a.groupingShowCounts!==!1,a.groupingNullLabel="undefined"==typeof a.groupingNullLabel?"Null":a.groupingNullLabel,a.enableGroupHeaderSelection=a.enableGroupHeaderSelection===!0},groupingColumnBuilder:function(a,d,e){if(a.enableGrouping!==!1){"undefined"==typeof d.grouping&&"undefined"!=typeof a.grouping?(d.grouping=angular.copy(a.grouping),"undefined"!=typeof d.grouping.groupPriority&&d.grouping.groupPriority>-1&&(d.treeAggregationFn=i.nativeAggregations()[b.aggregation.COUNT].aggregationFn,d.treeAggregationFinalizerFn=j.groupedFinalizerFn)):"undefined"==typeof d.grouping&&(d.grouping={}),"undefined"!=typeof d.grouping&&"undefined"!=typeof d.grouping.groupPriority&&d.grouping.groupPriority>=0&&(d.suppressRemoveSort=!0);var f={name:"ui.grid.grouping.group",title:g.get().grouping.group,icon:"ui-grid-icon-indent-right",shown:function(){return"undefined"==typeof this.context.col.grouping||"undefined"==typeof this.context.col.grouping.groupPriority||this.context.col.grouping.groupPriority<0},action:function(){j.groupColumn(this.context.col.grid,this.context.col)}},h={name:"ui.grid.grouping.ungroup",title:g.get().grouping.ungroup,icon:"ui-grid-icon-indent-left",shown:function(){return"undefined"!=typeof this.context.col.grouping&&"undefined"!=typeof this.context.col.grouping.groupPriority&&this.context.col.grouping.groupPriority>=0},action:function(){j.ungroupColumn(this.context.col.grid,this.context.col)}},k={name:"ui.grid.grouping.aggregateRemove",title:g.get().grouping.aggregate_remove,shown:function(){return"undefined"!=typeof this.context.col.treeAggregationFn},action:function(){j.aggregateColumn(this.context.col.grid,this.context.col,null)}},l=function(a,b){b=b||g.get().grouping["aggregate_"+a]||a;var e={name:"ui.grid.grouping.aggregate"+a,title:b,shown:function(){return"undefined"==typeof this.context.col.treeAggregation||"undefined"==typeof this.context.col.treeAggregation.type||this.context.col.treeAggregation.type!==a},action:function(){j.aggregateColumn(this.context.col.grid,this.context.col,a)}};c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.aggregate"+a)||d.menuItems.push(e)};d.colDef.groupingShowGroupingMenu!==!1&&(c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.group")||d.menuItems.push(f),c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.ungroup")||d.menuItems.push(h)),d.colDef.groupingShowAggregationMenu!==!1&&(angular.forEach(i.nativeAggregations(),function(a,b){l(b)}),angular.forEach(e.treeCustomAggregations,function(a,b){l(b,a.menuTitle)}),c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.aggregateRemove")||d.menuItems.push(k))}},groupingColumnProcessor:function(a,b){return a=j.moveGroupColumns(this,a,b)},groupedFinalizerFn:function(a){var b=this;"undefined"!=typeof a.groupVal?(a.rendered=a.groupVal,b.grid.options.groupingShowCounts&&"date"!==b.colDef.type&&(a.rendered+=" ("+a.value+")")):a.rendered=null},moveGroupColumns:function(a,b,c){return a.options.moveGroupColumns===!1?b:(b.forEach(function(a,b){a.groupingPosition=b}),b.sort(function(a,b){var c,d;return c=a.isRowHeader?-1e3:"undefined"==typeof a.grouping||"undefined"==typeof a.grouping.groupPriority||a.grouping.groupPriority<0?null:a.grouping.groupPriority,d=b.isRowHeader?-1e3:"undefined"==typeof b.grouping||"undefined"==typeof b.grouping.groupPriority||b.grouping.groupPriority<0?null:b.grouping.groupPriority,null!==c&&null===d?-1:null!==d&&null===c?1:null!==c&&null!==d?c-d:a.groupingPosition-b.groupingPosition}),b.forEach(function(a,b){delete a.groupingPosition}),b)},groupColumn:function(a,c){"undefined"==typeof c.grouping&&(c.grouping={});var d=j.getGrouping(a);c.grouping.groupPriority=d.grouping.length,c.sort?("undefined"==typeof c.sort.direction||null===c.sort.direction)&&(c.sort.direction=h.ASC):c.sort={direction:h.ASC},c.treeAggregation={type:b.aggregation.COUNT,source:"grouping"},c.treeAggregationFn=i.nativeAggregations()[b.aggregation.COUNT].aggregationFn,c.treeAggregationFinalizerFn=j.groupedFinalizerFn,a.api.grouping.raise.groupingChanged(c),a.api.core.raise.sortChanged(a,a.getColumnSorting()),a.queueGridRefresh()},ungroupColumn:function(a,b){"undefined"!=typeof b.grouping&&(delete b.grouping.groupPriority,delete b.treeAggregation,delete b.customTreeAggregationFinalizer,j.tidyPriorities(a),a.api.grouping.raise.groupingChanged(b),a.queueGridRefresh())},aggregateColumn:function(a,b,c){"undefined"!=typeof b.grouping&&"undefined"!=typeof b.grouping.groupPriority&&b.grouping.groupPriority>=0&&j.ungroupColumn(a,b);var d={};"undefined"!=typeof a.options.treeCustomAggregations[c]?d=a.options.treeCustomAggregations[c]:"undefined"!=typeof i.nativeAggregations()[c]&&(d=i.nativeAggregations()[c]),b.treeAggregation={type:c,label:g.get().aggregation[d.label]||d.label},b.treeAggregationFn=d.aggregationFn,b.treeAggregationFinalizerFn=d.finalizerFn,a.api.grouping.raise.aggregationChanged(b),a.queueGridRefresh()},setGrouping:function(a,b){"undefined"!=typeof b&&(j.clearGrouping(a),b.grouping&&b.grouping.length&&b.grouping.length>0&&b.grouping.forEach(function(b){var c=a.getColumn(b.colName);c&&j.groupColumn(a,c)}),b.aggregations&&b.aggregations.length&&b.aggregations.forEach(function(b){var c=a.getColumn(b.colName);c&&j.aggregateColumn(a,c,b.aggregation.type)}),b.rowExpandedStates&&j.applyRowExpandedStates(a.grouping.groupingHeaderCache,b.rowExpandedStates))},clearGrouping:function(a){var b=j.getGrouping(a);b.grouping.length>0&&b.grouping.forEach(function(b){b.col||(b.col=a.getColumn(b.colName)),j.ungroupColumn(a,b.col)}),b.aggregations.length>0&&b.aggregations.forEach(function(b){b.col||(b.col=a.getColumn(b.colName)),j.aggregateColumn(a,b.col,null)})},tidyPriorities:function(a){"undefined"!=typeof a&&"undefined"==typeof a.grid||"undefined"==typeof this.grid||(a=this.grid);var b=[],c=[];a.columns.forEach(function(a,d){"undefined"!=typeof a.grouping&&"undefined"!=typeof a.grouping.groupPriority&&a.grouping.groupPriority>=0?b.push(a):"undefined"!=typeof a.sort&&"undefined"!=typeof a.sort.priority&&a.sort.priority>=0&&c.push(a)}),b.sort(function(a,b){return a.grouping.groupPriority-b.grouping.groupPriority}),b.forEach(function(a,b){a.grouping.groupPriority=b,a.suppressRemoveSort=!0,"undefined"==typeof a.sort&&(a.sort={}),a.sort.priority=b});var d=b.length;c.sort(function(a,b){return a.sort.priority-b.sort.priority}),c.forEach(function(a,b){a.sort.priority=d,a.suppressRemoveSort=a.colDef.suppressRemoveSort,d++})},groupRows:function(a){if(0===a.length)return a;var b=this;b.grouping.oldGroupingHeaderCache=b.grouping.groupingHeaderCache||{},b.grouping.groupingHeaderCache={};for(var c=j.initialiseProcessingState(b),e=function(e,h){var i=b.getCellValue(g,e.col);e.initialised&&0===d.getSortFn(b,e.col,a)(i,e.currentValue)||(j.insertGroupHeader(b,a,f,c,h),f++)},f=0;f=0&&b.push({field:a.field,col:a,groupPriority:a.grouping.groupPriority,grouping:a.grouping}),a.treeAggregation&&a.treeAggregation.type&&c.push({field:a.field,col:a,aggregation:a.treeAggregation})}),b.sort(function(a,b){return a.groupPriority-b.groupPriority}),b.forEach(function(a,b){a.grouping.groupPriority=b,a.groupPriority=b,delete a.grouping}),{grouping:b,aggregations:c}},insertGroupHeader:function(a,b,c,d,g){var h=(d[g].fieldName,d[g].col),i=a.getCellValue(b[c],h),k=i;("undefined"==typeof i||null===i)&&(k=a.options.groupingNullLabel);for(var l=function(a){return angular.isObject(a)?JSON.stringify(a):a},m=a.grouping.oldGroupingHeaderCache,n=0;g>n;n++)m&&m[l(d[n].currentValue)]&&(m=m[l(d[n].currentValue)].children);var o;for(m&&m[l(i)]?(o=m[l(i)].row,o.entity={}):(o=new e({},null,a),f.rowTemplateAssigner.call(a,o)),o.entity["$$"+d[g].col.uid]={groupVal:k},o.treeLevel=g,o.groupHeader=!0,o.internalRow=!0,o.enableCellEdit=!1,o.enableSelection=a.options.enableGroupHeaderSelection,d[g].initialised=!0,d[g].currentValue=i,d[g].currentRow=o,j.finaliseProcessingState(d,g+1),b.splice(c,0,o),m=a.grouping.groupingHeaderCache,n=0;g>n;n++)m=m[l(d[n].currentValue)].children;m[l(i)]={row:o,children:{}}},finaliseProcessingState:function(a,b){for(var c=b;c 1 or < 1 file choosers within the menu item, error, cannot continue"):h[0].addEventListener("change",g,!1)}}}])}(),function(){"use strict";var a=angular.module("ui.grid.infiniteScroll",["ui.grid"]);a.service("uiGridInfiniteScrollService",["gridUtil","$compile","$timeout","uiGridConstants","ScrollEvent","$q",function(a,b,c,d,e,f){var g={initializeGrid:function(a,b){if(g.defaultGridOptions(a.options),a.options.enableInfiniteScroll){a.infiniteScroll={dataLoading:!1},g.setScrollDirections(a,a.options.infiniteScrollUp,a.options.infiniteScrollDown),a.api.core.on.scrollEnd(b,g.handleScroll);var c={events:{infiniteScroll:{needLoadMoreData:function(a,b){},needLoadMoreDataTop:function(a,b){}}},methods:{infiniteScroll:{dataLoaded:function(b,c){g.setScrollDirections(a,b,c);var d=g.adjustScroll(a).then(function(){a.infiniteScroll.dataLoading=!1});return d},resetScroll:function(b,c){return g.setScrollDirections(a,b,c),g.adjustInfiniteScrollPosition(a,0)},saveScrollPercentage:function(){a.infiniteScroll.prevScrollTop=a.renderContainers.body.prevScrollTop,a.infiniteScroll.previousVisibleRows=a.getVisibleRowCount()},dataRemovedTop:function(b,c){g.dataRemovedTop(a,b,c)},dataRemovedBottom:function(b,c){g.dataRemovedBottom(a,b,c)},setScrollDirections:function(b,c){g.setScrollDirections(a,b,c)}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)}},defaultGridOptions:function(a){a.enableInfiniteScroll=a.enableInfiniteScroll!==!1,a.infiniteScrollRowsFromEnd=a.infiniteScrollRowsFromEnd||20,a.infiniteScrollUp=a.infiniteScrollUp===!0,a.infiniteScrollDown=a.infiniteScrollDown!==!1},setScrollDirections:function(a,b,c){a.infiniteScroll.scrollUp=b===!0,a.suppressParentScrollUp=b===!0,a.infiniteScroll.scrollDown=c!==!1,a.suppressParentScrollDown=c!==!1},handleScroll:function(a){if(!(a.grid.infiniteScroll&&a.grid.infiniteScroll.dataLoading||"ui.grid.adjustInfiniteScrollPosition"===a.source)&&a.y){var b,c=a.grid.options.infiniteScrollRowsFromEnd/a.grid.renderContainers.body.visibleRowCache.length;a.grid.scrollDirection===d.scrollDirection.UP?(b=a.y.percentage,c>=b&&g.loadData(a.grid)):a.grid.scrollDirection===d.scrollDirection.DOWN&&(b=1-a.y.percentage,c>=b&&g.loadData(a.grid))}},loadData:function(a){a.infiniteScroll.previousVisibleRows=a.renderContainers.body.visibleRowCache.length,a.infiniteScroll.direction=a.scrollDirection,delete a.infiniteScroll.prevScrollTop,a.scrollDirection===d.scrollDirection.UP&&a.infiniteScroll.scrollUp?(a.infiniteScroll.dataLoading=!0,a.api.infiniteScroll.raise.needLoadMoreDataTop()):a.scrollDirection===d.scrollDirection.DOWN&&a.infiniteScroll.scrollDown&&(a.infiniteScroll.dataLoading=!0,a.api.infiniteScroll.raise.needLoadMoreData())},adjustScroll:function(a){var b=f.defer();return c(function(){var e,f,h,i,j;e=a.getViewportHeight()+a.headerHeight-a.renderContainers.body.headerHeight-a.scrollbarHeight,f=a.options.rowHeight,void 0===a.infiniteScroll.direction&&g.adjustInfiniteScrollPosition(a,0),h=a.getVisibleRowCount();var k=f*h;a.infiniteScroll.scrollDown&&e>k&&a.api.infiniteScroll.raise.needLoadMoreData(),a.infiniteScroll.direction===d.scrollDirection.UP&&(i=a.infiniteScroll.prevScrollTop||0,j=i+(h-a.infiniteScroll.previousVisibleRows)*f,g.adjustInfiniteScrollPosition(a,j),c(function(){b.resolve()})),a.infiniteScroll.direction===d.scrollDirection.DOWN&&(j=a.infiniteScroll.prevScrollTop||a.infiniteScroll.previousVisibleRows*f-e,g.adjustInfiniteScrollPosition(a,j),c(function(){b.resolve()}))},0),b.promise},adjustInfiniteScrollPosition:function(a,b){var c=new e(a,null,null,"ui.grid.adjustInfiniteScrollPosition"),d=a.getVisibleRowCount(),f=a.getViewportHeight()+a.headerHeight-a.renderContainers.body.headerHeight-a.scrollbarHeight,g=a.options.rowHeight,h=d*g-f;0===b&&a.infiniteScroll.scrollUp?c.y={percentage:1/h}:c.y={percentage:b/h},a.scrollContainers("",c)},dataRemovedTop:function(a,b,c){var d,e,f,h;return g.setScrollDirections(a,b,c),d=a.renderContainers.body.visibleRowCache.length,e=a.infiniteScroll.prevScrollTop,h=a.options.rowHeight,f=e-(a.infiniteScroll.previousVisibleRows-d)*h,g.adjustInfiniteScrollPosition(a,f)},dataRemovedBottom:function(a,b,c){var d;return g.setScrollDirections(a,b,c),d=a.infiniteScroll.prevScrollTop,g.adjustInfiniteScrollPosition(a,d)}};return g}]),a.directive("uiGridInfiniteScroll",["uiGridInfiniteScrollService",function(a){return{priority:-200,scope:!1,require:"^uiGrid",compile:function(b,c,d){return{pre:function(b,c,d,e){a.initializeGrid(e.grid,b)},post:function(a,b,c){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.moveColumns",["ui.grid"]);a.service("uiGridMoveColumnService",["$q","$timeout","$log","ScrollEvent","uiGridConstants","gridUtil",function(a,b,c,d,e,f){var g={initializeGrid:function(a){var b=this;this.registerPublicApi(a),this.defaultGridOptions(a.options),a.moveColumns={orderCache:[]},a.registerColumnBuilder(b.movableColumnBuilder),a.registerDataChangeCallback(b.verifyColumnOrder,[e.dataChange.COLUMN])},registerPublicApi:function(a){var b=this,c={events:{colMovable:{columnPositionChanged:function(a,b,c){}}},methods:{colMovable:{moveColumn:function(c,d){var e=a.columns;if(!angular.isNumber(c)||!angular.isNumber(d))return void f.logError("MoveColumn: Please provide valid values for originalPosition and finalPosition");for(var g=0,h=0;h=e.length-g||d>=e.length-g)return void f.logError("MoveColumn: Invalid values for originalPosition, finalPosition");var i=function(a){for(var b=a,c=0;b>=c;c++)angular.isDefined(e[c])&&(angular.isDefined(e[c].colDef.visible)&&e[c].colDef.visible===!1||e[c].isRowHeader===!0)&&b++;return b};b.redrawColumnAtPosition(a,i(c),i(d))}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableColumnMoving=a.enableColumnMoving!==!1},movableColumnBuilder:function(b,c,d){var e=[];return b.enableColumnMoving=void 0===b.enableColumnMoving?d.enableColumnMoving:b.enableColumnMoving,a.all(e)},updateColumnCache:function(a){a.moveColumns.orderCache=a.getOnlyDataColumns()},verifyColumnOrder:function(a){var b,c=a.rowHeaderColumns.length;angular.forEach(a.moveColumns.orderCache,function(d,e){if(b=a.columns.indexOf(d),-1!==b&&b-c!==e){var f=a.columns.splice(b,1)[0];a.columns.splice(e+c,0,f)}})},redrawColumnAtPosition:function(a,c,d){if(c!==d){var f=a.columns,h=f[c];if(h.colDef.enableColumnMoving){if(c>d)for(var i=c;i>d;i--)f[i]=f[i-1];else if(d>c)for(var j=c;d>j;j++)f[j]=f[j+1];f[d]=h,g.updateColumnCache(a),a.queueGridRefresh(),b(function(){a.api.core.notifyDataChange(e.dataChange.COLUMN),a.api.colMovable.raise.columnPositionChanged(h.colDef,c,d)})}}}};return g}]),a.directive("uiGridMoveColumns",["uiGridMoveColumnService",function(a){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(b,c,d,e){a.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridHeaderCell",["$q","gridUtil","uiGridMoveColumnService","$document","$log","uiGridConstants","ScrollEvent",function(a,b,c,d,e,f,g){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(a,b,e,f){if(a.col.colDef.enableColumnMoving){var h,i,j,k,l,m,n=angular.element(b[0].querySelectorAll(".ui-grid-cell-contents")),o=!1,p=!1,q=function(b){h=a.grid.element[0].getBoundingClientRect().left,a.grid.hasLeftContainer()&&(h+=a.grid.renderContainers.left.header[0].getBoundingClientRect().width),i=b.pageX,j=0,k=h+a.grid.getViewportWidth(),"mousedown"===b.type?(d.on("mousemove",r),d.on("mouseup",s)):"touchstart"===b.type&&(d.on("touchmove",r),d.on("touchend",s))},r=function(a){var b=a.pageX-i;0!==b&&(document.onselectstart=function(){return!1},p=!0,o?o&&(w(b),i=a.pageX):v())},s=function(b){if(document.onselectstart=null,l&&(l.remove(),o=!1),u(),t(),p){for(var d=a.grid.columns,e=0,f=0;fj){for(var g=0,h=e-1;h>=0;h--)if((angular.isUndefined(d[h].colDef.visible)||d[h].colDef.visible===!0)&&(g+=d[h].drawnWidth||d[h].width||d[h].colDef.width,g>Math.abs(j))){c.redrawColumnAtPosition(a.grid,e,h+1);break}g0){for(var i=0,k=e+1;kj)){c.redrawColumnAtPosition(a.grid,e,k-1);break}j>i&&c.redrawColumnAtPosition(a.grid,e,d.length-1)}}},t=function(){n.on("touchstart",q),n.on("mousedown",q)},u=function(){n.off("touchstart",q),n.off("mousedown",q),d.off("mousemove",r),d.off("touchmove",r),d.off("mouseup",s),d.off("touchend",s)};t();var v=function(){o=!0,l=b.clone(),b.parent().append(l),l.addClass("movingColumn");var c={};c.left=b[0].offsetLeft+"px";var d=a.grid.element[0].getBoundingClientRect().right,e=b[0].getBoundingClientRect().right;e>d&&(m=a.col.drawnWidth+(d-e),c.width=m+"px"),l.css(c)},w=function(b){for(var c=a.grid.columns,d=0,e=0;ei?i:k,(n>=h||b>0)&&(k>=o||0>b))l.css({visibility:"visible",left:l[0].offsetLeft+(k>i?b:k-n)+"px"});else if(d>Math.ceil(f.grid.gridWidth)){b*=8;var p=new g(a.col.grid,null,null,"uiGridHeaderCell.moveElement");p.x={pixels:b},p.grid.scrollContainers("",p)}for(var q=0,r=0;r0?a.options.paginationCurrentPage=Math.min(a.options.paginationCurrentPage+1,c.methods.pagination.getTotalPages()):a.options.paginationCurrentPage++)},previousPage:function(){a.options.enablePagination&&(a.options.paginationCurrentPage=Math.max(a.options.paginationCurrentPage-1,1))},seek:function(b){if(a.options.enablePagination){if(!angular.isNumber(b)||1>b)throw"Invalid page number: "+b;a.options.paginationCurrentPage=Math.min(b,c.methods.pagination.getTotalPages())}}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods);var d=function(b){if(a.options.useExternalPagination||!a.options.enablePagination)return b;var c=parseInt(a.options.paginationPageSize,10),d=parseInt(a.options.paginationCurrentPage,10),e=b.filter(function(a){return a.visible});a.options.totalItems=e.length;var f=(d-1)*c;return f>e.length&&(d=a.options.paginationCurrentPage=1,f=(d-1)*c),e.slice(f,f+c)};a.registerRowsProcessor(d,900)},defaultGridOptions:function(b){b.enablePagination=b.enablePagination!==!1,b.enablePaginationControls=b.enablePaginationControls!==!1,b.useExternalPagination=b.useExternalPagination===!0,a.isNullOrUndefined(b.totalItems)&&(b.totalItems=0),a.isNullOrUndefined(b.paginationPageSizes)&&(b.paginationPageSizes=[250,500,1e3]),a.isNullOrUndefined(b.paginationPageSize)&&(b.paginationPageSizes.length>0?b.paginationPageSize=b.paginationPageSizes[0]:b.paginationPageSize=0),a.isNullOrUndefined(b.paginationCurrentPage)&&(b.paginationCurrentPage=1),a.isNullOrUndefined(b.paginationTemplate)&&(b.paginationTemplate="ui-grid/pagination")},onPaginationChanged:function(a,b,c){a.api.pagination.raise.paginationChanged(b,c),a.options.useExternalPagination||a.queueGridRefresh()}};return b}]),a.directive("uiGridPagination",["gridUtil","uiGridPaginationService",function(a,b){return{priority:-200,scope:!1,require:"uiGrid",link:{pre:function(c,d,e,f){b.initializeGrid(f.grid),a.getTemplate(f.grid.options.paginationTemplate).then(function(a){var b=angular.element(a);d.append(b),f.innerCompile(b)})}}}}]),a.directive("uiGridPager",["uiGridPaginationService","uiGridConstants","gridUtil","i18nService",function(a,b,c,d){return{priority:-200,scope:!0,require:"^uiGrid",link:function(e,f,g,h){var i=".ui-grid-pager-control-input";e.aria=d.getSafeText("pagination.aria"),e.paginationApi=h.grid.api.pagination,e.sizesLabel=d.getSafeText("pagination.sizes"),e.totalItemsLabel=d.getSafeText("pagination.totalItems"),e.paginationOf=d.getSafeText("pagination.of"),e.paginationThrough=d.getSafeText("pagination.through");var j=h.grid.options;h.grid.renderContainers.body.registerViewportAdjuster(function(a){return a.height=a.height-c.elementHeight(f,"padding"),a});var k=h.grid.registerDataChangeCallback(function(a){a.options.useExternalPagination||(a.options.totalItems=a.rows.length)},[b.dataChange.ROW]);e.$on("$destroy",k);var l=function(){e.showingLow=(j.paginationCurrentPage-1)*j.paginationPageSize+1,e.showingHigh=Math.min(j.paginationCurrentPage*j.paginationPageSize,j.totalItems); -},m=e.$watch("grid.options.totalItems + grid.options.paginationPageSize",l),n=e.$watch("grid.options.paginationCurrentPage + grid.options.paginationPageSize",function(b,c){if(b!==c&&void 0!==c){if(!angular.isNumber(j.paginationCurrentPage)||j.paginationCurrentPage<1)return void(j.paginationCurrentPage=1);if(j.totalItems>0&&j.paginationCurrentPage>e.paginationApi.getTotalPages())return void(j.paginationCurrentPage=e.paginationApi.getTotalPages());l(),a.onPaginationChanged(e.grid,j.paginationCurrentPage,j.paginationPageSize)}});e.$on("$destroy",function(){m(),n()}),e.cantPageForward=function(){return j.totalItems>0?j.paginationCurrentPage>=e.paginationApi.getTotalPages():j.data.length<1},e.cantPageToLast=function(){return j.totalItems>0?e.cantPageForward():!0},e.cantPageBackward=function(){return j.paginationCurrentPage<=1};var o=function(a){a&&c.focus.bySelector(f,i)};e.pageFirstPageClick=function(){e.paginationApi.seek(1),o(e.cantPageBackward())},e.pagePreviousPageClick=function(){e.paginationApi.previousPage(),o(e.cantPageBackward())},e.pageNextPageClick=function(){e.paginationApi.nextPage(),o(e.cantPageForward())},e.pageLastPageClick=function(){e.paginationApi.seek(e.paginationApi.getTotalPages()),o(e.cantPageToLast())}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.pinning",["ui.grid"]);a.constant("uiGridPinningConstants",{container:{LEFT:"left",RIGHT:"right",NONE:""}}),a.service("uiGridPinningService",["gridUtil","GridRenderContainer","i18nService","uiGridPinningConstants",function(a,b,c,d){var e={initializeGrid:function(a){e.defaultGridOptions(a.options),a.registerColumnBuilder(e.pinningColumnBuilder);var b={events:{pinning:{columnPinned:function(a,b){}}},methods:{pinning:{pinColumn:function(b,c){e.pinColumn(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.enablePinning=a.enablePinning!==!1},pinningColumnBuilder:function(b,f,g){if(b.enablePinning=void 0===b.enablePinning?g.enablePinning:b.enablePinning,b.pinnedLeft?(f.renderContainer="left",f.grid.createLeftContainer()):b.pinnedRight&&(f.renderContainer="right",f.grid.createRightContainer()),b.enablePinning){var h={name:"ui.grid.pinning.pinLeft",title:c.get().pinning.pinLeft,icon:"ui-grid-icon-left-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"left"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.LEFT)}},i={name:"ui.grid.pinning.pinRight",title:c.get().pinning.pinRight,icon:"ui-grid-icon-right-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"right"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.RIGHT)}},j={name:"ui.grid.pinning.unpin",title:c.get().pinning.unpin,icon:"ui-grid-icon-cancel",shown:function(){return"undefined"!=typeof this.context.col.renderContainer&&null!==this.context.col.renderContainer&&"body"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.UNPIN)}};a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.pinLeft")||f.menuItems.push(h),a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.pinRight")||f.menuItems.push(i),a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.unpin")||f.menuItems.push(j)}},pinColumn:function(a,b,c){c===d.container.NONE?b.renderContainer=null:(b.renderContainer=c,c===d.container.LEFT?a.createLeftContainer():c===d.container.RIGHT&&a.createRightContainer()),a.refresh().then(function(){a.api.pinning.raise.columnPinned(b.colDef,c)})}};return e}]),a.directive("uiGridPinning",["gridUtil","uiGridPinningService",function(a,b){return{require:"uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.resizeColumns",["ui.grid"]);a.service("uiGridResizeColumnsService",["gridUtil","$q","$timeout",function(a,b,c){var d={defaultGridOptions:function(a){a.enableColumnResizing=a.enableColumnResizing!==!1,a.enableColumnResize===!1&&(a.enableColumnResizing=!1)},colResizerColumnBuilder:function(a,c,d){var e=[];return a.enableColumnResizing=void 0===a.enableColumnResizing?d.enableColumnResizing:a.enableColumnResizing,a.enableColumnResize===!1&&(a.enableColumnResizing=!1),b.all(e)},registerPublicApi:function(a){var b={events:{colResizable:{columnSizeChanged:function(a,b){}}}};a.api.registerEventsFromObject(b.events)},fireColumnSizeChanged:function(b,d,e){c(function(){b.api.colResizable?b.api.colResizable.raise.columnSizeChanged(d,e):a.logError("The resizeable api is not registered, this may indicate that you've included the module but not added the 'ui-grid-resize-columns' directive to your grid definition. Cannot raise any events.")})},findTargetCol:function(a,b,c){var d=a.getRenderContainer();if("left"===b){var e=d.visibleColumnCache.indexOf(a);return d.visibleColumnCache[e-1*c]}return a}};return d}]),a.directive("uiGridResizeColumns",["gridUtil","uiGridResizeColumnsService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.defaultGridOptions(e.grid.options),e.grid.registerColumnBuilder(b.colResizerColumnBuilder),b.registerPublicApi(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridHeaderCell",["gridUtil","$templateCache","$compile","$q","uiGridResizeColumnsService","uiGridConstants","$timeout",function(a,b,c,d,e,f,g){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(a,d,h,i){var j=i.grid;if(j.options.enableColumnResizing){var k=b.get("ui-grid/columnResizer"),l=1;j.isRTL()&&(a.position="left",l=-1);var m=function(){for(var b=d[0].getElementsByClassName("ui-grid-column-resizer"),f=0;f
            '),f={priority:0,scope:{col:"=",position:"@",renderIndex:"="},require:"?^uiGrid",link:function(f,g,h,i){function j(a){i.grid.refreshCanvas(!0).then(function(){i.grid.queueGridRefresh()})}function k(a,b){var c=b;return a.minWidth&&ca.maxWidth&&(c=a.maxWidth),c}function l(a,b){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),o=(a.targetTouches?a.targetTouches[0]:a).clientX-p,0>o?o=0:o>i.grid.gridWidth&&(o=i.grid.gridWidth);var g=d.findTargetCol(f.col,f.position,q);if(g.colDef.enableColumnResizing!==!1){i.grid.element.hasClass("column-resizing")||i.grid.element.addClass("column-resizing");var h=o-n,j=parseInt(g.drawnWidth+h*q,10);o+=(k(g,j)-j)*q,e.css({left:o+"px"}),i.fireEvent(c.events.ITEM_DRAGGING)}}function m(a,b){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),i.grid.element.removeClass("column-resizing"),e.remove(),o=(a.changedTouches?a.changedTouches[0]:a).clientX-p;var c=o-n;if(0===c)return t(),void s();var g=d.findTargetCol(f.col,f.position,q);if(g.colDef.enableColumnResizing!==!1){var h=parseInt(g.drawnWidth+c*q,10);g.width=k(g,h),g.hasCustomWidth=!0,j(c),d.fireColumnSizeChanged(i.grid,g.colDef,c),t(),s()}}var n=0,o=0,p=0,q=1;i.grid.isRTL()&&(f.position="left",q=-1),"left"===f.position?g.addClass("left"):"right"===f.position&&g.addClass("right");var r=function(b,c){b.originalEvent&&(b=b.originalEvent),b.stopPropagation(),p=i.grid.element[0].getBoundingClientRect().left,n=(b.targetTouches?b.targetTouches[0]:b).clientX-p,i.grid.element.append(e),e.css({left:n}),"touchstart"===b.type?(a.on("touchend",m),a.on("touchmove",l),g.off("mousedown",r)):(a.on("mouseup",m),a.on("mousemove",l),g.off("touchstart",r))},s=function(){g.on("mousedown",r),g.on("touchstart",r)},t=function(){a.off("mouseup",m),a.off("touchend",m),a.off("mousemove",l),a.off("touchmove",l),g.off("mousedown",r),g.off("touchstart",r)};s();var u=function(a,e){a.stopPropagation();var h=d.findTargetCol(f.col,f.position,q);if(h.colDef.enableColumnResizing!==!1){var l=0,m=0,n=b.closestElm(g,".ui-grid-render-container"),o=n.querySelectorAll("."+c.COL_CLASS_PREFIX+h.uid+" .ui-grid-cell-contents");Array.prototype.forEach.call(o,function(a){var c;angular.element(a).parent().hasClass("ui-grid-header-cell")&&(c=angular.element(a).parent()[0].querySelectorAll(".ui-grid-column-menu-button")),b.fakeElement(a,{},function(a){var d=angular.element(a);d.attr("style","float: left");var e=b.elementWidth(d);if(c){var f=b.elementWidth(c);e+=f}e>l&&(l=e,m=l-e)})}),h.width=k(h,l),h.hasCustomWidth=!0,j(m),d.fireColumnSizeChanged(i.grid,h.colDef,m)}};g.on("dblclick",u),g.on("$destroy",function(){g.off("dblclick",u),t()})}};return f}])}(),function(){"use strict";var a=angular.module("ui.grid.rowEdit",["ui.grid","ui.grid.edit","ui.grid.cellNav"]);a.constant("uiGridRowEditConstants",{}),a.service("uiGridRowEditService",["$interval","$q","uiGridConstants","uiGridRowEditConstants","gridUtil",function(a,b,c,d,e){var f={initializeGrid:function(a,b){b.rowEdit={};var c={events:{rowEdit:{saveRow:function(a){}}},methods:{rowEdit:{setSavePromise:function(a,c){f.setSavePromise(b,a,c)},getDirtyRows:function(){return b.rowEdit.dirtyRows?b.rowEdit.dirtyRows:[]},getErrorRows:function(){return b.rowEdit.errorRows?b.rowEdit.errorRows:[]},flushDirtyRows:function(){return f.flushDirtyRows(b)},setRowsDirty:function(a){f.setRowsDirty(b,a)},setRowsClean:function(a){f.setRowsClean(b,a)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.api.core.on.renderingComplete(a,function(c){b.api.edit.on.afterCellEdit(a,f.endEditCell),b.api.edit.on.beginCellEdit(a,f.beginEditCell),b.api.edit.on.cancelCellEdit(a,f.cancelEditCell),b.api.cellNav&&b.api.cellNav.on.navigate(a,f.navigate)})},defaultGridOptions:function(a){},saveRow:function(a,b){var c=this;return function(){if(b.isSaving=!0,b.rowEditSavePromise)return b.rowEditSavePromise;var d=a.api.rowEdit.raise.saveRow(b.entity);return b.rowEditSavePromise?b.rowEditSavePromise.then(c.processSuccessPromise(a,b),c.processErrorPromise(a,b)):e.logError("A promise was not returned when saveRow event was raised, either nobody is listening to event, or event handler did not return a promise"),d}},setSavePromise:function(a,b,c){var d=a.getRow(b);d.rowEditSavePromise=c},processSuccessPromise:function(a,b){var c=this;return function(){delete b.isSaving,delete b.isDirty,delete b.isError,delete b.rowEditSaveTimer,delete b.rowEditSavePromise,c.removeRow(a.rowEdit.errorRows,b),c.removeRow(a.rowEdit.dirtyRows,b)}},processErrorPromise:function(a,b){return function(){delete b.isSaving,delete b.rowEditSaveTimer,delete b.rowEditSavePromise,b.isError=!0,a.rowEdit.errorRows||(a.rowEdit.errorRows=[]),f.isRowPresent(a.rowEdit.errorRows,b)||a.rowEdit.errorRows.push(b)}},removeRow:function(a,b){"undefined"!=typeof a&&null!==a&&a.forEach(function(c,d){c.uid===b.uid&&a.splice(d,1)})},isRowPresent:function(a,b){var c=!1;return a.forEach(function(a,d){a.uid===b.uid&&(c=!0)}),c},flushDirtyRows:function(a){var c=[];return a.api.rowEdit.getDirtyRows().forEach(function(b){f.saveRow(a,b)(),c.push(b.rowEditSavePromise)}),b.all(c)},endEditCell:function(a,b,c,d){var g=this.grid,h=g.getRow(a);return h?void((c!==d||h.isDirty)&&(g.rowEdit.dirtyRows||(g.rowEdit.dirtyRows=[]),h.isDirty||(h.isDirty=!0,g.rowEdit.dirtyRows.push(h)),delete h.isError,f.considerSetTimer(g,h))):void e.logError("Unable to find rowEntity in grid data, dirty flag cannot be set")},beginEditCell:function(a,b){var c=this.grid,d=c.getRow(a);return d?void f.cancelTimer(c,d):void e.logError("Unable to find rowEntity in grid data, timer cannot be cancelled")},cancelEditCell:function(a,b){var c=this.grid,d=c.getRow(a);return d?void f.considerSetTimer(c,d):void e.logError("Unable to find rowEntity in grid data, timer cannot be set")},navigate:function(a,b){var c=this.grid;a.row.rowEditSaveTimer&&f.cancelTimer(c,a.row),b&&b.row&&b.row!==a.row&&f.considerSetTimer(c,b.row)},considerSetTimer:function(b,c){if(f.cancelTimer(b,c),c.isDirty&&!c.isSaving&&-1!==b.options.rowEditWaitInterval){var d=b.options.rowEditWaitInterval?b.options.rowEditWaitInterval:2e3;c.rowEditSaveTimer=a(f.saveRow(b,c),d,1)}},cancelTimer:function(b,c){c.rowEditSaveTimer&&!c.isSaving&&(a.cancel(c.rowEditSaveTimer),delete c.rowEditSaveTimer)},setRowsDirty:function(a,b){var c;b.forEach(function(b,d){c=a.getRow(b),c?(a.rowEdit.dirtyRows||(a.rowEdit.dirtyRows=[]),c.isDirty||(c.isDirty=!0,a.rowEdit.dirtyRows.push(c)),delete c.isError,f.considerSetTimer(a,c)):e.logError("requested row not found in rowEdit.setRowsDirty, row was: "+b)})},setRowsClean:function(a,b){var c;b.forEach(function(b,d){c=a.getRow(b),c?(delete c.isDirty,f.removeRow(a.rowEdit.dirtyRows,c),f.cancelTimer(a,c),delete c.isError,f.removeRow(a.rowEdit.errorRows,c)):e.logError("requested row not found in rowEdit.setRowsClean, row was: "+b)})}};return f}]),a.directive("uiGridRowEdit",["gridUtil","uiGridRowEditService","uiGridEditConstants",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(a,e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","gridUtil","$parse",function(a,b,c,d){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+", 'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}":"{'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.saveState",["ui.grid","ui.grid.selection","ui.grid.cellNav","ui.grid.grouping","ui.grid.pinning","ui.grid.treeView"]);a.constant("uiGridSaveStateConstants",{featureName:"saveState"}),a.service("uiGridSaveStateService",["$q","uiGridSaveStateConstants","gridUtil","$compile","$interval","uiGridConstants",function(a,b,c,d,e,f){var g={initializeGrid:function(a){a.saveState={},this.defaultGridOptions(a.options);var b={events:{saveState:{}},methods:{saveState:{save:function(){return g.save(a)},restore:function(b,c){g.restore(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.saveWidths=a.saveWidths!==!1,a.saveOrder=a.saveOrder!==!1,a.saveScroll=a.saveScroll===!0,a.saveFocus=a.saveScroll!==!0&&a.saveFocus!==!1,a.saveVisible=a.saveVisible!==!1,a.saveSort=a.saveSort!==!1,a.saveFilter=a.saveFilter!==!1,a.saveSelection=a.saveSelection!==!1,a.saveGrouping=a.saveGrouping!==!1,a.saveGroupingExpandedStates=a.saveGroupingExpandedStates===!0,a.savePinning=a.savePinning!==!1,a.saveTreeView=a.saveTreeView!==!1},save:function(a){var b={};return b.columns=g.saveColumns(a),b.scrollFocus=g.saveScrollFocus(a),b.selection=g.saveSelection(a),b.grouping=g.saveGrouping(a),b.treeView=g.saveTreeView(a),b},restore:function(a,b,c){c.columns&&g.restoreColumns(a,c.columns),c.scrollFocus&&g.restoreScrollFocus(a,b,c.scrollFocus),c.selection&&g.restoreSelection(a,c.selection),c.grouping&&g.restoreGrouping(a,c.grouping),c.treeView&&g.restoreTreeView(a,c.treeView),a.refresh()},saveColumns:function(a){var b=[];return a.getOnlyDataColumns().forEach(function(c){var d={};d.name=c.name,a.options.saveVisible&&(d.visible=c.visible),a.options.saveWidths&&(d.width=c.width),a.options.saveSort&&(d.sort=angular.copy(c.sort)),a.options.saveFilter&&(d.filters=[],c.filters.forEach(function(a){var b={};angular.forEach(a,function(a,c){"condition"!==c&&"$$hashKey"!==c&&"placeholder"!==c&&(b[c]=a)}),d.filters.push(b)})),a.api.pinning&&a.options.savePinning&&(d.pinned=c.renderContainer?c.renderContainer:""),b.push(d)}),b},saveScrollFocus:function(a){if(!a.api.cellNav)return{};var b={};if(a.options.saveFocus){b.focus=!0;var c=a.api.cellNav.getFocusedCell();null!==c&&(null!==c.col&&(b.colName=c.col.colDef.name),null!==c.row&&(b.rowVal=g.getRowVal(a,c.row)))}return(a.options.saveScroll||a.options.saveFocus&&!b.colName&&!b.rowVal)&&(b.focus=!1,a.renderContainers.body.prevRowScrollIndex&&(b.rowVal=g.getRowVal(a,a.renderContainers.body.visibleRowCache[a.renderContainers.body.prevRowScrollIndex])),a.renderContainers.body.prevColScrollIndex&&(b.colName=a.renderContainers.body.visibleColumnCache[a.renderContainers.body.prevColScrollIndex].name)),b},saveSelection:function(a){if(!a.api.selection||!a.options.saveSelection)return[];var b=a.api.selection.getSelectedGridRows().map(function(b){return g.getRowVal(a,b)});return b},saveGrouping:function(a){return a.api.grouping&&a.options.saveGrouping?a.api.grouping.getGrouping(a.options.saveGroupingExpandedStates):{}},saveTreeView:function(a){return a.api.treeView&&a.options.saveTreeView?a.api.treeView.getTreeView():{}},getRowVal:function(a,b){if(!b)return null;var c={};return a.options.saveRowIdentity?(c.identity=!0,c.row=a.options.saveRowIdentity(b.entity)):(c.identity=!1,c.row=a.renderContainers.body.visibleRowCache.indexOf(b)),c},restoreColumns:function(a,b){var c=!1;b.forEach(function(b,d){var e=a.getColumn(b.name);if(e&&!a.isRowHeaderColumn(e)){!a.options.saveVisible||e.visible===b.visible&&e.colDef.visible===b.visible||(e.visible=b.visible,e.colDef.visible=b.visible,a.api.core.raise.columnVisibilityChanged(e)),a.options.saveWidths&&(e.width=b.width),!a.options.saveSort||angular.equals(e.sort,b.sort)||void 0===e.sort&&angular.isEmpty(b.sort)||(e.sort=angular.copy(b.sort),c=!0),a.options.saveFilter&&!angular.equals(e.filters,b.filters)&&(b.filters.forEach(function(a,b){angular.extend(e.filters[b],a),("undefined"==typeof a.term||null===a.term)&&delete e.filters[b].term}),a.api.core.raise.filterChanged()),a.api.pinning&&a.options.savePinning&&e.renderContainer!==b.pinned&&a.api.pinning.pinColumn(e,b.pinned);var f=a.getOnlyDataColumns().indexOf(e);if(-1!==f&&a.options.saveOrder&&f!==d){var g=a.columns.splice(f+a.rowHeaderColumns.length,1)[0];a.columns.splice(d+a.rowHeaderColumns.length,0,g)}}}),c&&a.api.core.raise.sortChanged(a,a.getColumnSorting())},restoreScrollFocus:function(a,b,c){if(a.api.cellNav){var d,e;if(c.colName){var f=a.options.columnDefs.filter(function(a){return a.name===c.colName});f.length>0&&(d=f[0])}c.rowVal&&c.rowVal.row&&(e=c.rowVal.identity?g.findRowByIdentity(a,c.rowVal):a.renderContainers.body.visibleRowCache[c.rowVal.row]);var h=e&&e.entity?e.entity:null;(d||h)&&(c.focus?a.api.cellNav.scrollToFocus(h,d):a.scrollTo(h,d))}},restoreSelection:function(a,b){a.api.selection&&(a.api.selection.clearSelectedRows(),b.forEach(function(b){if(b.identity){var c=g.findRowByIdentity(a,b);c&&a.api.selection.selectRow(c.entity)}else a.api.selection.selectRowByVisibleIndex(b.row)}))},restoreGrouping:function(a,b){a.api.grouping&&"undefined"!=typeof b&&null!==b&&!angular.equals(b,{})&&a.api.grouping.setGrouping(b)},restoreTreeView:function(a,b){a.api.treeView&&"undefined"!=typeof b&&null!==b&&!angular.equals(b,{})&&a.api.treeView.setTreeView(b)},findRowByIdentity:function(a,b){if(!a.options.saveRowIdentity)return null;var c=a.rows.filter(function(c){return a.options.saveRowIdentity(c.entity)===b.row?!0:!1});return c.length>0?c[0]:null}};return g}]),a.directive("uiGridSaveState",["uiGridSaveStateConstants","uiGridSaveStateService","gridUtil","$compile",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(e.grid)}}}])}(),function(){"use strict";var a=angular.module("ui.grid.selection",["ui.grid"]);a.constant("uiGridSelectionConstants",{featureName:"selection",selectionRowHeaderColName:"selectionRowHeaderCol"}),angular.module("ui.grid").config(["$provide",function(a){a.decorator("GridRow",["$delegate",function(a){return a.prototype.setSelected=function(a){this.isSelected=a,a?this.grid.selection.selectedCount++:this.grid.selection.selectedCount--},a}])}]),a.service("uiGridSelectionService",["$q","$templateCache","uiGridSelectionConstants","gridUtil",function(a,b,c,d){var e={initializeGrid:function(a){a.selection={},a.selection.lastSelectedRow=null,a.selection.selectAll=!1,a.selection.selectedCount=0,e.defaultGridOptions(a.options);var b={events:{selection:{rowSelectionChanged:function(a,b,c){},rowSelectionChangedBatch:function(a,b,c){}}},methods:{selection:{toggleRowSelection:function(b,c){var d=a.getRow(b);null!==d&&e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectRow:function(b,c){var d=a.getRow(b);null===d||d.isSelected||e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectRowByVisibleIndex:function(b,c){var d=a.renderContainers.body.visibleRowCache[b];null===d||"undefined"==typeof d||d.isSelected||e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},unSelectRow:function(b,c){var d=a.getRow(b);null!==d&&d.isSelected&&e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectAllRows:function(b){if(a.options.multiSelect!==!1){var c=[];a.rows.forEach(function(d){d.isSelected||d.enableSelection===!1||(d.setSelected(!0),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!0}},selectAllVisibleRows:function(b){if(a.options.multiSelect!==!1){var c=[];a.rows.forEach(function(d){d.visible?d.isSelected||d.enableSelection===!1||(d.setSelected(!0),e.decideRaiseSelectionEvent(a,d,c,b)):d.isSelected&&(d.setSelected(!1),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!0}},clearSelectedRows:function(b){e.clearSelectedRows(a,b)},getSelectedRows:function(){return e.getSelectedRows(a).map(function(a){return a.entity})},getSelectedGridRows:function(){return e.getSelectedRows(a)},getSelectedCount:function(){return a.selection.selectedCount},setMultiSelect:function(b){a.options.multiSelect=b},setModifierKeysToMultiSelect:function(b){a.options.modifierKeysToMultiSelect=b},getSelectAllState:function(){return a.selection.selectAll}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.enableRowSelection=a.enableRowSelection!==!1,a.multiSelect=a.multiSelect!==!1,a.noUnselect=a.noUnselect===!0,a.modifierKeysToMultiSelect=a.modifierKeysToMultiSelect===!0,a.enableRowHeaderSelection=a.enableRowHeaderSelection!==!1,"undefined"==typeof a.enableFullRowSelection&&(a.enableFullRowSelection=!a.enableRowHeaderSelection),a.enableSelectAll=a.enableSelectAll!==!1,a.enableSelectionBatchEvent=a.enableSelectionBatchEvent!==!1,a.selectionRowHeaderWidth=angular.isDefined(a.selectionRowHeaderWidth)?a.selectionRowHeaderWidth:30,a.enableFooterTotalSelected=a.enableFooterTotalSelected!==!1,a.isRowSelectable=angular.isDefined(a.isRowSelectable)?a.isRowSelectable:angular.noop},toggleRowSelection:function(a,b,c,d,f){var g=b.isSelected;if(b.enableSelection!==!1||g){var h;d||g?!d&&g&&(h=e.getSelectedRows(a),h.length>1&&(g=!1,e.clearSelectedRows(a,c))):e.clearSelectedRows(a,c),g&&f||(b.setSelected(!g),b.isSelected===!0&&(a.selection.lastSelectedRow=b),h=e.getSelectedRows(a),a.selection.selectAll=a.rows.length===h.length,a.api.selection.raise.rowSelectionChanged(b,c))}},shiftSelect:function(a,b,c,d){if(d){var f=e.getSelectedRows(a),g=f.length>0?a.renderContainers.body.visibleRowCache.indexOf(a.selection.lastSelectedRow):0,h=a.renderContainers.body.visibleRowCache.indexOf(b);if(g>h){var i=g;g=h,h=i}for(var j=[],k=g;h>=k;k++){var l=a.renderContainers.body.visibleRowCache[k];l&&(l.isSelected||l.enableSelection===!1||(l.setSelected(!0),a.selection.lastSelectedRow=l,e.decideRaiseSelectionEvent(a,l,j,c)))}e.decideRaiseSelectionBatchEvent(a,j,c)}},getSelectedRows:function(a){return a.rows.filter(function(a){return a.isSelected})},clearSelectedRows:function(a,b){var c=[];e.getSelectedRows(a).forEach(function(d){d.isSelected&&(d.setSelected(!1),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!1,a.selection.selectedCount=0},decideRaiseSelectionEvent:function(a,b,c,d){a.options.enableSelectionBatchEvent?c.push(b):a.api.selection.raise.rowSelectionChanged(b,d)},decideRaiseSelectionBatchEvent:function(a,b,c){b.length>0&&a.api.selection.raise.rowSelectionChangedBatch(b,c)}};return e}]),a.directive("uiGridSelection",["uiGridSelectionConstants","uiGridSelectionService","$templateCache","uiGridConstants",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,e,f,g){if(b.initializeGrid(g.grid),g.grid.options.enableRowHeaderSelection){var h={name:a.selectionRowHeaderColName,displayName:"",width:g.grid.options.selectionRowHeaderWidth,minWidth:10,cellTemplate:"ui-grid/selectionRowHeader",headerCellTemplate:"ui-grid/selectionHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1,exporterSuppressExport:!0,allowCellFocus:!0};g.grid.addRowHeaderColumn(h)}var i=!1,j=function(a){return a.forEach(function(a){a.enableSelection=g.grid.options.isRowSelectable(a)}),a},k=function(){g.grid.options.isRowSelectable!==angular.noop&&i!==!0&&(g.grid.registerRowsProcessor(j,500),i=!0)};k();var l=g.grid.registerDataChangeCallback(k,[d.dataChange.OPTIONS]);c.$on("$destroy",l)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridSelectionRowHeaderButtons",["$templateCache","uiGridSelectionService","gridUtil",function(a,b,c){return{replace:!0,restrict:"E",template:a.get("ui-grid/selectionRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(a,d,e,f){function g(a,c){c.stopPropagation(),c.shiftKey?b.shiftSelect(i,a,c,i.options.multiSelect):c.ctrlKey||c.metaKey?b.toggleRowSelection(i,a,c,i.options.multiSelect,i.options.noUnselect):b.toggleRowSelection(i,a,c,i.options.multiSelect&&!i.options.modifierKeysToMultiSelect,i.options.noUnselect)}function h(a){(a.ctrlKey||a.shiftKey)&&(a.target.onselectstart=function(){return!1},window.setTimeout(function(){a.target.onselectstart=null},0))}var i=f.grid;a.selectButtonClick=g,"ie"===c.detectBrowser()&&d.on("mousedown",h)}}}]),a.directive("uiGridSelectionSelectAllButtons",["$templateCache","uiGridSelectionService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/selectionSelectAllButtons"),scope:!1,link:function(a,c,d,e){var f=a.col.grid;a.headerButtonClick=function(a,c){f.selection.selectAll?(b.clearSelectedRows(f,c),f.options.noUnselect&&f.api.selection.selectRowByVisibleIndex(0,c),f.selection.selectAll=!1):f.options.multiSelect&&(f.api.selection.selectAllVisibleRows(c),f.selection.selectAll=!0)}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService",function(a,b,c,d,e,f){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+",'ui-grid-row-selected': row.isSelected}":"{'ui-grid-row-selected': row.isSelected}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}]),a.directive("uiGridCell",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService","$timeout",function(a,b,c,d,e,f,g){return{priority:-200,restrict:"A",require:"?^uiGrid",scope:!1,link:function(a,c,d,e){function h(){a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection&&(c.addClass("ui-grid-disable-selection"),c.on("touchstart",m),c.on("touchend",n),c.on("click",l),a.registered=!0)}function i(){a.registered&&(c.removeClass("ui-grid-disable-selection"),c.off("touchstart",m),c.off("touchend",n),c.off("click",l),a.registered=!1)}var j=0,k=300;e.grid.api.cellNav&&e.grid.api.cellNav.on.viewPortKeyDown(a,function(b,c){null!==c&&c.row===a.row&&c.col===a.col&&32===b.keyCode&&"selectionRowHeaderCol"===a.col.colDef.name&&(f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect&&!a.grid.options.modifierKeysToMultiSelect,a.grid.options.noUnselect),a.$apply())});var l=function(b){c.off("touchend",n),b.shiftKey?f.shiftSelect(a.grid,a.row,b,a.grid.options.multiSelect):b.ctrlKey||b.metaKey?f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect,a.grid.options.noUnselect):f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect&&!a.grid.options.modifierKeysToMultiSelect,a.grid.options.noUnselect),a.$apply(),g(function(){c.on("touchend",n)},k)},m=function(a){j=(new Date).getTime(),c.off("click",l)},n=function(a){var b=(new Date).getTime(),d=b-j;k>d&&l(a),g(function(){c.on("click",l)},k)};h();var o=a.grid.registerDataChangeCallback(function(){a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection&&!a.registered?h():a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection||!a.registered||i()},[b.dataChange.OPTIONS]);c.on("$destroy",o)}}}]),a.directive("uiGridGridFooter",["$compile","uiGridConstants","gridUtil",function(a,b,c){return{restrict:"EA",replace:!0,priority:-1e3,require:"^uiGrid",scope:!0,compile:function(b,d){return{pre:function(b,d,e,f){f.grid.options.showGridFooter&&c.getTemplate("ui-grid/gridFooterSelectedItems").then(function(c){var e=angular.element(c),f=a(e)(b);angular.element(d[0].getElementsByClassName("ui-grid-grid-footer")[0]).append(f)})},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.treeBase",["ui.grid"]);a.constant("uiGridTreeBaseConstants",{featureName:"treeBase",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridTreeBaseService",["$q","uiGridTreeBaseConstants","gridUtil","GridRow","gridClassFactory","i18nService","uiGridConstants","rowSorter",function(a,b,c,d,e,f,g,h){var i={initializeGrid:function(a,b){a.treeBase={},a.treeBase.numberLevels=0,a.treeBase.expandAll=!1,a.treeBase.tree=[],i.defaultGridOptions(a.options),a.registerRowsProcessor(i.treeRows,410),a.registerColumnBuilder(i.treeBaseColumnBuilder),i.createRowHeader(a);var c={events:{treeBase:{rowExpanded:{},rowCollapsed:{}}},methods:{treeBase:{expandAllRows:function(){i.expandAllRows(a)},collapseAllRows:function(){i.collapseAllRows(a)},toggleRowTreeState:function(b){i.toggleRowTreeState(a,b)},expandRow:function(b){i.expandRow(a,b)},expandRowChildren:function(b){i.expandRowChildren(a,b)},collapseRow:function(b){i.collapseRow(a,b)},collapseRowChildren:function(b){i.collapseRowChildren(a,b)},getTreeExpandedState:function(){return{expandedState:i.getTreeState(a)}},setTreeState:function(b){i.setTreeState(a,b)},getRowChildren:function(a){return a.treeNode.children.map(function(a){return a.row})}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.treeRowHeaderBaseWidth=a.treeRowHeaderBaseWidth||30,a.treeIndent=a.treeIndent||10,a.showTreeRowHeader=a.showTreeRowHeader!==!1,a.showTreeExpandNoChildren=a.showTreeExpandNoChildren!==!1,a.treeRowHeaderAlwaysVisible=a.treeRowHeaderAlwaysVisible!==!1,a.treeCustomAggregations=a.treeCustomAggregations||{}},treeBaseColumnBuilder:function(a,b,c){"undefined"!=typeof a.customTreeAggregationFn&&(b.treeAggregationFn=a.customTreeAggregationFn),"undefined"!=typeof a.treeAggregationType&&(b.treeAggregation={type:a.treeAggregationType},"undefined"!=typeof c.treeCustomAggregations[a.treeAggregationType]?(b.treeAggregationFn=c.treeCustomAggregations[a.treeAggregationType].aggregationFn, -b.treeAggregationFinalizerFn=c.treeCustomAggregations[a.treeAggregationType].finalizerFn,b.treeAggregation.label=c.treeCustomAggregations[a.treeAggregationType].label):"undefined"!=typeof i.nativeAggregations()[a.treeAggregationType]&&(b.treeAggregationFn=i.nativeAggregations()[a.treeAggregationType].aggregationFn,b.treeAggregation.label=i.nativeAggregations()[a.treeAggregationType].label)),"undefined"!=typeof a.treeAggregationLabel&&("undefined"==typeof b.treeAggregation&&(b.treeAggregation={}),b.treeAggregation.label=a.treeAggregationLabel),b.treeAggregationUpdateEntity=a.treeAggregationUpdateEntity!==!1,"undefined"==typeof b.customTreeAggregationFinalizerFn&&(b.customTreeAggregationFinalizerFn=a.customTreeAggregationFinalizerFn)},createRowHeader:function(a){var c={name:b.rowHeaderColName,displayName:"",width:a.options.treeRowHeaderBaseWidth,minWidth:10,cellTemplate:"ui-grid/treeBaseRowHeader",headerCellTemplate:"ui-grid/treeBaseHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1,exporterSuppressExport:!0,allowCellFocus:!0};c.visible=a.options.treeRowHeaderAlwaysVisible,a.addRowHeaderColumn(c)},expandAllRows:function(a){a.treeBase.tree.forEach(function(c){i.setAllNodes(a,c,b.EXPANDED)}),a.treeBase.expandAll=!0,a.queueGridRefresh()},collapseAllRows:function(a){a.treeBase.tree.forEach(function(c){i.setAllNodes(a,c,b.COLLAPSED)}),a.treeBase.expandAll=!1,a.queueGridRefresh()},setAllNodes:function(a,c,d){"undefined"!=typeof c.state&&c.state!==d&&(c.state=d,d===b.EXPANDED?a.api.treeBase.raise.rowExpanded(c.row):a.api.treeBase.raise.rowCollapsed(c.row)),c.children&&c.children.forEach(function(b){i.setAllNodes(a,b,d)})},toggleRowTreeState:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(c.treeNode.state===b.EXPANDED?i.collapseRow(a,c):i.expandRow(a,c),a.queueGridRefresh())},expandRow:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||c.treeNode.state!==b.EXPANDED&&(c.treeNode.state=b.EXPANDED,a.api.treeBase.raise.rowExpanded(c),a.treeBase.expandAll=i.allExpanded(a.treeBase.tree),a.queueGridRefresh())},expandRowChildren:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(i.setAllNodes(a,c.treeNode,b.EXPANDED),a.treeBase.expandAll=i.allExpanded(a.treeBase.tree),a.queueGridRefresh())},collapseRow:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||c.treeNode.state!==b.COLLAPSED&&(c.treeNode.state=b.COLLAPSED,a.treeBase.expandAll=!1,a.api.treeBase.raise.rowCollapsed(c),a.queueGridRefresh())},collapseRowChildren:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(i.setAllNodes(a,c.treeNode,b.COLLAPSED),a.treeBase.expandAll=!1,a.queueGridRefresh())},allExpanded:function(a){var b=!0;return a.forEach(function(a){i.allExpandedInternal(a)||(b=!1)}),b},allExpandedInternal:function(a){if(a.children&&a.children.length>0){if(a.state===b.COLLAPSED)return!1;var c=!0;return a.children.forEach(function(a){i.allExpandedInternal(a)||(c=!1)}),c}return!0},treeRows:function(a){if(0===a.length)return a;var c=this;b.EXPANDED;return c.treeBase.tree=i.createTree(c,a),i.updateRowHeaderWidth(c),i.sortTree(c),i.fixFilter(c),i.renderTree(c.treeBase.tree)},updateRowHeaderWidth:function(a){var c=a.getColumn(b.rowHeaderColName),d=a.options.treeRowHeaderBaseWidth+a.options.treeIndent*Math.max(a.treeBase.numberLevels-1,0);c&&d!==c.width&&(c.width=d,a.queueRefresh());var e=!0;a.options.showTreeRowHeader===!1&&(e=!1),a.options.treeRowHeaderAlwaysVisible===!1&&a.treeBase.numberLevels<=0&&(e=!1),c.visible!==e&&(c.visible=e,c.colDef.visible=e,a.queueGridRefresh())},renderTree:function(a){var c=[];return a.forEach(function(a){a.row.visible&&c.push(a.row),a.state===b.EXPANDED&&a.children&&a.children.length>0&&(c=c.concat(i.renderTree(a.children)))}),c},createTree:function(a,c){var d,e=-1,f=[];a.treeBase.tree=[],a.treeBase.numberLevels=0;var g=i.getAggregations(a),h=function(c){if("undefined"!=typeof c.entity.$$treeLevel&&c.treeLevel!==c.entity.$$treeLevel&&(c.treeLevel=c.entity.$$treeLevel),c.treeLevel<=e){for(;c.treeLevel<=e;){var h=f.pop();i.finaliseAggregations(h),e--}d=f.length>0?i.setCurrentState(f):b.EXPANDED}("undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0)&&c.visible&&i.aggregate(a,c,f),i.addOrUseNode(a,c,f,g),"undefined"!=typeof c.treeLevel&&null!==c.treeLevel&&c.treeLevel>=0&&(f.push(c),e++,d=i.setCurrentState(f)),a.treeBase.numberLevels0;){var j=f.pop();i.finaliseAggregations(j)}return a.treeBase.tree},addOrUseNode:function(a,c,d,e){var f=[];e.forEach(function(a){f.push(i.buildAggregationObject(a.col))});var g={state:b.COLLAPSED,row:c,parentRow:null,aggregations:f,children:[]};c.treeNode&&(g.state=c.treeNode.state),d.length>0&&(g.parentRow=d[d.length-1]),c.treeNode=g,0===d.length?a.treeBase.tree.push(g):d[d.length-1].treeNode.children.push(g)},setCurrentState:function(a){var c=b.EXPANDED;return a.forEach(function(a){a.treeNode.state===b.COLLAPSED&&(c=b.COLLAPSED)}),c},sortTree:function(a){a.columns.forEach(function(a){a.sort&&a.sort.ignoreSort&&delete a.sort.ignoreSort}),a.treeBase.tree=i.sortInternal(a,a.treeBase.tree)},sortInternal:function(a,c){var d=c.map(function(a){return a.row});d=h.sort(a,d,a.columns);var e=d.map(function(a){return a.treeNode});return e.forEach(function(c){c.state===b.EXPANDED&&c.children&&c.children.length>0&&(c.children=i.sortInternal(a,c.children))}),e},fixFilter:function(a){var b;a.treeBase.tree.forEach(function(a){a.children&&a.children.length>0&&(b=a.row.visible,i.fixFilterInternal(a.children,b))})},fixFilterInternal:function(a,b){return a.forEach(function(a){a.row.visible&&!b&&(i.setParentsVisible(a),b=!0),a.children&&a.children.length>0&&i.fixFilterInternal(a.children,b&&a.row.visible)&&(b=!0)}),b},setParentsVisible:function(a){for(;a.parentRow;)a.parentRow.visible=!0,a=a.parentRow.treeNode},buildAggregationObject:function(a){var b={col:a};return a.treeAggregation&&a.treeAggregation.type&&(b.type=a.treeAggregation.type),a.treeAggregation&&a.treeAggregation.label&&(b.label=a.treeAggregation.label),b},getAggregations:function(a){var b=[];return a.columns.forEach(function(c){"undefined"!=typeof c.treeAggregationFn&&(b.push(i.buildAggregationObject(c)),a.options.showColumnFooter&&"undefined"==typeof c.colDef.aggregationType&&c.treeAggregation&&(c.treeFooterAggregation=i.buildAggregationObject(c),c.aggregationType=i.treeFooterAggregationType))}),b},aggregate:function(a,b,c){0===c.length&&b.treeNode&&b.treeNode.aggregations&&b.treeNode.aggregations.forEach(function(c){if("undefined"!=typeof c.col.treeFooterAggregation){var d=a.getCellValue(b,c.col),e=Number(d);c.col.treeAggregationFn(c.col.treeFooterAggregation,d,e,b)}}),c.forEach(function(c,d){c.treeNode.aggregations&&c.treeNode.aggregations.forEach(function(c){var e=a.getCellValue(b,c.col),f=Number(e);c.col.treeAggregationFn(c,e,f,b),0===d&&"undefined"!=typeof c.col.treeFooterAggregation&&c.col.treeAggregationFn(c.col.treeFooterAggregation,e,f,b)})})},nativeAggregations:function(){var a={count:{label:f.get().aggregation.count,menuTitle:f.get().grouping.aggregate_count,aggregationFn:function(a,b,c){"undefined"==typeof a.value?a.value=1:a.value++}},sum:{label:f.get().aggregation.sum,menuTitle:f.get().grouping.aggregate_sum,aggregationFn:function(a,b,c){isNaN(c)||("undefined"==typeof a.value?a.value=c:a.value+=c)}},min:{label:f.get().aggregation.min,menuTitle:f.get().grouping.aggregate_min,aggregationFn:function(a,b,c){"undefined"==typeof a.value?a.value=b:"undefined"!=typeof b&&null!==b&&(ba.value||null===a.value)&&(a.value=b)}},avg:{label:f.get().aggregation.avg,menuTitle:f.get().grouping.aggregate_avg,aggregationFn:function(a,b,c){"undefined"==typeof a.count?a.count=1:a.count++,isNaN(c)||("undefined"==typeof a.value||"undefined"==typeof a.sum?(a.value=c,a.sum=c):(a.sum+=c,a.value=a.sum/a.count))}}};return a},finaliseAggregation:function(a,b){b.col.treeAggregationUpdateEntity&&"undefined"!=typeof a&&"undefined"!=typeof a.entity["$$"+b.col.uid]&&angular.extend(b,a.entity["$$"+b.col.uid]),"function"==typeof b.col.treeAggregationFinalizerFn&&b.col.treeAggregationFinalizerFn(b),"function"==typeof b.col.customTreeAggregationFinalizerFn&&b.col.customTreeAggregationFinalizerFn(b),"undefined"==typeof b.rendered&&(b.rendered=b.label?b.label+b.value:b.value)},finaliseAggregations:function(a){"undefined"!=typeof a.treeNode.aggregations&&a.treeNode.aggregations.forEach(function(b){if(i.finaliseAggregation(a,b),b.col.treeAggregationUpdateEntity){var c={};angular.forEach(b,function(a,d){b.hasOwnProperty(d)&&"col"!==d&&(c[d]=a)}),a.entity["$$"+b.col.uid]=c}})},treeFooterAggregationType:function(a,b){return i.finaliseAggregation(void 0,b.treeFooterAggregation),"undefined"==typeof b.treeFooterAggregation.value||null===b.treeFooterAggregation.rendered?"":b.treeFooterAggregation.rendered}};return i}]),a.directive("uiGridTreeBaseRowHeaderButtons",["$templateCache","uiGridTreeBaseService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/treeBaseRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(a,c,d,e){var f=e.grid;a.treeButtonClick=function(a,c){b.toggleRowTreeState(f,a,c)}}}}]),a.directive("uiGridTreeBaseExpandAllButtons",["$templateCache","uiGridTreeBaseService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/treeBaseExpandAllButtons"),scope:!1,link:function(a,c,d,e){var f=a.col.grid;a.headerButtonClick=function(a,c){f.treeBase.expandAll?b.collapseAllRows(f,c):b.expandAllRows(f,c)}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","gridUtil","$parse",function(a,b,c,d){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+",'ui-grid-tree-header-row': row.treeLevel > -1}":"{'ui-grid-tree-header-row': row.treeLevel > -1}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.treeView",["ui.grid","ui.grid.treeBase"]);a.constant("uiGridTreeViewConstants",{featureName:"treeView",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridTreeViewService",["$q","uiGridTreeViewConstants","uiGridTreeBaseConstants","uiGridTreeBaseService","gridUtil","GridRow","gridClassFactory","i18nService","uiGridConstants",function(a,b,c,d,e,f,g,h,i){var j={initializeGrid:function(a,b){d.initializeGrid(a,b),a.treeView={},a.registerRowsProcessor(j.adjustSorting,60);var c={events:{treeView:{}},methods:{treeView:{}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableTreeView=a.enableTreeView!==!1},adjustSorting:function(a){var b=this;return b.columns.forEach(function(a){a.sort&&(a.sort.ignoreSort=!0)}),a}};return j}]),a.directive("uiGridTreeView",["uiGridTreeViewConstants","uiGridTreeViewService","$templateCache",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){e.grid.options.enableTreeView!==!1&&b.initializeGrid(e.grid,a)},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.validate",["ui.grid"]);a.service("uiGridValidateService",["$sce","$q","$http","i18nService","uiGridConstants",function(a,b,c,d,e){var f={validatorFactories:{},setExternalFactoryFunction:function(a){f.externalFactoryFunction=a},clearExternalFactory:function(){delete f.externalFactoryFunction},getValidatorFromExternalFactory:function(a,b){return f.externalFactoryFunction(a,b).validatorFactory(b)},getMessageFromExternalFactory:function(a,b){return f.externalFactoryFunction(a,b).messageFunction(b)},setValidator:function(a,b,c){f.validatorFactories[a]={validatorFactory:b,messageFunction:c}},getValidator:function(a,b){if(f.externalFactoryFunction){var c=f.getValidatorFromExternalFactory(a,b);if(c)return c}if(!f.validatorFactories[a])throw"Invalid validator name: "+a;return f.validatorFactories[a].validatorFactory(b)},getMessage:function(a,b){if(f.externalFactoryFunction){var c=f.getMessageFromExternalFactory(a,b);if(c)return c}return f.validatorFactories[a].messageFunction(b)},isInvalid:function(a,b){return a["$$invalid"+b.name]},setInvalid:function(a,b){a["$$invalid"+b.name]=!0},setValid:function(a,b){delete a["$$invalid"+b.name]},setError:function(a,b,c){a["$$errors"+b.name]||(a["$$errors"+b.name]={}),a["$$errors"+b.name][c]=!0},clearError:function(a,b,c){a["$$errors"+b.name]&&c in a["$$errors"+b.name]&&delete a["$$errors"+b.name][c]},getErrorMessages:function(a,b){var c=[];return a["$$errors"+b.name]&&0!==Object.keys(a["$$errors"+b.name]).length?(Object.keys(a["$$errors"+b.name]).sort().forEach(function(a){c.push(f.getMessage(a,b.validators[a]))}),c):c},getFormattedErrors:function(b,c){var e="",g=f.getErrorMessages(b,c);return g.length?(g.forEach(function(a){e+=a+"
            "}),a.trustAsHtml("

            "+d.getSafeText("validate.error")+"

            "+e)):void 0},getTitleFormattedErrors:function(b,c){var e="\n",g="",h=f.getErrorMessages(b,c);return h.length?(h.forEach(function(a){g+=a+e}),a.trustAsHtml(d.getSafeText("validate.error")+e+g)):void 0},runValidators:function(a,c,d,e,g){if(d!==e){if("undefined"==typeof c.name||!c.name)throw new Error("colDef.name is required to perform validation");f.setValid(a,c);var h=function(a,b,c){return function(h){h||(f.setInvalid(a,b),f.setError(a,b,c),g&&g.api.validate.raise.validationFailed(a,b,d,e))}};for(var i in c.validators){f.clearError(a,c,i);var j=f.getValidator(i,c.validators[i]);b.when(j(e,d,a,c)).then(h(a,c,i))}}},createDefaultValidators:function(){f.setValidator("minLength",function(a){return function(b,c,d,e){return void 0===c||null===c||""===c?!0:c.length>=a}},function(a){return d.getSafeText("validate.minLength").replace("THRESHOLD",a)}),f.setValidator("maxLength",function(a){return function(b,c,d,e){return void 0===c||null===c||""===c?!0:c.length<=a}},function(a){return d.getSafeText("validate.maxLength").replace("THRESHOLD",a)}),f.setValidator("required",function(a){return function(b,c,d,e){return a?!(void 0===c||null===c||""===c):!0}},function(a){return d.getSafeText("validate.required")})},initializeGrid:function(a,b){b.validate={isInvalid:f.isInvalid,getFormattedErrors:f.getFormattedErrors,getTitleFormattedErrors:f.getTitleFormattedErrors,runValidators:f.runValidators};var c={events:{validate:{validationFailed:function(a,b,c,d){}}},methods:{validate:{isInvalid:function(a,c){return b.validate.isInvalid(a,c)},getErrorMessages:function(a,c){return b.validate.getErrorMessages(a,c)},getFormattedErrors:function(a,c){return b.validate.getFormattedErrors(a,c)},getTitleFormattedErrors:function(a,c){return b.validate.getTitleFormattedErrors(a,c)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.edit&&b.api.edit.on.afterCellEdit(a,function(a,c,d,e){b.validate.runValidators(a,c,d,e,b)}),f.createDefaultValidators()}};return f}]),a.directive("uiGridValidate",["gridUtil","uiGridValidateService",function(a,b){return{priority:0,replace:!0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(a,e.grid)},post:function(a,b,c,d){}}}}}])}(),angular.module("ui.grid").run(["$templateCache",function(a){"use strict";a.put("ui-grid/ui-grid-filter",'
             
             
            '),a.put("ui-grid/ui-grid-footer",''),a.put("ui-grid/ui-grid-grid-footer",''),a.put("ui-grid/ui-grid-group-panel",'
            • {{group.displayName}} x
            '),a.put("ui-grid/ui-grid-header",'
            '),a.put("ui-grid/ui-grid-menu-button",'
             
            '),a.put("ui-grid/ui-grid-no-header",'
            '),a.put("ui-grid/ui-grid-row","
            "),a.put("ui-grid/ui-grid",'
            '),a.put("ui-grid/uiGridCell",'
            {{COL_FIELD CUSTOM_FILTERS}}
            '),a.put("ui-grid/uiGridColumnMenu",'
            '),a.put("ui-grid/uiGridFooterCell",'
            {{ col.getAggregationText() + ( col.getAggregationValue() CUSTOM_FILTERS ) }}
            '),a.put("ui-grid/uiGridHeaderCell",'
            {{ col.displayName CUSTOM_FILTERS }} {{col.sort.priority}}
            '),a.put("ui-grid/uiGridMenu",'
            '),a.put("ui-grid/uiGridMenuItem",''),a.put("ui-grid/uiGridRenderContainer","
            "),a.put("ui-grid/uiGridViewport",'
            '),a.put("ui-grid/cellEditor",'
            '),a.put("ui-grid/dropdownEditor",'
            '),a.put("ui-grid/fileChooserEditor",'
            '),a.put("ui-grid/expandableRow",'
            '),a.put("ui-grid/expandableRowHeader",'
            '),a.put("ui-grid/expandableScrollFiller","
            "),a.put("ui-grid/expandableTopRowHeader",'
            '),a.put("ui-grid/csvLink",'LINK_LABEL'),a.put("ui-grid/importerMenuItem",'
          • '),a.put("ui-grid/importerMenuItemContainer","
            "),a.put("ui-grid/pagination",''), -a.put("ui-grid/columnResizer",'
            '),a.put("ui-grid/gridFooterSelectedItems",'({{"search.selectedItems" | t}} {{grid.selection.selectedCount}})'),a.put("ui-grid/selectionHeaderCell",'
            '),a.put("ui-grid/selectionRowHeader",'
            '),a.put("ui-grid/selectionRowHeaderButtons",'
             
            '),a.put("ui-grid/selectionSelectAllButtons",'
            '),a.put("ui-grid/treeBaseExpandAllButtons",'
            '),a.put("ui-grid/treeBaseHeaderCell",'
            '),a.put("ui-grid/treeBaseRowHeader",'
            '),a.put("ui-grid/treeBaseRowHeaderButtons","
            -1 }\" ng-click=\"treeButtonClick(row, $event)\"> -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'expanded', 'ui-grid-icon-plus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'collapsed'}\" ng-style=\"{'padding-left': grid.options.treeIndent * row.treeLevel + 'px'}\">  
            "),a.put("ui-grid/cellTitleValidator",'
            {{COL_FIELD CUSTOM_FILTERS}}
            '),a.put("ui-grid/cellTooltipValidator",'
            {{COL_FIELD CUSTOM_FILTERS}}
            ')}]),function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){(function(b){a.exports=b.pdfMake=c(1)}).call(b,function(){return this}())},function(a,b,c){(function(b){"use strict";function d(a,b,c){this.docDefinition=a,this.fonts=b||h,this.vfs=c}var e=c(6),f=c(105),g=f.saveAs,h={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-Italic.ttf"}};d.prototype._createDoc=function(a,c){var d=new e(this.fonts);d.fs.bindFS(this.vfs);var f,g=d.createPdfKitDocument(this.docDefinition,a),h=[];g.on("data",function(a){h.push(a)}),g.on("end",function(){f=b.concat(h),c(f,g._pdfMakePages)}),g.end()},d.prototype._getPages=function(a,b){if(!b)throw"getBuffer is an async method and needs a callback argument";this._createDoc(a,function(a,c){b(c)})},d.prototype.open=function(a){var b=window.open("","_blank");try{this.getDataUrl(function(a){b.location.href=a})}catch(c){throw b.close(),c}},d.prototype.print=function(){this.getDataUrl(function(a){var b=document.createElement("iframe");b.style.position="absolute",b.style.left="-99999px",b.src=a,b.onload=function(){function a(){document.body.removeChild(b),document.removeEventListener("click",a)}document.addEventListener("click",a,!1)},document.body.appendChild(b)},{autoPrint:!0})},d.prototype.download=function(a,b){"function"==typeof a&&(b=a,a=null),a=a||"file.pdf",this.getBuffer(function(c){var d;try{d=new Blob([c],{type:"application/pdf"})}catch(e){if("InvalidStateError"==e.name){var f=new Uint8Array(c);d=new Blob([f.buffer],{type:"application/pdf"})}}if(!d)throw"Could not generate blob";g(d,a),"function"==typeof b&&b()})},d.prototype.getBase64=function(a,b){if(!a)throw"getBase64 is an async method and needs a callback argument";this._createDoc(b,function(b){a(b.toString("base64"))})},d.prototype.getDataUrl=function(a,b){if(!a)throw"getDataUrl is an async method and needs a callback argument";this._createDoc(b,function(b){a("data:application/pdf;base64,"+b.toString("base64"))})},d.prototype.getBuffer=function(a,b){if(!a)throw"getBuffer is an async method and needs a callback argument";this._createDoc(b,function(b){a(b)})},a.exports={createPdf:function(a){return new d(a,window.pdfMake.fonts,window.pdfMake.vfs)}}}).call(b,c(2).Buffer)},function(a,b,c){(function(a,d){function e(){function a(){}try{var b=new Uint8Array(1);return b.foo=function(){return 42},b.constructor=a,42===b.foo()&&b.constructor===a&&"function"==typeof b.subarray&&0===b.subarray(1,1).byteLength}catch(c){return!1}}function f(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(b){return this instanceof a?(this.length=0,this.parent=void 0,"number"==typeof b?g(this,b):"string"==typeof b?h(this,b,arguments.length>1?arguments[1]:"utf8"):i(this,b)):arguments.length>1?new a(b,arguments[1]):new a(b)}function g(b,c){if(b=p(b,0>c?0:0|q(c)),!a.TYPED_ARRAY_SUPPORT)for(var d=0;c>d;d++)b[d]=0;return b}function h(a,b,c){("string"!=typeof c||""===c)&&(c="utf8");var d=0|s(b,c);return a=p(a,d),a.write(b,c),a}function i(b,c){if(a.isBuffer(c))return j(b,c);if(Y(c))return k(b,c);if(null==c)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(c.buffer instanceof ArrayBuffer)return l(b,c);if(c instanceof ArrayBuffer)return m(b,c)}return c.length?n(b,c):o(b,c)}function j(a,b){var c=0|q(b.length);return a=p(a,c),b.copy(a,0,0,c),a}function k(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function l(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function m(b,c){return a.TYPED_ARRAY_SUPPORT?(c.byteLength,b=a._augment(new Uint8Array(c))):b=l(b,new Uint8Array(c)),b}function n(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function o(a,b){var c,d=0;"Buffer"===b.type&&Y(b.data)&&(c=b.data,d=0|q(c.length)),a=p(a,d);for(var e=0;d>e;e+=1)a[e]=255&c[e];return a}function p(b,c){a.TYPED_ARRAY_SUPPORT?(b=a._augment(new Uint8Array(c)),b.__proto__=a.prototype):(b.length=c,b._isBuffer=!0);var d=0!==c&&c<=a.poolSize>>>1;return d&&(b.parent=Z),b}function q(a){if(a>=f())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f().toString(16)+" bytes");return 0|a}function r(b,c){if(!(this instanceof r))return new r(b,c);var d=new a(b,c);return delete d.parent,d}function s(a,b){"string"!=typeof a&&(a=""+a);var c=a.length;if(0===c)return 0;for(var d=!1;;)switch(b){case"ascii":case"binary":case"raw":case"raws":return c;case"utf8":case"utf-8":return R(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return U(a).length;default:if(d)return R(a).length;b=(""+b).toLowerCase(),d=!0}}function t(a,b,c){var d=!1;if(b=0|b,c=void 0===c||c===1/0?this.length:0|c,a||(a="utf8"),0>b&&(b=0),c>this.length&&(c=this.length),b>=c)return"";for(;;)switch(a){case"hex":return F(this,b,c);case"utf8":case"utf-8":return B(this,b,c);case"ascii":return D(this,b,c);case"binary":return E(this,b,c);case"base64":return A(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}}function u(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d),d>e&&(d=e)):d=e;var f=b.length;if(f%2!==0)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;d>g;g++){var h=parseInt(b.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");a[c+g]=h}return g}function v(a,b,c,d){return V(R(b,a.length-c),a,c,d)}function w(a,b,c,d){return V(S(b),a,c,d)}function x(a,b,c,d){return w(a,b,c,d)}function y(a,b,c,d){return V(U(b),a,c,d)}function z(a,b,c,d){return V(T(b,a.length-c),a,c,d)}function A(a,b,c){return 0===b&&c===a.length?W.fromByteArray(a):W.fromByteArray(a.slice(b,c))}function B(a,b,c){c=Math.min(a.length,c);for(var d=[],e=b;c>e;){var f=a[e],g=null,h=f>239?4:f>223?3:f>191?2:1;if(c>=e+h){var i,j,k,l;switch(h){case 1:128>f&&(g=f);break;case 2:i=a[e+1],128===(192&i)&&(l=(31&f)<<6|63&i,l>127&&(g=l));break;case 3:i=a[e+1],j=a[e+2],128===(192&i)&&128===(192&j)&&(l=(15&f)<<12|(63&i)<<6|63&j,l>2047&&(55296>l||l>57343)&&(g=l));break;case 4:i=a[e+1],j=a[e+2],k=a[e+3],128===(192&i)&&128===(192&j)&&128===(192&k)&&(l=(15&f)<<18|(63&i)<<12|(63&j)<<6|63&k,l>65535&&1114112>l&&(g=l))}}null===g?(g=65533,h=1):g>65535&&(g-=65536,d.push(g>>>10&1023|55296),g=56320|1023&g),d.push(g),e+=h}return C(d)}function C(a){var b=a.length;if($>=b)return String.fromCharCode.apply(String,a);for(var c="",d=0;b>d;)c+=String.fromCharCode.apply(String,a.slice(d,d+=$));return c}function D(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(127&a[e]);return d}function E(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function F(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=Q(a[f]);return e}function G(a,b,c){for(var d=a.slice(b,c),e="",f=0;fa)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length")}function I(b,c,d,e,f,g){if(!a.isBuffer(b))throw new TypeError("buffer must be a Buffer instance");if(c>f||g>c)throw new RangeError("value is out of bounds");if(d+e>b.length)throw new RangeError("index out of range")}function J(a,b,c,d){0>b&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);f>e;e++)a[c+e]=(b&255<<8*(d?e:1-e))>>>8*(d?e:1-e)}function K(a,b,c,d){0>b&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);f>e;e++)a[c+e]=b>>>8*(d?e:3-e)&255}function L(a,b,c,d,e,f){if(b>e||f>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range");if(0>c)throw new RangeError("index out of range")}function M(a,b,c,d,e){return e||L(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(a,b,c,d,23,4),c+4}function N(a,b,c,d,e){return e||L(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(a,b,c,d,52,8),c+8}function O(a){if(a=P(a).replace(aa,""),a.length<2)return"";for(;a.length%4!==0;)a+="=";return a}function P(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function Q(a){return 16>a?"0"+a.toString(16):a.toString(16)}function R(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;d>g;g++){if(c=a.charCodeAt(g),c>55295&&57344>c){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(56320>c){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=e-55296<<10|c-56320|65536}else e&&(b-=3)>-1&&f.push(239,191,189);if(e=null,128>c){if((b-=1)<0)break;f.push(c)}else if(2048>c){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(65536>c){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(1114112>c))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function S(a){for(var b=[],c=0;c>8,e=c%256,f.push(e),f.push(d);return f}function U(a){return W.toByteArray(O(a))}function V(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}var W=c(3),X=c(4),Y=c(5);b.Buffer=a,b.SlowBuffer=r,b.INSPECT_MAX_BYTES=50,a.poolSize=8192;var Z={};a.TYPED_ARRAY_SUPPORT=void 0!==d.TYPED_ARRAY_SUPPORT?d.TYPED_ARRAY_SUPPORT:e(),a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array),a.isBuffer=function(a){return!(null==a||!a._isBuffer)},a.compare=function(b,c){if(!a.isBuffer(b)||!a.isBuffer(c))throw new TypeError("Arguments must be Buffers");if(b===c)return 0;for(var d=b.length,e=c.length,f=0,g=Math.min(d,e);g>f&&b[f]===c[f];)++f;return f!==g&&(d=b[f],e=c[f]),e>d?-1:d>e?1:0},a.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(b,c){if(!Y(b))throw new TypeError("list argument must be an Array of Buffers.");if(0===b.length)return new a(0);var d;if(void 0===c)for(c=0,d=0;d0&&(a=this.toString("hex",0,c).match(/.{2}/g).join(" "),this.length>c&&(a+=" ... ")),""},a.prototype.compare=function(b){if(!a.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?0:a.compare(this,b)},a.prototype.indexOf=function(b,c){function d(a,b,c){for(var d=-1,e=0;c+e2147483647?c=2147483647:-2147483648>c&&(c=-2147483648),c>>=0,0===this.length)return-1;if(c>=this.length)return-1;if(0>c&&(c=Math.max(this.length+c,0)),"string"==typeof b)return 0===b.length?-1:String.prototype.indexOf.call(this,b,c);if(a.isBuffer(b))return d(this,b,c);if("number"==typeof b)return a.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,b,c):d(this,[b],c);throw new TypeError("val must be string, number or Buffer")},a.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},a.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},a.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"==typeof b)d=b,c=this.length,b=0;else if(isFinite(b))b=0|b,isFinite(c)?(c=0|c,void 0===d&&(d="utf8")):(d=c,c=void 0);else{var e=d;d=b,b=0|c,c=e}var f=this.length-b;if((void 0===c||c>f)&&(c=f),a.length>0&&(0>c||0>b)||b>this.length)throw new RangeError("attempt to write outside buffer bounds");d||(d="utf8");for(var g=!1;;)switch(d){case"hex":return u(this,a,b,c);case"utf8":case"utf-8":return v(this,a,b,c);case"ascii":return w(this,a,b,c);case"binary":return x(this,a,b,c);case"base64":return y(this,a,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,a,b,c);default:if(g)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),g=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;a.prototype.slice=function(b,c){var d=this.length;b=~~b,c=void 0===c?d:~~c,0>b?(b+=d,0>b&&(b=0)):b>d&&(b=d),0>c?(c+=d,0>c&&(c=0)):c>d&&(c=d),b>c&&(c=b);var e;if(a.TYPED_ARRAY_SUPPORT)e=a._augment(this.subarray(b,c));else{var f=c-b;e=new a(f,void 0);for(var g=0;f>g;g++)e[g]=this[g+b]}return e.length&&(e.parent=this.parent||this),e},a.prototype.readUIntLE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f0&&(e*=256);)d+=this[a+--b]*e;return d},a.prototype.readUInt8=function(a,b){return b||H(a,1,this.length),this[a]},a.prototype.readUInt16LE=function(a,b){return b||H(a,2,this.length),this[a]|this[a+1]<<8},a.prototype.readUInt16BE=function(a,b){return b||H(a,2,this.length),this[a]<<8|this[a+1]},a.prototype.readUInt32LE=function(a,b){return b||H(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},a.prototype.readUInt32BE=function(a,b){return b||H(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},a.prototype.readIntLE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f=e&&(d-=Math.pow(2,8*b)),d},a.prototype.readIntBE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},a.prototype.readInt8=function(a,b){return b||H(a,1,this.length),128&this[a]?-1*(255-this[a]+1):this[a]},a.prototype.readInt16LE=function(a,b){b||H(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},a.prototype.readInt16BE=function(a,b){b||H(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},a.prototype.readInt32LE=function(a,b){return b||H(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},a.prototype.readInt32BE=function(a,b){return b||H(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},a.prototype.readFloatLE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!0,23,4)},a.prototype.readFloatBE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!1,23,4)},a.prototype.readDoubleLE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!0,52,8)},a.prototype.readDoubleBE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!1,52,8)},a.prototype.writeUIntLE=function(a,b,c,d){a=+a,b=0|b,c=0|c,d||I(this,a,b,c,Math.pow(2,8*c),0);var e=1,f=0;for(this[b]=255&a;++f=0&&(f*=256);)this[b+e]=a/f&255;return b+c},a.prototype.writeUInt8=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,1,255,0),a.TYPED_ARRAY_SUPPORT||(b=Math.floor(b)),this[c]=255&b,c+1},a.prototype.writeUInt16LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[c]=255&b,this[c+1]=b>>>8):J(this,b,c,!0),c+2},a.prototype.writeUInt16BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>8,this[c+1]=255&b):J(this,b,c,!1),c+2},a.prototype.writeUInt32LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[c+3]=b>>>24,this[c+2]=b>>>16,this[c+1]=b>>>8,this[c]=255&b):K(this,b,c,!0),c+4},a.prototype.writeUInt32BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>24,this[c+1]=b>>>16,this[c+2]=b>>>8,this[c+3]=255&b):K(this,b,c,!1),c+4},a.prototype.writeIntLE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=0,g=1,h=0>a?1:0;for(this[b]=255&a;++f>0)-h&255;return b+c},a.prototype.writeIntBE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=c-1,g=1,h=0>a?1:0;for(this[b+f]=255&a;--f>=0&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},a.prototype.writeInt8=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,1,127,-128),a.TYPED_ARRAY_SUPPORT||(b=Math.floor(b)),0>b&&(b=255+b+1),this[c]=255&b,c+1},a.prototype.writeInt16LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[c]=255&b,this[c+1]=b>>>8):J(this,b,c,!0),c+2},a.prototype.writeInt16BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>8,this[c+1]=255&b):J(this,b,c,!1),c+2},a.prototype.writeInt32LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[c]=255&b,this[c+1]=b>>>8,this[c+2]=b>>>16,this[c+3]=b>>>24):K(this,b,c,!0),c+4},a.prototype.writeInt32BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,2147483647,-2147483648),0>b&&(b=4294967295+b+1),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>24,this[c+1]=b>>>16,this[c+2]=b>>>8,this[c+3]=255&b):K(this,b,c,!1),c+4},a.prototype.writeFloatLE=function(a,b,c){return M(this,a,b,!0,c)},a.prototype.writeFloatBE=function(a,b,c){return M(this,a,b,!1,c)},a.prototype.writeDoubleLE=function(a,b,c){return N(this,a,b,!0,c)},a.prototype.writeDoubleBE=function(a,b,c){return N(this,a,b,!1,c)},a.prototype.copy=function(b,c,d,e){if(d||(d=0),e||0===e||(e=this.length),c>=b.length&&(c=b.length),c||(c=0),e>0&&d>e&&(e=d),e===d)return 0;if(0===b.length||0===this.length)return 0;if(0>c)throw new RangeError("targetStart out of bounds");if(0>d||d>=this.length)throw new RangeError("sourceStart out of bounds");if(0>e)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),b.length-cd&&e>c)for(f=g-1;f>=0;f--)b[f+c]=this[f+d];else if(1e3>g||!a.TYPED_ARRAY_SUPPORT)for(f=0;g>f;f++)b[f+c]=this[f+d];else b._set(this.subarray(d,d+g),c);return g},a.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),b>c)throw new RangeError("end < start");if(c!==b&&0!==this.length){if(0>b||b>=this.length)throw new RangeError("start out of bounds");if(0>c||c>this.length)throw new RangeError("end out of bounds");var d;if("number"==typeof a)for(d=b;c>d;d++)this[d]=a;else{var e=R(a.toString()),f=e.length;for(d=b;c>d;d++)this[d]=e[d%f]}return this}},a.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(a.TYPED_ARRAY_SUPPORT)return new a(this).buffer;for(var b=new Uint8Array(this.length),c=0,d=b.length;d>c;c+=1)b[c]=this[c];return b.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var _=a.prototype;a._augment=function(b){return b.constructor=a,b._isBuffer=!0,b._set=b.set,b.get=_.get,b.set=_.set,b.write=_.write,b.toString=_.toString,b.toLocaleString=_.toString,b.toJSON=_.toJSON,b.equals=_.equals,b.compare=_.compare,b.indexOf=_.indexOf,b.copy=_.copy,b.slice=_.slice,b.readUIntLE=_.readUIntLE,b.readUIntBE=_.readUIntBE,b.readUInt8=_.readUInt8,b.readUInt16LE=_.readUInt16LE,b.readUInt16BE=_.readUInt16BE,b.readUInt32LE=_.readUInt32LE,b.readUInt32BE=_.readUInt32BE,b.readIntLE=_.readIntLE,b.readIntBE=_.readIntBE,b.readInt8=_.readInt8,b.readInt16LE=_.readInt16LE,b.readInt16BE=_.readInt16BE,b.readInt32LE=_.readInt32LE,b.readInt32BE=_.readInt32BE,b.readFloatLE=_.readFloatLE,b.readFloatBE=_.readFloatBE,b.readDoubleLE=_.readDoubleLE,b.readDoubleBE=_.readDoubleBE,b.writeUInt8=_.writeUInt8,b.writeUIntLE=_.writeUIntLE,b.writeUIntBE=_.writeUIntBE,b.writeUInt16LE=_.writeUInt16LE,b.writeUInt16BE=_.writeUInt16BE,b.writeUInt32LE=_.writeUInt32LE,b.writeUInt32BE=_.writeUInt32BE,b.writeIntLE=_.writeIntLE,b.writeIntBE=_.writeIntBE,b.writeInt8=_.writeInt8,b.writeInt16LE=_.writeInt16LE,b.writeInt16BE=_.writeInt16BE,b.writeInt32LE=_.writeInt32LE,b.writeInt32BE=_.writeInt32BE,b.writeFloatLE=_.writeFloatLE,b.writeFloatBE=_.writeFloatBE,b.writeDoubleLE=_.writeDoubleLE,b.writeDoubleBE=_.writeDoubleBE,b.fill=_.fill,b.inspect=_.inspect,b.toArrayBuffer=_.toArrayBuffer,b};var aa=/[^+\/0-9A-Za-z-_]/g}).call(b,c(2).Buffer,function(){return this}())},function(a,b,c){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===g||b===l?62:b===h||b===m?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function c(a){function c(a){j[l++]=a}var d,e,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new f(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function e(a){function b(a){return d.charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var e,f,g,h=a.length%3,i="";for(e=0,g=a.length-h;g>e;e+=3)f=(a[e]<<16)+(a[e+1]<<8)+a[e+2],i+=c(f);switch(h){case 1:f=a[a.length-1],i+=b(f>>2),i+=b(f<<4&63),i+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],i+=b(f>>10),i+=b(f>>4&63),i+=b(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g="+".charCodeAt(0),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0),l="-".charCodeAt(0),m="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=e}(b)},function(a,b){b.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?NaN:(n?-1:1)*(1/0);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},b.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},function(a,b){var c=Array.isArray,d=Object.prototype.toString;a.exports=c||function(a){return!!a&&"[object Array]"==d.call(a)}},function(a,b,c){"use strict";function d(a){this.fontDescriptors=a}function e(a){if(!a)return null;if("number"==typeof a||a instanceof Number)a={left:a,right:a,top:a,bottom:a};else if(a instanceof Array)if(2===a.length)a={left:a[0],top:a[1],right:a[0],bottom:a[1]};else{if(4!==a.length)throw"Invalid pageMargins definition";a={left:a[0],top:a[1],right:a[2],bottom:a[3]}}return a}function f(a){a.registerTableLayouts({noBorders:{hLineWidth:function(a){return 0},vLineWidth:function(a){return 0},paddingLeft:function(a){return a&&4||0},paddingRight:function(a,b){return ab.options.size[1]?"landscape":"portrait";if(a.pageSize.orientation!==c){var d=b.options.size[0],e=b.options.size[1];b.options.size=[e,d]}}function i(a,b,c){c._pdfMakePages=a;for(var d=0;d0&&(h(a[d],c),c.addPage(c.options));for(var e=a[d],f=0,g=e.items.length;g>f;f++){var i=e.items[f];switch(i.type){case"vector":l(i.item,c);break;case"line":j(i.item,i.item.x,i.item.y,c);break;case"image":m(i.item,i.item.x,i.item.y,c)}}e.watermark&&k(e,c),b.setFontRefsToPdfDoc()}}function j(a,b,c,d){b=b||0,c=c||0;var e=a.getHeight(),f=a.getAscenderHeight();s.drawBackground(a,b,c,d);for(var g=0,h=a.inlines.length;h>g;g++){var i=a.inlines[g];d.fill(i.color||"black"),d.save(),d.transform(1,0,0,-1,0,d.page.height);var j=i.font.encode(i.text);d.addContent("BT"),d.addContent(""+(b+i.x)+" "+(d.page.height-c-f)+" Td"),d.addContent("/"+j.fontId+" "+i.fontSize+" Tf"),d.addContent("<"+j.encodedText+"> Tj"),d.addContent("ET"),i.link&&d.link(b+i.x,d.page.height-c-e,i.width,e,i.link),d.restore()}s.drawDecorations(a,b,c,d)}function k(a,b){var c=a.watermark;b.fill("black"),b.opacity(.6),b.save(),b.transform(1,0,0,-1,0,b.page.height);var d=180*Math.atan2(b.page.height,b.page.width)/Math.PI;b.rotate(d,{origin:[b.page.width/2,b.page.height/2]});var e=c.font.encode(c.text);b.addContent("BT"),b.addContent(""+(b.page.width/2-c.size.size.width/2)+" "+(b.page.height/2-c.size.size.height/4)+" Td"),b.addContent("/"+e.fontId+" "+c.size.fontSize+" Tf"),b.addContent("<"+e.encodedText+"> Tj"),b.addContent("ET"),b.restore()}function l(a,b){switch(b.lineWidth(a.lineWidth||1),a.dash?b.dash(a.dash.length,{space:a.dash.space||a.dash.length}):b.undash(),b.fillOpacity(a.fillOpacity||1),b.strokeOpacity(a.strokeOpacity||1),b.lineJoin(a.lineJoin||"miter"),a.type){case"ellipse":b.ellipse(a.x,a.y,a.r1,a.r2);break;case"rect":a.r?b.roundedRect(a.x,a.y,a.w,a.h,a.r):b.rect(a.x,a.y,a.w,a.h);break;case"line":b.moveTo(a.x1,a.y1),b.lineTo(a.x2,a.y2);break;case"polyline":if(0===a.points.length)break;b.moveTo(a.points[0].x,a.points[0].y);for(var c=1,d=a.points.length;d>c;c++)b.lineTo(a.points[c].x,a.points[c].y);if(a.points.length>1){var e=a.points[0],f=a.points[a.points.length-1];(a.closePath||e.x===f.x&&e.y===f.y)&&b.closePath()}}a.color&&a.lineColor?b.fillAndStroke(a.color,a.lineColor):a.color?b.fill(a.color):b.stroke(a.lineColor||"black")}function m(a,b,c,d){d.image(a.image,a.x,a.y,{width:a._width,height:a._height})}var n=(c(7),c(9)),o=c(11),p=c(24),q=(c(46),c(102)),r=c(103),s=c(104),n=c(9);d.prototype.createPdfKitDocument=function(a,b){b=b||{};var c=g(a.pageSize||"a4");if("landscape"===a.pageOrientation&&(c={width:c.height,height:c.width}),c.orientation="landscape"===a.pageOrientation?a.pageOrientation:"portrait",this.pdfKitDoc=new p({size:[c.width,c.height],compress:!1}),this.pdfKitDoc.info.Producer="pdfmake",this.pdfKitDoc.info.Creator="pdfmake",a.info){a.info;this.pdfKitDoc.info.Title=a.info.title?a.info.title:null,this.pdfKitDoc.info.Author=a.info.author?a.info.author:null,this.pdfKitDoc.info.Subject=a.info.subject?a.info.subject:null,this.pdfKitDoc.info.Keywords=a.info.keywords?a.info.keywords:null}this.fontProvider=new n(this.fontDescriptors,this.pdfKitDoc),a.images=a.images||{};var d=new o(c,e(a.pageMargins||40),new r(this.pdfKitDoc,a.images));f(d),b.tableLayouts&&d.registerTableLayouts(b.tableLayouts);var h=d.layoutDocument(a.content,this.fontProvider,a.styles||{},a.defaultStyle||{fontSize:12,font:"Roboto"},a.background,a.header,a.footer,a.images,a.watermark,a.pageBreakBefore);if(i(h,this.fontProvider,this.pdfKitDoc),b.autoPrint){var j=this.pdfKitDoc.ref({Type:"Action",S:"Named",N:"Print"});this.pdfKitDoc._root.data.OpenAction=j,j.end()}return this.pdfKitDoc};a.exports=d,d.prototype.fs=c(44)},function(a,b,c){var d;(function(a,e){(function(){function f(a,b){if(a!==b){var c=null===a,d=a===B,e=a===a,f=null===b,g=b===B,h=b===b;if(a>b&&!f||!e||c&&!g&&h||d&&h)return 1; -if(b>a&&!c||!h||f&&!d&&e||g&&e)return-1}return 0}function g(a,b,c){for(var d=a.length,e=c?d:-1;c?e--:++e-1;);return c}function l(a,b){for(var c=a.length;c--&&b.indexOf(a.charAt(c))>-1;);return c}function m(a,b){return f(a.criteria,b.criteria)||a.index-b.index}function n(a,b,c){for(var d=-1,e=a.criteria,g=b.criteria,h=e.length,i=c.length;++d=i)return j;var k=c[d];return j*("asc"===k||k===!0?1:-1)}}return a.index-b.index}function o(a){return Ua[a]}function p(a){return Va[a]}function q(a,b,c){return b?a=Ya[a]:c&&(a=Za[a]),"\\"+a}function r(a){return"\\"+Za[a]}function s(a,b,c){for(var d=a.length,e=b+(c?0:-1);c?e--:++e=a&&a>=9&&13>=a||32==a||160==a||5760==a||6158==a||a>=8192&&(8202>=a||8232==a||8233==a||8239==a||8287==a||12288==a||65279==a)}function v(a,b){for(var c=-1,d=a.length,e=-1,f=[];++cb,e=c?a.length:0,f=Tc(0,e,this.__views__),g=f.start,h=f.end,i=h-g,j=d?h:g-1,k=this.__iteratees__,l=k.length,m=0,n=wg(i,this.__takeCount__);if(!c||Q>e||e==i&&n==i)return cc(d&&c?a.reverse():a,this.__actions__);var o=[];a:for(;i--&&n>m;){j+=b;for(var p=-1,q=a[j];++p=Q?oc(b):null,j=b.length;i&&(f=Za,g=!1,b=i);a:for(;++ec&&(c=-c>e?0:e+c),d=d===B||d>e?e:+d||0,0>d&&(d+=e),e=c>d?0:d>>>0,c>>>=0;e>c;)a[c++]=b;return a}function Bb(a,b){var c=[];return Jg(a,function(a,d,e){b(a,d,e)&&c.push(a)}),c}function Cb(a,b,c,d){var e;return c(a,function(a,c,f){return b(a,c,f)?(e=d?c:a,!1):void 0}),e}function Db(a,b,c,d){d||(d=[]);for(var e=-1,f=a.length;++ed;)a=a[b[d++]];return d&&d==e?a:B}}function Jb(a,b,c,d,e,f){return a===b?!0:null==a||null==b||!He(a)&&!t(b)?a!==a&&b!==b:Kb(a,b,Jb,c,d,e,f)}function Kb(a,b,c,d,e,f,g){var h=Ch(a),i=Ch(b),j=W,k=W;h||(j=cg.call(a),j==V?j=ba:j!=ba&&(h=Qe(a))),i||(k=cg.call(b),k==V?k=ba:k!=ba&&(i=Qe(b)));var l=j==ba,m=k==ba,n=j==k;if(n&&!h&&!l)return Mc(a,b,j);if(!e){var o=l&&ag.call(a,"__wrapped__"),p=m&&ag.call(b,"__wrapped__");if(o||p)return c(o?a.value():a,p?b.value():b,d,e,f,g)}if(!n)return!1;f||(f=[]),g||(g=[]);for(var q=f.length;q--;)if(f[q]==a)return g[q]==b;f.push(a),g.push(b);var r=(h?Lc:Nc)(a,b,c,d,e,f,g);return f.pop(),g.pop(),r}function Lb(a,b,c){var d=b.length,e=d,f=!c;if(null==a)return!e;for(a=kd(a);d--;){var g=b[d];if(f&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++db&&(b=-b>e?0:e+b),c=c===B||c>e?e:+c||0,0>c&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Of(e);++d=Q,i=g?oc():null,j=[];i?(d=Za,f=!1):(g=!1,i=b?[]:j);a:for(;++c=e){for(;e>d;){var f=d+e>>>1,g=a[f];(c?b>=g:b>g)&&null!==g?d=f+1:e=f}return e}return ec(a,b,Bf,c)}function ec(a,b,c,d){b=c(b);for(var e=0,f=a?a.length:0,g=b!==b,h=null===b,i=b===B;f>e;){var j=rg((e+f)/2),k=c(a[j]),l=k!==B,m=k===k;if(g)var n=m||d;else n=h?m&&l&&(d||null!=k):i?m&&(d||l):null==k?!1:d?b>=k:b>k;n?e=j+1:f=j}return wg(f,Dg)}function fc(a,b,c){if("function"!=typeof a)return Bf;if(b===B)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)};case 5:return function(c,d,e,f,g){return a.call(b,c,d,e,f,g)}}return function(){return a.apply(b,arguments)}}function gc(a){var b=new fg(a.byteLength),c=new ng(b);return c.set(new ng(a)),b}function hc(a,b,c){for(var d=c.length,e=-1,f=vg(a.length-d,0),g=-1,h=b.length,i=Of(h+f);++g2?c[e-2]:B,g=e>2?c[2]:B,h=e>1?c[e-1]:B;for("function"==typeof f?(f=fc(f,h,5),e-=2):(f="function"==typeof h?h:B,e-=f?1:0),g&&$c(c[0],c[1],g)&&(f=3>e?B:f,e=1);++d-1?c[f]:B}return Cb(c,d,a)}}function vc(a){return function(b,c,d){return b&&b.length?(c=Oc(c,d,3),g(b,c,a)):-1}}function wc(a){return function(b,c,d){return c=Oc(c,d,3),Cb(b,c,a,!0)}}function xc(a){return function(){for(var b,c=arguments.length,e=a?c:-1,f=0,g=Of(c);a?e--:++e=Q)return b.plant(d).value();for(var e=0,f=c?g[e].apply(this,a):d;++es){var y=h?ab(h):B,z=vg(j-s,0),A=o?x:B,C=o?B:x,F=o?u:B,G=o?B:u;b|=o?I:J,b&=~(o?J:I),p||(b&=~(D|E));var H=[a,b,c,F,A,G,C,y,i,z],K=Fc.apply(B,H);return ad(a)&&Qg(K,H),K.placeholder=w,K}}var L=m?c:this,M=n?L[a]:a;return h&&(u=hd(u,h)),l&&i=b||!tg(b))return"";var e=b-d;return c=null==c?" ":c+"",qf(c,pg(e/c.length)).slice(0,e)}function Hc(a,b,c,d){function e(){for(var b=-1,h=arguments.length,i=-1,j=d.length,k=Of(j+h);++ii))return!1;for(;++h-1&&a%1==0&&b>a}function $c(a,b,c){if(!He(c))return!1;var d=typeof b;if("number"==d?Yc(c)&&Zc(b,c.length):"string"==d&&b in c){var e=c[b];return a===a?a===e:e!==e}return!1}function _c(a,b){var c=typeof a;if("string"==c&&Ba.test(a)||"number"==c)return!0;if(Ch(a))return!1;var d=!Aa.test(a);return d||null!=b&&a in kd(b)}function ad(a){var c=Pc(a);if(!(c in e.prototype))return!1;var d=b[c];if(a===d)return!0;var f=Og(d);return!!f&&a===f[0]}function bd(a){return"number"==typeof a&&a>-1&&a%1==0&&Fg>=a}function cd(a){return a===a&&!He(a)}function dd(a,b){var c=a[1],d=b[1],e=c|d,f=K>e,g=d==K&&c==G||d==K&&c==L&&a[7].length<=b[8]||d==(K|L)&&c==G;if(!f&&!g)return a;d&D&&(a[2]=b[2],e|=c&D?0:F);var h=b[3];if(h){var i=a[3];a[3]=i?hc(i,h,b[4]):ab(h),a[4]=i?v(a[3],U):ab(b[4])}return h=b[5],h&&(i=a[5],a[5]=i?ic(i,h,b[6]):ab(h),a[6]=i?v(a[5],U):ab(b[6])),h=b[7],h&&(a[7]=ab(h)),d&K&&(a[8]=null==a[8]?b[8]:wg(a[8],b[8])),null==a[9]&&(a[9]=b[9]),a[0]=b[0],a[1]=e,a}function ed(a,b){return a===B?b:Dh(a,b,ed)}function fd(a,b){a=kd(a);for(var c=-1,d=b.length,e={};++cd;)g[++f]=Wb(a,d,d+=b);return g}function od(a){for(var b=-1,c=a?a.length:0,d=-1,e=[];++bb?0:b)):[]}function qd(a,b,c){var d=a?a.length:0;return d?((c?$c(a,b,c):null==b)&&(b=1),b=d-(+b||0),Wb(a,0,0>b?0:b)):[]}function rd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!0,!0):[]}function sd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!0):[]}function td(a,b,c,d){var e=a?a.length:0;return e?(c&&"number"!=typeof c&&$c(a,b,c)&&(c=0,d=e),Ab(a,b,c,d)):[]}function ud(a){return a?a[0]:B}function vd(a,b,c){var d=a?a.length:0;return c&&$c(a,b,c)&&(b=!1),d?Db(a,b):[]}function wd(a){var b=a?a.length:0;return b?Db(a,!0):[]}function xd(a,b,c){var d=a?a.length:0;if(!d)return-1;if("number"==typeof c)c=0>c?vg(d+c,0):c;else if(c){var e=dc(a,b);return d>e&&(b===b?b===a[e]:a[e]!==a[e])?e:-1}return h(a,b,c||0)}function yd(a){return qd(a,1)}function zd(a){var b=a?a.length:0;return b?a[b-1]:B}function Ad(a,b,c){var d=a?a.length:0;if(!d)return-1;var e=d;if("number"==typeof c)e=(0>c?vg(d+c,0):wg(c||0,d-1))+1;else if(c){e=dc(a,b,!0)-1;var f=a[e];return(b===b?b===f:f!==f)?e:-1}if(b!==b)return s(a,e,!0);for(;e--;)if(a[e]===b)return e;return-1}function Bd(){var a=arguments,b=a[0];if(!b||!b.length)return b;for(var c=0,d=Qc(),e=a.length;++c-1;)mg.call(b,f,1);return b}function Cd(a,b,c){var d=[];if(!a||!a.length)return d;var e=-1,f=[],g=a.length;for(b=Oc(b,c,3);++eb?0:b)):[]}function Gd(a,b,c){var d=a?a.length:0;return d?((c?$c(a,b,c):null==b)&&(b=1),b=d-(+b||0),Wb(a,0>b?0:b)):[]}function Hd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!1,!0):[]}function Id(a,b,c){return a&&a.length?bc(a,Oc(b,c,3)):[]}function Jd(a,b,c,d){var e=a?a.length:0;if(!e)return[];null!=b&&"boolean"!=typeof b&&(d=c,c=$c(a,b,d)?B:b,b=!1);var f=Oc();return(null!=c||f!==ub)&&(c=f(c,d,3)),b&&Qc()==h?w(a,c):_b(a,c)}function Kd(a){if(!a||!a.length)return[];var b=-1,c=0;a=hb(a,function(a){return Yc(a)?(c=vg(a.length,c),!0):void 0});for(var d=Of(c);++bc?vg(e+c,0):c||0,"string"==typeof a||!Ch(a)&&Pe(a)?e>=c&&a.indexOf(b,c)>-1:!!e&&Qc(a,b,c)>-1}function _d(a,b,c){var d=Ch(a)?ib:Mb;return b=Oc(b,c,3),d(a,b)}function ae(a,b){return _d(a,Hf(b))}function be(a,b,c){var d=Ch(a)?hb:Bb;return b=Oc(b,c,3),d(a,function(a,c,d){return!b(a,c,d)})}function ce(a,b,c){if(c?$c(a,b,c):null==b){a=jd(a);var d=a.length;return d>0?a[Ub(0,d-1)]:B}var e=-1,f=Ue(a),d=f.length,g=d-1;for(b=wg(0>b?0:+b||0,d);++e0&&(c=b.apply(this,arguments)),1>=a&&(b=B),c}}function me(a,b,c){function d(){n&&gg(n),j&&gg(j),p=0,j=n=o=B}function e(b,c){c&&gg(c),j=n=o=B,b&&(p=oh(),k=a.apply(m,i),n||j||(i=m=B))}function f(){var a=b-(oh()-l);0>=a||a>b?e(o,j):n=lg(f,a)}function g(){e(r,n)}function h(){if(i=arguments,l=oh(),m=this,o=r&&(n||!s),q===!1)var c=s&&!n;else{j||s||(p=l);var d=q-(l-p),e=0>=d||d>q;e?(j&&(j=gg(j)),p=l,k=a.apply(m,i)):j||(j=lg(g,d))}return e&&n?n=gg(n):n||b===q||(n=lg(f,b)),c&&(e=!0,k=a.apply(m,i)),!e||n||j||(i=m=B),k}var i,j,k,l,m,n,o,p=0,q=!1,r=!0;if("function"!=typeof a)throw new Xf(T);if(b=0>b?0:+b||0,c===!0){var s=!0;r=!1}else He(c)&&(s=!!c.leading,q="maxWait"in c&&vg(+c.maxWait||0,b),r="trailing"in c?!!c.trailing:r);return h.cancel=d,h}function ne(a,b){if("function"!=typeof a||b&&"function"!=typeof b)throw new Xf(T);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g),g};return c.cache=new ne.Cache,c}function oe(a){if("function"!=typeof a)throw new Xf(T);return function(){return!a.apply(this,arguments)}}function pe(a){return le(2,a)}function qe(a,b){if("function"!=typeof a)throw new Xf(T);return b=vg(b===B?a.length-1:+b||0,0),function(){for(var c=arguments,d=-1,e=vg(c.length-b,0),f=Of(e);++db}function xe(a,b){return a>=b}function ye(a){return t(a)&&Yc(a)&&ag.call(a,"callee")&&!jg.call(a,"callee")}function ze(a){return a===!0||a===!1||t(a)&&cg.call(a)==X}function Ae(a){return t(a)&&cg.call(a)==Y}function Be(a){return!!a&&1===a.nodeType&&t(a)&&!Ne(a)}function Ce(a){return null==a?!0:Yc(a)&&(Ch(a)||Pe(a)||ye(a)||t(a)&&Ge(a.splice))?!a.length:!Nh(a).length}function De(a,b,c,d){c="function"==typeof c?fc(c,d,3):B;var e=c?c(a,b):B;return e===B?Jb(a,b,c):!!e}function Ee(a){return t(a)&&"string"==typeof a.message&&cg.call(a)==Z}function Fe(a){return"number"==typeof a&&tg(a)}function Ge(a){return He(a)&&cg.call(a)==$}function He(a){var b=typeof a;return!!a&&("object"==b||"function"==b)}function Ie(a,b,c,d){return c="function"==typeof c?fc(c,d,3):B,Lb(a,Rc(b),c)}function Je(a){return Me(a)&&a!=+a}function Ke(a){return null==a?!1:Ge(a)?eg.test(_f.call(a)):t(a)&&Ka.test(a)}function Le(a){return null===a}function Me(a){return"number"==typeof a||t(a)&&cg.call(a)==aa}function Ne(a){var b;if(!t(a)||cg.call(a)!=ba||ye(a)||!ag.call(a,"constructor")&&(b=a.constructor,"function"==typeof b&&!(b instanceof b)))return!1;var c;return Eb(a,function(a,b){c=b}),c===B||ag.call(a,c)}function Oe(a){return He(a)&&cg.call(a)==ca}function Pe(a){return"string"==typeof a||t(a)&&cg.call(a)==ea}function Qe(a){return t(a)&&bd(a.length)&&!!Sa[cg.call(a)]}function Re(a){return a===B}function Se(a,b){return b>a}function Te(a,b){return b>=a}function Ue(a){var b=a?Pg(a):0;return bd(b)?b?ab(a):[]:ef(a)}function Ve(a){return tb(a,_e(a))}function We(a,b,c){var d=Ig(a);return c&&$c(a,b,c)&&(b=B),b?rb(d,b):d}function Xe(a){return Hb(a,_e(a))}function Ye(a,b,c){var d=null==a?B:Ib(a,ld(b),b+"");return d===B?c:d}function Ze(a,b){if(null==a)return!1;var c=ag.call(a,b);if(!c&&!_c(b)){if(b=ld(b),a=1==b.length?a:Ib(a,Wb(b,0,-1)),null==a)return!1;b=zd(b),c=ag.call(a,b)}return c||bd(a.length)&&Zc(b,a.length)&&(Ch(a)||ye(a))}function $e(a,b,c){c&&$c(a,b,c)&&(b=B);for(var d=-1,e=Nh(a),f=e.length,g={};++d0;++d=wg(b,c)&&ac?0:+c||0,d),c-=b.length, -c>=0&&a.indexOf(b,c)==c}function mf(a){return a=j(a),a&&wa.test(a)?a.replace(ua,p):a}function nf(a){return a=j(a),a&&Ea.test(a)?a.replace(Da,q):a||"(?:)"}function of(a,b,c){a=j(a),b=+b;var d=a.length;if(d>=b||!tg(b))return a;var e=(b-d)/2,f=rg(e),g=pg(e);return c=Gc("",g,c),c.slice(0,f)+a+c}function pf(a,b,c){return(c?$c(a,b,c):null==b)?b=0:b&&(b=+b),a=tf(a),yg(a,b||(Ja.test(a)?16:10))}function qf(a,b){var c="";if(a=j(a),b=+b,1>b||!a||!tg(b))return c;do b%2&&(c+=a),b=rg(b/2),a+=a;while(b);return c}function rf(a,b,c){return a=j(a),c=null==c?0:wg(0>c?0:+c||0,a.length),a.lastIndexOf(b,c)==c}function sf(a,c,d){var e=b.templateSettings;d&&$c(a,c,d)&&(c=d=B),a=j(a),c=qb(rb({},d||c),e,pb);var f,g,h=qb(rb({},c.imports),e.imports,pb),i=Nh(h),k=ac(h,i),l=0,m=c.interpolate||Na,n="__p += '",o=Vf((c.escape||Na).source+"|"+m.source+"|"+(m===za?Ha:Na).source+"|"+(c.evaluate||Na).source+"|$","g"),p="//# sourceURL="+("sourceURL"in c?c.sourceURL:"lodash.templateSources["+ ++Ra+"]")+"\n";a.replace(o,function(b,c,d,e,h,i){return d||(d=e),n+=a.slice(l,i).replace(Oa,r),c&&(f=!0,n+="' +\n__e("+c+") +\n'"),h&&(g=!0,n+="';\n"+h+";\n__p += '"),d&&(n+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),l=i+b.length,b}),n+="';\n";var q=c.variable;q||(n="with (obj) {\n"+n+"\n}\n"),n=(g?n.replace(qa,""):n).replace(ra,"$1").replace(sa,"$1;"),n="function("+(q||"obj")+") {\n"+(q?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(f?", __e = _.escape":"")+(g?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+n+"return __p\n}";var s=Yh(function(){return Rf(i,p+"return "+n).apply(B,k)});if(s.source=n,Ee(s))throw s;return s}function tf(a,b,c){var d=a;return(a=j(a))?(c?$c(d,b,c):null==b)?a.slice(x(a),y(a)+1):(b+="",a.slice(k(a,b),l(a,b)+1)):a}function uf(a,b,c){var d=a;return a=j(a),a?(c?$c(d,b,c):null==b)?a.slice(x(a)):a.slice(k(a,b+"")):a}function vf(a,b,c){var d=a;return a=j(a),a?(c?$c(d,b,c):null==b)?a.slice(0,y(a)+1):a.slice(0,l(a,b+"")+1):a}function wf(a,b,c){c&&$c(a,b,c)&&(b=B);var d=M,e=N;if(null!=b)if(He(b)){var f="separator"in b?b.separator:f;d="length"in b?+b.length||0:d,e="omission"in b?j(b.omission):e}else d=+b||0;if(a=j(a),d>=a.length)return a;var g=d-e.length;if(1>g)return e;var h=a.slice(0,g);if(null==f)return h+e;if(Oe(f)){if(a.slice(g).search(f)){var i,k,l=a.slice(0,g);for(f.global||(f=Vf(f.source,(Ia.exec(f)||"")+"g")),f.lastIndex=0;i=f.exec(l);)k=i.index;h=h.slice(0,null==k?g:k)}}else if(a.indexOf(f,g)!=g){var m=h.lastIndexOf(f);m>-1&&(h=h.slice(0,m))}return h+e}function xf(a){return a=j(a),a&&va.test(a)?a.replace(ta,z):a}function yf(a,b,c){return c&&$c(a,b,c)&&(b=B),a=j(a),a.match(b||Pa)||[]}function zf(a,b,c){return c&&$c(a,b,c)&&(b=B),t(a)?Cf(a):ub(a,b)}function Af(a){return function(){return a}}function Bf(a){return a}function Cf(a){return Nb(vb(a,!0))}function Df(a,b){return Ob(a,vb(b,!0))}function Ef(a,b,c){if(null==c){var d=He(b),e=d?Nh(b):B,f=e&&e.length?Hb(b,e):B;(f?f.length:d)||(f=!1,c=b,b=a,a=this)}f||(f=Hb(b,Nh(b)));var g=!0,h=-1,i=Ge(a),j=f.length;c===!1?g=!1:He(c)&&"chain"in c&&(g=c.chain);for(;++ha||!tg(a))return[];var d=-1,e=Of(wg(a,Cg));for(b=fc(b,c,1);++dd?e[d]=b(d):b(d);return e}function Lf(a){var b=++bg;return j(a)+b}function Mf(a,b){return(+a||0)+(+b||0)}function Nf(a,b,c){return c&&$c(a,b,c)&&(b=B),b=Oc(b,c,3),1==b.length?nb(Ch(a)?a:jd(a),b):$b(a,b)}a=a?eb.defaults(db.Object(),a,eb.pick(db,Qa)):db;var Of=a.Array,Pf=a.Date,Qf=a.Error,Rf=a.Function,Sf=a.Math,Tf=a.Number,Uf=a.Object,Vf=a.RegExp,Wf=a.String,Xf=a.TypeError,Yf=Of.prototype,Zf=Uf.prototype,$f=Wf.prototype,_f=Rf.prototype.toString,ag=Zf.hasOwnProperty,bg=0,cg=Zf.toString,dg=db._,eg=Vf("^"+_f.call(ag).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fg=a.ArrayBuffer,gg=a.clearTimeout,hg=a.parseFloat,ig=Sf.pow,jg=Zf.propertyIsEnumerable,kg=Sc(a,"Set"),lg=a.setTimeout,mg=Yf.splice,ng=a.Uint8Array,og=Sc(a,"WeakMap"),pg=Sf.ceil,qg=Sc(Uf,"create"),rg=Sf.floor,sg=Sc(Of,"isArray"),tg=a.isFinite,ug=Sc(Uf,"keys"),vg=Sf.max,wg=Sf.min,xg=Sc(Pf,"now"),yg=a.parseInt,zg=Sf.random,Ag=Tf.NEGATIVE_INFINITY,Bg=Tf.POSITIVE_INFINITY,Cg=4294967295,Dg=Cg-1,Eg=Cg>>>1,Fg=9007199254740991,Gg=og&&new og,Hg={};b.support={};b.templateSettings={escape:xa,evaluate:ya,interpolate:za,variable:"",imports:{_:b}};var Ig=function(){function a(){}return function(b){if(He(b)){a.prototype=b;var c=new a;a.prototype=B}return c||{}}}(),Jg=lc(Fb),Kg=lc(Gb,!0),Lg=mc(),Mg=mc(!0),Ng=Gg?function(a,b){return Gg.set(a,b),a}:Bf,Og=Gg?function(a){return Gg.get(a)}:Gf,Pg=Rb("length"),Qg=function(){var a=0,b=0;return function(c,d){var e=oh(),f=P-(e-b);if(b=e,f>0){if(++a>=O)return c}else a=0;return Ng(c,d)}}(),Rg=qe(function(a,b){return t(a)&&Yc(a)?xb(a,Db(b,!1,!0)):[]}),Sg=vc(),Tg=vc(!0),Ug=qe(function(a){for(var b=a.length,c=b,d=Of(l),e=Qc(),f=e==h,g=[];c--;){var i=a[c]=Yc(i=a[c])?i:[];d[c]=f&&i.length>=120?oc(c&&i):null}var j=a[0],k=-1,l=j?j.length:0,m=d[0];a:for(;++k2?a[b-2]:B,d=b>1?a[b-1]:B;return b>2&&"function"==typeof c?b-=2:(c=b>1&&"function"==typeof d?(--b,d):B,d=B),a.length=b,Ld(a,c,d)}),ah=qe(function(a){return a=Db(a),this.thru(function(b){return _a(Ch(b)?b:[kd(b)],a)})}),bh=qe(function(a,b){return sb(a,Db(b))}),ch=jc(function(a,b,c){ag.call(a,c)?++a[c]:a[c]=1}),dh=uc(Jg),eh=uc(Kg,!0),fh=yc(bb,Jg),gh=yc(cb,Kg),hh=jc(function(a,b,c){ag.call(a,c)?a[c].push(b):a[c]=[b]}),ih=jc(function(a,b,c){a[c]=b}),jh=qe(function(a,b,c){var d=-1,e="function"==typeof b,f=_c(b),g=Yc(a)?Of(a.length):[];return Jg(a,function(a){var h=e?b:f&&null!=a?a[b]:B;g[++d]=h?h.apply(a,c):Xc(a,b,c)}),g}),kh=jc(function(a,b,c){a[c?0:1].push(b)},function(){return[[],[]]}),lh=Ec(kb,Jg),mh=Ec(lb,Kg),nh=qe(function(a,b){if(null==a)return[];var c=b[2];return c&&$c(b[0],b[1],c)&&(b.length=1),Zb(a,Db(b),[])}),oh=xg||function(){return(new Pf).getTime()},ph=qe(function(a,b,c){var d=D;if(c.length){var e=v(c,ph.placeholder);d|=I}return Kc(a,d,b,c,e)}),qh=qe(function(a,b){b=b.length?Db(b):Xe(a);for(var c=-1,d=b.length;++c0||0>b)?new e(c):(0>a?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==B&&(b=+b||0,c=0>b?c.dropRight(-b):c.take(b-a)),c)},e.prototype.takeRightWhile=function(a,b){return this.reverse().takeWhile(a,b).reverse()},e.prototype.toArray=function(){return this.take(Bg)},Fb(e.prototype,function(a,c){var f=/^(?:filter|map|reject)|While$/.test(c),g=/^(?:first|last)$/.test(c),h=b[g?"take"+("last"==c?"Right":""):c];h&&(b.prototype[c]=function(){var b=g?[1]:arguments,c=this.__chain__,i=this.__wrapped__,j=!!this.__actions__.length,k=i instanceof e,l=b[0],m=k||Ch(i);m&&f&&"function"==typeof l&&1!=l.length&&(k=m=!1);var n=function(a){return g&&c?h(a,1)[0]:h.apply(B,jb([a],b))},o={func:Qd,args:[n],thisArg:B},p=k&&!j;if(g&&!c)return p?(i=i.clone(),i.__actions__.push(o),a.call(i)):h.call(B,this.value())[0];if(!g&&m){i=p?i:new e(this);var q=a.apply(i,b);return q.__actions__.push(o),new d(q,c)}return this.thru(n)})}),bb(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(a){var c=(/^(?:replace|split)$/.test(a)?$f:Yf)[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(a);b.prototype[a]=function(){var a=arguments;return e&&!this.__chain__?c.apply(this.value(),a):this[d](function(b){return c.apply(b,a)})}}),Fb(e.prototype,function(a,c){var d=b[c];if(d){var e=d.name,f=Hg[e]||(Hg[e]=[]);f.push({name:c,func:d})}}),Hg[Fc(B,E).name]=[{name:"wrapper",func:B}],e.prototype.clone=u,e.prototype.reverse=_,e.prototype.value=da,b.prototype.chain=Rd,b.prototype.commit=Sd,b.prototype.concat=ah,b.prototype.plant=Td,b.prototype.reverse=Ud,b.prototype.toString=Vd,b.prototype.run=b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=Wd,b.prototype.collect=b.prototype.map,b.prototype.head=b.prototype.first,b.prototype.select=b.prototype.filter,b.prototype.tail=b.prototype.rest,b}var B,C="3.10.1",D=1,E=2,F=4,G=8,H=16,I=32,J=64,K=128,L=256,M=30,N="...",O=150,P=16,Q=200,R=1,S=2,T="Expected a function",U="__lodash_placeholder__",V="[object Arguments]",W="[object Array]",X="[object Boolean]",Y="[object Date]",Z="[object Error]",$="[object Function]",_="[object Map]",aa="[object Number]",ba="[object Object]",ca="[object RegExp]",da="[object Set]",ea="[object String]",fa="[object WeakMap]",ga="[object ArrayBuffer]",ha="[object Float32Array]",ia="[object Float64Array]",ja="[object Int8Array]",ka="[object Int16Array]",la="[object Int32Array]",ma="[object Uint8Array]",na="[object Uint8ClampedArray]",oa="[object Uint16Array]",pa="[object Uint32Array]",qa=/\b__p \+= '';/g,ra=/\b(__p \+=) '' \+/g,sa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ta=/&(?:amp|lt|gt|quot|#39|#96);/g,ua=/[&<>"'`]/g,va=RegExp(ta.source),wa=RegExp(ua.source),xa=/<%-([\s\S]+?)%>/g,ya=/<%([\s\S]+?)%>/g,za=/<%=([\s\S]+?)%>/g,Aa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Ba=/^\w*$/,Ca=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Da=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,Ea=RegExp(Da.source),Fa=/[\u0300-\u036f\ufe20-\ufe23]/g,Ga=/\\(\\)?/g,Ha=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ia=/\w*$/,Ja=/^0[xX]/,Ka=/^\[object .+?Constructor\]$/,La=/^\d+$/,Ma=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Na=/($^)/,Oa=/['\n\r\u2028\u2029\\]/g,Pa=function(){var a="[A-Z\\xc0-\\xd6\\xd8-\\xde]",b="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(a+"+(?="+a+b+")|"+a+"?"+b+"|"+a+"+|[0-9]+","g")}(),Qa=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Ra=-1,Sa={};Sa[ha]=Sa[ia]=Sa[ja]=Sa[ka]=Sa[la]=Sa[ma]=Sa[na]=Sa[oa]=Sa[pa]=!0,Sa[V]=Sa[W]=Sa[ga]=Sa[X]=Sa[Y]=Sa[Z]=Sa[$]=Sa[_]=Sa[aa]=Sa[ba]=Sa[ca]=Sa[da]=Sa[ea]=Sa[fa]=!1;var Ta={};Ta[V]=Ta[W]=Ta[ga]=Ta[X]=Ta[Y]=Ta[ha]=Ta[ia]=Ta[ja]=Ta[ka]=Ta[la]=Ta[aa]=Ta[ba]=Ta[ca]=Ta[ea]=Ta[ma]=Ta[na]=Ta[oa]=Ta[pa]=!0,Ta[Z]=Ta[$]=Ta[_]=Ta[da]=Ta[fa]=!1;var Ua={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Va={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Wa={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Xa={"function":!0,object:!0},Ya={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Za={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$a=Xa[typeof b]&&b&&!b.nodeType&&b,_a=Xa[typeof a]&&a&&!a.nodeType&&a,ab=$a&&_a&&"object"==typeof e&&e&&e.Object&&e,bb=Xa[typeof self]&&self&&self.Object&&self,cb=Xa[typeof window]&&window&&window.Object&&window,db=(_a&&_a.exports===$a&&$a,ab||cb!==(this&&this.window)&&cb||bb||this),eb=A();db._=eb,d=function(){return eb}.call(b,c,b,a),!(d!==B&&(a.exports=d))}).call(this)}).call(b,c(8)(a),function(){return this}())},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b,c){"use strict";function d(a,b){var c="normal";return a&&b?c="bolditalics":a?c="bold":b&&(c="italics"),c}function e(a,b){this.fonts={},this.pdfDoc=b,this.fontWrappers={};for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];this.fonts[c]={normal:d.normal,bold:d.bold,italics:d.italics,bolditalics:d.bolditalics}}}var f=c(7),g=c(10);e.prototype.provideFont=function(a,b,c){var e=d(b,c);if(!this.fonts[a]||!this.fonts[a][e])throw new Error("Font '"+a+"' in style '"+e+"' is not defined in the font section of the document definition.");return this.fontWrappers[a]=this.fontWrappers[a]||{},this.fontWrappers[a][e]||(this.fontWrappers[a][e]=new g(this.pdfDoc,this.fonts[a][e],a+"("+e+")")),this.fontWrappers[a][e]},e.prototype.setFontRefsToPdfDoc=function(){var a=this;f.each(a.fontWrappers,function(b){f.each(b,function(b){f.each(b.pdfFonts,function(b){a.pdfDoc.page.fonts[b.id]||(a.pdfDoc.page.fonts[b.id]=b.ref())})})})},a.exports=e},function(a,b,c){"use strict";function d(a,b,c){this.MAX_CHAR_TYPES=92,this.pdfkitDoc=a,this.path=b,this.pdfFonts=[],this.charCatalogue=[],this.name=c,Object.defineProperty(this,"ascender",{get:function(){var a=this.getFont(0);return a.ascender}}),Object.defineProperty(this,"decender",{get:function(){var a=this.getFont(0);return a.decender}})}var e=c(7);d.prototype.getFont=function(a){if(!this.pdfFonts[a]){var b=this.name+a;this.postscriptName&&delete this.pdfkitDoc._fontFamilies[this.postscriptName],this.pdfFonts[a]=this.pdfkitDoc.font(this.path,b)._font,this.postscriptName||(this.postscriptName=this.pdfFonts[a].name)}return this.pdfFonts[a]},d.prototype.widthOfString=function(){var a=this.getFont(0);return a.widthOfString.apply(a,arguments)},d.prototype.lineHeight=function(){var a=this.getFont(0);return a.lineHeight.apply(a,arguments)},d.prototype.ref=function(){var a=this.getFont(0);return a.ref.apply(a,arguments)};var f=function(a){return a.charCodeAt(0)};d.prototype.encode=function(a){var b=this,c=e.chain(a.split("")).map(f).uniq().value();if(c.length>b.MAX_CHAR_TYPES)throw new Error("Inline has more than "+b.MAX_CHAR_TYPES+": "+a+" different character types and therefore cannot be properly embedded into pdf.");var d=function(a){return e.uniq(a.concat(c)).length<=b.MAX_CHAR_TYPES},g=e.findIndex(b.charCatalogue,d);0>g&&(g=b.charCatalogue.length,b.charCatalogue[g]=[]);var h=b.getFont(g);h.use(a),e.each(c,function(a){e.includes(b.charCatalogue[g],a)||b.charCatalogue[g].push(a)});var i=e.map(h.encode(a),function(a){return a.charCodeAt(0).toString(16)}).join("");return{encodedText:i,fontId:h.id}},a.exports=d},function(a,b,c){"use strict";function d(a,b){g.each(b,function(b){a.push(b)})}function e(a,b,c){this.pageSize=a,this.pageMargins=b,this.tracker=new h,this.imageMeasure=c,this.tableLayouts={}}function f(a){var b=a.x,c=a.y;a.positions=[],g.each(a.canvas,function(a){var b=a.x,c=a.y,d=a.x1,e=a.y1,f=a.x2,g=a.y2;a.resetXY=function(){a.x=b,a.y=c,a.x1=d,a.y1=e,a.x2=f,a.y2=g}}),a.resetXY=function(){a.x=b,a.y=c,g.each(a.canvas,function(a){a.resetXY()})}}var g=c(7),h=c(12),i=c(13),j=c(19),k=c(20),l=c(16),m=c(23),n=c(22),o=c(17).pack,p=c(17).offsetVector,q=c(17).fontStringify,r=c(17).isFunction,s=c(14),t=c(15);e.prototype.registerTableLayouts=function(a){this.tableLayouts=o(this.tableLayouts,a)},e.prototype.layoutDocument=function(a,b,c,d,e,f,h,j,k,l){function m(a,b){return r(l)?(a=g.reject(a,function(a){return g.isEmpty(a.positions)}),g.each(a,function(a){var c=g.pick(a,["id","text","ul","ol","table","image","qr","canvas","columns","headlineLevel","style","pageBreak","pageOrientation","width","height"]);c.startPosition=g.first(a.positions),c.pageNumbers=g.chain(a.positions).map("pageNumber").uniq().value(),c.pages=b.length,c.stack=g.isArray(a.stack),a.nodeInfo=c}),g.any(a,function(a,b,c){if("before"!==a.pageBreak&&!a.pageBreakCalculated){a.pageBreakCalculated=!0;var d=g.first(a.nodeInfo.pageNumbers),e=g.chain(c).drop(b+1).filter(function(a){return g.contains(a.nodeInfo.pageNumbers,d)}).value(),f=g.chain(c).drop(b+1).filter(function(a){return g.contains(a.nodeInfo.pageNumbers,d+1)}).value(),h=g.chain(c).take(b).filter(function(a){return g.contains(a.nodeInfo.pageNumbers,d)}).value();if(l(a.nodeInfo,g.map(e,"nodeInfo"),g.map(f,"nodeInfo"),g.map(h,"nodeInfo")))return a.pageBreak="before",!0}})):!1}function n(a){g.each(a.linearNodeList,function(a){a.resetXY()})}this.docMeasure=new i(b,c,d,this.imageMeasure,this.tableLayouts,j);for(var o=this.tryLayoutDocument(a,b,c,d,e,f,h,j,k);m(o.linearNodeList,o.pages);)n(o),o=this.tryLayoutDocument(a,b,c,d,e,f,h,j,k);return o.pages},e.prototype.tryLayoutDocument=function(a,b,c,d,e,f,g,h,i,l){this.linearNodeList=[],a=this.docMeasure.measureDocument(a),this.writer=new k(new j(this.pageSize,this.pageMargins),this.tracker);var m=this;return this.writer.context().tracker.startTracking("pageAdded",function(){m.addBackground(e)}),this.addBackground(e),this.processNode(a),this.addHeadersAndFooters(f,g),null!=i&&this.addWatermark(i,b),{pages:this.writer.context().pages,linearNodeList:this.linearNodeList}},e.prototype.addBackground=function(a){var b=r(a)?a:function(){return a},c=b(this.writer.context().page+1);if(c){var d=this.writer.context().getCurrentPage().pageSize;this.writer.beginUnbreakableBlock(d.width,d.height),this.processNode(this.docMeasure.measureDocument(c)),this.writer.commitUnbreakableBlock(0,0)}},e.prototype.addStaticRepeatable=function(a,b){this.addDynamicRepeatable(function(){return a},b)},e.prototype.addDynamicRepeatable=function(a,b){for(var c=this.writer.context().pages,d=0,e=c.length;e>d;d++){this.writer.context().page=d;var f=a(d+1,e);if(f){var g=b(this.writer.context().getCurrentPage().pageSize,this.pageMargins);this.writer.beginUnbreakableBlock(g.width,g.height),this.processNode(this.docMeasure.measureDocument(f)),this.writer.commitUnbreakableBlock(g.x,g.y)}}},e.prototype.addHeadersAndFooters=function(a,b){var c=function(a,b){return{x:0,y:0,width:a.width,height:b.top}},d=function(a,b){return{x:0,y:a.height-b.bottom,width:a.width,height:b.bottom}};r(a)?this.addDynamicRepeatable(a,c):a&&this.addStaticRepeatable(a,c),r(b)?this.addDynamicRepeatable(b,d):b&&this.addStaticRepeatable(b,d)},e.prototype.addWatermark=function(a,b){function c(a,b,c){for(var d,e=a.width,f=a.height,g=.8*Math.sqrt(e*e+f*f),h=new s(c),i=new t,j=0,k=1e3,l=(j+k)/2;Math.abs(j-k)>1;)i.push({fontSize:l}),d=h.sizeOfString(b,i),d.width>g?(k=l,l=(j+k)/2):d.widthg;g++)f[g].watermark=e},e.prototype.processNode=function(a){function b(b){var d=a._margin;"before"===a.pageBreak&&c.writer.moveToNextPage(a.pageOrientation),d&&(c.writer.context().moveDown(d[1]),c.writer.context().addMargin(d[0],d[2])),b(),d&&(c.writer.context().addMargin(-d[0],-d[2]),c.writer.context().moveDown(d[3])),"after"===a.pageBreak&&c.writer.moveToNextPage(a.pageOrientation)}var c=this;this.linearNodeList.push(a),f(a),b(function(){var b=a.absolutePosition;if(b&&(c.writer.context().beginDetachedBlock(),c.writer.context().moveTo(b.x||0,b.y||0)),a.stack)c.processVerticalContainer(a);else if(a.columns)c.processColumns(a);else if(a.ul)c.processList(!1,a);else if(a.ol)c.processList(!0,a);else if(a.table)c.processTable(a);else if(void 0!==a.text)c.processLeaf(a);else if(a.image)c.processImage(a);else if(a.canvas)c.processCanvas(a);else if(a.qr)c.processQr(a);else if(!a._span)throw"Unrecognized document structure: "+JSON.stringify(a,q);b&&c.writer.context().endDetachedBlock()})},e.prototype.processVerticalContainer=function(a){var b=this;a.stack.forEach(function(c){b.processNode(c),d(a.positions,c.positions)})},e.prototype.processColumns=function(a){function b(a){if(!a)return null;var b=[];b.push(0);for(var d=c.length-1;d>0;d--)b.push(a);return b}var c=a.columns,e=this.writer.context().availableWidth,f=b(a._gap);f&&(e-=(f.length-1)*a._gap),l.buildColumnWidths(c,e);var g=this.processRow(c,c,f);d(a.positions,g.positions)},e.prototype.processRow=function(a,b,c,e,f){function g(a){for(var b,c=0,d=k.length;d>c;c++){var e=k[c];if(e.prevPage===a.prevPage){b=e;break}}b||(b=a,k.push(b)),b.prevY=Math.max(b.prevY,a.prevY),b.y=Math.min(b.y,a.y)}function h(a){return c&&c.length>a?c[a]:0}function i(a,b){if(a.rowSpan&&a.rowSpan>1){var c=f+a.rowSpan-1;if(c>=e.length)throw"Row span for column "+b+" (with indexes starting from 0) exceeded row count";return e[c][b]}return null}var j=this,k=[],l=[];return this.tracker.auto("pageChanged",g,function(){b=b||a,j.writer.context().beginColumnGroup();for(var e=0,f=a.length;f>e;e++){var g=a[e],k=b[e]._calcWidth,m=h(e);if(g.colSpan&&g.colSpan>1)for(var n=1;nc;c++){b.beginRow(c,this.writer);var f=this.processRow(a.table.body[c],a.table.widths,a._offsets.offsets,a.table.body,c);d(a.positions,f.positions),b.endRow(c,this.writer,f.pageBreaks)}b.endTable(this.writer)},e.prototype.processLeaf=function(a){for(var b=this.buildNextLine(a),c=b?b.getHeight():0,d=a.maxHeight||-1;b&&(-1===d||d>c);){var e=this.writer.addLine(b);a.positions.push(e),b=this.buildNextLine(a),b&&(c+=b.getHeight())}},e.prototype.buildNextLine=function(a){if(!a._inlines||0===a._inlines.length)return null;for(var b=new n(this.writer.context().availableWidth);a._inlines&&a._inlines.length>0&&b.hasEnoughSpaceForInline(a._inlines[0]);)b.addInline(a._inlines.shift());return b.lastLineInParagraph=0===a._inlines.length,b},e.prototype.processImage=function(a){var b=this.writer.addImage(a);a.positions.push(b)},e.prototype.processCanvas=function(a){var b=a._minHeight;this.writer.context().availableHeight=0&&c.splice(d,1)}},c.prototype.emit=function(a){var b=Array.prototype.slice.call(arguments,1),c=this.events[a];c&&c.forEach(function(a){a.apply(this,b)})},c.prototype.auto=function(a,b,c){this.startTracking(a,b),c(),this.stopTracking(a,b)},a.exports=c},function(a,b,c){"use strict";function d(a,b,c,d,g,h){this.textTools=new e(a),this.styleStack=new f(b,c),this.imageMeasure=d,this.tableLayouts=g,this.images=h,this.autoImageIndex=1}var e=c(14),f=c(15),g=c(16),h=c(17).fontStringify,i=c(17).pack,j=c(18);d.prototype.measureDocument=function(a){return this.measureNode(a)},d.prototype.measureNode=function(a){function b(a){var b=a._margin;return b&&(a._minWidth+=b[0]+b[2],a._maxWidth+=b[0]+b[2]),a}function c(){function b(a,b){return a.marginLeft||a.marginTop||a.marginRight||a.marginBottom?[a.marginLeft||b[0]||0,a.marginTop||b[1]||0,a.marginRight||b[2]||0,a.marginBottom||b[3]||0]:b}function c(a){for(var b={},c=a.length-1;c>=0;c--){var e=a[c],f=d.styleStack.styleDictionary[e];for(var g in f)f.hasOwnProperty(g)&&(b[g]=f[g])}return b}function e(a){return"number"==typeof a||a instanceof Number?a=[a,a,a,a]:a instanceof Array&&2===a.length&&(a=[a[0],a[1],a[0],a[1]]),a}var f=[void 0,void 0,void 0,void 0];if(a.style){var g=a.style instanceof Array?a.style:[a.style],h=c(g);h&&(f=b(h,f)),h.margin&&(f=e(h.margin))}return f=b(a,f),a.margin&&(f=e(a.margin)),void 0===f[0]&&void 0===f[1]&&void 0===f[2]&&void 0===f[3]?null:f}a instanceof Array?a={stack:a}:("string"==typeof a||a instanceof String)&&(a={text:a}),0===Object.keys(a).length&&(a={text:""});var d=this;return this.styleStack.auto(a,function(){if(a._margin=c(a),a.columns)return b(d.measureColumns(a));if(a.stack)return b(d.measureVerticalContainer(a));if(a.ul)return b(d.measureList(!1,a));if(a.ol)return b(d.measureList(!0,a));if(a.table)return b(d.measureTable(a));if(void 0!==a.text)return b(d.measureLeaf(a));if(a.image)return b(d.measureImage(a));if(a.canvas)return b(d.measureCanvas(a));if(a.qr)return b(d.measureQr(a));throw"Unrecognized document structure: "+JSON.stringify(a,h); +this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html(""),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().height()||24,this.trigger("loading"),this.load_node(a.jstree.root)},destroy:function(a){if(this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(b){}a||this.element.empty(),this.teardown()},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var b="",c=null,d=0;this.element.on("dblclick.jstree",function(a){if(a.target.tagName&&"input"===a.target.tagName.toLowerCase())return!0;if(k.selection&&k.selection.empty)k.selection.empty();else if(window.getSelection){var b=window.getSelection();try{b.removeAllRanges(),b.collapse()}catch(c){}}}).on("mousedown.jstree",a.proxy(function(a){a.target===this.element[0]&&(a.preventDefault(),d=+new Date)},this)).on("mousedown.jstree",".jstree-ocl",function(a){a.preventDefault()}).on("click.jstree",".jstree-ocl",a.proxy(function(a){this.toggle_node(a.target)},this)).on("dblclick.jstree",".jstree-anchor",a.proxy(function(a){return a.target.tagName&&"input"===a.target.tagName.toLowerCase()?!0:void(this.settings.core.dblclick_toggle&&this.toggle_node(a.target))},this)).on("click.jstree",".jstree-anchor",a.proxy(function(b){b.preventDefault(),b.currentTarget!==k.activeElement&&a(b.currentTarget).focus(),this.activate_node(b.currentTarget,b)},this)).on("keydown.jstree",".jstree-anchor",a.proxy(function(b){if(b.target.tagName&&"input"===b.target.tagName.toLowerCase())return!0;if(32!==b.which&&13!==b.which&&(b.shiftKey||b.ctrlKey||b.altKey||b.metaKey))return!0;var c=null;switch(this._data.core.rtl&&(37===b.which?b.which=39:39===b.which&&(b.which=37)),b.which){case 32:b.ctrlKey&&(b.type="click",a(b.currentTarget).trigger(b));break;case 13:b.type="click",a(b.currentTarget).trigger(b);break;case 37:b.preventDefault(),this.is_open(b.currentTarget)?this.close_node(b.currentTarget):(c=this.get_parent(b.currentTarget),c&&c.id!==a.jstree.root&&this.get_node(c,!0).children(".jstree-anchor").focus());break;case 38:b.preventDefault(),c=this.get_prev_dom(b.currentTarget),c&&c.length&&c.children(".jstree-anchor").focus();break;case 39:b.preventDefault(),this.is_closed(b.currentTarget)?this.open_node(b.currentTarget,function(a){this.get_node(a,!0).children(".jstree-anchor").focus()}):this.is_open(b.currentTarget)&&(c=this.get_node(b.currentTarget,!0).children(".jstree-children")[0],c&&a(this._firstChild(c)).children(".jstree-anchor").focus());break;case 40:b.preventDefault(),c=this.get_next_dom(b.currentTarget),c&&c.length&&c.children(".jstree-anchor").focus();break;case 106:this.open_all();break;case 36:b.preventDefault(),c=this._firstChild(this.get_container_ul()[0]),c&&a(c).children(".jstree-anchor").filter(":visible").focus();break;case 35:b.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().focus()}},this)).on("load_node.jstree",a.proxy(function(b,c){c.status&&(c.node.id!==a.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(a.proxy(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var b,c,d=[];for(b=0,c=this._data.core.selected.length;c>b;b++)d=d.concat(this._model.data[this._data.core.selected[b]].parents);for(d=a.vakata.array_unique(d),b=0,c=d.length;c>b;b++)this.open_node(d[b],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}},this),0))},this)).on("keypress.jstree",a.proxy(function(d){if(d.target.tagName&&"input"===d.target.tagName.toLowerCase())return!0;c&&clearTimeout(c),c=setTimeout(function(){b=""},500);var e=String.fromCharCode(d.which).toLowerCase(),f=this.element.find(".jstree-anchor").filter(":visible"),g=f.index(k.activeElement)||0,h=!1;if(b+=e,b.length>1){if(f.slice(g).each(a.proxy(function(c,d){return 0===a(d).text().toLowerCase().indexOf(b)?(a(d).focus(),h=!0,!1):void 0},this)),h)return;if(f.slice(0,g).each(a.proxy(function(c,d){return 0===a(d).text().toLowerCase().indexOf(b)?(a(d).focus(),h=!0,!1):void 0},this)),h)return}if(new RegExp("^"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(b)){if(f.slice(g+1).each(a.proxy(function(b,c){return a(c).text().toLowerCase().charAt(0)===e?(a(c).focus(),h=!0,!1):void 0},this)),h)return;if(f.slice(0,g+1).each(a.proxy(function(b,c){return a(c).text().toLowerCase().charAt(0)===e?(a(c).focus(),h=!0,!1):void 0},this)),h)return}},this)).on("init.jstree",a.proxy(function(){var a=this.settings.core.themes;this._data.core.themes.dots=a.dots,this._data.core.themes.stripes=a.stripes,this._data.core.themes.icons=a.icons,this.set_theme(a.name||"default",a.url),this.set_theme_variant(a.variant)},this)).on("loading.jstree",a.proxy(function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"]()},this)).on("blur.jstree",".jstree-anchor",a.proxy(function(b){this._data.core.focused=null,a(b.currentTarget).filter(".jstree-hovered").mouseleave(),this.element.attr("tabindex","0")},this)).on("focus.jstree",".jstree-anchor",a.proxy(function(b){var c=this.get_node(b.currentTarget);c&&c.id&&(this._data.core.focused=c.id),this.element.find(".jstree-hovered").not(b.currentTarget).mouseleave(),a(b.currentTarget).mouseenter(),this.element.attr("tabindex","-1")},this)).on("focus.jstree",a.proxy(function(){if(+new Date-d>500&&!this._data.core.focused){d=0;var a=this.get_node(this.element.attr("aria-activedescendant"),!0);a&&a.find("> .jstree-anchor").focus()}},this)).on("mouseenter.jstree",".jstree-anchor",a.proxy(function(a){this.hover_node(a.currentTarget)},this)).on("mouseleave.jstree",".jstree-anchor",a.proxy(function(a){this.dehover_node(a.currentTarget)},this))},unbind:function(){this.element.off(".jstree"),a(k).off(".jstree-"+this._id)},trigger:function(a,b){b||(b={}),b.instance=this,this.element.triggerHandler(a.replace(".jstree","")+".jstree",b)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(b){var c=this.settings.core.strings;return a.isFunction(c)?c.call(this,b):c&&c[b]?c[b]:b},_firstChild:function(a){for(a=a?a.firstChild:null;null!==a&&1!==a.nodeType;)a=a.nextSibling;return a},_nextSibling:function(a){for(a=a?a.nextSibling:null;null!==a&&1!==a.nodeType;)a=a.nextSibling;return a},_previousSibling:function(a){for(a=a?a.previousSibling:null;null!==a&&1!==a.nodeType;)a=a.previousSibling;return a},get_node:function(b,c){b&&b.id&&(b=b.id);var d;try{if(this._model.data[b])b=this._model.data[b];else if("string"==typeof b&&this._model.data[b.replace(/^#/,"")])b=this._model.data[b.replace(/^#/,"")];else if("string"==typeof b&&(d=a("#"+b.replace(a.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[d.closest(".jstree-node").attr("id")])b=this._model.data[d.closest(".jstree-node").attr("id")];else if((d=a(b,this.element)).length&&this._model.data[d.closest(".jstree-node").attr("id")])b=this._model.data[d.closest(".jstree-node").attr("id")];else{if(!(d=a(b,this.element)).length||!d.hasClass("jstree"))return!1;b=this._model.data[a.jstree.root]}return c&&(b=b.id===a.jstree.root?this.element:a("#"+b.id.replace(a.jstree.idregex,"\\$&"),this.element)),b}catch(e){return!1}},get_path:function(b,c,d){if(b=b.parents?b:this.get_node(b),!b||b.id===a.jstree.root||!b.parents)return!1;var e,f,g=[];for(g.push(d?b.id:b.text),e=0,f=b.parents.length;f>e;e++)g.push(d?b.parents[e]:this.get_text(b.parents[e]));return g=g.reverse().slice(1),c?g.join(c):g},get_next_dom:function(b,c){var d;if(b=this.get_node(b,!0),b[0]===this.element[0]){for(d=this._firstChild(this.get_container_ul()[0]);d&&0===d.offsetHeight;)d=this._nextSibling(d);return d?a(d):!1}if(!b||!b.length)return!1;if(c){d=b[0];do d=this._nextSibling(d);while(d&&0===d.offsetHeight);return d?a(d):!1}if(b.hasClass("jstree-open")){for(d=this._firstChild(b.children(".jstree-children")[0]);d&&0===d.offsetHeight;)d=this._nextSibling(d);if(null!==d)return a(d)}d=b[0];do d=this._nextSibling(d);while(d&&0===d.offsetHeight);return null!==d?a(d):b.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(b,c){var d;if(b=this.get_node(b,!0),b[0]===this.element[0]){for(d=this.get_container_ul()[0].lastChild;d&&0===d.offsetHeight;)d=this._previousSibling(d);return d?a(d):!1}if(!b||!b.length)return!1;if(c){d=b[0];do d=this._previousSibling(d);while(d&&0===d.offsetHeight);return d?a(d):!1}d=b[0];do d=this._previousSibling(d);while(d&&0===d.offsetHeight);if(null!==d){for(b=a(d);b.hasClass("jstree-open");)b=b.children(".jstree-children").first().children(".jstree-node:visible:last");return b}return d=b[0].parentNode.parentNode,d&&d.className&&-1!==d.className.indexOf("jstree-node")?a(d):!1},get_parent:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.parent:!1},get_children_dom:function(a){return a=this.get_node(a,!0),a[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):a&&a.length?a.children(".jstree-children").children(".jstree-node"):!1},is_parent:function(a){return a=this.get_node(a),a&&(a.state.loaded===!1||a.children.length>0)},is_loaded:function(a){return a=this.get_node(a),a&&a.state.loaded},is_loading:function(a){return a=this.get_node(a),a&&a.state&&a.state.loading},is_open:function(a){return a=this.get_node(a),a&&a.state.opened},is_closed:function(a){return a=this.get_node(a),a&&this.is_parent(a)&&!a.state.opened},is_leaf:function(a){return!this.is_parent(a)},load_node:function(b,c){var d,e,f,g,h;if(a.isArray(b))return this._load_nodes(b.slice(),c),!0;if(b=this.get_node(b),!b)return c&&c.call(this,b,!1),!1;if(b.state.loaded){for(b.state.loaded=!1,d=0,e=b.children_d.length;e>d;d++){for(f=0,g=b.parents.length;g>f;f++)this._model.data[b.parents[f]].children_d=a.vakata.array_remove_item(this._model.data[b.parents[f]].children_d,b.children_d[d]);this._model.data[b.children_d[d]].state.selected&&(h=!0,this._data.core.selected=a.vakata.array_remove_item(this._data.core.selected,b.children_d[d])),delete this._model.data[b.children_d[d]]}b.children=[],b.children_d=[],h&&this.trigger("changed",{action:"load_node",node:b,selected:this._data.core.selected})}return b.state.failed=!1,b.state.loading=!0,this.get_node(b,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(b,a.proxy(function(a){b=this._model.data[b.id],b.state.loading=!1,b.state.loaded=a,b.state.failed=!b.state.loaded;var d=this.get_node(b,!0),e=0,f=0,g=this._model.data,h=!1;for(e=0,f=b.children.length;f>e;e++)if(g[b.children[e]]&&!g[b.children[e]].state.hidden){h=!0;break}b.state.loaded&&!h&&d&&d.length&&!d.hasClass("jstree-leaf")&&d.removeClass("jstree-closed jstree-open").addClass("jstree-leaf"),d.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:b,status:a}),c&&c.call(this,b,a)},this)),!0},_load_nodes:function(a,b,c){var d,e,f=!0,g=function(){this._load_nodes(a,b,!0)},h=this._model.data,i=[];for(d=0,e=a.length;e>d;d++)!h[a[d]]||(h[a[d]].state.loaded||h[a[d]].state.failed)&&c||(this.is_loading(a[d])||this.load_node(a[d],g),f=!1);if(f){for(d=0,e=a.length;e>d;d++)h[a[d]]&&h[a[d]].state.loaded&&i.push(a[d]);b&&!b.done&&(b.call(this,i),b.done=!0)}},load_all:function(b,c){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var d,e,f=[],g=this._model.data,h=g[b.id].children_d;for(b.state&&!b.state.loaded&&f.push(b.id),d=0,e=h.length;e>d;d++)g[h[d]]&&g[h[d]].state&&!g[h[d]].state.loaded&&f.push(h[d]);f.length?this._load_nodes(f,function(){this.load_all(b,c)}):(c&&c.call(this,b),this.trigger("load_all",{node:b}))},_load_node:function(b,c){var d,e=this.settings.core.data;return e?a.isFunction(e)?e.call(this,b,a.proxy(function(d){d===!1&&c.call(this,!1),this["string"==typeof d?"_append_html_data":"_append_json_data"](b,"string"==typeof d?a(a.parseHTML(d)).filter(function(){return 3!==this.nodeType}):d,function(a){c.call(this,a)})},this)):"object"==typeof e?e.url?(e=a.extend(!0,{},e),a.isFunction(e.url)&&(e.url=e.url.call(this,b)),a.isFunction(e.data)&&(e.data=e.data.call(this,b)),a.ajax(e).done(a.proxy(function(d,e,f){var g=f.getResponseHeader("Content-Type");return g&&-1!==g.indexOf("json")||"object"==typeof d?this._append_json_data(b,d,function(a){c.call(this,a)}):g&&-1!==g.indexOf("html")||"string"==typeof d?this._append_html_data(b,a(a.parseHTML(d)).filter(function(){return 3!==this.nodeType}),function(a){c.call(this,a)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:b.id,xhr:f})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1))},this)).fail(a.proxy(function(a){c.call(this,!1),this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:b.id,xhr:a})},this.settings.core.error.call(this,this._data.core.last_error)},this))):(d=a.isArray(e)||a.isPlainObject(e)?JSON.parse(JSON.stringify(e)):e,b.id===a.jstree.root?this._append_json_data(b,d,function(a){c.call(this,a)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:b.id})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1))):"string"==typeof e?b.id===a.jstree.root?this._append_html_data(b,a(a.parseHTML(e)).filter(function(){return 3!==this.nodeType}),function(a){c.call(this,a)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:b.id})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1)):c.call(this,!1):b.id===a.jstree.root?this._append_html_data(b,this._data.core.original_container_html.clone(!0),function(a){c.call(this,a)}):c.call(this,!1)},_node_changed:function(a){a=this.get_node(a),a&&this._model.changed.push(a.id)},_append_html_data:function(b,c,d){b=this.get_node(b),b.children=[],b.children_d=[];var e,f,g,h=c.is("ul")?c.children():c,i=b.id,j=[],k=[],l=this._model.data,m=l[i],n=this._data.core.selected.length;for(h.each(a.proxy(function(b,c){e=this._parse_model_from_html(a(c),i,m.parents.concat()),e&&(j.push(e),k.push(e),l[e].children_d.length&&(k=k.concat(l[e].children_d)))},this)),m.children=j,m.children_d=k,f=0,g=m.parents.length;g>f;f++)l[m.parents[f]].children_d=l[m.parents[f]].children_d.concat(k);this.trigger("model",{nodes:k,parent:i}),i!==a.jstree.root?(this._node_changed(i),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==n&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),d.call(this,!0)},_append_json_data:function(b,c,d,e){if(null!==this.element){b=this.get_node(b),b.children=[],b.children_d=[],c.d&&(c=c.d,"string"==typeof c&&(c=JSON.parse(c))),a.isArray(c)||(c=[c]);var f=null,g={df:this._model.default_state,dat:c,par:b.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},h=function(a,b){a.data&&(a=a.data);var c,d,e,f,g=a.dat,h=a.par,i=[],j=[],k=[],l=a.df,m=a.t_id,n=a.t_cnt,o=a.m,p=o[h],q=a.sel,r=function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e,f,g,h,i=a.id.toString(),j={id:i,text:a.text||"",icon:a.icon!==b?a.icon:!0,parent:c,parents:d,children:a.children||[],children_d:a.children_d||[],data:a.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(e in l)l.hasOwnProperty(e)&&(j.state[e]=l[e]);if(a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(j.icon=a.data.jstree.icon),j.icon!==b&&null!==j.icon&&""!==j.icon||(j.icon=!0),a&&a.data&&(j.data=a.data,a.data.jstree))for(e in a.data.jstree)a.data.jstree.hasOwnProperty(e)&&(j.state[e]=a.data.jstree[e]);if(a&&"object"==typeof a.state)for(e in a.state)a.state.hasOwnProperty(e)&&(j.state[e]=a.state[e]);if(a&&"object"==typeof a.li_attr)for(e in a.li_attr)a.li_attr.hasOwnProperty(e)&&(j.li_attr[e]=a.li_attr[e]);if(j.li_attr.id||(j.li_attr.id=i),a&&"object"==typeof a.a_attr)for(e in a.a_attr)a.a_attr.hasOwnProperty(e)&&(j.a_attr[e]=a.a_attr[e]);for(a&&a.children&&a.children===!0&&(j.state.loaded=!1,j.children=[],j.children_d=[]),o[j.id]=j,e=0,f=j.children.length;f>e;e++)g=r(o[j.children[e]],j.id,d),h=o[g],j.children_d.push(g),h.children_d.length&&(j.children_d=j.children_d.concat(h.children_d));return delete a.data,delete a.children,o[j.id].original=a,j.state.selected&&k.push(j.id),j.id},s=function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e,f,g,h,i,j=!1;do j="j"+m+"_"+ ++n;while(o[j]);i={id:!1,text:"string"==typeof a?a:"",icon:"object"==typeof a&&a.icon!==b?a.icon:!0,parent:c,parents:d,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(e in l)l.hasOwnProperty(e)&&(i.state[e]=l[e]);if(a&&a.id&&(i.id=a.id.toString()),a&&a.text&&(i.text=a.text),a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(i.icon=a.data.jstree.icon),i.icon!==b&&null!==i.icon&&""!==i.icon||(i.icon=!0),a&&a.data&&(i.data=a.data,a.data.jstree))for(e in a.data.jstree)a.data.jstree.hasOwnProperty(e)&&(i.state[e]=a.data.jstree[e]);if(a&&"object"==typeof a.state)for(e in a.state)a.state.hasOwnProperty(e)&&(i.state[e]=a.state[e]);if(a&&"object"==typeof a.li_attr)for(e in a.li_attr)a.li_attr.hasOwnProperty(e)&&(i.li_attr[e]=a.li_attr[e]);if(i.li_attr.id&&!i.id&&(i.id=i.li_attr.id.toString()),i.id||(i.id=j),i.li_attr.id||(i.li_attr.id=i.id),a&&"object"==typeof a.a_attr)for(e in a.a_attr)a.a_attr.hasOwnProperty(e)&&(i.a_attr[e]=a.a_attr[e]);if(a&&a.children&&a.children.length){for(e=0,f=a.children.length;f>e;e++)g=s(a.children[e],i.id,d),h=o[g],i.children.push(g),h.children_d.length&&(i.children_d=i.children_d.concat(h.children_d));i.children_d=i.children_d.concat(i.children)}return a&&a.children&&a.children===!0&&(i.state.loaded=!1,i.children=[],i.children_d=[]),delete a.data,delete a.children,i.original=a,o[i.id]=i,i.state.selected&&k.push(i.id),i.id};if(g.length&&g[0].id!==b&&g[0].parent!==b){for(d=0,e=g.length;e>d;d++)g[d].children||(g[d].children=[]),o[g[d].id.toString()]=g[d];for(d=0,e=g.length;e>d;d++)o[g[d].parent.toString()].children.push(g[d].id.toString()),p.children_d.push(g[d].id.toString());for(d=0,e=p.children.length;e>d;d++)c=r(o[p.children[d]],h,p.parents.concat()),j.push(c),o[c].children_d.length&&(j=j.concat(o[c].children_d));for(d=0,e=p.parents.length;e>d;d++)o[p.parents[d]].children_d=o[p.parents[d]].children_d.concat(j);f={cnt:n,mod:o,sel:q,par:h,dpc:j,add:k}}else{for(d=0,e=g.length;e>d;d++)c=s(g[d],h,p.parents.concat()),c&&(i.push(c),j.push(c),o[c].children_d.length&&(j=j.concat(o[c].children_d)));for(p.children=i,p.children_d=j,d=0,e=p.parents.length;e>d;d++)o[p.parents[d]].children_d=o[p.parents[d]].children_d.concat(j);f={cnt:n,mod:o,sel:q,par:h,dpc:j,add:k}}return"undefined"!=typeof window&&"undefined"!=typeof window.document?f:void postMessage(f)},i=function(b,c){if(null!==this.element){if(this._cnt=b.cnt,this._model.data=b.mod,c){var e,f,g=b.add,h=b.sel,i=this._data.core.selected.slice(),j=this._model.data;if(h.length!==i.length||a.vakata.array_unique(h.concat(i)).length!==h.length){for(e=0,f=h.length;f>e;e++)-1===a.inArray(h[e],g)&&-1===a.inArray(h[e],i)&&(j[h[e]].state.selected=!1);for(e=0,f=i.length;f>e;e++)-1===a.inArray(i[e],h)&&(j[i[e]].state.selected=!0)}}b.add.length&&(this._data.core.selected=this._data.core.selected.concat(b.add)),this.trigger("model",{nodes:b.dpc,parent:b.par}),b.par!==a.jstree.root?(this._node_changed(b.par),this.redraw()):this.redraw(!0),b.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),d.call(this,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+h.toString()],{type:"text/javascript"}))),!this._data.core.working||e?(this._data.core.working=!0,f=new window.Worker(this._wrk),f.onmessage=a.proxy(function(a){i.call(this,a.data,!0);try{f.terminate(),f=null}catch(b){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1},this),g.par?f.postMessage(g):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([b,c,d,!0])}catch(j){i.call(this,h(g),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else i.call(this,h(g),!1)}},_parse_model_from_html:function(c,d,e){e=e?[].concat(e):[],d&&e.unshift(d);var f,g,h,i,j,k=this._model.data,l={id:!1,text:!1,icon:!0,parent:d,parents:e,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(h in this._model.default_state)this._model.default_state.hasOwnProperty(h)&&(l.state[h]=this._model.default_state[h]);if(i=a.vakata.attributes(c,!0),a.each(i,function(b,c){return c=a.trim(c),c.length?(l.li_attr[b]=c,void("id"===b&&(l.id=c.toString()))):!0}),i=c.children("a").first(),i.length&&(i=a.vakata.attributes(i,!0),a.each(i,function(b,c){c=a.trim(c),c.length&&(l.a_attr[b]=c)})),i=c.children("a").first().length?c.children("a").first().clone():c.clone(),i.children("ins, i, ul").remove(),i=i.html(),i=a("
            ").html(i),l.text=this.settings.core.force_text?i.text():i.html(),i=c.data(),l.data=i?a.extend(!0,{},i):null,l.state.opened=c.hasClass("jstree-open"),l.state.selected=c.children("a").hasClass("jstree-clicked"),l.state.disabled=c.children("a").hasClass("jstree-disabled"),l.data&&l.data.jstree)for(h in l.data.jstree)l.data.jstree.hasOwnProperty(h)&&(l.state[h]=l.data.jstree[h]);i=c.children("a").children(".jstree-themeicon"),i.length&&(l.icon=i.hasClass("jstree-themeicon-hidden")?!1:i.attr("rel")),l.state.icon!==b&&(l.icon=l.state.icon),l.icon!==b&&null!==l.icon&&""!==l.icon||(l.icon=!0),i=c.children("ul").children("li");do j="j"+this._id+"_"+ ++this._cnt;while(k[j]);return l.id=l.li_attr.id?l.li_attr.id.toString():j,i.length?(i.each(a.proxy(function(b,c){f=this._parse_model_from_html(a(c),l.id,e),g=this._model.data[f],l.children.push(f),g.children_d.length&&(l.children_d=l.children_d.concat(g.children_d))},this)),l.children_d=l.children_d.concat(l.children)):c.hasClass("jstree-closed")&&(l.state.loaded=!1),l.li_attr["class"]&&(l.li_attr["class"]=l.li_attr["class"].replace("jstree-closed","").replace("jstree-open","")),l.a_attr["class"]&&(l.a_attr["class"]=l.a_attr["class"].replace("jstree-clicked","").replace("jstree-disabled","")),k[l.id]=l,l.state.selected&&this._data.core.selected.push(l.id),l.id},_parse_model_from_flat_json:function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e,f,g,h,i=a.id.toString(),j=this._model.data,k=this._model.default_state,l={id:i,text:a.text||"",icon:a.icon!==b?a.icon:!0,parent:c,parents:d,children:a.children||[],children_d:a.children_d||[],data:a.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(e in k)k.hasOwnProperty(e)&&(l.state[e]=k[e]);if(a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(l.icon=a.data.jstree.icon),l.icon!==b&&null!==l.icon&&""!==l.icon||(l.icon=!0),a&&a.data&&(l.data=a.data,a.data.jstree))for(e in a.data.jstree)a.data.jstree.hasOwnProperty(e)&&(l.state[e]=a.data.jstree[e]);if(a&&"object"==typeof a.state)for(e in a.state)a.state.hasOwnProperty(e)&&(l.state[e]=a.state[e]);if(a&&"object"==typeof a.li_attr)for(e in a.li_attr)a.li_attr.hasOwnProperty(e)&&(l.li_attr[e]=a.li_attr[e]);if(l.li_attr.id||(l.li_attr.id=i),a&&"object"==typeof a.a_attr)for(e in a.a_attr)a.a_attr.hasOwnProperty(e)&&(l.a_attr[e]=a.a_attr[e]);for(a&&a.children&&a.children===!0&&(l.state.loaded=!1,l.children=[],l.children_d=[]),j[l.id]=l,e=0,f=l.children.length;f>e;e++)g=this._parse_model_from_flat_json(j[l.children[e]],l.id,d),h=j[g],l.children_d.push(g),h.children_d.length&&(l.children_d=l.children_d.concat(h.children_d));return delete a.data,delete a.children,j[l.id].original=a,l.state.selected&&this._data.core.selected.push(l.id),l.id},_parse_model_from_json:function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e,f,g,h,i,j=!1,k=this._model.data,l=this._model.default_state;do j="j"+this._id+"_"+ ++this._cnt;while(k[j]);i={id:!1,text:"string"==typeof a?a:"",icon:"object"==typeof a&&a.icon!==b?a.icon:!0,parent:c,parents:d,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(e in l)l.hasOwnProperty(e)&&(i.state[e]=l[e]);if(a&&a.id&&(i.id=a.id.toString()),a&&a.text&&(i.text=a.text),a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(i.icon=a.data.jstree.icon),i.icon!==b&&null!==i.icon&&""!==i.icon||(i.icon=!0),a&&a.data&&(i.data=a.data,a.data.jstree))for(e in a.data.jstree)a.data.jstree.hasOwnProperty(e)&&(i.state[e]=a.data.jstree[e]);if(a&&"object"==typeof a.state)for(e in a.state)a.state.hasOwnProperty(e)&&(i.state[e]=a.state[e]);if(a&&"object"==typeof a.li_attr)for(e in a.li_attr)a.li_attr.hasOwnProperty(e)&&(i.li_attr[e]=a.li_attr[e]);if(i.li_attr.id&&!i.id&&(i.id=i.li_attr.id.toString()),i.id||(i.id=j),i.li_attr.id||(i.li_attr.id=i.id),a&&"object"==typeof a.a_attr)for(e in a.a_attr)a.a_attr.hasOwnProperty(e)&&(i.a_attr[e]=a.a_attr[e]);if(a&&a.children&&a.children.length){for(e=0,f=a.children.length;f>e;e++)g=this._parse_model_from_json(a.children[e],i.id,d),h=k[g],i.children.push(g),h.children_d.length&&(i.children_d=i.children_d.concat(h.children_d));i.children_d=i.children_d.concat(i.children)}return a&&a.children&&a.children===!0&&(i.state.loaded=!1,i.children=[],i.children_d=[]),delete a.data,delete a.children,i.original=a,k[i.id]=i,i.state.selected&&this._data.core.selected.push(i.id),i.id},_redraw:function(){var b,c,d,e=this._model.force_full_redraw?this._model.data[a.jstree.root].children.concat([]):this._model.changed.concat([]),f=k.createElement("UL"),g=this._data.core.focused;for(c=0,d=e.length;d>c;c++)b=this.redraw_node(e[c],!0,this._model.force_full_redraw),b&&this._model.force_full_redraw&&f.appendChild(b);this._model.force_full_redraw&&(f.className=this.get_container_ul()[0].className,f.setAttribute("role","group"),this.element.empty().append(f)),null!==g&&(b=this.get_node(g,!0),b&&b.length&&b.children(".jstree-anchor")[0]!==k.activeElement?b.children(".jstree-anchor").focus():this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:e})},redraw:function(a){a&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(b){var c=this.get_node(b),d=!1,e=!1,f=!1,g=k;if(!c)return!1;if(c.id===a.jstree.root)return this.redraw(!0);if(b=this.get_node(b,!0),!b||!b.length)return!1;if(b.children(".jstree-children").remove(),b=b[0],c.children.length&&c.state.loaded){for(f=g.createElement("UL"),f.setAttribute("role","group"),f.className="jstree-children",d=0,e=c.children.length;e>d;d++)f.appendChild(this.redraw_node(c.children[d],!0,!0));b.appendChild(f)}},redraw_node:function(b,c,d,e){var f=this.get_node(b),g=!1,h=!1,i=!1,j=!1,m=!1,n=!1,o="",p=k,q=this._model.data,r=!1,s=null,t=0,u=0,v=!1,w=!1;if(!f)return!1;if(f.id===a.jstree.root)return this.redraw(!0);if(c=c||0===f.children.length,b=k.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(f.id[0])?"\\3"+f.id[0]+" "+f.id.substr(1).replace(a.jstree.idregex,"\\$&"):f.id.replace(a.jstree.idregex,"\\$&"))):k.getElementById(f.id))b=a(b),d||(g=b.parent().parent()[0],g===this.element[0]&&(g=null),h=b.index()),c||!f.children.length||b.children(".jstree-children").length||(c=!0),c||(i=b.children(".jstree-children")[0]),r=b.children(".jstree-anchor")[0]===k.activeElement,b.remove();else if(c=!0,!d){if(g=f.parent!==a.jstree.root?a("#"+f.parent.replace(a.jstree.idregex,"\\$&"),this.element)[0]:null,!(null===g||g&&q[f.parent].state.opened))return!1;h=a.inArray(f.id,null===g?q[a.jstree.root].children:q[f.parent].children)}b=l.cloneNode(!0),o="jstree-node ";for(j in f.li_attr)if(f.li_attr.hasOwnProperty(j)){if("id"===j)continue;"class"!==j?b.setAttribute(j,f.li_attr[j]):o+=f.li_attr[j]}for(f.a_attr.id||(f.a_attr.id=f.id+"_anchor"),b.setAttribute("aria-selected",!!f.state.selected),b.setAttribute("aria-level",f.parents.length),b.setAttribute("aria-labelledby",f.a_attr.id),f.state.disabled&&b.setAttribute("aria-disabled",!0),j=0,m=f.children.length;m>j;j++)if(!q[f.children[j]].state.hidden){v=!0;break}if(null!==f.parent&&q[f.parent]&&!f.state.hidden&&(j=a.inArray(f.id,q[f.parent].children),w=f.id,-1!==j))for(j++,m=q[f.parent].children.length;m>j&&(q[q[f.parent].children[j]].state.hidden||(w=q[f.parent].children[j]),w===f.id);j++);f.state.hidden&&(o+=" jstree-hidden"),f.state.loaded&&!v?o+=" jstree-leaf":(o+=f.state.opened&&f.state.loaded?" jstree-open":" jstree-closed",b.setAttribute("aria-expanded",f.state.opened&&f.state.loaded)),w===f.id&&(o+=" jstree-last"),b.id=f.id,b.className=o,o=(f.state.selected?" jstree-clicked":"")+(f.state.disabled?" jstree-disabled":"");for(m in f.a_attr)if(f.a_attr.hasOwnProperty(m)){if("href"===m&&"#"===f.a_attr[m])continue;"class"!==m?b.childNodes[1].setAttribute(m,f.a_attr[m]):o+=" "+f.a_attr[m]}if(o.length&&(b.childNodes[1].className="jstree-anchor "+o),(f.icon&&f.icon!==!0||f.icon===!1)&&(f.icon===!1?b.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===f.icon.indexOf("/")&&-1===f.icon.indexOf(".")?b.childNodes[1].childNodes[0].className+=" "+f.icon+" jstree-themeicon-custom":(b.childNodes[1].childNodes[0].style.backgroundImage="url("+f.icon+")",b.childNodes[1].childNodes[0].style.backgroundPosition="center center",b.childNodes[1].childNodes[0].style.backgroundSize="auto",b.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?b.childNodes[1].appendChild(p.createTextNode(f.text)):b.childNodes[1].innerHTML+=f.text,c&&f.children.length&&(f.state.opened||e)&&f.state.loaded){for(n=p.createElement("UL"),n.setAttribute("role","group"),n.className="jstree-children",j=0,m=f.children.length;m>j;j++)n.appendChild(this.redraw_node(f.children[j],c,!0));b.appendChild(n)}if(i&&b.appendChild(i),!d){for(g||(g=this.element[0]),j=0,m=g.childNodes.length;m>j;j++)if(g.childNodes[j]&&g.childNodes[j].className&&-1!==g.childNodes[j].className.indexOf("jstree-children")){s=g.childNodes[j];break}s||(s=p.createElement("UL"),s.setAttribute("role","group"),s.className="jstree-children",g.appendChild(s)),g=s,hf;f++)this.open_node(c[f],d,e);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?(e=e===b?this.settings.core.animation:e,this.is_closed(c)?this.is_loaded(c)?(h=this.get_node(c,!0),i=this,h.length&&(e&&h.children(".jstree-children").length&&h.children(".jstree-children").stop(!0,!0),c.children.length&&!this._firstChild(h.children(".jstree-children")[0])&&this.draw_children(c),e?(this.trigger("before_open",{node:c}),h.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").attr("aria-expanded",!0).children(".jstree-children").stop(!0,!0).slideDown(e,function(){this.style.display="",i.trigger("after_open",{node:c})})):(this.trigger("before_open",{node:c}),h[0].className=h[0].className.replace("jstree-closed","jstree-open"),h[0].setAttribute("aria-expanded",!0))),c.state.opened=!0,d&&d.call(this,c,!0),h.length||this.trigger("before_open",{node:c}),this.trigger("open_node",{node:c}),e&&h.length||this.trigger("after_open",{node:c}),!0):this.is_loading(c)?setTimeout(a.proxy(function(){this.open_node(c,d,e)},this),500):void this.load_node(c,function(a,b){return b?this.open_node(a,d,e):d?d.call(this,a,!1):!1}):(d&&d.call(this,c,!1),!1)):!1},_open_to:function(b){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var c,d,e=b.parents;for(c=0,d=e.length;d>c;c+=1)c!==a.jstree.root&&this.open_node(e[c],!1,0);return a("#"+b.id.replace(a.jstree.idregex,"\\$&"),this.element)},close_node:function(c,d){var e,f,g,h;if(a.isArray(c)){for(c=c.slice(),e=0,f=c.length;f>e;e++)this.close_node(c[e],d);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?this.is_closed(c)?!1:(d=d===b?this.settings.core.animation:d,g=this,h=this.get_node(c,!0),h.length&&(d?h.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").attr("aria-expanded",!1).children(".jstree-children").stop(!0,!0).slideUp(d,function(){this.style.display="",h.children(".jstree-children").remove(),g.trigger("after_close",{node:c})}):(h[0].className=h[0].className.replace("jstree-open","jstree-closed"),h.attr("aria-expanded",!1).children(".jstree-children").remove())),c.state.opened=!1,this.trigger("close_node",{node:c}),void(d&&h.length||this.trigger("after_close",{node:c}))):!1},toggle_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.toggle_node(b[c]);return!0}return this.is_closed(b)?this.open_node(b):this.is_open(b)?this.close_node(b):void 0},open_all:function(b,c,d){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var e,f,g,h=b.id===a.jstree.root?this.get_container_ul():this.get_node(b,!0);if(!h.length){for(e=0,f=b.children_d.length;f>e;e++)this.is_closed(this._model.data[b.children_d[e]])&&(this._model.data[b.children_d[e]].state.opened=!0);return this.trigger("open_all",{node:b})}d=d||h,g=this,h=this.is_closed(b)?h.find(".jstree-closed").addBack():h.find(".jstree-closed"),h.each(function(){g.open_node(this,function(a,b){b&&this.is_parent(a)&&this.open_all(a,c,d)},c||0)}),0===d.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(d)})},close_all:function(b,c){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var d,e,f=b.id===a.jstree.root?this.get_container_ul():this.get_node(b,!0),g=this;for(f.length&&(f=this.is_open(b)?f.find(".jstree-open").addBack():f.find(".jstree-open"),a(f.get().reverse()).each(function(){g.close_node(this,c||0)})),d=0,e=b.children_d.length;e>d;d++)this._model.data[b.children_d[d]].state.opened=!1;this.trigger("close_all",{node:b})},is_disabled:function(a){return a=this.get_node(a),a&&a.state&&a.state.disabled},enable_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.enable_node(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.state.disabled=!1,this.get_node(b,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),void this.trigger("enable_node",{node:b})):!1},disable_node:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.disable_node(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.state.disabled=!0,this.get_node(b,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),void this.trigger("disable_node",{node:b})):!1},hide_node:function(b,c){var d,e;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.hide_node(b[d],!0);return this.redraw(),!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?void(b.state.hidden||(b.state.hidden=!0,this._node_changed(b.parent),c||this.redraw(),this.trigger("hide_node",{node:b}))):!1},show_node:function(b,c){var d,e;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.show_node(b[d],!0);return this.redraw(),!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?void(b.state.hidden&&(b.state.hidden=!1,this._node_changed(b.parent),c||this.redraw(),this.trigger("show_node",{node:b}))):!1},hide_all:function(b){var c,d=this._model.data,e=[];for(c in d)d.hasOwnProperty(c)&&c!==a.jstree.root&&!d[c].state.hidden&&(d[c].state.hidden=!0,e.push(c));return this._model.force_full_redraw=!0,b||this.redraw(),this.trigger("hide_all",{nodes:e}),e},show_all:function(b){var c,d=this._model.data,e=[];for(c in d)d.hasOwnProperty(c)&&c!==a.jstree.root&&d[c].state.hidden&&(d[c].state.hidden=!1,e.push(c));return this._model.force_full_redraw=!0,b||this.redraw(),this.trigger("show_all",{nodes:e}),e},activate_node:function(a,c){if(this.is_disabled(a))return!1;if(c&&"object"==typeof c||(c={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==b?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(c.metaKey||c.ctrlKey||c.shiftKey)&&(!c.shiftKey||this._data.core.last_clicked&&this.get_parent(a)&&this.get_parent(a)===this._data.core.last_clicked.parent))if(c.shiftKey){var d,e,f=this.get_node(a).id,g=this._data.core.last_clicked.id,h=this.get_node(this._data.core.last_clicked.parent).children,i=!1;for(d=0,e=h.length;e>d;d+=1)h[d]===f&&(i=!i),h[d]===g&&(i=!i),this.is_disabled(h[d])||!i&&h[d]!==f&&h[d]!==g?this.deselect_node(h[d],!0,c):this.select_node(h[d],!0,!1,c);this.trigger("changed",{action:"select_node",node:this.get_node(a),selected:this._data.core.selected,event:c})}else this.is_selected(a)?this.deselect_node(a,!1,c):this.select_node(a,!1,!1,c);else!this.settings.core.multiple&&(c.metaKey||c.ctrlKey||c.shiftKey)&&this.is_selected(a)?this.deselect_node(a,!1,c):(this.deselect_all(!0),this.select_node(a,!1,!1,c),this._data.core.last_clicked=this.get_node(a));this.trigger("activate_node",{node:this.get_node(a),event:c})},hover_node:function(a){if(a=this.get_node(a,!0),!a||!a.length||a.children(".jstree-hovered").length)return!1;var b=this.element.find(".jstree-hovered"),c=this.element;b&&b.length&&this.dehover_node(b),a.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(a)}),setTimeout(function(){c.attr("aria-activedescendant",a[0].id)},0)},dehover_node:function(a){return a=this.get_node(a,!0),a&&a.length&&a.children(".jstree-hovered").length?(a.children(".jstree-anchor").removeClass("jstree-hovered"),void this.trigger("dehover_node",{node:this.get_node(a)})):!1},select_node:function(b,c,d,e){var f,g,h;if(a.isArray(b)){for(b=b.slice(),g=0,h=b.length;h>g;g++)this.select_node(b[g],c,d,e);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=this.get_node(b,!0),void(b.state.selected||(b.state.selected=!0,this._data.core.selected.push(b.id),d||(f=this._open_to(b)),f&&f.length&&f.attr("aria-selected",!0).children(".jstree-anchor").addClass("jstree-clicked"),this.trigger("select_node",{node:b,selected:this._data.core.selected,event:e}),c||this.trigger("changed",{action:"select_node",node:b,selected:this._data.core.selected,event:e})))):!1},deselect_node:function(b,c,d){var e,f,g;if(a.isArray(b)){for(b=b.slice(),e=0,f=b.length;f>e;e++)this.deselect_node(b[e],c,d);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(g=this.get_node(b,!0),void(b.state.selected&&(b.state.selected=!1,this._data.core.selected=a.vakata.array_remove_item(this._data.core.selected,b.id),g.length&&g.attr("aria-selected",!1).children(".jstree-anchor").removeClass("jstree-clicked"),this.trigger("deselect_node",{node:b,selected:this._data.core.selected,event:d}),c||this.trigger("changed",{action:"deselect_node",node:b,selected:this._data.core.selected,event:d})))):!1},select_all:function(b){var c,d,e=this._data.core.selected.concat([]);for(this._data.core.selected=this._model.data[a.jstree.root].children_d.concat(),c=0,d=this._data.core.selected.length;d>c;c++)this._model.data[this._data.core.selected[c]]&&(this._model.data[this._data.core.selected[c]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),b||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:e})},deselect_all:function(a){var b,c,d=this._data.core.selected.concat([]);for(b=0,c=this._data.core.selected.length;c>b;b++)this._model.data[this._data.core.selected[b]]&&(this._model.data[this._data.core.selected[b]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").parent().attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:d}),a||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:d})},is_selected:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.state.selected:!1},get_selected:function(b){return b?a.map(this._data.core.selected,a.proxy(function(a){return this.get_node(a)},this)):this._data.core.selected.slice()},get_top_selected:function(b){var c,d,e,f,g=this.get_selected(!0),h={};for(c=0,d=g.length;d>c;c++)h[g[c].id]=g[c];for(c=0,d=g.length;d>c;c++)for(e=0,f=g[c].children_d.length;f>e;e++)h[g[c].children_d[e]]&&delete h[g[c].children_d[e]];g=[];for(c in h)h.hasOwnProperty(c)&&g.push(c);return b?a.map(g,a.proxy(function(a){return this.get_node(a)},this)):g},get_bottom_selected:function(b){var c,d,e=this.get_selected(!0),f=[];for(c=0,d=e.length;d>c;c++)e[c].children.length||f.push(e[c].id);return b?a.map(f,a.proxy(function(a){return this.get_node(a)},this)):f},get_state:function(){var b,c={core:{open:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}};for(b in this._model.data)this._model.data.hasOwnProperty(b)&&b!==a.jstree.root&&(this._model.data[b].state.opened&&c.core.open.push(b),this._model.data[b].state.selected&&c.core.selected.push(b));return c},set_state:function(c,d){if(c){if(c.core){var e,f;if(c.core.open)return a.isArray(c.core.open)&&c.core.open.length?this._load_nodes(c.core.open,function(a){this.open_node(a,!1,0),delete c.core.open,this.set_state(c,d)},!0):(delete c.core.open,this.set_state(c,d)),!1;if(c.core.scroll)return c.core.scroll&&c.core.scroll.left!==b&&this.element.scrollLeft(c.core.scroll.left),c.core.scroll&&c.core.scroll.top!==b&&this.element.scrollTop(c.core.scroll.top),delete c.core.scroll,this.set_state(c,d),!1;if(c.core.selected)return e=this,this.deselect_all(),a.each(c.core.selected,function(a,b){e.select_node(b,!1,!0)}),delete c.core.selected,this.set_state(c,d),!1;for(f in c)c.hasOwnProperty(f)&&"core"!==f&&-1===a.inArray(f,this.settings.plugins)&&delete c[f];if(a.isEmptyObject(c.core))return delete c.core,this.set_state(c,d),!1}return a.isEmptyObject(c)?(c=null,d&&d.call(this),this.trigger("set_state"),!1):!0}return!1},refresh:function(b,c){this._data.core.state=c===!0?{}:this.get_state(),c&&a.isFunction(c)&&(this._data.core.state=c.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[a.jstree.root]={id:a.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var d=this.get_container_ul()[0].className;b||(this.element.html(""),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(a.jstree.root,function(b,c){c&&(this.get_container_ul()[0].className=d,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(a.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(b){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var c=[],d=[];this._data.core.selected.concat([]);d.push(b.id),b.state.opened===!0&&c.push(b.id),this.get_node(b,!0).find(".jstree-open").each(function(){c.push(this.id)}),this._load_nodes(d,a.proxy(function(a){this.open_node(c,!1,0),this.select_node(this._data.core.selected),this.trigger("refresh_node",{node:b,nodes:a})},this))},set_id:function(b,c){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var d,e,f=this._model.data;for(c=c.toString(),f[b.parent].children[a.inArray(b.id,f[b.parent].children)]=c,d=0,e=b.parents.length;e>d;d++)f[b.parents[d]].children_d[a.inArray(b.id,f[b.parents[d]].children_d)]=c;for(d=0,e=b.children.length;e>d;d++)f[b.children[d]].parent=c;for(d=0,e=b.children_d.length;e>d;d++)f[b.children_d[d]].parents[a.inArray(b.id,f[b.children_d[d]].parents)]=c;return d=a.inArray(b.id,this._data.core.selected),-1!==d&&(this._data.core.selected[d]=c),d=this.get_node(b.id,!0),d&&(d.attr("id",c).children(".jstree-anchor").attr("id",c+"_anchor").end().attr("aria-labelledby",c+"_anchor"),this.element.attr("aria-activedescendant")===b.id&&this.element.attr("aria-activedescendant",c)),delete f[b.id],b.id=c,b.li_attr.id=c,f[c]=b,!0},get_text:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.text:!1},set_text:function(b,c){var d,e;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.set_text(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.text=c,this.get_node(b,!0).length&&this.redraw_node(b.id),this.trigger("set_text",{obj:b,text:c}),!0):!1},get_json:function(b,c,d){if(b=this.get_node(b||a.jstree.root),!b)return!1;c&&c.flat&&!d&&(d=[]);var e,f,g={id:b.id,text:b.text,icon:this.get_icon(b),li_attr:a.extend(!0,{},b.li_attr),a_attr:a.extend(!0,{},b.a_attr),state:{},data:c&&c.no_data?!1:a.extend(!0,{},b.data)};if(c&&c.flat?g.parent=b.parent:g.children=[],!c||!c.no_state)for(e in b.state)b.state.hasOwnProperty(e)&&(g.state[e]=b.state[e]);if(c&&c.no_id&&(delete g.id,g.li_attr&&g.li_attr.id&&delete g.li_attr.id,g.a_attr&&g.a_attr.id&&delete g.a_attr.id),c&&c.flat&&b.id!==a.jstree.root&&d.push(g),!c||!c.no_children)for(e=0,f=b.children.length;f>e;e++)c&&c.flat?this.get_json(b.children[e],c,d):g.children.push(this.get_json(b.children[e],c));return c&&c.flat?d:b.id===a.jstree.root?g.children:g},create_node:function(c,d,e,f,g){if(null===c&&(c=a.jstree.root),c=this.get_node(c),!c)return!1;if(e=e===b?"last":e,!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(c))return this.load_node(c,function(){this.create_node(c,d,e,f,!0)});d||(d={text:this.get_string("New node")}),"string"==typeof d&&(d={text:d}),d.text===b&&(d.text=this.get_string("New node"));var h,i,j,k;switch(c.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":h=this.get_node(c.parent),e=a.inArray(c.id,h.children),c=h;break;case"after":h=this.get_node(c.parent),e=a.inArray(c.id,h.children)+1,c=h;break;case"inside":case"first":e=0;break;case"last":e=c.children.length;break;default:e||(e=0)}if(e>c.children.length&&(e=c.children.length),d.id||(d.id=!0),!this.check("create_node",d,c,e))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(d.id===!0&&delete d.id,d=this._parse_model_from_json(d,c.id,c.parents.concat()),!d)return!1;for(h=this.get_node(d),i=[],i.push(d),i=i.concat(h.children_d),this.trigger("model",{nodes:i,parent:c.id}),c.children_d=c.children_d.concat(i),j=0,k=c.parents.length;k>j;j++)this._model.data[c.parents[j]].children_d=this._model.data[c.parents[j]].children_d.concat(i);for(d=h,h=[],j=0,k=c.children.length;k>j;j++)h[j>=e?j+1:j]=c.children[j];return h[e]=d.id,c.children=h,this.redraw_node(c,!0),f&&f.call(this,this.get_node(d)),this.trigger("create_node",{node:this.get_node(d),parent:c.id,position:e}),d.id},rename_node:function(b,c){var d,e,f;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.rename_node(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=b.text,this.check("rename_node",b,this.get_parent(b),c)?(this.set_text(b,c),this.trigger("rename_node",{node:b,text:c,old:f}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1)):!1},delete_node:function(b){var c,d,e,f,g,h,i,j,k,l,m,n;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.delete_node(b[c]);return!0}if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;if(e=this.get_node(b.parent),f=a.inArray(b.id,e.children),l=!1,!this.check("delete_node",b,e,f))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==f&&(e.children=a.vakata.array_remove(e.children,f)),g=b.children_d.concat([]),g.push(b.id),j=0,k=g.length;k>j;j++){for(h=0,i=b.parents.length;i>h;h++)f=a.inArray(g[j],this._model.data[b.parents[h]].children_d),-1!==f&&(this._model.data[b.parents[h]].children_d=a.vakata.array_remove(this._model.data[b.parents[h]].children_d,f));this._model.data[g[j]].state.selected&&(l=!0,f=a.inArray(g[j],this._data.core.selected),-1!==f&&(this._data.core.selected=a.vakata.array_remove(this._data.core.selected,f)))}for(this.trigger("delete_node",{node:b,parent:e.id}),l&&this.trigger("changed",{action:"delete_node",node:b,selected:this._data.core.selected,parent:e.id}),j=0,k=g.length;k>j;j++)delete this._model.data[g[j]];return-1!==a.inArray(this._data.core.focused,g)&&(this._data.core.focused=null,m=this.element[0].scrollTop,n=this.element[0].scrollLeft,e.id===a.jstree.root?this.get_node(this._model.data[a.jstree.root].children[0],!0).children(".jstree-anchor").focus():this.get_node(e,!0).children(".jstree-anchor").focus(),this.element[0].scrollTop=m,this.element[0].scrollLeft=n),this.redraw_node(e,!0),!0},check:function(b,c,d,e,f){c=c&&c.id?c:this.get_node(c),d=d&&d.id?d:this.get_node(d);var g=b.match(/^move_node|copy_node|create_node$/i)?d:c,h=this.settings.core.check_callback;return"move_node"!==b&&"copy_node"!==b||f&&f.is_multi||c.id!==d.id&&a.inArray(c.id,d.children)!==e&&-1===a.inArray(d.id,c.children_d)?(g&&g.data&&(g=g.data),g&&g.functions&&(g.functions[b]===!1||g.functions[b]===!0)?(g.functions[b]===!1&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+b,data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})}),g.functions[b]):h===!1||a.isFunction(h)&&h.call(this,b,c,d,e,f)===!1||h&&h[b]===!1?(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+b,data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1):!0):(this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1)},last_error:function(){return this._data.core.last_error},move_node:function(c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(d=this.get_node(d),e=e===b?0:e,!d)return!1;if(!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(d))return this.load_node(d,function(){this.move_node(c,d,e,f,!0,!1,i)});if(a.isArray(c)){if(1!==c.length){for(j=0,k=c.length;k>j;j++)(r=this.move_node(c[j],d,e,f,g,!1,i))&&(d=r,e="after");return this.redraw(),!0}c=c[0]}if(c=c&&c.id?c:this.get_node(c),!c||c.id===a.jstree.root)return!1;if(l=(c.parent||a.jstree.root).toString(),n=e.toString().match(/^(before|after)$/)&&d.id!==a.jstree.root?this.get_node(d.parent):d,o=i?i:this._model.data[c.id]?this:a.jstree.reference(c.id),p=!o||!o._id||this._id!==o._id,m=o&&o._id&&l&&o._model.data[l]&&o._model.data[l].children?a.inArray(c.id,o._model.data[l].children):-1,o&&o._id&&(c=o._model.data[c.id]),p)return(r=this.copy_node(c,d,e,f,g,!1,i))?(o&&o.delete_node(c),r):!1;switch(d.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":e=a.inArray(d.id,n.children);break;case"after":e=a.inArray(d.id,n.children)+1;break;case"inside":case"first":e=0;break;case"last":e=n.children.length;break;default:e||(e=0)}if(e>n.children.length&&(e=n.children.length),!this.check("move_node",c,n,e,{core:!0,origin:i,is_multi:o&&o._id&&o._id!==this._id,is_foreign:!o||!o._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(c.parent===n.id){for(q=n.children.concat(),r=a.inArray(c.id,q),-1!==r&&(q=a.vakata.array_remove(q,r),e>r&&e--),r=[],s=0,t=q.length;t>s;s++)r[s>=e?s+1:s]=q[s];r[e]=c.id,n.children=r,this._node_changed(n.id),this.redraw(n.id===a.jstree.root)}else{for(r=c.children_d.concat(),r.push(c.id),s=0,t=c.parents.length;t>s;s++){for(q=[],w=o._model.data[c.parents[s]].children_d,u=0,v=w.length;v>u;u++)-1===a.inArray(w[u],r)&&q.push(w[u]);o._model.data[c.parents[s]].children_d=q}for(o._model.data[l].children=a.vakata.array_remove_item(o._model.data[l].children,c.id),s=0,t=n.parents.length;t>s;s++)this._model.data[n.parents[s]].children_d=this._model.data[n.parents[s]].children_d.concat(r);for(q=[],s=0,t=n.children.length;t>s;s++)q[s>=e?s+1:s]=n.children[s];for(q[e]=c.id,n.children=q,n.children_d.push(c.id),n.children_d=n.children_d.concat(c.children_d),c.parent=n.id,r=n.parents.concat(),r.unshift(n.id),w=c.parents.length,c.parents=r,r=r.concat(),s=0,t=c.children_d.length;t>s;s++)this._model.data[c.children_d[s]].parents=this._model.data[c.children_d[s]].parents.slice(0,-1*w),Array.prototype.push.apply(this._model.data[c.children_d[s]].parents,r);l!==a.jstree.root&&n.id!==a.jstree.root||(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(l),this._node_changed(n.id)),h||this.redraw()}return f&&f.call(this,c,n,e),this.trigger("move_node",{node:c,parent:n.id,position:e,old_parent:l,old_position:m,is_multi:o&&o._id&&o._id!==this._id,is_foreign:!o||!o._id,old_instance:o,new_instance:this}),c.id},copy_node:function(c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r,s,t;if(d=this.get_node(d),e=e===b?0:e,!d)return!1;if(!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(d))return this.load_node(d,function(){this.copy_node(c,d,e,f,!0,!1,i)});if(a.isArray(c)){if(1!==c.length){for(j=0,k=c.length;k>j;j++)(m=this.copy_node(c[j],d,e,f,g,!0,i))&&(d=m,e="after");return this.redraw(),!0}c=c[0]}if(c=c&&c.id?c:this.get_node(c),!c||c.id===a.jstree.root)return!1;switch(q=(c.parent||a.jstree.root).toString(),r=e.toString().match(/^(before|after)$/)&&d.id!==a.jstree.root?this.get_node(d.parent):d,s=i?i:this._model.data[c.id]?this:a.jstree.reference(c.id),t=!s||!s._id||this._id!==s._id,s&&s._id&&(c=s._model.data[c.id]),d.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":e=a.inArray(d.id,r.children);break;case"after":e=a.inArray(d.id,r.children)+1;break;case"inside":case"first":e=0;break;case"last":e=r.children.length;break;default:e||(e=0)}if(e>r.children.length&&(e=r.children.length),!this.check("copy_node",c,r,e,{core:!0,origin:i,is_multi:s&&s._id&&s._id!==this._id,is_foreign:!s||!s._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(p=s?s.get_json(c,{no_id:!0,no_data:!0,no_state:!0}):c,!p)return!1;if(p.id===!0&&delete p.id,p=this._parse_model_from_json(p,r.id,r.parents.concat()),!p)return!1;for(m=this.get_node(p),c&&c.state&&c.state.loaded===!1&&(m.state.loaded=!1),l=[],l.push(p),l=l.concat(m.children_d),this.trigger("model",{nodes:l,parent:r.id}),n=0,o=r.parents.length;o>n;n++)this._model.data[r.parents[n]].children_d=this._model.data[r.parents[n]].children_d.concat(l);for(l=[],n=0,o=r.children.length;o>n;n++)l[n>=e?n+1:n]=r.children[n];return l[e]=m.id,r.children=l,r.children_d.push(m.id),r.children_d=r.children_d.concat(m.children_d),r.id===a.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(r.id),h||this.redraw(r.id===a.jstree.root),f&&f.call(this,m,r,e),this.trigger("copy_node",{node:m,original:c,parent:r.id,position:e,old_parent:q,old_position:s&&s._id&&q&&s._model.data[q]&&s._model.data[q].children?a.inArray(c.id,s._model.data[q].children):-1,is_multi:s&&s._id&&s._id!==this._id,is_foreign:!s||!s._id,old_instance:s,new_instance:this}),m.id},cut:function(b){if(b||(b=this._data.core.selected.concat()),a.isArray(b)||(b=[b]),!b.length)return!1;var c,d,e,i=[];for(d=0,e=b.length;e>d;d++)c=this.get_node(b[d]),c&&c.id&&c.id!==a.jstree.root&&i.push(c);return i.length?(f=i,h=this,g="move_node",void this.trigger("cut",{node:b})):!1},copy:function(b){if(b||(b=this._data.core.selected.concat()),a.isArray(b)||(b=[b]),!b.length)return!1;var c,d,e,i=[];for(d=0,e=b.length;e>d;d++)c=this.get_node(b[d]),c&&c.id&&c.id!==a.jstree.root&&i.push(c);return i.length?(f=i,h=this,g="copy_node",void this.trigger("copy",{node:b})):!1},get_buffer:function(){return{mode:g,node:f,inst:h}},can_paste:function(){return g!==!1&&f!==!1},paste:function(a,b){return a=this.get_node(a),a&&g&&g.match(/^(copy_node|move_node)$/)&&f?(this[g](f,a,b,!1,!1,!1,h)&&this.trigger("paste",{parent:a.id,node:f,mode:g}),f=!1,g=!1,void(h=!1)):!1},clear_buffer:function(){f=!1,g=!1,h=!1,this.trigger("clear_buffer")},edit:function(b,c,d){var e,f,g,h,i,j,k,l,m,n=!1;return(b=this.get_node(b))?this.settings.core.check_callback===!1?(this._data.core.last_error={error:"check",plugin:"core",id:"core_07",reason:"Could not edit node because of check_callback"},this.settings.core.error.call(this,this._data.core.last_error),!1):(m=b,c="string"==typeof c?c:b.text,this.set_text(b,""),b=this._open_to(b),m.text=c,e=this._data.core.rtl,f=this.element.width(),this._data.core.focused=m.id,g=b.children(".jstree-anchor").focus(),h=a(""),i=c,j=a("
            ",{css:{position:"absolute",top:"-200px",left:e?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),k=a("",{value:i,"class":"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:a.proxy(function(c){c.stopImmediatePropagation(),c.preventDefault();var e,f=h.children(".jstree-rename-input"),k=f.val(),l=this.settings.core.force_text;""===k&&(k=i),j.remove(),h.replaceWith(g),h.remove(),i=l?i:a("
            ").append(a.parseHTML(i)).html(),this.set_text(b,i),e=!!this.rename_node(b,l?a("
            ").text(k).text():a("
            ").append(a.parseHTML(k)).html()),e||this.set_text(b,i),this._data.core.focused=m.id,setTimeout(a.proxy(function(){var a=this.get_node(m.id,!0);a.length&&(this._data.core.focused=m.id,a.children(".jstree-anchor").focus())},this),0),d&&d.call(this,m,e,n)},this),keydown:function(a){var b=a.which;27===b&&(n=!0,this.value=i),27!==b&&13!==b&&37!==b&&38!==b&&39!==b&&40!==b&&32!==b||a.stopImmediatePropagation(),27!==b&&13!==b||(a.preventDefault(),this.blur())},click:function(a){a.stopImmediatePropagation()},mousedown:function(a){a.stopImmediatePropagation()},keyup:function(a){k.width(Math.min(j.text("pW"+this.value).width(),f))},keypress:function(a){return 13===a.which?!1:void 0}}),l={fontFamily:g.css("fontFamily")||"",fontSize:g.css("fontSize")||"",fontWeight:g.css("fontWeight")||"",fontStyle:g.css("fontStyle")||"",fontStretch:g.css("fontStretch")||"",fontVariant:g.css("fontVariant")||"",letterSpacing:g.css("letterSpacing")||"",wordSpacing:g.css("wordSpacing")||""},h.attr("class",g.attr("class")).append(g.contents().clone()).append(k),g.replaceWith(h),j.css(l),void k.css(l).width(Math.min(j.text("pW"+k[0].value).width(),f))[0].select()):!1},set_theme:function(b,c){if(!b)return!1;if(c===!0){var d=this.settings.core.themes.dir;d||(d=a.jstree.path+"/themes"),c=d+"/"+b+"/style.css"}c&&-1===a.inArray(c,i)&&(a("head").append(''),i.push(c)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=b,this.element.addClass("jstree-"+b),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+b+"-responsive"),this.trigger("set_theme",{theme:b})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(a){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=a,a&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},set_icon:function(c,d){var e,f,g,h;if(a.isArray(c)){for(c=c.slice(),e=0,f=c.length;f>e;e++)this.set_icon(c[e],d);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?(h=c.icon,c.icon=d===!0||null===d||d===b||""===d?!0:d,g=this.get_node(c,!0).children(".jstree-anchor").children(".jstree-themeicon"),d===!1?this.hide_icon(c):d===!0||null===d||d===b||""===d?(g.removeClass("jstree-themeicon-custom "+h).css("background","").removeAttr("rel"),h===!1&&this.show_icon(c)):-1===d.indexOf("/")&&-1===d.indexOf(".")?(g.removeClass(h).css("background",""),g.addClass(d+" jstree-themeicon-custom").attr("rel",d),h===!1&&this.show_icon(c)):(g.removeClass(h).css("background",""),g.addClass("jstree-themeicon-custom").css("background","url('"+d+"') center center no-repeat").attr("rel",d),h===!1&&this.show_icon(c)),!0):!1},get_icon:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.icon:!1},hide_icon:function(b){var c,d;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.hide_icon(b[c]);return!0}return b=this.get_node(b),b&&b!==a.jstree.root?(b.icon=!1,this.get_node(b,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0):!1},show_icon:function(b){var c,d,e;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.show_icon(b[c]);return!0}return b=this.get_node(b),b&&b!==a.jstree.root?(e=this.get_node(b,!0),b.icon=e.length?e.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"):!0,b.icon||(b.icon=!0),e.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"), +!0):!1}},a.vakata={},a.vakata.attributes=function(b,c){b=a(b)[0];var d=c?{}:[];return b&&b.attributes&&a.each(b.attributes,function(b,e){-1===a.inArray(e.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==e.value&&""!==a.trim(e.value)&&(c?d[e.name]=e.value:d.push(e.name))}),d},a.vakata.array_unique=function(a){var c,d,e=[],f={};for(c=0,d=a.length;d>c;c++)f[a[c]]===b&&(e.push(a[c]),f[a[c]]=!0);return e},a.vakata.array_remove=function(a,b,c){var d=a.slice((c||b)+1||a.length);return a.length=0>b?a.length+b:b,a.push.apply(a,d),a},a.vakata.array_remove_item=function(b,c){var d=a.inArray(c,b);return-1!==d?a.vakata.array_remove(b,d):b},a.jstree.plugins.changed=function(a,b){var c=[];this.trigger=function(a,d){var e,f;if(d||(d={}),"changed"===a.replace(".jstree","")){d.changed={selected:[],deselected:[]};var g={};for(e=0,f=c.length;f>e;e++)g[c[e]]=1;for(e=0,f=d.selected.length;f>e;e++)g[d.selected[e]]?g[d.selected[e]]=2:d.changed.selected.push(d.selected[e]);for(e=0,f=c.length;f>e;e++)1===g[c[e]]&&d.changed.deselected.push(c[e]);c=d.selected.slice()}b.trigger.call(this,a,d)},this.refresh=function(a,d){return c=[],b.refresh.apply(this,arguments)}};var m=k.createElement("I");m.className="jstree-icon jstree-checkbox",m.setAttribute("role","presentation"),a.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0},a.jstree.plugins.checkbox=function(c,d){this.bind=function(){d.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",a.proxy(function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")},this)).on("loading.jstree",a.proxy(function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()},this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",a.proxy(function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(a.proxy(this._undetermined,this),50)},this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",a.proxy(function(a,b){var c,d,e=this._model.data,f=(e[b.parent],b.nodes);for(c=0,d=f.length;d>c;c++)e[f[c]].state.checked=e[f[c]].state.checked||e[f[c]].original&&e[f[c]].original.state&&e[f[c]].original.state.checked,e[f[c]].state.checked&&this._data.checkbox.selected.push(f[c])},this)),-1===this.settings.checkbox.cascade.indexOf("up")&&-1===this.settings.checkbox.cascade.indexOf("down")||this.element.on("model.jstree",a.proxy(function(b,c){var d,e,f,g,h,i,j=this._model.data,k=j[c.parent],l=c.nodes,m=[],n=this.settings.checkbox.cascade,o=this.settings.checkbox.tie_selection;if(-1!==n.indexOf("down"))if(k.state[o?"selected":"checked"]){for(e=0,f=l.length;f>e;e++)j[l[e]].state[o?"selected":"checked"]=!0;this._data[o?"core":"checkbox"].selected=this._data[o?"core":"checkbox"].selected.concat(l)}else for(e=0,f=l.length;f>e;e++)if(j[l[e]].state[o?"selected":"checked"]){for(g=0,h=j[l[e]].children_d.length;h>g;g++)j[j[l[e]].children_d[g]].state[o?"selected":"checked"]=!0;this._data[o?"core":"checkbox"].selected=this._data[o?"core":"checkbox"].selected.concat(j[l[e]].children_d)}if(-1!==n.indexOf("up")){for(e=0,f=k.children_d.length;f>e;e++)j[k.children_d[e]].children.length||m.push(j[k.children_d[e]].parent);for(m=a.vakata.array_unique(m),g=0,h=m.length;h>g;g++)for(k=j[m[g]];k&&k.id!==a.jstree.root;){for(d=0,e=0,f=k.children.length;f>e;e++)d+=j[k.children[e]].state[o?"selected":"checked"];if(d!==f)break;k.state[o?"selected":"checked"]=!0,this._data[o?"core":"checkbox"].selected.push(k.id),i=this.get_node(k,!0),i&&i.length&&i.attr("aria-selected",!0).children(".jstree-anchor").addClass(o?"jstree-clicked":"jstree-checked"),k=this.get_node(k.parent)}}this._data[o?"core":"checkbox"].selected=a.vakata.array_unique(this._data[o?"core":"checkbox"].selected)},this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",a.proxy(function(b,c){var d,e,f,g,h=c.node,i=this._model.data,j=this.get_node(h.parent),k=this.get_node(h,!0),l=this.settings.checkbox.cascade,m=this.settings.checkbox.tie_selection;if(-1!==l.indexOf("down"))for(this._data[m?"core":"checkbox"].selected=a.vakata.array_unique(this._data[m?"core":"checkbox"].selected.concat(h.children_d)),d=0,e=h.children_d.length;e>d;d++)g=i[h.children_d[d]],g.state[m?"selected":"checked"]=!0,g&&g.original&&g.original.state&&g.original.state.undetermined&&(g.original.state.undetermined=!1);if(-1!==l.indexOf("up"))for(;j&&j.id!==a.jstree.root;){for(f=0,d=0,e=j.children.length;e>d;d++)f+=i[j.children[d]].state[m?"selected":"checked"];if(f!==e)break;j.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(j.id),g=this.get_node(j,!0),g&&g.length&&g.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),j=this.get_node(j.parent)}-1!==l.indexOf("down")&&k.length&&k.find(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked").parent().attr("aria-selected",!0)},this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",a.proxy(function(b,c){var d,e,f,g=this.get_node(a.jstree.root),h=this._model.data;for(d=0,e=g.children_d.length;e>d;d++)f=h[g.children_d[d]],f&&f.original&&f.original.state&&f.original.state.undetermined&&(f.original.state.undetermined=!1)},this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",a.proxy(function(b,c){var d,e,f,g=c.node,h=this.get_node(g,!0),i=this.settings.checkbox.cascade,j=this.settings.checkbox.tie_selection;if(g&&g.original&&g.original.state&&g.original.state.undetermined&&(g.original.state.undetermined=!1),-1!==i.indexOf("down"))for(d=0,e=g.children_d.length;e>d;d++)f=this._model.data[g.children_d[d]],f.state[j?"selected":"checked"]=!1,f&&f.original&&f.original.state&&f.original.state.undetermined&&(f.original.state.undetermined=!1);if(-1!==i.indexOf("up"))for(d=0,e=g.parents.length;e>d;d++)f=this._model.data[g.parents[d]],f.state[j?"selected":"checked"]=!1,f&&f.original&&f.original.state&&f.original.state.undetermined&&(f.original.state.undetermined=!1),f=this.get_node(g.parents[d],!0),f&&f.length&&f.attr("aria-selected",!1).children(".jstree-anchor").removeClass(j?"jstree-clicked":"jstree-checked");for(f=[],d=0,e=this._data[j?"core":"checkbox"].selected.length;e>d;d++)-1!==i.indexOf("down")&&-1!==a.inArray(this._data[j?"core":"checkbox"].selected[d],g.children_d)||-1!==i.indexOf("up")&&-1!==a.inArray(this._data[j?"core":"checkbox"].selected[d],g.parents)||f.push(this._data[j?"core":"checkbox"].selected[d]);this._data[j?"core":"checkbox"].selected=a.vakata.array_unique(f),-1!==i.indexOf("down")&&h.length&&h.find(".jstree-anchor").removeClass(j?"jstree-clicked":"jstree-checked").parent().attr("aria-selected",!1)},this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",a.proxy(function(b,c){for(var d,e,f,g,h=this.get_node(c.parent),i=this._model.data,j=this.settings.checkbox.tie_selection;h&&h.id!==a.jstree.root&&!h.state[j?"selected":"checked"];){for(f=0,d=0,e=h.children.length;e>d;d++)f+=i[h.children[d]].state[j?"selected":"checked"];if(!(e>0&&f===e))break;h.state[j?"selected":"checked"]=!0,this._data[j?"core":"checkbox"].selected.push(h.id),g=this.get_node(h,!0),g&&g.length&&g.attr("aria-selected",!0).children(".jstree-anchor").addClass(j?"jstree-clicked":"jstree-checked"),h=this.get_node(h.parent)}},this)).on("move_node.jstree",a.proxy(function(b,c){var d,e,f,g,h,i=c.is_multi,j=c.old_parent,k=this.get_node(c.parent),l=this._model.data,m=this.settings.checkbox.tie_selection;if(!i)for(d=this.get_node(j);d&&d.id!==a.jstree.root&&!d.state[m?"selected":"checked"];){for(e=0,f=0,g=d.children.length;g>f;f++)e+=l[d.children[f]].state[m?"selected":"checked"];if(!(g>0&&e===g))break;d.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(d.id),h=this.get_node(d,!0),h&&h.length&&h.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),d=this.get_node(d.parent)}for(d=k;d&&d.id!==a.jstree.root;){for(e=0,f=0,g=d.children.length;g>f;f++)e+=l[d.children[f]].state[m?"selected":"checked"];if(e===g)d.state[m?"selected":"checked"]||(d.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(d.id),h=this.get_node(d,!0),h&&h.length&&h.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"));else{if(!d.state[m?"selected":"checked"])break;d.state[m?"selected":"checked"]=!1,this._data[m?"core":"checkbox"].selected=a.vakata.array_remove_item(this._data[m?"core":"checkbox"].selected,d.id),h=this.get_node(d,!0),h&&h.length&&h.attr("aria-selected",!1).children(".jstree-anchor").removeClass(m?"jstree-clicked":"jstree-checked")}d=this.get_node(d.parent)}},this))},this._undetermined=function(){if(null!==this.element){var c,d,e,f,g={},h=this._model.data,i=this.settings.checkbox.tie_selection,j=this._data[i?"core":"checkbox"].selected,k=[],l=this;for(c=0,d=j.length;d>c;c++)if(h[j[c]]&&h[j[c]].parents)for(e=0,f=h[j[c]].parents.length;f>e;e++)g[h[j[c]].parents[e]]===b&&h[j[c]].parents[e]!==a.jstree.root&&(g[h[j[c]].parents[e]]=!0,k.push(h[j[c]].parents[e]));for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var i,j=l.get_node(this);if(j.state.loaded){for(c=0,d=j.children_d.length;d>c;c++)if(i=h[j.children_d[c]],!i.state.loaded&&i.original&&i.original.state&&i.original.state.undetermined&&i.original.state.undetermined===!0)for(g[i.id]===b&&i.id!==a.jstree.root&&(g[i.id]=!0,k.push(i.id)),e=0,f=i.parents.length;f>e;e++)g[i.parents[e]]===b&&i.parents[e]!==a.jstree.root&&(g[i.parents[e]]=!0,k.push(i.parents[e]))}else if(j.original&&j.original.state&&j.original.state.undetermined&&j.original.state.undetermined===!0)for(g[j.id]===b&&j.id!==a.jstree.root&&(g[j.id]=!0,k.push(j.id)),e=0,f=j.parents.length;f>e;e++)g[j.parents[e]]===b&&j.parents[e]!==a.jstree.root&&(g[j.parents[e]]=!0,k.push(j.parents[e]))}),this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),c=0,d=k.length;d>c;c++)h[k[c]].state[i?"selected":"checked"]||(j=this.get_node(k[c],!0),j&&j.length&&j.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined"))}},this.redraw_node=function(b,c,e,f){if(b=d.redraw_node.apply(this,arguments)){var g,h,i=null,j=null;for(g=0,h=b.childNodes.length;h>g;g++)if(b.childNodes[g]&&b.childNodes[g].className&&-1!==b.childNodes[g].className.indexOf("jstree-anchor")){i=b.childNodes[g];break}i&&(!this.settings.checkbox.tie_selection&&this._model.data[b.id].state.checked&&(i.className+=" jstree-checked"),j=m.cloneNode(!1),this._model.data[b.id].state.checkbox_disabled&&(j.className+=" jstree-checkbox-disabled"),i.insertBefore(j,i.childNodes[0]))}return e||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(a.proxy(this._undetermined,this),50)),b},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(b){b=this.get_node(b);var c,d,e=this.settings.checkbox.cascade,f=this.settings.checkbox.tie_selection,g=this._data[f?"core":"checkbox"].selected,h=this._model.data;if(!b||b.state[f?"selected":"checked"]===!0||-1===e.indexOf("undetermined")||-1===e.indexOf("down")&&-1===e.indexOf("up"))return!1;if(!b.state.loaded&&b.original.state.undetermined===!0)return!0;for(c=0,d=b.children_d.length;d>c;c++)if(-1!==a.inArray(b.children_d[c],g)||!h[b.children_d[c]].state.loaded&&h[b.children_d[c]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(b){var c,d,e;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.disable_checkbox(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(e=this.get_node(b,!0),void(b.state.checkbox_disabled||(b.state.checkbox_disabled=!0,e&&e.length&&e.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:b})))):!1},this.enable_checkbox=function(b){var c,d,e;if(a.isArray(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.enable_checkbox(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(e=this.get_node(b,!0),void(b.state.checkbox_disabled&&(b.state.checkbox_disabled=!1,e&&e.length&&e.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:b})))):!1},this.activate_node=function(b,c){return a(c.target).hasClass("jstree-checkbox-disabled")?!1:(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||a(c.target).hasClass("jstree-checkbox"))&&(c.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!a(c.target).hasClass("jstree-checkbox")?d.activate_node.call(this,b,c):this.is_disabled(b)?!1:(this.is_checked(b)?this.uncheck_node(b,c):this.check_node(b,c),void this.trigger("activate_node",{node:this.get_node(b)})))},this.check_node=function(b,c){if(this.settings.checkbox.tie_selection)return this.select_node(b,!1,!0,c);var d,e,f;if(a.isArray(b)){for(b=b.slice(),e=0,f=b.length;f>e;e++)this.check_node(b[e],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(d=this.get_node(b,!0),void(b.state.checked||(b.state.checked=!0,this._data.checkbox.selected.push(b.id),d&&d.length&&d.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:b,selected:this._data.checkbox.selected,event:c})))):!1},this.uncheck_node=function(b,c){if(this.settings.checkbox.tie_selection)return this.deselect_node(b,!1,c);var d,e,f;if(a.isArray(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.uncheck_node(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=this.get_node(b,!0),void(b.state.checked&&(b.state.checked=!1,this._data.checkbox.selected=a.vakata.array_remove_item(this._data.checkbox.selected,b.id),f.length&&f.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:b,selected:this._data.checkbox.selected,event:c})))):!1},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var b,c;this._data.checkbox.selected.concat([]);for(this._data.checkbox.selected=this._model.data[a.jstree.root].children_d.concat(),b=0,c=this._data.checkbox.selected.length;c>b;b++)this._model.data[this._data.checkbox.selected[b]]&&(this._model.data[this._data.checkbox.selected[b]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var a,b,c=this._data.checkbox.selected.concat([]);for(a=0,b=this._data.checkbox.selected.length;b>a;a++)this._model.data[this._data.checkbox.selected[a]]&&(this._model.data[this._data.checkbox.selected[a]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:c})},this.is_checked=function(b){return this.settings.checkbox.tie_selection?this.is_selected(b):(b=this.get_node(b),b&&b.id!==a.jstree.root?b.state.checked:!1)},this.get_checked=function(b){return this.settings.checkbox.tie_selection?this.get_selected(b):b?a.map(this._data.checkbox.selected,a.proxy(function(a){return this.get_node(a)},this)):this._data.checkbox.selected},this.get_top_checked=function(b){if(this.settings.checkbox.tie_selection)return this.get_top_selected(b);var c,d,e,f,g=this.get_checked(!0),h={};for(c=0,d=g.length;d>c;c++)h[g[c].id]=g[c];for(c=0,d=g.length;d>c;c++)for(e=0,f=g[c].children_d.length;f>e;e++)h[g[c].children_d[e]]&&delete h[g[c].children_d[e]];g=[];for(c in h)h.hasOwnProperty(c)&&g.push(c);return b?a.map(g,a.proxy(function(a){return this.get_node(a)},this)):g},this.get_bottom_checked=function(b){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(b);var c,d,e=this.get_checked(!0),f=[];for(c=0,d=e.length;d>c;c++)e[c].children.length||f.push(e[c].id);return b?a.map(f,a.proxy(function(a){return this.get_node(a)},this)):f},this.load_node=function(b,c){var e,f,g,h;if(!a.isArray(b)&&!this.settings.checkbox.tie_selection&&(h=this.get_node(b),h&&h.state.loaded))for(e=0,f=h.children_d.length;f>e;e++)this._model.data[h.children_d[e]].state.checked&&(g=!0,this._data.checkbox.selected=a.vakata.array_remove_item(this._data.checkbox.selected,h.children_d[e]));return d.load_node.apply(this,arguments)},this.get_state=function(){var a=d.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection?a:(a.checkbox=this._data.checkbox.selected.slice(),a)},this.set_state=function(b,c){var e=d.set_state.apply(this,arguments);if(e&&b.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var f=this;a.each(b.checkbox,function(a,b){f.check_node(b)})}return delete b.checkbox,this.set_state(b,c),!1}return e},this.refresh=function(a,b){return this.settings.checkbox.tie_selection||(this._data.checkbox.selected=[]),d.refresh.apply(this,arguments)}},a.jstree.defaults.conditionalselect=function(){return!0},a.jstree.plugins.conditionalselect=function(a,b){this.activate_node=function(a,c){this.settings.conditionalselect.call(this,this.get_node(a),c)&&b.activate_node.call(this,a,c)}},a.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(b,c){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.create_node(d,{},"last",function(a){setTimeout(function(){c.edit(a)},0)})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.edit(d)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.delete_node(c.get_selected()):c.delete_node(d)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.cut(c.get_top_selected()):c.cut(d)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.copy(c.get_top_selected()):c.copy(d)}},paste:{separator_before:!1,icon:!1,_disabled:function(b){return!a.jstree.reference(b.reference).can_paste()},separator_after:!1,label:"Paste",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.paste(d)}}}}}}},a.jstree.plugins.contextmenu=function(c,d){this.bind=function(){d.bind.call(this);var b,c,e=0,f=null;this.element.on("contextmenu.jstree",".jstree-anchor",a.proxy(function(a,b){a.preventDefault(),e=a.ctrlKey?+new Date:0,(b||f)&&(e=+new Date+1e4),f&&clearTimeout(f),this.is_loading(a.currentTarget)||this.show_contextmenu(a.currentTarget,a.pageX,a.pageY,a)},this)).on("click.jstree",".jstree-anchor",a.proxy(function(b){this._data.contextmenu.visible&&(!e||+new Date-e>250)&&a.vakata.context.hide(),e=0},this)).on("touchstart.jstree",".jstree-anchor",function(d){d.originalEvent&&d.originalEvent.changedTouches&&d.originalEvent.changedTouches[0]&&(b=d.pageX,c=d.pageY,f=setTimeout(function(){a(d.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(a){f&&a.originalEvent&&a.originalEvent.changedTouches&&a.originalEvent.changedTouches[0]&&(Math.abs(b-a.pageX)>50||Math.abs(c-a.pageY)>50)&&clearTimeout(f)}).on("touchend.vakata.jstree",function(a){f&&clearTimeout(f)}),a(k).on("context_hide.vakata.jstree",a.proxy(function(){this._data.contextmenu.visible=!1},this))},this.teardown=function(){this._data.contextmenu.visible&&a.vakata.context.hide(),d.teardown.call(this)},this.show_contextmenu=function(c,d,e,f){if(c=this.get_node(c),!c||c.id===a.jstree.root)return!1;var g=this.settings.contextmenu,h=this.get_node(c,!0),i=h.children(".jstree-anchor"),j=!1,k=!1;(g.show_at_node||d===b||e===b)&&(j=i.offset(),d=j.left,e=j.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(c)&&this.activate_node(c,f),k=g.items,a.isFunction(k)&&(k=k.call(this,c,a.proxy(function(a){this._show_contextmenu(c,d,e,a)},this))),a.isPlainObject(k)&&this._show_contextmenu(c,d,e,k)},this._show_contextmenu=function(b,c,d,e){var f=this.get_node(b,!0),g=f.children(".jstree-anchor");a(k).one("context_show.vakata.jstree",a.proxy(function(b,c){var d="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";a(c.element).addClass(d)},this)),this._data.contextmenu.visible=!0,a.vakata.context.show(g,{x:c,y:d},e),this.trigger("show_contextmenu",{node:b,x:c,y:d})}},function(a){var b=!1,c={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};a.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(b){a(k).triggerHandler("context_"+b+".vakata",{reference:c.reference,element:c.element,position:{x:c.position_x,y:c.position_y}})},_execute:function(b){return b=c.items[b],b&&(!b._disabled||a.isFunction(b._disabled)&&!b._disabled({item:b,reference:c.reference,element:c.element}))&&b.action?b.action.call(null,{item:b,reference:c.reference,element:c.element,position:{x:c.position_x,y:c.position_y}}):!1},_parse:function(b,d){if(!b)return!1;d||(c.html="",c.items=[]);var e,f="",g=!1;return d&&(f+=""),d||(c.html=f,a.vakata.context._trigger("parse")),f.length>10?f:!1},_show_submenu:function(c){if(c=a(c),c.length&&c.children("ul").length){var d=c.children("ul"),e=c.offset().left+c.outerWidth(),f=c.offset().top,g=d.width(),h=d.height(),i=a(window).width()+a(window).scrollLeft(),j=a(window).height()+a(window).scrollTop();b?c[e-(g+10+c.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):c[e+g+10>i?"addClass":"removeClass"]("vakata-context-right"),f+h+10>j&&d.css("bottom","-1px"),d.show()}},show:function(d,e,f){var g,h,i,j,k,l,m,n,o=!0;switch(c.element&&c.element.length&&c.element.width(""),o){case!e&&!d:return!1;case!!e&&!!d:c.reference=d,c.position_x=e.x,c.position_y=e.y;break;case!e&&!!d:c.reference=d,g=d.offset(),c.position_x=g.left+d.outerHeight(),c.position_y=g.top;break;case!!e&&!d:c.position_x=e.x,c.position_y=e.y}d&&!f&&a(d).data("vakata_contextmenu")&&(f=a(d).data("vakata_contextmenu")),a.vakata.context._parse(f)&&c.element.html(c.html),c.items.length&&(c.element.appendTo("body"),h=c.element,i=c.position_x,j=c.position_y,k=h.width(),l=h.height(),m=a(window).width()+a(window).scrollLeft(),n=a(window).height()+a(window).scrollTop(),b&&(i-=h.outerWidth()-a(d).outerWidth(),im&&(i=m-(k+20)),j+l+20>n&&(j=n-(l+20)),c.element.css({left:i,top:j}).show().find("a").first().focus().parent().addClass("vakata-context-hover"),c.is_visible=!0,a.vakata.context._trigger("show"))},hide:function(){c.is_visible&&(c.element.hide().find("ul").hide().end().find(":focus").blur().end().detach(),c.is_visible=!1,a.vakata.context._trigger("hide"))}},a(function(){b="rtl"===a("body").css("direction");var d=!1;c.element=a("
              "),c.element.on("mouseenter","li",function(b){b.stopImmediatePropagation(),a.contains(this,b.relatedTarget)||(d&&clearTimeout(d),c.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),a(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),a.vakata.context._show_submenu(this))}).on("mouseleave","li",function(b){a.contains(this,b.relatedTarget)||a(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(b){a(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),a.vakata.context.settings.hide_onmouseleave&&(d=setTimeout(function(b){return function(){a.vakata.context.hide()}}(this),a.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(b){b.preventDefault(),a(this).blur().parent().hasClass("vakata-context-disabled")||a.vakata.context._execute(a(this).attr("rel"))===!1||a.vakata.context.hide()}).on("keydown","a",function(b){var d=null;switch(b.which){case 13:case 32:b.type="mouseup",b.preventDefault(),a(b.currentTarget).trigger(b);break;case 37:c.is_visible&&(c.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 38:c.is_visible&&(d=c.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first(),d.length||(d=c.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),d.addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 39:c.is_visible&&(c.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 40:c.is_visible&&(d=c.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first(),d.length||(d=c.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),d.addClass("vakata-context-hover").children("a").focus(),b.stopImmediatePropagation(),b.preventDefault());break;case 27:a.vakata.context.hide(),b.preventDefault()}}).on("keydown",function(a){a.preventDefault();var b=c.element.find(".vakata-contextmenu-shortcut-"+a.which).parent();b.parent().not(".vakata-context-disabled")&&b.click()}),a(k).on("mousedown.vakata.jstree",function(b){c.is_visible&&!a.contains(c.element[0],b.target)&&a.vakata.context.hide()}).on("context_show.vakata.jstree",function(a,d){c.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),b&&c.element.addClass("vakata-context-rtl").css("direction","rtl"),c.element.find("ul").hide().end()})})}(a),a.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1},a.jstree.plugins.dnd=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",a.proxy(function(b){if(this.settings.dnd.large_drag_target&&a(b.target).closest(".jstree-node")[0]!==b.currentTarget)return!0;if("touchstart"===b.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var c=this.get_node(b.target),d=this.is_selected(c)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,e=d>1?d+" "+this.get_string("nodes"):this.get_text(b.currentTarget);return this.settings.core.force_text&&(e=a.vakata.html.escape(e)),c&&c.id&&c.id!==a.jstree.root&&(1===b.which||"touchstart"===b.type)&&(this.settings.dnd.is_draggable===!0||a.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,d>1?this.get_top_selected(!0):[c],b))?(this.element.trigger("mousedown.jstree"),a.vakata.dnd.start(b,{jstree:!0,origin:this,obj:this.get_node(c,!0),nodes:d>1?this.get_top_selected():[c.id]},'
              '+e+'
              ')):void 0},this))}},a(function(){var b=!1,c=!1,d=!1,e=!1,f=a('
               
              ').hide();a(k).on("dnd_start.vakata.jstree",function(a,c){b=!1,d=!1,c&&c.data&&c.data.jstree&&f.appendTo("body")}).on("dnd_move.vakata.jstree",function(g,h){if(e&&clearTimeout(e),h&&h.data&&h.data.jstree&&(!h.event.target.id||"jstree-marker"!==h.event.target.id)){d=h.event;var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w=a.jstree.reference(h.event.target),x=!1,y=!1,z=!1;if(w&&w._data&&w._data.dnd)if(f.attr("class","jstree-"+w.get_theme()+(w.settings.core.themes.responsive?" jstree-dnd-responsive":"")),h.helper.children().attr("class","jstree-"+w.get_theme()+" jstree-"+w.get_theme()+"-"+w.get_theme_variant()+" "+(w.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(h.event.metaKey||h.event.ctrlKey))?"show":"hide"](),h.event.target!==w.element[0]&&h.event.target!==w.get_container_ul()[0]||0!==w.get_container_ul().children().length){if(x=w.settings.dnd.large_drop_target?a(h.event.target).closest(".jstree-node").children(".jstree-anchor"):a(h.event.target).closest(".jstree-anchor"),x&&x.length&&x.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(y=x.offset(),z=h.event.pageY-y.top,k=x.outerHeight(),n=k/3>z?["b","i","a"]:z>k-k/3?["a","i","b"]:z>k/2?["i","a","b"]:["i","b","a"],a.each(n,function(d,g){switch(g){case"b":i=y.left-6,j=y.top,l=w.get_parent(x),m=x.parent().index();break;case"i":u=w.settings.dnd.inside_pos,v=w.get_node(x.parent()),i=y.left-2,j=y.top+k/2+1,l=v.id,m="first"===u?0:"last"===u?v.children.length:Math.min(u,v.children.length);break;case"a":i=y.left-6,j=y.top+k,l=w.get_parent(x),m=x.parent().index()+1}for(o=!0,p=0,q=h.data.nodes.length;q>p;p++)if(r=h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(h.event.metaKey||h.event.ctrlKey))?"copy_node":"move_node", +s=m,"move_node"===r&&"a"===g&&h.data.origin&&h.data.origin===w&&l===w.get_parent(h.data.nodes[p])&&(t=w.get_node(l),s>a.inArray(h.data.nodes[p],t.children)&&(s-=1)),o=o&&(w&&w.settings&&w.settings.dnd&&w.settings.dnd.check_while_dragging===!1||w.check(r,h.data.origin&&h.data.origin!==w?h.data.origin.get_node(h.data.nodes[p]):h.data.nodes[p],l,s,{dnd:!0,ref:w.get_node(x.parent()),pos:g,origin:h.data.origin,is_multi:h.data.origin&&h.data.origin!==w,is_foreign:!h.data.origin})),!o){w&&w.last_error&&(c=w.last_error());break}return"i"===g&&x.parent().is(".jstree-closed")&&w.settings.dnd.open_timeout&&(e=setTimeout(function(a,b){return function(){a.open_node(b)}}(w,x),w.settings.dnd.open_timeout)),o?(b={ins:w,par:l,pos:"i"!==g||"last"!==u||0!==m||w.is_loaded(v)?m:"last"},f.css({left:i+"px",top:j+"px"}).show(),h.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),c={},n=!0,!1):void 0}),n===!0))return}else{for(o=!0,p=0,q=h.data.nodes.length;q>p&&(o=o&&w.check(h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(h.event.metaKey||h.event.ctrlKey))?"copy_node":"move_node",h.data.origin&&h.data.origin!==w?h.data.origin.get_node(h.data.nodes[p]):h.data.nodes[p],a.jstree.root,"last",{dnd:!0,ref:w.get_node(a.jstree.root),pos:"i",origin:h.data.origin,is_multi:h.data.origin&&h.data.origin!==w,is_foreign:!h.data.origin}),o);p++);if(o)return b={ins:w,par:a.jstree.root,pos:"last"},f.hide(),void h.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok")}b=!1,h.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),f.hide()}}).on("dnd_scroll.vakata.jstree",function(a,c){c&&c.data&&c.data.jstree&&(f.hide(),b=!1,d=!1,c.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(g,h){if(e&&clearTimeout(e),h&&h.data&&h.data.jstree){f.hide().detach();var i,j,k=[];if(b){for(i=0,j=h.data.nodes.length;j>i;i++)k[i]=h.data.origin?h.data.origin.get_node(h.data.nodes[i]):h.data.nodes[i];b.ins[h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(h.event.metaKey||h.event.ctrlKey))?"copy_node":"move_node"](k,b.par,b.pos,!1,!1,!1,h.data.origin)}else i=a(h.event.target).closest(".jstree"),i.length&&c&&c.error&&"check"===c.error&&(i=i.jstree(!0),i&&i.settings.core.error.call(this,c));d=!1,b=!1}}).on("keyup.jstree keydown.jstree",function(b,c){c=a.vakata.dnd._get(),c&&c.data&&c.data.jstree&&(c.helper.find(".jstree-copy").first()[c.data.origin&&(c.data.origin.settings.dnd.always_copy||c.data.origin.settings.dnd.copy&&(b.metaKey||b.ctrlKey))?"show":"hide"](),d&&(d.metaKey=b.metaKey,d.ctrlKey=b.ctrlKey,a.vakata.dnd._trigger("move",d)))})}),function(a){a.vakata.html={div:a("
              "),escape:function(b){return a.vakata.html.div.text(b).html()},strip:function(b){return a.vakata.html.div.empty().append(a.parseHTML(b)).text()}};var b={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};a.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:50},_trigger:function(b,c){var d=a.vakata.dnd._get();d.event=c,a(k).triggerHandler("dnd_"+b+".vakata",d)},_get:function(){return{data:b.data,element:b.element,helper:b.helper}},_clean:function(){b.helper&&b.helper.remove(),b.scroll_i&&(clearInterval(b.scroll_i),b.scroll_i=!1),b={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},a(k).off("mousemove.vakata.jstree touchmove.vakata.jstree",a.vakata.dnd.drag),a(k).off("mouseup.vakata.jstree touchend.vakata.jstree",a.vakata.dnd.stop)},_scroll:function(c){if(!b.scroll_e||!b.scroll_l&&!b.scroll_t)return b.scroll_i&&(clearInterval(b.scroll_i),b.scroll_i=!1),!1;if(!b.scroll_i)return b.scroll_i=setInterval(a.vakata.dnd._scroll,100),!1;if(c===!0)return!1;var d=b.scroll_e.scrollTop(),e=b.scroll_e.scrollLeft();b.scroll_e.scrollTop(d+b.scroll_t*a.vakata.dnd.settings.scroll_speed),b.scroll_e.scrollLeft(e+b.scroll_l*a.vakata.dnd.settings.scroll_speed),d===b.scroll_e.scrollTop()&&e===b.scroll_e.scrollLeft()||a.vakata.dnd._trigger("scroll",b.scroll_e)},start:function(c,d,e){"touchstart"===c.type&&c.originalEvent&&c.originalEvent.changedTouches&&c.originalEvent.changedTouches[0]&&(c.pageX=c.originalEvent.changedTouches[0].pageX,c.pageY=c.originalEvent.changedTouches[0].pageY,c.target=k.elementFromPoint(c.originalEvent.changedTouches[0].pageX-window.pageXOffset,c.originalEvent.changedTouches[0].pageY-window.pageYOffset)),b.is_drag&&a.vakata.dnd.stop({});try{c.currentTarget.unselectable="on",c.currentTarget.onselectstart=function(){return!1},c.currentTarget.style&&(c.currentTarget.style.MozUserSelect="none")}catch(f){}return b.init_x=c.pageX,b.init_y=c.pageY,b.data=d,b.is_down=!0,b.element=c.currentTarget,b.target=c.target,b.is_touch="touchstart"===c.type,e!==!1&&(b.helper=a("
              ").html(e).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),a(k).on("mousemove.vakata.jstree touchmove.vakata.jstree",a.vakata.dnd.drag),a(k).on("mouseup.vakata.jstree touchend.vakata.jstree",a.vakata.dnd.stop),!1},drag:function(c){if("touchmove"===c.type&&c.originalEvent&&c.originalEvent.changedTouches&&c.originalEvent.changedTouches[0]&&(c.pageX=c.originalEvent.changedTouches[0].pageX,c.pageY=c.originalEvent.changedTouches[0].pageY,c.target=k.elementFromPoint(c.originalEvent.changedTouches[0].pageX-window.pageXOffset,c.originalEvent.changedTouches[0].pageY-window.pageYOffset)),b.is_down){if(!b.is_drag){if(!(Math.abs(c.pageX-b.init_x)>(b.is_touch?a.vakata.dnd.settings.threshold_touch:a.vakata.dnd.settings.threshold)||Math.abs(c.pageY-b.init_y)>(b.is_touch?a.vakata.dnd.settings.threshold_touch:a.vakata.dnd.settings.threshold)))return;b.helper&&(b.helper.appendTo("body"),b.helper_w=b.helper.outerWidth()),b.is_drag=!0,a.vakata.dnd._trigger("start",c)}var d=!1,e=!1,f=!1,g=!1,h=!1,i=!1,j=!1,l=!1,m=!1,n=!1;return b.scroll_t=0,b.scroll_l=0,b.scroll_e=!1,a(a(c.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(a(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var d=a(this),e=d.offset();return this.scrollHeight>this.offsetHeight&&(e.top+d.height()-c.pageYthis.offsetWidth&&(e.left+d.width()-c.pageXg&&c.pageY-jg&&g-(c.pageY-j)i&&c.pageX-li&&i-(c.pageX-l)f&&(m=f-50),h&&n+b.helper_w>h&&(n=h-(b.helper_w+2)),b.helper.css({left:n+"px",top:m+"px"})),a.vakata.dnd._trigger("move",c),!1}},stop:function(c){if("touchend"===c.type&&c.originalEvent&&c.originalEvent.changedTouches&&c.originalEvent.changedTouches[0]&&(c.pageX=c.originalEvent.changedTouches[0].pageX,c.pageY=c.originalEvent.changedTouches[0].pageY,c.target=k.elementFromPoint(c.originalEvent.changedTouches[0].pageX-window.pageXOffset,c.originalEvent.changedTouches[0].pageY-window.pageYOffset)),b.is_drag)a.vakata.dnd._trigger("stop",c);else if("touchend"===c.type&&c.target===b.target){var d=setTimeout(function(){a(c.target).click()},100);a(c.target).one("click",function(){d&&clearTimeout(d)})}return a.vakata.dnd._clean(),!1}}}(a),a.jstree.defaults.massload=null,a.jstree.plugins.massload=function(b,c){this.init=function(a,b){c.init.call(this,a,b),this._data.massload={}},this._load_nodes=function(b,d,e){var f=this.settings.massload;return e&&!a.isEmptyObject(this._data.massload)?c._load_nodes.call(this,b,d,e):a.isFunction(f)?f.call(this,b,a.proxy(function(a){if(a)for(var f in a)a.hasOwnProperty(f)&&(this._data.massload[f]=a[f]);c._load_nodes.call(this,b,d,e)},this)):"object"==typeof f&&f&&f.url?(f=a.extend(!0,{},f),a.isFunction(f.url)&&(f.url=f.url.call(this,b)),a.isFunction(f.data)&&(f.data=f.data.call(this,b)),a.ajax(f).done(a.proxy(function(a,f,g){if(a)for(var h in a)a.hasOwnProperty(h)&&(this._data.massload[h]=a[h]);c._load_nodes.call(this,b,d,e)},this)).fail(a.proxy(function(a){c._load_nodes.call(this,b,d,e)},this))):c._load_nodes.call(this,b,d,e)},this._load_node=function(b,d){var e=this._data.massload[b.id];return e?this["string"==typeof e?"_append_html_data":"_append_json_data"](b,"string"==typeof e?a(a.parseHTML(e)).filter(function(){return 3!==this.nodeType}):e,function(a){d.call(this,a),delete this._data.massload[b.id]}):c._load_node.call(this,b,d)}},a.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},a.jstree.plugins.search=function(c,d){this.bind=function(){d.bind.call(this),this._data.search.str="",this._data.search.dom=a(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",a.proxy(function(b,c){if(this._data.search.som&&c.res.length){var d,e,f=this._model.data,g=[];for(d=0,e=c.res.length;e>d;d++)f[c.res[d]]&&!f[c.res[d]].state.hidden&&(g.push(c.res[d]),g=g.concat(f[c.res[d]].parents),this._data.search.smc&&(g=g.concat(f[c.res[d]].children_d)));g=a.vakata.array_remove_item(a.vakata.array_unique(g),a.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(g)}},this)).on("clear_search.jstree",a.proxy(function(a,b){this._data.search.som&&b.res.length&&this.show_node(this._data.search.hdn)},this))},this.search=function(c,d,e,f,g,h){if(c===!1||""===a.trim(c.toString()))return this.clear_search();f=this.get_node(f),f=f&&f.id?f.id:null,c=c.toString();var i,j,k=this.settings.search,l=k.ajax?k.ajax:!1,m=this._model.data,n=null,o=[],p=[];if(this._data.search.res.length&&!g&&this.clear_search(),e===b&&(e=k.show_only_matches),h===b&&(h=k.show_only_matches_children),!d&&l!==!1)return a.isFunction(l)?l.call(this,c,a.proxy(function(b){b&&b.d&&(b=b.d),this._load_nodes(a.isArray(b)?a.vakata.array_unique(b):[],function(){this.search(c,!0,e,f,g)},!0)},this),f):(l=a.extend({},l),l.data||(l.data={}),l.data.str=c,f&&(l.data.inside=f),a.ajax(l).fail(a.proxy(function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(l)},this.settings.core.error.call(this,this._data.core.last_error)},this)).done(a.proxy(function(b){b&&b.d&&(b=b.d),this._load_nodes(a.isArray(b)?a.vakata.array_unique(b):[],function(){this.search(c,!0,e,f,g)},!0)},this)));if(g||(this._data.search.str=c,this._data.search.dom=a(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=e,this._data.search.smc=h),n=new a.vakata.search(c,!0,{caseSensitive:k.case_sensitive,fuzzy:k.fuzzy}),a.each(m[f?f:a.jstree.root].children_d,function(a,b){var d=m[b];d.text&&(!k.search_leaves_only||d.state.loaded&&0===d.children.length)&&(k.search_callback&&k.search_callback.call(this,c,d)||!k.search_callback&&n.search(d.text).isMatch)&&(o.push(b),p=p.concat(d.parents))}),o.length){for(p=a.vakata.array_unique(p),i=0,j=p.length;j>i;i++)p[i]!==a.jstree.root&&m[p[i]]&&this.open_node(p[i],null,0)===!0&&this._data.search.opn.push(p[i]);g?(this._data.search.dom=this._data.search.dom.add(a(this.element[0].querySelectorAll("#"+a.map(o,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=a.vakata.array_unique(this._data.search.res.concat(o))):(this._data.search.dom=a(this.element[0].querySelectorAll("#"+a.map(o,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=o),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:c,res:this._data.search.res,show_only_matches:e})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=a(this.element[0].querySelectorAll("#"+a.map(this._data.search.res,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=a()},this.redraw_node=function(b,c,e,f){if(b=d.redraw_node.apply(this,arguments),b&&-1!==a.inArray(b.id,this._data.search.res)){var g,h,i=null;for(g=0,h=b.childNodes.length;h>g;g++)if(b.childNodes[g]&&b.childNodes[g].className&&-1!==b.childNodes[g].className.indexOf("jstree-anchor")){i=b.childNodes[g];break}i&&(i.className+=" jstree-search")}return b}},function(a){a.vakata.search=function(b,c,d){d=d||{},d=a.extend({},a.vakata.search.defaults,d),d.fuzzy!==!1&&(d.fuzzy=!0),b=d.caseSensitive?b:b.toLowerCase();var e,f,g,h,i=d.location,j=d.distance,k=d.threshold,l=b.length;return l>32&&(d.fuzzy=!1),d.fuzzy&&(e=1<c;c++)a[b.charAt(c)]=0;for(c=0;l>c;c++)a[b.charAt(c)]|=1<c;c++){for(j=0,m=v;m>j;)g(c,i+m)<=t?j=m:v=m,m=Math.floor((v-j)/2+j);for(v=m,o=Math.max(1,i-m+1),p=Math.min(i+m,s)+l,q=new Array(p+2),q[p+1]=(1<=o;h--)if(r=f[a.charAt(h-1)],0===c?q[h]=(q[h+1]<<1|1)&r:q[h]=(q[h+1]<<1|1)&r|((n[h+1]|n[h])<<1|1)|n[h+1],q[h]&e&&(w=g(c,h-1),t>=w)){if(t=w,u=h-1,x.push(u),!(u>i))break;o=Math.max(1,2*i-u)}if(g(c+1,i)>t)break;n=q}return{isMatch:u>=0,score:w}},c===!0?{search:h}:h(c)},a.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(a),a.jstree.defaults.sort=function(a,b){return this.get_text(a)>this.get_text(b)?1:-1},a.jstree.plugins.sort=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("model.jstree",a.proxy(function(a,b){this.sort(b.parent,!0)},this)).on("rename_node.jstree create_node.jstree",a.proxy(function(a,b){this.sort(b.parent||b.node.parent,!1),this.redraw_node(b.parent||b.node.parent,!0)},this)).on("move_node.jstree copy_node.jstree",a.proxy(function(a,b){this.sort(b.parent,!1),this.redraw_node(b.parent,!0)},this))},this.sort=function(b,c){var d,e;if(b=this.get_node(b),b&&b.children&&b.children.length&&(b.children.sort(a.proxy(this.settings.sort,this)),c))for(d=0,e=b.children_d.length;e>d;d++)this.sort(b.children_d[d],!1)}};var n=!1;a.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1},a.jstree.plugins.state=function(b,c){this.bind=function(){c.bind.call(this);var b=a.proxy(function(){this.element.on(this.settings.state.events,a.proxy(function(){n&&clearTimeout(n),n=setTimeout(a.proxy(function(){this.save_state()},this),100)},this)),this.trigger("state_ready")},this);this.element.on("ready.jstree",a.proxy(function(a,c){this.element.one("restore_state.jstree",b),this.restore_state()||b()},this))},this.save_state=function(){var b={state:this.get_state(),ttl:this.settings.state.ttl,sec:+new Date};a.vakata.storage.set(this.settings.state.key,JSON.stringify(b))},this.restore_state=function(){var b=a.vakata.storage.get(this.settings.state.key);if(b)try{b=JSON.parse(b)}catch(c){return!1}return b&&b.ttl&&b.sec&&+new Date-b.sec>b.ttl?!1:(b&&b.state&&(b=b.state),b&&a.isFunction(this.settings.state.filter)&&(b=this.settings.state.filter.call(this,b)),b?(this.element.one("set_state.jstree",function(c,d){d.instance.trigger("restore_state",{state:a.extend(!0,{},b)})}),this.set_state(b),!0):!1)},this.clear_state=function(){return a.vakata.storage.del(this.settings.state.key)}},function(a,b){a.vakata.storage={set:function(a,b){return window.localStorage.setItem(a,b)},get:function(a){return window.localStorage.getItem(a)},del:function(a){return window.localStorage.removeItem(a)}}}(a),a.jstree.defaults.types={"default":{}},a.jstree.defaults.types[a.jstree.root]={},a.jstree.plugins.types=function(c,d){this.init=function(c,e){var f,g;if(e&&e.types&&e.types["default"])for(f in e.types)if("default"!==f&&f!==a.jstree.root&&e.types.hasOwnProperty(f))for(g in e.types["default"])e.types["default"].hasOwnProperty(g)&&e.types[f][g]===b&&(e.types[f][g]=e.types["default"][g]);d.init.call(this,c,e),this._model.data[a.jstree.root].type=a.jstree.root},this.refresh=function(b,c){d.refresh.call(this,b,c),this._model.data[a.jstree.root].type=a.jstree.root},this.bind=function(){this.element.on("model.jstree",a.proxy(function(c,d){var e,f,g=this._model.data,h=d.nodes,i=this.settings.types,j="default";for(e=0,f=h.length;f>e;e++)j="default",g[h[e]].original&&g[h[e]].original.type&&i[g[h[e]].original.type]&&(j=g[h[e]].original.type),g[h[e]].data&&g[h[e]].data.jstree&&g[h[e]].data.jstree.type&&i[g[h[e]].data.jstree.type]&&(j=g[h[e]].data.jstree.type),g[h[e]].type=j,g[h[e]].icon===!0&&i[j].icon!==b&&(g[h[e]].icon=i[j].icon);g[a.jstree.root].type=a.jstree.root},this)),d.bind.call(this)},this.get_json=function(b,c,e){var f,g,h=this._model.data,i=c?a.extend(!0,{},c,{no_id:!1}):{},j=d.get_json.call(this,b,i,e);if(j===!1)return!1;if(a.isArray(j))for(f=0,g=j.length;g>f;f++)j[f].type=j[f].id&&h[j[f].id]&&h[j[f].id].type?h[j[f].id].type:"default",c&&c.no_id&&(delete j[f].id,j[f].li_attr&&j[f].li_attr.id&&delete j[f].li_attr.id,j[f].a_attr&&j[f].a_attr.id&&delete j[f].a_attr.id);else j.type=j.id&&h[j.id]&&h[j.id].type?h[j.id].type:"default",c&&c.no_id&&(j=this._delete_ids(j));return j},this._delete_ids=function(b){if(a.isArray(b)){for(var c=0,d=b.length;d>c;c++)b[c]=this._delete_ids(b[c]);return b}return delete b.id,b.li_attr&&b.li_attr.id&&delete b.li_attr.id,b.a_attr&&b.a_attr.id&&delete b.a_attr.id,b.children&&a.isArray(b.children)&&(b.children=this._delete_ids(b.children)),b},this.check=function(c,e,f,g,h){if(d.check.call(this,c,e,f,g,h)===!1)return!1;e=e&&e.id?e:this.get_node(e),f=f&&f.id?f:this.get_node(f);var i,j,k,l,m=e&&e.id?h&&h.origin?h.origin:a.jstree.reference(e.id):null;switch(m=m&&m._model&&m._model.data?m._model.data:null,c){case"create_node":case"move_node":case"copy_node":if("move_node"!==c||-1===a.inArray(e.id,f.children)){if(i=this.get_rules(f),i.max_children!==b&&-1!==i.max_children&&i.max_children===f.children.length)return this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;if(i.valid_children!==b&&-1!==i.valid_children&&-1===a.inArray(e.type||"default",i.valid_children))return this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;if(m&&e.children_d&&e.parents){for(j=0,k=0,l=e.children_d.length;l>k;k++)j=Math.max(j,m[e.children_d[k]].parents.length);j=j-e.parents.length+1}(0>=j||j===b)&&(j=1);do{if(i.max_depth!==b&&-1!==i.max_depth&&i.max_depthf;f++)this.set_type(c[f],d);return!0}return e=this.settings.types,c=this.get_node(c),e[d]&&c?(h=c.type,i=this.get_icon(c),c.type=d,(i===!0||e[h]&&e[h].icon!==b&&i===e[h].icon)&&this.set_icon(c,e[d].icon!==b?e[d].icon:!0),!0):!1}},a.jstree.defaults.unique={case_sensitive:!1,duplicate:function(a,b){return a+" ("+b+")"}},a.jstree.plugins.unique=function(c,d){this.check=function(b,c,e,f,g){if(d.check.call(this,b,c,e,f,g)===!1)return!1;if(c=c&&c.id?c:this.get_node(c),e=e&&e.id?e:this.get_node(e),!e||!e.children)return!0;var h,i,j="rename_node"===b?f:c.text,k=[],l=this.settings.unique.case_sensitive,m=this._model.data;for(h=0,i=e.children.length;i>h;h++)k.push(l?m[e.children[h]].text:m[e.children[h]].text.toLowerCase());switch(l||(j=j.toLowerCase()),b){case"delete_node":return!0;case"rename_node":return h=-1===a.inArray(j,k)||c.text&&c.text[l?"toString":"toLowerCase"]()===j,h||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+j+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),h;case"create_node":return h=-1===a.inArray(j,k),h||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+j+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),h;case"copy_node":return h=-1===a.inArray(j,k),h||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+j+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),h;case"move_node":return h=c.parent===e.id&&(!g||!g.is_multi)||-1===a.inArray(j,k),h||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+j+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),h}return!0},this.create_node=function(c,e,f,g,h){if(!e||e.text===b){if(null===c&&(c=a.jstree.root),c=this.get_node(c),!c)return d.create_node.call(this,c,e,f,g,h);if(f=f===b?"last":f,!f.toString().match(/^(before|after)$/)&&!h&&!this.is_loaded(c))return d.create_node.call(this,c,e,f,g,h);e||(e={});var i,j,k,l,m,n=this._model.data,o=this.settings.unique.case_sensitive,p=this.settings.unique.duplicate;for(j=i=this.get_string("New node"),k=[],l=0,m=c.children.length;m>l;l++)k.push(o?n[c.children[l]].text:n[c.children[l]].text.toLowerCase());for(l=1;-1!==a.inArray(o?j:j.toLowerCase(),k);)j=p.call(this,i,++l).toString();e.text=j}return d.create_node.call(this,c,e,f,g,h)}};var o=k.createElement("DIV");if(o.setAttribute("unselectable","on"),o.setAttribute("role","presentation"),o.className="jstree-wholerow",o.innerHTML=" ",a.jstree.plugins.wholerow=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("ready.jstree set_state.jstree",a.proxy(function(){this.hide_dots()},this)).on("init.jstree loading.jstree ready.jstree",a.proxy(function(){this.get_container_ul().addClass("jstree-wholerow-ul")},this)).on("deselect_all.jstree",a.proxy(function(a,b){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")},this)).on("changed.jstree",a.proxy(function(a,b){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var c,d,e=!1;for(c=0,d=b.selected.length;d>c;c++)e=this.get_node(b.selected[c],!0),e&&e.length&&e.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("open_node.jstree",a.proxy(function(a,b){this.get_node(b.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("hover_node.jstree dehover_node.jstree",a.proxy(function(a,b){"hover_node"===a.type&&this.is_disabled(b.node)||this.get_node(b.node,!0).children(".jstree-wholerow")["hover_node"===a.type?"addClass":"removeClass"]("jstree-wholerow-hovered")},this)).on("contextmenu.jstree",".jstree-wholerow",a.proxy(function(b){b.preventDefault();var c=a.Event("contextmenu",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey,pageX:b.pageX,pageY:b.pageY});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c)},this)).on("click.jstree",".jstree-wholerow",function(b){b.stopImmediatePropagation();var c=a.Event("click",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).focus()}).on("click.jstree",".jstree-leaf > .jstree-ocl",a.proxy(function(b){b.stopImmediatePropagation();var c=a.Event("click",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).focus()},this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",a.proxy(function(a){return a.stopImmediatePropagation(),this.is_disabled(a.currentTarget)||this.hover_node(a.currentTarget),!1},this)).on("mouseleave.jstree",".jstree-node",a.proxy(function(a){this.dehover_node(a.currentTarget)},this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),c.teardown.call(this)},this.redraw_node=function(b,d,e,f){if(b=c.redraw_node.apply(this,arguments)){var g=o.cloneNode(!0);-1!==a.inArray(b.id,this._data.core.selected)&&(g.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===b.id&&(g.className+=" jstree-wholerow-hovered"),b.insertBefore(g,b.childNodes[0])}return b}},k.registerElement&&Object&&Object.create){var p=Object.create(HTMLElement.prototype);p.createdCallback=function(){var b,c={core:{},plugins:[]};for(b in a.jstree.plugins)a.jstree.plugins.hasOwnProperty(b)&&this.attributes[b]&&(c.plugins.push(b),this.getAttribute(b)&&JSON.parse(this.getAttribute(b))&&(c[b]=JSON.parse(this.getAttribute(b))));for(b in a.jstree.defaults.core)a.jstree.defaults.core.hasOwnProperty(b)&&this.attributes[b]&&(c.core[b]=JSON.parse(this.getAttribute(b))||this.getAttribute(b));a(this).jstree(c)};try{k.registerElement("vakata-jstree",{prototype:p})}catch(q){}}}}),function(a){"use strict";function b(){var b=1,c=this;c.nodesFingerprint=function(a){return a.__uiNodeId||(a.__uiNodeId=b++),""+a.__uiNodeId+(a.id||"")+(a.text||"")+(a.type||"")},c.changeWatcher=function(b,c){var d,e=function(){var d,e,f=[];if(b)for(var h=a.isFunction(b)?b():b,i=0,j=h.length;j>i;i++)e=h[i],d=c(e),g[d]=e,f.push(d);return f},f=function(a,b){var c,d,e=[],f={};for(c=0,d=b.length;d>c;c++)f[b[c]]=!0;for(c=0,d=a.length;d>c;c++)f[a[c]]||e.push(a[c]);return e},g={},h=function(a,b){var e,h,i,j,k={},l=f(b,a);for(e=0,h=l.length;h>e;e++){var m=l[e];i=g[m],delete g[m];var n=c(i);n===m?d.onRemoved(i):(k[n]=m,d.onChanged(i))}var o=f(a,b);for(e=0,h=o.length;h>e;e++)j=o[e],i=g[j],k[j]||d.onAdded(i)};return d={subscribe:function(a,b){a.$watch(e,function(a,c){b&&b(a,c)===!1||h(a,c)},!0)},onAdded:a.noop,onChanged:a.noop,onRemoved:a.noop}}}function c(){return{restrict:"A",scope:{treeData:"=ngModel",treeEventsObj:"=?treeEventsObj",shouldApply:"&"},controller:"jsTreeCtrl",link:function(b,c,d,e){function f(b,c,d){if(d.treeEvents){for(var e=d.treeEvents.split(";"),f=0;f0){var g=e[f].split(":")[0],h=g+".jstree",i=e[f].split(":")[1];b.tree.on(h,b.$parent.$eval(i))}}else a.isObject(b.treeEventsObj)&&a.forEach(b.treeEventsObj,function(a,c){var d=c+".jstree";b.tree.on(d,a)})}function g(){var c=d.jsTree?b.$parent.$eval(d.jsTree):{};h={},a.copy(c,h);var e=JSON.stringify(h);return h.core?h.core.data=b.treeData:h.core={data:b.treeData},e}var h=null,i=e.changeWatcher(b.treeData,e.nodesFingerprint),j=!1;b.destroy=function(){if(d.tree)if(-1!==d.tree.indexOf(".")){for(var a=d.tree.split("."),e=a.pop(),f=b.$parent,g=0;gi;i++)e+=String.fromCharCode(f[i]);c.push(e)}else if("Blob"===b(a)||"File"===b(a)){if(!g)throw new h("NOT_READABLE_ERR");var k=new g;c.push(k.readAsBinaryString(a))}else a instanceof d?"base64"===a.encoding&&p?c.push(p(a.data)):"URI"===a.encoding?c.push(decodeURIComponent(a.data)):"raw"===a.encoding&&c.push(a.data):("string"!=typeof a&&(a+=""),c.push(unescape(encodeURIComponent(a))))},e.getBlob=function(a){return arguments.length||(a=null),new d(this.data.join(""),a,"raw")},e.toString=function(){return"[object BlobBuilder]"},f.slice=function(a,b,c){var e=arguments.length;return 3>e&&(c=null),new d(this.data.slice(a,e>1?b:this.data.length),c,this.encoding)},f.toString=function(){return"[object Blob]"},f.close=function(){this.size=0,delete this.data},c}(a);a.Blob=function(a,b){var d=b?b.type||"":"",e=new c; +if(a)for(var f=0,g=a.length;g>f;f++)Uint8Array&&a[f]instanceof Uint8Array?e.append(a[f].buffer):e.append(a[f]);var h=e.getBlob(d);return!h.slice&&h.webkitSlice&&(h.slice=h.webkitSlice),h};var d=Object.getPrototypeOf||function(a){return a.__proto__};a.Blob.prototype=d(new a.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this);var saveAs=saveAs||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},p=function(b,i){b=o(b);var l,p,q,r=this,s=b.type,t=!1,u=function(){n(r,"writestart progress write writeend".split(" "))},v=function(){if(!t&&l||(l=c().createObjectURL(b)),p)p.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}r.readyState=r.DONE,u(),m(l)},w=function(a){return function(){return r.readyState!==r.DONE?a.apply(this,arguments):void 0}},x={create:!0,exclusive:!1};return r.readyState=r.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),r.readyState=r.DONE,u(),void m(l)):(a.chrome&&s&&s!==j&&(q=b.slice||b.webkitSlice,b=q.call(b,0,b.size,j),t=!0),g&&"download"!==i&&(i+=".download"),(s===j||g)&&(p=a),h?(k+=b.size,void h(a.TEMPORARY,k,w(function(a){a.root.getDirectory("saved",x,w(function(a){var c=function(){a.getFile(i,x,w(function(a){a.createWriter(w(function(c){c.onwriteend=function(b){p.location.href=a.toURL(),r.readyState=r.DONE,n(r,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&v()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=r["on"+a]}),c.write(b),r.abort=function(){c.abort(),r.readyState=r.DONE},r.readyState=r.WRITING}),v)}),v)};a.getFile(i,{create:!1},w(function(a){a.remove(),c()}),w(function(a){a.code===a.NOT_FOUND_ERR?c():v()}))}),v)}),v)):void v())},q=p.prototype,r=function(a,b){return new p(a,b)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b){return navigator.msSaveOrOpenBlob(o(a),b)}:(q.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},q.readyState=q.INIT=0,q.WRITING=1,q.DONE=2,q.error=q.onwritestart=q.onprogress=q.onwrite=q.onabort=q.onerror=q.onwriteend=null,r)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs}),function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gi;i++)e+=String.fromCharCode(f[i]);c.push(e)}else if("Blob"===b(a)||"File"===b(a)){if(!g)throw new h("NOT_READABLE_ERR");var k=new g;c.push(k.readAsBinaryString(a))}else a instanceof d?"base64"===a.encoding&&p?c.push(p(a.data)):"URI"===a.encoding?c.push(decodeURIComponent(a.data)):"raw"===a.encoding&&c.push(a.data):("string"!=typeof a&&(a+=""),c.push(unescape(encodeURIComponent(a))))},e.getBlob=function(a){return arguments.length||(a=null),new d(this.data.join(""),a,"raw")},e.toString=function(){return"[object BlobBuilder]"},f.slice=function(a,b,c){var e=arguments.length;return 3>e&&(c=null),new d(this.data.slice(a,e>1?b:this.data.length),c,this.encoding)},f.toString=function(){return"[object Blob]"},f.close=function(){this.size=0,delete this.data},c}(a);a.Blob=function(a,b){var d=b?b.type||"":"",e=new c;if(a)for(var f=0,g=a.length;g>f;f++)Uint8Array&&a[f]instanceof Uint8Array?e.append(a[f].buffer):e.append(a[f]);var h=e.getBlob(d);return!h.slice&&h.webkitSlice&&(h.slice=h.webkitSlice),h};var d=Object.getPrototypeOf||function(a){return a.__proto__};a.Blob.prototype=d(new a.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this)},{}],2:[function(a,b,c){var d=d||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(a){var b=new MouseEvent("click");a.dispatchEvent(b)},g=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),h=a.webkitRequestFileSystem,i=a.requestFileSystem||h||a.mozRequestFileSystem,j=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},k="application/octet-stream",l=0,m=500,n=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,m)},o=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){j(f)}}},p=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},q=function(b,j,m){m||(b=p(b));var q,r,s,t=this,u=b.type,v=!1,w=function(){o(t,"writestart progress write writeend".split(" "))},x=function(){if(r&&g&&"undefined"!=typeof FileReader){var d=new FileReader;return d.onloadend=function(){var a=d.result;r.location.href="data:attachment/file"+a.slice(a.search(/[,;]/)),t.readyState=t.DONE,w()},d.readAsDataURL(b),void(t.readyState=t.INIT)}if(!v&&q||(q=c().createObjectURL(b)),r)r.location.href=q;else{var e=a.open(q,"_blank");void 0==e&&g&&(a.location.href=q)}t.readyState=t.DONE,w(),n(q)},y=function(a){return function(){return t.readyState!==t.DONE?a.apply(this,arguments):void 0}},z={create:!0,exclusive:!1};return t.readyState=t.INIT,j||(j="download"),e?(q=c().createObjectURL(b),void setTimeout(function(){d.href=q,d.download=j,f(d),w(),n(q),t.readyState=t.DONE})):(a.chrome&&u&&u!==k&&(s=b.slice||b.webkitSlice,b=s.call(b,0,b.size,k),v=!0),h&&"download"!==j&&(j+=".download"),(u===k||h)&&(r=a),i?(l+=b.size,void i(a.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",z,y(function(a){var c=function(){a.getFile(j,z,y(function(a){a.createWriter(y(function(c){c.onwriteend=function(b){r.location.href=a.toURL(),t.readyState=t.DONE,o(t,"writeend",b),n(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&x()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=t["on"+a]}),c.write(b),t.abort=function(){c.abort(),t.readyState=t.DONE},t.readyState=t.WRITING}),x)}),x)};a.getFile(j,{create:!1},y(function(a){a.remove(),c()}),y(function(a){a.code===a.NOT_FOUND_ERR?c():x()}))}),x)}),x)):void x())},r=q.prototype,s=function(a,b,c){return new q(a,b,c)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b,c){return c||(a=p(a)),navigator.msSaveOrOpenBlob(a,b||"download")}:(r.abort=function(){var a=this;a.readyState=a.DONE,o(a,"abort")},r.readyState=r.INIT=0,r.WRITING=1,r.DONE=2,r.error=r.onwritestart=r.onprogress=r.onwrite=r.onabort=r.onerror=r.onwriteend=null,s)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof b&&b.exports?b.exports.saveAs=d:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define([],function(){return d})},{}],3:[function(a,b,c){"use strict";b.exports="ngFileSaver",angular.module("ngFileSaver",[]).factory("FileSaver",["Blob","SaveAs","FileSaverUtils",a("./angular-file-saver.service")]).factory("FileSaverUtils",[a("./utils/utils.service.js")]).factory("Blob",["$window",a("./dependencies/blob-bundle.service.js")]).factory("SaveAs",[a("./dependencies/file-saver-bundle.service.js")])},{"./angular-file-saver.service":4,"./dependencies/blob-bundle.service.js":5,"./dependencies/file-saver-bundle.service.js":6,"./utils/utils.service.js":7}],4:[function(a,b,c){"use strict";b.exports=function(a,b,c){function d(a,d,e){try{b(a,d,e)}catch(f){c.handleErrors(f.message)}}return{saveAs:function(a,b,e){return c.isBlobInstance(a)||c.handleErrors("Data argument should be a blob instance"),c.isString(b)||c.handleErrors("Filename argument should be a string"),d(a,b,e)}}}},{}],5:[function(a,b,c){"use strict";a("Blob.js"),b.exports=function(a){return a.Blob}},{"Blob.js":1}],6:[function(a,b,c){"use strict";b.exports=function(){return a("FileSaver.js").saveAs||function(){}}},{"FileSaver.js":2}],7:[function(a,b,c){"use strict";b.exports=function(){return{handleErrors:function(a){throw new Error(a)},isString:function(a){return"string"==typeof a||a instanceof String},isUndefined:function(a){return"undefined"==typeof a},isBlobInstance:function(a){return a instanceof Blob}}}},{}]},{},[3]),function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return Ba.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function e(a){va.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function f(a,b){var c=!0;return o(function(){return c&&(e(a),c=!1),b.apply(this,arguments)},b)}function g(a,b){sb[a]||(e(b),sb[a]=!0)}function h(a,b){return function(c){return r(a.call(this,c),b)}}function i(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function j(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function k(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function l(){}function m(a,b){b!==!1&&H(a),p(this,a),this._d=new Date(+a._d),ub===!1&&(ub=!0,va.updateOffset(this),ub=!1)}function n(a){var b=A(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=va.localeData(),this._bubble()}function o(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function p(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Ka.length>0)for(c in Ka)d=Ka[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function q(a){return 0>a?Math.ceil(a):Math.floor(a)}function r(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.lengthd;d++)(c&&a[d]!==b[d]||!c&&C(a[d])!==C(b[d]))&&g++;return g+f}function z(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=lb[a]||mb[b]||b}return a}function A(a){var b,d,e={};for(d in a)c(a,d)&&(b=z(d),b&&(e[b]=a[d]));return e}function B(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}va[b]=function(e,f){var g,h,i=va._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=va().utc().set(d,a);return i.call(va._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function C(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function D(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function E(a,b,c){return ja(va([a,11,31+b-c]),b,c).week}function F(a){return G(a)?366:365}function G(a){return a%4===0&&a%100!==0||a%400===0}function H(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[Da]<0||a._a[Da]>11?Da:a._a[Ea]<1||a._a[Ea]>D(a._a[Ca],a._a[Da])?Ea:a._a[Fa]<0||a._a[Fa]>24||24===a._a[Fa]&&(0!==a._a[Ga]||0!==a._a[Ha]||0!==a._a[Ia])?Fa:a._a[Ga]<0||a._a[Ga]>59?Ga:a._a[Ha]<0||a._a[Ha]>59?Ha:a._a[Ia]<0||a._a[Ia]>999?Ia:-1,a._pf._overflowDayOfYear&&(Ca>b||b>Ea)&&(b=Ea),a._pf.overflow=b)}function I(b){return null==b._isValid&&(b._isValid=!isNaN(b._d.getTime())&&b._pf.overflow<0&&!b._pf.empty&&!b._pf.invalidMonth&&!b._pf.nullInput&&!b._pf.invalidFormat&&!b._pf.userInvalidated,b._strict&&(b._isValid=b._isValid&&0===b._pf.charsLeftOver&&0===b._pf.unusedTokens.length&&b._pf.bigHour===a)),b._isValid}function J(a){return a?a.toLowerCase().replace("_","-"):a}function K(a){for(var b,c,d,e,f=0;f0;){if(d=L(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&y(e,c,!0)>=b-1)break;b--}f++}return null}function L(a){var b=null;if(!Ja[a]&&La)try{b=va.locale(),require("./locale/"+a),va.locale(b)}catch(c){}return Ja[a]}function M(a,b){var c,d;return b._isUTC?(c=b.clone(),d=(va.isMoment(a)||x(a)?+a:+va(a))-+c,c._d.setTime(+c._d+d),va.updateOffset(c,!1),c):va(a).local()}function N(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function O(a){var b,c,d=a.match(Pa);for(b=0,c=d.length;c>b;b++)rb[d[b]]?d[b]=rb[d[b]]:d[b]=N(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function P(a,b){return a.isValid()?(b=Q(b,a.localeData()),nb[b]||(nb[b]=O(b)),nb[b](a)):a.localeData().invalidDate()}function Q(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Qa.lastIndex=0;d>=0&&Qa.test(a);)a=a.replace(Qa,c),Qa.lastIndex=0,d-=1;return a}function R(a,b){var c,d=b._strict;switch(a){case"Q":return _a;case"DDDD":return bb;case"YYYY":case"GGGG":case"gggg":return d?cb:Ta;case"Y":case"G":case"g":return eb;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?db:Ua;case"S":if(d)return _a;case"SS":if(d)return ab;case"SSS":if(d)return bb;case"DDD":return Sa;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Wa;case"a":case"A":return b._locale._meridiemParse;case"x":return Za;case"X":return $a;case"Z":case"ZZ":return Xa;case"T":return Ya;case"SSSS":return Va;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?ab:Ra;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Ra;case"Do":return d?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return c=new RegExp($(Z(a.replace("\\","")),"i"))}}function S(a){a=a||"";var b=a.match(Xa)||[],c=b[b.length-1]||[],d=(c+"").match(jb)||["-",0,0],e=+(60*d[1])+C(d[2]);return"+"===d[0]?e:-e}function T(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[Da]=3*(C(b)-1));break;case"M":case"MM":null!=b&&(e[Da]=C(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b,a,c._strict),null!=d?e[Da]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Ea]=C(b));break;case"Do":null!=b&&(e[Ea]=C(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=C(b));break;case"YY":e[Ca]=va.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Ca]=C(b);break;case"a":case"A":c._meridiem=b;break;case"h":case"hh":c._pf.bigHour=!0;case"H":case"HH":e[Fa]=C(b);break;case"m":case"mm":e[Ga]=C(b);break;case"s":case"ss":e[Ha]=C(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Ia]=C(1e3*("0."+b));break;case"x":c._d=new Date(C(b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=S(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=C(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=va.parseTwoDigitYear(b)}}function U(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[Ca],ja(va(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[Ca],ja(va(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=ka(d,e,f,h,g),a._a[Ca]=i.year,a._dayOfYear=i.dayOfYear}function V(a){var c,d,e,f,g=[];if(!a._d){for(e=X(a),a._w&&null==a._a[Ea]&&null==a._a[Da]&&U(a),a._dayOfYear&&(f=b(a._a[Ca],e[Ca]),a._dayOfYear>F(f)&&(a._pf._overflowDayOfYear=!0),d=fa(f,0,a._dayOfYear),a._a[Da]=d.getUTCMonth(),a._a[Ea]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Fa]&&0===a._a[Ga]&&0===a._a[Ha]&&0===a._a[Ia]&&(a._nextDay=!0,a._a[Fa]=0),a._d=(a._useUTC?fa:ea).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[Fa]=24)}}function W(a){var b;a._d||(b=A(a._i),a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],V(a))}function X(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function Y(b){if(b._f===va.ISO_8601)return void aa(b);b._a=[],b._pf.empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=Q(b._f,b._locale).match(Pa)||[],c=0;c0&&b._pf.unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),rb[f]?(d?b._pf.empty=!1:b._pf.unusedTokens.push(f),T(f,d,b)):b._strict&&!d&&b._pf.unusedTokens.push(f);b._pf.charsLeftOver=i-j,h.length>0&&b._pf.unusedInput.push(h),b._pf.bigHour===!0&&b._a[Fa]<=12&&(b._pf.bigHour=a),b._a[Fa]=k(b._locale,b._a[Fa],b._meridiem),V(b),H(b)}function Z(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function $(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function _(a){var b,c,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(NaN));for(f=0;fg)&&(e=g,c=b));o(a,c||b)}function aa(a){var b,c,d=a._i,e=fb.exec(d);if(e){for(a._pf.iso=!0,b=0,c=hb.length;c>b;b++)if(hb[b][1].exec(d)){a._f=hb[b][0]+(e[6]||" ");break}for(b=0,c=ib.length;c>b;b++)if(ib[b][1].exec(d)){a._f+=ib[b][0];break}d.match(Xa)&&(a._f+="Z"),Y(a)}else a._isValid=!1}function ba(a){aa(a),a._isValid===!1&&(delete a._isValid,va.createFromInputFallback(a))}function ca(a,b){var c,d=[];for(c=0;ca&&h.setFullYear(a),h}function fa(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function ga(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function ha(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function ia(a,b,c){var d=va.duration(a).abs(),e=Aa(d.as("s")),f=Aa(d.as("m")),g=Aa(d.as("h")),h=Aa(d.as("d")),i=Aa(d.as("M")),j=Aa(d.as("y")),k=e0,k[4]=c,ha.apply({},k)}function ja(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=va(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ka(a,b,c,d,e){var f,g,h=fa(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:F(a-1)+g}}function la(b){var c,d=b._i,e=b._f;return b._locale=b._locale||va.localeData(b._l),null===d||e===a&&""===d?va.invalid({nullInput:!0}):("string"==typeof d&&(b._i=d=b._locale.preparse(d)),va.isMoment(d)?new m(d,!0):(e?w(e)?_(b):Y(b):da(b),c=new m(b),c._nextDay&&(c.add(1,"d"),c._nextDay=a),c))}function ma(a,b){var c,d;if(1===b.length&&w(b[0])&&(b=b[0]),!b.length)return va();for(c=b[0],d=1;d=0?"+":"-";return b+r(Math.abs(a),6)},gg:function(){return r(this.weekYear()%100,2)},gggg:function(){return r(this.weekYear(),4)},ggggg:function(){return r(this.weekYear(),5)},GG:function(){return r(this.isoWeekYear()%100,2)},GGGG:function(){return r(this.isoWeekYear(),4)},GGGGG:function(){return r(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return C(this.milliseconds()/100)},SS:function(){return r(C(this.milliseconds()/10),2)},SSS:function(){return r(this.milliseconds(),3)},SSSS:function(){return r(this.milliseconds(),3)},Z:function(){var a=this.utcOffset(),b="+";return 0>a&&(a=-a,b="-"),b+r(C(a/60),2)+":"+r(C(a)%60,2)},ZZ:function(){var a=this.utcOffset(),b="+";return 0>a&&(a=-a,b="-"),b+r(C(a/60),2)+r(C(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},sb={},tb=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],ub=!1;pb.length;)xa=pb.pop(),rb[xa+"o"]=i(rb[xa],xa);for(;qb.length;)xa=qb.pop(),rb[xa+xa]=h(rb[xa],2);rb.DDDD=h(rb.DDD,3),o(l.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=va.utc([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=va([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.apply(b,[c]):d},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(a){return a}, +postformat:function(a){return a},week:function(a){return ja(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),va=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),la(g)},va.suppressDeprecationWarnings=!1,va.createFromInputFallback=f("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),va.min=function(){var a=[].slice.call(arguments,0);return ma("isBefore",a)},va.max=function(){var a=[].slice.call(arguments,0);return ma("isAfter",a)},va.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),la(g).utc()},va.unix=function(a){return va(1e3*a)},va.duration=function(a,b){var d,e,f,g,h=a,i=null;return va.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=Na.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:C(i[Ea])*d,h:C(i[Fa])*d,m:C(i[Ga])*d,s:C(i[Ha])*d,ms:C(i[Ia])*d}):(i=Oa.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):null==h?h={}:"object"==typeof h&&("from"in h||"to"in h)&&(g=t(va(h.from),va(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new n(h),va.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},va.version=ya,va.defaultFormat=gb,va.ISO_8601=function(){},va.momentProperties=Ka,va.updateOffset=function(){},va.relativeTimeThreshold=function(b,c){return ob[b]===a?!1:c===a?ob[b]:(ob[b]=c,!0)},va.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return va.locale(a,b)}),va.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?va.defineLocale(a,b):va.localeData(a),c&&(va.duration._locale=va._locale=c)),va._locale._abbr},va.defineLocale=function(a,b){return null!==b?(b.abbr=a,Ja[a]||(Ja[a]=new l),Ja[a].set(b),va.locale(a),Ja[a]):(delete Ja[a],null)},va.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return va.localeData(a)}),va.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return va._locale;if(!w(a)){if(b=L(a))return b;a=[a]}return K(a)},va.isMoment=function(a){return a instanceof m||null!=a&&c(a,"_isAMomentObject")},va.isDuration=function(a){return a instanceof n};for(xa=tb.length-1;xa>=0;--xa)B(tb[xa]);va.normalizeUnits=function(a){return z(a)},va.invalid=function(a){var b=va.utc(NaN);return null!=a?o(b._pf,a):b._pf.userInvalidated=!0,b},va.parseZone=function(){return va.apply(null,arguments).parseZone()},va.parseTwoDigitYear=function(a){return C(a)+(C(a)>68?1900:2e3)},va.isDate=x,o(va.fn=m.prototype,{clone:function(){return va(this)},valueOf:function(){return+this._d-6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=va(this).utc();return 00:!1},parsingFlags:function(){return o({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.utcOffset(0,a)},local:function(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(a){var b=P(this,a||va.defaultFormat);return this.localeData().postformat(b)},add:u(1,"add"),subtract:u(-1,"subtract"),diff:function(a,b,c){var d,e,f=M(a,this),g=6e4*(f.utcOffset()-this.utcOffset());return b=z(b),"year"===b||"month"===b||"quarter"===b?(e=j(this,f),"quarter"===b?e/=3:"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:q(e)},from:function(a,b){return va.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(va(),a)},calendar:function(a){var b=a||va(),c=M(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,va(b)))},isLeapYear:function(){return G(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=ga(a,this.localeData()),this.add(a-b,"d")):b},month:qa("Month",!0),startOf:function(a){switch(a=z(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(b){return b=z(b),b===a||"millisecond"===b?this:this.startOf(b).add(1,"isoWeek"===b?"week":b).subtract(1,"ms")},isAfter:function(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=va.isMoment(a)?a:va(a),+this>+a):(c=va.isMoment(a)?+a:+va(a),c<+this.clone().startOf(b))},isBefore:function(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=va.isMoment(a)?a:va(a),+a>+this):(c=va.isMoment(a)?+a:+va(a),+this.clone().endOf(b)a?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=va.apply(null,arguments),a>this?this:a}),zone:f("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}),utcOffset:function(a,b){var c,d=this._offset||0;return null!=a?("string"==typeof a&&(a=S(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateUtcOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.add(c,"m"),d!==a&&(!b||this._changeInProgress?v(this,va.duration(a-d,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,va.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?d:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(S(this._i)),this},hasAlignedHourOffset:function(a){return a=a?va(a).utcOffset():0,(this.utcOffset()-a)%60===0},daysInMonth:function(){return D(this.year(),this.month())},dayOfYear:function(a){var b=Aa((va(this).startOf("day")-va(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=ja(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=ja(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=ja(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return E(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return E(this.year(),a.dow,a.doy)},get:function(a){return a=z(a),this[a]()},set:function(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else a=z(a),"function"==typeof this[a]&&this[a](b);return this},locale:function(b){var c;return b===a?this._locale._abbr:(c=va.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}}),va.fn.millisecond=va.fn.milliseconds=qa("Milliseconds",!1),va.fn.second=va.fn.seconds=qa("Seconds",!1),va.fn.minute=va.fn.minutes=qa("Minutes",!1),va.fn.hour=va.fn.hours=qa("Hours",!0),va.fn.date=qa("Date",!0),va.fn.dates=f("dates accessor is deprecated. Use date instead.",qa("Date",!0)),va.fn.year=qa("FullYear",!0),va.fn.years=f("years accessor is deprecated. Use year instead.",qa("FullYear",!0)),va.fn.days=va.fn.day,va.fn.months=va.fn.month,va.fn.weeks=va.fn.week,va.fn.isoWeeks=va.fn.isoWeek,va.fn.quarters=va.fn.quarter,va.fn.toJSON=va.fn.toISOString,va.fn.isUTC=va.fn.isUtc,o(va.duration.fn=n.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=q(d/1e3),g.seconds=a%60,b=q(a/60),g.minutes=b%60,c=q(b/60),g.hours=c%24,e+=q(c/24),h=q(ra(e)),e-=q(sa(h)),f+=q(e/30),e%=30,h+=q(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return q(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12)},humanize:function(a){var b=ia(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=va.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=va.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=z(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=z(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*ra(b),"month"===a?c:c/12;switch(b=this._days+Math.round(sa(this._months/12)),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:va.fn.lang,locale:va.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),va.duration.fn.toString=va.duration.fn.toISOString;for(xa in kb)c(kb,xa)&&ta(xa.toLowerCase());va.duration.fn.asMilliseconds=function(){return this.as("ms")},va.duration.fn.asSeconds=function(){return this.as("s")},va.duration.fn.asMinutes=function(){return this.as("m")},va.duration.fn.asHours=function(){return this.as("h")},va.duration.fn.asDays=function(){return this.as("d")},va.duration.fn.asWeeks=function(){return this.as("weeks")},va.duration.fn.asMonths=function(){return this.as("M")},va.duration.fn.asYears=function(){return this.as("y")},va.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===C(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),La?module.exports=va:"function"==typeof define&&define.amd?(define(function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(za.moment=wa),va}),ua(!0)):ua()}.call(this),function(a,b){if("function"==typeof define&&define.amd)define(["moment","jquery","exports"],function(c,d,e){a.daterangepicker=b(a,e,c,d)});else if("undefined"!=typeof exports){var c,d=require("moment");try{c=require("jquery")}catch(e){if(c=window.jQuery,!c)throw new Error("jQuery dependency not found")}b(a,exports,d,c)}else a.daterangepicker=b(a,{},a.moment,a.jQuery||a.Zepto||a.ender||a.$)}(this,function(a,b,c,d){var e=function(a,b,c){this.parentEl="body",this.element=d(a),this.isShowing=!1;var e='';"object"==typeof b&&null!==b||(b={}),this.parentEl=d("object"==typeof b&&b.parentEl&&d(b.parentEl).length?b.parentEl:this.parentEl),this.container=d(e).appendTo(this.parentEl),this.setOptions(b,c);var f=this.container;d.each(this.buttonClasses,function(a,b){f.find("button").addClass(b)}),this.container.find(".daterangepicker_start_input label").html(this.locale.fromLabel),this.container.find(".daterangepicker_end_input label").html(this.locale.toLabel),this.applyClass.length&&this.container.find(".applyBtn").addClass(this.applyClass),this.cancelClass.length&&this.container.find(".cancelBtn").addClass(this.cancelClass),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".calendar").on("click.daterangepicker",".prev",d.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",d.proxy(this.clickNext,this)).on("click.daterangepicker","td.available",d.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",d.proxy(this.hoverDate,this)).on("mouseleave.daterangepicker","td.available",d.proxy(this.updateFormInputs,this)).on("change.daterangepicker","select.yearselect",d.proxy(this.updateMonthYear,this)).on("change.daterangepicker","select.monthselect",d.proxy(this.updateMonthYear,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",d.proxy(this.updateTime,this)),this.container.find(".ranges").on("click.daterangepicker","button.applyBtn",d.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",d.proxy(this.clickCancel,this)).on("click.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",d.proxy(this.showCalendars,this)).on("change.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",d.proxy(this.inputsChanged,this)).on("keydown.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",d.proxy(this.inputsKeydown,this)).on("click.daterangepicker","li",d.proxy(this.clickRange,this)).on("mouseenter.daterangepicker","li",d.proxy(this.enterRange,this)).on("mouseleave.daterangepicker","li",d.proxy(this.updateFormInputs,this)),this.element.is("input")?this.element.on({"click.daterangepicker":d.proxy(this.show,this),"focus.daterangepicker":d.proxy(this.show,this),"keyup.daterangepicker":d.proxy(this.updateFromControl,this)}):this.element.on("click.daterangepicker",d.proxy(this.toggle,this))};e.prototype={constructor:e,setOptions:function(a,b){if(this.startDate=c().startOf("day"),this.endDate=c().endOf("day"),this.timeZone=c().zone(),this.minDate=!1,this.maxDate=!1,this.dateLimit=!1,this.showDropdowns=!1,this.showWeekNumbers=!1,this.timePicker=!1,this.timePickerSeconds=!1,this.timePickerIncrement=30,this.timePicker12Hour=!0,this.singleDatePicker=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.buttonClasses=["btn","btn-small btn-sm"],this.applyClass="btn-success",this.cancelClass="btn-default",this.format="MM/DD/YYYY",this.separator=" - ",this.locale={applyLabel:"Apply",cancelLabel:"Cancel",fromLabel:"From",toLabel:"To",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:c.weekdaysMin(),monthNames:c.monthsShort(),firstDay:c.localeData()._week.dow},this.cb=function(){},"string"==typeof a.format&&(this.format=a.format),"string"==typeof a.separator&&(this.separator=a.separator),"string"==typeof a.startDate&&(this.startDate=c(a.startDate,this.format)),"string"==typeof a.endDate&&(this.endDate=c(a.endDate,this.format)),"string"==typeof a.minDate&&(this.minDate=c(a.minDate,this.format)),"string"==typeof a.maxDate&&(this.maxDate=c(a.maxDate,this.format)),"object"==typeof a.startDate&&(this.startDate=c(a.startDate)),"object"==typeof a.endDate&&(this.endDate=c(a.endDate)),"object"==typeof a.minDate&&(this.minDate=c(a.minDate)),"object"==typeof a.maxDate&&(this.maxDate=c(a.maxDate)),"string"==typeof a.applyClass&&(this.applyClass=a.applyClass),"string"==typeof a.cancelClass&&(this.cancelClass=a.cancelClass),"object"==typeof a.dateLimit&&(this.dateLimit=a.dateLimit),"object"==typeof a.locale&&("object"==typeof a.locale.daysOfWeek&&(this.locale.daysOfWeek=a.locale.daysOfWeek.slice()),"object"==typeof a.locale.monthNames&&(this.locale.monthNames=a.locale.monthNames.slice()),"number"==typeof a.locale.firstDay&&(this.locale.firstDay=a.locale.firstDay),"string"==typeof a.locale.applyLabel&&(this.locale.applyLabel=a.locale.applyLabel),"string"==typeof a.locale.cancelLabel&&(this.locale.cancelLabel=a.locale.cancelLabel),"string"==typeof a.locale.fromLabel&&(this.locale.fromLabel=a.locale.fromLabel),"string"==typeof a.locale.toLabel&&(this.locale.toLabel=a.locale.toLabel),"string"==typeof a.locale.weekLabel&&(this.locale.weekLabel=a.locale.weekLabel),"string"==typeof a.locale.customRangeLabel&&(this.locale.customRangeLabel=a.locale.customRangeLabel)),"string"==typeof a.opens&&(this.opens=a.opens),"boolean"==typeof a.showWeekNumbers&&(this.showWeekNumbers=a.showWeekNumbers),"string"==typeof a.buttonClasses&&(this.buttonClasses=[a.buttonClasses]),"object"==typeof a.buttonClasses&&(this.buttonClasses=a.buttonClasses),"boolean"==typeof a.showDropdowns&&(this.showDropdowns=a.showDropdowns),"boolean"==typeof a.singleDatePicker&&(this.singleDatePicker=a.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof a.timePicker&&(this.timePicker=a.timePicker),"boolean"==typeof a.timePickerSeconds&&(this.timePickerSeconds=a.timePickerSeconds),"number"==typeof a.timePickerIncrement&&(this.timePickerIncrement=a.timePickerIncrement),"boolean"==typeof a.timePicker12Hour&&(this.timePicker12Hour=a.timePicker12Hour),0!=this.locale.firstDay)for(var e=this.locale.firstDay;e>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),e--;var f,g,h;if("undefined"==typeof a.startDate&&"undefined"==typeof a.endDate&&d(this.element).is("input[type=text]")){var i=d(this.element).val(),j=i.split(this.separator);f=g=null,2==j.length?(f=c(j[0],this.format),g=c(j[1],this.format)):this.singleDatePicker&&""!==i&&(f=c(i,this.format),g=c(i,this.format)),null!==f&&null!==g&&(this.startDate=f,this.endDate=g)}if("string"==typeof a.timeZone||"number"==typeof a.timeZone?(this.timeZone=a.timeZone,this.startDate.zone(this.timeZone),this.endDate.zone(this.timeZone)):this.timeZone=c(this.startDate).zone(),"object"==typeof a.ranges){for(h in a.ranges)f="string"==typeof a.ranges[h][0]?c(a.ranges[h][0],this.format):c(a.ranges[h][0]),g="string"==typeof a.ranges[h][1]?c(a.ranges[h][1],this.format):c(a.ranges[h][1]),this.minDate&&f.isBefore(this.minDate)&&(f=c(this.minDate)),this.maxDate&&g.isAfter(this.maxDate)&&(g=c(this.maxDate)),this.minDate&&g.isBefore(this.minDate)||this.maxDate&&f.isAfter(this.maxDate)||(this.ranges[h]=[f,g]);var k="
                ";for(h in this.ranges)k+="
              • "+h+"
              • ";k+="
              • "+this.locale.customRangeLabel+"
              • ",k+="
              ",this.container.find(".ranges ul").remove(),this.container.find(".ranges").prepend(k)}if("function"==typeof b&&(this.cb=b),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day")),this.singleDatePicker?(this.opens="right",this.container.addClass("single"),this.container.find(".calendar.right").show(),this.container.find(".calendar.left").hide(),this.timePicker?this.container.find(".ranges .daterangepicker_start_input, .ranges .daterangepicker_end_input").hide():this.container.find(".ranges").hide(),this.container.find(".calendar.right").hasClass("single")||this.container.find(".calendar.right").addClass("single")):(this.container.removeClass("single"),this.container.find(".calendar.right").removeClass("single"),this.container.find(".ranges").show()),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.oldChosenLabel=this.chosenLabel,this.leftCalendar={month:c([this.startDate.year(),this.startDate.month(),1,this.startDate.hour(),this.startDate.minute(),this.startDate.second()]),calendar:[]},this.rightCalendar={month:c([this.endDate.year(),this.endDate.month(),1,this.endDate.hour(),this.endDate.minute(),this.endDate.second()]),calendar:[]},"right"==this.opens||"center"==this.opens){var l=this.container.find(".calendar.first"),m=this.container.find(".calendar.second");m.hasClass("single")&&(m.removeClass("single"),l.addClass("single")),l.removeClass("left").addClass("right"),m.removeClass("right").addClass("left"),this.singleDatePicker&&(l.show(),m.hide())}"undefined"!=typeof a.ranges||this.singleDatePicker||this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),this.updateView(),this.updateCalendars()},setStartDate:function(a){"string"==typeof a&&(this.startDate=c(a,this.format).zone(this.timeZone)),"object"==typeof a&&(this.startDate=c(a)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.oldStartDate=this.startDate.clone(),this.updateView(),this.updateCalendars(),this.updateInputText()},setEndDate:function(a){"string"==typeof a&&(this.endDate=c(a,this.format).zone(this.timeZone)),"object"==typeof a&&(this.endDate=c(a)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.oldEndDate=this.endDate.clone(),this.updateView(),this.updateCalendars(),this.updateInputText()},updateView:function(){this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute()),this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute()),this.updateFormInputs()},updateFormInputs:function(){this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.format)),this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.format)),this.startDate.isSame(this.endDate)||this.startDate.isBefore(this.endDate)?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled")},updateFromControl:function(){if(this.element.is("input")&&this.element.val().length){var a=this.element.val().split(this.separator),b=null,d=null;2===a.length&&(b=c(a[0],this.format).zone(this.timeZone),d=c(a[1],this.format).zone(this.timeZone)),(this.singleDatePicker||null===b||null===d)&&(b=c(this.element.val(),this.format).zone(this.timeZone),d=b),d.isBefore(b)||(this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.startDate=b,this.endDate=d,this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.notify(),this.updateCalendars())}},notify:function(){this.updateView(),this.cb(this.startDate,this.endDate,this.chosenLabel)},move:function(){var a={top:0,left:0},b=d(window).width();this.parentEl.is("body")||(a={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},b=this.parentEl[0].clientWidth+this.parentEl.offset().left),"left"==this.opens?(this.container.css({top:this.element.offset().top+this.element.outerHeight()-a.top,right:b-this.element.offset().left-this.element.outerWidth(),left:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):"center"==this.opens?(this.container.css({top:this.element.offset().top+this.element.outerHeight()-a.top,left:this.element.offset().left-a.left+this.element.outerWidth()/2-this.container.outerWidth()/2,right:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):(this.container.css({top:this.element.offset().top+this.element.outerHeight()-a.top,left:this.element.offset().left-a.left,right:"auto"}),this.container.offset().left+this.container.outerWidth()>d(window).width()&&this.container.css({left:"auto",right:0}))},toggle:function(a){this.element.hasClass("active")?this.hide():this.show()},show:function(a){this.isShowing||(this.element.addClass("active"),this.container.show(),this.move(),this._outsideClickProxy=d.proxy(function(a){this.outsideClick(a)},this),d(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),this.isShowing=!0,this.element.trigger("show.daterangepicker",this))},outsideClick:function(a){var b=d(a.target);"focusin"==a.type||b.closest(this.element).length||b.closest(this.container).length||b.closest(".calendar-date").length||this.hide()},hide:function(a){this.isShowing&&(d(document).off(".daterangepicker"),this.element.removeClass("active"),this.container.hide(),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.notify(),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.isShowing=!1,this.element.trigger("hide.daterangepicker",this))},enterRange:function(a){var b=a.target.innerHTML;if(b==this.locale.customRangeLabel)this.updateView();else{var c=this.ranges[b];this.container.find("input[name=daterangepicker_start]").val(c[0].format(this.format)),this.container.find("input[name=daterangepicker_end]").val(c[1].format(this.format))}},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},inputsChanged:function(a){var b=d(a.target),e=c(b.val(),this.format);if(e.isValid()){var f,g;"daterangepicker_start"===b.attr("name")?(f=e,g=this.endDate):(f=this.startDate,g=e),this.setCustomDates(f,g)}},inputsKeydown:function(a){13===a.keyCode&&(this.inputsChanged(a),this.notify())},updateInputText:function(){this.element.is("input")&&!this.singleDatePicker?this.element.val(this.startDate.format(this.format)+this.separator+this.endDate.format(this.format)):this.element.is("input")&&this.element.val(this.endDate.format(this.format))},clickRange:function(a){var b=a.target.innerHTML;if(this.chosenLabel=b,b==this.locale.customRangeLabel)this.showCalendars();else{var c=this.ranges[b];this.startDate=c[0],this.endDate=c[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute()),this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute()),this.updateCalendars(),this.updateInputText(),this.hideCalendars(),this.hide(),this.element.trigger("apply.daterangepicker",this)}},clickPrev:function(a){var b=d(a.target).parents(".calendar");b.hasClass("left")?this.leftCalendar.month.subtract(1,"month"):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(a){var b=d(a.target).parents(".calendar");b.hasClass("left")?this.leftCalendar.month.add(1,"month"):this.rightCalendar.month.add(1,"month"),this.updateCalendars()},hoverDate:function(a){var b=d(a.target).attr("data-title"),c=b.substr(1,1),e=b.substr(3,1),f=d(a.target).parents(".calendar");f.hasClass("left")?this.container.find("input[name=daterangepicker_start]").val(this.leftCalendar.calendar[c][e].format(this.format)):this.container.find("input[name=daterangepicker_end]").val(this.rightCalendar.calendar[c][e].format(this.format))},setCustomDates:function(a,b){if(this.chosenLabel=this.locale.customRangeLabel,a.isAfter(b)){var d=this.endDate.diff(this.startDate);b=c(a).add(d,"ms")}this.startDate=a,this.endDate=b,this.updateView(),this.updateCalendars()},clickDate:function(a){var b,e,f=d(a.target).attr("data-title"),g=f.substr(1,1),h=f.substr(3,1),i=d(a.target).parents(".calendar");if(i.hasClass("left")){if(b=this.leftCalendar.calendar[g][h],e=this.endDate,"object"==typeof this.dateLimit){var j=c(b).add(this.dateLimit).startOf("day");e.isAfter(j)&&(e=j)}}else if(b=this.startDate,e=this.rightCalendar.calendar[g][h],"object"==typeof this.dateLimit){var k=c(e).subtract(this.dateLimit).startOf("day");b.isBefore(k)&&(b=k)}this.singleDatePicker&&i.hasClass("left")?e=b.clone():this.singleDatePicker&&i.hasClass("right")&&(b=e.clone()),i.find("td").removeClass("active"),d(a.target).addClass("active"),this.setCustomDates(b,e),this.timePicker||e.endOf("day"),this.singleDatePicker&&!this.timePicker&&this.clickApply()},clickApply:function(a){this.updateInputText(),this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(a){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.chosenLabel=this.oldChosenLabel,this.updateView(),this.updateCalendars(),this.hide(),this.element.trigger("cancel.daterangepicker",this)},updateMonthYear:function(a){var b=d(a.target).closest(".calendar").hasClass("left"),c=b?"left":"right",e=this.container.find(".calendar."+c),f=parseInt(e.find(".monthselect").val(),10),g=e.find(".yearselect").val();this[c+"Calendar"].month.month(f).year(g),this.updateCalendars()},updateTime:function(a){var b=d(a.target).closest(".calendar"),c=b.hasClass("left"),e=parseInt(b.find(".hourselect").val(),10),f=parseInt(b.find(".minuteselect").val(),10),g=0;if(this.timePickerSeconds&&(g=parseInt(b.find(".secondselect").val(),10)), +this.timePicker12Hour){var h=b.find(".ampmselect").val();"PM"===h&&12>e&&(e+=12),"AM"===h&&12===e&&(e=0)}if(c){var i=this.startDate.clone();i.hour(e),i.minute(f),i.second(g),this.startDate=i,this.leftCalendar.month.hour(e).minute(f).second(g),this.singleDatePicker&&(this.endDate=i.clone())}else{var j=this.endDate.clone();j.hour(e),j.minute(f),j.second(g),this.endDate=j,this.singleDatePicker&&(this.startDate=j.clone()),this.rightCalendar.month.hour(e).minute(f).second(g)}this.updateView(),this.updateCalendars()},updateCalendars:function(){this.leftCalendar.calendar=this.buildCalendar(this.leftCalendar.month.month(),this.leftCalendar.month.year(),this.leftCalendar.month.hour(),this.leftCalendar.month.minute(),this.leftCalendar.month.second(),"left"),this.rightCalendar.calendar=this.buildCalendar(this.rightCalendar.month.month(),this.rightCalendar.month.year(),this.rightCalendar.month.hour(),this.rightCalendar.month.minute(),this.rightCalendar.month.second(),"right"),this.container.find(".calendar.left").empty().html(this.renderCalendar(this.leftCalendar.calendar,this.startDate,this.minDate,this.maxDate,"left")),this.container.find(".calendar.right").empty().html(this.renderCalendar(this.rightCalendar.calendar,this.endDate,this.singleDatePicker?this.minDate:this.startDate,this.maxDate,"right")),this.container.find(".ranges li").removeClass("active");var a=!0,b=0;for(var c in this.ranges)this.timePicker?this.startDate.isSame(this.ranges[c][0])&&this.endDate.isSame(this.ranges[c][1])&&(a=!1,this.chosenLabel=this.container.find(".ranges li:eq("+b+")").addClass("active").html()):this.startDate.format("YYYY-MM-DD")==this.ranges[c][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[c][1].format("YYYY-MM-DD")&&(a=!1,this.chosenLabel=this.container.find(".ranges li:eq("+b+")").addClass("active").html()),b++;a&&(this.chosenLabel=this.container.find(".ranges li:last").addClass("active").html(),this.showCalendars())},buildCalendar:function(a,b,d,e,f,g){var h,i=c([b,a]).daysInMonth(),j=c([b,a,1]),k=c([b,a,i]),l=c(j).subtract(1,"month").month(),m=c(j).subtract(1,"month").year(),n=c([m,l]).daysInMonth(),o=j.day(),p=[];for(p.firstDay=j,p.lastDay=k,h=0;6>h;h++)p[h]=[];var q=n-o+this.locale.firstDay+1;q>n&&(q-=7),o==this.locale.firstDay&&(q=n-6);var r,s,t=c([m,l,q,12,e,f]).zone(this.timeZone);for(h=0,r=0,s=0;42>h;h++,r++,t=c(t).add(24,"hour"))h>0&&r%7===0&&(r=0,s++),p[s][r]=t.clone().hour(d),t.hour(12),this.minDate&&p[s][r].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&p[s][r].isBefore(this.minDate)&&"left"==g&&(p[s][r]=this.minDate.clone()),this.maxDate&&p[s][r].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&p[s][r].isAfter(this.maxDate)&&"right"==g&&(p[s][r]=this.maxDate.clone());return p},renderDropdowns:function(a,b,c){for(var d=a.month(),e=a.year(),f=c&&c.year()||e+5,g=b&&b.year()||e-50,h='";for(var l='",h+l},renderCalendar:function(a,b,c,e,f){var g='
              ';g+='',g+="",g+="",this.showWeekNumbers&&(g+=""),g+=!c||c.isBefore(a.firstDay)?'':"";var h=this.locale.monthNames[a[1][1].month()]+a[1][1].format(" YYYY");this.showDropdowns&&(h=this.renderDropdowns(a[1][1],c,e)),g+='",g+=!e||e.isAfter(a.lastDay)?'':"",g+="",g+="",this.showWeekNumbers&&(g+='"),d.each(this.locale.daysOfWeek,function(a,b){g+=""}),g+="",g+="",g+="";for(var i=0;6>i;i++){g+="",this.showWeekNumbers&&(g+='");for(var j=0;7>j;j++){var k="available ";k+=a[i][j].month()==a[1][1].month()?"":"off",c&&a[i][j].isBefore(c,"day")||e&&a[i][j].isAfter(e,"day")?k=" off disabled ":a[i][j].format("YYYY-MM-DD")==b.format("YYYY-MM-DD")?(k+=" active ",a[i][j].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&(k+=" start-date "),a[i][j].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&(k+=" end-date ")):a[i][j]>=this.startDate&&a[i][j]<=this.endDate&&(k+=" in-range ",a[i][j].isSame(this.startDate)&&(k+=" start-date "),a[i][j].isSame(this.endDate)&&(k+=" end-date "));var l="r"+i+"c"+j;g+='"}g+=""}g+="",g+="
              '+h+"
              '+this.locale.weekLabel+""+b+"
              '+a[i][0].week()+"'+a[i][j].date()+"
              ",g+="
              ";var m;if(this.timePicker){g+='
              ',g+=' : ",g+=' ",this.timePickerSeconds){for(g+=': "}if(this.timePicker12Hour){g+='"}g+="
              "}return g},remove:function(){this.container.remove(),this.element.off(".daterangepicker"),this.element.removeData("daterangepicker")}},d.fn.daterangepicker=function(a,b){return this.each(function(){var c=d(this);c.data("daterangepicker")&&c.data("daterangepicker").remove(),c.data("daterangepicker",new e(c,a,b))}),this}}),function(a){"use strict";a.module("ngBootstrap",[]).directive("input",["$compile","$parse","$filter",function(b,c,d){return{restrict:"E",require:"?ngModel",link:function(b,e,f,g){function h(a){return moment.isMoment(a)?a.toDate():a}function i(a){return moment.isMoment(a)?a:moment(a)}function j(a){return d("date")(h(a),l.format.replace(/Y/g,"y").replace(/D/g,"d"))}function k(a){return[j(a.startDate),j(a.endDate)].join(l.separator)}if("daterange"===f.type&&null!==g){var l={};l.format=f.format||"YYYY-MM-DD",l.separator=f.separator||" - ",l.minDate=f.minDate&&moment(f.minDate),l.maxDate=f.maxDate&&moment(f.maxDate),l.dateLimit=f.limit&&moment.duration.apply(this,f.limit.split(" ").map(function(a,b){return 0===b&&parseInt(a,10)||a})),l.ranges=f.ranges&&c(f.ranges)(b),l.locale=f.locale&&c(f.locale)(b),l.opens=f.opens||c(f.opens)(b),f.enabletimepicker&&(l.timePicker=!0,a.extend(l,c(f.enabletimepicker)(b))),g.$render=function(){g.$viewValue&&g.$viewValue.startDate&&e.val(k(g.$viewValue))},b.$watch(function(){return f.ngModel},function(a,c){return b[a]&&b[a].startDate?void(c===a&&(e.data("daterangepicker").startDate=i(b[a].startDate),e.data("daterangepicker").endDate=i(b[a].endDate),e.data("daterangepicker").updateView(),e.data("daterangepicker").updateCalendars(),e.data("daterangepicker").updateInputText())):void g.$setViewValue({startDate:moment().startOf("day"),endDate:moment().startOf("day")})}),e.daterangepicker(l,function(c,d,e){var f=g.$viewValue;a.equals(c,f.startDate)&&a.equals(d,f.endDate)||b.$apply(function(){g.$setViewValue({startDate:moment.isMoment(f.startDate)?c:c.toDate(),endDate:moment.isMoment(f.endDate)?d:d.toDate()}),g.$render()})})}}}}])}(angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/popup.html","uib/template/datepicker/year.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$injector",function(a,b){var c=b.has("$animateCss")?b.get("$animateCss"):null;return{link:function(b,d,e){function f(){d.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),c?c(d,{addClass:"in",easing:"ease",to:{height:d[0].scrollHeight+"px"}}).start()["finally"](g):a.addClass(d,"in",{to:{height:d[0].scrollHeight+"px"}}).then(g)}function g(){d.removeClass("collapsing").addClass("collapse").css({height:"auto"})}function h(){return d.hasClass("collapse")||d.hasClass("in")?(d.css({height:d[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),void(c?c(d,{removeClass:"in",to:{height:"0"}}).start()["finally"](i):a.removeClass(d,"in",{to:{height:"0"}}).then(i))):i()}function i(){d.css({height:"0"}),d.removeClass("collapsing").addClass("collapse")}b.$eval(e.uibCollapse)||d.addClass("in").addClass("collapse").css({height:"auto"}),b.$watch(e.uibCollapse,function(a){a?h():f()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)}}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){a&&(b.find("span").html(""),b.find("span").append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);a&&!angular.isDefined(d.uncheckable)||b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":null)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;s.length;)s.shift()}function g(a){if(angular.isUndefined(p[a].index))return p[a];for(var b=0,c=p.length;c>b;++b)if(p[b].index===a)return p[b]}function h(c,d,g){t||(angular.extend(c,{direction:g,active:!0}),angular.extend(o.currentSlide||{},{direction:g,active:!1}),e.enabled(b)&&!a.$currentTransition&&c.$element&&o.slides.length>1&&(c.$element.data(q,c.direction),o.currentSlide&&o.currentSlide.$element&&o.currentSlide.$element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",c.$element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),s.length)){var d=s.pop(),g=a.indexOfSlide(d),i=g>o.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})),o.currentSlide=c,r=d,k())}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null,f())}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=-1,s=[];o.currentSlide=null;var t=!1;o.addSlide=function(b,c){b.$element=c,p.push(b),1===p.length||b.active?(a.$currentTransition&&(a.$currentTransition=null),o.select(p[p.length-1]),1===p.length&&a.play()):b.active=!1},o.getCurrentIndex=function(){return o.currentSlide&&angular.isDefined(o.currentSlide.index)?+o.currentSlide.index:r},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(g(b),"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(g(b),"prev")},o.removeSlide=function(a){angular.isDefined(a.index)&&p.sort(function(a,b){return+a.index>+b.index});var b=s.indexOf(a);-1!==b&&s.splice(b,1);var c=p.indexOf(a);p.splice(c,1),d(function(){p.length>0&&a.active?c>=p.length?o.select(p[c-1]):o.select(p[c]):r>c&&r--}),0===p.length&&(o.currentSlide=null,f())},o.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b&&b!==o.currentSlide&&!a.$currentTransition?h(b,d,c):b&&b!==o.currentSlide&&a.$currentTransition&&(s.push(b),b.active=!1)},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:p.indexOf(a)},a.isActive=function(a){return o.currentSlide===a},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},a.$on("$destroy",function(){t=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j)}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","orderByFilter",function(a,b,c){function d(a){var b=[],d=a.split(""),e=a.indexOf("'");if(e>-1){var f=!1;a=a.split("");for(var g=e;g-1){a=a.split(""),d[e]="("+c.regex+")",a[e]="$";for(var f=e+1,g=e+c.key.length;g>f;f++)d[f]="",a[f]="$";a=a.join(""),b.push({index:e,apply:c.apply,matcher:c.regex})}}),{regex:new RegExp("^"+d.join("")+"$"),map:c(b,"index")}}function e(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function f(a){return parseInt(a,10)}function g(a,b){return a&&b?k(a,b):a}function h(a,b){return a&&b?k(a,b,!0):a}function i(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function j(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function k(a,b,c){c=c?-1:1;var d=i(b,a.getTimezoneOffset());return j(a,c*(d-a.getTimezoneOffset()))}var l,m,n=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){l=b.id,this.parsers={},m=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a}},{key:"yy",regex:"\\d{2}",apply:function(a){this.year=+a+2e3}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|")},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|")},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=f(c+d),this.minutes+=f(c+e)}},{key:"ww",regex:"[0-4][0-9]|5[0-3]"},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]"},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s")},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|")},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|")},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|")}]},this.init(),this.parse=function(c,f,g){if(!angular.isString(c)||!f)return c;f=b.DATETIME_FORMATS[f]||f,f=f.replace(n,"\\$&"),b.id!==l&&this.init(),this.parsers[f]||(this.parsers[f]=d(f));var h=this.parsers[f],i=h.regex,j=h.map,k=c.match(i),m=!1;if(k&&k.length){var o,p;angular.isDate(g)&&!isNaN(g.getTime())?o={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),o={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(m=!0),s.apply&&s.apply.call(o,k[q])}var t=m?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=m?Date.prototype.setUTCHours:Date.prototype.setHours;return e(o.year,o.month,o.date)&&(!angular.isDate(g)||isNaN(g.getTime())||m?(p=new Date(0),t.call(p,o.year,o.month,o.date),u.call(p,o.hours||0,o.minutes||0,o.seconds||0,o.milliseconds||0)):(p=new Date(g),t.call(p,o.year,o.month,o.date),u.call(p,o.hours,o.minutes,o.seconds,o.milliseconds))),p}},this.toTimezone=g,this.fromTimezone=h,this.timezoneToOffset=i,this.addDateMinutes=j,this.convertTimezoneToLocal=k}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},e={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/};return{getRawNode:function(a){return a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(){if(angular.isUndefined(c)){var b=angular.element('
              ');a.find("body").append(b),c=b[0].offsetWidth-b[0].clientWidth,c=isFinite(c)?c:0,b.remove()}return c},scrollParent:function(c,e){c=this.getRawNode(c);var f=e?d.hidden:d.normal,g=a[0].documentElement,h=b.getComputedStyle(c),i="absolute"===h.position,j=c.parentElement||g;if(j===g||"fixed"===h.position)return g;for(;j.parentElement&&j!==g;){var k=b.getComputedStyle(j);if(i&&"static"!==k.position&&(i=!1),!i&&f.test(k.overflow+k.overflowY+k.overflowX))break;j=j.parentElement}return j},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=e.auto.test(a);return b&&(a=a.replace(e.auto,"")),a=a.split("-"),a[0]=a[0]||"top",e.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",e.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,f){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=f?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(e.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":e.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=!0,f=a.querySelector(".tooltip-inner");if(f||(d=!1,f=a.querySelector(".popover-inner")),f){var g=d?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css({top:"",bottom:"",right:"",left:"",margin:""});var h="border-"+c[0]+"-width",i=b.getComputedStyle(g)[h],j="border-";j+=e.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],j+="-radius";var k=b.getComputedStyle(d?f:a)[j],l={top:"auto",bottom:"auto",left:"auto",right:"auto",margin:0};switch(c[0]){case"top":l.bottom=d?"0":"-"+i;break;case"bottom":l.top=d?"0":"-"+i;break;case"left":l.right=d?"0":"-"+i;break;case"right":l.left=d?"0":"-"+i}l[c[1]]=k,angular.element(g).css(l)}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRows:4,yearColumns:5,minDate:null,maxDate:null,shortcutPropagation:!1,ngModelOptions:{}}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i){var j=this,k={$setViewValue:angular.noop},l={};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle"],function(c){ +j[c]=angular.isDefined(b[c])?d(b[c])(a.$parent):g[c]}),angular.forEach(["showWeeks","startingDay","yearRows","yearColumns","shortcutPropagation"],function(c){j[c]=angular.isDefined(b[c])?a.$parent.$eval(b[c]):g[c]}),angular.forEach(["minDate","maxDate"],function(c){b[c]?a.$parent.$watch(b[c],function(a){j[c]=a?angular.isDate(a)?i.fromTimezone(new Date(a),l.timezone):new Date(f(a,"medium")):null,j.refreshView()}):j[c]=g[c]?i.fromTimezone(new Date(g[c]),l.timezone):null}),angular.forEach(["minMode","maxMode"],function(c){b[c]?a.$parent.$watch(b[c],function(d){j[c]=a[c]=angular.isDefined(d)?d:b[c],("minMode"===c&&j.modes.indexOf(a.datepickerMode)j.modes.indexOf(j[c]))&&(a.datepickerMode=j[c])}):j[c]=a[c]=g[c]||null}),a.datepickerMode=a.datepickerMode||g.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined(b.initDate)?(this.activeDate=i.fromTimezone(a.$parent.$eval(b.initDate),l.timezone)||new Date,a.$parent.$watch(b.initDate,function(a){a&&(k.$isEmpty(k.$modelValue)||k.$invalid)&&(j.activeDate=i.fromTimezone(a,l.timezone),j.refreshView())})):this.activeDate=new Date,a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,j.refreshView()}),a.isActive=function(b){return 0===j.compare(b.date,j.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){k=a,l=a.$options||g.ngModelOptions,k.$modelValue&&(this.activeDate=k.$modelValue),k.$render=function(){j.render()}},this.render=function(){if(k.$viewValue){var a=new Date(k.$viewValue),b=!isNaN(a);b?this.activeDate=i.fromTimezone(a,l.timezone):h||e.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=k.$viewValue?new Date(k.$viewValue):null;b=i.fromTimezone(b,l.timezone),k.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=k.$viewValue?new Date(k.$viewValue):null;d=i.fromTimezone(d,l.timezone);var e={date:b,label:f(b,c.replace(/d!/,"dd")).replace(/M!/,"MM"),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),current:0===this.compare(b,new Date),customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=e),j.activeDate&&0===this.compare(e.date,j.activeDate)&&(a.activeDt=e),e},this.isDisabled=function(c){return a.disabled||this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===j.minMode){var c=k.$viewValue?i.fromTimezone(new Date(k.$viewValue),l.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=i.toTimezone(c,l.timezone),k.$setViewValue(c),k.$render()}else j.activeDate=b,a.datepickerMode=j.modes[j.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=j.activeDate.getFullYear()+a*(j.step.years||0),c=j.activeDate.getMonth()+a*(j.step.months||0);j.activeDate.setFullYear(b,c,1),j.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===j.maxMode&&1===b||a.datepickerMode===j.minMode&&-1===b||(a.datepickerMode=j.modes[j.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var m=function(){j.element[0].focus()};a.$on("uib:datepicker.focus",m),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),j.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(j.isDisabled(j.activeDate))return;a.select(j.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(j.handleKeyDown(c,b),j.refreshView()):a.toggleMode("up"===c?1:-1)}}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).constant("uibDatepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepicker/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0,onOpenFocus:!0,altInputFormats:[]}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function o(b){var c=j.parse(b,t,a.date);if(isNaN(c))for(var d=0;d
              "),a.ngModelOptions=angular.copy(C),a.ngModelOptions.timezone=null,z.attr({"ng-model":"date","ng-model-options":"ngModelOptions","ng-change":"dateSelection(date)","template-url":x}),A=angular.element(z.children()[0]),A.attr("template-url",y),G&&"month"===c.type&&(A.attr("datepicker-mode",'"month"'),A.attr("min-mode","month")),c.datepickerOptions){var l=a.$parent.$eval(c.datepickerOptions);l&&l.initDate&&(a.initDate=j.fromTimezone(l.initDate,C.timezone),A.attr("init-date","initDate"),delete l.initDate),angular.forEach(l,function(a,b){A.attr(n(b),a)})}angular.forEach(["minMode","maxMode"],function(b){c[b]&&(a.$parent.$watch(function(){return c[b]},function(c){a.watchData[b]=c}),A.attr(n(b),"watchData."+b))}),angular.forEach(["datepickerMode","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]),f={get:function(){return d(a.$parent)}};if(A.attr(n(b),"watchData."+b),"datepickerMode"===b){var g=d.assign;f.set=function(b){g(a.$parent,b)}}Object.defineProperty(a.watchData,b,f)}}),angular.forEach(["minDate","maxDate","initDate"],function(b){if(c[b]){var d=e(c[b]);a.$parent.$watch(d,function(c){"minDate"!==b&&"maxDate"!==b||(F[b]=angular.isDate(c)?j.fromTimezone(new Date(c),C.timezone):new Date(i(c,"medium"))),a.watchData[b]=F[b]||j.fromTimezone(new Date(c),C.timezone)}),A.attr(n(b),"watchData."+b)}}),c.dateDisabled&&A.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRows","yearColumns"],function(a){angular.isDefined(c[a])&&A.attr(n(a),c[a])}),c.customClass&&A.attr("custom-class","customClass({ date: date, mode: mode })"),G?B.$formatters.push(function(b){return a.date=j.fromTimezone(b,C.timezone),b}):(B.$$parserName="date",B.$validators.date=q,B.$parsers.unshift(p),B.$formatters.push(function(b){return B.$isEmpty(b)?(a.date=b,b):(a.date=j.fromTimezone(b,C.timezone),t=t.replace(/M!/,"MM").replace(/d!/,"dd"),i(a.date,t))})),B.$viewChangeListeners.push(function(){a.date=o(B.$viewValue)}),b.bind("keydown",s),D=d(z)(a),z.remove(),v?f.find("body").append(D):b.after(D),a.$on("$destroy",function(){a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),D.remove(),b.unbind("keydown",s),f.unbind("click",r)})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,F.minDate)<0||a.watchData.maxDate&&a.compare(b,F.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?i(a.date,t):null;b.val(d),B.$setViewValue(d),u&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&a.$parent.$watch(e(c.ngDisabled),function(b){a.disabled=b}),a.$watch("isOpen",function(c){c?a.disabled?a.isOpen=!1:(a.position=v?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){w&&a.$broadcast("uib:datepicker.focus"),f.bind("click",r)},0,!1)):f.unbind("click",r)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.on("click",d),a.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.off("click",d),a.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b;if(g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var x=angular.element('');n.dropdownMenu.replaceWith(x),n.dropdownMenu=x}f.close(o),n.selectedOption=null}angular.isFunction(r)&&r(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c0&&(b=t.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function l(){if(p&&-1===i()){var a=q;m(p,q,function(){a=null}),p=void 0,q=void 0}}function m(a,c,d,e){function g(){g.done||(g.done=!0,b(a,{event:"leave"}).start().then(function(){a.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(v.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function n(a){if(a.isDefaultPrevented())return a;var b=t.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){v.dismiss(b.key,"escape key press")}));break;case 9:v.loadFocusElementList(b);var c=!1;a.shiftKey?v.isFocusInFirstItem(a)&&(c=v.focusLastFocusableElement()):v.isFocusInLastItem(a)&&(c=v.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p,q,r,s="modal-open",t=h.createNew(),u=g.createNew(),v={NOW_CLOSING_EVENT:"modal.stack.now-closing"},w=0,x="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(i,function(a){q&&(q.index=a)}),c.on("keydown",n),e.$on("$destroy",function(){c.off("keydown",n)}),v.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||s;k(!1),t.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),u.put(h,b);var j=f.appendTo,l=i();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!p&&(q=e.$new(!0),q.modalOptions=f,q.index=l,p=angular.element('
              '),p.attr("backdrop-class",f.backdropClass),f.animation&&p.attr("modal-animation","true"),d(p)(q),a.enter(p,j));var m=angular.element('
              ');m.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:t.length()-1,animate:"animate"}).html(f.content),f.animation&&m.attr("modal-animation","true"),a.enter(m,j).then(function(){d(m)(f.scope),a.addClass(j,h)}),t.top().value.modalDomEl=m,t.top().value.modalOpener=g,v.clearFocusListCache()},v.close=function(a,b){var c=t.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),j(a,c.value.modalOpener),!0):!c},v.dismiss=function(a,b){var c=t.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),j(a,c.value.modalOpener),!0):!c},v.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},v.getTop=function(){return t.top()},v.modalRendered=function(a){var b=t.get(a);b&&b.value.renderDeferred.resolve()},v.focusFirstFocusableElement=function(){return r.length>0?(r[0].focus(),!0):!1},v.focusLastFocusableElement=function(){return r.length>0?(r[r.length-1].focus(),!0):!1},v.isFocusInFirstItem=function(a){return r.length>0?(a.target||a.srcElement)===r[0]:!1},v.isFocusInLastItem=function(a){return r.length>0?(a.target||a.srcElement)===r[r.length-1]:!1},v.clearFocusListCache=function(){r=[],w=0},v.loadFocusElementList=function(a){if((void 0===r||!r.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(r=b[0].querySelectorAll(x))}},v}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i={};e.controller&&(i.$scope=d,i.$uibModalInstance=p,angular.forEach(a[1],function(a,b){i[b]=a}),g=f(e.controller,i),e.controllerAs&&(e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),d[e.controllerAs]=g)),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b.init=function(e,f){b.ngModelCtrl=e,b.config=f,e.$render=function(){b.render()},d.itemsPerPage?c.$parent.$watch(a(d.itemsPerPage),function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()}):b.itemsPerPage=f.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()}}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"], +controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var m=f(h,h,h===a);c.push(m)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var n=f(d-1,"...",!1);c.unshift(n)}if(l){if(3===d){var o=f(2,"2",!1);c.unshift(o)}var p=f(1,"1",!1);c.unshift(p)}}if(b>e){if(!l||b-2>e){var q=f(e+1,"...",!1);c.push(q)}if(l){if(e===b-2){var r=f(b-1,b-1,!1);c.push(r)}var s=f(b,b,!1);c.push(s)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()});var m=this.render;this.render=function(){m(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
              ';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){M.isOpen?q():m()}function m(){L&&!a.$eval(d[k+"Enable"])||(u(),x(),M.popupDelay?G||(G=g(r,M.popupDelay,!1)):r())}function q(){s(),M.popupCloseDelay?H||(H=g(t,M.popupCloseDelay,!1)):t()}function r(){return s(),u(),M.content?(v(),void M.$evalAsync(function(){M.isOpen=!0,y(!0),R()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){M&&M.$evalAsync(function(){M.isOpen=!1,y(!1),M.animation?F||(F=g(w,150,!1)):w()})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=M.$new(),D=c(E,function(a){J?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){M.title=d[k+"Title"],P?M.content=P(a):M.content=d[e],M.popupClass=d[k+"Class"],M.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);M.popupDelay=isNaN(b)?n.popupDelay:b,M.popupCloseDelay=isNaN(c)?n.popupCloseDelay:c}function y(b){O&&angular.isFunction(O.assign)&&O.assign(a,b)}function z(){Q.length=0,P?(Q.push(a.$watch(P,function(a){M.content=a,!a&&M.isOpen&&t()})),Q.push(E.$watch(function(){N||(N=!0,E.$$postDigest(function(){N=!1,M&&M.isOpen&&R()}))}))):Q.push(d.$observe(e,function(a){M.content=a,!a&&M.isOpen?t():R()})),Q.push(d.$observe(k+"Title",function(a){M.title=a,M.isOpen&&R()})),Q.push(d.$observe(k+"Placement",function(a){M.placement=a?a:n.placement,M.isOpen&&R()}))}function A(){Q.length&&(angular.forEach(Q,function(a){a()}),Q.length=0)}function B(a){M&&M.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];S(),K=p(a),"none"!==K.show&&K.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===K.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(K.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J=angular.isDefined(n.appendToBody)?n.appendToBody:!1,K=p(void 0),L=angular.isDefined(d[k+"Enable"]),M=a.$new(!0),N=!1,O=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,P=n.useContentExp?l(d[e]):!1,Q=[],R=function(){D&&D.html()&&(I||(I=g(function(){D.css({top:0,left:0});var a=i.positionElements(b,D,M.placement,J);D.css({top:a.top+"px",left:a.left+"px",visibility:"visible"}),n.placementClassPrefix&&D.removeClass("top bottom left right"),D.removeClass(n.placementClassPrefix+"top "+n.placementClassPrefix+"top-left "+n.placementClassPrefix+"top-right "+n.placementClassPrefix+"bottom "+n.placementClassPrefix+"bottom-left "+n.placementClassPrefix+"bottom-right "+n.placementClassPrefix+"left "+n.placementClassPrefix+"left-top "+n.placementClassPrefix+"left-bottom "+n.placementClassPrefix+"right "+n.placementClassPrefix+"right-top "+n.placementClassPrefix+"right-bottom");var c=a.placement.split("-");D.addClass(c[0],n.placementClassPrefix+a.placement),i.positionArrow(D,a.placement),I=null},0,!1)))};M.origScope=a,M.isOpen=!1,o.add(M,{close:t}),M.contentExp=function(){return M.content},d.$observe("disabled",function(a){a&&s(),a&&M.isOpen&&t()}),O&&a.$watch(O,function(a){M&&!a===M.isOpen&&j()});var S=function(){K.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),K.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var T=a.$eval(d[k+"Animation"]);M.animation=angular.isDefined(T)?!!T:n.animation;var U,V=k+"AppendToBody";U=V in d&&void 0===d[V]?!0:a.$eval(d[V]),J=angular.isDefined(U)?U:J,J&&a.$on("$locationChangeSuccess",function(){M.isOpen&&t()}),a.$on("$destroy",function(){S(),w(),o.remove(M),M=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}else c.addClass("top");b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect(),a.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e===c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"uib/template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:"uib/template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===t[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes;return b>=0&&60>b?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a){return null===a?"":angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function l(a){m(),s.$setViewValue(new Date(r)),n(a)}function m(){s.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(s.$modelValue){var c=r.getHours(),d=r.getMinutes(),e=r.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c),"m"!==b&&(a.minutes=k(d)),a.meridian=r.getHours()<12?t[0]:t[1],"s"!==b&&(a.seconds=k(e)),a.meridian=r.getHours()<12?t[0]:t[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=t[0]}function o(a){r=q(r,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}var r=new Date,s={$setViewValue:angular.noop},t=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){s=b,s.$render=this.render,s.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var u=g.hourStep;c.hourStep&&a.$parent.$watch(d(c.hourStep),function(a){u=+a});var v=g.minuteStep;c.minuteStep&&a.$parent.$watch(d(c.minuteStep),function(a){v=+a});var w;a.$parent.$watch(d(c.min),function(a){var b=new Date(a);w=isNaN(b)?void 0:b});var x;a.$parent.$watch(d(c.max),function(a){var b=new Date(a);x=isNaN(b)?void 0:b});var y=!1;c.ngDisabled&&a.$parent.$watch(d(c.ngDisabled),function(a){y=a}),a.noIncrementHours=function(){var a=p(r,60*u);return y||a>x||r>a&&w>a},a.noDecrementHours=function(){var a=p(r,60*-u);return y||w>a||a>r&&a>x},a.noIncrementMinutes=function(){var a=p(r,v);return y||a>x||r>a&&w>a},a.noDecrementMinutes=function(){var a=p(r,-v);return y||w>a||a>r&&a>x},a.noIncrementSeconds=function(){var a=q(r,z);return y||a>x||r>a&&w>a},a.noDecrementSeconds=function(){var a=q(r,-z);return y||w>a||a>r&&a>x},a.noToggleMeridian=function(){return r.getHours()<12?y||p(r,720)>x:y||p(r,-720)0};b.bind("mousewheel wheel",function(b){y||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){y||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){y||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){y||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){y||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){y||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){s.$setViewValue(null),s.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();s.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(a),r.setMinutes(b),w>r||r>x?e(!0):l("h")):e(!0)},b.bind("blur",function(b){s.$setTouched(),null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();s.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(b),r.setMinutes(a),w>r||r>x?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){s.$setTouched(),null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();s.$setDirty(),angular.isDefined(a)?(r.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=s.$viewValue;isNaN(b)?(s.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(r=b),w>r||r>x?(s.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*u*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-u*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*v)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-v)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(z)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-z)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(r.getHours()<12?60:-60)):a.meridian=a.meridian===t[0]?t[1]:t[0])},a.blur=function(){s.$setTouched()}}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1);var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("
              "),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("
              ");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(a){if(0!==N.matches.length&&-1!==r.indexOf(a.which)){if(-1===N.activeIdx&&(9===a.which||13===a.which))return U(),void N.$digest();a.preventDefault();var b;switch(a.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,a)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,a)});break;case 27:a.stopPropagation(),U(),N.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$viewValue="",b.val("")),w=!1,x=!1});var aa=function(a){b[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(U(),j.$$phase||N.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'
              \n
              \n

              \n
              {{heading}}
              \n

              \n
              \n
              \n
              \n
              \n
              \n'); +}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'
              ')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'
              \n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'
              \n \n \n \n
              ')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
              {{::label.abbr}}
              {{ weekNumbers[$index] }}\n \n
              \n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
              \n \n
              \n')}]),angular.module("uib/template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/popup.html",'\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
              \n \n
              \n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'
              \n
              \n
              \n
              \n')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-html-unsafe-popup.html",'
              \n
              \n
              \n
              \n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'
              \n
              \n
              \n
              \n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'
              \n
              \n
              \n
              \n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'
              \n
              \n\n
              \n

              \n
              \n
              \n
              \n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'
              \n
              \n\n
              \n

              \n
              \n
              \n
              \n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'
              \n
              \n\n
              \n

              \n
              \n
              \n
              \n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'
              \n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'
              ')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'
              \n
              \n
              \n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'
            • \n
              {{heading}}
              \n
            • \n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'
              \n \n
              \n
              \n
              \n
              \n
              \n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
                
              \n \n :\n \n :\n \n
                
              \n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.tabs").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),function(a){"use strict";"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a():"undefined"!=typeof Package?Sortable=a():window.Sortable=a()}(function(){"use strict";function a(a,b){if(!a||!a.nodeType||1!==a.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(a);this.el=a,this.options=b=r({},b),a[L]=this;var c={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(a.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",ignore:"a, img",filter:null,animation:0,setData:function(a,b){a.setData("Text",b.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1};for(var d in c)!(d in b)&&(b[d]=c[d]);V(b);for(var f in this)"_"===f.charAt(0)&&(this[f]=this[f].bind(this));this.nativeDraggable=b.forceFallback?!1:P,e(a,"mousedown",this._onTapStart),e(a,"touchstart",this._onTapStart),this.nativeDraggable&&(e(a,"dragover",this),e(a,"dragenter",this)),T.push(this._onDragOver),b.store&&this.sort(b.store.get(this))}function b(a){v&&v.state!==a&&(h(v,"display",a?"none":""),!a&&v.state&&w.insertBefore(v,s),v.state=a)}function c(a,b,c){if(a){c=c||N,b=b.split(".");var d=b.shift().toUpperCase(),e=new RegExp("\\s("+b.join("|")+")(?=\\s)","g");do if(">*"===d&&a.parentNode===c||(""===d||a.nodeName.toUpperCase()==d)&&(!b.length||((" "+a.className+" ").match(e)||[]).length==b.length))return a;while(a!==c&&(a=a.parentNode))}return null}function d(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.preventDefault()}function e(a,b,c){a.addEventListener(b,c,!1)}function f(a,b,c){a.removeEventListener(b,c,!1)}function g(a,b,c){if(a)if(a.classList)a.classList[c?"add":"remove"](b);else{var d=(" "+a.className+" ").replace(K," ").replace(" "+b+" "," ");a.className=(d+(c?" "+b:"")).replace(K," ")}}function h(a,b,c){var d=a&&a.style;if(d){if(void 0===c)return N.defaultView&&N.defaultView.getComputedStyle?c=N.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];b in d||(b="-webkit-"+b),d[b]=c+("string"==typeof c?"":"px")}}function i(a,b,c){if(a){var d=a.getElementsByTagName(b),e=0,f=d.length;if(c)for(;f>e;e++)c(d[e],e);return d}return[]}function j(a,b,c,d,e,f,g){var h=N.createEvent("Event"),i=(a||b[L]).options,j="on"+c.charAt(0).toUpperCase()+c.substr(1);h.initEvent(c,!0,!0),h.to=b,h.from=e||b,h.item=d||b,h.clone=v,h.oldIndex=f,h.newIndex=g,b.dispatchEvent(h),i[j]&&i[j].call(a,h)}function k(a,b,c,d,e,f){var g,h,i=a[L],j=i.options.onMove;return g=N.createEvent("Event"),g.initEvent("move",!0,!0),g.to=b,g.from=a,g.dragged=c,g.draggedRect=d,g.related=e||b,g.relatedRect=f||b.getBoundingClientRect(),a.dispatchEvent(g),j&&(h=j.call(i,g)),h}function l(a){a.draggable=!1}function m(){R=!1}function n(a,b){var c=a.lastElementChild,d=c.getBoundingClientRect();return(b.clientY-(d.top+d.height)>5||b.clientX-(d.right+d.width)>5)&&c}function o(a){for(var b=a.tagName+a.className+a.src+a.href+a.textContent,c=b.length,d=0;c--;)d+=b.charCodeAt(c);return d.toString(36)}function p(a){var b=0;if(!a||!a.parentNode)return-1;for(;a&&(a=a.previousElementSibling);)"TEMPLATE"!==a.nodeName.toUpperCase()&&b++;return b}function q(a,b){var c,d;return function(){void 0===c&&(c=arguments,d=this,setTimeout(function(){1===c.length?a.call(d,c[0]):a.apply(d,c),c=void 0},b))}}function r(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J={},K=/\s+/g,L="Sortable"+(new Date).getTime(),M=window,N=M.document,O=M.parseInt,P=!!("draggable"in N.createElement("div")),Q=function(a){return a=N.createElement("x"),a.style.cssText="pointer-events:auto","auto"===a.style.pointerEvents}(),R=!1,S=Math.abs,T=([].slice,[]),U=q(function(a,b,c){if(c&&b.scroll){var d,e,f,g,h=b.scrollSensitivity,i=b.scrollSpeed,j=a.clientX,k=a.clientY,l=window.innerWidth,m=window.innerHeight;if(z!==c&&(y=b.scroll,z=c,y===!0)){y=c;do if(y.offsetWidth=l-j)-(h>=j),g=(h>=m-k)-(h>=k),(f||g)&&(d=M)),J.vx===f&&J.vy===g&&J.el===d||(J.el=d,J.vx=f,J.vy=g,clearInterval(J.pid),d&&(J.pid=setInterval(function(){d===M?M.scrollTo(M.pageXOffset+f*i,M.pageYOffset+g*i):(g&&(d.scrollTop+=g*i),f&&(d.scrollLeft+=f*i))},24)))}},30),V=function(a){var b=a.group;b&&"object"==typeof b||(b=a.group={name:b}),["pull","put"].forEach(function(a){a in b||(b[a]=!0)}),a.groups=" "+b.name+(b.put.join?" "+b.put.join(" "):"")+" "};return a.prototype={constructor:a,_onTapStart:function(a){var b=this,d=this.el,e=this.options,f=a.type,g=a.touches&&a.touches[0],h=(g||a).target,i=h,k=e.filter;if(!("mousedown"===f&&0!==a.button||e.disabled)&&(h=c(h,e.draggable,d))){if(D=p(h),"function"==typeof k){if(k.call(this,a,h,this))return j(b,i,"filter",h,d,D),void a.preventDefault()}else if(k&&(k=k.split(",").some(function(a){return a=c(i,a.trim(),d),a?(j(b,a,"filter",h,d,D),!0):void 0})))return void a.preventDefault();e.handle&&!c(i,e.handle,d)||this._prepareDragStart(a,g,h)}},_prepareDragStart:function(a,b,c){var d,f=this,h=f.el,j=f.options,k=h.ownerDocument;c&&!s&&c.parentNode===h&&(G=a,w=h,s=c,t=s.parentNode,x=s.nextSibling,F=j.group,d=function(){f._disableDelayedDrag(),s.draggable=!0,g(s,f.options.chosenClass,!0),f._triggerDragStart(b)},j.ignore.split(",").forEach(function(a){i(s,a.trim(),l)}),e(k,"mouseup",f._onDrop),e(k,"touchend",f._onDrop),e(k,"touchcancel",f._onDrop),j.delay?(e(k,"mouseup",f._disableDelayedDrag),e(k,"touchend",f._disableDelayedDrag),e(k,"touchcancel",f._disableDelayedDrag),e(k,"mousemove",f._disableDelayedDrag),e(k,"touchmove",f._disableDelayedDrag),f._dragStartTimer=setTimeout(d,j.delay)):d())},_disableDelayedDrag:function(){var a=this.el.ownerDocument;clearTimeout(this._dragStartTimer),f(a,"mouseup",this._disableDelayedDrag),f(a,"touchend",this._disableDelayedDrag),f(a,"touchcancel",this._disableDelayedDrag),f(a,"mousemove",this._disableDelayedDrag),f(a,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(a){a?(G={target:s,clientX:a.clientX,clientY:a.clientY},this._onDragStart(G,"touch")):this.nativeDraggable?(e(s,"dragend",this),e(w,"dragstart",this._onDragStart)):this._onDragStart(G,!0);try{N.selection?N.selection.empty():window.getSelection().removeAllRanges()}catch(b){}},_dragStarted:function(){w&&s&&(g(s,this.options.ghostClass,!0),a.active=this,j(this,w,"start",s,w,D))},_emulateDragOver:function(){if(H){if(this._lastX===H.clientX&&this._lastY===H.clientY)return;this._lastX=H.clientX,this._lastY=H.clientY,Q||h(u,"display","none");var a=N.elementFromPoint(H.clientX,H.clientY),b=a,c=" "+this.options.group.name,d=T.length;if(b)do{if(b[L]&&b[L].options.groups.indexOf(c)>-1){for(;d--;)T[d]({clientX:H.clientX,clientY:H.clientY,target:a,rootEl:b});break}a=b}while(b=b.parentNode);Q||h(u,"display","")}},_onTouchMove:function(b){if(G){a.active||this._dragStarted(),this._appendGhost();var c=b.touches?b.touches[0]:b,d=c.clientX-G.clientX,e=c.clientY-G.clientY,f=b.touches?"translate3d("+d+"px,"+e+"px,0)":"translate("+d+"px,"+e+"px)";I=!0,H=c,h(u,"webkitTransform",f),h(u,"mozTransform",f),h(u,"msTransform",f),h(u,"transform",f),b.preventDefault()}},_appendGhost:function(){if(!u){var a,b=s.getBoundingClientRect(),c=h(s),d=this.options;u=s.cloneNode(!0),g(u,d.ghostClass,!1),g(u,d.fallbackClass,!0),h(u,"top",b.top-O(c.marginTop,10)),h(u,"left",b.left-O(c.marginLeft,10)),h(u,"width",b.width),h(u,"height",b.height),h(u,"opacity","0.8"),h(u,"position","fixed"),h(u,"zIndex","100000"),h(u,"pointerEvents","none"),d.fallbackOnBody&&N.body.appendChild(u)||w.appendChild(u),a=u.getBoundingClientRect(),h(u,"width",2*b.width-a.width),h(u,"height",2*b.height-a.height)}},_onDragStart:function(a,b){var c=a.dataTransfer,d=this.options;this._offUpEvents(),"clone"==F.pull&&(v=s.cloneNode(!0),h(v,"display","none"),w.insertBefore(v,s)),b?("touch"===b?(e(N,"touchmove",this._onTouchMove),e(N,"touchend",this._onDrop),e(N,"touchcancel",this._onDrop)):(e(N,"mousemove",this._onTouchMove),e(N,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,50)):(c&&(c.effectAllowed="move",d.setData&&d.setData.call(this,c,s)),e(N,"drop",this),setTimeout(this._dragStarted,0))},_onDragOver:function(a){var d,e,f,g=this.el,i=this.options,j=i.group,l=j.put,o=F===j,p=i.sort;if(void 0!==a.preventDefault&&(a.preventDefault(),!i.dragoverBubble&&a.stopPropagation()),I=!0,F&&!i.disabled&&(o?p||(f=!w.contains(s)):F.pull&&l&&(F.name===j.name||l.indexOf&&~l.indexOf(F.name)))&&(void 0===a.rootEl||a.rootEl===this.el)){if(U(a,i,this.el),R)return;if(d=c(a.target,i.draggable,g),e=s.getBoundingClientRect(),f)return b(!0),void(v||x?w.insertBefore(s,v||x):p||w.appendChild(s));if(0===g.children.length||g.children[0]===u||g===a.target&&(d=n(g,a))){if(d){if(d.animated)return;r=d.getBoundingClientRect()}b(o),k(w,g,s,e,d,r)!==!1&&(s.contains(g)||(g.appendChild(s),t=g),this._animate(e,s),d&&this._animate(r,d)); +}else if(d&&!d.animated&&d!==s&&void 0!==d.parentNode[L]){A!==d&&(A=d,B=h(d),C=h(d.parentNode));var q,r=d.getBoundingClientRect(),y=r.right-r.left,z=r.bottom-r.top,D=/left|right|inline/.test(B.cssFloat+B.display)||"flex"==C.display&&0===C["flex-direction"].indexOf("row"),E=d.offsetWidth>s.offsetWidth,G=d.offsetHeight>s.offsetHeight,H=(D?(a.clientX-r.left)/y:(a.clientY-r.top)/z)>.5,J=d.nextElementSibling,K=k(w,g,s,e,d,r);if(K!==!1){if(R=!0,setTimeout(m,30),b(o),1===K||-1===K)q=1===K;else if(D){var M=s.offsetTop,N=d.offsetTop;q=M===N?d.previousElementSibling===s&&!E||H&&E:N>M}else q=J!==s&&!G||H&&G;s.contains(g)||(q&&!J?g.appendChild(s):d.parentNode.insertBefore(s,q?J:d)),t=s.parentNode,this._animate(e,s),this._animate(r,d)}}}},_animate:function(a,b){var c=this.options.animation;if(c){var d=b.getBoundingClientRect();h(b,"transition","none"),h(b,"transform","translate3d("+(a.left-d.left)+"px,"+(a.top-d.top)+"px,0)"),b.offsetWidth,h(b,"transition","all "+c+"ms"),h(b,"transform","translate3d(0,0,0)"),clearTimeout(b.animated),b.animated=setTimeout(function(){h(b,"transition",""),h(b,"transform",""),b.animated=!1},c)}},_offUpEvents:function(){var a=this.el.ownerDocument;f(N,"touchmove",this._onTouchMove),f(a,"mouseup",this._onDrop),f(a,"touchend",this._onDrop),f(a,"touchcancel",this._onDrop)},_onDrop:function(b){var c=this.el,d=this.options;clearInterval(this._loopId),clearInterval(J.pid),clearTimeout(this._dragStartTimer),f(N,"mousemove",this._onTouchMove),this.nativeDraggable&&(f(N,"drop",this),f(c,"dragstart",this._onDragStart)),this._offUpEvents(),b&&(I&&(b.preventDefault(),!d.dropBubble&&b.stopPropagation()),u&&u.parentNode.removeChild(u),s&&(this.nativeDraggable&&f(s,"dragend",this),l(s),g(s,this.options.ghostClass,!1),g(s,this.options.chosenClass,!1),w!==t?(E=p(s),E>=0&&(j(null,t,"sort",s,w,D,E),j(this,w,"sort",s,w,D,E),j(null,t,"add",s,w,D,E),j(this,w,"remove",s,w,D,E))):(v&&v.parentNode.removeChild(v),s.nextSibling!==x&&(E=p(s),E>=0&&(j(this,w,"update",s,w,D,E),j(this,w,"sort",s,w,D,E)))),a.active&&(null!==E&&-1!==E||(E=D),j(this,w,"end",s,w,D,E),this.save())),w=s=t=u=x=v=y=z=G=H=I=E=A=B=F=a.active=null)},handleEvent:function(a){var b=a.type;"dragover"===b||"dragenter"===b?s&&(this._onDragOver(a),d(a)):"drop"!==b&&"dragend"!==b||this._onDrop(a)},toArray:function(){for(var a,b=[],d=this.el.children,e=0,f=d.length,g=this.options;f>e;e++)a=d[e],c(a,g.draggable,this.el)&&b.push(a.getAttribute(g.dataIdAttr)||o(a));return b},sort:function(a){var b={},d=this.el;this.toArray().forEach(function(a,e){var f=d.children[e];c(f,this.options.draggable,d)&&(b[a]=f)},this),a.forEach(function(a){b[a]&&(d.removeChild(b[a]),d.appendChild(b[a]))})},save:function(){var a=this.options.store;a&&a.set(this)},closest:function(a,b){return c(a,b||this.options.draggable,this.el)},option:function(a,b){var c=this.options;return void 0===b?c[a]:(c[a]=b,void("group"===a&&V(c)))},destroy:function(){var a=this.el;a[L]=null,f(a,"mousedown",this._onTapStart),f(a,"touchstart",this._onTapStart),this.nativeDraggable&&(f(a,"dragover",this),f(a,"dragenter",this)),Array.prototype.forEach.call(a.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),T.splice(T.indexOf(this._onDragOver),1),this._onDrop(),this.el=a=null}},a.utils={on:e,off:f,css:h,find:i,is:function(a,b){return!!c(a,b,a)},extend:r,throttle:q,closest:c,toggleClass:g,index:p},a.create=function(b,c){return new a(b,c)},a.version="1.4.2",a}),function(a){"use strict";"function"==typeof define&&define.amd?define(["angular","./Sortable"],a):"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?(require("angular"),a(angular,require("./Sortable")),module.exports="ng-sortable"):window.angular&&window.Sortable&&a(angular,Sortable)}(function(a,b){"use strict";var c="Sortable:ng-sortable";a.module("ng-sortable",[]).constant("ngSortableVersion","0.4.0").constant("ngSortableConfig",{}).directive("ngSortable",["$parse","ngSortableConfig",function(d,e){var f,g,h=function(a,b){var c=[].filter.call(a.childNodes,function(a){return 8===a.nodeType&&-1!==a.nodeValue.indexOf("ngRepeat:")})[0];if(!c)return function(){return null};c=c.nodeValue.match(/ngRepeat:\s*(?:\(.*?,\s*)?([^\s)]+)[\s)]+in\s+([^\s|]+)/);var e=d(c[2]);return function(){return e(b.$parent)||[]}};return{restrict:"AC",scope:{ngSortable:"=?"},link:function(d,i){function j(a,b){var c="on"+a.type.charAt(0).toUpperCase()+a.type.substr(1),d=p();n[c]&&n[c]({model:b||d[a.newIndex],models:d,oldIndex:a.oldIndex,newIndex:a.newIndex})}function k(e){var h=p();if(h){var i=e.oldIndex,j=e.newIndex;if(m!==e.from){var k=e.from[c]();f=k[i],e.clone?(f=a.copy(f),k.splice(b.utils.index(e.clone),0,k.splice(i,1)[0]),e.from.removeChild(e.clone)):k.splice(i,1),h.splice(j,0,f),e.from.insertBefore(e.item,g)}else h.splice(j,0,h.splice(i,1)[0]);d.$apply()}}var l,m=i[0],n=a.extend(d.ngSortable||{},e),o=[],p=h(m,d);m[c]=p,l=b.create(m,Object.keys(n).reduce(function(a,b){return a[b]=a[b]||n[b],a},{onStart:function(a){g=a.item.nextSibling,j(a),d.$apply()},onEnd:function(a){j(a,f),d.$apply()},onAdd:function(a){k(a),j(a,f),d.$apply()},onUpdate:function(a){k(a),j(a)},onRemove:function(a){j(a,f)},onSort:function(a){j(a)}})),i.on("$destroy",function(){a.forEach(o,function(a){a()}),l.destroy(),m[c]=null,m=null,o=null,l=null,g=null}),a.forEach(["sort","disabled","draggable","handle","animation","group","ghostClass","filter","onStart","onEnd","onAdd","onUpdate","onRemove","onSort"],function(a){o.push(d.$watch("ngSortable."+a,function(b){void 0!==b&&(n[a]=b,/^on[A-Z]/.test(a)||l.option(a,b))}))})}}}])}),function(a){"use strict";"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a(require("./Sortable")):"function"==typeof define&&define.amd?define(["./Sortable"],a):window.SortableMixin=a(Sortable)}(function(a){"use strict";function b(a){return a.sortableOptions&&a.sortableOptions.model||g.model}function c(a){var c=b(a),d=a.state&&a.state[c]||a.props[c];return d.slice()}function d(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var e,f,g={ref:"list",model:"items",animation:100,onStart:"handleStart",onEnd:"handleEnd",onAdd:"handleAdd",onUpdate:"handleUpdate",onRemove:"handleRemove",onSort:"handleSort",onFilter:"handleFilter",onMove:"handleMove"},h={sortableMixinVersion:"0.1.1",_sortableInstance:null,componentDidMount:function(){var h,i=d(d({},g),this.sortableOptions||{}),j=d({},i),k=function(a,b){var c=this[i[a]];c&&c.call(this,b,this._sortableInstance)}.bind(this);"onStart onEnd onAdd onSort onUpdate onRemove onFilter onMove".split(" ").forEach(function(a){j[a]=function(d){if("onStart"===a)e=d.item.nextElementSibling,f=this;else if("onAdd"===a||"onUpdate"===a){d.from.insertBefore(d.item,e);var g,h,i={},l={},m=d.oldIndex,n=d.newIndex,o=c(this);"onAdd"===a?(g=c(f),h=g.splice(m,1)[0],o.splice(n,0,h),l[b(f)]=g):o.splice(n,0,o.splice(m,1)[0]),i[b(this)]=o,j.stateHandler?this[j.stateHandler](i):this.setState(i),this!==f&&f.setState(l)}setTimeout(function(){k(a,d)},0)}.bind(this)},this),h=this.getDOMNode()?(this.refs[i.ref]||this).getDOMNode():this.refs[i.ref]||this,this._sortableInstance=a.create(h,j)},componentWillReceiveProps:function(a){var c={},d=b(this),e=a[d];e&&(c[d]=e,this.setState(c))},componentWillUnmount:function(){this._sortableInstance.destroy(),this._sortableInstance=null}};return h}),function(a,b){"use strict";angular.module("adf",["adf.provider","ui.bootstrap"]).value("adfTemplatePath","../src/templates/").value("rowTemplate",'').value("columnTemplate",'').value("adfVersion","0.11.0"),angular.module("adf").directive("adfDashboardColumn",["$log","$compile","$rootScope","adfTemplatePath","rowTemplate","dashboard",function(a,b,c,d,e,f){function g(a,b,d){var e=b.widgets;a.$apply(function(){e.splice(d.newIndex,0,e.splice(d.oldIndex,1)[0]),c.$broadcast("adfWidgetMovedInColumn")})}function h(a,b){for(var c=null,d=0;d0)for(var c=a.widgets.shift();c;)b.widgets.push(c),c=a.widgets.shift()}function i(a,b,c){return c=c||0,angular.isDefined(a.rows)&&angular.forEach(a.rows,function(a){angular.forEach(a.columns,function(a){a.widgets||(a.widgets=[]),angular.isDefined(b[c])&&(angular.isDefined(a.rows)||(h(b[c],a),c++)),c=i(a,b,c)})}),c}function j(a,b){return b=b||[],angular.isDefined(a.rows)&&angular.forEach(a.rows,function(a){angular.forEach(a.columns,function(a){b.push(a),j(a,b)})}),b}function k(a,b){var c=j(a),d=0;for(a.rows=angular.copy(b.rows);d{}
              ',e='
              \n
              \n loading ...\n
              \n
              ',f=function(){return!0};this.widget=function(b,c){var d=angular.extend({reload:!1,frameless:!1},c);if(d.edit){var e={reload:!0,immediate:!1,apply:f};angular.extend(e,d.edit),d.edit=e}return a[b]=d,this},this.widgetsPath=function(a){return b=a,this},this.structure=function(a,b){return c[a]=b,this},this.messageTemplate=function(a){return d=a,this},this.loadingTemplate=function(a){return e=a,this},this.$get=function(){var f=0;return{widgets:a,widgetsPath:b,structures:c,messageTemplate:d,loadingTemplate:e,id:function(){return(new Date).getTime()+"-"+ ++f},idEquals:function(a,b){return a&&b&&a.toString()===b.toString()}}}}),angular.module("adf").directive("adfDashboardRow",["$compile","adfTemplatePath","columnTemplate",function(a,b,c){return{restrict:"E",replace:!0,scope:{row:"=",adfModel:"=",editMode:"=",continuousEditMode:"=",options:"="},templateUrl:b+"dashboard-row.html",link:function(b,d){angular.isDefined(b.row.columns)&&angular.isArray(b.row.columns)&&a(c)(b,function(a){d.append(a)})}}}]),angular.module("adf").directive("adfWidgetContent",["$log","$q","$sce","$http","$templateCache","$compile","$controller","$injector","dashboard",function(a,b,c,d,e,f,g,h,i){function j(a){var b=a;return a.indexOf("{widgetsPath}")>=0&&(b=a.replace("{widgetsPath}",i.widgetsPath).replace("//","/"),0===b.indexOf("/")&&(b=b.substring(1))),b}function k(a){var f=b.defer();if(a.template)f.resolve(a.template);else if(a.templateUrl){var g=e.get(a.templateUrl);if(g)f.resolve(g);else{var h=c.getTrustedResourceUrl(j(a.templateUrl));d.get(h).success(function(b){e.put(a.templateUrl,b),f.resolve(b)}).error(function(){f.reject("could not load template")})}}return f.promise}function l(c,d,e){var j=c.model,l=c.content;d.html(i.loadingTemplate);var m=c.$new();j.config||(j.config={}),m.config=j.config;var n={$scope:m,widget:j,config:j.config},o={};return o.$tpl=k(l),l.resolve&&angular.forEach(l.resolve,function(a,b){angular.isString(a)?o[b]=h.get(a):o[b]=h.invoke(a,a,n)}),b.all(o).then(function(a){angular.extend(a,n);var b=a.$tpl;if(d.html(b),l.controller){var c=g(l.controller,a);l.controllerAs&&(m[l.controllerAs]=c),d.children().data("$ngControllerController",c)}f(d.contents())(m)},function(b){var c="Could not resolve all promises";b&&(c+=": "+b),a.warn(c),d.html(i.messageTemplate.replace(/{}/g,c))}),e&&e.$destroy(),m}return{replace:!0,restrict:"EA",transclude:!1,scope:{model:"=",content:"="},link:function(a,b){var c=l(a,b,null);a.$on("widgetConfigChanged",function(){c=l(a,b,c)}),a.$on("widgetReload",function(){c=l(a,b,c)})}}}]),angular.module("adf").directive("adfWidget",["$injector","$q","$log","$uibModal","$rootScope","dashboard","adfTemplatePath",function(a,b,c,d,e,f,g){function h(a){var b=a.definition;if(b){var d=f.widgets[b.type];if(d){b.title||(b.title=d.title),b.titleTemplateUrl||(b.titleTemplateUrl=g+"widget-title.html",d.titleTemplateUrl&&(b.titleTemplateUrl=d.titleTemplateUrl)),b.titleTemplateUrl||(b.frameless=d.frameless),b.styleClass||(b.styleClass=d.styleClass),b.wid||(b.wid=f.id()),a.widget=angular.copy(d);var e=b.config;e?angular.isString(e)&&(e=angular.fromJson(e)):e={},a.config=e,a.widgetState||(a.widgetState={},a.widgetState.isCollapsed=d.collapsed===!0?d.collapsed:!1)}else c.warn("could not find widget "+b.type)}else c.debug("definition not specified, widget was probably removed")}function i(f,h){var i=f.definition;if(i){var j=function(){var a=f.col;if(a){var b=a.widgets.indexOf(i);b>=0&&a.widgets.splice(b,1)}h.remove(),e.$broadcast("adfWidgetRemovedFromColumn")};f.remove=function(){if(f.options.enableConfirmDelete){var a=f.$new(),b=g+"widget-delete.html";i.deleteTemplateUrl&&(b=i.deleteTemplateUrl);var c={scope:a,templateUrl:b,backdrop:"static"},e=d.open(c);a.closeDialog=function(){e.close(),a.$destroy()},a.deleteDialog=function(){j(),a.closeDialog()}}else j()},f.reload=function(){f.$broadcast("widgetReload")},f.edit=function(){function c(a){var c;if("boolean"==typeof a){var d=b.defer();a?d.resolve():d.reject(),c=d.promise}else c=b.when(a);return c}var e=f.$new();e.definition=angular.copy(i);var h=g+"widget-edit.html";i.editTemplateUrl&&(h=i.editTemplateUrl);var j={scope:e,templateUrl:h,backdrop:"static"},k=d.open(j);e.closeDialog=function(){k.close(),e.$destroy()},e.saveDialog=function(){e.validationError=null;var b=f.widget,d=b.edit.apply,g={widget:b,definition:e.definition,config:e.definition.config},h=a.invoke(d,d,g);c(h).then(function(){i.title=e.definition.title,angular.extend(i.config,e.definition.config),b.edit&&b.edit.reload&&f.$broadcast("widgetConfigChanged"),e.closeDialog()},function(a){a?e.validationError=a:e.validationError="Validation durring apply failed"})}}}else c.debug("widget not found")}return{replace:!0,restrict:"EA",transclude:!1,templateUrl:g+"widget.html",scope:{definition:"=",col:"=column",editMode:"=",options:"=",widgetState:"="},controller:["$scope",function(a){a.$on("adfDashboardCollapseExpand",function(b,c){a.widgetState.isCollapsed=c.collapseExpandStatus}),a.$on("adfWidgetEnterEditMode",function(b,c){f.idEquals(a.definition.wid,c.wid)&&a.edit()}),a.widgetClasses=function(b,c){var d=c.styleClass||"";return b.frameless&&!a.editMode||(d+=" panel panel-default"),d},a.openFullScreen=function(){var b=a.definition,c=a.$new(),e={scope:c,templateUrl:g+"widget-fullscreen.html",size:b.modalSize||"lg",backdrop:"static",windowClass:b.fullScreen?"dashboard-modal widget-fullscreen":"dashboard-modal"},f=d.open(e);c.closeDialog=function(){f.close(),c.$destroy()}}}],compile:function(){return{pre:h,post:i}}}}]),angular.module("adf").run(["$templateCache",function(a){a.put("../src/templates/dashboard-column.html",'
              '),a.put("../src/templates/dashboard-edit.html",' '),a.put("../src/templates/dashboard-row.html","
              "),a.put("../src/templates/dashboard-title.html",'

              {{model.title}}

              '),a.put("../src/templates/dashboard.html",'
              '),a.put("../src/templates/widget-add.html",' '),a.put("../src/templates/widget-delete.html",' '),a.put("../src/templates/widget-edit.html",'
              '),a.put("../src/templates/widget-fullscreen.html",' '),a.put("../src/templates/widget-title.html",'

              {{definition.title}}

              '),a.put("../src/templates/widget.html",'
              ')}])}(window),angular.module("adf.structures.base",["adf"]).config(["dashboardProvider",function(a){a.structure("6-6",{rows:[{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]}]}).structure("4-8",{rows:[{columns:[{styleClass:"col-md-4",widgets:[]},{styleClass:"col-md-8",widgets:[]}]}]}).structure("12/4-4-4",{rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-4"},{styleClass:"col-md-4"},{styleClass:"col-md-4"}]}]}).structure("12/6-6",{rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]}]}).structure("12/6-6/12",{rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]},{columns:[{styleClass:"col-md-12"}]}]}).structure("3-9 (12/6-6)",{rows:[{columns:[{styleClass:"col-md-3"},{styleClass:"col-md-9",rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]}]}]}]})}]),function(a,b){"use strict";angular.module("adf.widget.clock",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("clock",{title:"Clock",description:"Displays date and time",templateUrl:"{widgetsPath}/clock/src/view.html",controller:"clockController",controllerAs:"clock",config:{timePattern:"HH:mm:ss",datePattern:"YYYY-MM-DD"},edit:{templateUrl:"{widgetsPath}/clock/src/edit.html"}})}]).controller("clockController",["$scope","$interval","config",function(a,b,c){function d(){var a=new moment;e.time=a.format(c.timePattern),e.date=a.format(c.datePattern)}var e=this;d();var f=b(d,1e3);a.$on("$destroy",function(){b.cancel(f)})}]),angular.module("adf.widget.clock").run(["$templateCache",function(a){a.put("{widgetsPath}/clock/src/edit.html",'

              For the list of possible patterns, please have a look at moment.js documentation

              '),a.put("{widgetsPath}/clock/src/view.html","
              {{clock.time}}
              {{clock.date}}
              ")}])}(window),function(a,b){"use strict";angular.module("adf.widget.iframe",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("iframe",{title:"iframe",description:"Embed an external page into the dashboard",templateUrl:"{widgetsPath}/iframe/src/view.html",controller:"iframeController",controllerAs:"iframe",edit:{templateUrl:"{widgetsPath}/iframe/src/edit.html"},config:{height:"420px"}})}]).controller("iframeController",["$sce","config",function(a,b){b.url&&(this.url=a.trustAsResourceUrl(b.url))}]),angular.module("adf.widget.iframe").run(["$templateCache",function(a){a.put("{widgetsPath}/iframe/src/edit.html","
              "),a.put("{widgetsPath}/iframe/src/view.html",'
              Please insert a url in the widget configuration
              ')}])}(window),function(){"use strict";angular.module("ui.grid.i18n",[]),angular.module("ui.grid",["ui.grid.i18n"])}(),function(){"use strict";angular.module("ui.grid").constant("uiGridConstants",{LOG_DEBUG_MESSAGES:!0,LOG_WARN_MESSAGES:!0,LOG_ERROR_MESSAGES:!0,CUSTOM_FILTERS:/CUSTOM_FILTERS/g,COL_FIELD:/COL_FIELD/g,MODEL_COL_FIELD:/MODEL_COL_FIELD/g,TOOLTIP:/title=\"TOOLTIP\"/g,DISPLAY_CELL_TEMPLATE:/DISPLAY_CELL_TEMPLATE/g,TEMPLATE_REGEXP:/<.+>/,FUNC_REGEXP:/(\([^)]*\))?$/,DOT_REGEXP:/\./g,APOS_REGEXP:/'/g,BRACKET_REGEXP:/^(.*)((?:\s*\[\s*\d+\s*\]\s*)|(?:\s*\[\s*"(?:[^"\\]|\\.)*"\s*\]\s*)|(?:\s*\[\s*'(?:[^'\\]|\\.)*'\s*\]\s*))(.*)$/,COL_CLASS_PREFIX:"ui-grid-col",events:{GRID_SCROLL:"uiGridScroll",COLUMN_MENU_SHOWN:"uiGridColMenuShown",ITEM_DRAGGING:"uiGridItemDragStart",COLUMN_HEADER_CLICK:"uiGridColumnHeaderClick"},keymap:{TAB:9,STRG:17,CAPSLOCK:20,CTRL:17,CTRLRIGHT:18,CTRLR:18,SHIFT:16,RETURN:13,ENTER:13,BACKSPACE:8,BCKSP:8,ALT:18,ALTR:17,ALTRIGHT:17,SPACE:32,WIN:91,MAC:91,FN:null,PG_UP:33,PG_DOWN:34,UP:38,DOWN:40,LEFT:37,RIGHT:39,ESC:27,DEL:46,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123},ASC:"asc",DESC:"desc",filter:{STARTS_WITH:2,ENDS_WITH:4,EXACT:8,CONTAINS:16,GREATER_THAN:32,GREATER_THAN_OR_EQUAL:64,LESS_THAN:128,LESS_THAN_OR_EQUAL:256,NOT_EQUAL:512,SELECT:"select",INPUT:"input"},aggregationTypes:{sum:2,count:4,avg:8,min:16,max:32},CURRENCY_SYMBOLS:["ƒ","$","£","$","¤","¥","៛","₩","₱","฿","₫"],scrollDirection:{UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",NONE:"none"},dataChange:{ALL:"all",EDIT:"edit",ROW:"row",COLUMN:"column",OPTIONS:"options"},scrollbars:{NEVER:0,ALWAYS:1}})}(),angular.module("ui.grid").directive("uiGridCell",["$compile","$parse","gridUtil","uiGridConstants",function(a,b,c,d){var e={priority:0,scope:!1,require:"?^uiGrid",compile:function(){return{pre:function(b,e,f,g){function h(){var a=b.col.compiledElementFn;a(b,function(a,b){e.append(a)})}if(g&&b.col.compiledElementFn)h();else if(g&&!b.col.compiledElementFn)b.col.getCompiledElementFn().then(function(a){a(b,function(a,b){e.append(a)})});else{var i=b.col.cellTemplate.replace(d.MODEL_COL_FIELD,"row.entity."+c.preEval(b.col.field)).replace(d.COL_FIELD,"grid.getCellValue(row, col)"),j=a(i)(b);e.append(j)}},post:function(a,b,c,e){var f=a.col.getColClass(!1);b.addClass(f);var g,h=function(c){var d=b;g&&(d.removeClass(g),g=null),g=angular.isFunction(a.col.cellClass)?a.col.cellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.cellClass,d.addClass(g)};a.col.cellClass&&h();var i=a.grid.registerDataChangeCallback(h,[d.dataChange.COLUMN,d.dataChange.EDIT]),j=function(c,d){ +if(c!==d){(g||a.col.cellClass)&&h();var e=a.col.getColClass(!1);e!==f&&(b.removeClass(f),b.addClass(e),f=e)}},k=a.$watch("row",j),l=function(){i(),k()};a.$on("$destroy",l),b.on("$destroy",l)}}}};return e}]),function(){angular.module("ui.grid").service("uiGridColumnMenuService",["i18nService","uiGridConstants","gridUtil",function(a,b,c){var d={initialize:function(a,b){a.grid=b.grid,b.columnMenuScope=a,a.menuShown=!1},setColMenuItemWatch:function(a){var b=a.$watch("col.menuItems",function(b){"undefined"!=typeof b&&b&&angular.isArray(b)?(b.forEach(function(b){"undefined"!=typeof b.context&&b.context||(b.context={}),b.context.col=a.col}),a.menuItems=a.defaultMenuItems.concat(b)):a.menuItems=a.defaultMenuItems});a.$on("$destroy",b)},sortable:function(a){return!!(a.grid.options.enableSorting&&"undefined"!=typeof a.col&&a.col&&a.col.enableSorting)},isActiveSort:function(a,b){return"undefined"!=typeof a.col&&"undefined"!=typeof a.col.sort&&"undefined"!=typeof a.col.sort.direction&&a.col.sort.direction===b},suppressRemoveSort:function(a){return!(!a.col||!a.col.suppressRemoveSort)},hideable:function(a){return"undefined"==typeof a.col||!a.col||!a.col.colDef||a.col.colDef.enableHiding!==!1},getDefaultMenuItems:function(c){return[{title:a.getSafeText("sort.ascending"),icon:"ui-grid-icon-sort-alt-up",action:function(a){a.stopPropagation(),c.sortColumn(a,b.ASC)},shown:function(){return d.sortable(c)},active:function(){return d.isActiveSort(c,b.ASC)}},{title:a.getSafeText("sort.descending"),icon:"ui-grid-icon-sort-alt-down",action:function(a){a.stopPropagation(),c.sortColumn(a,b.DESC)},shown:function(){return d.sortable(c)},active:function(){return d.isActiveSort(c,b.DESC)}},{title:a.getSafeText("sort.remove"),icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),c.unsortColumn()},shown:function(){return d.sortable(c)&&"undefined"!=typeof c.col&&"undefined"!=typeof c.col.sort&&"undefined"!=typeof c.col.sort.direction&&null!==c.col.sort.direction&&!d.suppressRemoveSort(c)}},{title:a.getSafeText("column.hide"),icon:"ui-grid-icon-cancel",shown:function(){return d.hideable(c)},action:function(a){a.stopPropagation(),c.hideColumn()}}]},getColumnElementPosition:function(a,b,d){var e={};return e.left=d[0].offsetLeft,e.top=d[0].offsetTop,e.parentLeft=d[0].offsetParent.offsetLeft,e.offset=0,b.grid.options.offsetLeft&&(e.offset=b.grid.options.offsetLeft),e.height=c.elementHeight(d,!0),e.width=c.elementWidth(d,!0),e},repositionMenu:function(a,b,d,e,f){var g=e[0].querySelectorAll(".ui-grid-menu"),h=c.closestElm(f,".ui-grid-render-container"),i=h.getBoundingClientRect().left-a.grid.element[0].getBoundingClientRect().left,j=h.querySelectorAll(".ui-grid-viewport")[0].scrollLeft,k=b.lastMenuWidth?b.lastMenuWidth:a.lastMenuWidth?a.lastMenuWidth:170,l=b.lastMenuPaddingRight?b.lastMenuPaddingRight:a.lastMenuPaddingRight?a.lastMenuPaddingRight:10;if(0!==g.length){var m=g[0].querySelectorAll(".ui-grid-menu-mid");0===m.length||angular.element(m).hasClass("ng-hide")||(k=c.elementWidth(g,!0),a.lastMenuWidth=k,b.lastMenuWidth=k,l=parseInt(c.getStyles(angular.element(g)[0]).paddingRight,10),a.lastMenuPaddingRight=l,b.lastMenuPaddingRight=l)}var n=d.left+i-j+d.parentLeft+d.width-k+l;nc)d=b;else{if(c>a&&!d)return d=b,!0;if(c>a&&d)return!0}}),d){var g=d.getColClass();b.focus.bySelector(e,".ui-grid-header-cell."+g+" .ui-grid-header-cell-primary-focus",!0).then(angular.noop,function(a){return"canceled"!==a?c():void 0})}else c()})};f.hideColumn=function(){f.col.colDef.visible=!1,f.col.visible=!1,f.grid.queueGridRefresh(),f.hideMenu(),f.grid.api.core.notifyDataChange(c.dataChange.COLUMN),f.grid.api.core.raise.columnVisibilityChanged(f.col),j()}},controller:["$scope",function(a){var b=this;a.$watch("menuItems",function(a){b.menuItems=a})}]};return f}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFilter",["$compile","$templateCache","i18nService","gridUtil",function(a,b,c,d){return{compile:function(){return{pre:function(b,c,d,e){b.col.updateFilters=function(d){if(c.children().remove(),d){var e=b.col.filterHeaderTemplate;c.append(a(e)(b))}},b.$on("$destroy",function(){delete b.col.updateFilters})},post:function(a,b,e,f){a.aria=c.getSafeText("headerCell.aria"),a.removeFilter=function(a,c){a.term=null,d.focus.bySelector(b,".ui-grid-filter-input-"+c)}}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooterCell",["$timeout","gridUtil","uiGridConstants","$compile",function(a,b,c,d){var e={priority:0,scope:{col:"=",row:"=",renderIndex:"="},replace:!0,require:"^uiGrid",compile:function(a,b,e){return{pre:function(a,b,c,e){var f=d(a.col.footerCellTemplate)(a);b.append(f)},post:function(a,b,d,e){a.grid=e.grid;var f=a.col.getColClass(!1);b.addClass(f);var g,h=function(c){var d=b;g&&(d.removeClass(g),g=null),g=angular.isFunction(a.col.footerCellClass)?a.col.footerCellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.footerCellClass,d.addClass(g)};a.col.footerCellClass&&h(),a.col.updateAggregationValue();var i=a.grid.registerDataChangeCallback(h,[c.dataChange.COLUMN]);a.grid.api.core.on.rowsRendered(a,a.col.updateAggregationValue),a.grid.api.core.on.rowsRendered(a,h),a.$on("$destroy",i)}}}};return e}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooter",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d,e){return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(a,c){return{pre:function(a,c,e,f){var g=f[0],h=f[1];a.grid=g.grid,a.colContainer=h.colContainer,h.footer=c;var i=a.grid.options.footerTemplate;d.getTemplate(i).then(function(d){var e=angular.element(d),f=b(e)(a);if(c.append(f),h){var g=c[0].getElementsByClassName("ui-grid-footer-viewport")[0];g&&(h.footerViewport=g)}})},post:function(a,b,c,e){var f=e[0],g=e[1];f.grid;d.disableAnimations(b),g.footer=b;var h=b[0].getElementsByClassName("ui-grid-footer-viewport")[0];h&&(g.footerViewport=h)}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGridFooter",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d,e){return{restrict:"EA",replace:!0,require:"^uiGrid",scope:!0,compile:function(a,c){return{pre:function(a,c,e,f){a.grid=f.grid;var g=a.grid.options.gridFooterTemplate;d.getTemplate(g).then(function(d){var e=angular.element(d),f=b(e)(a);c.append(f)})},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGroupPanel",["$compile","uiGridConstants","gridUtil",function(a,b,c){var d="ui-grid/ui-grid-group-panel";return{restrict:"EA",replace:!0,require:"?^uiGrid",scope:!1,compile:function(b,e){return{pre:function(b,e,f,g){var h=b.grid.options.groupPanelTemplate||d;c.getTemplate(h).then(function(c){var d=angular.element(c),f=a(d)(b);e.append(f)})},post:function(a,b,c,d){b.bind("$destroy",function(){})}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeaderCell",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants","ScrollEvent","i18nService",function(a,b,c,d,e,f,g,h){var i=500,j=500,k={priority:0,scope:{col:"=",row:"=",renderIndex:"="},require:["^uiGrid","^uiGridRenderContainer"],replace:!0,compile:function(){return{pre:function(b,c,d){var e=a(b.col.headerCellTemplate)(b);c.append(e)},post:function(a,c,e,g){var k=g[0],l=g[1];a.i18n={headerCell:h.getSafeText("headerCell"),sort:h.getSafeText("sort")},a.isSortPriorityVisible=function(){return angular.isNumber(a.col.sort.priority)&&a.grid.columns.some(function(b,c){return angular.isNumber(b.sort.priority)&&b!==a.col})},a.getSortDirectionAriaLabel=function(){var b=a.col,c=b.sort.direction===f.ASC?a.i18n.sort.ascending:b.sort.direction===f.DESC?a.i18n.sort.descending:a.i18n.sort.none,d=c;return a.isSortPriorityVisible()&&(d=d+". "+a.i18n.headerCell.priority+" "+b.sort.priority),d},a.grid=k.grid,a.renderContainer=k.grid.renderContainers[l.containerId];var m=a.col.getColClass(!1);c.addClass(m),a.menuShown=!1,a.asc=f.ASC,a.desc=f.DESC;var n,o,p=(angular.element(c[0].querySelectorAll(".ui-grid-header-cell-menu")),angular.element(c[0].querySelectorAll(".ui-grid-cell-contents"))),q=[];a.downFn=function(e){e.stopPropagation(),"undefined"!=typeof e.originalEvent&&void 0!==e.originalEvent&&(e=e.originalEvent),e.button&&0!==e.button||(o=e.pageX,a.mousedownStartTime=(new Date).getTime(),a.mousedownTimeout=b(function(){},i),a.mousedownTimeout.then(function(){a.colMenu&&k.columnMenuScope.showMenu(a.col,c,e)}),k.fireEvent(f.events.COLUMN_HEADER_CLICK,{event:e,columnName:a.col.colDef.name}),a.offAllEvents(),"touchstart"===e.type?(d.on("touchend",a.upFn),d.on("touchmove",a.moveFn)):"mousedown"===e.type&&(d.on("mouseup",a.upFn),d.on("mousemove",a.moveFn)))},a.upFn=function(c){c.stopPropagation(),b.cancel(a.mousedownTimeout),a.offAllEvents(),a.onDownEvents(c.type);var d=(new Date).getTime(),e=d-a.mousedownStartTime;e>i||a.sortable&&a.handleClick(c)},a.moveFn=function(c){var d=c.pageX-o;0!==d&&(b.cancel(a.mousedownTimeout),a.offAllEvents(),a.onDownEvents(c.type))},a.clickFn=function(b){b.stopPropagation(),p.off("click",a.clickFn)},a.offAllEvents=function(){p.off("touchstart",a.downFn),p.off("mousedown",a.downFn),d.off("touchend",a.upFn),d.off("mouseup",a.upFn),d.off("touchmove",a.moveFn),d.off("mousemove",a.moveFn),p.off("click",a.clickFn)},a.onDownEvents=function(c){switch(c){case"touchmove":case"touchend":p.on("click",a.clickFn),p.on("touchstart",a.downFn),b(function(){p.on("mousedown",a.downFn)},j);break;case"mousemove":case"mouseup":p.on("click",a.clickFn),p.on("mousedown",a.downFn),b(function(){p.on("touchstart",a.downFn)},j);break;default:p.on("click",a.clickFn),p.on("touchstart",a.downFn),p.on("mousedown",a.downFn)}};var r=function(d){var e=c;n&&(e.removeClass(n),n=null),n=angular.isFunction(a.col.headerCellClass)?a.col.headerCellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.headerCellClass,e.addClass(n),b(function(){var b=a.grid.renderContainers.right?a.grid.renderContainers.right:a.grid.renderContainers.body;a.isLastCol=a.col===b.visibleColumnCache[b.visibleColumnCache.length-1]}),k.grid.options.enableSorting&&a.col.enableSorting?a.sortable=!0:a.sortable=!1;var g=a.filterable;k.grid.options.enableFiltering&&a.col.enableFiltering?a.filterable=!0:a.filterable=!1,g!==a.filterable&&("undefined"!=typeof a.col.updateFilters&&a.col.updateFilters(a.filterable),a.filterable?(a.col.filters.forEach(function(b,c){q.push(a.$watch("col.filters["+c+"].term",function(a,b){a!==b&&(k.grid.api.core.raise.filterChanged(),k.grid.api.core.notifyDataChange(f.dataChange.COLUMN),k.grid.queueGridRefresh())}))}),a.$on("$destroy",function(){q.forEach(function(a){a()})})):q.forEach(function(a){a()})),a.col.grid.options&&a.col.grid.options.enableColumnMenus!==!1&&a.col.colDef&&a.col.colDef.enableColumnMenu!==!1?a.colMenu=!0:a.colMenu=!1,a.offAllEvents(),(a.sortable||a.colMenu)&&(a.onDownEvents(),a.$on("$destroy",function(){a.offAllEvents()}))};r();var s=a.grid.registerDataChangeCallback(r,[f.dataChange.COLUMN]);a.$on("$destroy",s),a.handleClick=function(b){var c=!1;b.shiftKey&&(c=!0),k.grid.sortColumn(a.col,c).then(function(){k.columnMenuScope&&k.columnMenuScope.hideMenu(),k.grid.refresh()})},a.toggleMenu=function(b){b.stopPropagation(),k.columnMenuScope.menuShown&&k.columnMenuScope.col===a.col?k.columnMenuScope.hideMenu():k.columnMenuScope.showMenu(a.col,c)}}}}};return k}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeader",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout","ScrollEvent",function(a,b,c,d,e,f){var g="ui-grid/ui-grid-header",h="ui-grid/ui-grid-no-header";return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(a,c){return{pre:function(a,c,e,i){function j(){m.header=m.colContainer.header=c;var a=c[0].getElementsByClassName("ui-grid-header-canvas");a.length>0?m.headerCanvas=m.colContainer.headerCanvas=a[0]:m.headerCanvas=null}function k(a){if(!l.grid.isScrollingHorizontally){var b=d.normalizeScrollLeft(m.headerViewport,l.grid),c=m.colContainer.scrollHorizontal(b),e=new f(l.grid,null,m.colContainer,f.Sources.ViewPortScroll);e.newScrollLeft=b,c>-1&&(e.x={percentage:c}),l.grid.scrollContainers(null,e)}}var l=i[0],m=i[1];a.grid=l.grid,a.colContainer=m.colContainer,j();var n;n=a.grid.options.showHeader?a.grid.options.headerTemplate?a.grid.options.headerTemplate:g:h,d.getTemplate(n).then(function(d){var e=angular.element(d),f=b(e)(a);if(c.replaceWith(f),c=f,j(),m){var g=c[0].getElementsByClassName("ui-grid-header-viewport")[0];g&&(m.headerViewport=g,angular.element(g).on("scroll",k),a.$on("$destroy",function(){angular.element(g).off("scroll",k)}))}a.grid.queueRefresh()})},post:function(a,b,c,e){function f(){var a=h.colContainer.visibleColumnCache,b="",c=0;return a.forEach(function(a){b+=a.getColClassDefinition(),c+=a.drawnWidth}),h.colContainer.canvasWidth=c,b}var g=e[0],h=e[1];g.grid;d.disableAnimations(b),h.header=b;var i=b[0].getElementsByClassName("ui-grid-header-viewport")[0];i&&(h.headerViewport=i),g&&g.grid.registerStyleComputation({priority:15,func:f})}}}}}])}(),function(){angular.module("ui.grid").service("uiGridGridMenuService",["gridUtil","i18nService","uiGridConstants",function(a,b,c){var d={initialize:function(a,b){b.gridMenuScope=a,a.grid=b,a.registeredMenuItems=[],a.$on("$destroy",function(){a.grid&&a.grid.gridMenuScope&&(a.grid.gridMenuScope=null),a.grid&&(a.grid=null),a.registeredMenuItems&&(a.registeredMenuItems=null)}),a.registeredMenuItems=[],b.api.registerMethod("core","addToGridMenu",d.addToGridMenu),b.api.registerMethod("core","removeFromGridMenu",d.removeFromGridMenu)},addToGridMenu:function(b,c){angular.isArray(c)?b.gridMenuScope?(b.gridMenuScope.registeredMenuItems=b.gridMenuScope.registeredMenuItems?b.gridMenuScope.registeredMenuItems:[],b.gridMenuScope.registeredMenuItems=b.gridMenuScope.registeredMenuItems.concat(c)):a.logError("Asked to addToGridMenu, but gridMenuScope not present. Timing issue? Please log issue with ui-grid"):a.logError("addToGridMenu: menuItems must be an array, and is not, not adding any items")},removeFromGridMenu:function(b,c){var d=-1;b&&b.gridMenuScope&&b.gridMenuScope.registeredMenuItems.forEach(function(b,e){b.id===c&&(d>-1?a.logError("removeFromGridMenu: found multiple items with the same id, removing only the last"):d=e)}),d>-1&&b.gridMenuScope.registeredMenuItems.splice(d,1)},getMenuItems:function(c){var e=[];c.grid.options.gridMenuCustomItems&&(angular.isArray(c.grid.options.gridMenuCustomItems)?e=e.concat(c.grid.options.gridMenuCustomItems):a.logError("gridOptions.gridMenuCustomItems must be an array, and is not"));var f=[{title:b.getSafeText("gridMenu.clearAllFilters"),action:function(a){c.grid.clearAllFilters(void 0,!0,void 0)},shown:function(){return c.grid.options.enableFiltering},order:100}];return e=e.concat(f),e=e.concat(c.registeredMenuItems),c.grid.options.gridMenuShowHideColumns!==!1&&(e=e.concat(d.showHideColumns(c))),e.sort(function(a,b){return a.order-b.order}),e},showHideColumns:function(a){var c=[];return a.grid.options.columnDefs&&0!==a.grid.options.columnDefs.length&&0!==a.grid.columns.length?(c.push({title:b.getSafeText("gridMenu.columns"),order:300}),a.grid.options.gridMenuTitleFilter=a.grid.options.gridMenuTitleFilter?a.grid.options.gridMenuTitleFilter:function(a){return a},a.grid.options.columnDefs.forEach(function(b,e){if(b.enableHiding!==!1){var f={icon:"ui-grid-icon-ok",action:function(a){a.stopPropagation(),d.toggleColumnVisibility(this.context.gridCol)},shown:function(){return this.context.gridCol.colDef.visible===!0||void 0===this.context.gridCol.colDef.visible},context:{gridCol:a.grid.getColumn(b.name||b.field)},leaveOpen:!0,order:301+2*e};d.setMenuItemTitle(f,b,a.grid),c.push(f),f={icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),d.toggleColumnVisibility(this.context.gridCol)},shown:function(){return!(this.context.gridCol.colDef.visible===!0||void 0===this.context.gridCol.colDef.visible)},context:{gridCol:a.grid.getColumn(b.name||b.field)},leaveOpen:!0,order:301+2*e+1},d.setMenuItemTitle(f,b,a.grid),c.push(f)}}),c):c},setMenuItemTitle:function(b,c,d){var e=d.options.gridMenuTitleFilter(c.displayName||a.readableColumnName(c.name)||c.field);"string"==typeof e?b.title=e:e.then?(b.title="",e.then(function(a){b.title=a},function(a){b.title=a})):(a.logError("Expected gridMenuTitleFilter to return a string or a promise, it has returned neither, bad config"),b.title="badconfig")},toggleColumnVisibility:function(a){a.colDef.visible=!(a.colDef.visible===!0||void 0===a.colDef.visible),a.grid.refresh(),a.grid.api.core.notifyDataChange(c.dataChange.COLUMN),a.grid.api.core.raise.columnVisibilityChanged(a)}};return d}]).directive("uiGridMenuButton",["gridUtil","uiGridConstants","uiGridGridMenuService","i18nService",function(a,b,c,d){return{priority:0,scope:!0,require:["^uiGrid"],templateUrl:"ui-grid/ui-grid-menu-button",replace:!0,link:function(b,e,f,g){var h=g[0];b.i18n={aria:d.getSafeText("gridMenu.aria")},c.initialize(b,h.grid),b.shown=!1,b.toggleMenu=function(){b.shown?(b.$broadcast("hide-menu"),b.shown=!1):(b.menuItems=c.getMenuItems(b),b.$broadcast("show-menu"),b.shown=!0)},b.$on("menu-hidden",function(){b.shown=!1,a.focus.bySelector(e,".ui-grid-icon-container")})}}}])}(),function(){angular.module("ui.grid").directive("uiGridMenu",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants","i18nService",function(a,b,c,d,e,f,g){var h={priority:0,scope:{menuItems:"=",autoHide:"=?"},require:"?^uiGrid",templateUrl:"ui-grid/uiGridMenu",replace:!1,link:function(a,d,h,i){var j;a.dynamicStyles="",i&&(j=i.grid.gridHeight-30,a.dynamicStyles=[".grid"+i.grid.id+" .ui-grid-menu-mid {","max-height: "+j+"px;","}"].join(" ")),a.i18n={close:g.getSafeText("columnMenu.close")},a.showMenu=function(c,f){a.shown?a.shownMid||(a.shownMid=!0,a.$emit("menu-shown")):(a.shown=!0,b(function(){a.shownMid=!0,a.$emit("menu-shown")}));var g="click";f&&f.originalEvent&&f.originalEvent.type&&"touchstart"===f.originalEvent.type&&(g=f.originalEvent.type),angular.element(document).off("click touchstart",k),d.off("keyup",l),d.off("keydown",m),b(function(){angular.element(document).on(g,k),d.on("keyup",l),d.on("keydown",m)}),e.focus.bySelector(d,"button[type=button]",!0)},a.hideMenu=function(c){a.shown&&(a.shownMid=!1,b(function(){a.shownMid||(a.shown=!1,a.$emit("menu-hidden"))},200)),angular.element(document).off("click touchstart",k),d.off("keyup",l),d.off("keydown",m)},a.$on("hide-menu",function(b,c){a.hideMenu(b,c)}),a.$on("show-menu",function(b,c){a.showMenu(b,c)});var k=function(){a.shown&&a.$apply(function(){a.hideMenu()})},l=function(b){27===b.keyCode&&a.hideMenu()},m=function(a){var b=function(b){return b.focus(),a.preventDefault(),!1};if(9===a.keyCode){var c,e,f=d[0].querySelectorAll("button:not(.ng-hide)");f.length>0&&(c=f[0],e=f[f.length-1],a.target!==e||a.shiftKey?a.target===c&&a.shiftKey&&b(e):b(c))}};"undefined"!=typeof a.autoHide&&void 0!==a.autoHide||(a.autoHide=!0),a.autoHide&&angular.element(c).on("resize",k),a.$on("$destroy",function(){angular.element(document).off("click touchstart",k)}),a.$on("$destroy",function(){angular.element(c).off("resize",k)}),i&&a.$on("$destroy",i.grid.api.core.on.scrollBegin(a,k)),a.$on("$destroy",a.$on(f.events.ITEM_DRAGGING,k))}};return h}]).directive("uiGridMenuItem",["gridUtil","$compile","i18nService",function(a,b,c){var d={priority:0,scope:{name:"=",active:"=",action:"=",icon:"=",shown:"=",context:"=",templateUrl:"=",leaveOpen:"=",screenReaderOnly:"="},require:["?^uiGrid"],templateUrl:"ui-grid/uiGridMenuItem",replace:!1,compile:function(){return{pre:function(c,d){c.templateUrl&&a.getTemplate(c.templateUrl).then(function(a){var e=angular.element(a),f=b(e)(c);d.replaceWith(f)})},post:function(b,d,e,f){var g=f[0];"undefined"!=typeof b.shown&&null!==b.shown||(b.shown=function(){return!0}),b.itemShown=function(){var a={};return b.context&&(a.context=b.context),"undefined"!=typeof g&&g&&(a.grid=g.grid),b.shown.call(a)},b.itemAction=function(c,e){if(a.logDebug("itemAction"),c.stopPropagation(),"function"==typeof b.action){var f={};b.context&&(f.context=b.context),"undefined"!=typeof g&&g&&(f.grid=g.grid),b.action.call(f,c,e),b.leaveOpen?a.focus.bySelector(angular.element(a.closestElm(d,".ui-grid-menu-items")),"button[type=button]",!0):b.$emit("hide-menu")}},b.i18n=c.get()}}}};return d}])}(),function(){"use strict";var a=angular.module("ui.grid");angular.forEach([{tag:"Src",method:"attr"},{tag:"Text",method:"text"},{tag:"Href",method:"attr"},{tag:"Class",method:"addClass"},{tag:"Html",method:"html"},{tag:"Alt",method:"attr"},{tag:"Style",method:"css"},{tag:"Value",method:"attr"},{tag:"Id",method:"attr"},{tag:"Id",directiveName:"IdGrid",method:"attr",appendGridId:!0},{tag:"Title",method:"attr"},{tag:"Label",method:"attr",aria:!0},{tag:"Labelledby",method:"attr",aria:!0},{tag:"Labelledby",directiveName:"LabelledbyGrid",appendGridId:!0,method:"attr",aria:!0},{tag:"Describedby",method:"attr",aria:!0},{tag:"Describedby",directiveName:"DescribedbyGrid",appendGridId:!0,method:"attr",aria:!0}],function(b){var c="uiGridOneBind",d=(b.aria?c+"Aria":c)+(b.directiveName?b.directiveName:b.tag);a.directive(d,["gridUtil",function(a){return{restrict:"A",require:["?uiGrid","?^uiGrid"],link:function(c,e,f,g){var h=function(b){var e;if(c.grid)e=c.grid;else if(c.col&&c.col.grid)e=c.col.grid;else if(!g.some(function(a){return a&&a.grid?(e=a.grid,!0):void 0}))throw a.logError("["+d+"] A valid grid could not be found to bind id. Are you using this directive within the correct scope? Trying to generate id: [gridID]-"+b),new Error("No valid grid could be found");if(e){var f=new RegExp(e.id.toString());f.test(b)||(b=e.id.toString()+"-"+b)}return b},i=c.$watch(f[d],function(a){if(a){if(b.appendGridId){var c=null;angular.forEach(a.split(" "),function(a){c=(c?c+" ":"")+h(a)}),a=c}switch(b.method){case"attr":b.aria?e[b.method]("aria-"+b.tag.toLowerCase(),a):e[b.method](b.tag.toLowerCase(),a);break;case"addClass":if(angular.isObject(a)&&!angular.isArray(a)){var d=[],f=!1;if(angular.forEach(a,function(a,b){null!==a&&"undefined"!=typeof a&&(f=!0,a&&d.push(b))}),!f)return;a=d}if(!a)return;e.addClass(angular.isArray(a)?a.join(" "):a);break;default:e[b.method](a)}i()}},!0)}}}])})}(),function(){"use strict";var a=angular.module("ui.grid");a.directive("uiGridRenderContainer",["$timeout","$document","uiGridConstants","gridUtil","ScrollEvent",function(a,b,c,d,e){return{replace:!0,transclude:!0,templateUrl:"ui-grid/uiGridRenderContainer",require:["^uiGrid","uiGridRenderContainer"],scope:{containerId:"=",rowContainerName:"=",colContainerName:"=",bindScrollHorizontal:"=",bindScrollVertical:"=",enableVerticalScrollbar:"=",enableHorizontalScrollbar:"="},controller:"uiGridRenderContainer as RenderContainer",compile:function(){return{pre:function(a,b,c,d){var e=d[0],f=d[1],g=a.grid=e.grid;if(!a.rowContainerName)throw"No row render container name specified";if(!a.colContainerName)throw"No column render container name specified";if(!g.renderContainers[a.rowContainerName])throw"Row render container '"+a.rowContainerName+"' is not registered.";if(!g.renderContainers[a.colContainerName])throw"Column render container '"+a.colContainerName+"' is not registered.";var h=a.rowContainer=g.renderContainers[a.rowContainerName],i=a.colContainer=g.renderContainers[a.colContainerName];f.containerId=a.containerId,f.rowContainer=h,f.colContainer=i},post:function(a,b,c,f){function g(){var b="",c=l.canvasWidth,d=l.getViewportWidth(),e=k.getCanvasHeight(),f=k.getViewportHeight();l.needsHScrollbarPlaceholder()&&(f-=j.scrollbarHeight);var g,i;return g=i=l.getHeaderViewportWidth(),b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-canvas { width: "+c+"px; height: "+e+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { width: "+(c+j.scrollbarWidth)+"px; }",b+=o.explicitHeaderCanvasHeight?"\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { height: "+o.explicitHeaderCanvasHeight+"px; }":"\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { height: inherit; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-viewport { width: "+d+"px; height: "+f+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-viewport { width: "+g+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-footer-canvas { width: "+(c+j.scrollbarWidth)+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-footer-viewport { width: "+i+"px; }"}var h=f[0],i=f[1],j=h.grid,k=i.rowContainer,l=i.colContainer,m=null,n=null,o=j.renderContainers[a.containerId];b.addClass("ui-grid-render-container-"+a.containerId),d.on.mousewheel(b,function(a){var b=new e(j,k,l,e.Sources.RenderContainerMouseWheel);if(0!==a.deltaY){var c=-1*a.deltaY*a.deltaFactor;m=i.viewport[0].scrollTop,b.verticalScrollLength=k.getVerticalScrollLength();var f=(m+c)/b.verticalScrollLength;f>=1&&mf?f=0:f>1&&(f=1),b.y={percentage:f,pixels:c}}if(0!==a.deltaX){var g=a.deltaX*a.deltaFactor;n=d.normalizeScrollLeft(i.viewport,j),b.horizontalScrollLength=l.getCanvasWidth()-l.getViewportWidth();var h=(n+g)/b.horizontalScrollLength;0>h?h=0:h>1&&(h=1),b.x={percentage:h,pixels:g}}0!==a.deltaY&&(b.atTop(m)||b.atBottom(m))||0!==a.deltaX&&(b.atLeft(n)||b.atRight(n))||(a.preventDefault(),a.stopPropagation(),b.fireThrottledScrollingEvent("",b))}),b.bind("$destroy",function(){b.unbind("keydown"),["touchstart","touchmove","touchend","keydown","wheel","mousewheel","DomMouseScroll","MozMousePixelScroll"].forEach(function(a){b.unbind(a)})}),h.grid.registerStyleComputation({priority:6,func:g})}}}}}]),a.controller("uiGridRenderContainer",["$scope","gridUtil",function(a,b){}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridRow",["gridUtil",function(a){return{replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:{row:"=uiGridRow",rowRenderIndex:"="},compile:function(){return{pre:function(a,b,c,d){function e(){a.row.getRowTemplateFn.then(function(c){var d=a.$new();c(d,function(a,c){h&&(h.remove(),i.$destroy()),b.empty().append(a),h=a,i=d})})}var f=d[0],g=d[1];f.grid;a.grid=f.grid,a.colContainer=g.colContainer;var h,i;e(),a.$watch("row.getRowTemplateFn",function(a,b){a!==b&&e()})},post:function(a,b,c,d){}}}}}])}(),function(){angular.module("ui.grid").directive("uiGridStyle",["gridUtil","$interpolate",function(a,b){return{link:function(a,c,d,e){var f=b(c.text(),!0);f&&a.$watch(f,function(a){c.text(a)})}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridViewport",["gridUtil","ScrollEvent","uiGridConstants","$log",function(a,b,c,d){return{replace:!0,scope:{},controllerAs:"Viewport",templateUrl:"ui-grid/uiGridViewport",require:["^uiGrid","^uiGridRenderContainer"],link:function(c,d,e,f){function g(e){var f=d[0].scrollTop,g=a.normalizeScrollLeft(d,p),h=n.scrollVertical(f),i=o.scrollHorizontal(g),j=new b(p,n,o,b.Sources.ViewPortScroll);j.newScrollLeft=g,j.newScrollTop=f,i>-1&&(j.x={percentage:i}),h>-1&&(j.y={percentage:h}),p.scrollContainers(c.$parent.containerId,j)}function h(a){m.prevScrollArgs=a;var b=a.getNewScrollTop(n,m.viewport);d[0].scrollTop=b}function i(b){m.prevScrollArgs=b;var c=b.getNewScrollLeft(o,m.viewport);d[0].scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p)}function j(b){var c=b.getNewScrollLeft(o,m.viewport);m.headerViewport&&(m.headerViewport.scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p))}function k(b){var c=b.getNewScrollLeft(o,m.viewport);m.footerViewport&&(m.footerViewport.scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p))}var l=f[0],m=f[1];c.containerCtrl=m;var n=m.rowContainer,o=m.colContainer,p=l.grid;c.grid=l.grid,c.rowContainer=m.rowContainer,c.colContainer=m.colContainer,m.viewport=d,d.on("scroll",g);c.$parent.bindScrollVertical&&p.addVerticalScrollSync(c.$parent.containerId,h),c.$parent.bindScrollHorizontal&&(p.addHorizontalScrollSync(c.$parent.containerId,i),p.addHorizontalScrollSync(c.$parent.containerId+"header",j),p.addHorizontalScrollSync(c.$parent.containerId+"footer",k))},controller:["$scope",function(a){this.rowStyle=function(b){var c=a.rowContainer,d=a.colContainer,e={};if(0===b&&0!==c.currentTopRow){var f=c.currentTopRow*c.grid.options.rowHeight;e["margin-top"]=f+"px"}return 0!==d.currentFirstColumn&&(d.grid.isRTL()?e["margin-right"]=d.columnOffset+"px":e["margin-left"]=d.columnOffset+"px"),e}}]}}])}(),function(){angular.module("ui.grid").directive("uiGridVisible",function(){return function(a,b,c){a.$watch(c.uiGridVisible,function(a){b[a?"removeClass":"addClass"]("ui-grid-invisible")})}})}(),function(){"use strict";function a(a,b,c,d,e,f){return{templateUrl:"ui-grid/ui-grid",scope:{uiGrid:"="},replace:!0,transclude:!0,controller:"uiGridController",compile:function(){return{post:function(a,b,g,h){function i(){b[0].offsetWidth<=0&&p>q?(setTimeout(i,o),q++):c(k)}function j(){angular.element(d).on("resize",m),b.on("$destroy",function(){angular.element(d).off("resize",m)}),a.$watch(function(){return n.hasLeftContainer()},function(a,b){a!==b&&n.refreshCanvas(!0)}),a.$watch(function(){return n.hasRightContainer()},function(a,b){a!==b&&n.refreshCanvas(!0)})}function k(){n.gridWidth=a.gridWidth=e.elementWidth(b),n.canvasWidth=h.grid.gridWidth,n.gridHeight=a.gridHeight=e.elementHeight(b),n.gridHeight<=n.options.rowHeight&&n.options.enableMinHeightCheck&&l(),n.refreshCanvas(!0)}function l(){var c=n.options.minRowsToShow*n.options.rowHeight,d=n.options.showHeader?n.options.headerRowHeight:0,g=n.calcFooterHeight(),h=0;n.options.enableHorizontalScrollbar===f.scrollbars.ALWAYS&&(h=e.getScrollbarWidth());var i=0;if(angular.forEach(n.options.columnDefs,function(a){a.hasOwnProperty("filter")?1>i&&(i=1):a.hasOwnProperty("filters")&&i(n.grid.rowHeaderColumns?n.grid.rowHeaderColumns.length:0);!g&&!c.uiGridColumns&&0===n.grid.options.columnDefs.length&&b.length>0&&n.grid.buildColumnDefsFromData(b),!g&&(n.grid.options.columnDefs.length>0||b.length>0)&&d.push(n.grid.buildColumns().then(function(){n.grid.preCompileCellTemplates()})),e.all(d).then(function(){n.grid.modifyRows(p).then(function(){n.grid.redrawInPlace(!0),a.$evalAsync(function(){n.grid.refreshCanvas(!0),n.grid.callDataChangeCallbacks(f.dataChange.ROW)})})})}}var n=this;n.grid=h.createGrid(a.uiGrid),n.grid.appScope=n.grid.appScope||a.$parent,b.addClass("grid"+n.grid.id),n.grid.rtl="rtl"===d.getStyles(b[0]).direction,a.grid=n.grid,c.uiGridColumns&&c.$observe("uiGridColumns",function(a){n.grid.options.columnDefs=a,n.grid.buildColumns().then(function(){n.grid.preCompileCellTemplates(),n.grid.refreshCanvas(!0)})});var o=[];n.grid.options.fastWatch?(n.uiGrid=a.uiGrid,angular.isString(a.uiGrid.data)?(o.push(a.$parent.$watch(a.uiGrid.data,m)),o.push(a.$parent.$watch(function(){return n.grid.appScope[a.uiGrid.data]?n.grid.appScope[a.uiGrid.data].length:void 0},m))):(o.push(a.$parent.$watch(function(){return a.uiGrid.data},m)),o.push(a.$parent.$watch(function(){return a.uiGrid.data.length},function(){m(a.uiGrid.data)}))),o.push(a.$parent.$watch(function(){return a.uiGrid.columnDefs},l)),o.push(a.$parent.$watch(function(){return a.uiGrid.columnDefs.length},function(){l(a.uiGrid.columnDefs)}))):(angular.isString(a.uiGrid.data)?o.push(a.$parent.$watchCollection(a.uiGrid.data,m)):o.push(a.$parent.$watchCollection(function(){return a.uiGrid.data},m)),o.push(a.$parent.$watchCollection(function(){return a.uiGrid.columnDefs},l)));var p,q=a.$watch(function(){return n.grid.styleComputations},function(){n.grid.refreshCanvas(!0)});a.$on("$destroy",function(){o.forEach(function(a){a()}),q()}),n.fireEvent=function(b,c){"undefined"!=typeof c&&void 0!==c||(c={}),"undefined"!=typeof c.grid&&void 0!==c.grid||(c.grid=n.grid),a.$broadcast(b,c)},n.innerCompile=function(b){k(b)(a)}}]),angular.module("ui.grid").directive("uiGrid",a),a.$inject=["$compile","$templateCache","$timeout","$window","gridUtil","uiGridConstants"]}(),function(){"use strict";angular.module("ui.grid").directive("uiGridPinnedContainer",["gridUtil",function(a){return{restrict:"EA",replace:!0,template:'
              ',scope:{side:"=uiGridPinnedContainer"},require:"^uiGrid",compile:function(){return{post:function(a,b,c,d){function e(){var a=this,b=0;a.visibleColumnCache.forEach(function(a){b+=a.drawnWidth});var c=a.getViewportAdjustment();return b+=c.width}function f(){if("left"===a.side||"right"===a.side){for(var b=h.renderContainers[a.side].visibleColumnCache,c=0,d=0;d0?b[0]:null},p.prototype.getColDef=function(a){var b=this.options.columnDefs.filter(function(b){return b.name===a});return b.length>0?b[0]:null},p.prototype.assignTypes=function(){var a=this;a.options.columnDefs.forEach(function(b,c){if(!b.type){var e=new g(b,c,a),f=a.rows.length>0?a.rows[0]:null;f?b.type=d.guessType(a.getCellValue(f,e)):b.type="string"}})},p.prototype.isRowHeaderColumn=function(a){return-1!==this.rowHeaderColumns.indexOf(a)},p.prototype.addRowHeaderColumn=function(a){var b=this,c=new g(a,d.nextUid(),b);c.isRowHeader=!0,b.isRTL()?(b.createRightContainer(),c.renderContainer="right"):(b.createLeftContainer(),c.renderContainer="left"),b.columnBuilders[0](a,c,b.options).then(function(){c.enableFiltering=!1,c.enableSorting=!1,c.enableHiding=!1,b.rowHeaderColumns.push(c),b.buildColumns().then(function(){b.preCompileCellTemplates(),b.queueGridRefresh()})})},p.prototype.getOnlyDataColumns=function(){var a=this,b=[];return a.columns.forEach(function(c){-1===a.rowHeaderColumns.indexOf(c)&&b.push(c)}),b},p.prototype.buildColumns=function(b){var c={orderByColumnDefs:!1};angular.extend(c,b);var e,f=this,h=[],i=f.rowHeaderColumns.length;for(e=0;ee;e++)f.columns[e+i].name!==f.options.columnDefs[e].name?j[e+i]=f.getColumn(f.options.columnDefs[e].name):j[e+i]=f.columns[e+i];f.columns.length=0,Array.prototype.splice.apply(f.columns,[0,0].concat(j))}return a.all(h).then(function(){f.rows.length>0&&f.assignTypes()})},p.prototype.preCompileCellTemplates=function(){var a=this,c=function(c){var d=c.cellTemplate.replace(e.MODEL_COL_FIELD,a.getQualifiedColField(c));d=d.replace(e.COL_FIELD,"grid.getCellValue(row, col)");var f=b(d);c.compiledElementFn=f,c.compiledElementFnDefer&&c.compiledElementFnDefer.resolve(c.compiledElementFn)};this.columns.forEach(function(a){a.cellTemplate?c(a):a.cellTemplatePromise&&a.cellTemplatePromise.then(function(){c(a)})})},p.prototype.getQualifiedColField=function(a){return"row.entity."+d.preEval(a.field)},p.prototype.createLeftContainer=function(){this.hasLeftContainer()||(this.renderContainers.left=new l("left",this,{disableColumnOffset:!0}))},p.prototype.createRightContainer=function(){this.hasRightContainer()||(this.renderContainers.right=new l("right",this,{disableColumnOffset:!0}))},p.prototype.hasLeftContainer=function(){return void 0!==this.renderContainers.left},p.prototype.hasRightContainer=function(){return void 0!==this.renderContainers.right},p.prototype.preprocessColDef=function(a){var b=this;if(!a.field&&!a.name)throw new Error("colDef.name or colDef.field property is required");if(void 0===a.name&&void 0!==a.field){for(var c=a.field,d=2;b.getColumn(c);)c=a.field+d.toString(),d++;a.name=c}},p.prototype.newInN=function(a,b,c,d){for(var e=this,f=[],g=0;g0?d[0]:null},p.prototype.modifyRows=function(b){var c=this,d=c.rows.slice(0),e=c.rowHashMap||c.createRowHashMap();c.rowHashMap=c.createRowHashMap(),c.rows.length=0,b.forEach(function(a,b){var f;f=c.options.enableRowHashing?e.get(a):c.getRow(a,d),f||(f=c.processRowBuilders(new h(a,b,c))),c.rows.push(f),c.rowHashMap.put(a,f)}),c.assignTypes();var f=a.when(c.processRowsProcessors(c.rows)).then(function(a){return c.setVisibleRows(a)}),g=a.when(c.processColumnsProcessors(c.columns)).then(function(a){return c.setVisibleColumns(a)});return a.all([f,g])},p.prototype.addRows=function(a){for(var b=this,c=b.rows.length,d=0;dd)d+=e.drawnWidth,c++;else{for(var g=0,h=f;h>=f-c;h--)g+=a.columns[h].drawnWidth;b>g&&c++}}),c},p.prototype.getBodyHeight=function(){var a=this.getViewportHeight();return a},p.prototype.getViewportHeight=function(){var a=this,b=this.gridHeight-this.headerHeight-this.footerHeight,c=a.getViewportAdjustment();return b+=c.height},p.prototype.getViewportWidth=function(){var a=this,b=this.gridWidth,c=a.getViewportAdjustment();return b+=c.width},p.prototype.getHeaderViewportWidth=function(){var a=this.getViewportWidth();return a},p.prototype.addVerticalScrollSync=function(a,b){this.verticalScrollSyncCallBackFns[a]=b},p.prototype.addHorizontalScrollSync=function(a,b){this.horizontalScrollSyncCallBackFns[a]=b},p.prototype.scrollContainers=function(a,b){if(b.y){var c=["body","left","right"];this.flagScrollingVertically(b),"body"===a?c=["left","right"]:"left"===a?c=["body","right"]:"right"===a&&(c=["body","left"]);for(var d=0;d=b&&(b=a.sort.priority+1)}),b},p.prototype.resetColumnSorting=function(a){var b=this;b.columns.forEach(function(b){b===a||b.suppressRemoveSort||(b.sort={})})},p.prototype.getColumnSorting=function(){var a,b=this,c=[];return a=b.columns.slice(0),a.sort(j.prioritySort).forEach(function(a){a.sort&&"undefined"!=typeof a.sort.direction&&a.sort.direction&&(a.sort.direction===e.ASC||a.sort.direction===e.DESC)&&c.push(a)}),c},p.prototype.sortColumn=function(b,c,d){var e=this,f=null;if("undefined"==typeof b||!b)throw new Error("No column parameter provided");if("boolean"==typeof c?d=c:f=c,d?b.sort.priority||(b.sort.priority=e.getNextColumnSortPriority()):(e.resetColumnSorting(b),b.sort.priority=void 0,b.sort.priority=e.getNextColumnSortPriority()),f)b.sort.direction=f;else{var g=b.sortDirectionCycle.indexOf(b.sort.direction?b.sort.direction:null);g=(g+1)%b.sortDirectionCycle.length,b.colDef&&b.suppressRemoveSort&&!b.sortDirectionCycle[g]&&(g=(g+1)%b.sortDirectionCycle.length),b.sortDirectionCycle[g]?b.sort.direction=b.sortDirectionCycle[g]:b.sort={}}return e.api.core.raise.sortChanged(e,e.getColumnSorting()),a.when(b)},p.prototype.renderingComplete=function(){angular.isFunction(this.options.onRegisterApi)&&this.options.onRegisterApi(this.api),this.api.core.raise.renderingComplete(this.api)},p.prototype.createRowHashMap=function(){var a=this,b=new o;return b.grid=a,b},p.prototype.refresh=function(b){var c=this,d=c.processRowsProcessors(c.rows).then(function(a){c.setVisibleRows(a)}),e=c.processColumnsProcessors(c.columns).then(function(a){c.setVisibleColumns(a)});return a.all([d,e]).then(function(){c.redrawInPlace(b),c.refreshCanvas(!0)})},p.prototype.refreshRows=function(){var a=this;return a.processRowsProcessors(a.rows).then(function(b){a.setVisibleRows(b),a.redrawInPlace(),a.refreshCanvas(!0)})},p.prototype.refreshCanvas=function(b){var c=this;b&&c.buildStyles();var e=a.defer(),f=[];for(var g in c.renderContainers)if(c.renderContainers.hasOwnProperty(g)){var h=c.renderContainers[g];if(null===h.canvasWidth||isNaN(h.canvasWidth))continue;(h.header||h.headerCanvas)&&(h.explicitHeaderHeight=h.explicitHeaderHeight||null,h.explicitHeaderCanvasHeight=h.explicitHeaderCanvasHeight||null,f.push(h))}return f.length>0?(b&&c.buildStyles(),m(function(){var a,g,h=!1,i=0,j=0,k=function(a,b){return a!==b&&(h=!0),b};for(a=0;ao?0:o,g.innerHeaderHeight=o,!g.explicitHeaderHeight&&o>i&&(i=o)}if(g.headerCanvas){var p=g.headerCanvasHeight=k(g.headerCanvasHeight,parseInt(d.outerElementHeight(g.headerCanvas),10));!g.explicitHeaderCanvasHeight&&p>j&&(j=p)}}for(a=0;a0&&"undefined"!=typeof g.headerHeight&&null!==g.headerHeight&&(g.explicitHeaderHeight||g.headerHeight0&&"undefined"!=typeof g.headerCanvasHeight&&null!==g.headerCanvasHeight&&(g.explicitHeaderCanvasHeight||g.headerCanvasHeight0},p.prototype.hasRightContainerColumns=function(){return this.hasRightContainer()&&this.renderContainers.right.renderedColumns.length>0},p.prototype.scrollToIfNecessary=function(b,c){var d=this,e=new n(d,"uiGrid.scrollToIfNecessary"),f=d.renderContainers.body.visibleRowCache,g=d.renderContainers.body.visibleColumnCache,h=d.renderContainers.body.prevScrollTop+d.headerHeight;h=0>h?0:h;var i=d.renderContainers.body.prevScrollLeft,j=d.renderContainers.body.prevScrollTop+d.gridHeight-d.renderContainers.body.headerHeight-d.footerHeight-d.scrollbarWidth,k=d.renderContainers.body.prevScrollLeft+Math.ceil(d.renderContainers.body.getViewportWidth());if(null!==b){var l=f.indexOf(b),m=d.renderContainers.body.getCanvasHeight()-d.renderContainers.body.getViewportHeight(),o=l*d.options.rowHeight+d.headerHeight;o=0>o?0:o;var p,q;h>o?(p=d.renderContainers.body.prevScrollTop-(h-o),q=p/m,e.y={percentage:q}):o>j&&(p=o-j+d.renderContainers.body.prevScrollTop,q=p/m,e.y={percentage:q})}if(null!==c){for(var r=g.indexOf(c),s=d.renderContainers.body.getCanvasWidth()-d.renderContainers.body.getViewportWidth(),t=0,u=0;r>u;u++){var v=g[u];t+=v.drawnWidth}t=0>t?0:t;var w=t+c.drawnWidth;w=0>w?0:w;var x,y;i>t?(x=d.renderContainers.body.prevScrollLeft-(i-t),y=x/s,y=y>1?1:y,e.x={percentage:y}):w>k&&(x=w-k+d.renderContainers.body.prevScrollLeft,y=x/s,y=y>1?1:y,e.x={percentage:y})}var z=a.defer();if(e.y||e.x){e.withDelay=!1,d.scrollContainers("",e);var A=d.api.core.on.scrollEnd(null,function(){z.resolve(e),A()})}else z.resolve();return z.promise},p.prototype.scrollTo=function(a,b){var c=null,d=null;return null!==a&&"undefined"!=typeof a&&(c=this.getRow(a)),null!==b&&"undefined"!=typeof b&&(d=this.getColumn(b.name?b.name:b.field)),this.scrollToIfNecessary(c,d)},p.prototype.clearAllFilters=function(a,b,c){return void 0===a&&(a=!0),void 0===b&&(b=!1),void 0===c&&(c=!1),this.columns.forEach(function(a){a.filters.forEach(function(a){a.term=void 0,b&&(a.condition=void 0),c&&(a.flags=void 0)})}),a?this.refreshRows():void 0},o.prototype={put:function(a,b){this[this.grid.options.rowIdentity(a)]=b},get:function(a){return this[this.grid.options.rowIdentity(a)]},remove:function(a){var b=this[a=this.grid.options.rowIdentity(a)];return delete this[a],b}},p}])}(),function(){angular.module("ui.grid").factory("GridApi",["$q","$rootScope","gridUtil","uiGridConstants","GridRow","uiGridGridMenuService",function(a,b,c,d,e,f){function g(a,c,d,e){return b.$on(a,function(a){var b=Array.prototype.slice.call(arguments);b.splice(0,1),c.apply(e?e:d.api,b)})}var h=function(a){this.grid=a,this.listeners=[],this.registerEvent("core","renderingComplete"),this.registerEvent("core","filterChanged"),this.registerMethod("core","setRowInvisible",e.prototype.setRowInvisible),this.registerMethod("core","clearRowInvisible",e.prototype.clearRowInvisible),this.registerMethod("core","getVisibleRows",this.grid.getVisibleRows),this.registerEvent("core","rowsVisibleChanged"),this.registerEvent("core","rowsRendered"),this.registerEvent("core","scrollBegin"),this.registerEvent("core","scrollEnd"),this.registerEvent("core","canvasHeightChanged")};return h.prototype.suppressEvents=function(a,b){var c=this,d=angular.isArray(a)?a:[a],e=c.listeners.filter(function(a){return d.some(function(b){return a.handler===b})});e.forEach(function(a){a.dereg()}),b(),e.forEach(function(a){a.dereg=g(a.eventId,a.handler,c.grid,a._this)})},h.prototype.registerEvent=function(a,d){var e=this;e[a]||(e[a]={});var f=e[a];f.on||(f.on={},f.raise={});var h=e.grid.id+a+d;f.raise[d]=function(){b.$emit.apply(b,[h].concat(Array.prototype.slice.call(arguments)))},f.on[d]=function(b,f,i){if(null!==b&&"undefined"==typeof b.$on)return void c.logError("asked to listen on "+a+".on."+d+" but scope wasn't passed in the input parameters. It is legitimate to pass null, but you've passed something else, so you probably forgot to provide scope rather than did it deliberately, not registering");var j=g(h,f,e.grid,i),k={handler:f,dereg:j,eventId:h,scope:b,_this:i};e.listeners.push(k);var l=function(){k.dereg();var a=e.listeners.indexOf(k);e.listeners.splice(a,1)};return b&&b.$on("$destroy",function(){l()}),l}},h.prototype.registerEventsFromObject=function(a){var b=this,c=[];angular.forEach(a,function(a,b){var d={name:b,events:[]};angular.forEach(a,function(a,b){d.events.push(b)}),c.push(d)}),c.forEach(function(a){a.events.forEach(function(c){b.registerEvent(a.name,c)})})},h.prototype.registerMethod=function(a,b,d,e){this[a]||(this[a]={});var f=this[a];f[b]=c.createBoundedWrapper(e||this.grid,d)},h.prototype.registerMethodsFromObject=function(a,b){var c=this,d=[];angular.forEach(a,function(a,b){var c={name:b,methods:[]};angular.forEach(a,function(a,b){c.methods.push({name:b,fn:a})}),d.push(c)}),d.forEach(function(a){a.methods.forEach(function(d){c.registerMethod(a.name,d.name,d.fn,b)})})},h}])}(),function(){angular.module("ui.grid").factory("GridColumn",["gridUtil","uiGridConstants","i18nService",function(a,b,c){function d(a,c,d){var e=this;e.grid=d,e.uid=c,e.updateColumnDef(a,!0),e.aggregationValue=void 0,e.updateAggregationValue=function(){if(!e.aggregationType)return void(e.aggregationValue=void 0);var a=0,c=e.grid.getVisibleRows(),d=function(){var a=[];return c.forEach(function(b){var c=e.grid.getCellValue(b,e),d=Number(c);isNaN(d)||a.push(d)}),a};angular.isFunction(e.aggregationType)?e.aggregationValue=e.aggregationType(c,e):e.aggregationType===b.aggregationTypes.count?e.aggregationValue=e.grid.getVisibleRowCount():e.aggregationType===b.aggregationTypes.sum?(d().forEach(function(b){a+=b}),e.aggregationValue=a):e.aggregationType===b.aggregationTypes.avg?(d().forEach(function(b){a+=b}),a/=d().length,e.aggregationValue=a):e.aggregationType===b.aggregationTypes.min?e.aggregationValue=Math.min.apply(null,d()):e.aggregationType===b.aggregationTypes.max?e.aggregationValue=Math.max.apply(null,d()):e.aggregationValue=" "},this.getAggregationValue=function(){return e.aggregationValue}}return d.prototype.hideColumn=function(){this.colDef.visible=!1},d.prototype.setPropertyOrDefault=function(a,b,c){var d=this;"undefined"!=typeof a[b]&&a[b]?d[b]=a[b]:"undefined"!=typeof d[b]?d[b]=d[b]:d[b]=c?c:{}},d.prototype.updateColumnDef=function(c,d){var e=this;if(e.colDef=c,void 0===c.name)throw new Error("colDef.name is required for column at index "+e.grid.options.columnDefs.indexOf(c));if(e.displayName=void 0===c.displayName?a.readableColumnName(c.name):c.displayName, +!angular.isNumber(e.width)||!e.hasCustomWidth||c.allowCustomWidthOverride){var f=c.width,g="Cannot parse column width '"+f+"' for column named '"+c.name+"'";if(e.hasCustomWidth=!1,angular.isString(f)||angular.isNumber(f))if(angular.isString(f))if(a.endsWith(f,"%")){var h=f.replace(/%/g,""),i=parseInt(h,10);if(isNaN(i))throw new Error(g);e.width=f}else if(f.match(/^(\d+)$/))e.width=parseInt(f.match(/^(\d+)$/)[1],10);else{if(!f.match(/^\*+$/))throw new Error(g);e.width=f}else e.width=f;else e.width="*"}["minWidth","maxWidth"].forEach(function(a){var b=c[a],d="Cannot parse column "+a+" '"+b+"' for column named '"+c.name+"'";if(angular.isString(b)||angular.isNumber(b))if(angular.isString(b)){if(!b.match(/^(\d+)$/))throw new Error(d);e[a]=parseInt(b.match(/^(\d+)$/)[1],10)}else e[a]=b;else e[a]="minWidth"===a?30:9e3}),e.field=void 0===c.field?c.name:c.field,"string"!=typeof e.field&&a.logError("Field is not a string, this is likely to break the code, Field is: "+e.field),e.name=c.name,e.displayName=void 0===c.displayName?a.readableColumnName(c.name):c.displayName,e.aggregationType=angular.isDefined(c.aggregationType)?c.aggregationType:null,e.footerCellTemplate=angular.isDefined(c.footerCellTemplate)?c.footerCellTemplate:null,"undefined"==typeof c.cellTooltip||c.cellTooltip===!1?e.cellTooltip=!1:c.cellTooltip===!0?e.cellTooltip=function(a,b){return e.grid.getCellValue(a,b)}:"function"==typeof c.cellTooltip?e.cellTooltip=c.cellTooltip:e.cellTooltip=function(a,b){return b.colDef.cellTooltip},"undefined"==typeof c.headerTooltip||c.headerTooltip===!1?e.headerTooltip=!1:c.headerTooltip===!0?e.headerTooltip=function(a){return a.displayName}:"function"==typeof c.headerTooltip?e.headerTooltip=c.headerTooltip:e.headerTooltip=function(a){return a.colDef.headerTooltip},e.footerCellClass=c.footerCellClass,e.cellClass=c.cellClass,e.headerCellClass=c.headerCellClass,e.cellFilter=c.cellFilter?c.cellFilter:"",e.sortCellFiltered=!!c.sortCellFiltered,e.filterCellFiltered=!!c.filterCellFiltered,e.headerCellFilter=c.headerCellFilter?c.headerCellFilter:"",e.footerCellFilter=c.footerCellFilter?c.footerCellFilter:"",e.visible=a.isNullOrUndefined(c.visible)||c.visible,e.headerClass=c.headerClass,e.enableSorting="undefined"!=typeof c.enableSorting?c.enableSorting:!0,e.sortingAlgorithm=c.sortingAlgorithm,e.sortDirectionCycle="undefined"!=typeof c.sortDirectionCycle?c.sortDirectionCycle:[null,b.ASC,b.DESC],"undefined"==typeof e.suppressRemoveSort&&(e.suppressRemoveSort="undefined"!=typeof c.suppressRemoveSort?c.suppressRemoveSort:!1),e.enableFiltering="undefined"!=typeof c.enableFiltering?c.enableFiltering:!0,e.setPropertyOrDefault(c,"menuItems",[]),d&&e.setPropertyOrDefault(c,"sort");var j=[];c.filter?j.push(c.filter):c.filters?j=c.filters:j.push({}),d?(e.setPropertyOrDefault(c,"filter"),e.setPropertyOrDefault(c,"filters",j)):e.filters.length===j.length&&e.filters.forEach(function(a,b){"undefined"!=typeof j[b].placeholder&&(a.placeholder=j[b].placeholder),"undefined"!=typeof j[b].ariaLabel&&(a.ariaLabel=j[b].ariaLabel),"undefined"!=typeof j[b].flags&&(a.flags=j[b].flags),"undefined"!=typeof j[b].type&&(a.type=j[b].type),"undefined"!=typeof j[b].selectOptions&&(a.selectOptions=j[b].selectOptions)})},d.prototype.unsort=function(){this.sort={},this.grid.api.core.raise.sortChanged(this.grid,this.grid.getColumnSorting())},d.prototype.getColClass=function(a){var c=b.COL_CLASS_PREFIX+this.uid;return a?"."+c:c},d.prototype.isPinnedLeft=function(){return"left"===this.renderContainer},d.prototype.isPinnedRight=function(){return"right"===this.renderContainer},d.prototype.getColClassDefinition=function(){return" .grid"+this.grid.id+" "+this.getColClass(!0)+" { min-width: "+this.drawnWidth+"px; max-width: "+this.drawnWidth+"px; }"},d.prototype.getRenderContainer=function(){var a=this,b=a.renderContainer;return null!==b&&""!==b&&void 0!==b||(b="body"),a.grid.renderContainers[b]},d.prototype.showColumn=function(){this.colDef.visible=!0},d.prototype.getAggregationText=function(){var a=this;if(a.colDef.aggregationHideLabel)return"";if(a.colDef.aggregationLabel)return a.colDef.aggregationLabel;switch(a.colDef.aggregationType){case b.aggregationTypes.count:return c.getSafeText("aggregation.count");case b.aggregationTypes.sum:return c.getSafeText("aggregation.sum");case b.aggregationTypes.avg:return c.getSafeText("aggregation.avg");case b.aggregationTypes.min:return c.getSafeText("aggregation.min");case b.aggregationTypes.max:return c.getSafeText("aggregation.max");default:return""}},d.prototype.getCellTemplate=function(){var a=this;return a.cellTemplatePromise},d.prototype.getCompiledElementFn=function(){var a=this;return a.compiledElementFnDefer.promise},d}])}(),function(){angular.module("ui.grid").factory("GridOptions",["gridUtil","uiGridConstants",function(a,b){return{initialize:function(c){return c.onRegisterApi=c.onRegisterApi||angular.noop(),c.data=c.data||[],c.columnDefs=c.columnDefs||[],c.excludeProperties=c.excludeProperties||["$$hashKey"],c.enableRowHashing=c.enableRowHashing!==!1,c.rowIdentity=c.rowIdentity||function(b){return a.hashKey(b)},c.getRowIdentity=c.getRowIdentity||function(a){return a.$$hashKey},c.flatEntityAccess=c.flatEntityAccess===!0,c.showHeader="undefined"!=typeof c.showHeader?c.showHeader:!0,c.showHeader?c.headerRowHeight="undefined"!=typeof c.headerRowHeight?c.headerRowHeight:30:c.headerRowHeight=0,c.rowHeight=c.rowHeight||30,c.minRowsToShow="undefined"!=typeof c.minRowsToShow?c.minRowsToShow:10,c.showGridFooter=c.showGridFooter===!0,c.showColumnFooter=c.showColumnFooter===!0,c.columnFooterHeight="undefined"!=typeof c.columnFooterHeight?c.columnFooterHeight:30,c.gridFooterHeight="undefined"!=typeof c.gridFooterHeight?c.gridFooterHeight:30,c.columnWidth="undefined"!=typeof c.columnWidth?c.columnWidth:50,c.maxVisibleColumnCount="undefined"!=typeof c.maxVisibleColumnCount?c.maxVisibleColumnCount:200,c.virtualizationThreshold="undefined"!=typeof c.virtualizationThreshold?c.virtualizationThreshold:20,c.columnVirtualizationThreshold="undefined"!=typeof c.columnVirtualizationThreshold?c.columnVirtualizationThreshold:10,c.excessRows="undefined"!=typeof c.excessRows?c.excessRows:4,c.scrollThreshold="undefined"!=typeof c.scrollThreshold?c.scrollThreshold:4,c.excessColumns="undefined"!=typeof c.excessColumns?c.excessColumns:4,c.horizontalScrollThreshold="undefined"!=typeof c.horizontalScrollThreshold?c.horizontalScrollThreshold:2,c.aggregationCalcThrottle="undefined"!=typeof c.aggregationCalcThrottle?c.aggregationCalcThrottle:500,c.wheelScrollThrottle="undefined"!=typeof c.wheelScrollThrottle?c.wheelScrollThrottle:70,c.scrollDebounce="undefined"!=typeof c.scrollDebounce?c.scrollDebounce:300,c.enableSorting=c.enableSorting!==!1,c.enableFiltering=c.enableFiltering===!0,c.enableColumnMenus=c.enableColumnMenus!==!1,c.enableVerticalScrollbar="undefined"!=typeof c.enableVerticalScrollbar?c.enableVerticalScrollbar:b.scrollbars.ALWAYS,c.enableHorizontalScrollbar="undefined"!=typeof c.enableHorizontalScrollbar?c.enableHorizontalScrollbar:b.scrollbars.ALWAYS,c.enableMinHeightCheck=c.enableMinHeightCheck!==!1,c.minimumColumnSize="undefined"!=typeof c.minimumColumnSize?c.minimumColumnSize:10,c.rowEquality=c.rowEquality||function(a,b){return a===b},c.headerTemplate=c.headerTemplate||null,c.footerTemplate=c.footerTemplate||"ui-grid/ui-grid-footer",c.gridFooterTemplate=c.gridFooterTemplate||"ui-grid/ui-grid-grid-footer",c.rowTemplate=c.rowTemplate||"ui-grid/ui-grid-row",c.appScopeProvider=c.appScopeProvider||null,c}}}])}(),function(){angular.module("ui.grid").factory("GridRenderContainer",["gridUtil","uiGridConstants",function(a,b){function c(a,b,c){var d=this;d.name=a,d.grid=b,d.visibleRowCache=[],d.visibleColumnCache=[],d.renderedRows=[],d.renderedColumns=[],d.prevScrollTop=0,d.prevScrolltopPercentage=0,d.prevRowScrollIndex=0,d.prevScrollLeft=0,d.prevScrollleftPercentage=0,d.prevColumnScrollIndex=0,d.columnStyles="",d.viewportAdjusters=[],d.hasHScrollbar=!1,d.hasVScrollbar=!1,d.canvasHeightShouldUpdate=!0,d.$$canvasHeight=0,c&&angular.isObject(c)&&angular.extend(d,c),b.registerStyleComputation({priority:5,func:function(){return d.updateColumnWidths(),d.columnStyles}})}return c.prototype.reset=function(){this.visibleColumnCache.length=0,this.visibleRowCache.length=0,this.renderedRows.length=0,this.renderedColumns.length=0},c.prototype.containsColumn=function(a){return-1!==this.visibleColumnCache.indexOf(a)},c.prototype.minRowsToRender=function(){for(var a=this,b=0,c=0,d=a.getViewportHeight(),e=a.visibleRowCache.length-1;d>c&&e>=0;e--)c+=a.visibleRowCache[e].height,b++;return b},c.prototype.minColumnsToRender=function(){for(var a=this,b=this.getViewportWidth(),c=0,d=0,e=0;ed)d+=f.drawnWidth?f.drawnWidth:0,c++;else{for(var g=0,h=e;h>=e-c;h--)g+=a.visibleColumnCache[h].drawnWidth?a.visibleColumnCache[h].drawnWidth:0;b>g&&c++}}return c},c.prototype.getVisibleRowCount=function(){return this.visibleRowCache.length},c.prototype.registerViewportAdjuster=function(a){this.viewportAdjusters.push(a)},c.prototype.removeViewportAdjuster=function(a){var b=this.viewportAdjusters.indexOf(a);b>-1&&this.viewportAdjusters.splice(b,1)},c.prototype.getViewportAdjustment=function(){var a=this,b={height:0,width:0};return a.viewportAdjusters.forEach(function(a){b=a.call(this,b)}),b},c.prototype.getMargin=function(a){var b=this,c=0;return b.viewportAdjusters.forEach(function(b){var d=b.call(this,{height:0,width:0});d.side&&d.side===a&&(c+=-1*d.width)}),c},c.prototype.getViewportHeight=function(){var a=this,b=a.headerHeight?a.headerHeight:a.grid.headerHeight,c=a.grid.gridHeight-b-a.grid.footerHeight,d=a.getViewportAdjustment();return c+=d.height},c.prototype.getViewportWidth=function(){var a=this,b=a.grid.gridWidth,c=a.getViewportAdjustment();return b+=c.width},c.prototype.getHeaderViewportWidth=function(){var a=this.getViewportWidth();return a},c.prototype.getCanvasHeight=function(){var a=this;if(!a.canvasHeightShouldUpdate)return a.$$canvasHeight;var b=a.$$canvasHeight;return a.$$canvasHeight=0,a.visibleRowCache.forEach(function(b){a.$$canvasHeight+=b.height}),a.canvasHeightShouldUpdate=!1,a.grid.api.core.raise.canvasHeightChanged(b,a.$$canvasHeight),a.$$canvasHeight},c.prototype.getVerticalScrollLength=function(){return this.getCanvasHeight()-this.getViewportHeight()+this.grid.scrollbarHeight},c.prototype.getCanvasWidth=function(){var a=this,b=a.canvasWidth;return b},c.prototype.setRenderedRows=function(a){this.renderedRows.length=a.length;for(var b=0;b0&&(this.grid.scrollDirection=b.scrollDirection.DOWN),0>d&&(this.grid.scrollDirection=b.scrollDirection.UP);var e=this.getVerticalScrollLength();return c=a/e,c>1&&(c=1),0>c&&(c=0),this.adjustScrollVertical(a,c),c}},c.prototype.scrollHorizontal=function(a){var c=-1;if(a!==this.prevScrollLeft){var d=a-this.prevScrollLeft;d>0&&(this.grid.scrollDirection=b.scrollDirection.RIGHT),0>d&&(this.grid.scrollDirection=b.scrollDirection.LEFT);var e=this.canvasWidth-this.getViewportWidth();return c=0!==e?a/e:0,this.adjustScrollHorizontal(a,c),c}},c.prototype.adjustScrollVertical=function(a,b,c){(this.prevScrollTop!==a||c)&&("undefined"!=typeof a&&void 0!==a&&null!==a||(a=(this.getCanvasHeight()-this.getViewportHeight())*b),this.adjustRows(a,b,!1),this.prevScrollTop=a,this.prevScrolltopPercentage=b,this.grid.queueRefresh())},c.prototype.adjustScrollHorizontal=function(a,b,c){(this.prevScrollLeft!==a||c)&&("undefined"!=typeof a&&void 0!==a&&null!==a||(a=(this.getCanvasWidth()-this.getViewportWidth())*b),this.adjustColumns(a,b),this.prevScrollLeft=a,this.prevScrollleftPercentage=b,this.grid.queueRefresh())},c.prototype.adjustRows=function(a,b,c){var d=this,e=d.minRowsToRender(),f=d.visibleRowCache,g=f.length-e;"undefined"!=typeof b&&null!==b||!a||(b=a/d.getVerticalScrollLength());var h=Math.ceil(Math.min(g,g*b));h>g&&(h=g);var i=[];if(f.length>d.grid.options.virtualizationThreshold){if("undefined"!=typeof a&&null!==a){if(!d.grid.suppressParentScrollDown&&d.prevScrollToph)return;if(!d.grid.suppressParentScrollUp&&d.prevScrollTop>a&&h>d.prevRowScrollIndex-d.grid.options.scrollThreshold&&g>h)return}var j={},k={};j=Math.max(0,h-d.grid.options.excessRows),k=Math.min(f.length,h+e+d.grid.options.excessRows),i=[j,k]}else{var l=d.visibleRowCache.length;i=[0,Math.max(l,e+d.grid.options.excessRows)]}d.updateViewableRowRange(i),d.prevRowScrollIndex=h},c.prototype.adjustColumns=function(a,b){var c=this,d=c.minColumnsToRender(),e=c.visibleColumnCache,f=e.length-d;if(("undefined"==typeof b||null===b)&&a){var g=c.getCanvasWidth()-c.getViewportWidth();b=a/g}var h=Math.ceil(Math.min(f,f*b));h>f&&(h=f);var i=[];if(e.length>c.grid.options.columnVirtualizationThreshold&&c.getCanvasWidth()>c.getViewportWidth()){var j=Math.max(0,h-c.grid.options.excessColumns),k=Math.min(e.length,h+d+c.grid.options.excessColumns);i=[j,k]}else{var l=c.visibleColumnCache.length;i=[0,Math.max(l,d+c.grid.options.excessColumns)]}c.updateViewableColumnRange(i),c.prevColumnScrollIndex=h},c.prototype.updateViewableRowRange=function(a){var b=this.visibleRowCache.slice(a[0],a[1]);this.currentTopRow=a[0],this.setRenderedRows(b)},c.prototype.updateViewableColumnRange=function(a){var b=this.visibleColumnCache.slice(a[0],a[1]);this.currentFirstColumn=a[0],this.setRenderedColumns(b)},c.prototype.headerCellWrapperStyle=function(){var a=this;if(0!==a.currentFirstColumn){var b=a.columnOffset;return a.grid.isRTL()?{"margin-right":b+"px"}:{"margin-left":b+"px"}}return null},c.prototype.updateColumnWidths=function(){var b=this,c=[],d=0,e=0,f="",g=b.grid.getViewportWidth()-b.grid.scrollbarWidth,h=[];angular.forEach(b.grid.renderContainers,function(a,b){h=h.concat(a.visibleColumnCache)}),h.forEach(function(b,f){var h=0;b.visible&&(angular.isNumber(b.width)?(h=parseInt(b.width,10),e+=h,b.drawnWidth=h):a.endsWith(b.width,"%")?(h=parseInt(parseInt(b.width.replace(/%/g,""),10)/100*g),h>b.maxWidth&&(h=b.maxWidth),h0){var j=i/d;c.forEach(function(a){var b=parseInt(a.width.length*j,10);b>a.maxWidth&&(b=a.maxWidth),b0&&(a.drawnWidth++,e++,l--,m=!0)},l=g-e,m=!0;l>0&&m;)m=!1,c.forEach(k);var n=function(a){a.drawnWidth>a.minWidth&&o>0&&(a.drawnWidth--,e--,o--,m=!0)},o=e-g;for(m=!0;o>0&&m;)m=!1,c.forEach(n);var p=0;b.visibleColumnCache.forEach(function(a){a.visible&&(p+=a.drawnWidth)}),h.forEach(function(a){f+=a.getColClassDefinition()}),b.canvasWidth=p,this.columnStyles=f},c.prototype.needsHScrollbarPlaceholder=function(){return this.grid.options.enableHorizontalScrollbar&&!this.hasHScrollbar&&!this.grid.disableScrolling},c.prototype.getViewportStyle=function(){var a=this,c={};return a.hasHScrollbar=!1,a.hasVScrollbar=!1,a.grid.disableScrolling?(c["overflow-x"]="hidden",c["overflow-y"]="hidden",c):("body"===a.name?(a.hasHScrollbar=a.grid.options.enableHorizontalScrollbar!==b.scrollbars.NEVER,a.grid.isRTL()?a.grid.hasLeftContainerColumns()||(a.hasVScrollbar=a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER):a.grid.hasRightContainerColumns()||(a.hasVScrollbar=a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER)):"left"===a.name?a.hasVScrollbar=a.grid.isRTL()?a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER:!1:a.hasVScrollbar=a.grid.isRTL()?!1:a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER,c["overflow-x"]=a.hasHScrollbar?"scroll":"hidden",c["overflow-y"]=a.hasVScrollbar?"scroll":"hidden",c)},c}])}(),function(){angular.module("ui.grid").factory("GridRow",["gridUtil",function(a){function b(b,c,d){this.grid=d,this.entity=b,this.uid=a.nextUid(),this.visible=!0,this.$$height=d.options.rowHeight}return Object.defineProperty(b.prototype,"height",{get:function(){return this.$$height},set:function(a){a!==this.$$height&&(this.grid.updateCanvasHeight(),this.$$height=a)}}),b.prototype.getQualifiedColField=function(a){return"row."+this.getEntityQualifiedColField(a)},b.prototype.getEntityQualifiedColField=function(b){return a.preEval("entity."+b.field)},b.prototype.setRowInvisible=function(a){a&&a.setThisRowInvisible&&a.setThisRowInvisible("user")},b.prototype.clearRowInvisible=function(a){a&&a.clearThisRowInvisible&&a.clearThisRowInvisible("user")},b.prototype.setThisRowInvisible=function(a,b){this.invisibleReason||(this.invisibleReason={}),this.invisibleReason[a]=!0,this.evaluateRowVisibility(b)},b.prototype.clearThisRowInvisible=function(a,b){"undefined"!=typeof this.invisibleReason&&delete this.invisibleReason[a],this.evaluateRowVisibility(b)},b.prototype.evaluateRowVisibility=function(a){var b=!0;"undefined"!=typeof this.invisibleReason&&angular.forEach(this.invisibleReason,function(a,c){a&&(b=!1)}),"undefined"!=typeof this.visible&&this.visible===b||(this.visible=b,a||(this.grid.queueGridRefresh(),this.grid.api.core.raise.rowsVisibleChanged(this)))},b}])}(),function(){"use strict";angular.module("ui.grid").factory("GridRowColumn",["$parse","$filter",function(a,b){var c=function d(a,b){if(!(this instanceof d))throw"Using GridRowColumn as a function insead of as a constructor. Must be called with `new` keyword";this.row=a,this.col=b};return c.prototype.getIntersectionValueRaw=function(){var b=a(this.row.getEntityQualifiedColField(this.col)),c=this.row;return b(c)},c.prototype.getIntersectionValueFiltered=function(){var a=this.getIntersectionValueRaw();if(this.col.cellFilter&&""!==this.col.cellFilter){var c=function(a){try{return b(a)}catch(c){return null}},d=c(this.col.cellFilter);if(d)a=d(a);else{var e,f=/([^:]*):([^:]*):?([\s\S]+)?/;null!==(e=f.exec(this.col.cellFilter))&&(a=b(e[1])(a,e[2],e[3]))}}return a},c}])}(),function(){angular.module("ui.grid").factory("ScrollEvent",["gridUtil",function(a){function b(b,c,d,e){var f=this;if(!b)throw new Error("grid argument is required");f.grid=b,f.source=e,f.withDelay=!0,f.sourceRowContainer=c,f.sourceColContainer=d,f.newScrollLeft=null,f.newScrollTop=null,f.x=null,f.y=null,f.verticalScrollLength=-9999999,f.horizontalScrollLength=-999999,f.fireThrottledScrollingEvent=a.throttle(function(a){f.grid.scrollContainers(a,f)},f.grid.options.wheelScrollThrottle,{trailing:!0})}return b.prototype.getNewScrollLeft=function(b,c){var d=this;if(!d.newScrollLeft){var e,f=b.getCanvasWidth()-b.getViewportWidth(),g=a.normalizeScrollLeft(c,d.grid);if("undefined"!=typeof d.x.percentage&&void 0!==d.x.percentage)e=d.x.percentage;else{if("undefined"==typeof d.x.pixels||void 0===d.x.pixels)throw new Error("No percentage or pixel value provided for scroll event X axis");e=d.x.percentage=(g+d.x.pixels)/f}return Math.max(0,e*f)}return d.newScrollLeft},b.prototype.getNewScrollTop=function(a,b){var c=this;if(!c.newScrollTop){var d,e=a.getVerticalScrollLength(),f=b[0].scrollTop;if("undefined"!=typeof c.y.percentage&&void 0!==c.y.percentage)d=c.y.percentage;else{if("undefined"==typeof c.y.pixels||void 0===c.y.pixels)throw new Error("No percentage or pixel value provided for scroll event Y axis");d=c.y.percentage=(f+c.y.pixels)/e}return Math.max(0,d*e)}return c.newScrollTop},b.prototype.atTop=function(a){return this.y&&(0===this.y.percentage||this.verticalScrollLength<0)&&0===a},b.prototype.atBottom=function(a){return this.y&&(1===this.y.percentage||0===this.verticalScrollLength)&&a>0},b.prototype.atLeft=function(a){return this.x&&(0===this.x.percentage||this.horizontalScrollLength<0)&&0===a},b.prototype.atRight=function(a){return this.x&&(1===this.x.percentage||0===this.horizontalScrollLength)&&a>0},b.Sources={ViewPortScroll:"ViewPortScroll",RenderContainerMouseWheel:"RenderContainerMouseWheel",RenderContainerTouchMove:"RenderContainerTouchMove",Other:99},b}])}(),function(){"use strict";angular.module("ui.grid").service("gridClassFactory",["gridUtil","$q","$compile","$templateCache","uiGridConstants","Grid","GridColumn","GridRow",function(a,b,c,d,e,f,g,h){var i={createGrid:function(d){d="undefined"!=typeof d?d:{},d.id=a.newId();var e=new f(d);if(e.options.rowTemplate){var g=b.defer();e.getRowTemplateFn=g.promise,a.getTemplate(e.options.rowTemplate).then(function(a){var b=c(a);g.resolve(b)},function(a){throw new Error("Couldn't fetch/use row template '"+e.options.rowTemplate+"'")})}return e.registerColumnBuilder(i.defaultColumnBuilder),e.registerRowBuilder(i.rowTemplateAssigner),e.registerRowsProcessor(function(a){return a.forEach(function(a){a.evaluateRowVisibility(!0)},50),a}),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.visible=!0}),a},50),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.colDef.visible===!1&&(a.visible=!1)}),a},50),e.registerRowsProcessor(e.searchRows,100),e.options.externalSort&&angular.isFunction(e.options.externalSort)?e.registerRowsProcessor(e.options.externalSort,200):e.registerRowsProcessor(e.sortByColumn,200),e},defaultColumnBuilder:function(c,d,f){var g=[],h=function(b,f,h,i,j){c[b]?d[f]=c[b]:d[f]=h,g.push(a.getTemplate(d[f]).then(function(a){angular.isFunction(a)&&(a=a());var c="cellTooltip"===j?"col.cellTooltip(row,col)":"col.headerTooltip(col)";j&&d[j]===!1?a=a.replace(e.TOOLTIP,""):j&&d[j]&&(a=a.replace(e.TOOLTIP,'title="{{'+c+' CUSTOM_FILTERS }}"')),i?d[b]=a.replace(e.CUSTOM_FILTERS,function(){return d[i]?"|"+d[i]:""}):d[b]=a},function(a){throw new Error("Couldn't fetch/use colDef."+b+" '"+c[b]+"'")}))};return h("cellTemplate","providedCellTemplate","ui-grid/uiGridCell","cellFilter","cellTooltip"),d.cellTemplatePromise=g[0],h("headerCellTemplate","providedHeaderCellTemplate","ui-grid/uiGridHeaderCell","headerCellFilter","headerTooltip"),h("footerCellTemplate","providedFooterCellTemplate","ui-grid/uiGridFooterCell","footerCellFilter"),h("filterHeaderTemplate","providedFilterHeaderTemplate","ui-grid/ui-grid-filter"),d.compiledElementFnDefer=b.defer(),b.all(g)},rowTemplateAssigner:function(d){var e=this;if(d.rowTemplate){var f=b.defer();d.getRowTemplateFn=f.promise,a.getTemplate(d.rowTemplate).then(function(a){var b=c(a);f.resolve(b)},function(a){throw new Error("Couldn't fetch/use row template '"+d.rowTemplate+"'")})}else d.rowTemplate=e.options.rowTemplate,d.getRowTemplateFn=e.getRowTemplateFn;return d.getRowTemplateFn}};return i}])}(),function(){function a(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var b=angular.module("ui.grid");b.service("rowSearcher",["gridUtil","uiGridConstants",function(b,c){var d=c.filter.CONTAINS,e={};return e.getTerm=function(a){if("undefined"==typeof a.term)return a.term;var b=a.term;return"string"==typeof b&&(b=b.trim()),b},e.stripTerm=function(b){var c=e.getTerm(b);return"string"==typeof c?a(c.replace(/(^\*|\*$)/g,"")):c},e.guessCondition=function(a){if("undefined"==typeof a.term||!a.term)return d;var b=e.getTerm(a);if(/\*/.test(b)){var c="";a.flags&&a.flags.caseSensitive||(c+="i");var f=b.replace(/(\\)?\*/g,function(a,b){return b?a:"[\\s\\S]*?"});return new RegExp("^"+f+"$",c)}return d},e.setupFilters=function(a){for(var d=[],f=a.length,g=0;f>g;g++){var h=a[g];if(h.noTerm||!b.isNullOrUndefined(h.term)){var i={},j="";h.flags&&h.flags.caseSensitive||(j+="i"),b.isNullOrUndefined(h.term)||(i.term=e.stripTerm(h)),h.condition?i.condition=h.condition:i.condition=e.guessCondition(h),i.flags=angular.extend({caseSensitive:!1,date:!1},h.flags),i.condition===c.filter.STARTS_WITH&&(i.startswithRE=new RegExp("^"+i.term,j)),i.condition===c.filter.ENDS_WITH&&(i.endswithRE=new RegExp(i.term+"$",j)),i.condition===c.filter.CONTAINS&&(i.containsRE=new RegExp(i.term,j)),i.condition===c.filter.EXACT&&(i.exactRE=new RegExp("^"+i.term+"$",j)),d.push(i)}}return d},e.runColumnFilter=function(a,b,d,e){var f,g=typeof e.condition,h=e.term;if(f=d.filterCellFiltered?a.getCellDisplayValue(b,d):a.getCellValue(b,d),e.condition instanceof RegExp)return e.condition.test(f);if("function"===g)return e.condition(h,f,b,d);if(e.startswithRE)return e.startswithRE.test(f);if(e.endswithRE)return e.endswithRE.test(f);if(e.containsRE)return e.containsRE.test(f);if(e.exactRE)return e.exactRE.test(f);if(e.condition===c.filter.NOT_EQUAL){var i=new RegExp("^"+h+"$");return!i.exec(f)}if("number"==typeof f&&"string"==typeof h){var j=parseFloat(h.replace(/\\\./,".").replace(/\\\-/,"-"));isNaN(j)||(h=j)}return e.flags.date===!0&&(f=new Date(f),h=new Date(h.replace(/\\/g,""))),e.condition===c.filter.GREATER_THAN?f>h:e.condition===c.filter.GREATER_THAN_OR_EQUAL?f>=h:e.condition===c.filter.LESS_THAN?h>f:e.condition===c.filter.LESS_THAN_OR_EQUAL?h>=f:!0},e.searchColumn=function(a,b,c,d){if(a.options.useExternalFiltering)return!0;for(var f=d.length,g=0;f>g;g++){var h=d[g],i=e.runColumnFilter(a,b,c,h);if(!i)return!1}return!0},e.search=function(a,c,d){if(c){if(!a.options.enableFiltering)return c;for(var f=[],g=d.length,h=function(a){var c=!1;return a.forEach(function(a){(!b.isNullOrUndefined(a.term)&&""!==a.term||a.noTerm)&&(c=!0)}),c},i=0;g>i;i++){var j=d[i];"undefined"!=typeof j.filters&&h(j.filters)&&f.push({col:j,filters:e.setupFilters(j.filters)})}if(f.length>0){for(var k=function(a,b,c,d){b.visible&&!e.searchColumn(a,b,c,d)&&(b.visible=!1)},l=function(a,b){for(var d=c.length,e=0;d>e;e++)k(a,c[e],b.col,b.filters)},m=f.length,n=0;m>n;n++)l(a,f[n]);a.api.core.raise.rowsVisibleChanged&&a.api.core.raise.rowsVisibleChanged()}return c}},e}])}(),function(){var a=angular.module("ui.grid");a.service("rowSorter",["$parse","uiGridConstants",function(a,b){var c="("+b.CURRENCY_SYMBOLS.map(function(a){return"\\"+a}).join("|")+")?",d=(new RegExp("^[-+]?"+c+"[\\d,.]+"+c+"%?$"),{colSortFnCache:{}});return d.guessSortFn=function(a){switch(a){case"number":return d.sortNumber;case"numberStr":return d.sortNumberStr;case"boolean":return d.sortBool;case"string":return d.sortAlpha;case"date":return d.sortDate;case"object":return d.basicSort;default:throw new Error("No sorting function found for type:"+a)}},d.handleNulls=function(a,b){if(!a&&0!==a&&a!==!1||!b&&0!==b&&b!==!1){if(!a&&0!==a&&a!==!1&&!b&&0!==b&&b!==!1)return 0;if(!a&&0!==a&&a!==!1)return 1;if(!b&&0!==b&&b!==!1)return-1}return null},d.basicSort=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a===b?0:b>a?-1:1},d.sortNumber=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a-b},d.sortNumberStr=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e,f,g=!1,h=!1;return e=parseFloat(a.replace(/[^0-9.-]/g,"")),isNaN(e)&&(g=!0),f=parseFloat(b.replace(/[^0-9.-]/g,"")),isNaN(f)&&(h=!0),g&&h?0:g?1:h?-1:e-f},d.sortAlpha=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e=a.toString().toLowerCase(),f=b.toString().toLowerCase();return e===f?0:e.localeCompare(f)},d.sortDate=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;a instanceof Date||(a=new Date(a)),b instanceof Date||(b=new Date(b));var e=a.getTime(),f=b.getTime();return e===f?0:f>e?-1:1},d.sortBool=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a&&b?0:a||b?a?1:-1:0},d.getSortFn=function(a,b,c){var e;return d.colSortFnCache[b.colDef.name]?e=d.colSortFnCache[b.colDef.name]:void 0!==b.sortingAlgorithm?(e=b.sortingAlgorithm,d.colSortFnCache[b.colDef.name]=b.sortingAlgorithm):b.sortCellFiltered&&b.cellFilter?(e=d.sortAlpha,d.colSortFnCache[b.colDef.name]=e):(e=d.guessSortFn(b.colDef.type),e?d.colSortFnCache[b.colDef.name]=e:e=d.sortAlpha),e},d.prioritySort=function(a,b){return void 0!==a.sort.priority&&void 0!==b.sort.priority?a.sort.priorityf;f+=2){var i=h[f];if("margin"===c){var j=parseFloat(e[c+i]);isNaN(j)||(g+=j)}if(d){if("content"===c){var k=parseFloat(e["padding"+i]);isNaN(k)||(g-=k)}if("margin"!==c){var l=parseFloat(e["border"+i+"Width"]);isNaN(l)||(g-=l)}}else{var m=parseFloat(e["padding"+i]);if(isNaN(m)||(g+=m),"padding"!==c){var n=parseFloat(e["border"+i+"Width"]);isNaN(n)||(g+=n)}}}return g}function c(c,d,e){var f,h=!0,i=a(c),j="border-box"===i.boxSizing;if(0>=f||null==f){if(f=i[d],(0>f||null==f)&&(f=c.style[d]),g.test(f))return f;h=j&&!0,f=parseFloat(f)||0}var k=f+b(c,d,e||(j?"border":"content"),h,i);return k}function d(b){b=angular.element(b)[0];var c=b.parentElement;return c||(c=document.getElementsByTagName("body")[0]),parseInt(a(c).fontSize)||parseInt(a(b).fontSize)||16}var e,f=angular.module("ui.grid");"function"!=typeof Function.prototype.bind&&(e=function(){var a=Array.prototype.slice;return function(b){var c=this,d=a.call(arguments,1);return d.length?function(){return arguments.length?c.apply(b,d.concat(a.call(arguments))):c.apply(b,d)}:function(){return arguments.length?c.apply(b,arguments):c.call(b)}}});var g=new RegExp("^("+/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source+")(?!px)[a-z%]+$","i"),h=/^(block|none|table(?!-c[ea]).+)/,i={position:"absolute",visibility:"hidden",display:"block"},j=["0","0","0","0"],k="uiGrid-";f.service("gridUtil",["$log","$window","$document","$http","$templateCache","$timeout","$interval","$injector","$q","$interpolate","uiGridConstants",function(f,g,l,m,n,o,p,q,r,s,t){function u(a,b){var c=angular.element(this),d=0,e=0,f=0,g=0;if(b.originalEvent&&(b=b.originalEvent),"detail"in b&&(f=-1*b.detail),"wheelDelta"in b&&(f=b.wheelDelta),"wheelDeltaY"in b&&(f=b.wheelDeltaY),"wheelDeltaX"in b&&(e=-1*b.wheelDeltaX),"axis"in b&&b.axis===b.HORIZONTAL_AXIS&&(e=-1*f,f=0),d=0===f?e:f,"deltaY"in b&&(f=-1*b.deltaY,d=f),"deltaX"in b&&(e=b.deltaX,0===f&&(d=-1*e)),0!==f||0!==e){if(1===b.deltaMode){var h=c.data("mousewheel-line-height");d*=h,f*=h,e*=h}else if(2===b.deltaMode){var i=c.data("mousewheel-page-height");d*=i,f*=i,e*=i}g=Math.max(Math.abs(f),Math.abs(e)),(!z||z>g)&&(z=g,w(b,g)&&(z/=40)),d=Math[d>=1?"floor":"ceil"](d/z),e=Math[e>=1?"floor":"ceil"](e/z),f=Math[f>=1?"floor":"ceil"](f/z),b.deltaMode=0;var j={originalEvent:b,deltaX:e,deltaY:f,deltaFactor:z,preventDefault:function(){b.preventDefault()},stopPropagation:function(){b.stopPropagation()}};y&&clearTimeout(y),y=setTimeout(v,200),a.call(c[0],j)}}function v(){z=null}function w(a,b){return"mousewheel"===a.type&&b%120===0}var x={augmentWidthOrHeight:b,getStyles:a,createBoundedWrapper:function(a,b){return function(){return b.apply(a,arguments)}},readableColumnName:function(a){return"undefined"==typeof a||void 0===a||null===a?a:("string"!=typeof a&&(a=String(a)),a.replace(/_+/g," ").replace(/^[A-Z]+$/,function(a){return angular.lowercase(angular.uppercase(a.charAt(0))+a.slice(1)); +}).replace(/([\w\u00C0-\u017F]+)/g,function(a){return angular.uppercase(a.charAt(0))+a.slice(1)}).replace(/(\w+?(?=[A-Z]))/g,"$1 "))},getColumnsFromData:function(a,b){var c=[];if(!a||"undefined"==typeof a[0]||void 0===a[0])return[];angular.isUndefined(b)&&(b=[]);var d=a[0];return angular.forEach(d,function(a,d){-1===b.indexOf(d)&&c.push({name:d})}),c},newId:function(){var a=(new Date).getTime();return function(){return a+=1}}(),getTemplate:function(a){if(n.get(a))return x.postProcessTemplate(n.get(a));if(a.hasOwnProperty("then"))return a.then(x.postProcessTemplate);try{if(angular.element(a).length>0)return r.when(a).then(x.postProcessTemplate)}catch(b){}return x.logDebug("fetching url",a),m({method:"GET",url:a}).then(function(b){var c=b.data.trim();return n.put(a,c),c},function(b){throw new Error("Could not get template "+a+": "+b)}).then(x.postProcessTemplate)},postProcessTemplate:function(a){var b=s.startSymbol(),c=s.endSymbol();return"{{"===b&&"}}"===c||(a=a.replace(/\{\{/g,b),a=a.replace(/\}\}/g,c)),r.when(a)},guessType:function(a){var b=typeof a;switch(b){case"number":case"boolean":case"string":return b;default:return angular.isDate(a)?"date":"object"}},elementWidth:function(a){},elementHeight:function(a){},getScrollbarWidth:function(){var a=document.createElement("div");a.style.visibility="hidden",a.style.width="100px",a.style.msOverflowStyle="scrollbar",document.body.appendChild(a);var b=a.offsetWidth;a.style.overflow="scroll";var c=document.createElement("div");c.style.width="100%",a.appendChild(c);var d=c.offsetWidth;return a.parentNode.removeChild(a),b-d},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},fakeElement:function(a,b,c,d){var e,f,g=angular.element(a).clone()[0];for(f in b)g.style[f]=b[f];return angular.element(document.body).append(g),e=c.call(g,g),angular.element(g).remove(),e},normalizeWheelEvent:function(a){var b,c,d,e=a||window.event,f=([].slice.call(arguments,1),0),g=0,h=0,i=0,j=0;return e.originalEvent&&(e=e.originalEvent),e.wheelDelta&&(f=e.wheelDelta),e.detail&&(f=-1*e.detail),h=f,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(h=0,g=-1*f),e.deltaY&&(h=-1*e.deltaY,f=h),e.deltaX&&(g=e.deltaX,f=-1*g),void 0!==e.wheelDeltaY&&(h=e.wheelDeltaY),void 0!==e.wheelDeltaX&&(g=e.wheelDeltaX),i=Math.abs(f),(!b||b>i)&&(b=i),j=Math.max(Math.abs(h),Math.abs(g)),(!c||c>j)&&(c=j),d=f>0?"floor":"ceil",f=Math[d](f/b),g=Math[d](g/c),h=Math[d](h/c),{delta:f,deltaX:g,deltaY:h}},isTouchEnabled:function(){var a;return("ontouchstart"in g||g.DocumentTouch&&l instanceof DocumentTouch)&&(a=!0),a},isNullOrUndefined:function(a){return void 0===a||null===a},endsWith:function(a,b){return a&&b&&"string"==typeof a?-1!==a.indexOf(b,a.length-b.length):!1},arrayContainsObjectWithProperty:function(a,b,c){var d=!1;return angular.forEach(a,function(a){a[b]===c&&(d=!0)}),d},numericAndNullSort:function(a,b){return null===a?1:null===b?-1:null===a&&null===b?0:a-b},disableAnimations:function(a){var b;try{b=q.get("$animate"),angular.version.major>1||1===angular.version.major&&angular.version.minor>=4?b.enabled(a,!1):b.enabled(!1,a)}catch(c){}},enableAnimations:function(a){var b;try{return b=q.get("$animate"),angular.version.major>1||1===angular.version.major&&angular.version.minor>=4?b.enabled(a,!0):b.enabled(!0,a),b}catch(c){}},nextUid:function(){for(var a,b=j.length;b;){if(b--,a=j[b].charCodeAt(0),57===a)return j[b]="A",k+j.join("");if(90!==a)return j[b]=String.fromCharCode(a+1),k+j.join("");j[b]="0"}return j.unshift("0"),k+j.join("")},hashKey:function(a){var b,c=typeof a;return"object"===c&&null!==a?"function"==typeof(b=a.$$hashKey)?b=a.$$hashKey():"undefined"!=typeof a.$$hashKey&&a.$$hashKey?b=a.$$hashKey:void 0===b&&(b=a.$$hashKey=x.nextUid()):b=a,c+":"+b},resetUids:function(){j=["0","0","0"]},logError:function(a){t.LOG_ERROR_MESSAGES&&f.error(a)},logWarn:function(a){t.LOG_WARN_MESSAGES&&f.warn(a)},logDebug:function(){t.LOG_DEBUG_MESSAGES&&f.debug.apply(f,arguments)}};x.focus={queue:[],byId:function(a,b){this._purgeQueue();var c=o(function(){var c=(b&&b.id?b.id+"-":"")+a,d=g.document.getElementById(c);d?d.focus():x.logWarn("[focus.byId] Element id "+c+" was not found.")});return this.queue.push(c),c},byElement:function(a){if(!angular.isElement(a))return x.logWarn("Trying to focus on an element that isn't an element."),r.reject("not-element");a=angular.element(a),this._purgeQueue();var b=o(function(){a&&a[0].focus()});return this.queue.push(b),b},bySelector:function(a,b,c){var d=this;if(!angular.isElement(a))throw new Error("The parent element is not an element.");a=angular.element(a);var e=function(){var c=a[0].querySelector(b);return d.byElement(c)};if(this._purgeQueue(),c){var f=o(e);return this.queue.push(o(e)),f}return e()},_purgeQueue:function(){this.queue.forEach(function(a){o.cancel(a)}),this.queue=[]}},["width","height"].forEach(function(b){var d=angular.uppercase(b.charAt(0))+b.substr(1);x["element"+d]=function(d,e){var f=d;if(f&&"undefined"!=typeof f.length&&f.length&&(f=d[0]),f){var g=a(f);return 0===f.offsetWidth&&h.test(g.display)?x.swap(f,i,function(){return c(f,b,e)}):c(f,b,e)}return null},x["outerElement"+d]=function(a,b){return a?x["element"+d].call(this,a,b?"margin":"border"):null}}),x.closestElm=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c;["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].some(function(a){return"function"==typeof document.body[a]?(c=a,!0):!1});for(var d;null!==a;){if(d=a.parentElement,null!==d&&d[c](b))return d;a=d}return null},x.type=function(a){var b=Function.prototype.toString.call(a.constructor);return b.match(/function (.*?)\(/)[1]},x.getBorderSize=function(b,c){"undefined"!=typeof b.length&&b.length&&(b=b[0]);var d=a(b);c=c?"border"+c.charAt(0).toUpperCase()+c.slice(1):"border",c+="Width";var e=parseInt(d[c],10);return isNaN(e)?0:e},x.detectBrowser=function(){var a=g.navigator.userAgent,b={chrome:/chrome/i,safari:/safari/i,firefox:/firefox/i,ie:/internet explorer|trident\//i};for(var c in b)if(b[c].test(a))return c;return"unknown"},x.rtlScrollType=function B(){if(B.type)return B.type;var a=angular.element('
              A
              ')[0],b="reverse";return document.body.appendChild(a),a.scrollLeft>0?b="default":(a.scrollLeft=1,0===a.scrollLeft&&(b="negative")),angular.element(a).remove(),B.type=b,b},x.normalizeScrollLeft=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c=a.scrollLeft;if(b.isRTL())switch(x.rtlScrollType()){case"default":return a.scrollWidth-c-a.clientWidth;case"negative":return Math.abs(c);case"reverse":return c}return c},x.denormalizeScrollLeft=function(a,b,c){if("undefined"!=typeof a.length&&a.length&&(a=a[0]),c.isRTL())switch(x.rtlScrollType()){case"default":var d=a.scrollWidth-a.clientWidth;return d-b;case"negative":return-1*b;case"reverse":return b}return b},x.preEval=function(a){var b=t.BRACKET_REGEXP.exec(a);if(b)return(b[1]?x.preEval(b[1]):b[1])+b[2]+(b[3]?x.preEval(b[3]):b[3]);a=a.replace(t.APOS_REGEXP,"\\'");var c=a.split(t.DOT_REGEXP),d=[c.shift()];return angular.forEach(c,function(a){d.push(a.replace(t.FUNC_REGEXP,"']$1"))}),d.join("['")},x.debounce=function(a,b,c){function d(){g=this,f=arguments;var d=function(){e=null,c||(h=a.apply(g,f))},i=c&&!e;return e&&o.cancel(e),e=o(d,b,!1),i&&(h=a.apply(g,f)),h}var e,f,g,h;return d.cancel=function(){o.cancel(e),e=null},d},x.throttle=function(a,b,c){function d(b){g=+new Date,a.apply(e,f),p(function(){h=null},0,1,!1)}c=c||{};var e,f,g=0,h=null;return function(){if(e=this,f=arguments,null===h){var a=+new Date-g;a>b?d():c.trailing&&(h=p(d,b-a,1,!1))}}},x.on={},x.off={},x._events={},x.addOff=function(a){x.off[a]=function(b,c){var d=x._events[a].indexOf(c);d>0&&x._events[a].removeAt(d)}};var y,z,A="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];return x.on.mousewheel=function(a,b){if(a&&b){var c=angular.element(a);c.data("mousewheel-line-height",d(c)),c.data("mousewheel-page-height",x.elementHeight(c)),c.data("mousewheel-callbacks")||c.data("mousewheel-callbacks",{});var f=c.data("mousewheel-callbacks");f[b]=(Function.prototype.bind||e).call(u,c[0],b);for(var g=A.length;g;)c.on(A[--g],f[b])}},x.off.mousewheel=function(a,b){var c=angular.element(a),d=c.data("mousewheel-callbacks"),e=d[b];if(e)for(var f=A.length;f;)c.off(A[--f],e);delete d[b],0===Object.keys(d).length&&(c.removeData("mousewheel-line-height"),c.removeData("mousewheel-page-height"),c.removeData("mousewheel-callbacks"))},x}]),f.filter("px",function(){return function(a){return a.match(/^[\d\.]+$/)?a+"px":a}})}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){var b={aggregate:{label:"položky"},groupPanel:{description:"Přesuňte záhlaví zde pro vytvoření skupiny dle sloupce."},search:{placeholder:"Hledat...",showingItems:"Zobrazuji položky:",selectedItems:"Vybrané položky:",totalItems:"Celkem položek:",size:"Velikost strany:",first:"První strana",next:"Další strana",previous:"Předchozí strana",last:"Poslední strana"},menu:{text:"Vyberte sloupec:"},sort:{ascending:"Seřadit od A-Z",descending:"Seřadit od Z-A",remove:"Odebrat seřazení"},column:{hide:"Schovat sloupec"},aggregation:{count:"celkem řádků: ",sum:"celkem: ",avg:"avg: ",min:"min.: ",max:"max.: "},pinning:{pinLeft:"Zamknout vlevo",pinRight:"Zamknout vpravo",unpin:"Odemknout"},gridMenu:{columns:"Sloupce:",importerTitle:"Importovat soubor",exporterAllAsCsv:"Exportovat všechna data do csv",exporterVisibleAsCsv:"Exportovat viditelná data do csv",exporterSelectedAsCsv:"Exportovat vybraná data do csv",exporterAllAsPdf:"Exportovat všechna data do pdf",exporterVisibleAsPdf:"Exportovat viditelná data do pdf",exporterSelectedAsPdf:"Exportovat vybraná data do pdf",clearAllFilters:"Odstranit všechny filtry"},importer:{noHeaders:"Názvy sloupců se nepodařilo získat, obsahuje soubor záhlaví?",noObjects:"Data se nepodařilo zpracovat, obsahuje soubor řádky mimo záhlaví?",invalidCsv:"Soubor nelze zpracovat, jedná se o CSV?",invalidJson:"Soubor nelze zpracovat, je to JSON?",jsonNotArray:"Soubor musí obsahovat json. Ukončuji.."},pagination:{sizes:"položek na stránku",totalItems:"položek"},grouping:{group:"Seskupit",ungroup:"Odebrat seskupení",aggregate_count:"Agregace: Count",aggregate_sum:"Agregace: Sum",aggregate_max:"Agregace: Max",aggregate_min:"Agregace: Min",aggregate_avg:"Agregace: Avg",aggregate_remove:"Agregace: Odebrat"}};return a.add("cs",b),a.add("cz",b),a.add("cs-cz",b),a.add("cs-CZ",b),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("da",{aggregate:{label:"artikler"},groupPanel:{description:"Grupér rækker udfra en kolonne ved at trække dens overskift hertil."},search:{placeholder:"Søg...",showingItems:"Viste rækker:",selectedItems:"Valgte rækker:",totalItems:"Rækker totalt:",size:"Side størrelse:",first:"Første side",next:"Næste side",previous:"Forrige side",last:"Sidste side"},menu:{text:"Vælg kolonner:"},sort:{ascending:"Sorter stigende",descending:"Sorter faldende",none:"Sorter ingen",remove:"Fjern sortering"},column:{hide:"Skjul kolonne"},aggregation:{count:"antal rækker: ",sum:"sum: ",avg:"gns: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("de",{headerCell:{aria:{defaultFilterLabel:"Filter für Spalte",removeFilter:"Filter löschen",columnMenuButtonLabel:"Spaltenmenü"},priority:"Priorität:",filterLabel:"Filter für Spalte: "},aggregate:{label:"Eintrag"},groupPanel:{description:"Ziehen Sie eine Spaltenüberschrift hierhin, um nach dieser Spalte zu gruppieren."},search:{placeholder:"Suche...",showingItems:"Zeige Einträge:",selectedItems:"Ausgewählte Einträge:",totalItems:"Einträge gesamt:",size:"Einträge pro Seite:",first:"Erste Seite",next:"Nächste Seite",previous:"Vorherige Seite",last:"Letzte Seite"},menu:{text:"Spalten auswählen:"},sort:{ascending:"aufsteigend sortieren",descending:"absteigend sortieren",none:"keine Sortierung",remove:"Sortierung zurücksetzen"},column:{hide:"Spalte ausblenden"},aggregation:{count:"Zeilen insgesamt: ",sum:"gesamt: ",avg:"Durchschnitt: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Links anheften",pinRight:"Rechts anheften",unpin:"Lösen"},columnMenu:{close:"Schließen"},gridMenu:{aria:{buttonLabel:"Tabellenmenü"},columns:"Spalten:",importerTitle:"Datei importieren",exporterAllAsCsv:"Alle Daten als CSV exportieren",exporterVisibleAsCsv:"sichtbare Daten als CSV exportieren",exporterSelectedAsCsv:"markierte Daten als CSV exportieren",exporterAllAsPdf:"Alle Daten als PDF exportieren",exporterVisibleAsPdf:"sichtbare Daten als PDF exportieren",exporterSelectedAsPdf:"markierte Daten als CSV exportieren",clearAllFilters:"Alle Filter zurücksetzen"},importer:{noHeaders:"Es konnten keine Spaltennamen ermittelt werden. Sind in der Datei Spaltendefinitionen enthalten?",noObjects:"Es konnten keine Zeileninformationen gelesen werden, Sind in der Datei außer den Spaltendefinitionen auch Daten enthalten?",invalidCsv:"Die Datei konnte nicht eingelesen werden, ist es eine gültige CSV-Datei?",invalidJson:"Die Datei konnte nicht eingelesen werden. Enthält sie gültiges JSON?",jsonNotArray:"Die importierte JSON-Datei muß ein Array enthalten. Breche Import ab."},pagination:{aria:{pageToFirst:"Zum Anfang",pageBack:"Seite zurück",pageSelected:"Ausgwählte Seite",pageForward:"Seite vor",pageToLast:"Zum Ende"},sizes:"Einträge pro Seite",totalItems:"Einträge",through:"bis",of:"von"},grouping:{group:"Gruppieren",ungroup:"Gruppierung aufheben",aggregate_count:"Agg: Anzahl",aggregate_sum:"Agg: Summe",aggregate_max:"Agg: Maximum",aggregate_min:"Agg: Minimum",aggregate_avg:"Agg: Mittelwert",aggregate_remove:"Aggregation entfernen"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("en",{headerCell:{aria:{defaultFilterLabel:"Filter for column",removeFilter:"Remove Filter",columnMenuButtonLabel:"Column Menu"},priority:"Priority:",filterLabel:"Filter for column: "},aggregate:{label:"items"},groupPanel:{description:"Drag a column header here and drop it to group by that column."},search:{placeholder:"Search...",showingItems:"Showing Items:",selectedItems:"Selected Items:",totalItems:"Total Items:",size:"Page Size:",first:"First Page",next:"Next Page",previous:"Previous Page",last:"Last Page"},menu:{text:"Choose Columns:"},sort:{ascending:"Sort Ascending",descending:"Sort Descending",none:"Sort None",remove:"Remove Sort"},column:{hide:"Hide Column"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin Left",pinRight:"Pin Right",unpin:"Unpin"},columnMenu:{close:"Close"},gridMenu:{aria:{buttonLabel:"Grid Menu"},columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."},pagination:{aria:{pageToFirst:"Page to first",pageBack:"Page back",pageSelected:"Selected page",pageForward:"Page forward",pageToLast:"Page to last"},sizes:"items per page",totalItems:"items",through:"through",of:"of"},grouping:{group:"Group",ungroup:"Ungroup",aggregate_count:"Agg: Count",aggregate_sum:"Agg: Sum",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Avg",aggregate_remove:"Agg: Remove"},validate:{error:"Error:",minLength:"Value should be at least THRESHOLD characters long.",maxLength:"Value should be at most THRESHOLD characters long.",required:"A value is needed."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("es",{aggregate:{label:"Artículos"},groupPanel:{description:"Arrastre un encabezado de columna aquí y suéltelo para agrupar por esa columna."},search:{placeholder:"Buscar...",showingItems:"Artículos Mostrados:",selectedItems:"Artículos Seleccionados:",totalItems:"Artículos Totales:",size:"Tamaño de Página:",first:"Primera Página",next:"Página Siguiente",previous:"Página Anterior",last:"Última Página"},menu:{text:"Elegir columnas:"},sort:{ascending:"Orden Ascendente",descending:"Orden Descendente",remove:"Sin Ordenar"},column:{hide:"Ocultar la columna"},aggregation:{count:"filas totales: ",sum:"total: ",avg:"media: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fijar a la Izquierda",pinRight:"Fijar a la Derecha",unpin:"Quitar Fijación"},gridMenu:{columns:"Columnas:",importerTitle:"Importar archivo",exporterAllAsCsv:"Exportar todo como csv",exporterVisibleAsCsv:"Exportar vista como csv",exporterSelectedAsCsv:"Exportar selección como csv",exporterAllAsPdf:"Exportar todo como pdf",exporterVisibleAsPdf:"Exportar vista como pdf",exporterSelectedAsPdf:"Exportar selección como pdf",clearAllFilters:"Limpiar todos los filtros"},importer:{noHeaders:"No fue posible derivar los nombres de las columnas, ¿tiene encabezados el archivo?",noObjects:"No fue posible obtener registros, ¿contiene datos el archivo, aparte de los encabezados?",invalidCsv:"No fue posible procesar el archivo, ¿es un CSV válido?",invalidJson:"No fue posible procesar el archivo, ¿es un Json válido?",jsonNotArray:"El archivo json importado debe contener un array, abortando."},pagination:{sizes:"registros por página",totalItems:"registros",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Cont",aggregate_sum:"Agr: Sum",aggregate_max:"Agr: Máx",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Prom",aggregate_remove:"Agr: Quitar"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fa",{aggregate:{label:"قلم"},groupPanel:{description:"عنوان یک ستون را بگیر و به گروهی از آن ستون رها کن."},search:{placeholder:"جستجو...",showingItems:"نمایش اقلام:",selectedItems:"قلم‌های انتخاب شده:",totalItems:"مجموع اقلام:",size:"اندازه‌ی صفحه:",first:"اولین صفحه",next:"صفحه‌ی‌بعدی",previous:"صفحه‌ی‌ قبلی",last:"آخرین صفحه"},menu:{text:"ستون‌های انتخابی:"},sort:{ascending:"ترتیب صعودی",descending:"ترتیب نزولی",remove:"حذف مرتب کردن"},column:{hide:"پنهان‌کردن ستون"},aggregation:{count:"تعداد: ",sum:"مجموع: ",avg:"میانگین: ",min:"کمترین: ",max:"بیشترین: "},pinning:{pinLeft:"پین کردن سمت چپ",pinRight:"پین کردن سمت راست",unpin:"حذف پین"},gridMenu:{columns:"ستون‌ها:",importerTitle:"وارد کردن فایل",exporterAllAsCsv:"خروجی تمام داده‌ها در فایل csv",exporterVisibleAsCsv:"خروجی داده‌های قابل مشاهده در فایل csv",exporterSelectedAsCsv:"خروجی داده‌های انتخاب‌شده در فایل csv",exporterAllAsPdf:"خروجی تمام داده‌ها در فایل pdf",exporterVisibleAsPdf:"خروجی داده‌های قابل مشاهده در فایل pdf",exporterSelectedAsPdf:"خروجی داده‌های انتخاب‌شده در فایل pdf",clearAllFilters:"پاک کردن تمام فیلتر"},importer:{noHeaders:"نام ستون قابل استخراج نیست. آیا فایل عنوان دارد؟",noObjects:"اشیا قابل استخراج نیستند. آیا به جز عنوان‌ها در فایل داده وجود دارد؟",invalidCsv:"فایل قابل پردازش نیست. آیا فرمت csv معتبر است؟",invalidJson:"فایل قابل پردازش نیست. آیا فرمت json معتبر است؟",jsonNotArray:"فایل json وارد شده باید حاوی آرایه باشد. عملیات ساقط شد."},pagination:{sizes:"اقلام در هر صفحه",totalItems:"اقلام",of:"از"},grouping:{group:"گروه‌بندی",ungroup:"حذف گروه‌بندی",aggregate_count:"Agg: تعداد",aggregate_sum:"Agg: جمع",aggregate_max:"Agg: بیشینه",aggregate_min:"Agg: کمینه",aggregate_avg:"Agg: میانگین",aggregate_remove:"Agg: حذف"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fi",{aggregate:{label:"rivit"},groupPanel:{description:"Raahaa ja pudota otsikko tähän ryhmittääksesi sarakkeen mukaan."},search:{placeholder:"Hae...",showingItems:"Näytetään rivejä:",selectedItems:"Valitut rivit:",totalItems:"Rivejä yht.:",size:"Näytä:",first:"Ensimmäinen sivu",next:"Seuraava sivu",previous:"Edellinen sivu",last:"Viimeinen sivu"},menu:{text:"Valitse sarakkeet:"},sort:{ascending:"Järjestä nouseva",descending:"Järjestä laskeva",remove:"Poista järjestys"},column:{hide:"Piilota sarake"},aggregation:{count:"Rivejä yht.: ",sum:"Summa: ",avg:"K.a.: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Lukitse vasemmalle",pinRight:"Lukitse oikealle",unpin:"Poista lukitus"},gridMenu:{columns:"Sarakkeet:",importerTitle:"Tuo tiedosto",exporterAllAsCsv:"Vie tiedot csv-muodossa",exporterVisibleAsCsv:"Vie näkyvä tieto csv-muodossa",exporterSelectedAsCsv:"Vie valittu tieto csv-muodossa",exporterAllAsPdf:"Vie tiedot pdf-muodossa",exporterVisibleAsPdf:"Vie näkyvä tieto pdf-muodossa",exporterSelectedAsPdf:"Vie valittu tieto pdf-muodossa",clearAllFilters:"Puhdista kaikki suodattimet"},importer:{noHeaders:"Sarakkeen nimiä ei voitu päätellä, onko tiedostossa otsikkoriviä?",noObjects:"Tietoja ei voitu lukea, onko tiedostossa muuta kuin otsikkot?",invalidCsv:"Tiedostoa ei voitu käsitellä, oliko se CSV-muodossa?",invalidJson:"Tiedostoa ei voitu käsitellä, oliko se JSON-muodossa?",jsonNotArray:"Tiedosto ei sisältänyt taulukkoa, lopetetaan."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fr",{aggregate:{label:"éléments"},groupPanel:{description:"Faites glisser une en-tête de colonne ici pour créer un groupe de colonnes."},search:{placeholder:"Recherche...",showingItems:"Affichage des éléments :",selectedItems:"Éléments sélectionnés :",totalItems:"Nombre total d'éléments:",size:"Taille de page:",first:"Première page",next:"Page Suivante",previous:"Page précédente",last:"Dernière page"},menu:{text:"Choisir des colonnes :"},sort:{ascending:"Trier par ordre croissant",descending:"Trier par ordre décroissant",remove:"Enlever le tri"},column:{hide:"Cacher la colonne"},aggregation:{count:"lignes totales: ",sum:"total: ",avg:"moy: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Épingler à gauche",pinRight:"Épingler à droite",unpin:"Détacher"},gridMenu:{columns:"Colonnes:",importerTitle:"Importer un fichier",exporterAllAsCsv:"Exporter toutes les données en CSV",exporterVisibleAsCsv:"Exporter les données visibles en CSV",exporterSelectedAsCsv:"Exporter les données sélectionnées en CSV",exporterAllAsPdf:"Exporter toutes les données en PDF",exporterVisibleAsPdf:"Exporter les données visibles en PDF",exporterSelectedAsPdf:"Exporter les données sélectionnées en PDF",clearAllFilters:"Nettoyez tous les filtres"},importer:{noHeaders:"Impossible de déterminer le nom des colonnes, le fichier possède-t-il une en-tête ?",noObjects:"Aucun objet trouvé, le fichier possède-t-il des données autres que l'en-tête ?",invalidCsv:"Le fichier n'a pas pu être traité, le CSV est-il valide ?",invalidJson:"Le fichier n'a pas pu être traité, le JSON est-il valide ?",jsonNotArray:"Le fichier JSON importé doit contenir un tableau, abandon."},pagination:{sizes:"éléments par page",totalItems:"éléments",of:"sur"},grouping:{group:"Grouper",ungroup:"Dégrouper",aggregate_count:"Agg: Compte",aggregate_sum:"Agg: Somme",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Moy",aggregate_remove:"Agg: Retirer"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("he",{aggregate:{label:"items"},groupPanel:{description:"גרור עמודה לכאן ושחרר בכדי לקבץ עמודה זו."},search:{placeholder:"חפש...",showingItems:"מציג:",selectedItems:'סה"כ נבחרו:',totalItems:'סה"כ רשומות:',size:"תוצאות בדף:",first:"דף ראשון",next:"דף הבא",previous:"דף קודם",last:"דף אחרון"},menu:{text:"בחר עמודות:"},sort:{ascending:"סדר עולה",descending:"סדר יורד",remove:"בטל"},column:{hide:"טור הסתר"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clean all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("hy",{aggregate:{label:"տվյալներ"},groupPanel:{description:"Ըստ սյան խմբավորելու համար քաշեք և գցեք վերնագիրն այստեղ։"},search:{placeholder:"Փնտրում...",showingItems:"Ցուցադրված տվյալներ՝",selectedItems:"Ընտրված:",totalItems:"Ընդամենը՝",size:"Տողերի քանակը էջում՝",first:"Առաջին էջ",next:"Հաջորդ էջ",previous:"Նախորդ էջ",last:"Վերջին էջ"},menu:{text:"Ընտրել սյուները:"},sort:{ascending:"Աճման կարգով",descending:"Նվազման կարգով",remove:"Հանել "},column:{hide:"Թաքցնել սյունը"},aggregation:{count:"ընդամենը տող՝ ",sum:"ընդամենը՝ ",avg:"միջին՝ ",min:"մին՝ ",max:"մաքս՝ "},pinning:{pinLeft:"Կպցնել ձախ կողմում",pinRight:"Կպցնել աջ կողմում",unpin:"Արձակել"},gridMenu:{columns:"Սյուներ:",importerTitle:"Ներմուծել ֆայլ",exporterAllAsCsv:"Արտահանել ամբողջը CSV",exporterVisibleAsCsv:"Արտահանել երևացող տվյալները CSV",exporterSelectedAsCsv:"Արտահանել ընտրված տվյալները CSV",exporterAllAsPdf:"Արտահանել PDF",exporterVisibleAsPdf:"Արտահանել երևացող տվյալները PDF",exporterSelectedAsPdf:"Արտահանել ընտրված տվյալները PDF",clearAllFilters:"Մաքրել բոլոր ֆիլտրերը"},importer:{noHeaders:"Հնարավոր չեղավ որոշել սյան վերնագրերը։ Արդյո՞ք ֆայլը ունի վերնագրեր։",noObjects:"Հնարավոր չեղավ կարդալ տվյալները։ Արդյո՞ք ֆայլում կան տվյալներ։",invalidCsv:"Հնարավոր չեղավ մշակել ֆայլը։ Արդյո՞ք այն վավեր CSV է։",invalidJson:"Հնարավոր չեղավ մշակել ֆայլը։ Արդյո՞ք այն վավեր Json է։",jsonNotArray:"Ներմուծված json ֆայլը պետք է պարունակի զանգված, կասեցվում է։"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("it",{aggregate:{label:"elementi"},groupPanel:{description:"Trascina un'intestazione all'interno del gruppo della colonna."},search:{placeholder:"Ricerca...",showingItems:"Mostra:",selectedItems:"Selezionati:",totalItems:"Totali:",size:"Tot Pagine:",first:"Prima",next:"Prossima",previous:"Precedente",last:"Ultima"},menu:{text:"Scegli le colonne:"},sort:{ascending:"Asc.",descending:"Desc.",remove:"Annulla ordinamento"},column:{hide:"Nascondi"},aggregation:{count:"righe totali: ",sum:"tot: ",avg:"media: ",min:"minimo: ",max:"massimo: "},pinning:{pinLeft:"Blocca a sx",pinRight:"Blocca a dx",unpin:"Blocca in alto"},gridMenu:{columns:"Colonne:",importerTitle:"Importa",exporterAllAsCsv:"Esporta tutti i dati in CSV",exporterVisibleAsCsv:"Esporta i dati visibili in CSV",exporterSelectedAsCsv:"Esporta i dati selezionati in CSV",exporterAllAsPdf:"Esporta tutti i dati in PDF",exporterVisibleAsPdf:"Esporta i dati visibili in PDF",exporterSelectedAsPdf:"Esporta i dati selezionati in PDF",clearAllFilters:"Pulire tutti i filtri"},importer:{noHeaders:"Impossibile reperire i nomi delle colonne, sicuro che siano indicati all'interno del file?",noObjects:"Impossibile reperire gli oggetti, sicuro che siano indicati all'interno del file?",invalidCsv:"Impossibile elaborare il file, sicuro che sia un CSV?",invalidJson:"Impossibile elaborare il file, sicuro che sia un JSON valido?",jsonNotArray:"Errore! Il file JSON da importare deve contenere un array."},grouping:{group:"Raggruppa",ungroup:"Separa",aggregate_count:"Agg: N. Elem.",aggregate_sum:"Agg: Somma",aggregate_max:"Agg: Massimo",aggregate_min:"Agg: Minimo",aggregate_avg:"Agg: Media",aggregate_remove:"Agg: Rimuovi"},validate:{error:"Errore:",minLength:"Lunghezza minima pari a THRESHOLD caratteri.",maxLength:"Lunghezza massima pari a THRESHOLD caratteri.",required:"Necessario inserire un valore."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ja",{aggregate:{label:"項目"},groupPanel:{description:"ここに列ヘッダをドラッグアンドドロップして、その列でグループ化します。"},search:{placeholder:"検索...",showingItems:"表示中の項目:",selectedItems:"選択した項目:",totalItems:"項目の総数:",size:"ページサイズ:",first:"最初のページ",next:"次のページ",previous:"前のページ",last:"前のページ"},menu:{text:"列の選択:"},sort:{ascending:"昇順に並べ替え",descending:"降順に並べ替え",remove:"並べ替えの解除"},column:{hide:"列の非表示"},aggregation:{count:"合計行数: ",sum:"合計: ",avg:"平均: ",min:"最小: ",max:"最大: "},pinning:{pinLeft:"左に固定",pinRight:"右に固定",unpin:"固定解除"},gridMenu:{columns:"列:",importerTitle:"ファイルのインポート",exporterAllAsCsv:"すべてのデータをCSV形式でエクスポート",exporterVisibleAsCsv:"表示中のデータをCSV形式でエクスポート",exporterSelectedAsCsv:"選択したデータをCSV形式でエクスポート",exporterAllAsPdf:"すべてのデータをPDF形式でエクスポート",exporterVisibleAsPdf:"表示中のデータをPDF形式でエクスポート",exporterSelectedAsPdf:"選択したデータをPDF形式でエクスポート",clearAllFilters:"すべてのフィルタを清掃してください"},importer:{noHeaders:"列名を取得できません。ファイルにヘッダが含まれていることを確認してください。",noObjects:"オブジェクトを取得できません。ファイルにヘッダ以外のデータが含まれていることを確認してください。",invalidCsv:"ファイルを処理できません。ファイルが有効なCSV形式であることを確認してください。",invalidJson:"ファイルを処理できません。ファイルが有効なJSON形式であることを確認してください。",jsonNotArray:"インポートしたJSONファイルには配列が含まれている必要があります。処理を中止します。"},pagination:{aria:{pageToFirst:"最初のページ",pageBack:"前のページ",pageSelected:"現在のページ",pageForward:"次のページ",pageToLast:"最後のページ"},sizes:"項目/ページ",totalItems:"項目",through:"から",of:"項目/全"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ko",{aggregate:{label:"아이템"},groupPanel:{description:"컬럼으로 그룹핑하기 위해서는 컬럼 헤더를 끌어 떨어뜨려 주세요."},search:{placeholder:"검색...",showingItems:"항목 보여주기:",selectedItems:"선택 항목:",totalItems:"전체 항목:",size:"페이지 크기:",first:"첫번째 페이지",next:"다음 페이지",previous:"이전 페이지",last:"마지막 페이지"},menu:{text:"컬럼을 선택하세요:"},sort:{ascending:"오름차순 정렬",descending:"내림차순 정렬",remove:"소팅 제거"},column:{hide:"컬럼 제거"},aggregation:{count:"전체 갯수: ",sum:"전체: ",avg:"평균: ",min:"최소: ",max:"최대: "},pinning:{pinLeft:"왼쪽 핀",pinRight:"오른쪽 핀",unpin:"핀 제거"},gridMenu:{columns:"컬럼:",importerTitle:"파일 가져오기",exporterAllAsCsv:"csv로 모든 데이터 내보내기",exporterVisibleAsCsv:"csv로 보이는 데이터 내보내기",exporterSelectedAsCsv:"csv로 선택된 데이터 내보내기",exporterAllAsPdf:"pdf로 모든 데이터 내보내기",exporterVisibleAsPdf:"pdf로 보이는 데이터 내보내기", +exporterSelectedAsPdf:"pdf로 선택 데이터 내보내기",clearAllFilters:"모든 필터를 청소"},importer:{noHeaders:"컬럼명이 지정되어 있지 않습니다. 파일에 헤더가 명시되어 있는지 확인해 주세요.",noObjects:"데이터가 지정되어 있지 않습니다. 데이터가 파일에 있는지 확인해 주세요.",invalidCsv:"파일을 처리할 수 없습니다. 올바른 csv인지 확인해 주세요.",invalidJson:"파일을 처리할 수 없습니다. 올바른 json인지 확인해 주세요.",jsonNotArray:"json 파일은 배열을 포함해야 합니다."},pagination:{sizes:"페이지당 항목",totalItems:"전체 항목"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("nl",{aggregate:{label:"items"},groupPanel:{description:"Sleep hier een kolomnaam heen om op te groeperen."},search:{placeholder:"Zoeken...",showingItems:"Getoonde items:",selectedItems:"Geselecteerde items:",totalItems:"Totaal aantal items:",size:"Items per pagina:",first:"Eerste pagina",next:"Volgende pagina",previous:"Vorige pagina",last:"Laatste pagina"},menu:{text:"Kies kolommen:"},sort:{ascending:"Sorteer oplopend",descending:"Sorteer aflopend",remove:"Verwijder sortering"},column:{hide:"Verberg kolom"},aggregation:{count:"Aantal rijen: ",sum:"Som: ",avg:"Gemiddelde: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Zet links vast",pinRight:"Zet rechts vast",unpin:"Maak los"},gridMenu:{columns:"Kolommen:",importerTitle:"Importeer bestand",exporterAllAsCsv:"Exporteer alle data als csv",exporterVisibleAsCsv:"Exporteer zichtbare data als csv",exporterSelectedAsCsv:"Exporteer geselecteerde data als csv",exporterAllAsPdf:"Exporteer alle data als pdf",exporterVisibleAsPdf:"Exporteer zichtbare data als pdf",exporterSelectedAsPdf:"Exporteer geselecteerde data als pdf",clearAllFilters:"Reinig alle filters"},importer:{noHeaders:"Kolomnamen kunnen niet worden afgeleid. Heeft het bestand een header?",noObjects:"Objecten kunnen niet worden afgeleid. Bevat het bestand data naast de headers?",invalidCsv:"Het bestand kan niet verwerkt worden. Is het een valide csv bestand?",invalidJson:"Het bestand kan niet verwerkt worden. Is het valide json?",jsonNotArray:"Het json bestand moet een array bevatten. De actie wordt geannuleerd."},pagination:{sizes:"items per pagina",totalItems:"items",of:"van de"},grouping:{group:"Groepeer",ungroup:"Groepering opheffen",aggregate_count:"Agg: Aantal",aggregate_sum:"Agg: Som",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Gem",aggregate_remove:"Agg: Verwijder"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pl",{headerCell:{aria:{defaultFilterLabel:"Filter dla kolumny",removeFilter:"Usuń filter",columnMenuButtonLabel:"Menu kolumny"},priority:"Prioritet:",filterLabel:"Filtr dla kolumny: "},aggregate:{label:"pozycji"},groupPanel:{description:"Przeciągnij nagłówek kolumny tutaj, aby pogrupować według niej."},search:{placeholder:"Szukaj...",showingItems:"Widoczne pozycje:",selectedItems:"Zaznaczone pozycje:",totalItems:"Wszystkich pozycji:",size:"Rozmiar strony:",first:"Pierwsza strona",next:"Następna strona",previous:"Poprzednia strona",last:"Ostatnia strona"},menu:{text:"Wybierz kolumny:"},sort:{ascending:"Sortuj rosnąco",descending:"Sortuj malejąco",none:"Brak sortowania",remove:"Wyłącz sortowanie"},column:{hide:"Ukryj kolumne"},aggregation:{count:"Razem pozycji: ",sum:"Razem: ",avg:"Średnia: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Przypnij do lewej",pinRight:"Przypnij do prawej",unpin:"Odepnij"},columnMenu:{close:"Zamknij"},gridMenu:{aria:{buttonLabel:"Menu Grida"},columns:"Kolumny:",importerTitle:"Importuj plik",exporterAllAsCsv:"Eksportuj wszystkie dane do csv",exporterVisibleAsCsv:"Eksportuj widoczne dane do csv",exporterSelectedAsCsv:"Eksportuj zaznaczone dane do csv",exporterAllAsPdf:"Eksportuj wszystkie dane do pdf",exporterVisibleAsPdf:"Eksportuj widoczne dane do pdf",exporterSelectedAsPdf:"Eksportuj zaznaczone dane do pdf",clearAllFilters:"Wyczyść filtry"},importer:{noHeaders:"Nie udało się wczytać nazw kolumn. Czy plik posiada nagłówek?",noObjects:"Nie udalo się wczytać pozycji. Czy plik zawiera dane??",invalidCsv:"Nie udało się przetworzyć pliku, jest to prawidlowy plik CSV??",invalidJson:"Nie udało się przetworzyć pliku, jest to prawidlowy plik Json?",jsonNotArray:"Importowany plik json musi zawierać tablicę, importowanie przerwane."},pagination:{aria:{pageToFirst:"Pierwsza strona",pageBack:"Poprzednia strona",pageSelected:"Wybrana strona",pageForward:"Następna strona",pageToLast:"Ostatnia strona"},sizes:"pozycji na stronę",totalItems:"pozycji",through:"do",of:"z"},grouping:{group:"Grupuj",ungroup:"Rozgrupuj",aggregate_count:"Zbiorczo: Razem",aggregate_sum:"Zbiorczo: Suma",aggregate_max:"Zbiorczo: Max",aggregate_min:"Zbiorczo: Min",aggregate_avg:"Zbiorczo: Średnia",aggregate_remove:"Zbiorczo: Usuń"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pt-br",{headerCell:{aria:{defaultFilterLabel:"Filtro por coluna",removeFilter:"Remover filtro",columnMenuButtonLabel:"Menu coluna"},priority:"Prioridade:",filterLabel:"Filtro por coluna: "},aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Items Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da Página:",first:"Primeira Página",next:"Próxima Página",previous:"Página Anterior",last:"Última Página"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",none:"Nenhuma Ordem",remove:"Remover Ordenação"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},columnMenu:{close:"Fechar"},gridMenu:{aria:{buttonLabel:"Menu Grid"},columns:"Colunas:",importerTitle:"Importar arquivo",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados visíveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados visíveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf",clearAllFilters:"Limpar todos os filtros"},importer:{noHeaders:"Nomes de colunas não puderam ser derivados. O arquivo tem um cabeçalho?",noObjects:"Objetos não puderam ser derivados. Havia dados no arquivo, além dos cabeçalhos?",invalidCsv:"Arquivo não pode ser processado. É um CSV válido?",invalidJson:"Arquivo não pode ser processado. É um Json válido?",jsonNotArray:"Arquivo json importado tem que conter um array. Abortando."},pagination:{aria:{pageToFirst:"Primeira página",pageBack:"Página anterior",pageSelected:"Página Selecionada",pageForward:"Proxima",pageToLast:"Anterior"},sizes:"itens por página",totalItems:"itens",through:"através dos",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Contar",aggregate_sum:"Agr: Soma",aggregate_max:"Agr: Max",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Med",aggregate_remove:"Agr: Remover"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pt",{headerCell:{aria:{defaultFilterLabel:"Filtro por coluna",removeFilter:"Remover filtro",columnMenuButtonLabel:"Menu coluna"},priority:"Prioridade:",filterLabel:"Filtro por coluna: "},aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Itens Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da Página:",first:"Primeira Página",next:"Próxima Página",previous:"Página Anterior",last:"Última Página"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",none:"Nenhuma Ordem",remove:"Remover Ordenação"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},columnMenu:{close:"Fechar"},gridMenu:{aria:{buttonLabel:"Menu Grid"},columns:"Colunas:",importerTitle:"Importar ficheiro",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados visíveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados visíveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf",clearAllFilters:"Limpar todos os filtros"},importer:{noHeaders:"Nomes de colunas não puderam ser derivados. O ficheiro tem um cabeçalho?",noObjects:"Objetos não puderam ser derivados. Havia dados no ficheiro, além dos cabeçalhos?",invalidCsv:"Ficheiro não pode ser processado. É um CSV válido?",invalidJson:"Ficheiro não pode ser processado. É um Json válido?",jsonNotArray:"Ficheiro json importado tem que conter um array. Interrompendo."},pagination:{aria:{pageToFirst:"Primeira página",pageBack:"Página anterior",pageSelected:"Página Selecionada",pageForward:"Próxima",pageToLast:"Anterior"},sizes:"itens por página",totalItems:"itens",through:"através dos",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Contar",aggregate_sum:"Agr: Soma",aggregate_max:"Agr: Max",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Med",aggregate_remove:"Agr: Remover"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ro",{headerCell:{aria:{defaultFilterLabel:"Filtru pentru coloana",removeFilter:"Sterge filtru",columnMenuButtonLabel:"Column Menu"},priority:"Prioritate:",filterLabel:"Filtru pentru coloana:"},aggregate:{label:"Elemente"},groupPanel:{description:"Trage un cap de coloana aici pentru a grupa elementele dupa coloana respectiva"},search:{placeholder:"Cauta...",showingItems:"Arata elementele:",selectedItems:"Elementele selectate:",totalItems:"Total elemente:",size:"Marime pagina:",first:"Prima pagina",next:"Pagina urmatoare",previous:"Pagina anterioara",last:"Ultima pagina"},menu:{text:"Alege coloane:"},sort:{ascending:"Ordoneaza crescator",descending:"Ordoneaza descrescator",none:"Fara ordonare",remove:"Sterge ordonarea"},column:{hide:"Ascunde coloana"},aggregation:{count:"total linii: ",sum:"total: ",avg:"medie: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin la stanga",pinRight:"Pin la dreapta",unpin:"Sterge pinul"},columnMenu:{close:"Inchide"},gridMenu:{aria:{buttonLabel:"Grid Menu"},columns:"Coloane:",importerTitle:"Incarca fisier",exporterAllAsCsv:"Exporta toate datele ca csv",exporterVisibleAsCsv:"Exporta datele vizibile ca csv",exporterSelectedAsCsv:"Exporta datele selectate ca csv",exporterAllAsPdf:"Exporta toate datele ca pdf",exporterVisibleAsPdf:"Exporta datele vizibile ca pdf",exporterSelectedAsPdf:"Exporta datele selectate ca csv pdf",clearAllFilters:"Sterge toate filtrele"},importer:{noHeaders:"Numele coloanelor nu a putut fi incarcat, acest fisier are un header?",noObjects:"Datele nu au putut fi incarcate, exista date in fisier in afara numelor de coloane?",invalidCsv:"Fisierul nu a putut fi procesat, ati incarcat un CSV valid ?",invalidJson:"Fisierul nu a putut fi procesat, ati incarcat un Json valid?",jsonNotArray:"Json-ul incarcat trebuie sa contina un array, inchidere."},pagination:{aria:{pageToFirst:"Prima pagina",pageBack:"O pagina inapoi",pageSelected:"Pagina selectata",pageForward:"O pagina inainte",pageToLast:"Ultima pagina"},sizes:"Elemente per pagina",totalItems:"elemente",through:"prin",of:"of"},grouping:{group:"Grupeaza",ungroup:"Opreste gruparea",aggregate_count:"Agg: Count",aggregate_sum:"Agg: Sum",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Avg",aggregate_remove:"Agg: Remove"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ru",{headerCell:{aria:{defaultFilterLabel:"Фильтр столбца",removeFilter:"Удалить фильтр",columnMenuButtonLabel:"Меню столбца"},priority:"Приоритет:",filterLabel:"Фильтр столбца: "},aggregate:{label:"элементы"},groupPanel:{description:"Для группировки по столбцу перетащите сюда его название."},search:{placeholder:"Поиск...",showingItems:"Показать элементы:",selectedItems:"Выбранные элементы:",totalItems:"Всего элементов:",size:"Размер страницы:",first:"Первая страница",next:"Следующая страница",previous:"Предыдущая страница",last:"Последняя страница"},menu:{text:"Выбрать столбцы:"},sort:{ascending:"По возрастанию",descending:"По убыванию",none:"Без сортировки",remove:"Убрать сортировку"},column:{hide:"Спрятать столбец"},aggregation:{count:"всего строк: ",sum:"итого: ",avg:"среднее: ",min:"мин: ",max:"макс: "},pinning:{pinLeft:"Закрепить слева",pinRight:"Закрепить справа",unpin:"Открепить"},columnMenu:{close:"Закрыть"},gridMenu:{aria:{buttonLabel:"Меню"},columns:"Столбцы:",importerTitle:"Импортировать файл",exporterAllAsCsv:"Экспортировать всё в CSV",exporterVisibleAsCsv:"Экспортировать видимые данные в CSV",exporterSelectedAsCsv:"Экспортировать выбранные данные в CSV",exporterAllAsPdf:"Экспортировать всё в PDF",exporterVisibleAsPdf:"Экспортировать видимые данные в PDF",exporterSelectedAsPdf:"Экспортировать выбранные данные в PDF",clearAllFilters:"Очистите все фильтры"},importer:{noHeaders:"Не удалось получить названия столбцов, есть ли в файле заголовок?",noObjects:"Не удалось получить данные, есть ли в файле строки кроме заголовка?",invalidCsv:"Не удалось обработать файл, это правильный CSV-файл?",invalidJson:"Не удалось обработать файл, это правильный JSON?",jsonNotArray:"Импортируемый JSON-файл должен содержать массив, операция отменена."},pagination:{aria:{pageToFirst:"Первая страница",pageBack:"Предыдущая страница",pageSelected:"Выбранная страница",pageForward:"Следующая страница",pageToLast:"Последняя страница"},sizes:"строк на страницу",totalItems:"строк",through:"по",of:"из"},grouping:{group:"Группировать",ungroup:"Разгруппировать",aggregate_count:"Группировать: Count",aggregate_sum:"Для группы: Сумма",aggregate_max:"Для группы: Максимум",aggregate_min:"Для группы: Минимум",aggregate_avg:"Для группы: Среднее",aggregate_remove:"Для группы: Пусто"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sk",{aggregate:{label:"items"},groupPanel:{description:"Pretiahni sem názov stĺpca pre zoskupenie podľa toho stĺpca."},search:{placeholder:"Hľadaj...",showingItems:"Zobrazujem položky:",selectedItems:"Vybraté položky:",totalItems:"Počet položiek:",size:"Počet:",first:"Prvá strana",next:"Ďalšia strana",previous:"Predchádzajúca strana",last:"Posledná strana"},menu:{text:"Vyberte stĺpce:"},sort:{ascending:"Zotriediť vzostupne",descending:"Zotriediť zostupne",remove:"Vymazať triedenie"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sv",{aggregate:{label:"Artiklar"},groupPanel:{description:"Dra en kolumnrubrik hit och släpp den för att gruppera efter den kolumnen."},search:{placeholder:"Sök...",showingItems:"Visar artiklar:",selectedItems:"Valda artiklar:",totalItems:"Antal artiklar:",size:"Sidstorlek:",first:"Första sidan",next:"Nästa sida",previous:"Föregående sida",last:"Sista sidan"},menu:{text:"Välj kolumner:"},sort:{ascending:"Sortera stigande",descending:"Sortera fallande",remove:"Inaktivera sortering"},column:{hide:"Göm kolumn"},aggregation:{count:"Antal rader: ",sum:"Summa: ",avg:"Genomsnitt: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Fäst vänster",pinRight:"Fäst höger",unpin:"Lösgör"},gridMenu:{columns:"Kolumner:",importerTitle:"Importera fil",exporterAllAsCsv:"Exportera all data som CSV",exporterVisibleAsCsv:"Exportera synlig data som CSV",exporterSelectedAsCsv:"Exportera markerad data som CSV",exporterAllAsPdf:"Exportera all data som PDF",exporterVisibleAsPdf:"Exportera synlig data som PDF",exporterSelectedAsPdf:"Exportera markerad data som PDF",clearAllFilters:"Rengör alla filter"},importer:{noHeaders:"Kolumnnamn kunde inte härledas. Har filen ett sidhuvud?",noObjects:"Objekt kunde inte härledas. Har filen data undantaget sidhuvud?",invalidCsv:"Filen kunde inte behandlas, är den en giltig CSV?",invalidJson:"Filen kunde inte behandlas, är den en giltig JSON?",jsonNotArray:"Importerad JSON-fil måste innehålla ett fält. Import avbruten."},pagination:{sizes:"Artiklar per sida",totalItems:"Artiklar"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ta",{aggregate:{label:"உருப்படிகள்"},groupPanel:{description:"ஒரு பத்தியை குழுவாக அமைக்க அப்பத்தியின் தலைப்பை இங்கே இழுத்து வரவும் "},search:{placeholder:"தேடல் ...",showingItems:"உருப்படிகளை காண்பித்தல்:",selectedItems:"தேர்ந்தெடுக்கப்பட்ட உருப்படிகள்:",totalItems:"மொத்த உருப்படிகள்:",size:"பக்க அளவு: ",first:"முதல் பக்கம்",next:"அடுத்த பக்கம்",previous:"முந்தைய பக்கம் ",last:"இறுதி பக்கம்"},menu:{text:"பத்திகளை தேர்ந்தெடு:"},sort:{ascending:"மேலிருந்து கீழாக",descending:"கீழிருந்து மேலாக",remove:"வரிசையை நீக்கு"},column:{hide:"பத்தியை மறைத்து வை "},aggregation:{count:"மொத்த வரிகள்:",sum:"மொத்தம்: ",avg:"சராசரி: ",min:"குறைந்தபட்ச: ",max:"அதிகபட்ச: "},pinning:{pinLeft:"இடதுபுறமாக தைக்க ",pinRight:"வலதுபுறமாக தைக்க",unpin:"பிரி"},gridMenu:{columns:"பத்திகள்:",importerTitle:"கோப்பு : படித்தல்",exporterAllAsCsv:"எல்லா தரவுகளையும் கோப்பாக்கு: csv",exporterVisibleAsCsv:"இருக்கும் தரவுகளை கோப்பாக்கு: csv",exporterSelectedAsCsv:"தேர்ந்தெடுத்த தரவுகளை கோப்பாக்கு: csv",exporterAllAsPdf:"எல்லா தரவுகளையும் கோப்பாக்கு: pdf",exporterVisibleAsPdf:"இருக்கும் தரவுகளை கோப்பாக்கு: pdf",exporterSelectedAsPdf:"தேர்ந்தெடுத்த தரவுகளை கோப்பாக்கு: pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"பத்தியின் தலைப்புகளை பெற இயலவில்லை, கோப்பிற்கு தலைப்பு உள்ளதா?",noObjects:"இலக்குகளை உருவாக்க முடியவில்லை, கோப்பில் தலைப்புகளை தவிர தரவு ஏதேனும் உள்ளதா? ",invalidCsv:"சரிவர நடைமுறை படுத்த இயலவில்லை, கோப்பு சரிதானா? - csv",invalidJson:"சரிவர நடைமுறை படுத்த இயலவில்லை, கோப்பு சரிதானா? - json",jsonNotArray:"படித்த கோப்பில் வரிசைகள் உள்ளது, நடைமுறை ரத்து செய் : json"},pagination:{sizes:"உருப்படிகள் / பக்கம்",totalItems:"உருப்படிகள் "},grouping:{group:"குழு",ungroup:"பிரி",aggregate_count:"மதிப்பீட்டு : எண்ணு",aggregate_sum:"மதிப்பீட்டு : கூட்டல்",aggregate_max:"மதிப்பீட்டு : அதிகபட்சம்",aggregate_min:"மதிப்பீட்டு : குறைந்தபட்சம்",aggregate_avg:"மதிப்பீட்டு : சராசரி",aggregate_remove:"மதிப்பீட்டு : நீக்கு"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("tr",{headerCell:{aria:{defaultFilterLabel:"Sütun için filtre",removeFilter:"Filtreyi Kaldır",columnMenuButtonLabel:"Sütun Menüsü"},priority:"Öncelik:",filterLabel:"Sütun için filtre: "},aggregate:{label:"kayıtlar"},groupPanel:{description:"Sütuna göre gruplamak için sütun başlığını buraya sürükleyin ve bırakın."},search:{placeholder:"Arama...",showingItems:"Gösterilen Kayıt:",selectedItems:"Seçili Kayıt:",totalItems:"Toplam Kayıt:",size:"Sayfa Boyutu:",first:"İlk Sayfa",next:"Sonraki Sayfa",previous:"Önceki Sayfa",last:"Son Sayfa"},menu:{text:"Sütunları Seç:"},sort:{ascending:"Artan Sırada Sırala",descending:"Azalan Sırada Sırala",none:"Sıralama Yapma",remove:"Sıralamayı Kaldır"},column:{hide:"Sütunu Gizle"},aggregation:{count:"toplam satır: ",sum:"toplam: ",avg:"ort: ",min:"min: ",max:"maks: "},pinning:{pinLeft:"Sola Sabitle",pinRight:"Sağa Sabitle",unpin:"Sabitlemeyi Kaldır"},columnMenu:{close:"Kapat"},gridMenu:{aria:{buttonLabel:"Tablo Menü"},columns:"Sütunlar:",importerTitle:"Dosya içeri aktar",exporterAllAsCsv:"Bütün veriyi CSV olarak dışarı aktar",exporterVisibleAsCsv:"Görünen veriyi CSV olarak dışarı aktar",exporterSelectedAsCsv:"Seçili veriyi CSV olarak dışarı aktar",exporterAllAsPdf:"Bütün veriyi PDF olarak dışarı aktar",exporterVisibleAsPdf:"Görünen veriyi PDF olarak dışarı aktar",exporterSelectedAsPdf:"Seçili veriyi PDF olarak dışarı aktar",clearAllFilters:"Bütün filtreleri kaldır"},importer:{noHeaders:"Sütun isimleri üretilemiyor, dosyanın bir başlığı var mı?",noObjects:"Nesneler üretilemiyor, dosyada başlıktan başka bir veri var mı?",invalidCsv:"Dosya işlenemedi, geçerli bir CSV dosyası mı?",invalidJson:"Dosya işlenemedi, geçerli bir Json dosyası mı?",jsonNotArray:"Alınan Json dosyasında bir dizi bulunmalıdır, işlem iptal ediliyor."},pagination:{aria:{pageToFirst:"İlk sayfaya",pageBack:"Geri git",pageSelected:"Seçili sayfa",pageForward:"İleri git",pageToLast:"Sona git"},sizes:"Sayfadaki nesne sayısı",totalItems:"kayıtlar",through:"",of:""},grouping:{group:"Grupla",ungroup:"Gruplama",aggregate_count:"Yekun: Sayı",aggregate_sum:"Yekun: Toplam",aggregate_max:"Yekun: Maks",aggregate_min:"Yekun: Min",aggregate_avg:"Yekun: Ort",aggregate_remove:"Yekun: Sil"}}),a}])}])}(),function(){var a=["uiT","uiTranslate"],b=["t","uiTranslate"],c=angular.module("ui.grid.i18n");c.constant("i18nConstants",{MISSING:"[MISSING]",UPDATE_EVENT:"$uiI18n",LOCALE_DIRECTIVE_ALIAS:"uiI18n",DEFAULT_LANG:"en"}),c.service("i18nService",["$log","i18nConstants","$rootScope",function(a,b,c){var d={_langs:{},current:null,get:function(a){return this._langs[a.toLowerCase()]},add:function(a,b){var c=a.toLowerCase();this._langs[c]||(this._langs[c]={}),angular.extend(this._langs[c],b)},getAllLangs:function(){var a=[];if(!this._langs)return a;for(var b in this._langs)a.push(b);return a},setCurrent:function(a){this.current=a.toLowerCase()},getCurrentLang:function(){return this.current}},e={add:function(a,b){"object"==typeof a?angular.forEach(a,function(a){a&&d.add(a,b)}):d.add(a,b)},getAllLangs:function(){return d.getAllLangs()},get:function(a){var b=a?a:e.getCurrentLang();return d.get(b)},getSafeText:function(a,c){var f=c?c:e.getCurrentLang(),g=d.get(f);if(!g)return b.MISSING;for(var h=a.split("."),i=g,j=0;jf?0===g?new d(a,c[h]):new d(e[g-1],c[h]):new d(a,c[h])},f.prototype.getRowColRight=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=f===c.length-1?0:f+1;return f>h?g===e.length-1?new d(a,c[h]):new d(e[g+1],c[h]):new d(a,c[h])},f.prototype.getRowColDown=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);return-1===f&&(f=0),g===e.length-1?new d(a,c[f]):new d(e[g+1],c[f])},f.prototype.getRowColPageDown=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=this.bodyContainer.minRowsToRender();return g>=e.length-h?new d(e[e.length-1],c[f]):new d(e[g+h],c[f])},f.prototype.getRowColUp=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);return-1===f&&(f=0),0===g?new d(a,c[f]):new d(e[g-1],c[f])},f.prototype.getRowColPageUp=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=this.bodyContainer.minRowsToRender();return 0>g-h?new d(e[0],c[f]):new d(e[g-h],c[f])},f}]),a.service("uiGridCellNavService",["gridUtil","uiGridConstants","uiGridCellNavConstants","$q","uiGridCellNavFactory","GridRowColumn","ScrollEvent",function(a,b,c,d,e,f,g){var h={initializeGrid:function(a){a.registerColumnBuilder(h.cellNavColumnBuilder),a.cellNav={},a.cellNav.lastRowCol=null,a.cellNav.focusedCells=[],h.defaultGridOptions(a.options);var b={events:{cellNav:{navigate:function(a,b){},viewPortKeyDown:function(a,b){},viewPortKeyPress:function(a,b){}}},methods:{cellNav:{scrollToFocus:function(b,c){return h.scrollToFocus(a,b,c)},getFocusedCell:function(){return a.cellNav.lastRowCol},getCurrentSelection:function(){return a.cellNav.focusedCells},rowColSelectIndex:function(b){for(var c=-1,d=0;db&&(c+=a.drawnWidth)});var e=0===d?0:(d+1)/a.renderContainers.body.visibleColumnCache.length;return c+=b.drawnWidth*e}};return h}]),a.directive("uiGridCellnav",["gridUtil","uiGridCellNavService","uiGridCellNavConstants","uiGridConstants","GridRowColumn","$timeout","$compile",function(a,b,c,d,e,f,g){return{replace:!0,priority:-150,require:"^uiGrid",scope:!1,controller:function(){},compile:function(){return{pre:function(a,f,g,h){var i=a,j=h.grid;b.initializeGrid(j),h.cellNav={},h.cellNav.makeRowCol=function(a){return a instanceof e||(a=new e(a.row,a.col)),a},h.cellNav.getActiveCell=function(){var a=f[0].getElementsByClassName("ui-grid-cell-focus");return a.length>0?a[0]:void 0},h.cellNav.broadcastCellNav=j.cellNav.broadcastCellNav=function(a,b,d){b=!(void 0===b||!b),a=h.cellNav.makeRowCol(a),h.cellNav.broadcastFocus(a,b,d),i.$broadcast(c.CELL_NAV_EVENT,a,b,d)},h.cellNav.clearFocus=j.cellNav.clearFocus=function(){j.cellNav.focusedCells=[],i.$broadcast(c.CELL_NAV_EVENT)},h.cellNav.broadcastFocus=function(a,b,c){b=!(void 0===b||!b),a=h.cellNav.makeRowCol(a);var d=a.row,f=a.col,g=h.grid.api.cellNav.rowColSelectIndex(a);if(null===j.cellNav.lastRowCol||-1===g){var i=new e(d,f);null!==j.cellNav.lastRowCol&&j.cellNav.lastRowCol.row===i.row&&j.cellNav.lastRowCol.col===i.col||(j.api.cellNav.raise.navigate(i,j.cellNav.lastRowCol),j.cellNav.lastRowCol=i),h.grid.options.modifierKeysToMultiSelectCells&&b?j.cellNav.focusedCells.push(a):j.cellNav.focusedCells=[a]}else j.options.modifierKeysToMultiSelectCells&&b&&g>=0&&j.cellNav.focusedCells.splice(g,1)},h.cellNav.handleKeyDown=function(a){var e=b.getDirection(a);if(null===e)return null;var f="body";a.uiGridTargetRenderContainerId&&(f=a.uiGridTargetRenderContainerId);var g=h.grid.api.cellNav.getFocusedCell();if(g){var i=h.grid.renderContainers[f].cellNav.getNextRowCol(e,g.row,g.col),k=h.grid.renderContainers[f].cellNav.getFocusableCols(),l=h.grid.api.cellNav.rowColSelectIndex(i);return e===c.direction.LEFT&&i.col===k[k.length-1]&&i.row===g.row&&a.keyCode===d.keymap.TAB&&a.shiftKey?(j.cellNav.focusedCells.splice(l,1),h.cellNav.clearFocus(),!0):e!==c.direction.RIGHT||i.col!==k[0]||i.row!==g.row||a.keyCode!==d.keymap.TAB||a.shiftKey?(j.scrollToIfNecessary(i.row,i.col).then(function(){h.cellNav.broadcastCellNav(i)}),a.stopPropagation(),a.preventDefault(),!1):(j.cellNav.focusedCells.splice(l,1),h.cellNav.clearFocus(),!0)}}},post:function(a,b,d,e){function f(){var d='
               
              ',e=g(d)(a);b.prepend(e),a.$on(c.CELL_NAV_EVENT,function(a,b,c,d){function f(a){a!==e.text()&&(e[0].style.clip="rect(0px,0px,0px,0px)",e[0].innerHTML="",e[0].style.visibility="hidden",e[0].style.visibility="visible",""!==a&&(e[0].style.clip="auto",e[0].appendChild(document.createTextNode(a+" ")),e[0].style.visibility="hidden",e[0].style.visibility="visible"))}if(!d||"focus"!==d.type){for(var g=[],i=h.api.cellNav.getCurrentSelection(),j=0;j
              ')(b);d.append(o),o.on("focus",function(a){a.uiGridTargetRenderContainerId=m;var b=j.grid.api.cellNav.getFocusedCell();null===b&&(b=j.grid.renderContainers[m].cellNav.getNextRowCol(g.direction.DOWN,null,null),b.row&&b.col&&j.cellNav.broadcastCellNav(b))}),l.setAriaActivedescendant=function(a){d.attr("aria-activedescendant",a)},l.removeAriaActivedescendant=function(a){d.attr("aria-activedescendant")===a&&d.attr("aria-activedescendant","")},j.focus=function(){c.focus.byElement(o[0])};var p=null;o.on("keydown",function(a){a.uiGridTargetRenderContainerId=m;var b=j.grid.api.cellNav.getFocusedCell(),c=j.cellNav.handleKeyDown(a);null===c&&(j.grid.api.cellNav.raise.viewPortKeyDown(a,b),p=b)}),o.on("keypress",function(b){p&&(a(function(){j.grid.api.cellNav.raise.viewPortKeyPress(b,p)},4),p=null)}),b.$on("$destroy",function(){o.off()})}}}}}}}]),a.directive("uiGridViewport",["$timeout","$document","gridUtil","uiGridConstants","uiGridCellNavService","uiGridCellNavConstants","$log","$compile",function(a,b,c,d,e,f,g,h){return{replace:!0,priority:-99999,require:["^uiGrid","^uiGridRenderContainer","?^uiGridCellnav"],scope:!1,compile:function(){return{pre:function(a,b,c,d){},post:function(a,b,c,d){var e=d[0],f=d[1];if(e.grid.api.cellNav){var g=f.containerId;if("body"===g){var h=e.grid;h.api.core.on.scrollBegin(a,function(a){var b=e.grid.api.cellNav.getFocusedCell();null!==b&&f.colContainer.containsColumn(b.col)&&e.cellNav.clearFocus()}),h.api.core.on.scrollEnd(a,function(a){var b=e.grid.api.cellNav.getFocusedCell();null!==b&&f.colContainer.containsColumn(b.col)&&e.cellNav.broadcastCellNav(b)}),h.api.cellNav.on.navigate(a,function(){e.focus()})}}}}}}}]),a.directive("uiGridCell",["$timeout","$document","uiGridCellNavService","gridUtil","uiGridCellNavConstants","uiGridConstants","GridRowColumn",function(a,b,c,d,e,f,g){return{priority:-150,restrict:"A",require:["^uiGrid","?^uiGridCellnav"],scope:!1,link:function(a,b,c,d){function f(a){a.preventDefault()}function h(){if(!a.focused){var c=b.find("div");c.addClass("ui-grid-cell-focus"),b.attr("aria-selected",!0),k.setAriaActivedescendant(b.attr("id")),a.focused=!0}}function i(){if(a.focused){var c=b.find("div");c.removeClass("ui-grid-cell-focus"),b.attr("aria-selected",!1),k.removeAriaActivedescendant(b.attr("id")),a.focused=!1}}var j=d[0],k=d[1];if(j.grid.api.cellNav&&a.col.colDef.allowCellFocus){var l=j.grid;a.focused=!1,b.attr("tabindex",-1),b.find("div").on("click",function(b){j.cellNav.broadcastCellNav(new g(a.row,a.col),b.ctrlKey||b.metaKey,b),b.stopPropagation(),a.$apply()}),b.on("mousedown",f),j.grid.api.edit&&(j.grid.api.edit.on.beginCellEdit(a,function(){b.off("mousedown",f)}),j.grid.api.edit.on.afterCellEdit(a,function(){b.on("mousedown",f)}),j.grid.api.edit.on.cancelCellEdit(a,function(){b.on("mousedown",f)})),b.on("focus",function(b){j.cellNav.broadcastCellNav(new g(a.row,a.col),!1,b),b.stopPropagation(),a.$apply()}),a.$on(e.CELL_NAV_EVENT,function(b,c,d){var e=l.cellNav.focusedCells.some(function(b,c){return b.row===a.row&&b.col===a.col});e?h():i()}),a.$on("$destroy",function(){b.find("div").off(),b.off()})}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.edit",["ui.grid"]);a.constant("uiGridEditConstants",{EDITABLE_CELL_TEMPLATE:/EDITABLE_CELL_TEMPLATE/g,EDITABLE_CELL_DIRECTIVE:/editable_cell_directive/g,events:{BEGIN_CELL_EDIT:"uiGridEventBeginCellEdit",END_CELL_EDIT:"uiGridEventEndCellEdit",CANCEL_CELL_EDIT:"uiGridEventCancelCellEdit"}}),a.service("uiGridEditService",["$q","uiGridConstants","gridUtil",function(a,b,c){var d={initializeGrid:function(a){d.defaultGridOptions(a.options),a.registerColumnBuilder(d.editColumnBuilder),a.edit={};var b={events:{edit:{afterCellEdit:function(a,b,c,d){},beginCellEdit:function(a,b,c){},cancelCellEdit:function(a,b){}}},methods:{edit:{}}};a.api.registerEventsFromObject(b.events)},defaultGridOptions:function(a){a.cellEditableCondition=void 0===a.cellEditableCondition?!0:a.cellEditableCondition,a.enableCellEditOnFocus=void 0===a.enableCellEditOnFocus?!1:a.enableCellEditOnFocus},editColumnBuilder:function(b,d,e){var f=[];return b.enableCellEdit=void 0===b.enableCellEdit?void 0===e.enableCellEdit?"object"!==b.type:e.enableCellEdit:b.enableCellEdit,b.cellEditableCondition=void 0===b.cellEditableCondition?e.cellEditableCondition:b.cellEditableCondition,b.enableCellEdit&&(b.editableCellTemplate=b.editableCellTemplate||e.editableCellTemplate||"ui-grid/cellEditor",f.push(c.getTemplate(b.editableCellTemplate).then(function(a){d.editableCellTemplate=a},function(a){throw new Error("Couldn't fetch/use colDef.editableCellTemplate '"+b.editableCellTemplate+"'")}))),b.enableCellEditOnFocus=void 0===b.enableCellEditOnFocus?e.enableCellEditOnFocus:b.enableCellEditOnFocus,a.all(f)},isStartEditKey:function(a){return!(a.metaKey||a.keyCode===b.keymap.ESC||a.keyCode===b.keymap.SHIFT||a.keyCode===b.keymap.CTRL||a.keyCode===b.keymap.ALT||a.keyCode===b.keymap.WIN||a.keyCode===b.keymap.CAPSLOCK||a.keyCode===b.keymap.LEFT||a.keyCode===b.keymap.TAB&&a.shiftKey||a.keyCode===b.keymap.RIGHT||a.keyCode===b.keymap.TAB||a.keyCode===b.keymap.UP||a.keyCode===b.keymap.ENTER&&a.shiftKey||a.keyCode===b.keymap.DOWN||a.keyCode===b.keymap.ENTER)}};return d}]),a.directive("uiGridEdit",["gridUtil","uiGridEditService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["uiGridEditConstants",function(a){return{replace:!0,priority:-99998,require:["^uiGrid","^uiGridRenderContainer"],scope:!1,compile:function(){return{post:function(b,c,d,e){var f=e[0];if(f.grid.api.edit&&f.grid.api.cellNav){var g=e[1].containerId;"body"===g&&(b.$on(a.events.CANCEL_CELL_EDIT,function(){f.focus()}),b.$on(a.events.END_CELL_EDIT,function(){f.focus()}))}}}}}}]),a.directive("uiGridCell",["$compile","$injector","$timeout","uiGridConstants","uiGridEditConstants","gridUtil","$parse","uiGridEditService","$rootScope","$q",function(a,b,c,d,e,f,g,h,i,j){var k=500;if(b.has("uiGridCellNavService")){b.get("uiGridCellNavService")}return{priority:-100,restrict:"A",scope:!1,require:"?^uiGrid",link:function(b,l,m,n){function o(){l.on("dblclick",u),l.on("touchstart",p),n&&n.grid.api.cellNav&&(G=n.grid.api.cellNav.on.viewPortKeyDown(b,function(a,c){null!==c&&(c.row!==b.row||c.col!==b.col||b.col.colDef.enableCellEditOnFocus||s(a))}),F=n.grid.api.cellNav.on.navigate(b,function(a,d){b.col.colDef.enableCellEditOnFocus&&(d&&a.row===d.row&&a.col===d.col||a.row!==b.row||a.col!==b.col||c(function(){u()}))})),b.beginEditEventsWired=!0}function p(a){"undefined"!=typeof a.originalEvent&&void 0!==a.originalEvent&&(a=a.originalEvent),l.on("touchend",q),C=c(function(){},k),C.then(function(){setTimeout(u,0),l.off("touchend",q)})}function q(a){c.cancel(C),l.off("touchend",q)}function r(){l.off("dblclick",u),l.off("keydown",s),l.off("touchstart",p),F(),G(),b.beginEditEventsWired=!1}function s(a){h.isStartEditKey(a)&&u(a)}function t(a,c){return!c.isSaving&&(angular.isFunction(a.colDef.cellEditableCondition)?a.colDef.cellEditableCondition(b):a.colDef.cellEditableCondition)}function u(a){b.grid.api.core.scrollToIfNecessary(b.row,b.col).then(function(){v(a)})}function v(h){if(!E&&t(b.col,b.row)){B=g(b.row.getQualifiedColField(b.col)),A=B(b),z=b.col.editableCellTemplate,z=b.col.colDef.editModelField?z.replace(d.MODEL_COL_FIELD,f.preEval("row.entity."+b.col.colDef.editModelField)):z.replace(d.MODEL_COL_FIELD,b.row.getQualifiedColField(b.col)),z=z.replace(d.COL_FIELD,"grid.getCellValue(row, col)");var k=b.col.colDef.editDropdownFilter?"|"+b.col.colDef.editDropdownFilter:"";z=z.replace(d.CUSTOM_FILTERS,k);var m="text";switch(b.col.colDef.type){case"boolean":m="checkbox";break;case"number":m="number";break;case"date":m="date"}z=z.replace("INPUT_TYPE",m);var n=b.col.colDef.editDropdownOptionsFunction;if(n)j.when(n(b.row.entity,b.col.colDef)).then(function(a){b.editDropdownOptionsArray=a});else{var o=b.col.colDef.editDropdownRowEntityOptionsArrayPath;o?b.editDropdownOptionsArray=y(b.row.entity,o):b.editDropdownOptionsArray=b.col.colDef.editDropdownOptionsArray}b.editDropdownIdLabel=b.col.colDef.editDropdownIdLabel?b.col.colDef.editDropdownIdLabel:"id",b.editDropdownValueLabel=b.col.colDef.editDropdownValueLabel?b.col.colDef.editDropdownValueLabel:"value";var p=function(){E=!0,r();var c=angular.element(z);l.append(c),D=b.$new(),a(c)(D);var d=angular.element(l.children()[0]);d.addClass("ui-grid-cell-contents-hidden")};i.$$phase?p():b.$apply(p);var q=b.col.grid.api.core.on.scrollBegin(b,function(){b.grid.disableScrolling||(w(),b.grid.api.edit.raise.afterCellEdit(b.row.entity,b.col.colDef,B(b),A),q(),s(),u())}),s=b.$on(e.events.END_CELL_EDIT,function(){w(),b.grid.api.edit.raise.afterCellEdit(b.row.entity,b.col.colDef,B(b),A),s(),q(),u()}),u=b.$on(e.events.CANCEL_CELL_EDIT,function(){x(),u(),q(),s()});b.$broadcast(e.events.BEGIN_CELL_EDIT,h),c(function(){b.grid.api.edit.raise.beginCellEdit(b.row.entity,b.col.colDef,h)})}}function w(){if(b.grid.disableScrolling=!1,E){n&&n.grid.api.cellNav&&n.focus();var a=angular.element(l.children()[0]);D.$destroy(),angular.element(l.children()[1]).remove(),a.removeClass("ui-grid-cell-contents-hidden"),E=!1,o(),b.grid.api.core.notifyDataChange(d.dataChange.EDIT)}}function x(){b.grid.disableScrolling=!1,E&&(B.assign(b,A),b.$apply(),b.grid.api.edit.raise.cancelCellEdit(b.row.entity,b.col.colDef),w())}function y(a,b){b=b.replace(/\[(\w+)\]/g,".$1"),b=b.replace(/^\./,"");for(var c=b.split(".");c.length;){var d=c.shift();if(!(d in a))return;a=a[d]}return a}var z,A,B,C,D,E=!1;if(b.col.colDef.enableCellEdit){var F=function(){},G=function(){},H=function(){b.col.colDef.enableCellEdit&&b.row.enableCellEdit!==!1?b.beginEditEventsWired||o():b.beginEditEventsWired&&r()};H();var I=b.$watch("row",function(a,b){a!==b&&H()});b.$on("$destroy",I)}}}}]),a.directive("uiGridEditor",["gridUtil","uiGridConstants","uiGridEditConstants","$timeout","uiGridEditService",function(a,b,c,d,e){return{scope:!0,require:["?^uiGrid","?^uiGridRenderContainer","ngModel"],compile:function(){return{pre:function(a,b,c){},post:function(a,f,g,h){var i,j,k;h[0]&&(i=h[0]),h[1]&&(j=h[1]),h[2]&&(k=h[2]),a.$on(c.events.BEGIN_CELL_EDIT,function(b,c){if(d(function(){if(f[0].focus(),f[0].select&&a.col.colDef.enableCellEditOnFocus||!i||!i.grid.api.cellNav)f[0].select();else try{f[0].setSelectionRange(f[0].value.length,f[0].value.length)}catch(b){}}),i&&i.grid.api.cellNav)var g=i.grid.api.cellNav.on.viewPortKeyPress(a,function(a,b){e.isStartEditKey(a)&&(k.$setViewValue(String.fromCharCode("number"==typeof a.which?a.which:a.keyCode),a),k.$render()),g()});f.on("blur",function(b){a.stopEdit(b)})}),a.deepEdit=!1,a.stopEdit=function(b){a.inputForm&&!a.inputForm.$valid?(b.stopPropagation(),a.$emit(c.events.CANCEL_CELL_EDIT)):a.$emit(c.events.END_CELL_EDIT),a.deepEdit=!1},f.on("click",function(b){"checkbox"!==f[0].type&&(a.deepEdit=!0,d(function(){a.grid.disableScrolling=!0}))}),f.on("keydown",function(d){switch(d.keyCode){case b.keymap.ESC:d.stopPropagation(),a.$emit(c.events.CANCEL_CELL_EDIT)}if(!a.deepEdit||d.keyCode!==b.keymap.LEFT&&d.keyCode!==b.keymap.RIGHT&&d.keyCode!==b.keymap.UP&&d.keyCode!==b.keymap.DOWN)if(i&&i.grid.api.cellNav)d.uiGridTargetRenderContainerId=j.containerId,null!==i.cellNav.handleKeyDown(d)&&a.stopEdit(d);else switch(d.keyCode){case b.keymap.ENTER:case b.keymap.TAB:d.stopPropagation(),d.preventDefault(),a.stopEdit(d)}else d.stopPropagation();return!0})}}}}}]),a.directive("uiGridEditor",["$filter",function(a){function b(a){if("undefined"==typeof a||""===a)return null;var b=a.split("-");if(3!==b.length)return null;var c=parseInt(b[0],10),d=parseInt(b[1],10),e=parseInt(b[2],10);return 1>d||1>c||1>e?null:new Date(c,d-1,e)}return{priority:-100,require:"?ngModel",link:function(c,d,e,f){2===angular.version.minor&&e.type&&"date"===e.type&&f&&(f.$formatters.push(function(b){return f.$setValidity(null,!b||!isNaN(b.getTime())),a("date")(b,"yyyy-MM-dd")}),f.$parsers.push(function(a){if(a&&a.length>0){var c=b(a);return f.$setValidity(null,c&&!isNaN(c.getTime())),c}return f.$setValidity(null,!0),null}))}}}]),a.directive("uiGridEditDropdown",["uiGridConstants","uiGridEditConstants",function(a,b){return{require:["?^uiGrid","?^uiGridRenderContainer"],scope:!0,compile:function(){return{pre:function(a,b,c){},post:function(c,d,e,f){var g=f[0],h=f[1];c.$on(b.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].style.width=d[0].parentElement.offsetWidth-1+"px",d.on("blur",function(a){c.stopEdit(a)})}),c.stopEdit=function(a){c.$emit(b.events.END_CELL_EDIT)},d.on("keydown",function(d){switch(d.keyCode){case a.keymap.ESC:d.stopPropagation(),c.$emit(b.events.CANCEL_CELL_EDIT)}if(g&&g.grid.api.cellNav)d.uiGridTargetRenderContainerId=h.containerId,null!==g.cellNav.handleKeyDown(d)&&c.stopEdit(d);else switch(d.keyCode){case a.keymap.ENTER:case a.keymap.TAB:d.stopPropagation(),d.preventDefault(),c.stopEdit(d)}return!0})}}}}}]),a.directive("uiGridEditFileChooser",["gridUtil","uiGridConstants","uiGridEditConstants","$timeout",function(a,b,c,d){return{scope:!0,require:["?^uiGrid","?^uiGridRenderContainer"],compile:function(){return{pre:function(a,b,c){},post:function(b,d,e,f){var g,h;f[0]&&(g=f[0]),f[1]&&(h=f[1]);var i=(g.grid,function(d){var e=d.srcElement||d.target;e&&e.files&&e.files.length>0?("function"==typeof b.col.colDef.editFileChooserCallback?b.col.colDef.editFileChooserCallback(b.row,b.col,e.files):a.logError("You need to set colDef.editFileChooserCallback to use the file chooser"),e.form.reset(),b.$emit(c.events.END_CELL_EDIT)):b.$emit(c.events.CANCEL_CELL_EDIT)});d[0].addEventListener("change",i,!1),b.$on(c.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].select(),d.on("blur",function(a){b.$emit(c.events.END_CELL_EDIT)})})}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.expandable",["ui.grid"]);a.service("uiGridExpandableService",["gridUtil","$compile",function(a,b){var c={initializeGrid:function(b){b.expandable={},b.expandable.expandedAll=!1,b.options.enableExpandable=b.options.enableExpandable!==!1,b.options.expandableRowHeight=b.options.expandableRowHeight||150,b.options.expandableRowHeaderWidth=b.options.expandableRowHeaderWidth||40,b.options.enableExpandable&&!b.options.expandableRowTemplate&&(a.logError("You have not set the expandableRowTemplate, disabling expandable module"),b.options.enableExpandable=!1);var d={events:{expandable:{rowExpandedBeforeStateChanged:function(a,b){},rowExpandedStateChanged:function(a,b){}}},methods:{expandable:{toggleRowExpansion:function(a){var d=b.getRow(a);null!==d&&c.toggleRowExpansion(b,d)},expandAllRows:function(){c.expandAllRows(b)},collapseAllRows:function(){c.collapseAllRows(b)},toggleAllRows:function(){c.toggleAllRows(b)},expandRow:function(a){var d=b.getRow(a);null===d||d.isExpanded||c.toggleRowExpansion(b,d)},collapseRow:function(a){var d=b.getRow(a);null!==d&&d.isExpanded&&c.toggleRowExpansion(b,d)},getExpandedRows:function(){return c.getExpandedRows(b).map(function(a){return a.entity})}}}};b.api.registerEventsFromObject(d.events),b.api.registerMethodsFromObject(d.methods)},toggleRowExpansion:function(a,b){a.api.expandable.raise.rowExpandedBeforeStateChanged(b),b.isExpanded=!b.isExpanded,angular.isUndefined(b.expandedRowHeight)&&(b.expandedRowHeight=a.options.expandableRowHeight),b.isExpanded?b.height=b.grid.options.rowHeight+b.expandedRowHeight:(b.height=b.grid.options.rowHeight,a.expandable.expandedAll=!1),a.api.expandable.raise.rowExpandedStateChanged(b)},expandAllRows:function(a,b){a.renderContainers.body.visibleRowCache.forEach(function(b){b.isExpanded||c.toggleRowExpansion(a,b)}),a.expandable.expandedAll=!0,a.queueGridRefresh()},collapseAllRows:function(a){a.renderContainers.body.visibleRowCache.forEach(function(b){b.isExpanded&&c.toggleRowExpansion(a,b)}),a.expandable.expandedAll=!1,a.queueGridRefresh()},toggleAllRows:function(a){a.expandable.expandedAll?c.collapseAllRows(a):c.expandAllRows(a)},getExpandedRows:function(a){return a.rows.filter(function(a){return a.isExpanded})}};return c}]),a.directive("uiGridExpandable",["uiGridExpandableService","$templateCache",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,d,e,f){if(f.grid.options.enableExpandableRowHeader!==!1){var g={name:"expandableButtons",displayName:"",exporterSuppressExport:!0,enableColumnResizing:!1,enableColumnMenu:!1,width:f.grid.options.expandableRowHeaderWidth||40};g.cellTemplate=b.get("ui-grid/expandableRowHeader"),g.headerCellTemplate=b.get("ui-grid/expandableTopRowHeader"),f.grid.addRowHeaderColumn(g)}a.initializeGrid(f.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGrid",["uiGridExpandableService","$templateCache",function(a,b){return{replace:!0,priority:599,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,b,c,d){d.grid.api.core.on.renderingComplete(a,function(){a.row&&a.row.grid&&a.row.grid.options&&a.row.grid.options.enableExpandable&&(d.grid.parentRow=a.row)})},post:function(a,b,c,d){}}}}}]),a.directive("uiGridExpandableRow",["uiGridExpandableService","$timeout","$compile","uiGridConstants","gridUtil","$interval","$log",function(a,b,c,d,e,f,g){return{replace:!1,priority:0,scope:!1,compile:function(){return{pre:function(a,b,d,f){e.getTemplate(a.grid.options.expandableRowTemplate).then(function(d){if(a.grid.options.expandableRowScope){var e=a.grid.options.expandableRowScope;for(var f in e)e.hasOwnProperty(f)&&(a[f]=e[f])}var g=c(d)(a);b.append(g),a.row.expandedRendered=!0})},post:function(a,b,c,d){a.$on("$destroy",function(){a.row.expandedRendered=!1})}}}}}]),a.directive("uiGridRow",["$compile","gridUtil","$templateCache",function(a,b,c){return{priority:-200,scope:!1,compile:function(a,b){return{pre:function(a,b,c,d){a.expandableRow={},a.expandableRow.shouldRenderExpand=function(){var b="body"===a.colContainer.name&&a.grid.options.enableExpandable!==!1&&a.row.isExpanded&&(!a.grid.isScrollingVertically||a.row.expandedRendered);return b},a.expandableRow.shouldRenderFiller=function(){var b=a.row.isExpanded&&("body"!==a.colContainer.name||a.grid.isScrollingVertically&&!a.row.expandedRendered);return b}},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["$compile","gridUtil","$templateCache",function(a,b,c){return{priority:-200,scope:!1,compile:function(a,b){var d=angular.element(a.children().children()[0]),e=c.get("ui-grid/expandableScrollFiller"),f=c.get("ui-grid/expandableRow");return d.append(f),d.append(e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.exporter",["ui.grid"]);a.constant("uiGridExporterConstants",{featureName:"exporter",ALL:"all",VISIBLE:"visible",SELECTED:"selected",CSV_CONTENT:"CSV_CONTENT",BUTTON_LABEL:"BUTTON_LABEL",FILE_NAME:"FILE_NAME"}),a.service("uiGridExporterService",["$q","uiGridExporterConstants","gridUtil","$compile","$interval","i18nService",function(a,b,c,d,e,f){var g={delay:100,initializeGrid:function(a){a.exporter={},this.defaultGridOptions(a.options);var b={events:{exporter:{}},methods:{exporter:{csvExport:function(b,c){g.csvExport(a,b,c)},pdfExport:function(b,c){g.pdfExport(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods),a.api.core.addToGridMenu?g.addToMenu(a):e(function(){a.api.core.addToGridMenu&&g.addToMenu(a)},this.delay,1)},defaultGridOptions:function(a){a.exporterSuppressMenu=a.exporterSuppressMenu===!0,a.exporterMenuLabel=a.exporterMenuLabel?a.exporterMenuLabel:"Export",a.exporterSuppressColumns=a.exporterSuppressColumns?a.exporterSuppressColumns:[],a.exporterCsvColumnSeparator=a.exporterCsvColumnSeparator?a.exporterCsvColumnSeparator:",",a.exporterCsvFilename=a.exporterCsvFilename?a.exporterCsvFilename:"download.csv",a.exporterPdfFilename=a.exporterPdfFilename?a.exporterPdfFilename:"download.pdf",a.exporterOlderExcelCompatibility=a.exporterOlderExcelCompatibility===!0,a.exporterPdfDefaultStyle=a.exporterPdfDefaultStyle?a.exporterPdfDefaultStyle:{fontSize:11},a.exporterPdfTableStyle=a.exporterPdfTableStyle?a.exporterPdfTableStyle:{margin:[0,5,0,15]},a.exporterPdfTableHeaderStyle=a.exporterPdfTableHeaderStyle?a.exporterPdfTableHeaderStyle:{bold:!0,fontSize:12,color:"black"},a.exporterPdfHeader=a.exporterPdfHeader?a.exporterPdfHeader:null,a.exporterPdfFooter=a.exporterPdfFooter?a.exporterPdfFooter:null,a.exporterPdfOrientation=a.exporterPdfOrientation?a.exporterPdfOrientation:"landscape",a.exporterPdfPageSize=a.exporterPdfPageSize?a.exporterPdfPageSize:"A4",a.exporterPdfMaxGridWidth=a.exporterPdfMaxGridWidth?a.exporterPdfMaxGridWidth:720,a.exporterMenuAllData=void 0!==a.exporterMenuAllData?a.exporterMenuAllData:!0,a.exporterMenuVisibleData=void 0!==a.exporterMenuVisibleData?a.exporterMenuVisibleData:!0,a.exporterMenuSelectedData=void 0!==a.exporterMenuSelectedData?a.exporterMenuSelectedData:!0,a.exporterMenuCsv=void 0!==a.exporterMenuCsv?a.exporterMenuCsv:!0,a.exporterMenuPdf=void 0!==a.exporterMenuPdf?a.exporterMenuPdf:!0,a.exporterPdfCustomFormatter=a.exporterPdfCustomFormatter&&"function"==typeof a.exporterPdfCustomFormatter?a.exporterPdfCustomFormatter:function(a){return a},a.exporterHeaderFilterUseName=a.exporterHeaderFilterUseName===!0,a.exporterFieldCallback=a.exporterFieldCallback?a.exporterFieldCallback:function(a,b,c,d){return d},a.exporterAllDataFn=a.exporterAllDataFn?a.exporterAllDataFn:null,null==a.exporterAllDataFn&&a.exporterAllDataPromise&&(a.exporterAllDataFn=a.exporterAllDataPromise)},addToMenu:function(a){a.api.core.addToGridMenu(a,[{title:f.getSafeText("gridMenu.exporterAllAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.ALL,b.ALL)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuAllData},order:200},{title:f.getSafeText("gridMenu.exporterVisibleAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.VISIBLE,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuVisibleData},order:201},{title:f.getSafeText("gridMenu.exporterSelectedAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.SELECTED,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuSelectedData&&this.grid.api.selection&&this.grid.api.selection.getSelectedRows().length>0},order:202},{title:f.getSafeText("gridMenu.exporterAllAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.ALL,b.ALL)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuAllData},order:203},{title:f.getSafeText("gridMenu.exporterVisibleAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.VISIBLE,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuVisibleData},order:204},{title:f.getSafeText("gridMenu.exporterSelectedAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.SELECTED,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuSelectedData&&this.grid.api.selection&&this.grid.api.selection.getSelectedRows().length>0},order:205}])},csvExport:function(a,b,c){var d=this;this.loadAllDataIfNeeded(a,b,c).then(function(){var e=a.options.showHeader?d.getColumnHeaders(a,c):[],f=d.getData(a,b,c),g=d.formatAsCsv(e,f,a.options.exporterCsvColumnSeparator);d.downloadFile(a.options.exporterCsvFilename,g,a.options.exporterOlderExcelCompatibility)})},loadAllDataIfNeeded:function(c,d,e){if(d===b.ALL&&c.rows.length!==c.options.totalItems&&c.options.exporterAllDataFn)return c.options.exporterAllDataFn().then(function(){c.modifyRows(c.options.data)});var f=a.defer();return f.resolve(),f.promise},getColumnHeaders:function(a,c){var d,e=[];if(c===b.ALL)d=a.columns;else{var f=a.renderContainers.left?a.renderContainers.left.visibleColumnCache.filter(function(a){return a.visible}):[],g=a.renderContainers.body?a.renderContainers.body.visibleColumnCache.filter(function(a){return a.visible}):[],h=a.renderContainers.right?a.renderContainers.right.visibleColumnCache.filter(function(a){return a.visible}):[];d=f.concat(g,h)}return d.forEach(function(b,c){b.colDef.exporterSuppressExport!==!0&&-1===a.options.exporterSuppressColumns.indexOf(b.name)&&e.push({name:b.field,displayName:a.options.exporterHeaderFilter?a.options.exporterHeaderFilterUseName?a.options.exporterHeaderFilter(b.name):a.options.exporterHeaderFilter(b.displayName):b.displayName,width:b.drawnWidth?b.drawnWidth:b.width,align:"number"===b.colDef.type?"right":"left"})}),e},getData:function(a,d,e,f){var g,h,i=[];switch(d){case b.ALL:g=a.rows;break;case b.VISIBLE:g=a.getVisibleRows();break;case b.SELECTED:a.api.selection?g=a.api.selection.getSelectedGridRows():c.logError("selection feature must be enabled to allow selected rows to be exported")}if(e===b.ALL)h=a.columns;else{var j=a.renderContainers.left?a.renderContainers.left.visibleColumnCache.filter(function(a){return a.visible}):[],k=a.renderContainers.body?a.renderContainers.body.visibleColumnCache.filter(function(a){return a.visible}):[],l=a.renderContainers.right?a.renderContainers.right.visibleColumnCache.filter(function(a){return a.visible}):[];h=j.concat(k,l)}return g.forEach(function(c,d){if(c.exporterEnableExporting!==!1){var g=[];h.forEach(function(d,h){if((d.visible||e===b.ALL)&&d.colDef.exporterSuppressExport!==!0&&-1===a.options.exporterSuppressColumns.indexOf(d.name)){var i=f?a.getCellDisplayValue(c,d):a.getCellValue(c,d),j={value:a.options.exporterFieldCallback(a,c,d,i)};d.colDef.exporterPdfAlign&&(j.alignment=d.colDef.exporterPdfAlign),g.push(j)}}),i.push(g)}}),i},formatAsCsv:function(a,b,c){var d=this,e=a.map(function(a){return{value:a.displayName}}),f=e.length>0?d.formatRowAsCsv(this,c)(e)+"\n":"";return f+=b.map(this.formatRowAsCsv(this,c)).join("\n")},formatRowAsCsv:function(a,b){return function(c){return c.map(a.formatFieldAsCsv).join(b)}},formatFieldAsCsv:function(a){return null==a.value?"":"number"==typeof a.value?a.value:"boolean"==typeof a.value?a.value?"TRUE":"FALSE":"string"==typeof a.value?'"'+a.value.replace(/"/g,'""')+'"':JSON.stringify(a.value)},isIE:function(){var a=navigator.userAgent.search(/(?:Edge|MSIE|Trident\/.*; rv:)/),b=!1;return-1!==a&&(b=!0),b},downloadFile:function(a,b,c){var d,e,f=document,g=f.createElement("a"),h="application/octet-stream;charset=utf-8";if(e=this.isIE(),e&&10>e){var i=f.createElement("iframe");return document.body.appendChild(i),i.contentWindow.document.open("text/html","replace"),i.contentWindow.document.write("sep=,\r\n"+b),i.contentWindow.document.close(),i.contentWindow.focus(),i.contentWindow.document.execCommand("SaveAs",!0,a),document.body.removeChild(i),!0}if(navigator.msSaveBlob)return navigator.msSaveOrOpenBlob(new Blob([c?"\ufeff":"",b],{type:h}),a);if("download"in g){var j=new Blob([c?"\ufeff":"",b],{type:h});d=URL.createObjectURL(j),g.setAttribute("download",a)}else d="data:"+h+","+encodeURIComponent(b),g.setAttribute("target","_blank");g.href=d,g.setAttribute("style","display:none;"),f.body.appendChild(g),setTimeout(function(){if(g.click)g.click();else if(document.createEvent){var a=document.createEvent("MouseEvents");a.initEvent("click",!0,!0),g.dispatchEvent(a)}f.body.removeChild(g)},this.delay)},pdfExport:function(a,b,c){var d=this;this.loadAllDataIfNeeded(a,b,c).then(function(){var e=d.getColumnHeaders(a,c),f=d.getData(a,b,c),g=d.prepareAsPdf(a,e,f);d.isIE()||-1!==navigator.appVersion.indexOf("Edge")?d.downloadPDF(a.options.exporterPdfFilename,g):pdfMake.createPdf(g).open(); +})},downloadPDF:function(a,b){var c,d=document;d.createElement("a");c=this.isIE();var e,f=pdfMake.createPdf(b);f.getBuffer(function(b){if(e=new Blob([b]),navigator.msSaveBlob)return navigator.msSaveBlob(e,a);if(c){var f=d.createElement("iframe");return document.body.appendChild(f),f.contentWindow.document.open("text/html","replace"),f.contentWindow.document.write(e),f.contentWindow.document.close(),f.contentWindow.focus(),f.contentWindow.document.execCommand("SaveAs",!0,a),document.body.removeChild(f),!0}})},prepareAsPdf:function(a,b,c){var d=this.calculatePdfHeaderWidths(a,b),e=b.map(function(a){return{text:a.displayName,style:"tableHeader"}}),f=c.map(this.formatRowAsPdf(this)),g=[e].concat(f),h={pageOrientation:a.options.exporterPdfOrientation,pageSize:a.options.exporterPdfPageSize,content:[{style:"tableStyle",table:{headerRows:1,widths:d,body:g}}],styles:{tableStyle:a.options.exporterPdfTableStyle,tableHeader:a.options.exporterPdfTableHeaderStyle},defaultStyle:a.options.exporterPdfDefaultStyle};return a.options.exporterPdfLayout&&(h.layout=a.options.exporterPdfLayout),a.options.exporterPdfHeader&&(h.header=a.options.exporterPdfHeader),a.options.exporterPdfFooter&&(h.footer=a.options.exporterPdfFooter),a.options.exporterPdfCustomFormatter&&(h=a.options.exporterPdfCustomFormatter(h)),h},calculatePdfHeaderWidths:function(a,b){var c=0;b.forEach(function(a){"number"==typeof a.width&&(c+=a.width)});var d=0;b.forEach(function(a){if("*"===a.width&&(d+=100),"string"==typeof a.width&&a.width.match(/(\d)*%/)){var b=parseInt(a.width.match(/(\d)*%/)[0]);a.width=c*b/100,d+=a.width}});var e=c+d;return b.map(function(b){return"*"===b.width?b.width:b.width*a.options.exporterPdfMaxGridWidth/e})},formatRowAsPdf:function(a){return function(b){return b.map(a.formatFieldAsPdfString)}},formatFieldAsPdfString:function(a){var b;return b=null==a.value?"":"number"==typeof a.value?a.value.toString():"boolean"==typeof a.value?a.value?"TRUE":"FALSE":"string"==typeof a.value?a.value.replace(/"/g,'""'):JSON.stringify(a.value).replace(/^"/,"").replace(/"$/,""),a.alignment&&"string"==typeof a.alignment&&(b={text:b,alignment:a.alignment}),b}};return g}]),a.directive("uiGridExporter",["uiGridExporterConstants","uiGridExporterService","gridUtil","$compile",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(e.grid),e.grid.exporter.$scope=a}}}])}(),function(){"use strict";var a=angular.module("ui.grid.grouping",["ui.grid","ui.grid.treeBase"]);a.constant("uiGridGroupingConstants",{featureName:"grouping",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridGroupingService",["$q","uiGridGroupingConstants","gridUtil","rowSorter","GridRow","gridClassFactory","i18nService","uiGridConstants","uiGridTreeBaseService",function(a,b,c,d,e,f,g,h,i){var j={initializeGrid:function(a,b){i.initializeGrid(a,b),a.grouping={},a.grouping.groupHeaderCache={},j.defaultGridOptions(a.options),a.registerRowsProcessor(j.groupRows,400),a.registerColumnBuilder(j.groupingColumnBuilder),a.registerColumnsProcessor(j.groupingColumnProcessor,400);var c={events:{grouping:{aggregationChanged:{},groupingChanged:{}}},methods:{grouping:{getGrouping:function(b){var c=j.getGrouping(a);return c.grouping.forEach(function(a){a.colName=a.col.name,delete a.col}),c.aggregations.forEach(function(a){a.colName=a.col.name,delete a.col}),c.aggregations=c.aggregations.filter(function(a){return!a.aggregation.source||"grouping"!==a.aggregation.source}),b&&(c.rowExpandedStates=j.getRowExpandedStates(a.grouping.groupingHeaderCache)),c},setGrouping:function(b){j.setGrouping(a,b)},groupColumn:function(b){var c=a.getColumn(b);j.groupColumn(a,c)},ungroupColumn:function(b){var c=a.getColumn(b);j.ungroupColumn(a,c)},clearGrouping:function(){j.clearGrouping(a)},aggregateColumn:function(b,c,d){var e=a.getColumn(b);j.aggregateColumn(a,e,c,d)}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods),a.api.core.on.sortChanged(b,j.tidyPriorities)},defaultGridOptions:function(a){a.enableGrouping=a.enableGrouping!==!1,a.groupingShowCounts=a.groupingShowCounts!==!1,a.groupingNullLabel="undefined"==typeof a.groupingNullLabel?"Null":a.groupingNullLabel,a.enableGroupHeaderSelection=a.enableGroupHeaderSelection===!0},groupingColumnBuilder:function(a,d,e){if(a.enableGrouping!==!1){"undefined"==typeof d.grouping&&"undefined"!=typeof a.grouping?(d.grouping=angular.copy(a.grouping),"undefined"!=typeof d.grouping.groupPriority&&d.grouping.groupPriority>-1&&(d.treeAggregationFn=i.nativeAggregations()[b.aggregation.COUNT].aggregationFn,d.treeAggregationFinalizerFn=j.groupedFinalizerFn)):"undefined"==typeof d.grouping&&(d.grouping={}),"undefined"!=typeof d.grouping&&"undefined"!=typeof d.grouping.groupPriority&&d.grouping.groupPriority>=0&&(d.suppressRemoveSort=!0);var f={name:"ui.grid.grouping.group",title:g.get().grouping.group,icon:"ui-grid-icon-indent-right",shown:function(){return"undefined"==typeof this.context.col.grouping||"undefined"==typeof this.context.col.grouping.groupPriority||this.context.col.grouping.groupPriority<0},action:function(){j.groupColumn(this.context.col.grid,this.context.col)}},h={name:"ui.grid.grouping.ungroup",title:g.get().grouping.ungroup,icon:"ui-grid-icon-indent-left",shown:function(){return"undefined"!=typeof this.context.col.grouping&&"undefined"!=typeof this.context.col.grouping.groupPriority&&this.context.col.grouping.groupPriority>=0},action:function(){j.ungroupColumn(this.context.col.grid,this.context.col)}},k={name:"ui.grid.grouping.aggregateRemove",title:g.get().grouping.aggregate_remove,shown:function(){return"undefined"!=typeof this.context.col.treeAggregationFn},action:function(){j.aggregateColumn(this.context.col.grid,this.context.col,null)}},l=function(a,b){b=b||g.get().grouping["aggregate_"+a]||a;var e={name:"ui.grid.grouping.aggregate"+a,title:b,shown:function(){return"undefined"==typeof this.context.col.treeAggregation||"undefined"==typeof this.context.col.treeAggregation.type||this.context.col.treeAggregation.type!==a},action:function(){j.aggregateColumn(this.context.col.grid,this.context.col,a)}};c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.aggregate"+a)||d.menuItems.push(e)};d.colDef.groupingShowGroupingMenu!==!1&&(c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.group")||d.menuItems.push(f),c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.ungroup")||d.menuItems.push(h)),d.colDef.groupingShowAggregationMenu!==!1&&(angular.forEach(i.nativeAggregations(),function(a,b){l(b)}),angular.forEach(e.treeCustomAggregations,function(a,b){l(b,a.menuTitle)}),c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.aggregateRemove")||d.menuItems.push(k))}},groupingColumnProcessor:function(a,b){return a=j.moveGroupColumns(this,a,b)},groupedFinalizerFn:function(a){var b=this;"undefined"!=typeof a.groupVal?(a.rendered=a.groupVal,b.grid.options.groupingShowCounts&&"date"!==b.colDef.type&&(a.rendered+=" ("+a.value+")")):a.rendered=null},moveGroupColumns:function(a,b,c){return a.options.moveGroupColumns===!1?b:(b.forEach(function(a,b){a.groupingPosition=b}),b.sort(function(a,b){var c,d;return c=a.isRowHeader?-1e3:"undefined"==typeof a.grouping||"undefined"==typeof a.grouping.groupPriority||a.grouping.groupPriority<0?null:a.grouping.groupPriority,d=b.isRowHeader?-1e3:"undefined"==typeof b.grouping||"undefined"==typeof b.grouping.groupPriority||b.grouping.groupPriority<0?null:b.grouping.groupPriority,null!==c&&null===d?-1:null!==d&&null===c?1:null!==c&&null!==d?c-d:a.groupingPosition-b.groupingPosition}),b.forEach(function(a,b){delete a.groupingPosition}),b)},groupColumn:function(a,c){"undefined"==typeof c.grouping&&(c.grouping={});var d=j.getGrouping(a);c.grouping.groupPriority=d.grouping.length,c.sort?"undefined"!=typeof c.sort.direction&&null!==c.sort.direction||(c.sort.direction=h.ASC):c.sort={direction:h.ASC},c.treeAggregation={type:b.aggregation.COUNT,source:"grouping"},c.treeAggregationFn=i.nativeAggregations()[b.aggregation.COUNT].aggregationFn,c.treeAggregationFinalizerFn=j.groupedFinalizerFn,a.api.grouping.raise.groupingChanged(c),a.api.core.raise.sortChanged(a,a.getColumnSorting()),a.queueGridRefresh()},ungroupColumn:function(a,b){"undefined"!=typeof b.grouping&&(delete b.grouping.groupPriority,delete b.treeAggregation,delete b.customTreeAggregationFinalizer,j.tidyPriorities(a),a.api.grouping.raise.groupingChanged(b),a.queueGridRefresh())},aggregateColumn:function(a,b,c){"undefined"!=typeof b.grouping&&"undefined"!=typeof b.grouping.groupPriority&&b.grouping.groupPriority>=0&&j.ungroupColumn(a,b);var d={};"undefined"!=typeof a.options.treeCustomAggregations[c]?d=a.options.treeCustomAggregations[c]:"undefined"!=typeof i.nativeAggregations()[c]&&(d=i.nativeAggregations()[c]),b.treeAggregation={type:c,label:g.get().aggregation[d.label]||d.label},b.treeAggregationFn=d.aggregationFn,b.treeAggregationFinalizerFn=d.finalizerFn,a.api.grouping.raise.aggregationChanged(b),a.queueGridRefresh()},setGrouping:function(a,b){"undefined"!=typeof b&&(j.clearGrouping(a),b.grouping&&b.grouping.length&&b.grouping.length>0&&b.grouping.forEach(function(b){var c=a.getColumn(b.colName);c&&j.groupColumn(a,c)}),b.aggregations&&b.aggregations.length&&b.aggregations.forEach(function(b){var c=a.getColumn(b.colName);c&&j.aggregateColumn(a,c,b.aggregation.type)}),b.rowExpandedStates&&j.applyRowExpandedStates(a.grouping.groupingHeaderCache,b.rowExpandedStates))},clearGrouping:function(a){var b=j.getGrouping(a);b.grouping.length>0&&b.grouping.forEach(function(b){b.col||(b.col=a.getColumn(b.colName)),j.ungroupColumn(a,b.col)}),b.aggregations.length>0&&b.aggregations.forEach(function(b){b.col||(b.col=a.getColumn(b.colName)),j.aggregateColumn(a,b.col,null)})},tidyPriorities:function(a){"undefined"!=typeof a&&"undefined"==typeof a.grid||"undefined"==typeof this.grid||(a=this.grid);var b=[],c=[];a.columns.forEach(function(a,d){"undefined"!=typeof a.grouping&&"undefined"!=typeof a.grouping.groupPriority&&a.grouping.groupPriority>=0?b.push(a):"undefined"!=typeof a.sort&&"undefined"!=typeof a.sort.priority&&a.sort.priority>=0&&c.push(a)}),b.sort(function(a,b){return a.grouping.groupPriority-b.grouping.groupPriority}),b.forEach(function(a,b){a.grouping.groupPriority=b,a.suppressRemoveSort=!0,"undefined"==typeof a.sort&&(a.sort={}),a.sort.priority=b});var d=b.length;c.sort(function(a,b){return a.sort.priority-b.sort.priority}),c.forEach(function(a,b){a.sort.priority=d,a.suppressRemoveSort=a.colDef.suppressRemoveSort,d++})},groupRows:function(a){if(0===a.length)return a;var b=this;b.grouping.oldGroupingHeaderCache=b.grouping.groupingHeaderCache||{},b.grouping.groupingHeaderCache={};for(var c=j.initialiseProcessingState(b),e=function(e,h){var i=b.getCellValue(g,e.col);e.initialised&&0===d.getSortFn(b,e.col,a)(i,e.currentValue)||(j.insertGroupHeader(b,a,f,c,h),f++)},f=0;f=0&&b.push({field:a.field,col:a,groupPriority:a.grouping.groupPriority,grouping:a.grouping}),a.treeAggregation&&a.treeAggregation.type&&c.push({field:a.field,col:a,aggregation:a.treeAggregation})}),b.sort(function(a,b){return a.groupPriority-b.groupPriority}),b.forEach(function(a,b){a.grouping.groupPriority=b,a.groupPriority=b,delete a.grouping}),{grouping:b,aggregations:c}},insertGroupHeader:function(a,b,c,d,g){var h=(d[g].fieldName,d[g].col),i=a.getCellValue(b[c],h),k=i;"undefined"!=typeof i&&null!==i||(k=a.options.groupingNullLabel);for(var l=function(a){return angular.isObject(a)?JSON.stringify(a):a},m=a.grouping.oldGroupingHeaderCache,n=0;g>n;n++)m&&m[l(d[n].currentValue)]&&(m=m[l(d[n].currentValue)].children);var o;for(m&&m[l(i)]?(o=m[l(i)].row,o.entity={}):(o=new e({},null,a),f.rowTemplateAssigner.call(a,o)),o.entity["$$"+d[g].col.uid]={groupVal:k},o.treeLevel=g,o.groupHeader=!0,o.internalRow=!0,o.enableCellEdit=!1,o.enableSelection=a.options.enableGroupHeaderSelection,d[g].initialised=!0,d[g].currentValue=i,d[g].currentRow=o,j.finaliseProcessingState(d,g+1),b.splice(c,0,o),m=a.grouping.groupingHeaderCache,n=0;g>n;n++)m=m[l(d[n].currentValue)].children;m[l(i)]={row:o,children:{}}},finaliseProcessingState:function(a,b){for(var c=b;c 1 or < 1 file choosers within the menu item, error, cannot continue"):h[0].addEventListener("change",g,!1)}}}])}(),function(){"use strict";var a=angular.module("ui.grid.infiniteScroll",["ui.grid"]);a.service("uiGridInfiniteScrollService",["gridUtil","$compile","$timeout","uiGridConstants","ScrollEvent","$q",function(a,b,c,d,e,f){var g={initializeGrid:function(a,b){if(g.defaultGridOptions(a.options),a.options.enableInfiniteScroll){a.infiniteScroll={dataLoading:!1},g.setScrollDirections(a,a.options.infiniteScrollUp,a.options.infiniteScrollDown),a.api.core.on.scrollEnd(b,g.handleScroll);var c={events:{infiniteScroll:{needLoadMoreData:function(a,b){},needLoadMoreDataTop:function(a,b){}}},methods:{infiniteScroll:{dataLoaded:function(b,c){g.setScrollDirections(a,b,c);var d=g.adjustScroll(a).then(function(){a.infiniteScroll.dataLoading=!1});return d},resetScroll:function(b,c){return g.setScrollDirections(a,b,c),g.adjustInfiniteScrollPosition(a,0)},saveScrollPercentage:function(){a.infiniteScroll.prevScrollTop=a.renderContainers.body.prevScrollTop,a.infiniteScroll.previousVisibleRows=a.getVisibleRowCount()},dataRemovedTop:function(b,c){g.dataRemovedTop(a,b,c)},dataRemovedBottom:function(b,c){g.dataRemovedBottom(a,b,c)},setScrollDirections:function(b,c){g.setScrollDirections(a,b,c)}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)}},defaultGridOptions:function(a){a.enableInfiniteScroll=a.enableInfiniteScroll!==!1,a.infiniteScrollRowsFromEnd=a.infiniteScrollRowsFromEnd||20,a.infiniteScrollUp=a.infiniteScrollUp===!0,a.infiniteScrollDown=a.infiniteScrollDown!==!1},setScrollDirections:function(a,b,c){a.infiniteScroll.scrollUp=b===!0,a.suppressParentScrollUp=b===!0,a.infiniteScroll.scrollDown=c!==!1,a.suppressParentScrollDown=c!==!1},handleScroll:function(a){if(!(a.grid.infiniteScroll&&a.grid.infiniteScroll.dataLoading||"ui.grid.adjustInfiniteScrollPosition"===a.source)&&a.y){var b,c=a.grid.options.infiniteScrollRowsFromEnd/a.grid.renderContainers.body.visibleRowCache.length;a.grid.scrollDirection===d.scrollDirection.UP?(b=a.y.percentage,c>=b&&g.loadData(a.grid)):a.grid.scrollDirection===d.scrollDirection.DOWN&&(b=1-a.y.percentage,c>=b&&g.loadData(a.grid))}},loadData:function(a){a.infiniteScroll.previousVisibleRows=a.renderContainers.body.visibleRowCache.length,a.infiniteScroll.direction=a.scrollDirection,delete a.infiniteScroll.prevScrollTop,a.scrollDirection===d.scrollDirection.UP&&a.infiniteScroll.scrollUp?(a.infiniteScroll.dataLoading=!0,a.api.infiniteScroll.raise.needLoadMoreDataTop()):a.scrollDirection===d.scrollDirection.DOWN&&a.infiniteScroll.scrollDown&&(a.infiniteScroll.dataLoading=!0,a.api.infiniteScroll.raise.needLoadMoreData())},adjustScroll:function(a){var b=f.defer();return c(function(){var e,f,h,i,j;e=a.getViewportHeight()+a.headerHeight-a.renderContainers.body.headerHeight-a.scrollbarHeight,f=a.options.rowHeight,void 0===a.infiniteScroll.direction&&g.adjustInfiniteScrollPosition(a,0),h=a.getVisibleRowCount();var k=f*h;a.infiniteScroll.scrollDown&&e>k&&a.api.infiniteScroll.raise.needLoadMoreData(),a.infiniteScroll.direction===d.scrollDirection.UP&&(i=a.infiniteScroll.prevScrollTop||0,j=i+(h-a.infiniteScroll.previousVisibleRows)*f,g.adjustInfiniteScrollPosition(a,j),c(function(){b.resolve()})),a.infiniteScroll.direction===d.scrollDirection.DOWN&&(j=a.infiniteScroll.prevScrollTop||a.infiniteScroll.previousVisibleRows*f-e,g.adjustInfiniteScrollPosition(a,j),c(function(){b.resolve()}))},0),b.promise},adjustInfiniteScrollPosition:function(a,b){var c=new e(a,null,null,"ui.grid.adjustInfiniteScrollPosition"),d=a.getVisibleRowCount(),f=a.getViewportHeight()+a.headerHeight-a.renderContainers.body.headerHeight-a.scrollbarHeight,g=a.options.rowHeight,h=d*g-f;0===b&&a.infiniteScroll.scrollUp?c.y={percentage:1/h}:c.y={percentage:b/h},a.scrollContainers("",c)},dataRemovedTop:function(a,b,c){var d,e,f,h;return g.setScrollDirections(a,b,c),d=a.renderContainers.body.visibleRowCache.length,e=a.infiniteScroll.prevScrollTop,h=a.options.rowHeight,f=e-(a.infiniteScroll.previousVisibleRows-d)*h,g.adjustInfiniteScrollPosition(a,f)},dataRemovedBottom:function(a,b,c){var d;return g.setScrollDirections(a,b,c),d=a.infiniteScroll.prevScrollTop,g.adjustInfiniteScrollPosition(a,d)}};return g}]),a.directive("uiGridInfiniteScroll",["uiGridInfiniteScrollService",function(a){return{priority:-200,scope:!1,require:"^uiGrid",compile:function(b,c,d){return{pre:function(b,c,d,e){a.initializeGrid(e.grid,b)},post:function(a,b,c){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.moveColumns",["ui.grid"]);a.service("uiGridMoveColumnService",["$q","$timeout","$log","ScrollEvent","uiGridConstants","gridUtil",function(a,b,c,d,e,f){var g={initializeGrid:function(a){var b=this;this.registerPublicApi(a),this.defaultGridOptions(a.options),a.moveColumns={orderCache:[]},a.registerColumnBuilder(b.movableColumnBuilder),a.registerDataChangeCallback(b.verifyColumnOrder,[e.dataChange.COLUMN])},registerPublicApi:function(a){var b=this,c={events:{colMovable:{columnPositionChanged:function(a,b,c){}}},methods:{colMovable:{moveColumn:function(c,d){var e=a.columns;if(!angular.isNumber(c)||!angular.isNumber(d))return void f.logError("MoveColumn: Please provide valid values for originalPosition and finalPosition");for(var g=0,h=0;h=e.length-g||d>=e.length-g)return void f.logError("MoveColumn: Invalid values for originalPosition, finalPosition");var i=function(a){for(var b=a,c=0;b>=c;c++)angular.isDefined(e[c])&&(angular.isDefined(e[c].colDef.visible)&&e[c].colDef.visible===!1||e[c].isRowHeader===!0)&&b++;return b};b.redrawColumnAtPosition(a,i(c),i(d))}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableColumnMoving=a.enableColumnMoving!==!1},movableColumnBuilder:function(b,c,d){var e=[];return b.enableColumnMoving=void 0===b.enableColumnMoving?d.enableColumnMoving:b.enableColumnMoving,a.all(e)},updateColumnCache:function(a){a.moveColumns.orderCache=a.getOnlyDataColumns()},verifyColumnOrder:function(a){var b,c=a.rowHeaderColumns.length;angular.forEach(a.moveColumns.orderCache,function(d,e){if(b=a.columns.indexOf(d),-1!==b&&b-c!==e){var f=a.columns.splice(b,1)[0];a.columns.splice(e+c,0,f)}})},redrawColumnAtPosition:function(a,c,d){if(c!==d){var f=a.columns,h=f[c];if(h.colDef.enableColumnMoving){if(c>d)for(var i=c;i>d;i--)f[i]=f[i-1];else if(d>c)for(var j=c;d>j;j++)f[j]=f[j+1];f[d]=h,g.updateColumnCache(a),a.queueGridRefresh(),b(function(){a.api.core.notifyDataChange(e.dataChange.COLUMN),a.api.colMovable.raise.columnPositionChanged(h.colDef,c,d)})}}}};return g}]),a.directive("uiGridMoveColumns",["uiGridMoveColumnService",function(a){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(b,c,d,e){a.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridHeaderCell",["$q","gridUtil","uiGridMoveColumnService","$document","$log","uiGridConstants","ScrollEvent",function(a,b,c,d,e,f,g){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(a,b,e,f){if(a.col.colDef.enableColumnMoving){var h,i,j,k,l,m,n=angular.element(b[0].querySelectorAll(".ui-grid-cell-contents")),o=!1,p=!1,q=function(b){h=a.grid.element[0].getBoundingClientRect().left,a.grid.hasLeftContainer()&&(h+=a.grid.renderContainers.left.header[0].getBoundingClientRect().width),i=b.pageX,j=0,k=h+a.grid.getViewportWidth(),"mousedown"===b.type?(d.on("mousemove",r),d.on("mouseup",s)):"touchstart"===b.type&&(d.on("touchmove",r),d.on("touchend",s))},r=function(a){var b=a.pageX-i;0!==b&&(document.onselectstart=function(){return!1},p=!0,o?o&&(w(b),i=a.pageX):v())},s=function(b){if(document.onselectstart=null,l&&(l.remove(),o=!1),u(),t(),p){for(var d=a.grid.columns,e=0,f=0;fj){var h,i=0;if(a.grid.isRTL()){for(h=e+1;hMath.abs(j))){c.redrawColumnAtPosition(a.grid,e,h-1);break}}else for(h=e-1;h>=0;h--)if((angular.isUndefined(d[h].colDef.visible)||d[h].colDef.visible===!0)&&(i+=d[h].drawnWidth||d[h].width||d[h].colDef.width,i>Math.abs(j))){c.redrawColumnAtPosition(a.grid,e,h+1);break}i0){var k,m=0;if(a.grid.isRTL()){for(k=e-1;k>0;k--)if((angular.isUndefined(d[k].colDef.visible)||d[k].colDef.visible===!0)&&(m+=d[k].drawnWidth||d[k].width||d[k].colDef.width,m>j)){c.redrawColumnAtPosition(a.grid,e,k);break}}else for(k=e+1;kj)){c.redrawColumnAtPosition(a.grid,e,k-1);break}j>m&&(g=d.length-1,a.grid.isRTL()&&(g=0),c.redrawColumnAtPosition(a.grid,e,g))}}},t=function(){n.on("touchstart",q),n.on("mousedown",q)},u=function(){n.off("touchstart",q),n.off("mousedown",q),d.off("mousemove",r),d.off("touchmove",r),d.off("mouseup",s),d.off("touchend",s)};t();var v=function(){o=!0,l=b.clone(),b.parent().append(l),l.addClass("movingColumn");var c={};c.left=b[0].offsetLeft+"px";var d=a.grid.element[0].getBoundingClientRect().right,e=b[0].getBoundingClientRect().right;e>d&&(m=a.col.drawnWidth+(d-e),c.width=m+"px"),l.css(c)},w=function(b){for(var c=a.grid.columns,d=0,e=0;ei?i:k,(n>=h||b>0)&&(k>=o||0>b))l.css({visibility:"visible",left:l[0].offsetLeft+(k>i?b:k-n)+"px"});else if(d>Math.ceil(f.grid.gridWidth)){b*=8;var p=new g(a.col.grid,null,null,"uiGridHeaderCell.moveElement");p.x={pixels:b},p.grid.scrollContainers("",p)}for(var q=0,r=0;r0?a.options.paginationCurrentPage=Math.min(a.options.paginationCurrentPage+1,c.methods.pagination.getTotalPages()):a.options.paginationCurrentPage++)},previousPage:function(){a.options.enablePagination&&(a.options.paginationCurrentPage=Math.max(a.options.paginationCurrentPage-1,1))},seek:function(b){if(a.options.enablePagination){if(!angular.isNumber(b)||1>b)throw"Invalid page number: "+b;a.options.paginationCurrentPage=Math.min(b,c.methods.pagination.getTotalPages())}}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods);var d=function(b){if(a.options.useExternalPagination||!a.options.enablePagination)return b;var c=parseInt(a.options.paginationPageSize,10),d=parseInt(a.options.paginationCurrentPage,10),e=b.filter(function(a){return a.visible});a.options.totalItems=e.length;var f=(d-1)*c;return f>e.length&&(d=a.options.paginationCurrentPage=1,f=(d-1)*c),e.slice(f,f+c)};a.registerRowsProcessor(d,900)},defaultGridOptions:function(b){b.enablePagination=b.enablePagination!==!1,b.enablePaginationControls=b.enablePaginationControls!==!1,b.useExternalPagination=b.useExternalPagination===!0,a.isNullOrUndefined(b.totalItems)&&(b.totalItems=0),a.isNullOrUndefined(b.paginationPageSizes)&&(b.paginationPageSizes=[250,500,1e3]),a.isNullOrUndefined(b.paginationPageSize)&&(b.paginationPageSizes.length>0?b.paginationPageSize=b.paginationPageSizes[0]:b.paginationPageSize=0),a.isNullOrUndefined(b.paginationCurrentPage)&&(b.paginationCurrentPage=1),a.isNullOrUndefined(b.paginationTemplate)&&(b.paginationTemplate="ui-grid/pagination")},onPaginationChanged:function(a,b,c){a.api.pagination.raise.paginationChanged(b,c),a.options.useExternalPagination||a.queueGridRefresh()}};return b}]),a.directive("uiGridPagination",["gridUtil","uiGridPaginationService",function(a,b){ +return{priority:-200,scope:!1,require:"uiGrid",link:{pre:function(c,d,e,f){b.initializeGrid(f.grid),a.getTemplate(f.grid.options.paginationTemplate).then(function(a){var b=angular.element(a);d.append(b),f.innerCompile(b)})}}}}]),a.directive("uiGridPager",["uiGridPaginationService","uiGridConstants","gridUtil","i18nService",function(a,b,c,d){return{priority:-200,scope:!0,require:"^uiGrid",link:function(e,f,g,h){var i=".ui-grid-pager-control-input";e.aria=d.getSafeText("pagination.aria"),e.paginationApi=h.grid.api.pagination,e.sizesLabel=d.getSafeText("pagination.sizes"),e.totalItemsLabel=d.getSafeText("pagination.totalItems"),e.paginationOf=d.getSafeText("pagination.of"),e.paginationThrough=d.getSafeText("pagination.through");var j=h.grid.options;h.grid.renderContainers.body.registerViewportAdjuster(function(a){return a.height=a.height-c.elementHeight(f,"padding"),a});var k=h.grid.registerDataChangeCallback(function(a){a.options.useExternalPagination||(a.options.totalItems=a.rows.length)},[b.dataChange.ROW]);e.$on("$destroy",k);var l=function(){e.showingLow=(j.paginationCurrentPage-1)*j.paginationPageSize+1,e.showingHigh=Math.min(j.paginationCurrentPage*j.paginationPageSize,j.totalItems)},m=e.$watch("grid.options.totalItems + grid.options.paginationPageSize",l),n=e.$watch("grid.options.paginationCurrentPage + grid.options.paginationPageSize",function(b,c){if(b!==c&&void 0!==c){if(!angular.isNumber(j.paginationCurrentPage)||j.paginationCurrentPage<1)return void(j.paginationCurrentPage=1);if(j.totalItems>0&&j.paginationCurrentPage>e.paginationApi.getTotalPages())return void(j.paginationCurrentPage=e.paginationApi.getTotalPages());l(),a.onPaginationChanged(e.grid,j.paginationCurrentPage,j.paginationPageSize)}});e.$on("$destroy",function(){m(),n()}),e.cantPageForward=function(){return j.totalItems>0?j.paginationCurrentPage>=e.paginationApi.getTotalPages():j.data.length<1},e.cantPageToLast=function(){return j.totalItems>0?e.cantPageForward():!0},e.cantPageBackward=function(){return j.paginationCurrentPage<=1};var o=function(a){a&&c.focus.bySelector(f,i)};e.pageFirstPageClick=function(){e.paginationApi.seek(1),o(e.cantPageBackward())},e.pagePreviousPageClick=function(){e.paginationApi.previousPage(),o(e.cantPageBackward())},e.pageNextPageClick=function(){e.paginationApi.nextPage(),o(e.cantPageForward())},e.pageLastPageClick=function(){e.paginationApi.seek(e.paginationApi.getTotalPages()),o(e.cantPageToLast())}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.pinning",["ui.grid"]);a.constant("uiGridPinningConstants",{container:{LEFT:"left",RIGHT:"right",NONE:""}}),a.service("uiGridPinningService",["gridUtil","GridRenderContainer","i18nService","uiGridPinningConstants",function(a,b,c,d){var e={initializeGrid:function(a){e.defaultGridOptions(a.options),a.registerColumnBuilder(e.pinningColumnBuilder);var b={events:{pinning:{columnPinned:function(a,b){}}},methods:{pinning:{pinColumn:function(b,c){e.pinColumn(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.enablePinning=a.enablePinning!==!1},pinningColumnBuilder:function(b,f,g){if(b.enablePinning=void 0===b.enablePinning?g.enablePinning:b.enablePinning,b.pinnedLeft?(f.renderContainer="left",f.grid.createLeftContainer()):b.pinnedRight&&(f.renderContainer="right",f.grid.createRightContainer()),b.enablePinning){var h={name:"ui.grid.pinning.pinLeft",title:c.get().pinning.pinLeft,icon:"ui-grid-icon-left-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"left"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.LEFT)}},i={name:"ui.grid.pinning.pinRight",title:c.get().pinning.pinRight,icon:"ui-grid-icon-right-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"right"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.RIGHT)}},j={name:"ui.grid.pinning.unpin",title:c.get().pinning.unpin,icon:"ui-grid-icon-cancel",shown:function(){return"undefined"!=typeof this.context.col.renderContainer&&null!==this.context.col.renderContainer&&"body"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.NONE)}};a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.pinLeft")||f.menuItems.push(h),a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.pinRight")||f.menuItems.push(i),a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.unpin")||f.menuItems.push(j)}},pinColumn:function(a,b,c){c===d.container.NONE?(b.renderContainer=null,b.colDef.pinnedLeft=b.colDef.pinnedRight=!1):(b.renderContainer=c,c===d.container.LEFT?a.createLeftContainer():c===d.container.RIGHT&&a.createRightContainer()),a.refresh().then(function(){a.api.pinning.raise.columnPinned(b.colDef,c)})}};return e}]),a.directive("uiGridPinning",["gridUtil","uiGridPinningService",function(a,b){return{require:"uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.resizeColumns",["ui.grid"]);a.service("uiGridResizeColumnsService",["gridUtil","$q","$timeout",function(a,b,c){var d={defaultGridOptions:function(a){a.enableColumnResizing=a.enableColumnResizing!==!1,a.enableColumnResize===!1&&(a.enableColumnResizing=!1)},colResizerColumnBuilder:function(a,c,d){var e=[];return a.enableColumnResizing=void 0===a.enableColumnResizing?d.enableColumnResizing:a.enableColumnResizing,a.enableColumnResize===!1&&(a.enableColumnResizing=!1),b.all(e)},registerPublicApi:function(a){var b={events:{colResizable:{columnSizeChanged:function(a,b){}}}};a.api.registerEventsFromObject(b.events)},fireColumnSizeChanged:function(b,d,e){c(function(){b.api.colResizable?b.api.colResizable.raise.columnSizeChanged(d,e):a.logError("The resizeable api is not registered, this may indicate that you've included the module but not added the 'ui-grid-resize-columns' directive to your grid definition. Cannot raise any events.")})},findTargetCol:function(a,b,c){var d=a.getRenderContainer();if("left"===b){var e=d.visibleColumnCache.indexOf(a);return d.visibleColumnCache[e-1*c]}return a}};return d}]),a.directive("uiGridResizeColumns",["gridUtil","uiGridResizeColumnsService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.defaultGridOptions(e.grid.options),e.grid.registerColumnBuilder(b.colResizerColumnBuilder),b.registerPublicApi(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridHeaderCell",["gridUtil","$templateCache","$compile","$q","uiGridResizeColumnsService","uiGridConstants","$timeout",function(a,b,c,d,e,f,g){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(a,d,h,i){var j=i.grid;if(j.options.enableColumnResizing){var k=b.get("ui-grid/columnResizer"),l=1;j.isRTL()&&(a.position="left",l=-1);var m=function(){for(var b=d[0].getElementsByClassName("ui-grid-column-resizer"),f=0;f
              '),f={priority:0,scope:{col:"=",position:"@",renderIndex:"="},require:"?^uiGrid",link:function(f,g,h,i){function j(a){i.grid.refreshCanvas(!0).then(function(){i.grid.queueGridRefresh()})}function k(a,b){var c=b;return a.minWidth&&ca.maxWidth&&(c=a.maxWidth),c}function l(a,b){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),o=(a.targetTouches?a.targetTouches[0]:a).clientX-p,0>o?o=0:o>i.grid.gridWidth&&(o=i.grid.gridWidth);var g=d.findTargetCol(f.col,f.position,q);if(g.colDef.enableColumnResizing!==!1){i.grid.element.hasClass("column-resizing")||i.grid.element.addClass("column-resizing");var h=o-n,j=parseInt(g.drawnWidth+h*q,10);o+=(k(g,j)-j)*q,e.css({left:o+"px"}),i.fireEvent(c.events.ITEM_DRAGGING)}}function m(a,b){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),i.grid.element.removeClass("column-resizing"),e.remove(),o=(a.changedTouches?a.changedTouches[0]:a).clientX-p;var c=o-n;if(0===c)return t(),void s();var g=d.findTargetCol(f.col,f.position,q);if(g.colDef.enableColumnResizing!==!1){var h=parseInt(g.drawnWidth+c*q,10);g.width=k(g,h),g.hasCustomWidth=!0,j(c),d.fireColumnSizeChanged(i.grid,g.colDef,c),t(),s()}}var n=0,o=0,p=0,q=1;i.grid.isRTL()&&(f.position="left",q=-1),"left"===f.position?g.addClass("left"):"right"===f.position&&g.addClass("right");var r=function(b,c){b.originalEvent&&(b=b.originalEvent),b.stopPropagation(),p=i.grid.element[0].getBoundingClientRect().left,n=(b.targetTouches?b.targetTouches[0]:b).clientX-p,i.grid.element.append(e),e.css({left:n}),"touchstart"===b.type?(a.on("touchend",m),a.on("touchmove",l),g.off("mousedown",r)):(a.on("mouseup",m),a.on("mousemove",l),g.off("touchstart",r))},s=function(){g.on("mousedown",r),g.on("touchstart",r)},t=function(){a.off("mouseup",m),a.off("touchend",m),a.off("mousemove",l),a.off("touchmove",l),g.off("mousedown",r),g.off("touchstart",r)};s();var u=function(a,e){a.stopPropagation();var h=d.findTargetCol(f.col,f.position,q);if(h.colDef.enableColumnResizing!==!1){var l=0,m=0,n=b.closestElm(g,".ui-grid-render-container"),o=n.querySelectorAll("."+c.COL_CLASS_PREFIX+h.uid+" .ui-grid-cell-contents");Array.prototype.forEach.call(o,function(a){var c;angular.element(a).parent().hasClass("ui-grid-header-cell")&&(c=angular.element(a).parent()[0].querySelectorAll(".ui-grid-column-menu-button")),b.fakeElement(a,{},function(a){var d=angular.element(a);d.attr("style","float: left");var e=b.elementWidth(d);if(c){var f=b.elementWidth(c);e+=f}e>l&&(l=e,m=l-e)})}),h.width=k(h,l),h.hasCustomWidth=!0,j(m),d.fireColumnSizeChanged(i.grid,h.colDef,m)}};g.on("dblclick",u),g.on("$destroy",function(){g.off("dblclick",u),t()})}};return f}])}(),function(){"use strict";var a=angular.module("ui.grid.rowEdit",["ui.grid","ui.grid.edit","ui.grid.cellNav"]);a.constant("uiGridRowEditConstants",{}),a.service("uiGridRowEditService",["$interval","$q","uiGridConstants","uiGridRowEditConstants","gridUtil",function(a,b,c,d,e){var f={initializeGrid:function(a,b){b.rowEdit={};var c={events:{rowEdit:{saveRow:function(a){}}},methods:{rowEdit:{setSavePromise:function(a,c){f.setSavePromise(b,a,c)},getDirtyRows:function(){return b.rowEdit.dirtyRows?b.rowEdit.dirtyRows:[]},getErrorRows:function(){return b.rowEdit.errorRows?b.rowEdit.errorRows:[]},flushDirtyRows:function(){return f.flushDirtyRows(b)},setRowsDirty:function(a){f.setRowsDirty(b,a)},setRowsClean:function(a){f.setRowsClean(b,a)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.api.core.on.renderingComplete(a,function(c){b.api.edit.on.afterCellEdit(a,f.endEditCell),b.api.edit.on.beginCellEdit(a,f.beginEditCell),b.api.edit.on.cancelCellEdit(a,f.cancelEditCell),b.api.cellNav&&b.api.cellNav.on.navigate(a,f.navigate)})},defaultGridOptions:function(a){},saveRow:function(a,b){var c=this;return function(){if(b.isSaving=!0,b.rowEditSavePromise)return b.rowEditSavePromise;var d=a.api.rowEdit.raise.saveRow(b.entity);return b.rowEditSavePromise?b.rowEditSavePromise.then(c.processSuccessPromise(a,b),c.processErrorPromise(a,b)):e.logError("A promise was not returned when saveRow event was raised, either nobody is listening to event, or event handler did not return a promise"),d}},setSavePromise:function(a,b,c){var d=a.getRow(b);d.rowEditSavePromise=c},processSuccessPromise:function(a,b){var c=this;return function(){delete b.isSaving,delete b.isDirty,delete b.isError,delete b.rowEditSaveTimer,delete b.rowEditSavePromise,c.removeRow(a.rowEdit.errorRows,b),c.removeRow(a.rowEdit.dirtyRows,b)}},processErrorPromise:function(a,b){return function(){delete b.isSaving,delete b.rowEditSaveTimer,delete b.rowEditSavePromise,b.isError=!0,a.rowEdit.errorRows||(a.rowEdit.errorRows=[]),f.isRowPresent(a.rowEdit.errorRows,b)||a.rowEdit.errorRows.push(b)}},removeRow:function(a,b){"undefined"!=typeof a&&null!==a&&a.forEach(function(c,d){c.uid===b.uid&&a.splice(d,1)})},isRowPresent:function(a,b){var c=!1;return a.forEach(function(a,d){a.uid===b.uid&&(c=!0)}),c},flushDirtyRows:function(a){var c=[];return a.api.rowEdit.getDirtyRows().forEach(function(b){f.saveRow(a,b)(),c.push(b.rowEditSavePromise)}),b.all(c)},endEditCell:function(a,b,c,d){var g=this.grid,h=g.getRow(a);return h?void((c!==d||h.isDirty)&&(g.rowEdit.dirtyRows||(g.rowEdit.dirtyRows=[]),h.isDirty||(h.isDirty=!0,g.rowEdit.dirtyRows.push(h)),delete h.isError,f.considerSetTimer(g,h))):void e.logError("Unable to find rowEntity in grid data, dirty flag cannot be set")},beginEditCell:function(a,b){var c=this.grid,d=c.getRow(a);return d?void f.cancelTimer(c,d):void e.logError("Unable to find rowEntity in grid data, timer cannot be cancelled")},cancelEditCell:function(a,b){var c=this.grid,d=c.getRow(a);return d?void f.considerSetTimer(c,d):void e.logError("Unable to find rowEntity in grid data, timer cannot be set")},navigate:function(a,b){var c=this.grid;a.row.rowEditSaveTimer&&f.cancelTimer(c,a.row),b&&b.row&&b.row!==a.row&&f.considerSetTimer(c,b.row)},considerSetTimer:function(b,c){if(f.cancelTimer(b,c),c.isDirty&&!c.isSaving&&-1!==b.options.rowEditWaitInterval){var d=b.options.rowEditWaitInterval?b.options.rowEditWaitInterval:2e3;c.rowEditSaveTimer=a(f.saveRow(b,c),d,1)}},cancelTimer:function(b,c){c.rowEditSaveTimer&&!c.isSaving&&(a.cancel(c.rowEditSaveTimer),delete c.rowEditSaveTimer)},setRowsDirty:function(a,b){var c;b.forEach(function(b,d){c=a.getRow(b),c?(a.rowEdit.dirtyRows||(a.rowEdit.dirtyRows=[]),c.isDirty||(c.isDirty=!0,a.rowEdit.dirtyRows.push(c)),delete c.isError,f.considerSetTimer(a,c)):e.logError("requested row not found in rowEdit.setRowsDirty, row was: "+b)})},setRowsClean:function(a,b){var c;b.forEach(function(b,d){c=a.getRow(b),c?(delete c.isDirty,f.removeRow(a.rowEdit.dirtyRows,c),f.cancelTimer(a,c),delete c.isError,f.removeRow(a.rowEdit.errorRows,c)):e.logError("requested row not found in rowEdit.setRowsClean, row was: "+b)})}};return f}]),a.directive("uiGridRowEdit",["gridUtil","uiGridRowEditService","uiGridEditConstants",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(a,e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","gridUtil","$parse",function(a,b,c,d){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+", 'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}":"{'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.saveState",["ui.grid","ui.grid.selection","ui.grid.cellNav","ui.grid.grouping","ui.grid.pinning","ui.grid.treeView"]);a.constant("uiGridSaveStateConstants",{featureName:"saveState"}),a.service("uiGridSaveStateService",["$q","uiGridSaveStateConstants","gridUtil","$compile","$interval","uiGridConstants",function(a,b,c,d,e,f){var g={initializeGrid:function(a){a.saveState={},this.defaultGridOptions(a.options);var b={events:{saveState:{}},methods:{saveState:{save:function(){return g.save(a)},restore:function(b,c){g.restore(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.saveWidths=a.saveWidths!==!1,a.saveOrder=a.saveOrder!==!1,a.saveScroll=a.saveScroll===!0,a.saveFocus=a.saveScroll!==!0&&a.saveFocus!==!1,a.saveVisible=a.saveVisible!==!1,a.saveSort=a.saveSort!==!1,a.saveFilter=a.saveFilter!==!1,a.saveSelection=a.saveSelection!==!1,a.saveGrouping=a.saveGrouping!==!1,a.saveGroupingExpandedStates=a.saveGroupingExpandedStates===!0,a.savePinning=a.savePinning!==!1,a.saveTreeView=a.saveTreeView!==!1},save:function(a){var b={};return b.columns=g.saveColumns(a),b.scrollFocus=g.saveScrollFocus(a),b.selection=g.saveSelection(a),b.grouping=g.saveGrouping(a),b.treeView=g.saveTreeView(a),b.pagination=g.savePagination(a),b},restore:function(a,b,c){c.columns&&g.restoreColumns(a,c.columns),c.scrollFocus&&g.restoreScrollFocus(a,b,c.scrollFocus),c.selection&&g.restoreSelection(a,c.selection),c.grouping&&g.restoreGrouping(a,c.grouping),c.treeView&&g.restoreTreeView(a,c.treeView),c.pagination&&g.restorePagination(a,c.pagination),a.refresh()},saveColumns:function(a){var b=[];return a.getOnlyDataColumns().forEach(function(c){var d={};d.name=c.name,a.options.saveVisible&&(d.visible=c.visible),a.options.saveWidths&&(d.width=c.width),a.options.saveSort&&(d.sort=angular.copy(c.sort)),a.options.saveFilter&&(d.filters=[],c.filters.forEach(function(a){var b={};angular.forEach(a,function(a,c){"condition"!==c&&"$$hashKey"!==c&&"placeholder"!==c&&(b[c]=a)}),d.filters.push(b)})),a.api.pinning&&a.options.savePinning&&(d.pinned=c.renderContainer?c.renderContainer:""),b.push(d)}),b},saveScrollFocus:function(a){if(!a.api.cellNav)return{};var b={};if(a.options.saveFocus){b.focus=!0;var c=a.api.cellNav.getFocusedCell();null!==c&&(null!==c.col&&(b.colName=c.col.colDef.name),null!==c.row&&(b.rowVal=g.getRowVal(a,c.row)))}return(a.options.saveScroll||a.options.saveFocus&&!b.colName&&!b.rowVal)&&(b.focus=!1,a.renderContainers.body.prevRowScrollIndex&&(b.rowVal=g.getRowVal(a,a.renderContainers.body.visibleRowCache[a.renderContainers.body.prevRowScrollIndex])),a.renderContainers.body.prevColScrollIndex&&(b.colName=a.renderContainers.body.visibleColumnCache[a.renderContainers.body.prevColScrollIndex].name)),b},saveSelection:function(a){if(!a.api.selection||!a.options.saveSelection)return[];var b=a.api.selection.getSelectedGridRows().map(function(b){return g.getRowVal(a,b)});return b},saveGrouping:function(a){return a.api.grouping&&a.options.saveGrouping?a.api.grouping.getGrouping(a.options.saveGroupingExpandedStates):{}},savePagination:function(a){return a.api.pagination&&a.options.paginationPageSize?{paginationCurrentPage:a.options.paginationCurrentPage,paginationPageSize:a.options.paginationPageSize}:{}},saveTreeView:function(a){return a.api.treeView&&a.options.saveTreeView?a.api.treeView.getTreeView():{}},getRowVal:function(a,b){if(!b)return null;var c={};return a.options.saveRowIdentity?(c.identity=!0,c.row=a.options.saveRowIdentity(b.entity)):(c.identity=!1,c.row=a.renderContainers.body.visibleRowCache.indexOf(b)),c},restoreColumns:function(a,b){var c=!1;b.forEach(function(b,d){var e=a.getColumn(b.name);if(e&&!a.isRowHeaderColumn(e)){!a.options.saveVisible||e.visible===b.visible&&e.colDef.visible===b.visible||(e.visible=b.visible,e.colDef.visible=b.visible,a.api.core.raise.columnVisibilityChanged(e)),a.options.saveWidths&&e.width!==b.width&&(e.width=b.width,e.hasCustomWidth=!0),!a.options.saveSort||angular.equals(e.sort,b.sort)||void 0===e.sort&&angular.isEmpty(b.sort)||(e.sort=angular.copy(b.sort),c=!0),a.options.saveFilter&&!angular.equals(e.filters,b.filters)&&(b.filters.forEach(function(a,b){angular.extend(e.filters[b],a),"undefined"!=typeof a.term&&null!==a.term||delete e.filters[b].term}),a.api.core.raise.filterChanged()),a.api.pinning&&a.options.savePinning&&e.renderContainer!==b.pinned&&a.api.pinning.pinColumn(e,b.pinned);var f=a.getOnlyDataColumns().indexOf(e);if(-1!==f&&a.options.saveOrder&&f!==d){var g=a.columns.splice(f+a.rowHeaderColumns.length,1)[0];a.columns.splice(d+a.rowHeaderColumns.length,0,g)}}}),c&&a.api.core.raise.sortChanged(a,a.getColumnSorting())},restoreScrollFocus:function(a,b,c){if(a.api.cellNav){var d,e;if(c.colName){var f=a.options.columnDefs.filter(function(a){return a.name===c.colName});f.length>0&&(d=f[0])}c.rowVal&&c.rowVal.row&&(e=c.rowVal.identity?g.findRowByIdentity(a,c.rowVal):a.renderContainers.body.visibleRowCache[c.rowVal.row]);var h=e&&e.entity?e.entity:null;(d||h)&&(c.focus?a.api.cellNav.scrollToFocus(h,d):a.scrollTo(h,d))}},restoreSelection:function(a,b){a.api.selection&&(a.api.selection.clearSelectedRows(),b.forEach(function(b){if(b.identity){var c=g.findRowByIdentity(a,b);c&&a.api.selection.selectRow(c.entity)}else a.api.selection.selectRowByVisibleIndex(b.row)}))},restoreGrouping:function(a,b){a.api.grouping&&"undefined"!=typeof b&&null!==b&&!angular.equals(b,{})&&a.api.grouping.setGrouping(b)},restoreTreeView:function(a,b){a.api.treeView&&"undefined"!=typeof b&&null!==b&&!angular.equals(b,{})&&a.api.treeView.setTreeView(b)},restorePagination:function(a,b){a.api.pagination&&a.options.paginationPageSize&&(a.options.paginationCurrentPage=b.paginationCurrentPage,a.options.paginationPageSize=b.paginationPageSize)},findRowByIdentity:function(a,b){if(!a.options.saveRowIdentity)return null;var c=a.rows.filter(function(c){return a.options.saveRowIdentity(c.entity)===b.row});return c.length>0?c[0]:null}};return g}]),a.directive("uiGridSaveState",["uiGridSaveStateConstants","uiGridSaveStateService","gridUtil","$compile",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(e.grid)}}}])}(),function(){"use strict";var a=angular.module("ui.grid.selection",["ui.grid"]);a.constant("uiGridSelectionConstants",{featureName:"selection",selectionRowHeaderColName:"selectionRowHeaderCol"}),angular.module("ui.grid").config(["$provide",function(a){a.decorator("GridRow",["$delegate",function(a){return a.prototype.setSelected=function(a){this.isSelected=a,a?this.grid.selection.selectedCount++:this.grid.selection.selectedCount--},a}])}]),a.service("uiGridSelectionService",["$q","$templateCache","uiGridSelectionConstants","gridUtil",function(a,b,c,d){var e={initializeGrid:function(a){a.selection={},a.selection.lastSelectedRow=null,a.selection.selectAll=!1,a.selection.selectedCount=0,e.defaultGridOptions(a.options);var b={events:{selection:{rowSelectionChanged:function(a,b,c){},rowSelectionChangedBatch:function(a,b,c){}}},methods:{selection:{toggleRowSelection:function(b,c){var d=a.getRow(b);null!==d&&e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectRow:function(b,c){var d=a.getRow(b);null===d||d.isSelected||e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectRowByVisibleIndex:function(b,c){var d=a.renderContainers.body.visibleRowCache[b];null===d||"undefined"==typeof d||d.isSelected||e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},unSelectRow:function(b,c){var d=a.getRow(b);null!==d&&d.isSelected&&e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectAllRows:function(b){if(a.options.multiSelect!==!1){var c=[];a.rows.forEach(function(d){d.isSelected||d.enableSelection===!1||(d.setSelected(!0),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!0}},selectAllVisibleRows:function(b){if(a.options.multiSelect!==!1){var c=[];a.rows.forEach(function(d){d.visible?d.isSelected||d.enableSelection===!1||(d.setSelected(!0),e.decideRaiseSelectionEvent(a,d,c,b)):d.isSelected&&(d.setSelected(!1),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!0}},clearSelectedRows:function(b){e.clearSelectedRows(a,b)},getSelectedRows:function(){return e.getSelectedRows(a).map(function(a){return a.entity})},getSelectedGridRows:function(){return e.getSelectedRows(a)},getSelectedCount:function(){return a.selection.selectedCount},setMultiSelect:function(b){a.options.multiSelect=b},setModifierKeysToMultiSelect:function(b){a.options.modifierKeysToMultiSelect=b},getSelectAllState:function(){return a.selection.selectAll}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.enableRowSelection=a.enableRowSelection!==!1,a.multiSelect=a.multiSelect!==!1,a.noUnselect=a.noUnselect===!0,a.modifierKeysToMultiSelect=a.modifierKeysToMultiSelect===!0,a.enableRowHeaderSelection=a.enableRowHeaderSelection!==!1,"undefined"==typeof a.enableFullRowSelection&&(a.enableFullRowSelection=!a.enableRowHeaderSelection),a.enableSelectAll=a.enableSelectAll!==!1,a.enableSelectionBatchEvent=a.enableSelectionBatchEvent!==!1,a.selectionRowHeaderWidth=angular.isDefined(a.selectionRowHeaderWidth)?a.selectionRowHeaderWidth:30,a.enableFooterTotalSelected=a.enableFooterTotalSelected!==!1,a.isRowSelectable=angular.isDefined(a.isRowSelectable)?a.isRowSelectable:angular.noop},toggleRowSelection:function(a,b,c,d,f){var g=b.isSelected;if(b.enableSelection!==!1||g){var h;d||g?!d&&g&&(h=e.getSelectedRows(a),h.length>1&&(g=!1,e.clearSelectedRows(a,c))):e.clearSelectedRows(a,c),g&&f||(b.setSelected(!g),b.isSelected===!0&&(a.selection.lastSelectedRow=b),h=e.getSelectedRows(a),a.selection.selectAll=a.rows.length===h.length,a.api.selection.raise.rowSelectionChanged(b,c))}},shiftSelect:function(a,b,c,d){if(d){var f=e.getSelectedRows(a),g=f.length>0?a.renderContainers.body.visibleRowCache.indexOf(a.selection.lastSelectedRow):0,h=a.renderContainers.body.visibleRowCache.indexOf(b);if(g>h){var i=g;g=h,h=i}for(var j=[],k=g;h>=k;k++){var l=a.renderContainers.body.visibleRowCache[k];l&&(l.isSelected||l.enableSelection===!1||(l.setSelected(!0),a.selection.lastSelectedRow=l,e.decideRaiseSelectionEvent(a,l,j,c)))}e.decideRaiseSelectionBatchEvent(a,j,c)}},getSelectedRows:function(a){return a.rows.filter(function(a){return a.isSelected})},clearSelectedRows:function(a,b){var c=[];e.getSelectedRows(a).forEach(function(d){d.isSelected&&(d.setSelected(!1),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!1,a.selection.selectedCount=0},decideRaiseSelectionEvent:function(a,b,c,d){a.options.enableSelectionBatchEvent?c.push(b):a.api.selection.raise.rowSelectionChanged(b,d)},decideRaiseSelectionBatchEvent:function(a,b,c){b.length>0&&a.api.selection.raise.rowSelectionChangedBatch(b,c)}};return e}]),a.directive("uiGridSelection",["uiGridSelectionConstants","uiGridSelectionService","$templateCache","uiGridConstants",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,e,f,g){if(b.initializeGrid(g.grid),g.grid.options.enableRowHeaderSelection){var h={name:a.selectionRowHeaderColName,displayName:"",width:g.grid.options.selectionRowHeaderWidth,minWidth:10,cellTemplate:"ui-grid/selectionRowHeader",headerCellTemplate:"ui-grid/selectionHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1,exporterSuppressExport:!0,allowCellFocus:!0};g.grid.addRowHeaderColumn(h)}var i=!1,j=function(a){return a.forEach(function(a){a.enableSelection=g.grid.options.isRowSelectable(a)}),a},k=function(){g.grid.options.isRowSelectable!==angular.noop&&i!==!0&&(g.grid.registerRowsProcessor(j,500),i=!0)};k();var l=g.grid.registerDataChangeCallback(k,[d.dataChange.OPTIONS]);c.$on("$destroy",l)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridSelectionRowHeaderButtons",["$templateCache","uiGridSelectionService","gridUtil",function(a,b,c){return{replace:!0,restrict:"E",template:a.get("ui-grid/selectionRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(a,d,e,f){function g(a,c){c.stopPropagation(),c.shiftKey?b.shiftSelect(i,a,c,i.options.multiSelect):c.ctrlKey||c.metaKey?b.toggleRowSelection(i,a,c,i.options.multiSelect,i.options.noUnselect):b.toggleRowSelection(i,a,c,i.options.multiSelect&&!i.options.modifierKeysToMultiSelect,i.options.noUnselect)}function h(a){(a.ctrlKey||a.shiftKey)&&(a.target.onselectstart=function(){return!1},window.setTimeout(function(){a.target.onselectstart=null},0))}var i=f.grid;a.selectButtonClick=g,"ie"===c.detectBrowser()&&d.on("mousedown",h)}}}]),a.directive("uiGridSelectionSelectAllButtons",["$templateCache","uiGridSelectionService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/selectionSelectAllButtons"),scope:!1,link:function(a,c,d,e){var f=a.col.grid;a.headerButtonClick=function(a,c){f.selection.selectAll?(b.clearSelectedRows(f,c),f.options.noUnselect&&f.api.selection.selectRowByVisibleIndex(0,c),f.selection.selectAll=!1):f.options.multiSelect&&(f.api.selection.selectAllVisibleRows(c),f.selection.selectAll=!0)}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService",function(a,b,c,d,e,f){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+",'ui-grid-row-selected': row.isSelected}":"{'ui-grid-row-selected': row.isSelected}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}]),a.directive("uiGridCell",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService","$timeout",function(a,b,c,d,e,f,g){return{priority:-200,restrict:"A",require:"?^uiGrid",scope:!1,link:function(a,c,d,e){function h(){a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection&&(c.addClass("ui-grid-disable-selection"),c.on("touchstart",m),c.on("touchend",n),c.on("click",l),a.registered=!0)}function i(){a.registered&&(c.removeClass("ui-grid-disable-selection"),c.off("touchstart",m),c.off("touchend",n),c.off("click",l),a.registered=!1)}var j=0,k=300;e.grid.api.cellNav&&e.grid.api.cellNav.on.viewPortKeyDown(a,function(b,c){null!==c&&c.row===a.row&&c.col===a.col&&32===b.keyCode&&"selectionRowHeaderCol"===a.col.colDef.name&&(f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect&&!a.grid.options.modifierKeysToMultiSelect,a.grid.options.noUnselect),a.$apply())});var l=function(b){c.off("touchend",n),b.shiftKey?f.shiftSelect(a.grid,a.row,b,a.grid.options.multiSelect):b.ctrlKey||b.metaKey?f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect,a.grid.options.noUnselect):f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect&&!a.grid.options.modifierKeysToMultiSelect,a.grid.options.noUnselect),a.$apply(),g(function(){c.on("touchend",n)},k)},m=function(a){j=(new Date).getTime(),c.off("click",l)},n=function(a){var b=(new Date).getTime(),d=b-j;k>d&&l(a),g(function(){c.on("click",l)},k)};h();var o=a.grid.registerDataChangeCallback(function(){a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection&&!a.registered?h():a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection||!a.registered||i()},[b.dataChange.OPTIONS]);c.on("$destroy",o)}}}]),a.directive("uiGridGridFooter",["$compile","uiGridConstants","gridUtil",function(a,b,c){return{restrict:"EA",replace:!0,priority:-1e3,require:"^uiGrid",scope:!0,compile:function(b,d){return{pre:function(b,d,e,f){f.grid.options.showGridFooter&&c.getTemplate("ui-grid/gridFooterSelectedItems").then(function(c){var e=angular.element(c),f=a(e)(b);angular.element(d[0].getElementsByClassName("ui-grid-grid-footer")[0]).append(f)})},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.treeBase",["ui.grid"]);a.constant("uiGridTreeBaseConstants",{featureName:"treeBase",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridTreeBaseService",["$q","uiGridTreeBaseConstants","gridUtil","GridRow","gridClassFactory","i18nService","uiGridConstants","rowSorter",function(a,b,c,d,e,f,g,h){ +var i={initializeGrid:function(a,b){a.treeBase={},a.treeBase.numberLevels=0,a.treeBase.expandAll=!1,a.treeBase.tree=[],i.defaultGridOptions(a.options),a.registerRowsProcessor(i.treeRows,410),a.registerColumnBuilder(i.treeBaseColumnBuilder),i.createRowHeader(a);var c={events:{treeBase:{rowExpanded:{},rowCollapsed:{}}},methods:{treeBase:{expandAllRows:function(){i.expandAllRows(a)},collapseAllRows:function(){i.collapseAllRows(a)},toggleRowTreeState:function(b){i.toggleRowTreeState(a,b)},expandRow:function(b){i.expandRow(a,b)},expandRowChildren:function(b){i.expandRowChildren(a,b)},collapseRow:function(b){i.collapseRow(a,b)},collapseRowChildren:function(b){i.collapseRowChildren(a,b)},getTreeExpandedState:function(){return{expandedState:i.getTreeState(a)}},setTreeState:function(b){i.setTreeState(a,b)},getRowChildren:function(a){return a.treeNode.children.map(function(a){return a.row})}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.treeRowHeaderBaseWidth=a.treeRowHeaderBaseWidth||30,a.treeIndent=a.treeIndent||10,a.showTreeRowHeader=a.showTreeRowHeader!==!1,a.showTreeExpandNoChildren=a.showTreeExpandNoChildren!==!1,a.treeRowHeaderAlwaysVisible=a.treeRowHeaderAlwaysVisible!==!1,a.treeCustomAggregations=a.treeCustomAggregations||{},a.enableExpandAll=a.enableExpandAll!==!1},treeBaseColumnBuilder:function(a,b,c){"undefined"!=typeof a.customTreeAggregationFn&&(b.treeAggregationFn=a.customTreeAggregationFn),"undefined"!=typeof a.treeAggregationType&&(b.treeAggregation={type:a.treeAggregationType},"undefined"!=typeof c.treeCustomAggregations[a.treeAggregationType]?(b.treeAggregationFn=c.treeCustomAggregations[a.treeAggregationType].aggregationFn,b.treeAggregationFinalizerFn=c.treeCustomAggregations[a.treeAggregationType].finalizerFn,b.treeAggregation.label=c.treeCustomAggregations[a.treeAggregationType].label):"undefined"!=typeof i.nativeAggregations()[a.treeAggregationType]&&(b.treeAggregationFn=i.nativeAggregations()[a.treeAggregationType].aggregationFn,b.treeAggregation.label=i.nativeAggregations()[a.treeAggregationType].label)),"undefined"!=typeof a.treeAggregationLabel&&("undefined"==typeof b.treeAggregation&&(b.treeAggregation={}),b.treeAggregation.label=a.treeAggregationLabel),b.treeAggregationUpdateEntity=a.treeAggregationUpdateEntity!==!1,"undefined"==typeof b.customTreeAggregationFinalizerFn&&(b.customTreeAggregationFinalizerFn=a.customTreeAggregationFinalizerFn)},createRowHeader:function(a){var c={name:b.rowHeaderColName,displayName:"",width:a.options.treeRowHeaderBaseWidth,minWidth:10,cellTemplate:"ui-grid/treeBaseRowHeader",headerCellTemplate:"ui-grid/treeBaseHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1,exporterSuppressExport:!0,allowCellFocus:!0};c.visible=a.options.treeRowHeaderAlwaysVisible,a.addRowHeaderColumn(c)},expandAllRows:function(a){a.treeBase.tree.forEach(function(c){i.setAllNodes(a,c,b.EXPANDED)}),a.treeBase.expandAll=!0,a.queueGridRefresh()},collapseAllRows:function(a){a.treeBase.tree.forEach(function(c){i.setAllNodes(a,c,b.COLLAPSED)}),a.treeBase.expandAll=!1,a.queueGridRefresh()},setAllNodes:function(a,c,d){"undefined"!=typeof c.state&&c.state!==d&&(c.state=d,d===b.EXPANDED?a.api.treeBase.raise.rowExpanded(c.row):a.api.treeBase.raise.rowCollapsed(c.row)),c.children&&c.children.forEach(function(b){i.setAllNodes(a,b,d)})},toggleRowTreeState:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(c.treeNode.state===b.EXPANDED?i.collapseRow(a,c):i.expandRow(a,c),a.queueGridRefresh())},expandRow:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||c.treeNode.state!==b.EXPANDED&&(c.treeNode.state=b.EXPANDED,a.api.treeBase.raise.rowExpanded(c),a.treeBase.expandAll=i.allExpanded(a.treeBase.tree),a.queueGridRefresh())},expandRowChildren:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(i.setAllNodes(a,c.treeNode,b.EXPANDED),a.treeBase.expandAll=i.allExpanded(a.treeBase.tree),a.queueGridRefresh())},collapseRow:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||c.treeNode.state!==b.COLLAPSED&&(c.treeNode.state=b.COLLAPSED,a.treeBase.expandAll=!1,a.api.treeBase.raise.rowCollapsed(c),a.queueGridRefresh())},collapseRowChildren:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(i.setAllNodes(a,c.treeNode,b.COLLAPSED),a.treeBase.expandAll=!1,a.queueGridRefresh())},allExpanded:function(a){var b=!0;return a.forEach(function(a){i.allExpandedInternal(a)||(b=!1)}),b},allExpandedInternal:function(a){if(a.children&&a.children.length>0){if(a.state===b.COLLAPSED)return!1;var c=!0;return a.children.forEach(function(a){i.allExpandedInternal(a)||(c=!1)}),c}return!0},treeRows:function(a){if(0===a.length)return a;var c=this;b.EXPANDED;return c.treeBase.tree=i.createTree(c,a),i.updateRowHeaderWidth(c),i.sortTree(c),i.fixFilter(c),i.renderTree(c.treeBase.tree)},updateRowHeaderWidth:function(a){var c=a.getColumn(b.rowHeaderColName),d=a.options.treeRowHeaderBaseWidth+a.options.treeIndent*Math.max(a.treeBase.numberLevels-1,0);c&&d!==c.width&&(c.width=d,a.queueRefresh());var e=!0;a.options.showTreeRowHeader===!1&&(e=!1),a.options.treeRowHeaderAlwaysVisible===!1&&a.treeBase.numberLevels<=0&&(e=!1),c.visible!==e&&(c.visible=e,c.colDef.visible=e,a.queueGridRefresh())},renderTree:function(a){var c=[];return a.forEach(function(a){a.row.visible&&c.push(a.row),a.state===b.EXPANDED&&a.children&&a.children.length>0&&(c=c.concat(i.renderTree(a.children)))}),c},createTree:function(a,c){var d,e=-1,f=[];a.treeBase.tree=[],a.treeBase.numberLevels=0;var g=i.getAggregations(a),h=function(c){if("undefined"!=typeof c.entity.$$treeLevel&&c.treeLevel!==c.entity.$$treeLevel&&(c.treeLevel=c.entity.$$treeLevel),c.treeLevel<=e){for(;c.treeLevel<=e;){var h=f.pop();i.finaliseAggregations(h),e--}d=f.length>0?i.setCurrentState(f):b.EXPANDED}("undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0)&&c.visible&&i.aggregate(a,c,f),i.addOrUseNode(a,c,f,g),"undefined"!=typeof c.treeLevel&&null!==c.treeLevel&&c.treeLevel>=0&&(f.push(c),e++,d=i.setCurrentState(f)),a.treeBase.numberLevels0;){var j=f.pop();i.finaliseAggregations(j)}return a.treeBase.tree},addOrUseNode:function(a,c,d,e){var f=[];e.forEach(function(a){f.push(i.buildAggregationObject(a.col))});var g={state:b.COLLAPSED,row:c,parentRow:null,aggregations:f,children:[]};c.treeNode&&(g.state=c.treeNode.state),d.length>0&&(g.parentRow=d[d.length-1]),c.treeNode=g,0===d.length?a.treeBase.tree.push(g):d[d.length-1].treeNode.children.push(g)},setCurrentState:function(a){var c=b.EXPANDED;return a.forEach(function(a){a.treeNode.state===b.COLLAPSED&&(c=b.COLLAPSED)}),c},sortTree:function(a){a.columns.forEach(function(a){a.sort&&a.sort.ignoreSort&&delete a.sort.ignoreSort}),a.treeBase.tree=i.sortInternal(a,a.treeBase.tree)},sortInternal:function(a,c){var d=c.map(function(a){return a.row});d=h.sort(a,d,a.columns);var e=d.map(function(a){return a.treeNode});return e.forEach(function(c){c.state===b.EXPANDED&&c.children&&c.children.length>0&&(c.children=i.sortInternal(a,c.children))}),e},fixFilter:function(a){var b;a.treeBase.tree.forEach(function(a){a.children&&a.children.length>0&&(b=a.row.visible,i.fixFilterInternal(a.children,b))})},fixFilterInternal:function(a,b){return a.forEach(function(a){a.row.visible&&!b&&(i.setParentsVisible(a),b=!0),a.children&&a.children.length>0&&i.fixFilterInternal(a.children,b&&a.row.visible)&&(b=!0)}),b},setParentsVisible:function(a){for(;a.parentRow;)a.parentRow.visible=!0,a=a.parentRow.treeNode},buildAggregationObject:function(a){var b={col:a};return a.treeAggregation&&a.treeAggregation.type&&(b.type=a.treeAggregation.type),a.treeAggregation&&a.treeAggregation.label&&(b.label=a.treeAggregation.label),b},getAggregations:function(a){var b=[];return a.columns.forEach(function(c){"undefined"!=typeof c.treeAggregationFn&&(b.push(i.buildAggregationObject(c)),a.options.showColumnFooter&&"undefined"==typeof c.colDef.aggregationType&&c.treeAggregation&&(c.treeFooterAggregation=i.buildAggregationObject(c),c.aggregationType=i.treeFooterAggregationType))}),b},aggregate:function(a,b,c){0===c.length&&b.treeNode&&b.treeNode.aggregations&&b.treeNode.aggregations.forEach(function(c){if("undefined"!=typeof c.col.treeFooterAggregation){var d=a.getCellValue(b,c.col),e=Number(d);c.col.treeAggregationFn(c.col.treeFooterAggregation,d,e,b)}}),c.forEach(function(c,d){c.treeNode.aggregations&&c.treeNode.aggregations.forEach(function(c){var e=a.getCellValue(b,c.col),f=Number(e);c.col.treeAggregationFn(c,e,f,b),0===d&&"undefined"!=typeof c.col.treeFooterAggregation&&c.col.treeAggregationFn(c.col.treeFooterAggregation,e,f,b)})})},nativeAggregations:function(){var a={count:{label:f.get().aggregation.count,menuTitle:f.get().grouping.aggregate_count,aggregationFn:function(a,b,c){"undefined"==typeof a.value?a.value=1:a.value++}},sum:{label:f.get().aggregation.sum,menuTitle:f.get().grouping.aggregate_sum,aggregationFn:function(a,b,c){isNaN(c)||("undefined"==typeof a.value?a.value=c:a.value+=c)}},min:{label:f.get().aggregation.min,menuTitle:f.get().grouping.aggregate_min,aggregationFn:function(a,b,c){"undefined"==typeof a.value?a.value=b:"undefined"!=typeof b&&null!==b&&(ba.value||null===a.value)&&(a.value=b)}},avg:{label:f.get().aggregation.avg,menuTitle:f.get().grouping.aggregate_avg,aggregationFn:function(a,b,c){"undefined"==typeof a.count?a.count=1:a.count++,isNaN(c)||("undefined"==typeof a.value||"undefined"==typeof a.sum?(a.value=c,a.sum=c):(a.sum+=c,a.value=a.sum/a.count))}}};return a},finaliseAggregation:function(a,b){b.col.treeAggregationUpdateEntity&&"undefined"!=typeof a&&"undefined"!=typeof a.entity["$$"+b.col.uid]&&angular.extend(b,a.entity["$$"+b.col.uid]),"function"==typeof b.col.treeAggregationFinalizerFn&&b.col.treeAggregationFinalizerFn(b),"function"==typeof b.col.customTreeAggregationFinalizerFn&&b.col.customTreeAggregationFinalizerFn(b),"undefined"==typeof b.rendered&&(b.rendered=b.label?b.label+b.value:b.value)},finaliseAggregations:function(a){"undefined"!=typeof a.treeNode.aggregations&&a.treeNode.aggregations.forEach(function(b){if(i.finaliseAggregation(a,b),b.col.treeAggregationUpdateEntity){var c={};angular.forEach(b,function(a,d){b.hasOwnProperty(d)&&"col"!==d&&(c[d]=a)}),a.entity["$$"+b.col.uid]=c}})},treeFooterAggregationType:function(a,b){return i.finaliseAggregation(void 0,b.treeFooterAggregation),"undefined"==typeof b.treeFooterAggregation.value||null===b.treeFooterAggregation.rendered?"":b.treeFooterAggregation.rendered}};return i}]),a.directive("uiGridTreeBaseRowHeaderButtons",["$templateCache","uiGridTreeBaseService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/treeBaseRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(a,c,d,e){var f=e.grid;a.treeButtonClick=function(a,c){b.toggleRowTreeState(f,a,c)}}}}]),a.directive("uiGridTreeBaseExpandAllButtons",["$templateCache","uiGridTreeBaseService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/treeBaseExpandAllButtons"),scope:!1,link:function(a,c,d,e){var f=a.col.grid;a.headerButtonClick=function(a,c){f.treeBase.expandAll?b.collapseAllRows(f,c):b.expandAllRows(f,c)}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","gridUtil","$parse",function(a,b,c,d){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+",'ui-grid-tree-header-row': row.treeLevel > -1}":"{'ui-grid-tree-header-row': row.treeLevel > -1}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.treeView",["ui.grid","ui.grid.treeBase"]);a.constant("uiGridTreeViewConstants",{featureName:"treeView",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridTreeViewService",["$q","uiGridTreeViewConstants","uiGridTreeBaseConstants","uiGridTreeBaseService","gridUtil","GridRow","gridClassFactory","i18nService","uiGridConstants",function(a,b,c,d,e,f,g,h,i){var j={initializeGrid:function(a,b){d.initializeGrid(a,b),a.treeView={},a.registerRowsProcessor(j.adjustSorting,60);var c={events:{treeView:{}},methods:{treeView:{}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableTreeView=a.enableTreeView!==!1},adjustSorting:function(a){var b=this;return b.columns.forEach(function(a){a.sort&&(a.sort.ignoreSort=!0)}),a}};return j}]),a.directive("uiGridTreeView",["uiGridTreeViewConstants","uiGridTreeViewService","$templateCache",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){e.grid.options.enableTreeView!==!1&&b.initializeGrid(e.grid,a)},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.validate",["ui.grid"]);a.service("uiGridValidateService",["$sce","$q","$http","i18nService","uiGridConstants",function(a,b,c,d,e){var f={validatorFactories:{},setExternalFactoryFunction:function(a){f.externalFactoryFunction=a},clearExternalFactory:function(){delete f.externalFactoryFunction},getValidatorFromExternalFactory:function(a,b){return f.externalFactoryFunction(a,b).validatorFactory(b)},getMessageFromExternalFactory:function(a,b){return f.externalFactoryFunction(a,b).messageFunction(b)},setValidator:function(a,b,c){f.validatorFactories[a]={validatorFactory:b,messageFunction:c}},getValidator:function(a,b){if(f.externalFactoryFunction){var c=f.getValidatorFromExternalFactory(a,b);if(c)return c}if(!f.validatorFactories[a])throw"Invalid validator name: "+a;return f.validatorFactories[a].validatorFactory(b)},getMessage:function(a,b){if(f.externalFactoryFunction){var c=f.getMessageFromExternalFactory(a,b);if(c)return c}return f.validatorFactories[a].messageFunction(b)},isInvalid:function(a,b){return a["$$invalid"+b.name]},setInvalid:function(a,b){a["$$invalid"+b.name]=!0},setValid:function(a,b){delete a["$$invalid"+b.name]},setError:function(a,b,c){a["$$errors"+b.name]||(a["$$errors"+b.name]={}),a["$$errors"+b.name][c]=!0},clearError:function(a,b,c){a["$$errors"+b.name]&&c in a["$$errors"+b.name]&&delete a["$$errors"+b.name][c]},getErrorMessages:function(a,b){var c=[];return a["$$errors"+b.name]&&0!==Object.keys(a["$$errors"+b.name]).length?(Object.keys(a["$$errors"+b.name]).sort().forEach(function(a){c.push(f.getMessage(a,b.validators[a]))}),c):c},getFormattedErrors:function(b,c){var e="",g=f.getErrorMessages(b,c);return g.length?(g.forEach(function(a){e+=a+"
              "}),a.trustAsHtml("

              "+d.getSafeText("validate.error")+"

              "+e)):void 0},getTitleFormattedErrors:function(b,c){var e="\n",g="",h=f.getErrorMessages(b,c);return h.length?(h.forEach(function(a){g+=a+e}),a.trustAsHtml(d.getSafeText("validate.error")+e+g)):void 0},runValidators:function(a,c,d,e,g){if(d!==e){if("undefined"==typeof c.name||!c.name)throw new Error("colDef.name is required to perform validation");f.setValid(a,c);var h=function(a,b,c){return function(h){h||(f.setInvalid(a,b),f.setError(a,b,c),g&&g.api.validate.raise.validationFailed(a,b,d,e))}};for(var i in c.validators){f.clearError(a,c,i);var j=f.getValidator(i,c.validators[i]);b.when(j(e,d,a,c)).then(h(a,c,i))}}},createDefaultValidators:function(){f.setValidator("minLength",function(a){return function(b,c,d,e){return void 0===c||null===c||""===c?!0:c.length>=a}},function(a){return d.getSafeText("validate.minLength").replace("THRESHOLD",a)}),f.setValidator("maxLength",function(a){return function(b,c,d,e){return void 0===c||null===c||""===c?!0:c.length<=a}},function(a){return d.getSafeText("validate.maxLength").replace("THRESHOLD",a)}),f.setValidator("required",function(a){return function(b,c,d,e){return a?!(void 0===c||null===c||""===c):!0}},function(a){return d.getSafeText("validate.required")})},initializeGrid:function(a,b){b.validate={isInvalid:f.isInvalid,getFormattedErrors:f.getFormattedErrors,getTitleFormattedErrors:f.getTitleFormattedErrors,runValidators:f.runValidators};var c={events:{validate:{validationFailed:function(a,b,c,d){}}},methods:{validate:{isInvalid:function(a,c){return b.validate.isInvalid(a,c)},getErrorMessages:function(a,c){return b.validate.getErrorMessages(a,c)},getFormattedErrors:function(a,c){return b.validate.getFormattedErrors(a,c)},getTitleFormattedErrors:function(a,c){return b.validate.getTitleFormattedErrors(a,c)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.edit&&b.api.edit.on.afterCellEdit(a,function(a,c,d,e){b.validate.runValidators(a,c,d,e,b)}),f.createDefaultValidators()}};return f}]),a.directive("uiGridValidate",["gridUtil","uiGridValidateService",function(a,b){return{priority:0,replace:!0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(a,e.grid)},post:function(a,b,c,d){}}}}}])}(),angular.module("ui.grid").run(["$templateCache",function(a){"use strict";a.put("ui-grid/ui-grid-filter",'
               
               
              '),a.put("ui-grid/ui-grid-footer",''),a.put("ui-grid/ui-grid-grid-footer",''),a.put("ui-grid/ui-grid-group-panel",'
              • {{group.displayName}} x
              '),a.put("ui-grid/ui-grid-header",'
              '),a.put("ui-grid/ui-grid-menu-button",'
               
              '),a.put("ui-grid/ui-grid-no-header",'
              '),a.put("ui-grid/ui-grid-row","
              "),a.put("ui-grid/ui-grid",'
              '),a.put("ui-grid/uiGridCell",'
              {{COL_FIELD CUSTOM_FILTERS}}
              '),a.put("ui-grid/uiGridColumnMenu",'
              '),a.put("ui-grid/uiGridFooterCell",'
              {{ col.getAggregationText() + ( col.getAggregationValue() CUSTOM_FILTERS ) }}
              '),a.put("ui-grid/uiGridHeaderCell",'
              {{ col.displayName CUSTOM_FILTERS }} {{col.sort.priority + 1}}
              '),a.put("ui-grid/uiGridMenu",'
              '),a.put("ui-grid/uiGridMenuItem",''),a.put("ui-grid/uiGridRenderContainer","
              "),a.put("ui-grid/uiGridViewport",'
              '),a.put("ui-grid/cellEditor",'
              '),a.put("ui-grid/dropdownEditor",'
              '),a.put("ui-grid/fileChooserEditor",'
              '),a.put("ui-grid/expandableRow",'
              '),a.put("ui-grid/expandableRowHeader",'
              '),a.put("ui-grid/expandableScrollFiller","
              "),a.put("ui-grid/expandableTopRowHeader",'
              '),a.put("ui-grid/csvLink",'LINK_LABEL'),a.put("ui-grid/importerMenuItem",'
            • '),a.put("ui-grid/importerMenuItemContainer","
              "),a.put("ui-grid/pagination",''), +a.put("ui-grid/columnResizer",'
              '),a.put("ui-grid/gridFooterSelectedItems",'({{"search.selectedItems" | t}} {{grid.selection.selectedCount}})'),a.put("ui-grid/selectionHeaderCell",'
              '),a.put("ui-grid/selectionRowHeader",'
              '),a.put("ui-grid/selectionRowHeaderButtons",'
               
              '),a.put("ui-grid/selectionSelectAllButtons",'
              '),a.put("ui-grid/treeBaseExpandAllButtons",'
              '),a.put("ui-grid/treeBaseHeaderCell",'
              '),a.put("ui-grid/treeBaseRowHeader",'
              '),a.put("ui-grid/treeBaseRowHeaderButtons","
              -1 }\" ng-click=\"treeButtonClick(row, $event)\"> -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'expanded', 'ui-grid-icon-plus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'collapsed'}\" ng-style=\"{'padding-left': grid.options.treeIndent * row.treeLevel + 'px'}\">  
              "),a.put("ui-grid/cellTitleValidator",'
              {{COL_FIELD CUSTOM_FILTERS}}
              '),a.put("ui-grid/cellTooltipValidator",'
              {{COL_FIELD CUSTOM_FILTERS}}
              ')}]),function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){(function(b){a.exports=b.pdfMake=c(1)}).call(b,function(){return this}())},function(a,b,c){(function(b){"use strict";function d(a,b,c){this.docDefinition=a,this.fonts=b||h,this.vfs=c}var e=c(6),f=c(105),g=f.saveAs,h={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-Italic.ttf"}};d.prototype._createDoc=function(a,c){var d=new e(this.fonts);d.fs.bindFS(this.vfs);var f,g=d.createPdfKitDocument(this.docDefinition,a),h=[];g.on("data",function(a){h.push(a)}),g.on("end",function(){f=b.concat(h),c(f,g._pdfMakePages)}),g.end()},d.prototype._getPages=function(a,b){if(!b)throw"getBuffer is an async method and needs a callback argument";this._createDoc(a,function(a,c){b(c)})},d.prototype.open=function(a){var b=window.open("","_blank");try{this.getDataUrl(function(a){b.location.href=a})}catch(c){throw b.close(),c}},d.prototype.print=function(){this.getDataUrl(function(a){var b=document.createElement("iframe");b.style.position="absolute",b.style.left="-99999px",b.src=a,b.onload=function(){function a(){document.body.removeChild(b),document.removeEventListener("click",a)}document.addEventListener("click",a,!1)},document.body.appendChild(b)},{autoPrint:!0})},d.prototype.download=function(a,b){"function"==typeof a&&(b=a,a=null),a=a||"file.pdf",this.getBuffer(function(c){var d;try{d=new Blob([c],{type:"application/pdf"})}catch(e){if("InvalidStateError"==e.name){var f=new Uint8Array(c);d=new Blob([f.buffer],{type:"application/pdf"})}}if(!d)throw"Could not generate blob";g(d,a),"function"==typeof b&&b()})},d.prototype.getBase64=function(a,b){if(!a)throw"getBase64 is an async method and needs a callback argument";this._createDoc(b,function(b){a(b.toString("base64"))})},d.prototype.getDataUrl=function(a,b){if(!a)throw"getDataUrl is an async method and needs a callback argument";this._createDoc(b,function(b){a("data:application/pdf;base64,"+b.toString("base64"))})},d.prototype.getBuffer=function(a,b){if(!a)throw"getBuffer is an async method and needs a callback argument";this._createDoc(b,function(b){a(b)})},a.exports={createPdf:function(a){return new d(a,window.pdfMake.fonts,window.pdfMake.vfs)}}}).call(b,c(2).Buffer)},function(a,b,c){(function(a,d){function e(){function a(){}try{var b=new Uint8Array(1);return b.foo=function(){return 42},b.constructor=a,42===b.foo()&&b.constructor===a&&"function"==typeof b.subarray&&0===b.subarray(1,1).byteLength}catch(c){return!1}}function f(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(b){return this instanceof a?(this.length=0,this.parent=void 0,"number"==typeof b?g(this,b):"string"==typeof b?h(this,b,arguments.length>1?arguments[1]:"utf8"):i(this,b)):arguments.length>1?new a(b,arguments[1]):new a(b)}function g(b,c){if(b=p(b,0>c?0:0|q(c)),!a.TYPED_ARRAY_SUPPORT)for(var d=0;c>d;d++)b[d]=0;return b}function h(a,b,c){"string"==typeof c&&""!==c||(c="utf8");var d=0|s(b,c);return a=p(a,d),a.write(b,c),a}function i(b,c){if(a.isBuffer(c))return j(b,c);if(Y(c))return k(b,c);if(null==c)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(c.buffer instanceof ArrayBuffer)return l(b,c);if(c instanceof ArrayBuffer)return m(b,c)}return c.length?n(b,c):o(b,c)}function j(a,b){var c=0|q(b.length);return a=p(a,c),b.copy(a,0,0,c),a}function k(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function l(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function m(b,c){return a.TYPED_ARRAY_SUPPORT?(c.byteLength,b=a._augment(new Uint8Array(c))):b=l(b,new Uint8Array(c)),b}function n(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function o(a,b){var c,d=0;"Buffer"===b.type&&Y(b.data)&&(c=b.data,d=0|q(c.length)),a=p(a,d);for(var e=0;d>e;e+=1)a[e]=255&c[e];return a}function p(b,c){a.TYPED_ARRAY_SUPPORT?(b=a._augment(new Uint8Array(c)),b.__proto__=a.prototype):(b.length=c,b._isBuffer=!0);var d=0!==c&&c<=a.poolSize>>>1;return d&&(b.parent=Z),b}function q(a){if(a>=f())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f().toString(16)+" bytes");return 0|a}function r(b,c){if(!(this instanceof r))return new r(b,c);var d=new a(b,c);return delete d.parent,d}function s(a,b){"string"!=typeof a&&(a=""+a);var c=a.length;if(0===c)return 0;for(var d=!1;;)switch(b){case"ascii":case"binary":case"raw":case"raws":return c;case"utf8":case"utf-8":return R(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return U(a).length;default:if(d)return R(a).length;b=(""+b).toLowerCase(),d=!0}}function t(a,b,c){var d=!1;if(b=0|b,c=void 0===c||c===1/0?this.length:0|c,a||(a="utf8"),0>b&&(b=0),c>this.length&&(c=this.length),b>=c)return"";for(;;)switch(a){case"hex":return F(this,b,c);case"utf8":case"utf-8":return B(this,b,c);case"ascii":return D(this,b,c);case"binary":return E(this,b,c);case"base64":return A(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}}function u(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d),d>e&&(d=e)):d=e;var f=b.length;if(f%2!==0)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;d>g;g++){var h=parseInt(b.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");a[c+g]=h}return g}function v(a,b,c,d){return V(R(b,a.length-c),a,c,d)}function w(a,b,c,d){return V(S(b),a,c,d)}function x(a,b,c,d){return w(a,b,c,d)}function y(a,b,c,d){return V(U(b),a,c,d)}function z(a,b,c,d){return V(T(b,a.length-c),a,c,d)}function A(a,b,c){return 0===b&&c===a.length?W.fromByteArray(a):W.fromByteArray(a.slice(b,c))}function B(a,b,c){c=Math.min(a.length,c);for(var d=[],e=b;c>e;){var f=a[e],g=null,h=f>239?4:f>223?3:f>191?2:1;if(c>=e+h){var i,j,k,l;switch(h){case 1:128>f&&(g=f);break;case 2:i=a[e+1],128===(192&i)&&(l=(31&f)<<6|63&i,l>127&&(g=l));break;case 3:i=a[e+1],j=a[e+2],128===(192&i)&&128===(192&j)&&(l=(15&f)<<12|(63&i)<<6|63&j,l>2047&&(55296>l||l>57343)&&(g=l));break;case 4:i=a[e+1],j=a[e+2],k=a[e+3],128===(192&i)&&128===(192&j)&&128===(192&k)&&(l=(15&f)<<18|(63&i)<<12|(63&j)<<6|63&k,l>65535&&1114112>l&&(g=l))}}null===g?(g=65533,h=1):g>65535&&(g-=65536,d.push(g>>>10&1023|55296),g=56320|1023&g),d.push(g),e+=h}return C(d)}function C(a){var b=a.length;if($>=b)return String.fromCharCode.apply(String,a);for(var c="",d=0;b>d;)c+=String.fromCharCode.apply(String,a.slice(d,d+=$));return c}function D(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(127&a[e]);return d}function E(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function F(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=Q(a[f]);return e}function G(a,b,c){for(var d=a.slice(b,c),e="",f=0;fa)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length")}function I(b,c,d,e,f,g){if(!a.isBuffer(b))throw new TypeError("buffer must be a Buffer instance");if(c>f||g>c)throw new RangeError("value is out of bounds");if(d+e>b.length)throw new RangeError("index out of range")}function J(a,b,c,d){0>b&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);f>e;e++)a[c+e]=(b&255<<8*(d?e:1-e))>>>8*(d?e:1-e)}function K(a,b,c,d){0>b&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);f>e;e++)a[c+e]=b>>>8*(d?e:3-e)&255}function L(a,b,c,d,e,f){if(b>e||f>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range");if(0>c)throw new RangeError("index out of range")}function M(a,b,c,d,e){return e||L(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(a,b,c,d,23,4),c+4}function N(a,b,c,d,e){return e||L(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(a,b,c,d,52,8),c+8}function O(a){if(a=P(a).replace(aa,""),a.length<2)return"";for(;a.length%4!==0;)a+="=";return a}function P(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function Q(a){return 16>a?"0"+a.toString(16):a.toString(16)}function R(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;d>g;g++){if(c=a.charCodeAt(g),c>55295&&57344>c){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(56320>c){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=e-55296<<10|c-56320|65536}else e&&(b-=3)>-1&&f.push(239,191,189);if(e=null,128>c){if((b-=1)<0)break;f.push(c)}else if(2048>c){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(65536>c){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(1114112>c))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function S(a){for(var b=[],c=0;c>8,e=c%256,f.push(e),f.push(d);return f}function U(a){return W.toByteArray(O(a))}function V(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}var W=c(3),X=c(4),Y=c(5);b.Buffer=a,b.SlowBuffer=r,b.INSPECT_MAX_BYTES=50,a.poolSize=8192;var Z={};a.TYPED_ARRAY_SUPPORT=void 0!==d.TYPED_ARRAY_SUPPORT?d.TYPED_ARRAY_SUPPORT:e(),a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array),a.isBuffer=function(a){return!(null==a||!a._isBuffer)},a.compare=function(b,c){if(!a.isBuffer(b)||!a.isBuffer(c))throw new TypeError("Arguments must be Buffers");if(b===c)return 0;for(var d=b.length,e=c.length,f=0,g=Math.min(d,e);g>f&&b[f]===c[f];)++f;return f!==g&&(d=b[f],e=c[f]),e>d?-1:d>e?1:0},a.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(b,c){if(!Y(b))throw new TypeError("list argument must be an Array of Buffers.");if(0===b.length)return new a(0);var d;if(void 0===c)for(c=0,d=0;d0&&(a=this.toString("hex",0,c).match(/.{2}/g).join(" "),this.length>c&&(a+=" ... ")),""},a.prototype.compare=function(b){if(!a.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?0:a.compare(this,b)},a.prototype.indexOf=function(b,c){function d(a,b,c){for(var d=-1,e=0;c+e2147483647?c=2147483647:-2147483648>c&&(c=-2147483648),c>>=0,0===this.length)return-1;if(c>=this.length)return-1;if(0>c&&(c=Math.max(this.length+c,0)),"string"==typeof b)return 0===b.length?-1:String.prototype.indexOf.call(this,b,c);if(a.isBuffer(b))return d(this,b,c);if("number"==typeof b)return a.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,b,c):d(this,[b],c);throw new TypeError("val must be string, number or Buffer")},a.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},a.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},a.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"==typeof b)d=b,c=this.length,b=0;else if(isFinite(b))b=0|b,isFinite(c)?(c=0|c,void 0===d&&(d="utf8")):(d=c,c=void 0);else{var e=d;d=b,b=0|c,c=e}var f=this.length-b;if((void 0===c||c>f)&&(c=f),a.length>0&&(0>c||0>b)||b>this.length)throw new RangeError("attempt to write outside buffer bounds");d||(d="utf8");for(var g=!1;;)switch(d){case"hex":return u(this,a,b,c);case"utf8":case"utf-8":return v(this,a,b,c);case"ascii":return w(this,a,b,c);case"binary":return x(this,a,b,c);case"base64":return y(this,a,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,a,b,c);default:if(g)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),g=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;a.prototype.slice=function(b,c){var d=this.length;b=~~b,c=void 0===c?d:~~c,0>b?(b+=d,0>b&&(b=0)):b>d&&(b=d),0>c?(c+=d,0>c&&(c=0)):c>d&&(c=d),b>c&&(c=b);var e;if(a.TYPED_ARRAY_SUPPORT)e=a._augment(this.subarray(b,c));else{var f=c-b;e=new a(f,void 0);for(var g=0;f>g;g++)e[g]=this[g+b]}return e.length&&(e.parent=this.parent||this),e},a.prototype.readUIntLE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f0&&(e*=256);)d+=this[a+--b]*e;return d},a.prototype.readUInt8=function(a,b){return b||H(a,1,this.length),this[a]},a.prototype.readUInt16LE=function(a,b){return b||H(a,2,this.length),this[a]|this[a+1]<<8},a.prototype.readUInt16BE=function(a,b){return b||H(a,2,this.length),this[a]<<8|this[a+1]},a.prototype.readUInt32LE=function(a,b){return b||H(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},a.prototype.readUInt32BE=function(a,b){return b||H(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},a.prototype.readIntLE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f=e&&(d-=Math.pow(2,8*b)),d},a.prototype.readIntBE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},a.prototype.readInt8=function(a,b){return b||H(a,1,this.length),128&this[a]?-1*(255-this[a]+1):this[a]},a.prototype.readInt16LE=function(a,b){b||H(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},a.prototype.readInt16BE=function(a,b){b||H(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},a.prototype.readInt32LE=function(a,b){return b||H(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},a.prototype.readInt32BE=function(a,b){return b||H(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},a.prototype.readFloatLE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!0,23,4)},a.prototype.readFloatBE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!1,23,4)},a.prototype.readDoubleLE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!0,52,8)},a.prototype.readDoubleBE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!1,52,8)},a.prototype.writeUIntLE=function(a,b,c,d){a=+a,b=0|b,c=0|c,d||I(this,a,b,c,Math.pow(2,8*c),0);var e=1,f=0;for(this[b]=255&a;++f=0&&(f*=256);)this[b+e]=a/f&255;return b+c},a.prototype.writeUInt8=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,1,255,0),a.TYPED_ARRAY_SUPPORT||(b=Math.floor(b)),this[c]=255&b,c+1},a.prototype.writeUInt16LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[c]=255&b,this[c+1]=b>>>8):J(this,b,c,!0),c+2},a.prototype.writeUInt16BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>8,this[c+1]=255&b):J(this,b,c,!1),c+2},a.prototype.writeUInt32LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[c+3]=b>>>24,this[c+2]=b>>>16,this[c+1]=b>>>8,this[c]=255&b):K(this,b,c,!0),c+4},a.prototype.writeUInt32BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>24,this[c+1]=b>>>16,this[c+2]=b>>>8,this[c+3]=255&b):K(this,b,c,!1),c+4},a.prototype.writeIntLE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=0,g=1,h=0>a?1:0;for(this[b]=255&a;++f>0)-h&255;return b+c},a.prototype.writeIntBE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=c-1,g=1,h=0>a?1:0;for(this[b+f]=255&a;--f>=0&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},a.prototype.writeInt8=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,1,127,-128),a.TYPED_ARRAY_SUPPORT||(b=Math.floor(b)),0>b&&(b=255+b+1),this[c]=255&b,c+1},a.prototype.writeInt16LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[c]=255&b,this[c+1]=b>>>8):J(this,b,c,!0),c+2},a.prototype.writeInt16BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>8,this[c+1]=255&b):J(this,b,c,!1),c+2},a.prototype.writeInt32LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[c]=255&b,this[c+1]=b>>>8,this[c+2]=b>>>16,this[c+3]=b>>>24):K(this,b,c,!0),c+4},a.prototype.writeInt32BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,2147483647,-2147483648),0>b&&(b=4294967295+b+1),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>24,this[c+1]=b>>>16,this[c+2]=b>>>8,this[c+3]=255&b):K(this,b,c,!1),c+4},a.prototype.writeFloatLE=function(a,b,c){return M(this,a,b,!0,c)},a.prototype.writeFloatBE=function(a,b,c){return M(this,a,b,!1,c)},a.prototype.writeDoubleLE=function(a,b,c){return N(this,a,b,!0,c)},a.prototype.writeDoubleBE=function(a,b,c){return N(this,a,b,!1,c)},a.prototype.copy=function(b,c,d,e){if(d||(d=0),e||0===e||(e=this.length),c>=b.length&&(c=b.length),c||(c=0),e>0&&d>e&&(e=d),e===d)return 0;if(0===b.length||0===this.length)return 0;if(0>c)throw new RangeError("targetStart out of bounds");if(0>d||d>=this.length)throw new RangeError("sourceStart out of bounds");if(0>e)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),b.length-cd&&e>c)for(f=g-1;f>=0;f--)b[f+c]=this[f+d];else if(1e3>g||!a.TYPED_ARRAY_SUPPORT)for(f=0;g>f;f++)b[f+c]=this[f+d];else b._set(this.subarray(d,d+g),c);return g},a.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),b>c)throw new RangeError("end < start");if(c!==b&&0!==this.length){if(0>b||b>=this.length)throw new RangeError("start out of bounds");if(0>c||c>this.length)throw new RangeError("end out of bounds");var d;if("number"==typeof a)for(d=b;c>d;d++)this[d]=a;else{var e=R(a.toString()),f=e.length;for(d=b;c>d;d++)this[d]=e[d%f]}return this}},a.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(a.TYPED_ARRAY_SUPPORT)return new a(this).buffer;for(var b=new Uint8Array(this.length),c=0,d=b.length;d>c;c+=1)b[c]=this[c];return b.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var _=a.prototype;a._augment=function(b){return b.constructor=a,b._isBuffer=!0,b._set=b.set,b.get=_.get,b.set=_.set,b.write=_.write,b.toString=_.toString,b.toLocaleString=_.toString,b.toJSON=_.toJSON,b.equals=_.equals,b.compare=_.compare,b.indexOf=_.indexOf,b.copy=_.copy,b.slice=_.slice,b.readUIntLE=_.readUIntLE,b.readUIntBE=_.readUIntBE,b.readUInt8=_.readUInt8,b.readUInt16LE=_.readUInt16LE,b.readUInt16BE=_.readUInt16BE,b.readUInt32LE=_.readUInt32LE,b.readUInt32BE=_.readUInt32BE,b.readIntLE=_.readIntLE,b.readIntBE=_.readIntBE,b.readInt8=_.readInt8,b.readInt16LE=_.readInt16LE,b.readInt16BE=_.readInt16BE,b.readInt32LE=_.readInt32LE,b.readInt32BE=_.readInt32BE,b.readFloatLE=_.readFloatLE,b.readFloatBE=_.readFloatBE,b.readDoubleLE=_.readDoubleLE,b.readDoubleBE=_.readDoubleBE,b.writeUInt8=_.writeUInt8,b.writeUIntLE=_.writeUIntLE,b.writeUIntBE=_.writeUIntBE,b.writeUInt16LE=_.writeUInt16LE,b.writeUInt16BE=_.writeUInt16BE,b.writeUInt32LE=_.writeUInt32LE,b.writeUInt32BE=_.writeUInt32BE,b.writeIntLE=_.writeIntLE,b.writeIntBE=_.writeIntBE,b.writeInt8=_.writeInt8,b.writeInt16LE=_.writeInt16LE,b.writeInt16BE=_.writeInt16BE,b.writeInt32LE=_.writeInt32LE,b.writeInt32BE=_.writeInt32BE,b.writeFloatLE=_.writeFloatLE,b.writeFloatBE=_.writeFloatBE,b.writeDoubleLE=_.writeDoubleLE,b.writeDoubleBE=_.writeDoubleBE,b.fill=_.fill,b.inspect=_.inspect,b.toArrayBuffer=_.toArrayBuffer,b};var aa=/[^+\/0-9A-Za-z-_]/g}).call(b,c(2).Buffer,function(){return this}())},function(a,b,c){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===g||b===l?62:b===h||b===m?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function c(a){function c(a){j[l++]=a}var d,e,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new f(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function e(a){function b(a){return d.charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var e,f,g,h=a.length%3,i="";for(e=0,g=a.length-h;g>e;e+=3)f=(a[e]<<16)+(a[e+1]<<8)+a[e+2],i+=c(f);switch(h){case 1:f=a[a.length-1],i+=b(f>>2),i+=b(f<<4&63),i+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],i+=b(f>>10),i+=b(f>>4&63),i+=b(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g="+".charCodeAt(0),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0),l="-".charCodeAt(0),m="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=e}(b)},function(a,b){b.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?NaN:(n?-1:1)*(1/0);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},b.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},function(a,b){var c=Array.isArray,d=Object.prototype.toString;a.exports=c||function(a){return!!a&&"[object Array]"==d.call(a)}},function(a,b,c){"use strict";function d(a){this.fontDescriptors=a}function e(a){if(!a)return null;if("number"==typeof a||a instanceof Number)a={left:a,right:a,top:a,bottom:a};else if(a instanceof Array)if(2===a.length)a={left:a[0],top:a[1],right:a[0],bottom:a[1]};else{if(4!==a.length)throw"Invalid pageMargins definition";a={left:a[0],top:a[1],right:a[2],bottom:a[3]}}return a}function f(a){a.registerTableLayouts({noBorders:{hLineWidth:function(a){return 0},vLineWidth:function(a){return 0},paddingLeft:function(a){return a&&4||0},paddingRight:function(a,b){return ab.options.size[1]?"landscape":"portrait";if(a.pageSize.orientation!==c){var d=b.options.size[0],e=b.options.size[1];b.options.size=[e,d]}}function i(a,b,c){c._pdfMakePages=a;for(var d=0;d0&&(h(a[d],c),c.addPage(c.options));for(var e=a[d],f=0,g=e.items.length;g>f;f++){var i=e.items[f];switch(i.type){case"vector":l(i.item,c);break;case"line":j(i.item,i.item.x,i.item.y,c);break;case"image":m(i.item,i.item.x,i.item.y,c)}}e.watermark&&k(e,c),b.setFontRefsToPdfDoc()}}function j(a,b,c,d){b=b||0,c=c||0;var e=a.getHeight(),f=a.getAscenderHeight();s.drawBackground(a,b,c,d);for(var g=0,h=a.inlines.length;h>g;g++){var i=a.inlines[g];d.fill(i.color||"black"),d.save(),d.transform(1,0,0,-1,0,d.page.height);var j=i.font.encode(i.text);d.addContent("BT"),d.addContent(""+(b+i.x)+" "+(d.page.height-c-f)+" Td"),d.addContent("/"+j.fontId+" "+i.fontSize+" Tf"),d.addContent("<"+j.encodedText+"> Tj"),d.addContent("ET"),i.link&&d.link(b+i.x,d.page.height-c-e,i.width,e,i.link),d.restore()}s.drawDecorations(a,b,c,d)}function k(a,b){var c=a.watermark;b.fill("black"),b.opacity(.6),b.save(),b.transform(1,0,0,-1,0,b.page.height);var d=180*Math.atan2(b.page.height,b.page.width)/Math.PI;b.rotate(d,{origin:[b.page.width/2,b.page.height/2]});var e=c.font.encode(c.text);b.addContent("BT"),b.addContent(""+(b.page.width/2-c.size.size.width/2)+" "+(b.page.height/2-c.size.size.height/4)+" Td"),b.addContent("/"+e.fontId+" "+c.size.fontSize+" Tf"),b.addContent("<"+e.encodedText+"> Tj"),b.addContent("ET"),b.restore()}function l(a,b){switch(b.lineWidth(a.lineWidth||1),a.dash?b.dash(a.dash.length,{space:a.dash.space||a.dash.length}):b.undash(),b.fillOpacity(a.fillOpacity||1),b.strokeOpacity(a.strokeOpacity||1),b.lineJoin(a.lineJoin||"miter"),a.type){case"ellipse":b.ellipse(a.x,a.y,a.r1,a.r2);break;case"rect":a.r?b.roundedRect(a.x,a.y,a.w,a.h,a.r):b.rect(a.x,a.y,a.w,a.h);break;case"line":b.moveTo(a.x1,a.y1),b.lineTo(a.x2,a.y2);break;case"polyline":if(0===a.points.length)break;b.moveTo(a.points[0].x,a.points[0].y);for(var c=1,d=a.points.length;d>c;c++)b.lineTo(a.points[c].x,a.points[c].y);if(a.points.length>1){var e=a.points[0],f=a.points[a.points.length-1];(a.closePath||e.x===f.x&&e.y===f.y)&&b.closePath()}}a.color&&a.lineColor?b.fillAndStroke(a.color,a.lineColor):a.color?b.fill(a.color):b.stroke(a.lineColor||"black")}function m(a,b,c,d){d.image(a.image,a.x,a.y,{width:a._width,height:a._height})}var n=(c(7),c(9)),o=c(11),p=c(24),q=(c(46),c(102)),r=c(103),s=c(104),n=c(9);d.prototype.createPdfKitDocument=function(a,b){b=b||{};var c=g(a.pageSize||"a4");if("landscape"===a.pageOrientation&&(c={width:c.height,height:c.width}),c.orientation="landscape"===a.pageOrientation?a.pageOrientation:"portrait",this.pdfKitDoc=new p({size:[c.width,c.height],compress:!1}),this.pdfKitDoc.info.Producer="pdfmake",this.pdfKitDoc.info.Creator="pdfmake",a.info){a.info;this.pdfKitDoc.info.Title=a.info.title?a.info.title:null,this.pdfKitDoc.info.Author=a.info.author?a.info.author:null,this.pdfKitDoc.info.Subject=a.info.subject?a.info.subject:null,this.pdfKitDoc.info.Keywords=a.info.keywords?a.info.keywords:null}this.fontProvider=new n(this.fontDescriptors,this.pdfKitDoc),a.images=a.images||{};var d=new o(c,e(a.pageMargins||40),new r(this.pdfKitDoc,a.images));f(d),b.tableLayouts&&d.registerTableLayouts(b.tableLayouts);var h=d.layoutDocument(a.content,this.fontProvider,a.styles||{},a.defaultStyle||{fontSize:12,font:"Roboto"},a.background,a.header,a.footer,a.images,a.watermark,a.pageBreakBefore);if(i(h,this.fontProvider,this.pdfKitDoc),b.autoPrint){var j=this.pdfKitDoc.ref({Type:"Action",S:"Named",N:"Print"});this.pdfKitDoc._root.data.OpenAction=j,j.end()}return this.pdfKitDoc};a.exports=d,d.prototype.fs=c(44)},function(a,b,c){var d;(function(a,e){(function(){function f(a,b){if(a!==b){var c=null===a,d=a===B,e=a===a,f=null===b,g=b===B,h=b===b; +if(a>b&&!f||!e||c&&!g&&h||d&&h)return 1;if(b>a&&!c||!h||f&&!d&&e||g&&e)return-1}return 0}function g(a,b,c){for(var d=a.length,e=c?d:-1;c?e--:++e-1;);return c}function l(a,b){for(var c=a.length;c--&&b.indexOf(a.charAt(c))>-1;);return c}function m(a,b){return f(a.criteria,b.criteria)||a.index-b.index}function n(a,b,c){for(var d=-1,e=a.criteria,g=b.criteria,h=e.length,i=c.length;++d=i)return j;var k=c[d];return j*("asc"===k||k===!0?1:-1)}}return a.index-b.index}function o(a){return Ua[a]}function p(a){return Va[a]}function q(a,b,c){return b?a=Ya[a]:c&&(a=Za[a]),"\\"+a}function r(a){return"\\"+Za[a]}function s(a,b,c){for(var d=a.length,e=b+(c?0:-1);c?e--:++e=a&&a>=9&&13>=a||32==a||160==a||5760==a||6158==a||a>=8192&&(8202>=a||8232==a||8233==a||8239==a||8287==a||12288==a||65279==a)}function v(a,b){for(var c=-1,d=a.length,e=-1,f=[];++cb,e=c?a.length:0,f=Tc(0,e,this.__views__),g=f.start,h=f.end,i=h-g,j=d?h:g-1,k=this.__iteratees__,l=k.length,m=0,n=wg(i,this.__takeCount__);if(!c||Q>e||e==i&&n==i)return cc(d&&c?a.reverse():a,this.__actions__);var o=[];a:for(;i--&&n>m;){j+=b;for(var p=-1,q=a[j];++p=Q?oc(b):null,j=b.length;i&&(f=Za,g=!1,b=i);a:for(;++ec&&(c=-c>e?0:e+c),d=d===B||d>e?e:+d||0,0>d&&(d+=e),e=c>d?0:d>>>0,c>>>=0;e>c;)a[c++]=b;return a}function Bb(a,b){var c=[];return Jg(a,function(a,d,e){b(a,d,e)&&c.push(a)}),c}function Cb(a,b,c,d){var e;return c(a,function(a,c,f){return b(a,c,f)?(e=d?c:a,!1):void 0}),e}function Db(a,b,c,d){d||(d=[]);for(var e=-1,f=a.length;++ed;)a=a[b[d++]];return d&&d==e?a:B}}function Jb(a,b,c,d,e,f){return a===b?!0:null==a||null==b||!He(a)&&!t(b)?a!==a&&b!==b:Kb(a,b,Jb,c,d,e,f)}function Kb(a,b,c,d,e,f,g){var h=Ch(a),i=Ch(b),j=W,k=W;h||(j=cg.call(a),j==V?j=ba:j!=ba&&(h=Qe(a))),i||(k=cg.call(b),k==V?k=ba:k!=ba&&(i=Qe(b)));var l=j==ba,m=k==ba,n=j==k;if(n&&!h&&!l)return Mc(a,b,j);if(!e){var o=l&&ag.call(a,"__wrapped__"),p=m&&ag.call(b,"__wrapped__");if(o||p)return c(o?a.value():a,p?b.value():b,d,e,f,g)}if(!n)return!1;f||(f=[]),g||(g=[]);for(var q=f.length;q--;)if(f[q]==a)return g[q]==b;f.push(a),g.push(b);var r=(h?Lc:Nc)(a,b,c,d,e,f,g);return f.pop(),g.pop(),r}function Lb(a,b,c){var d=b.length,e=d,f=!c;if(null==a)return!e;for(a=kd(a);d--;){var g=b[d];if(f&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++db&&(b=-b>e?0:e+b),c=c===B||c>e?e:+c||0,0>c&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Of(e);++d=Q,i=g?oc():null,j=[];i?(d=Za,f=!1):(g=!1,i=b?[]:j);a:for(;++c=e){for(;e>d;){var f=d+e>>>1,g=a[f];(c?b>=g:b>g)&&null!==g?d=f+1:e=f}return e}return ec(a,b,Bf,c)}function ec(a,b,c,d){b=c(b);for(var e=0,f=a?a.length:0,g=b!==b,h=null===b,i=b===B;f>e;){var j=rg((e+f)/2),k=c(a[j]),l=k!==B,m=k===k;if(g)var n=m||d;else n=h?m&&l&&(d||null!=k):i?m&&(d||l):null==k?!1:d?b>=k:b>k;n?e=j+1:f=j}return wg(f,Dg)}function fc(a,b,c){if("function"!=typeof a)return Bf;if(b===B)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)};case 5:return function(c,d,e,f,g){return a.call(b,c,d,e,f,g)}}return function(){return a.apply(b,arguments)}}function gc(a){var b=new fg(a.byteLength),c=new ng(b);return c.set(new ng(a)),b}function hc(a,b,c){for(var d=c.length,e=-1,f=vg(a.length-d,0),g=-1,h=b.length,i=Of(h+f);++g2?c[e-2]:B,g=e>2?c[2]:B,h=e>1?c[e-1]:B;for("function"==typeof f?(f=fc(f,h,5),e-=2):(f="function"==typeof h?h:B,e-=f?1:0),g&&$c(c[0],c[1],g)&&(f=3>e?B:f,e=1);++d-1?c[f]:B}return Cb(c,d,a)}}function vc(a){return function(b,c,d){return b&&b.length?(c=Oc(c,d,3),g(b,c,a)):-1}}function wc(a){return function(b,c,d){return c=Oc(c,d,3),Cb(b,c,a,!0)}}function xc(a){return function(){for(var b,c=arguments.length,e=a?c:-1,f=0,g=Of(c);a?e--:++e=Q)return b.plant(d).value();for(var e=0,f=c?g[e].apply(this,a):d;++es){var y=h?ab(h):B,z=vg(j-s,0),A=o?x:B,C=o?B:x,F=o?u:B,G=o?B:u;b|=o?I:J,b&=~(o?J:I),p||(b&=~(D|E));var H=[a,b,c,F,A,G,C,y,i,z],K=Fc.apply(B,H);return ad(a)&&Qg(K,H),K.placeholder=w,K}}var L=m?c:this,M=n?L[a]:a;return h&&(u=hd(u,h)),l&&i=b||!tg(b))return"";var e=b-d;return c=null==c?" ":c+"",qf(c,pg(e/c.length)).slice(0,e)}function Hc(a,b,c,d){function e(){for(var b=-1,h=arguments.length,i=-1,j=d.length,k=Of(j+h);++ii))return!1;for(;++h-1&&a%1==0&&b>a}function $c(a,b,c){if(!He(c))return!1;var d=typeof b;if("number"==d?Yc(c)&&Zc(b,c.length):"string"==d&&b in c){var e=c[b];return a===a?a===e:e!==e}return!1}function _c(a,b){var c=typeof a;if("string"==c&&Ba.test(a)||"number"==c)return!0;if(Ch(a))return!1;var d=!Aa.test(a);return d||null!=b&&a in kd(b)}function ad(a){var c=Pc(a);if(!(c in e.prototype))return!1;var d=b[c];if(a===d)return!0;var f=Og(d);return!!f&&a===f[0]}function bd(a){return"number"==typeof a&&a>-1&&a%1==0&&Fg>=a}function cd(a){return a===a&&!He(a)}function dd(a,b){var c=a[1],d=b[1],e=c|d,f=K>e,g=d==K&&c==G||d==K&&c==L&&a[7].length<=b[8]||d==(K|L)&&c==G;if(!f&&!g)return a;d&D&&(a[2]=b[2],e|=c&D?0:F);var h=b[3];if(h){var i=a[3];a[3]=i?hc(i,h,b[4]):ab(h),a[4]=i?v(a[3],U):ab(b[4])}return h=b[5],h&&(i=a[5],a[5]=i?ic(i,h,b[6]):ab(h),a[6]=i?v(a[5],U):ab(b[6])),h=b[7],h&&(a[7]=ab(h)),d&K&&(a[8]=null==a[8]?b[8]:wg(a[8],b[8])),null==a[9]&&(a[9]=b[9]),a[0]=b[0],a[1]=e,a}function ed(a,b){return a===B?b:Dh(a,b,ed)}function fd(a,b){a=kd(a);for(var c=-1,d=b.length,e={};++cd;)g[++f]=Wb(a,d,d+=b);return g}function od(a){for(var b=-1,c=a?a.length:0,d=-1,e=[];++bb?0:b)):[]}function qd(a,b,c){var d=a?a.length:0;return d?((c?$c(a,b,c):null==b)&&(b=1),b=d-(+b||0),Wb(a,0,0>b?0:b)):[]}function rd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!0,!0):[]}function sd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!0):[]}function td(a,b,c,d){var e=a?a.length:0;return e?(c&&"number"!=typeof c&&$c(a,b,c)&&(c=0,d=e),Ab(a,b,c,d)):[]}function ud(a){return a?a[0]:B}function vd(a,b,c){var d=a?a.length:0;return c&&$c(a,b,c)&&(b=!1),d?Db(a,b):[]}function wd(a){var b=a?a.length:0;return b?Db(a,!0):[]}function xd(a,b,c){var d=a?a.length:0;if(!d)return-1;if("number"==typeof c)c=0>c?vg(d+c,0):c;else if(c){var e=dc(a,b);return d>e&&(b===b?b===a[e]:a[e]!==a[e])?e:-1}return h(a,b,c||0)}function yd(a){return qd(a,1)}function zd(a){var b=a?a.length:0;return b?a[b-1]:B}function Ad(a,b,c){var d=a?a.length:0;if(!d)return-1;var e=d;if("number"==typeof c)e=(0>c?vg(d+c,0):wg(c||0,d-1))+1;else if(c){e=dc(a,b,!0)-1;var f=a[e];return(b===b?b===f:f!==f)?e:-1}if(b!==b)return s(a,e,!0);for(;e--;)if(a[e]===b)return e;return-1}function Bd(){var a=arguments,b=a[0];if(!b||!b.length)return b;for(var c=0,d=Qc(),e=a.length;++c-1;)mg.call(b,f,1);return b}function Cd(a,b,c){var d=[];if(!a||!a.length)return d;var e=-1,f=[],g=a.length;for(b=Oc(b,c,3);++eb?0:b)):[]}function Gd(a,b,c){var d=a?a.length:0;return d?((c?$c(a,b,c):null==b)&&(b=1),b=d-(+b||0),Wb(a,0>b?0:b)):[]}function Hd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!1,!0):[]}function Id(a,b,c){return a&&a.length?bc(a,Oc(b,c,3)):[]}function Jd(a,b,c,d){var e=a?a.length:0;if(!e)return[];null!=b&&"boolean"!=typeof b&&(d=c,c=$c(a,b,d)?B:b,b=!1);var f=Oc();return null==c&&f===ub||(c=f(c,d,3)),b&&Qc()==h?w(a,c):_b(a,c)}function Kd(a){if(!a||!a.length)return[];var b=-1,c=0;a=hb(a,function(a){return Yc(a)?(c=vg(a.length,c),!0):void 0});for(var d=Of(c);++bc?vg(e+c,0):c||0,"string"==typeof a||!Ch(a)&&Pe(a)?e>=c&&a.indexOf(b,c)>-1:!!e&&Qc(a,b,c)>-1}function _d(a,b,c){var d=Ch(a)?ib:Mb;return b=Oc(b,c,3),d(a,b)}function ae(a,b){return _d(a,Hf(b))}function be(a,b,c){var d=Ch(a)?hb:Bb;return b=Oc(b,c,3),d(a,function(a,c,d){return!b(a,c,d)})}function ce(a,b,c){if(c?$c(a,b,c):null==b){a=jd(a);var d=a.length;return d>0?a[Ub(0,d-1)]:B}var e=-1,f=Ue(a),d=f.length,g=d-1;for(b=wg(0>b?0:+b||0,d);++e0&&(c=b.apply(this,arguments)),1>=a&&(b=B),c}}function me(a,b,c){function d(){n&&gg(n),j&&gg(j),p=0,j=n=o=B}function e(b,c){c&&gg(c),j=n=o=B,b&&(p=oh(),k=a.apply(m,i),n||j||(i=m=B))}function f(){var a=b-(oh()-l);0>=a||a>b?e(o,j):n=lg(f,a)}function g(){e(r,n)}function h(){if(i=arguments,l=oh(),m=this,o=r&&(n||!s),q===!1)var c=s&&!n;else{j||s||(p=l);var d=q-(l-p),e=0>=d||d>q;e?(j&&(j=gg(j)),p=l,k=a.apply(m,i)):j||(j=lg(g,d))}return e&&n?n=gg(n):n||b===q||(n=lg(f,b)),c&&(e=!0,k=a.apply(m,i)),!e||n||j||(i=m=B),k}var i,j,k,l,m,n,o,p=0,q=!1,r=!0;if("function"!=typeof a)throw new Xf(T);if(b=0>b?0:+b||0,c===!0){var s=!0;r=!1}else He(c)&&(s=!!c.leading,q="maxWait"in c&&vg(+c.maxWait||0,b),r="trailing"in c?!!c.trailing:r);return h.cancel=d,h}function ne(a,b){if("function"!=typeof a||b&&"function"!=typeof b)throw new Xf(T);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g),g};return c.cache=new ne.Cache,c}function oe(a){if("function"!=typeof a)throw new Xf(T);return function(){return!a.apply(this,arguments)}}function pe(a){return le(2,a)}function qe(a,b){if("function"!=typeof a)throw new Xf(T);return b=vg(b===B?a.length-1:+b||0,0),function(){for(var c=arguments,d=-1,e=vg(c.length-b,0),f=Of(e);++db}function xe(a,b){return a>=b}function ye(a){return t(a)&&Yc(a)&&ag.call(a,"callee")&&!jg.call(a,"callee")}function ze(a){return a===!0||a===!1||t(a)&&cg.call(a)==X}function Ae(a){return t(a)&&cg.call(a)==Y}function Be(a){return!!a&&1===a.nodeType&&t(a)&&!Ne(a)}function Ce(a){return null==a?!0:Yc(a)&&(Ch(a)||Pe(a)||ye(a)||t(a)&&Ge(a.splice))?!a.length:!Nh(a).length}function De(a,b,c,d){c="function"==typeof c?fc(c,d,3):B;var e=c?c(a,b):B;return e===B?Jb(a,b,c):!!e}function Ee(a){return t(a)&&"string"==typeof a.message&&cg.call(a)==Z}function Fe(a){return"number"==typeof a&&tg(a)}function Ge(a){return He(a)&&cg.call(a)==$}function He(a){var b=typeof a;return!!a&&("object"==b||"function"==b)}function Ie(a,b,c,d){return c="function"==typeof c?fc(c,d,3):B,Lb(a,Rc(b),c)}function Je(a){return Me(a)&&a!=+a}function Ke(a){return null==a?!1:Ge(a)?eg.test(_f.call(a)):t(a)&&Ka.test(a)}function Le(a){return null===a}function Me(a){return"number"==typeof a||t(a)&&cg.call(a)==aa}function Ne(a){var b;if(!t(a)||cg.call(a)!=ba||ye(a)||!ag.call(a,"constructor")&&(b=a.constructor,"function"==typeof b&&!(b instanceof b)))return!1;var c;return Eb(a,function(a,b){c=b}),c===B||ag.call(a,c)}function Oe(a){return He(a)&&cg.call(a)==ca}function Pe(a){return"string"==typeof a||t(a)&&cg.call(a)==ea}function Qe(a){return t(a)&&bd(a.length)&&!!Sa[cg.call(a)]}function Re(a){return a===B}function Se(a,b){return b>a}function Te(a,b){return b>=a}function Ue(a){var b=a?Pg(a):0;return bd(b)?b?ab(a):[]:ef(a)}function Ve(a){return tb(a,_e(a))}function We(a,b,c){var d=Ig(a);return c&&$c(a,b,c)&&(b=B),b?rb(d,b):d}function Xe(a){return Hb(a,_e(a))}function Ye(a,b,c){var d=null==a?B:Ib(a,ld(b),b+"");return d===B?c:d}function Ze(a,b){if(null==a)return!1;var c=ag.call(a,b);if(!c&&!_c(b)){if(b=ld(b),a=1==b.length?a:Ib(a,Wb(b,0,-1)),null==a)return!1;b=zd(b),c=ag.call(a,b)}return c||bd(a.length)&&Zc(b,a.length)&&(Ch(a)||ye(a))}function $e(a,b,c){c&&$c(a,b,c)&&(b=B);for(var d=-1,e=Nh(a),f=e.length,g={};++d0;++d=wg(b,c)&&ac?0:+c||0,d), +c-=b.length,c>=0&&a.indexOf(b,c)==c}function mf(a){return a=j(a),a&&wa.test(a)?a.replace(ua,p):a}function nf(a){return a=j(a),a&&Ea.test(a)?a.replace(Da,q):a||"(?:)"}function of(a,b,c){a=j(a),b=+b;var d=a.length;if(d>=b||!tg(b))return a;var e=(b-d)/2,f=rg(e),g=pg(e);return c=Gc("",g,c),c.slice(0,f)+a+c}function pf(a,b,c){return(c?$c(a,b,c):null==b)?b=0:b&&(b=+b),a=tf(a),yg(a,b||(Ja.test(a)?16:10))}function qf(a,b){var c="";if(a=j(a),b=+b,1>b||!a||!tg(b))return c;do b%2&&(c+=a),b=rg(b/2),a+=a;while(b);return c}function rf(a,b,c){return a=j(a),c=null==c?0:wg(0>c?0:+c||0,a.length),a.lastIndexOf(b,c)==c}function sf(a,c,d){var e=b.templateSettings;d&&$c(a,c,d)&&(c=d=B),a=j(a),c=qb(rb({},d||c),e,pb);var f,g,h=qb(rb({},c.imports),e.imports,pb),i=Nh(h),k=ac(h,i),l=0,m=c.interpolate||Na,n="__p += '",o=Vf((c.escape||Na).source+"|"+m.source+"|"+(m===za?Ha:Na).source+"|"+(c.evaluate||Na).source+"|$","g"),p="//# sourceURL="+("sourceURL"in c?c.sourceURL:"lodash.templateSources["+ ++Ra+"]")+"\n";a.replace(o,function(b,c,d,e,h,i){return d||(d=e),n+=a.slice(l,i).replace(Oa,r),c&&(f=!0,n+="' +\n__e("+c+") +\n'"),h&&(g=!0,n+="';\n"+h+";\n__p += '"),d&&(n+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),l=i+b.length,b}),n+="';\n";var q=c.variable;q||(n="with (obj) {\n"+n+"\n}\n"),n=(g?n.replace(qa,""):n).replace(ra,"$1").replace(sa,"$1;"),n="function("+(q||"obj")+") {\n"+(q?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(f?", __e = _.escape":"")+(g?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+n+"return __p\n}";var s=Yh(function(){return Rf(i,p+"return "+n).apply(B,k)});if(s.source=n,Ee(s))throw s;return s}function tf(a,b,c){var d=a;return(a=j(a))?(c?$c(d,b,c):null==b)?a.slice(x(a),y(a)+1):(b+="",a.slice(k(a,b),l(a,b)+1)):a}function uf(a,b,c){var d=a;return a=j(a),a?(c?$c(d,b,c):null==b)?a.slice(x(a)):a.slice(k(a,b+"")):a}function vf(a,b,c){var d=a;return a=j(a),a?(c?$c(d,b,c):null==b)?a.slice(0,y(a)+1):a.slice(0,l(a,b+"")+1):a}function wf(a,b,c){c&&$c(a,b,c)&&(b=B);var d=M,e=N;if(null!=b)if(He(b)){var f="separator"in b?b.separator:f;d="length"in b?+b.length||0:d,e="omission"in b?j(b.omission):e}else d=+b||0;if(a=j(a),d>=a.length)return a;var g=d-e.length;if(1>g)return e;var h=a.slice(0,g);if(null==f)return h+e;if(Oe(f)){if(a.slice(g).search(f)){var i,k,l=a.slice(0,g);for(f.global||(f=Vf(f.source,(Ia.exec(f)||"")+"g")),f.lastIndex=0;i=f.exec(l);)k=i.index;h=h.slice(0,null==k?g:k)}}else if(a.indexOf(f,g)!=g){var m=h.lastIndexOf(f);m>-1&&(h=h.slice(0,m))}return h+e}function xf(a){return a=j(a),a&&va.test(a)?a.replace(ta,z):a}function yf(a,b,c){return c&&$c(a,b,c)&&(b=B),a=j(a),a.match(b||Pa)||[]}function zf(a,b,c){return c&&$c(a,b,c)&&(b=B),t(a)?Cf(a):ub(a,b)}function Af(a){return function(){return a}}function Bf(a){return a}function Cf(a){return Nb(vb(a,!0))}function Df(a,b){return Ob(a,vb(b,!0))}function Ef(a,b,c){if(null==c){var d=He(b),e=d?Nh(b):B,f=e&&e.length?Hb(b,e):B;(f?f.length:d)||(f=!1,c=b,b=a,a=this)}f||(f=Hb(b,Nh(b)));var g=!0,h=-1,i=Ge(a),j=f.length;c===!1?g=!1:He(c)&&"chain"in c&&(g=c.chain);for(;++ha||!tg(a))return[];var d=-1,e=Of(wg(a,Cg));for(b=fc(b,c,1);++dd?e[d]=b(d):b(d);return e}function Lf(a){var b=++bg;return j(a)+b}function Mf(a,b){return(+a||0)+(+b||0)}function Nf(a,b,c){return c&&$c(a,b,c)&&(b=B),b=Oc(b,c,3),1==b.length?nb(Ch(a)?a:jd(a),b):$b(a,b)}a=a?eb.defaults(db.Object(),a,eb.pick(db,Qa)):db;var Of=a.Array,Pf=a.Date,Qf=a.Error,Rf=a.Function,Sf=a.Math,Tf=a.Number,Uf=a.Object,Vf=a.RegExp,Wf=a.String,Xf=a.TypeError,Yf=Of.prototype,Zf=Uf.prototype,$f=Wf.prototype,_f=Rf.prototype.toString,ag=Zf.hasOwnProperty,bg=0,cg=Zf.toString,dg=db._,eg=Vf("^"+_f.call(ag).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fg=a.ArrayBuffer,gg=a.clearTimeout,hg=a.parseFloat,ig=Sf.pow,jg=Zf.propertyIsEnumerable,kg=Sc(a,"Set"),lg=a.setTimeout,mg=Yf.splice,ng=a.Uint8Array,og=Sc(a,"WeakMap"),pg=Sf.ceil,qg=Sc(Uf,"create"),rg=Sf.floor,sg=Sc(Of,"isArray"),tg=a.isFinite,ug=Sc(Uf,"keys"),vg=Sf.max,wg=Sf.min,xg=Sc(Pf,"now"),yg=a.parseInt,zg=Sf.random,Ag=Tf.NEGATIVE_INFINITY,Bg=Tf.POSITIVE_INFINITY,Cg=4294967295,Dg=Cg-1,Eg=Cg>>>1,Fg=9007199254740991,Gg=og&&new og,Hg={};b.support={};b.templateSettings={escape:xa,evaluate:ya,interpolate:za,variable:"",imports:{_:b}};var Ig=function(){function a(){}return function(b){if(He(b)){a.prototype=b;var c=new a;a.prototype=B}return c||{}}}(),Jg=lc(Fb),Kg=lc(Gb,!0),Lg=mc(),Mg=mc(!0),Ng=Gg?function(a,b){return Gg.set(a,b),a}:Bf,Og=Gg?function(a){return Gg.get(a)}:Gf,Pg=Rb("length"),Qg=function(){var a=0,b=0;return function(c,d){var e=oh(),f=P-(e-b);if(b=e,f>0){if(++a>=O)return c}else a=0;return Ng(c,d)}}(),Rg=qe(function(a,b){return t(a)&&Yc(a)?xb(a,Db(b,!1,!0)):[]}),Sg=vc(),Tg=vc(!0),Ug=qe(function(a){for(var b=a.length,c=b,d=Of(l),e=Qc(),f=e==h,g=[];c--;){var i=a[c]=Yc(i=a[c])?i:[];d[c]=f&&i.length>=120?oc(c&&i):null}var j=a[0],k=-1,l=j?j.length:0,m=d[0];a:for(;++k2?a[b-2]:B,d=b>1?a[b-1]:B;return b>2&&"function"==typeof c?b-=2:(c=b>1&&"function"==typeof d?(--b,d):B,d=B),a.length=b,Ld(a,c,d)}),ah=qe(function(a){return a=Db(a),this.thru(function(b){return _a(Ch(b)?b:[kd(b)],a)})}),bh=qe(function(a,b){return sb(a,Db(b))}),ch=jc(function(a,b,c){ag.call(a,c)?++a[c]:a[c]=1}),dh=uc(Jg),eh=uc(Kg,!0),fh=yc(bb,Jg),gh=yc(cb,Kg),hh=jc(function(a,b,c){ag.call(a,c)?a[c].push(b):a[c]=[b]}),ih=jc(function(a,b,c){a[c]=b}),jh=qe(function(a,b,c){var d=-1,e="function"==typeof b,f=_c(b),g=Yc(a)?Of(a.length):[];return Jg(a,function(a){var h=e?b:f&&null!=a?a[b]:B;g[++d]=h?h.apply(a,c):Xc(a,b,c)}),g}),kh=jc(function(a,b,c){a[c?0:1].push(b)},function(){return[[],[]]}),lh=Ec(kb,Jg),mh=Ec(lb,Kg),nh=qe(function(a,b){if(null==a)return[];var c=b[2];return c&&$c(b[0],b[1],c)&&(b.length=1),Zb(a,Db(b),[])}),oh=xg||function(){return(new Pf).getTime()},ph=qe(function(a,b,c){var d=D;if(c.length){var e=v(c,ph.placeholder);d|=I}return Kc(a,d,b,c,e)}),qh=qe(function(a,b){b=b.length?Db(b):Xe(a);for(var c=-1,d=b.length;++c0||0>b)?new e(c):(0>a?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==B&&(b=+b||0,c=0>b?c.dropRight(-b):c.take(b-a)),c)},e.prototype.takeRightWhile=function(a,b){return this.reverse().takeWhile(a,b).reverse()},e.prototype.toArray=function(){return this.take(Bg)},Fb(e.prototype,function(a,c){var f=/^(?:filter|map|reject)|While$/.test(c),g=/^(?:first|last)$/.test(c),h=b[g?"take"+("last"==c?"Right":""):c];h&&(b.prototype[c]=function(){var b=g?[1]:arguments,c=this.__chain__,i=this.__wrapped__,j=!!this.__actions__.length,k=i instanceof e,l=b[0],m=k||Ch(i);m&&f&&"function"==typeof l&&1!=l.length&&(k=m=!1);var n=function(a){return g&&c?h(a,1)[0]:h.apply(B,jb([a],b))},o={func:Qd,args:[n],thisArg:B},p=k&&!j;if(g&&!c)return p?(i=i.clone(),i.__actions__.push(o),a.call(i)):h.call(B,this.value())[0];if(!g&&m){i=p?i:new e(this);var q=a.apply(i,b);return q.__actions__.push(o),new d(q,c)}return this.thru(n)})}),bb(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(a){var c=(/^(?:replace|split)$/.test(a)?$f:Yf)[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(a);b.prototype[a]=function(){var a=arguments;return e&&!this.__chain__?c.apply(this.value(),a):this[d](function(b){return c.apply(b,a)})}}),Fb(e.prototype,function(a,c){var d=b[c];if(d){var e=d.name,f=Hg[e]||(Hg[e]=[]);f.push({name:c,func:d})}}),Hg[Fc(B,E).name]=[{name:"wrapper",func:B}],e.prototype.clone=u,e.prototype.reverse=_,e.prototype.value=da,b.prototype.chain=Rd,b.prototype.commit=Sd,b.prototype.concat=ah,b.prototype.plant=Td,b.prototype.reverse=Ud,b.prototype.toString=Vd,b.prototype.run=b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=Wd,b.prototype.collect=b.prototype.map,b.prototype.head=b.prototype.first,b.prototype.select=b.prototype.filter,b.prototype.tail=b.prototype.rest,b}var B,C="3.10.1",D=1,E=2,F=4,G=8,H=16,I=32,J=64,K=128,L=256,M=30,N="...",O=150,P=16,Q=200,R=1,S=2,T="Expected a function",U="__lodash_placeholder__",V="[object Arguments]",W="[object Array]",X="[object Boolean]",Y="[object Date]",Z="[object Error]",$="[object Function]",_="[object Map]",aa="[object Number]",ba="[object Object]",ca="[object RegExp]",da="[object Set]",ea="[object String]",fa="[object WeakMap]",ga="[object ArrayBuffer]",ha="[object Float32Array]",ia="[object Float64Array]",ja="[object Int8Array]",ka="[object Int16Array]",la="[object Int32Array]",ma="[object Uint8Array]",na="[object Uint8ClampedArray]",oa="[object Uint16Array]",pa="[object Uint32Array]",qa=/\b__p \+= '';/g,ra=/\b(__p \+=) '' \+/g,sa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ta=/&(?:amp|lt|gt|quot|#39|#96);/g,ua=/[&<>"'`]/g,va=RegExp(ta.source),wa=RegExp(ua.source),xa=/<%-([\s\S]+?)%>/g,ya=/<%([\s\S]+?)%>/g,za=/<%=([\s\S]+?)%>/g,Aa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Ba=/^\w*$/,Ca=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Da=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,Ea=RegExp(Da.source),Fa=/[\u0300-\u036f\ufe20-\ufe23]/g,Ga=/\\(\\)?/g,Ha=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ia=/\w*$/,Ja=/^0[xX]/,Ka=/^\[object .+?Constructor\]$/,La=/^\d+$/,Ma=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Na=/($^)/,Oa=/['\n\r\u2028\u2029\\]/g,Pa=function(){var a="[A-Z\\xc0-\\xd6\\xd8-\\xde]",b="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(a+"+(?="+a+b+")|"+a+"?"+b+"|"+a+"+|[0-9]+","g")}(),Qa=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Ra=-1,Sa={};Sa[ha]=Sa[ia]=Sa[ja]=Sa[ka]=Sa[la]=Sa[ma]=Sa[na]=Sa[oa]=Sa[pa]=!0,Sa[V]=Sa[W]=Sa[ga]=Sa[X]=Sa[Y]=Sa[Z]=Sa[$]=Sa[_]=Sa[aa]=Sa[ba]=Sa[ca]=Sa[da]=Sa[ea]=Sa[fa]=!1;var Ta={};Ta[V]=Ta[W]=Ta[ga]=Ta[X]=Ta[Y]=Ta[ha]=Ta[ia]=Ta[ja]=Ta[ka]=Ta[la]=Ta[aa]=Ta[ba]=Ta[ca]=Ta[ea]=Ta[ma]=Ta[na]=Ta[oa]=Ta[pa]=!0,Ta[Z]=Ta[$]=Ta[_]=Ta[da]=Ta[fa]=!1;var Ua={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Va={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Wa={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Xa={"function":!0,object:!0},Ya={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Za={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$a=Xa[typeof b]&&b&&!b.nodeType&&b,_a=Xa[typeof a]&&a&&!a.nodeType&&a,ab=$a&&_a&&"object"==typeof e&&e&&e.Object&&e,bb=Xa[typeof self]&&self&&self.Object&&self,cb=Xa[typeof window]&&window&&window.Object&&window,db=(_a&&_a.exports===$a&&$a,ab||cb!==(this&&this.window)&&cb||bb||this),eb=A();db._=eb,d=function(){return eb}.call(b,c,b,a),!(d!==B&&(a.exports=d))}).call(this)}).call(b,c(8)(a),function(){return this}())},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b,c){"use strict";function d(a,b){var c="normal";return a&&b?c="bolditalics":a?c="bold":b&&(c="italics"),c}function e(a,b){this.fonts={},this.pdfDoc=b,this.fontWrappers={};for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];this.fonts[c]={normal:d.normal,bold:d.bold,italics:d.italics,bolditalics:d.bolditalics}}}var f=c(7),g=c(10);e.prototype.provideFont=function(a,b,c){var e=d(b,c);if(!this.fonts[a]||!this.fonts[a][e])throw new Error("Font '"+a+"' in style '"+e+"' is not defined in the font section of the document definition.");return this.fontWrappers[a]=this.fontWrappers[a]||{},this.fontWrappers[a][e]||(this.fontWrappers[a][e]=new g(this.pdfDoc,this.fonts[a][e],a+"("+e+")")),this.fontWrappers[a][e]},e.prototype.setFontRefsToPdfDoc=function(){var a=this;f.each(a.fontWrappers,function(b){f.each(b,function(b){f.each(b.pdfFonts,function(b){a.pdfDoc.page.fonts[b.id]||(a.pdfDoc.page.fonts[b.id]=b.ref())})})})},a.exports=e},function(a,b,c){"use strict";function d(a,b,c){this.MAX_CHAR_TYPES=92,this.pdfkitDoc=a,this.path=b,this.pdfFonts=[],this.charCatalogue=[],this.name=c,Object.defineProperty(this,"ascender",{get:function(){var a=this.getFont(0);return a.ascender}}),Object.defineProperty(this,"decender",{get:function(){var a=this.getFont(0);return a.decender}})}var e=c(7);d.prototype.getFont=function(a){if(!this.pdfFonts[a]){var b=this.name+a;this.postscriptName&&delete this.pdfkitDoc._fontFamilies[this.postscriptName],this.pdfFonts[a]=this.pdfkitDoc.font(this.path,b)._font,this.postscriptName||(this.postscriptName=this.pdfFonts[a].name)}return this.pdfFonts[a]},d.prototype.widthOfString=function(){var a=this.getFont(0);return a.widthOfString.apply(a,arguments)},d.prototype.lineHeight=function(){var a=this.getFont(0);return a.lineHeight.apply(a,arguments)},d.prototype.ref=function(){var a=this.getFont(0);return a.ref.apply(a,arguments)};var f=function(a){return a.charCodeAt(0)};d.prototype.encode=function(a){var b=this,c=e.chain(a.split("")).map(f).uniq().value();if(c.length>b.MAX_CHAR_TYPES)throw new Error("Inline has more than "+b.MAX_CHAR_TYPES+": "+a+" different character types and therefore cannot be properly embedded into pdf.");var d=function(a){return e.uniq(a.concat(c)).length<=b.MAX_CHAR_TYPES},g=e.findIndex(b.charCatalogue,d);0>g&&(g=b.charCatalogue.length,b.charCatalogue[g]=[]);var h=b.getFont(g);h.use(a),e.each(c,function(a){e.includes(b.charCatalogue[g],a)||b.charCatalogue[g].push(a)});var i=e.map(h.encode(a),function(a){return a.charCodeAt(0).toString(16)}).join("");return{encodedText:i,fontId:h.id}},a.exports=d},function(a,b,c){"use strict";function d(a,b){g.each(b,function(b){a.push(b)})}function e(a,b,c){this.pageSize=a,this.pageMargins=b,this.tracker=new h,this.imageMeasure=c,this.tableLayouts={}}function f(a){var b=a.x,c=a.y;a.positions=[],g.each(a.canvas,function(a){var b=a.x,c=a.y,d=a.x1,e=a.y1,f=a.x2,g=a.y2;a.resetXY=function(){a.x=b,a.y=c,a.x1=d,a.y1=e,a.x2=f,a.y2=g}}),a.resetXY=function(){a.x=b,a.y=c,g.each(a.canvas,function(a){a.resetXY()})}}var g=c(7),h=c(12),i=c(13),j=c(19),k=c(20),l=c(16),m=c(23),n=c(22),o=c(17).pack,p=c(17).offsetVector,q=c(17).fontStringify,r=c(17).isFunction,s=c(14),t=c(15);e.prototype.registerTableLayouts=function(a){this.tableLayouts=o(this.tableLayouts,a)},e.prototype.layoutDocument=function(a,b,c,d,e,f,h,j,k,l){function m(a,b){return r(l)?(a=g.reject(a,function(a){return g.isEmpty(a.positions)}),g.each(a,function(a){var c=g.pick(a,["id","text","ul","ol","table","image","qr","canvas","columns","headlineLevel","style","pageBreak","pageOrientation","width","height"]);c.startPosition=g.first(a.positions),c.pageNumbers=g.chain(a.positions).map("pageNumber").uniq().value(),c.pages=b.length,c.stack=g.isArray(a.stack),a.nodeInfo=c}),g.any(a,function(a,b,c){if("before"!==a.pageBreak&&!a.pageBreakCalculated){a.pageBreakCalculated=!0;var d=g.first(a.nodeInfo.pageNumbers),e=g.chain(c).drop(b+1).filter(function(a){return g.contains(a.nodeInfo.pageNumbers,d)}).value(),f=g.chain(c).drop(b+1).filter(function(a){return g.contains(a.nodeInfo.pageNumbers,d+1)}).value(),h=g.chain(c).take(b).filter(function(a){return g.contains(a.nodeInfo.pageNumbers,d)}).value();if(l(a.nodeInfo,g.map(e,"nodeInfo"),g.map(f,"nodeInfo"),g.map(h,"nodeInfo")))return a.pageBreak="before",!0}})):!1}function n(a){g.each(a.linearNodeList,function(a){a.resetXY()})}this.docMeasure=new i(b,c,d,this.imageMeasure,this.tableLayouts,j);for(var o=this.tryLayoutDocument(a,b,c,d,e,f,h,j,k);m(o.linearNodeList,o.pages);)n(o),o=this.tryLayoutDocument(a,b,c,d,e,f,h,j,k);return o.pages},e.prototype.tryLayoutDocument=function(a,b,c,d,e,f,g,h,i,l){this.linearNodeList=[],a=this.docMeasure.measureDocument(a),this.writer=new k(new j(this.pageSize,this.pageMargins),this.tracker);var m=this;return this.writer.context().tracker.startTracking("pageAdded",function(){m.addBackground(e)}),this.addBackground(e),this.processNode(a),this.addHeadersAndFooters(f,g),null!=i&&this.addWatermark(i,b),{pages:this.writer.context().pages,linearNodeList:this.linearNodeList}},e.prototype.addBackground=function(a){var b=r(a)?a:function(){return a},c=b(this.writer.context().page+1);if(c){var d=this.writer.context().getCurrentPage().pageSize;this.writer.beginUnbreakableBlock(d.width,d.height),this.processNode(this.docMeasure.measureDocument(c)),this.writer.commitUnbreakableBlock(0,0)}},e.prototype.addStaticRepeatable=function(a,b){this.addDynamicRepeatable(function(){return a},b)},e.prototype.addDynamicRepeatable=function(a,b){for(var c=this.writer.context().pages,d=0,e=c.length;e>d;d++){this.writer.context().page=d;var f=a(d+1,e);if(f){var g=b(this.writer.context().getCurrentPage().pageSize,this.pageMargins);this.writer.beginUnbreakableBlock(g.width,g.height),this.processNode(this.docMeasure.measureDocument(f)),this.writer.commitUnbreakableBlock(g.x,g.y)}}},e.prototype.addHeadersAndFooters=function(a,b){var c=function(a,b){return{x:0,y:0,width:a.width,height:b.top}},d=function(a,b){return{x:0,y:a.height-b.bottom,width:a.width,height:b.bottom}};r(a)?this.addDynamicRepeatable(a,c):a&&this.addStaticRepeatable(a,c),r(b)?this.addDynamicRepeatable(b,d):b&&this.addStaticRepeatable(b,d)},e.prototype.addWatermark=function(a,b){function c(a,b,c){for(var d,e=a.width,f=a.height,g=.8*Math.sqrt(e*e+f*f),h=new s(c),i=new t,j=0,k=1e3,l=(j+k)/2;Math.abs(j-k)>1;)i.push({fontSize:l}),d=h.sizeOfString(b,i),d.width>g?(k=l,l=(j+k)/2):d.widthg;g++)f[g].watermark=e},e.prototype.processNode=function(a){function b(b){var d=a._margin;"before"===a.pageBreak&&c.writer.moveToNextPage(a.pageOrientation),d&&(c.writer.context().moveDown(d[1]),c.writer.context().addMargin(d[0],d[2])),b(),d&&(c.writer.context().addMargin(-d[0],-d[2]),c.writer.context().moveDown(d[3])),"after"===a.pageBreak&&c.writer.moveToNextPage(a.pageOrientation)}var c=this;this.linearNodeList.push(a),f(a),b(function(){var b=a.absolutePosition;if(b&&(c.writer.context().beginDetachedBlock(),c.writer.context().moveTo(b.x||0,b.y||0)),a.stack)c.processVerticalContainer(a);else if(a.columns)c.processColumns(a);else if(a.ul)c.processList(!1,a);else if(a.ol)c.processList(!0,a);else if(a.table)c.processTable(a);else if(void 0!==a.text)c.processLeaf(a);else if(a.image)c.processImage(a);else if(a.canvas)c.processCanvas(a);else if(a.qr)c.processQr(a);else if(!a._span)throw"Unrecognized document structure: "+JSON.stringify(a,q);b&&c.writer.context().endDetachedBlock()})},e.prototype.processVerticalContainer=function(a){var b=this;a.stack.forEach(function(c){b.processNode(c),d(a.positions,c.positions)})},e.prototype.processColumns=function(a){function b(a){if(!a)return null;var b=[];b.push(0);for(var d=c.length-1;d>0;d--)b.push(a);return b}var c=a.columns,e=this.writer.context().availableWidth,f=b(a._gap);f&&(e-=(f.length-1)*a._gap),l.buildColumnWidths(c,e);var g=this.processRow(c,c,f);d(a.positions,g.positions)},e.prototype.processRow=function(a,b,c,e,f){function g(a){for(var b,c=0,d=k.length;d>c;c++){var e=k[c];if(e.prevPage===a.prevPage){b=e;break}}b||(b=a,k.push(b)),b.prevY=Math.max(b.prevY,a.prevY),b.y=Math.min(b.y,a.y)}function h(a){return c&&c.length>a?c[a]:0}function i(a,b){if(a.rowSpan&&a.rowSpan>1){var c=f+a.rowSpan-1;if(c>=e.length)throw"Row span for column "+b+" (with indexes starting from 0) exceeded row count";return e[c][b]}return null}var j=this,k=[],l=[];return this.tracker.auto("pageChanged",g,function(){b=b||a,j.writer.context().beginColumnGroup();for(var e=0,f=a.length;f>e;e++){var g=a[e],k=b[e]._calcWidth,m=h(e);if(g.colSpan&&g.colSpan>1)for(var n=1;nc;c++){b.beginRow(c,this.writer);var f=this.processRow(a.table.body[c],a.table.widths,a._offsets.offsets,a.table.body,c);d(a.positions,f.positions),b.endRow(c,this.writer,f.pageBreaks)}b.endTable(this.writer)},e.prototype.processLeaf=function(a){for(var b=this.buildNextLine(a),c=b?b.getHeight():0,d=a.maxHeight||-1;b&&(-1===d||d>c);){var e=this.writer.addLine(b);a.positions.push(e),b=this.buildNextLine(a),b&&(c+=b.getHeight())}},e.prototype.buildNextLine=function(a){if(!a._inlines||0===a._inlines.length)return null;for(var b=new n(this.writer.context().availableWidth);a._inlines&&a._inlines.length>0&&b.hasEnoughSpaceForInline(a._inlines[0]);)b.addInline(a._inlines.shift());return b.lastLineInParagraph=0===a._inlines.length,b},e.prototype.processImage=function(a){var b=this.writer.addImage(a);a.positions.push(b)},e.prototype.processCanvas=function(a){var b=a._minHeight;this.writer.context().availableHeight=0&&c.splice(d,1)}},c.prototype.emit=function(a){var b=Array.prototype.slice.call(arguments,1),c=this.events[a];c&&c.forEach(function(a){a.apply(this,b)})},c.prototype.auto=function(a,b,c){this.startTracking(a,b),c(),this.stopTracking(a,b)},a.exports=c},function(a,b,c){"use strict";function d(a,b,c,d,g,h){this.textTools=new e(a),this.styleStack=new f(b,c),this.imageMeasure=d,this.tableLayouts=g,this.images=h,this.autoImageIndex=1}var e=c(14),f=c(15),g=c(16),h=c(17).fontStringify,i=c(17).pack,j=c(18);d.prototype.measureDocument=function(a){return this.measureNode(a)},d.prototype.measureNode=function(a){function b(a){var b=a._margin;return b&&(a._minWidth+=b[0]+b[2],a._maxWidth+=b[0]+b[2]),a}function c(){function b(a,b){return a.marginLeft||a.marginTop||a.marginRight||a.marginBottom?[a.marginLeft||b[0]||0,a.marginTop||b[1]||0,a.marginRight||b[2]||0,a.marginBottom||b[3]||0]:b}function c(a){for(var b={},c=a.length-1;c>=0;c--){var e=a[c],f=d.styleStack.styleDictionary[e];for(var g in f)f.hasOwnProperty(g)&&(b[g]=f[g])}return b}function e(a){return"number"==typeof a||a instanceof Number?a=[a,a,a,a]:a instanceof Array&&2===a.length&&(a=[a[0],a[1],a[0],a[1]]),a}var f=[void 0,void 0,void 0,void 0];if(a.style){var g=a.style instanceof Array?a.style:[a.style],h=c(g);h&&(f=b(h,f)),h.margin&&(f=e(h.margin))}return f=b(a,f),a.margin&&(f=e(a.margin)),void 0===f[0]&&void 0===f[1]&&void 0===f[2]&&void 0===f[3]?null:f}a instanceof Array?a={stack:a}:("string"==typeof a||a instanceof String)&&(a={text:a}),0===Object.keys(a).length&&(a={text:""});var d=this;return this.styleStack.auto(a,function(){if(a._margin=c(a),a.columns)return b(d.measureColumns(a));if(a.stack)return b(d.measureVerticalContainer(a));if(a.ul)return b(d.measureList(!1,a));if(a.ol)return b(d.measureList(!0,a));if(a.table)return b(d.measureTable(a));if(void 0!==a.text)return b(d.measureLeaf(a));if(a.image)return b(d.measureImage(a));if(a.canvas)return b(d.measureCanvas(a));if(a.qr)return b(d.measureQr(a));throw"Unrecognized document structure: "+JSON.stringify(a,h); })},d.prototype.convertIfBase64Image=function(a){if(/^data:image\/(jpeg|jpg|png);base64,/.test(a.image)){var b="$$pdfmake$$"+this.autoImageIndex++;this.images[b]=a.image,a.image=b}},d.prototype.measureImage=function(a){this.images&&this.convertIfBase64Image(a);var b=this.imageMeasure.measureImage(a.image);if(a.fit){var c=b.width/b.height>a.fit[0]/a.fit[1]?a.fit[0]/b.width:a.fit[1]/b.height;a._width=a._minWidth=a._maxWidth=b.width*c,a._height=b.height*c}else a._width=a._minWidth=a._maxWidth=a.width||b.width,a._height=a.height||b.height*a._width/b.width;return a._alignment=this.styleStack.getProperty("alignment"),a},d.prototype.measureLeaf=function(a){var b=this.styleStack.clone();b.push(a);var c=this.textTools.buildInlines(a.text,b);return a._inlines=c.items,a._minWidth=c.minWidth,a._maxWidth=c.maxWidth,a},d.prototype.measureVerticalContainer=function(a){var b=a.stack;a._minWidth=0,a._maxWidth=0;for(var c=0,d=b.length;d>c;c++)b[c]=this.measureNode(b[c]),a._minWidth=Math.max(a._minWidth,b[c]._minWidth),a._maxWidth=Math.max(a._maxWidth,b[c]._maxWidth);return a},d.prototype.gapSizeForList=function(a,b){if(a){var c=b.length.toString().replace(/./g,"9");return this.textTools.sizeOfString(c+". ",this.styleStack)}return this.textTools.sizeOfString("9. ",this.styleStack)},d.prototype.buildMarker=function(a,b,c,d){var e;if(a)e={_inlines:this.textTools.buildInlines(b,c).items};else{var f=d.fontSize/6;e={canvas:[{x:f,y:d.height/d.lineHeight+d.decender-d.fontSize/3,r1:f,r2:f,type:"ellipse",color:"black"}]}}return e._minWidth=e._maxWidth=d.width,e._minHeight=e._maxHeight=d.height,e},d.prototype.measureList=function(a,b){var c=this.styleStack.clone(),d=a?b.ol:b.ul;b._gapSize=this.gapSizeForList(a,d),b._minWidth=0,b._maxWidth=0;for(var e=1,f=0,g=d.length;g>f;f++){var h=d[f]=this.measureNode(d[f]),i=e++ +". ";h.ol||h.ul||(h.listMarker=this.buildMarker(a,h.counter||i,c,b._gapSize)),b._minWidth=Math.max(b._minWidth,d[f]._minWidth+b._gapSize.width),b._maxWidth=Math.max(b._maxWidth,d[f]._maxWidth+b._gapSize.width)}return b},d.prototype.measureColumns=function(a){var b=a.columns;a._gap=this.styleStack.getProperty("columnGap")||0;for(var c=0,d=b.length;d>c;c++)b[c]=this.measureNode(b[c]);var e=g.measureMinMax(b);return a._minWidth=e.min+a._gap*(b.length-1),a._maxWidth=e.max+a._gap*(b.length-1),a},d.prototype.measureTable=function(a){function b(a,b){return function(){return null!==b&&"object"==typeof b&&(b.fillColor=a.styleStack.getProperty("fillColor")),a.measureNode(b)}}function c(b){var c=a.layout;("string"==typeof a.layout||a instanceof String)&&(c=b[c]);var d={hLineWidth:function(a,b){return 1},vLineWidth:function(a,b){return 1},hLineColor:function(a,b){return"black"},vLineColor:function(a,b){return"black"},paddingLeft:function(a,b){return 4},paddingRight:function(a,b){return 4},paddingTop:function(a,b){return 2},paddingBottom:function(a,b){return 2}};return i(d,c)}function d(b){for(var c=[],d=0,e=0,f=0,g=a.table.widths.length;g>f;f++){var h=e+b.vLineWidth(f,a)+b.paddingLeft(f,a);c.push(h),d+=h,e=b.paddingRight(f,a)}return d+=e+b.vLineWidth(a.table.widths.length,a),{total:d,offsets:c}}function e(){for(var b,c,d=0,e=p.length;e>d;d++){var g=p[d],h=f(g.col,g.span,a._offsets),i=g.minWidth-h.minWidth,j=g.maxWidth-h.maxWidth;if(i>0)for(b=i/g.span,c=0;c0)for(b=j/g.span,c=0;cf;f++)e.minWidth+=a.table.widths[b+f]._minWidth+(f?d.offsets[b+f]:0),e.maxWidth+=a.table.widths[b+f]._maxWidth+(f?d.offsets[b+f]:0);return e}function h(a,b,c){for(var d=1;c>d;d++)a[b+d]={_span:!0,_minWidth:0,_maxWidth:0,rowSpan:a[b].rowSpan}}function j(a,b,c,d){for(var e=1;d>e;e++)a.body[b+e][c]={_span:!0,_minWidth:0,_maxWidth:0,fillColor:a.body[b][c].fillColor}}function k(a){if(a.table.widths||(a.table.widths="auto"),"string"==typeof a.table.widths||a.table.widths instanceof String)for(a.table.widths=[a.table.widths];a.table.widths.lengthb;b++){var d=a.table.widths[b];("number"==typeof d||d instanceof Number||"string"==typeof d||d instanceof String)&&(a.table.widths[b]={width:d})}}k(a),a._layout=c(this.tableLayouts),a._offsets=d(a._layout);var l,m,n,o,p=[];for(l=0,n=a.table.body[0].length;n>l;l++){var q=a.table.widths[l];for(q._minWidth=0,q._maxWidth=0,m=0,o=a.table.body.length;o>m;m++){var r=a.table.body[m],s=r[l];if(!s._span){s=r[l]=this.styleStack.auto(s,b(this,s)),s.colSpan&&s.colSpan>1?(h(r,l,s.colSpan),p.push({col:l,span:s.colSpan,minWidth:s._minWidth,maxWidth:s._maxWidth})):(q._minWidth=Math.max(q._minWidth,s._minWidth),q._maxWidth=Math.max(q._maxWidth,s._maxWidth))}s.rowSpan&&s.rowSpan>1&&j(a.table,m,l,s.rowSpan)}}e();var t=g.measureMinMax(a.table.widths);return a._minWidth=t.min+a._offsets.total,a._maxWidth=t.max+a._offsets.total,a},d.prototype.measureCanvas=function(a){for(var b=0,c=0,d=0,e=a.canvas.length;e>d;d++){var f=a.canvas[d];switch(f.type){case"ellipse":b=Math.max(b,f.x+f.r1),c=Math.max(c,f.y+f.r2);break;case"rect":b=Math.max(b,f.x+f.w),c=Math.max(c,f.y+f.h);break;case"line":b=Math.max(b,f.x1,f.x2),c=Math.max(c,f.y1,f.y2);break;case"polyline":for(var g=0,h=f.points.length;h>g;g++)b=Math.max(b,f.points[g].x),c=Math.max(c,f.points[g].y)}}return a._minWidth=a._maxWidth=b,a._minHeight=a._maxHeight=c,a},d.prototype.measureQr=function(a){return a=j.measure(a),a._alignment=this.styleStack.getProperty("alignment"),a},a.exports=d},function(a,b){"use strict";function c(a){this.fontProvider=a}function d(a,b){var c=[];a=a.replace(" "," ");var d;d=b?[a,""]:a.match(j);for(var e=0,f=d.length;f-1>e;e++){var g=d[e],h=0===g.length;if(h){var i=0===c.length||c[c.length-1].lineEnd;i?c.push({text:"",lineEnd:!0}):c[c.length-1].lineEnd=!0}else c.push({text:g})}return c}function e(a,b){b=b||{},a=a||{};for(var c in a)"text"!=c&&a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function f(a){var b=[];("string"==typeof a||a instanceof String)&&(a=[a]);for(var c=0,f=a.length;f>c;c++){var g,h=a[c],i=null;"string"==typeof h||h instanceof String?g=d(h):(g=d(h.text,h.noWrap),i=e(h));for(var j=0,k=g.length;k>j;j++){var l={text:g[j].text};g[j].lineEnd&&(l.lineEnd=!0),e(i,l),b.push(l)}}return b}function g(a){return a.replace(/[^A-Za-z0-9\[\] ]/g,function(a){return m[a]||a})}function h(a,b,c,d){var e;return void 0!==a[c]&&null!==a[c]?a[c]:b?(b.auto(a,function(){e=b.getProperty(c)}),null!==e&&void 0!==e?e:d):d}function i(a,b,c){var d=f(b);return d.forEach(function(b){var d=h(b,c,"font","Roboto"),e=h(b,c,"fontSize",12),f=h(b,c,"bold",!1),i=h(b,c,"italics",!1),j=h(b,c,"color","black"),m=h(b,c,"decoration",null),n=h(b,c,"decorationColor",null),o=h(b,c,"decorationStyle",null),p=h(b,c,"background",null),q=h(b,c,"lineHeight",1),r=a.provideFont(d,f,i);b.width=r.widthOfString(g(b.text),e),b.height=r.lineHeight(e)*q;var s=b.text.match(k),t=b.text.match(l);s?b.leadingCut=r.widthOfString(s[0],e):b.leadingCut=0,t?b.trailingCut=r.widthOfString(t[0],e):b.trailingCut=0,b.alignment=h(b,c,"alignment","left"),b.font=r,b.fontSize=e,b.color=j,b.decoration=m,b.decorationColor=n,b.decorationStyle=o,b.background=p}),d}var j=/([^ ,\/!.?:;\-\n]*[ ,\/!.?:;\-]*)|\n/g,k=/^(\s)+/g,l=/(\s)+$/g;c.prototype.buildInlines=function(a,b){function c(a){return Math.max(0,a.width-a.leadingCut-a.trailingCut)}var d,e=i(this.fontProvider,a,b),f=0,g=0;return e.forEach(function(a){f=Math.max(f,a.width-a.leadingCut-a.trailingCut),d||(d={width:0,leadingCut:a.leadingCut,trailingCut:0}),d.width+=a.width,d.trailingCut=a.trailingCut,g=Math.max(g,c(d)),a.lineEnd&&(d=null)}),h({},b,"noWrap",!1)&&(f=g),{items:e,minWidth:f,maxWidth:g}},c.prototype.sizeOfString=function(a,b){a=a.replace(" "," ");var c=h({},b,"font","Roboto"),d=h({},b,"fontSize",12),e=h({},b,"bold",!1),f=h({},b,"italics",!1),i=h({},b,"lineHeight",1),j=this.fontProvider.provideFont(c,e,f);return{width:j.widthOfString(g(a),d),height:j.lineHeight(d)*i,fontSize:d,lineHeight:i,ascender:j.ascender/1e3*d,decender:j.decender/1e3*d}};var m={"Ą":"A","Ć":"C","Ę":"E","Ł":"L","Ń":"N","Ó":"O","Ś":"S","Ź":"Z","Ż":"Z","ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ó":"o","ś":"s","ź":"z","ż":"z"};a.exports=c},function(a,b){"use strict";function c(a,b){this.defaultStyle=b||{},this.styleDictionary=a,this.styleOverrides=[]}c.prototype.clone=function(){var a=new c(this.styleDictionary,this.defaultStyle);return this.styleOverrides.forEach(function(b){a.styleOverrides.push(b)}),a},c.prototype.push=function(a){this.styleOverrides.push(a)},c.prototype.pop=function(a){for(a=a||1;a-- >0;)this.styleOverrides.pop()},c.prototype.autopush=function(a){if("string"==typeof a||a instanceof String)return 0;var b=[];a.style&&(b=a.style instanceof Array?a.style:[a.style]);for(var c=0,d=b.length;d>c;c++)this.push(b[c]);var e={},f=!1;return["font","fontSize","bold","italics","alignment","color","columnGap","fillColor","decoration","decorationStyle","decorationColor","background","lineHeight","noWrap"].forEach(function(b){void 0!==a[b]&&null!==a[b]&&(e[b]=a[b],f=!0)}),f&&this.push(e),b.length+(f?1:0)},c.prototype.auto=function(a,b){var c=this.autopush(a),d=b();return c>0&&this.pop(c),d},c.prototype.getProperty=function(a){if(this.styleOverrides)for(var b=this.styleOverrides.length-1;b>=0;b--){var c=this.styleOverrides[b];if("string"==typeof c||c instanceof String){var d=this.styleDictionary[c];if(d&&null!==d[a]&&void 0!==d[a])return d[a]}else if(void 0!==c[a]&&null!==c[a])return c[a]}return this.defaultStyle&&this.defaultStyle[a]},a.exports=c},function(a,b){"use strict";function c(a,b){var c=[],f=0,g=0,h=[],i=0,j=0,k=[],l=b;a.forEach(function(a){d(a)?(c.push(a),f+=a._minWidth,g+=a._maxWidth):e(a)?(h.push(a),i=Math.max(i,a._minWidth),j=Math.max(j,a._maxWidth)):k.push(a)}),k.forEach(function(a){"string"==typeof a.width&&/\d+%/.test(a.width)&&(a.width=parseFloat(a.width)*l/100),a.width=b)c.forEach(function(a){a._calcWidth=a._minWidth}),h.forEach(function(a){a._calcWidth=i});else{if(b>n)c.forEach(function(a){a._calcWidth=a._maxWidth,b-=a._calcWidth});else{var o=b-m,p=n-m;c.forEach(function(a){var c=a._maxWidth-a._minWidth;a._calcWidth=a._minWidth+c*o/p,b-=a._calcWidth})}if(h.length>0){var q=b/h.length;h.forEach(function(a){a._calcWidth=q})}}}function d(a){return"auto"===a.width}function e(a){return null===a.width||void 0===a.width||"*"===a.width||"star"===a.width}function f(a){for(var b={min:0,max:0},c={min:0,max:0},f=0,g=0,h=a.length;h>g;g++){var i=a[g];e(i)?(c.min=Math.max(c.min,i._minWidth),c.max=Math.max(c.max,i._maxWidth),f++):d(i)?(b.min+=i._minWidth,b.max+=i._maxWidth):(b.min+=void 0!==i.width&&i.width||i._minWidth,b.max+=void 0!==i.width&&i.width||i._maxWidth)}return f&&(b.min+=f*c.min,b.max+=f*c.max),b}a.exports={buildColumnWidths:c,measureMinMax:f,isAutoColumn:d,isStarColumn:e}},function(a,b){"use strict";function c(){for(var a={},b=0,c=arguments.length;c>b;b++){var d=arguments[b];if(d)for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e])}return a}function d(a,b,c){switch(a.type){case"ellipse":case"rect":a.x+=b,a.y+=c;break;case"line":a.x1+=b,a.x2+=b,a.y1+=c,a.y2+=c;break;case"polyline":for(var d=0,e=a.points.length;e>d;d++)a.points[d].x+=b,a.points[d].y+=c}}function e(a,b){return"font"===a?"font":b}function f(a){var b={};return a&&"[object Function]"===b.toString.call(a)}a.exports={pack:c,fontStringify:e,offsetVector:d,isFunction:f}},function(a,b){"use strict";function c(a,b){var c={numeric:h,alphanumeric:i,octet:j},d={L:o,M:p,Q:q,H:r};b=b||{};var e=b.version||-1,f=d[(b.eccLevel||"L").toUpperCase()],g=b.mode?c[b.mode.toLowerCase()]:-1,k="mask"in b?b.mask:-1;if(0>g)g="string"==typeof a?a.match(l)?h:a.match(n)?i:j:j;else if(g!=h&&g!=i&&g!=j)throw"invalid or unsupported mode";if(a=K(g,a),null===a)throw"invalid data format";if(0>f||f>3)throw"invalid ECC level";if(0>e){for(e=1;40>=e&&!(a.length<=J(e,g,f));++e);if(e>40)throw"too large data for the Qr format"}else if(1>e||e>40)throw"invalid Qr version! should be between 1 and 40";if(-1!=k&&(0>k||k>8))throw"invalid mask";return U(a,e,g,f,k)}function d(a,b){var d=[],e=a.background||"#fff",f=a.foreground||"#000",g=c(a,b),h=g.length,i=Math.floor(b.fit?b.fit/h:5),j=h*i;d.push({type:"rect",x:0,y:0,w:j,h:j,lineWidth:0,color:e});for(var k=0;h>k;++k)for(var l=0;h>l;++l)g[k][l]&&d.push({type:"rect",x:i*k,y:i*l,w:i,h:i,lineWidth:0,color:f});return{canvas:d,size:j}}function e(a){var b=d(a.qr,a);return a._canvas=b.canvas,a._width=a._height=a._minWidth=a._maxWidth=a._minHeight=a._maxHeight=b.size,a}for(var f=[null,[[10,7,17,13],[1,1,1,1],[]],[[16,10,28,22],[1,1,1,1],[4,16]],[[26,15,22,18],[1,1,2,2],[4,20]],[[18,20,16,26],[2,1,4,2],[4,24]],[[24,26,22,18],[2,1,4,4],[4,28]],[[16,18,28,24],[4,2,4,4],[4,32]],[[18,20,26,18],[4,2,5,6],[4,20,36]],[[22,24,26,22],[4,2,6,6],[4,22,40]],[[22,30,24,20],[5,2,8,8],[4,24,44]],[[26,18,28,24],[5,4,8,8],[4,26,48]],[[30,20,24,28],[5,4,11,8],[4,28,52]],[[22,24,28,26],[8,4,11,10],[4,30,56]],[[22,26,22,24],[9,4,16,12],[4,32,60]],[[24,30,24,20],[9,4,16,16],[4,24,44,64]],[[24,22,24,30],[10,6,18,12],[4,24,46,68]],[[28,24,30,24],[10,6,16,17],[4,24,48,72]],[[28,28,28,28],[11,6,19,16],[4,28,52,76]],[[26,30,28,28],[13,6,21,18],[4,28,54,80]],[[26,28,26,26],[14,7,25,21],[4,28,56,84]],[[26,28,28,30],[16,8,25,20],[4,32,60,88]],[[26,28,30,28],[17,8,25,23],[4,26,48,70,92]],[[28,28,24,30],[17,9,34,23],[4,24,48,72,96]],[[28,30,30,30],[18,9,30,25],[4,28,52,76,100]],[[28,30,30,30],[20,10,32,27],[4,26,52,78,104]],[[28,26,30,30],[21,12,35,29],[4,30,56,82,108]],[[28,28,30,28],[23,12,37,34],[4,28,56,84,112]],[[28,30,30,30],[25,12,40,34],[4,32,60,88,116]],[[28,30,30,30],[26,13,42,35],[4,24,48,72,96,120]],[[28,30,30,30],[28,14,45,38],[4,28,52,76,100,124]],[[28,30,30,30],[29,15,48,40],[4,24,50,76,102,128]],[[28,30,30,30],[31,16,51,43],[4,28,54,80,106,132]],[[28,30,30,30],[33,17,54,45],[4,32,58,84,110,136]],[[28,30,30,30],[35,18,57,48],[4,28,56,84,112,140]],[[28,30,30,30],[37,19,60,51],[4,32,60,88,116,144]],[[28,30,30,30],[38,19,63,53],[4,28,52,76,100,124,148]],[[28,30,30,30],[40,20,66,56],[4,22,48,74,100,126,152]],[[28,30,30,30],[43,21,70,59],[4,26,52,78,104,130,156]],[[28,30,30,30],[45,22,74,62],[4,30,56,82,108,134,160]],[[28,30,30,30],[47,24,77,65],[4,24,52,80,108,136,164]],[[28,30,30,30],[49,25,81,68],[4,28,56,84,112,140,168]]],g=0,h=1,i=2,j=4,k=8,l=/^\d*$/,m=/^[A-Za-z0-9 $%*+\-.\/:]*$/,n=/^[A-Z0-9 $%*+\-.\/:]*$/,o=1,p=0,q=3,r=2,s=[],t=[-1],u=0,v=1;255>u;++u)s.push(v),t[v]=u,v=2*v^(v>=128?285:0);for(var w=[[]],u=0;30>u;++u){for(var x=w[u],y=[],z=0;u>=z;++z){var A=u>z?s[x[z]]:0,B=s[(u+(x[z-1]||0))%255];y.push(t[A^B])}w.push(y)}for(var C={},u=0;45>u;++u)C["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".charAt(u)]=u;var D=[function(a,b){return(a+b)%2===0},function(a,b){return a%2===0},function(a,b){return b%3===0},function(a,b){return(a+b)%3===0},function(a,b){return((a/2|0)+(b/3|0))%2===0},function(a,b){return a*b%2+a*b%3===0},function(a,b){return(a*b%2+a*b%3)%2===0},function(a,b){return((a+b)%2+a*b%3)%2===0}],E=function(a){return a>6},F=function(a){return 4*a+17},G=function(a){var b=f[a],c=16*a*a+128*a+64;return E(a)&&(c-=36),b[2].length&&(c-=25*b[2].length*b[2].length-10*b[2].length-55),c},H=function(a,b){var c=-8&G(a),d=f[a];return c-=8*d[0][b]*d[1][b]},I=function(a,b){switch(b){case h:return 10>a?10:27>a?12:14;case i:return 10>a?9:27>a?11:13;case j:return 10>a?8:16;case k:return 10>a?8:27>a?10:12}},J=function(a,b,c){var d=H(a,c)-4-I(a,b);switch(b){case h:return 3*(d/10|0)+(4>d%10?0:7>d%10?1:2);case i:return 2*(d/11|0)+(6>d%11?0:1);case j:return d/8|0;case k:return d/13|0}},K=function(a,b){switch(a){case h:return b.match(l)?b:null;case i:return b.match(m)?b.toUpperCase():null;case j:if("string"==typeof b){for(var c=[],d=0;de?c.push(e):2048>e?c.push(192|e>>6,128|63&e):65536>e?c.push(224|e>>12,128|e>>6&63,128|63&e):c.push(240|e>>18,128|e>>12&63,128|e>>6&63,128|63&e)}return c}return b}},L=function(a,b,c,d){var e=[],f=0,k=8,l=c.length,m=function(a,b){if(b>=k){for(e.push(f|a>>(b-=k));b>=8;)e.push(a>>(b-=8)&255);f=0,k=8}b>0&&(f|=(a&(1<o;o+=3)m(parseInt(c.substring(o-2,o+1),10),10);m(parseInt(c.substring(o-2),10),[0,4,7][l%3]);break;case i:for(var o=1;l>o;o+=2)m(45*C[c.charAt(o-1)]+C[c.charAt(o)],11);l%2==1&&m(C[c.charAt(o-1)],6);break;case j:for(var o=0;l>o;++o)m(c[o],8)}for(m(g,4),8>k&&e.push(f);e.length+1f;++f)c.push(0);for(var f=0;d>f;){var g=t[c[f++]];if(g>=0)for(var h=0;e>h;++h)c[f+h]^=s[(g+b[h])%255]}return c.slice(d)},N=function(a,b,c){for(var d=[],e=a.length/b|0,f=0,g=b-a.length%b,h=0;g>h;++h)d.push(f),f+=e;for(var h=g;b>h;++h)d.push(f),f+=e+1;d.push(f);for(var i=[],h=0;b>h;++h)i.push(M(a.slice(d[h],d[h+1]),c));for(var j=[],k=a.length/b|0,h=0;k>h;++h)for(var l=0;b>l;++l)j.push(a[d[l]+h]);for(var l=g;b>l;++l)j.push(a[d[l+1]-1]);for(var h=0;hl;++l)j.push(i[l][h]);return j},O=function(a,b,c,d){for(var e=a<=0;--f)e>>d+f&1&&(e^=c<g;++g)d.push([]),e.push([]);var h=function(a,b,c,f,g){for(var h=0;c>h;++h)for(var i=0;f>i;++i)d[a+h][b+i]=g[h]>>i&1,e[a+h][b+i]=1};h(0,0,9,9,[127,65,93,93,93,65,383,0,64]),h(c-8,0,8,9,[256,127,65,93,93,93,65,127]),h(0,c-8,9,8,[254,130,186,186,186,130,254,0,0]);for(var g=9;c-8>g;++g)d[6][g]=d[g][6]=1&~g,e[6][g]=e[g][6]=1;for(var i=b[2],j=i.length,g=0;j>g;++g)for(var k=0===g||g===j-1?1:0,l=0===g?j-1:j,m=k;l>m;++m)h(i[g],i[m],5,5,[31,17,21,17,31]);if(E(a))for(var n=O(a,6,7973,12),o=0,g=0;6>g;++g)for(var m=0;3>m;++m)d[g][c-11+m]=d[c-11+m][g]=n>>o++&1,e[g][c-11+m]=e[c-11+m][g]=1;return{matrix:d,reserved:e}},Q=function(a,b,c){for(var d=a.length,e=0,f=-1,g=d-1;g>=0;g-=2){6==g&&--g;for(var h=0>f?d-1:0,i=0;d>i;++i){for(var j=g;j>g-2;--j)b[h][j]||(a[h][j]=c[e>>3]>>(7&~e)&1,++e);h+=f}f=-f}return a},R=function(a,b,c){for(var d=D[c],e=a.length,f=0;e>f;++f)for(var g=0;e>g;++g)b[f][g]||(a[f][g]^=d(f,g));return a},S=function(a,b,c,d){for(var e=a.length,f=21522^O(c<<3|d,5,1335,10),g=0;15>g;++g){var h=[0,1,2,3,4,5,7,8,e-7,e-6,e-5,e-4,e-3,e-2,e-1][g],i=[e-1,e-2,e-3,e-4,e-5,e-6,e-7,e-8,7,5,4,3,2,1,0][g];a[h][8]=a[8][i]=f>>g&1}return a},T=function(a){for(var b=3,c=3,d=40,e=10,f=function(a){for(var c=0,e=0;e=5&&(c+=b+(a[e]-5));for(var e=5;e=4*f||a[e+1]>=4*f)&&(c+=d)}return c},g=a.length,h=0,i=0,j=0;g>j;++j){var k,l=a[j];k=[0];for(var m=0;g>m;){var n;for(n=0;g>m&&l[m];++n)++m;for(k.push(n),n=0;g>m&&!l[m];++n)++m;k.push(n)}h+=f(k),k=[0];for(var m=0;g>m;){var n;for(n=0;g>m&&a[m][j];++n)++m;for(k.push(n),n=0;g>m&&!a[m][j];++n)++m;k.push(n)}h+=f(k);var o=a[j+1]||[];i+=l[0];for(var m=1;g>m;++m){var p=l[m];i+=p,l[m-1]==p&&o[m]===p&&o[m-1]===p&&(h+=c)}}return h+=e*(Math.abs(i/g/g-.5)/.05|0)},U=function(a,b,c,d,e){var g=f[b],h=L(b,c,a,H(b,d)>>3);h=N(h,g[1][d],w[g[0][d]]);var i=P(b),j=i.matrix,k=i.reserved;if(Q(j,k,h),0>e){R(j,k,0),S(j,k,d,0);var l=0,m=T(j);for(R(j,k,0),e=1;8>e;++e){R(j,k,e),S(j,k,d,e);var n=T(j);m>n&&(m=n,l=e),R(j,k,e)}e=l}return R(j,k,e),S(j,k,d,e),j};a.exports={measure:e}},function(a,b,c){"use strict";function d(a,b){this.pages=[],this.pageMargins=b,this.x=b.left,this.availableWidth=a.width-b.left-b.right,this.availableHeight=0,this.page=-1,this.snapshots=[],this.endingCell=null,this.tracker=new g,this.addPage(a)}function e(a,b){return void 0===a?b:"landscape"===a?"landscape":"portrait"}function f(a,b){var c;return c=a.page>b.page?a:b.page>a.page?b:a.y>b.y?a:b,{page:c.page,x:c.x,y:c.y,availableHeight:c.availableHeight,availableWidth:c.availableWidth}}var g=c(12);d.prototype.beginColumnGroup=function(){this.snapshots.push({x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,page:this.page,bottomMost:{y:this.y,page:this.page},endingCell:this.endingCell,lastColumnWidth:this.lastColumnWidth}),this.lastColumnWidth=0},d.prototype.beginColumn=function(a,b,c){var d=this.snapshots[this.snapshots.length-1];this.calculateBottomMost(d),this.endingCell=c,this.page=d.page,this.x=this.x+this.lastColumnWidth+(b||0),this.y=d.y,this.availableWidth=a,this.availableHeight=d.availableHeight,this.lastColumnWidth=a},d.prototype.calculateBottomMost=function(a){this.endingCell?(this.saveContextInEndingCell(this.endingCell),this.endingCell=null):a.bottomMost=f(this,a.bottomMost)},d.prototype.markEnding=function(a){this.page=a._columnEndingContext.page,this.x=a._columnEndingContext.x,this.y=a._columnEndingContext.y,this.availableWidth=a._columnEndingContext.availableWidth,this.availableHeight=a._columnEndingContext.availableHeight,this.lastColumnWidth=a._columnEndingContext.lastColumnWidth},d.prototype.saveContextInEndingCell=function(a){a._columnEndingContext={page:this.page,x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,lastColumnWidth:this.lastColumnWidth}},d.prototype.completeColumnGroup=function(){var a=this.snapshots.pop();this.calculateBottomMost(a),this.endingCell=null,this.x=a.x,this.y=a.bottomMost.y,this.page=a.bottomMost.page,this.availableWidth=a.availableWidth,this.availableHeight=a.bottomMost.availableHeight,this.lastColumnWidth=a.lastColumnWidth},d.prototype.addMargin=function(a,b){this.x+=a,this.availableWidth-=a+(b||0)},d.prototype.moveDown=function(a){return this.y+=a,this.availableHeight-=a,this.availableHeight>0},d.prototype.initializePage=function(){this.y=this.pageMargins.top,this.availableHeight=this.getCurrentPage().pageSize.height-this.pageMargins.top-this.pageMargins.bottom,this.pageSnapshot().availableWidth=this.getCurrentPage().pageSize.width-this.pageMargins.left-this.pageMargins.right},d.prototype.pageSnapshot=function(){return this.snapshots[0]?this.snapshots[0]:this},d.prototype.moveTo=function(a,b){void 0!==a&&null!==a&&(this.x=a,this.availableWidth=this.getCurrentPage().pageSize.width-this.x-this.pageMargins.right),void 0!==b&&null!==b&&(this.y=b,this.availableHeight=this.getCurrentPage().pageSize.height-this.y-this.pageMargins.bottom)},d.prototype.beginDetachedBlock=function(){this.snapshots.push({x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,page:this.page,endingCell:this.endingCell,lastColumnWidth:this.lastColumnWidth})},d.prototype.endDetachedBlock=function(){var a=this.snapshots.pop();this.x=a.x,this.y=a.y,this.availableWidth=a.availableWidth,this.availableHeight=a.availableHeight,this.page=a.page,this.endingCell=a.endingCell,this.lastColumnWidth=a.lastColumnWidth};var h=function(a,b){return b=e(b,a.pageSize.orientation),b!==a.pageSize.orientation?{orientation:b,width:a.pageSize.height,height:a.pageSize.width}:{orientation:a.pageSize.orientation,width:a.pageSize.width,height:a.pageSize.height}};d.prototype.moveToNextPage=function(a){var b=this.page+1,c=this.page,d=this.y,e=b>=this.pages.length;return e?this.addPage(h(this.getCurrentPage(),a)):(this.page=b,this.initializePage()),{newPageCreated:e,prevPage:c,prevY:d,y:this.y}},d.prototype.addPage=function(a){var b={items:[],pageSize:a};return this.pages.push(b),this.page=this.pages.length-1,this.initializePage(),this.tracker.emit("pageAdded"),b},d.prototype.getCurrentPage=function(){return this.page<0||this.page>=this.pages.length?null:this.pages[this.page]},d.prototype.getCurrentPosition=function(){var a=this.getCurrentPage().pageSize,b=a.height-this.pageMargins.top-this.pageMargins.bottom,c=a.width-this.pageMargins.left-this.pageMargins.right;return{pageNumber:this.page+1,pageOrientation:a.orientation,pageInnerHeight:b,pageInnerWidth:c,left:this.x,top:this.y,verticalRatio:(this.y-this.pageMargins.top)/b,horizontalRatio:(this.x-this.pageMargins.left)/c}},a.exports=d},function(a,b,c){"use strict";function d(a,b){this.transactionLevel=0,this.repeatables=[],this.tracker=b,this.writer=new f(a,b)}function e(a,b){var c=b(a);return c||(a.moveToNextPage(),c=b(a)),c}var f=c(21);d.prototype.addLine=function(a,b,c){return e(this,function(d){return d.writer.addLine(a,b,c)})},d.prototype.addImage=function(a,b){return e(this,function(c){return c.writer.addImage(a,b)})},d.prototype.addQr=function(a,b){return e(this,function(c){return c.writer.addQr(a,b)})},d.prototype.addVector=function(a,b,c,d){return this.writer.addVector(a,b,c,d)},d.prototype.addFragment=function(a,b,c,d){this.writer.addFragment(a,b,c,d)||(this.moveToNextPage(),this.writer.addFragment(a,b,c,d))},d.prototype.moveToNextPage=function(a){var b=this.writer.context.moveToNextPage(a);b.newPageCreated?this.repeatables.forEach(function(a){this.writer.addFragment(a,!0)},this):this.repeatables.forEach(function(a){this.writer.context.moveDown(a.height)},this),this.writer.tracker.emit("pageChanged",{prevPage:b.prevPage,prevY:b.prevY,y:b.y})},d.prototype.beginUnbreakableBlock=function(a,b){0===this.transactionLevel++&&(this.originalX=this.writer.context.x,this.writer.pushContext(a,b))},d.prototype.commitUnbreakableBlock=function(a,b){if(0===--this.transactionLevel){var c=this.writer.context;this.writer.popContext();var d=c.pages.length;if(d>0){var e=c.pages[0];if(e.xOffset=a,e.yOffset=b,d>1)if(void 0!==a||void 0!==b)e.height=c.getCurrentPage().pageSize.height-c.pageMargins.top-c.pageMargins.bottom;else{e.height=this.writer.context.getCurrentPage().pageSize.height-this.writer.context.pageMargins.top-this.writer.context.pageMargins.bottom;for(var f=0,g=this.repeatables.length;g>f;f++)e.height-=this.repeatables[f].height}else e.height=c.y;void 0!==a||void 0!==b?this.writer.addFragment(e,!0,!0,!0):this.addFragment(e)}}},d.prototype.currentBlockToRepeatable=function(){var a=this.writer.context,b={items:[]};return a.pages[0].items.forEach(function(a){b.items.push(a)}),b.xOffset=this.originalX,b.height=a.y,b},d.prototype.pushToRepeatables=function(a){this.repeatables.push(a)},d.prototype.popFromRepeatables=function(){this.repeatables.pop()},d.prototype.context=function(){return this.writer.context},a.exports=d},function(a,b,c){"use strict";function d(a,b){this.context=a,this.contextStack=[],this.tracker=b}function e(a,b,c){null===c||void 0===c||0>c||c>a.items.length?a.items.push(b):a.items.splice(c,0,b)}function f(a){var b=new g(a.maxWidth);for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}var g=c(22),h=c(17).pack,i=c(17).offsetVector,j=c(19);d.prototype.addLine=function(a,b,c){var d=a.getHeight(),f=this.context,g=f.getCurrentPage(),h=this.getCurrentPositionOnPage();return f.availableHeight0&&a.inlines[0].alignment,e=0;switch(d){case"right":e=b-c;break;case"center":e=(b-c)/2}if(e&&(a.x=(a.x||0)+e),"justify"===d&&!a.newLineForced&&!a.lastLineInParagraph&&a.inlines.length>1)for(var f=(b-c)/(a.inlines.length-1),g=1,h=a.inlines.length;h>g;g++)e=g*f,a.inlines[g].x+=e},d.prototype.addImage=function(a,b){var c=this.context,d=c.getCurrentPage(),f=this.getCurrentPositionOnPage();return c.availableHeightf;f++){var h=a._canvas[f];h.x+=a.x,h.y+=a.y,this.addVector(h,!0,!0,b)}return c.moveDown(a._height),e},d.prototype.alignImage=function(a){var b=this.context.availableWidth,c=a._minWidth,d=0;switch(a._alignment){case"right":d=b-c;break;case"center":d=(b-c)/2}d&&(a.x=(a.x||0)+d)},d.prototype.addVector=function(a,b,c,d){var f=this.context,g=f.getCurrentPage(),h=this.getCurrentPositionOnPage();return g?(i(a,b?0:f.x,c?0:f.y),e(g,{type:"vector",item:a},d),h):void 0},d.prototype.addFragment=function(a,b,c,d){var e=this.context,g=e.getCurrentPage();return!b&&a.height>e.availableHeight?!1:(a.items.forEach(function(d){switch(d.type){case"line":var j=f(d.item);j.x=(j.x||0)+(b?a.xOffset||0:e.x),j.y=(j.y||0)+(c?a.yOffset||0:e.y),g.items.push({type:"line",item:j});break;case"vector":var k=h(d.item);i(k,b?a.xOffset||0:e.x,c?a.yOffset||0:e.y),g.items.push({type:"vector",item:k});break;case"image":var l=h(d.item);l.x=(l.x||0)+(b?a.xOffset||0:e.x),l.y=(l.y||0)+(c?a.yOffset||0:e.y),g.items.push({type:"image",item:l})}}),d||e.moveDown(a.height),!0)},d.prototype.pushContext=function(a,b){void 0===a&&(b=this.context.getCurrentPage().height-this.context.pageMargins.top-this.context.pageMargins.bottom,a=this.context.availableWidth),("number"==typeof a||a instanceof Number)&&(a=new j({width:a,height:b},{left:0,right:0,top:0,bottom:0})),this.contextStack.push(this.context),this.context=a},d.prototype.popContext=function(){this.context=this.contextStack.pop()},d.prototype.getCurrentPositionOnPage=function(){return(this.contextStack[0]||this.context).getCurrentPosition()},a.exports=d},function(a,b){"use strict";function c(a){this.maxWidth=a,this.leadingCut=0,this.trailingCut=0,this.inlineWidths=0,this.inlines=[]}c.prototype.getAscenderHeight=function(){var a=0;return this.inlines.forEach(function(b){a=Math.max(a,b.font.ascender/1e3*b.fontSize)}),a},c.prototype.hasEnoughSpaceForInline=function(a){return 0===this.inlines.length?!0:this.newLineForced?!1:this.inlineWidths+a.width-this.leadingCut-(a.trailingCut||0)<=this.maxWidth},c.prototype.addInline=function(a){0===this.inlines.length&&(this.leadingCut=a.leadingCut||0),this.trailingCut=a.trailingCut||0,a.x=this.inlineWidths-this.leadingCut,this.inlines.push(a),this.inlineWidths+=a.width,a.lineEnd&&(this.newLineForced=!0)},c.prototype.getWidth=function(){return this.inlineWidths-this.leadingCut-this.trailingCut},c.prototype.getHeight=function(){var a=0;return this.inlines.forEach(function(b){a=Math.max(a,b.height||0)}),a},a.exports=c},function(a,b,c){"use strict";function d(a){this.tableNode=a}var e=c(16);d.prototype.beginTable=function(a){function b(){var a=0;return d.table.widths.forEach(function(b){a+=b._calcWidth}),a}function c(){var a=[],b=0,c=0;a.push({left:0,rowSpan:0});for(var d=0,e=g.tableNode.table.body[0].length;e>d;d++){var f=g.layout.paddingLeft(d,g.tableNode)+g.layout.paddingRight(d,g.tableNode),h=g.layout.vLineWidth(d,g.tableNode);c=f+h+g.tableNode.table.widths[d]._calcWidth,a[a.length-1].width=c,b+=c,a.push({left:b,rowSpan:0,width:0})}return a}var d,f,g=this;d=this.tableNode,this.offsets=d._offsets,this.layout=d._layout,f=a.context().availableWidth-this.offsets.total,e.buildColumnWidths(d.table.widths,f),this.tableWidth=d._offsets.total+b(),this.rowSpanData=c(),this.cleanUpRepeatables=!1,this.headerRows=d.table.headerRows||0,this.rowsWithoutPageBreak=this.headerRows+(d.table.keepWithHeaderRows||0),this.dontBreakRows=d.table.dontBreakRows||!1,this.rowsWithoutPageBreak&&a.beginUnbreakableBlock(),this.drawHorizontalLine(0,a)},d.prototype.onRowBreak=function(a,b){var c=this;return function(){var a=c.rowPaddingTop+(c.headerRows?0:c.topLineWidth);b.context().moveDown(a)}},d.prototype.beginRow=function(a,b){this.topLineWidth=this.layout.hLineWidth(a,this.tableNode),this.rowPaddingTop=this.layout.paddingTop(a,this.tableNode),this.bottomLineWidth=this.layout.hLineWidth(a+1,this.tableNode),this.rowPaddingBottom=this.layout.paddingBottom(a,this.tableNode),this.rowCallback=this.onRowBreak(a,b),b.tracker.startTracking("pageChanged",this.rowCallback),this.dontBreakRows&&b.beginUnbreakableBlock(),this.rowTopY=b.context().y,this.reservedAtBottom=this.bottomLineWidth+this.rowPaddingBottom,b.context().availableHeight-=this.reservedAtBottom,b.context().moveDown(this.rowPaddingTop); },d.prototype.drawHorizontalLine=function(a,b,c){var d=this.layout.hLineWidth(a,this.tableNode);if(d){for(var e=d/2,f=null,g=0,h=this.rowSpanData.length;h>g;g++){var i=this.rowSpanData[g],j=!i.rowSpan;!f&&j&&(f={left:i.left,width:0}),j&&(f.width+=i.width||0);var k=(c||0)+e;j&&g!==h-1||f&&(b.addVector({type:"line",x1:f.left,x2:f.left+f.width,y1:k,y2:k,lineWidth:d,lineColor:"function"==typeof this.layout.hLineColor?this.layout.hLineColor(a,this.tableNode):this.layout.hLineColor},!1,c),f=null)}b.context().moveDown(d)}},d.prototype.drawVerticalLine=function(a,b,c,d,e){var f=this.layout.vLineWidth(d,this.tableNode);0!==f&&e.addVector({type:"line",x1:a+f/2,x2:a+f/2,y1:b,y2:c,lineWidth:f,lineColor:"function"==typeof this.layout.vLineColor?this.layout.vLineColor(d,this.tableNode):this.layout.vLineColor},!1,!0)},d.prototype.endTable=function(a){this.cleanUpRepeatables&&a.popFromRepeatables()},d.prototype.endRow=function(a,b,c){function d(){for(var b=[],c=0,d=0,e=g.tableNode.table.body[a].length;e>d;d++){if(!c){b.push({x:g.rowSpanData[d].left,index:d});var f=g.tableNode.table.body[a][d];c=f._colSpan||f.colSpan||0}c>0&&c--}return b.push({x:g.rowSpanData[g.rowSpanData.length-1].left,index:g.rowSpanData.length-1}),b}var e,f,g=this;b.tracker.stopTracking("pageChanged",this.rowCallback),b.context().moveDown(this.layout.paddingBottom(a,this.tableNode)),b.context().availableHeight+=this.reservedAtBottom;var h=b.context().page,i=b.context().y,j=d(),k=[],l=c&&c.length>0;if(k.push({y0:this.rowTopY,page:l?c[0].prevPage:h}),l)for(f=0,e=c.length;e>f;f++){var m=c[f];k[k.length-1].y1=m.prevY,k.push({y0:m.y,page:m.prevPage+1})}k[k.length-1].y1=i;for(var n=k[0].y1-k[0].y0===this.rowPaddingTop,o=n?1:0,p=k.length;p>o;o++){var q=o0&&!this.headerRows,s=r?0:this.topLineWidth,t=k[o].y0,u=k[o].y1;for(q&&(u+=this.rowPaddingBottom),b.context().page!=k[o].page&&(b.context().page=k[o].page,this.reservedAtBottom=0),f=0,e=j.length;e>f;f++)if(this.drawVerticalLine(j[f].x,t-s,u+this.bottomLineWidth,j[f].index,b),e-1>f){var v=j[f].index,w=this.tableNode.table.body[a][v].fillColor;if(w){var x=this.layout.vLineWidth(v,this.tableNode),y=j[f].x+x,z=t-s;b.addVector({type:"rect",x:y,y:z,w:j[f+1].x-y,h:u+this.bottomLineWidth-z,lineWidth:0,color:w},!1,!0,0)}}q&&this.layout.hLineWhenBroken!==!1&&this.drawHorizontalLine(a+1,b,u),r&&this.layout.hLineWhenBroken!==!1&&this.drawHorizontalLine(a,b,t)}b.context().page=h,b.context().y=i;var A=this.tableNode.table.body[a];for(f=0,e=A.length;e>f;f++){if(A[f].rowSpan&&(this.rowSpanData[f].rowSpan=A[f].rowSpan,A[f].colSpan&&A[f].colSpan>1))for(var B=1;B0&&this.rowSpanData[f].rowSpan--}this.drawHorizontalLine(a+1,b),this.headerRows&&a===this.headerRows-1&&(this.headerRepeatable=b.currentBlockToRepeatable()),this.dontBreakRows&&b.tracker.auto("pageChanged",function(){g.drawHorizontalLine(a,b)},function(){b.commitUnbreakableBlock(),g.drawHorizontalLine(a,b)}),!this.headerRepeatable||a!==this.rowsWithoutPageBreak-1&&a!==this.tableNode.table.body.length-1||(b.commitUnbreakableBlock(),b.pushToRepeatables(this.headerRepeatable),this.cleanUpRepeatables=!0,this.headerRepeatable=null)},a.exports=d},function(a,b,c){(function(b){(function(){var d,e,f,g,h,i,j={}.hasOwnProperty,k=function(a,b){function c(){this.constructor=a}for(var d in b)j.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};i=c(25),h=c(44),e=c(45),g=c(46),f=c(64),d=function(a){function d(a){var b,c,e,f;if(this.options=null!=a?a:{},d.__super__.constructor.apply(this,arguments),this.version=1.3,this.compress=null!=(e=this.options.compress)?e:!0,this._pageBuffer=[],this._pageBufferStart=0,this._offsets=[],this._waiting=0,this._ended=!1,this._offset=0,this._root=this.ref({Type:"Catalog",Pages:this.ref({Type:"Pages",Count:0,Kids:[]})}),this.page=null,this.initColor(),this.initVector(),this.initFonts(),this.initText(),this.initImages(),this.info={Producer:"PDFKit",Creator:"PDFKit",CreationDate:new Date},this.options.info){f=this.options.info;for(b in f)c=f[b],this.info[b]=c}this._write("%PDF-"+this.version),this._write("%ÿÿÿÿ"),this.addPage()}var i;return k(d,a),i=function(a){var b,c,e;e=[];for(c in a)b=a[c],e.push(d.prototype[c]=b);return e},i(c(65)),i(c(67)),i(c(69)),i(c(89)),i(c(96)),i(c(101)),d.prototype.addPage=function(a){var b;return null==a&&(a=this.options),this.options.bufferPages||this.flushPages(),this.page=new f(this,a),this._pageBuffer.push(this.page),b=this._root.data.Pages.data,b.Kids.push(this.page.dictionary),b.Count++,this.x=this.page.margins.left,this.y=this.page.margins.top,this._ctm=[1,0,0,1,0,0],this.transform(1,0,0,-1,0,this.page.height),this},d.prototype.bufferedPageRange=function(){return{start:this._pageBufferStart,count:this._pageBuffer.length}},d.prototype.switchToPage=function(a){var b;if(!(b=this._pageBuffer[a-this._pageBufferStart]))throw new Error("switchToPage("+a+") out of bounds, current buffer covers pages "+this._pageBufferStart+" to "+(this._pageBufferStart+this._pageBuffer.length-1));return this.page=b},d.prototype.flushPages=function(){var a,b,c,d;for(b=this._pageBuffer,this._pageBuffer=[],this._pageBufferStart+=b.length,c=0,d=b.length;d>c;c++)a=b[c],a.end()},d.prototype.ref=function(a){var b;return b=new g(this,this._offsets.length+1,a),this._offsets.push(null),this._waiting++,b},d.prototype._read=function(){},d.prototype._write=function(a){return b.isBuffer(a)||(a=new b(a+"\n","binary")),this.push(a),this._offset+=a.length},d.prototype.addContent=function(a){return this.page.write(a),this},d.prototype._refEnd=function(a){return this._offsets[a.id-1]=a.offset,0===--this._waiting&&this._ended?(this._finalize(),this._ended=!1):void 0},d.prototype.write=function(a,b){var c;return c=new Error("PDFDocument#write is deprecated, and will be removed in a future version of PDFKit. Please pipe the document into a Node stream."),console.warn(c.stack),this.pipe(h.createWriteStream(a)),this.end(),this.once("end",b)},d.prototype.output=function(a){throw new Error("PDFDocument#output is deprecated, and has been removed from PDFKit. Please pipe the document into a Node stream.")},d.prototype.end=function(){var a,b,c,d,e,f;this.flushPages(),this._info=this.ref(),e=this.info;for(b in e)d=e[b],"string"==typeof d&&(d=new String(d)),this._info.data[b]=d;this._info.end(),f=this._fontFamilies;for(c in f)a=f[c],a.embed();return this._root.end(),this._root.data.Pages.end(),0===this._waiting?this._finalize():this._ended=!0},d.prototype._finalize=function(a){var b,c,d,f,g;for(c=this._offset,this._write("xref"),this._write("0 "+(this._offsets.length+1)),this._write("0000000000 65535 f "),g=this._offsets,d=0,f=g.length;f>d;d++)b=g[d],b=("0000000000"+b).slice(-10),this._write(b+" 00000 n ");return this._write("trailer"),this._write(e.convert({Size:this._offsets.length+1,Root:this._root,Info:this._info})),this._write("startxref"),this._write(""+c),this._write("%%EOF"),this.push(null)},d.prototype.toString=function(){return"[object PDFDocument]"},d}(i.Readable),a.exports=d}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){function d(){e.call(this)}a.exports=d;var e=c(26).EventEmitter,f=c(27);f(d,e),d.Readable=c(28),d.Writable=c(40),d.Duplex=c(41),d.Transform=c(42),d.PassThrough=c(43),d.Stream=d,d.prototype.pipe=function(a,b){function c(b){a.writable&&!1===a.write(b)&&j.pause&&j.pause()}function d(){j.readable&&j.resume&&j.resume()}function f(){k||(k=!0,a.end())}function g(){k||(k=!0,"function"==typeof a.destroy&&a.destroy())}function h(a){if(i(),0===e.listenerCount(this,"error"))throw a}function i(){j.removeListener("data",c),a.removeListener("drain",d),j.removeListener("end",f),j.removeListener("close",g),j.removeListener("error",h),a.removeListener("error",h),j.removeListener("end",i),j.removeListener("close",i),a.removeListener("close",i)}var j=this;j.on("data",c),a.on("drain",d),a._isStdio||b&&b.end===!1||(j.on("end",f),j.on("close",g));var k=!1;return j.on("error",h),a.on("error",h),j.on("end",i),j.on("close",i),a.on("close",i),a.emit("pipe",j),a}},function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function d(a){return"function"==typeof a}function e(a){return"number"==typeof a}function f(a){return"object"==typeof a&&null!==a}function g(a){return void 0===a}a.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!e(a)||0>a||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,h,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||f(this._events.error)&&!this._events.error.length)){if(b=arguments[1],b instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],g(c))return!1;if(d(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:h=Array.prototype.slice.call(arguments,1),c.apply(this,h)}else if(f(c))for(h=Array.prototype.slice.call(arguments,1),j=c.slice(),e=j.length,i=0;e>i;i++)j[i].apply(this,h);return!0},c.prototype.addListener=function(a,b){var e;if(!d(b))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d(b.listener)?b.listener:b),this._events[a]?f(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,f(this._events[a])&&!this._events[a].warned&&(e=g(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())),this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),e||(e=!0,b.apply(this,arguments))}if(!d(b))throw TypeError("listener must be a function");var e=!1;return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,g,h;if(!d(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],g=c.length,e=-1,c===b||d(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(f(c)){for(h=g;h-- >0;)if(c[h]===b||c[h].listener&&c[h].listener===b){e=h;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d(c))this.removeListener(a,c);else if(c)for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.prototype.listenerCount=function(a){if(this._events){var b=this._events[a];if(d(b))return 1;if(b)return b.length}return 0},c.listenerCount=function(a,b){return a.listenerCount(b)}},function(a,b){"function"==typeof Object.create?a.exports=function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:a.exports=function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},function(a,b,c){b=a.exports=c(29),b.Stream=c(25),b.Readable=b,b.Writable=c(36),b.Duplex=c(35),b.Transform=c(38),b.PassThrough=c(39)},function(a,b,c){(function(b){function d(a,b){var d=c(35);a=a||{};var e=a.highWaterMark,f=a.objectMode?16:16384;this.highWaterMark=e||0===e?e:f,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!a.objectMode,b instanceof d&&(this.objectMode=this.objectMode||!!a.readableObjectMode),this.defaultEncoding=a.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,a.encoding&&(C||(C=c(37).StringDecoder),this.decoder=new C(a.encoding),this.encoding=a.encoding)}function e(a){c(35);return this instanceof e?(this._readableState=new d(a,this),this.readable=!0,void A.call(this)):new e(a)}function f(a,b,c,d,e){var f=j(b,c);if(f)a.emit("error",f);else if(B.isNullOrUndefined(c))b.reading=!1,b.ended||k(a,b);else if(b.objectMode||c&&c.length>0)if(b.ended&&!e){var h=new Error("stream.push() after EOF");a.emit("error",h)}else if(b.endEmitted&&e){var h=new Error("stream.unshift() after end event");a.emit("error",h)}else!b.decoder||e||d||(c=b.decoder.write(c)),e||(b.reading=!1),b.flowing&&0===b.length&&!b.sync?(a.emit("data",c),a.read(0)):(b.length+=b.objectMode?1:c.length,e?b.buffer.unshift(c):b.buffer.push(c),b.needReadable&&l(a)),n(a,b);else e||(b.reading=!1);return g(b)}function g(a){return!a.ended&&(a.needReadable||a.length=E)a=E;else{a--;for(var b=1;32>b;b<<=1)a|=a>>b;a++}return a}function i(a,b){return 0===b.length&&b.ended?0:b.objectMode?0===a?0:1:isNaN(a)||B.isNull(a)?b.flowing&&b.buffer.length?b.buffer[0].length:b.length:0>=a?0:(a>b.highWaterMark&&(b.highWaterMark=h(a)),a>b.length?b.ended?b.length:(b.needReadable=!0,0):a)}function j(a,b){var c=null;return B.isBuffer(b)||B.isString(b)||B.isNullOrUndefined(b)||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function k(a,b){if(b.decoder&&!b.ended){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,l(a)}function l(a){var c=a._readableState;c.needReadable=!1,c.emittedReadable||(D("emitReadable",c.flowing),c.emittedReadable=!0,c.sync?b.nextTick(function(){m(a)}):m(a))}function m(a){D("emit readable"),a.emit("readable"),s(a)}function n(a,c){c.readingMore||(c.readingMore=!0,b.nextTick(function(){o(a,c)}))}function o(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length=e)c=f?d.join(""):y.concat(d,e),d.length=0;else if(aj&&a>i;j++){var h=d[0],l=Math.min(a-i,h.length);f?c+=h.slice(0,l):h.copy(c,i,0,l),l0)throw new Error("endReadable called on non-empty stream");c.endEmitted||(c.ended=!0,b.nextTick(function(){c.endEmitted||0!==c.length||(c.endEmitted=!0,a.readable=!1,a.emit("end"))}))}function v(a,b){for(var c=0,d=a.length;d>c;c++)b(a[c],c)}function w(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}a.exports=e;var x=c(31),y=c(2).Buffer;e.ReadableState=d;var z=c(26).EventEmitter;z.listenerCount||(z.listenerCount=function(a,b){return a.listeners(b).length});var A=c(25),B=c(32);B.inherits=c(33);var C,D=c(34);D=D&&D.debuglog?D.debuglog("stream"):function(){},B.inherits(e,A),e.prototype.push=function(a,b){var c=this._readableState;return B.isString(a)&&!c.objectMode&&(b=b||c.defaultEncoding,b!==c.encoding&&(a=new y(a,b),b="")),f(this,c,a,b,!1)},e.prototype.unshift=function(a){var b=this._readableState;return f(this,b,a,"",!0)},e.prototype.setEncoding=function(a){return C||(C=c(37).StringDecoder),this._readableState.decoder=new C(a),this._readableState.encoding=a,this};var E=8388608;e.prototype.read=function(a){D("read",a);var b=this._readableState,c=a;if((!B.isNumber(a)||a>0)&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return D("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?u(this):l(this),null;if(a=i(a,b),0===a&&b.ended)return 0===b.length&&u(this),null;var d=b.needReadable;D("need readable",d),(0===b.length||b.length-a0?t(a,b):null,B.isNull(e)&&(b.needReadable=!0,a=0),b.length-=a,0!==b.length||b.ended||(b.needReadable=!0),c!==a&&b.ended&&0===b.length&&u(this),B.isNull(e)||this.emit("data",e),e},e.prototype._read=function(a){this.emit("error",new Error("not implemented"))},e.prototype.pipe=function(a,c){function d(a){D("onunpipe"),a===l&&f()}function e(){D("onend"),a.end()}function f(){D("cleanup"),a.removeListener("close",i),a.removeListener("finish",j),a.removeListener("drain",q),a.removeListener("error",h),a.removeListener("unpipe",d),l.removeListener("end",e),l.removeListener("end",f),l.removeListener("data",g),!m.awaitDrain||a._writableState&&!a._writableState.needDrain||q()}function g(b){D("ondata");var c=a.write(b);!1===c&&(D("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function h(b){D("onerror",b),k(),a.removeListener("error",h),0===z.listenerCount(a,"error")&&a.emit("error",b)}function i(){a.removeListener("finish",j),k()}function j(){D("onfinish"),a.removeListener("close",i),k()}function k(){D("unpipe"),l.unpipe(a)}var l=this,m=this._readableState;switch(m.pipesCount){case 0:m.pipes=a;break;case 1:m.pipes=[m.pipes,a];break;default:m.pipes.push(a)}m.pipesCount+=1,D("pipe count=%d opts=%j",m.pipesCount,c);var n=(!c||c.end!==!1)&&a!==b.stdout&&a!==b.stderr,o=n?e:f;m.endEmitted?b.nextTick(o):l.once("end",o),a.on("unpipe",d);var q=p(l);return a.on("drain",q),l.on("data",g),a._events&&a._events.error?x(a._events.error)?a._events.error.unshift(h):a._events.error=[h,a._events.error]:a.on("error",h),a.once("close",i),a.once("finish",j),a.emit("pipe",l),m.flowing||(D("pipe resume"),l.resume()),a},e.prototype.unpipe=function(a){var b=this._readableState;if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,a&&a.emit("unpipe",this),this);if(!a){var c=b.pipes,d=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var e=0;d>e;e++)c[e].emit("unpipe",this);return this}var e=w(b.pipes,a);return-1===e?this:(b.pipes.splice(e,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this),this)},e.prototype.on=function(a,c){var d=A.prototype.on.call(this,a,c);if("data"===a&&!1!==this._readableState.flowing&&this.resume(),"readable"===a&&this.readable){var e=this._readableState;if(!e.readableListening)if(e.readableListening=!0,e.emittedReadable=!1,e.needReadable=!0,e.reading)e.length&&l(this,e);else{var f=this;b.nextTick(function(){D("readable nexttick read 0"),f.read(0)})}}return d},e.prototype.addListener=e.prototype.on,e.prototype.resume=function(){var a=this._readableState;return a.flowing||(D("resume"),a.flowing=!0,a.reading||(D("resume read 0"),this.read(0)),q(this,a)),this},e.prototype.pause=function(){return D("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(D("pause"),this._readableState.flowing=!1,this.emit("pause")),this},e.prototype.wrap=function(a){var b=this._readableState,c=!1,d=this;a.on("end",function(){if(D("wrapped end"),b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(D("wrapped data"),b.decoder&&(e=b.decoder.write(e)),e&&(b.objectMode||e.length)){var f=d.push(e);f||(c=!0,a.pause())}});for(var e in a)B.isFunction(a[e])&&B.isUndefined(this[e])&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));var f=["error","close","destroy","pause","resume"];return v(f,function(b){a.on(b,d.emit.bind(d,b))}),d._read=function(b){D("wrapped _read",b),c&&(c=!1,a.resume())},d},e._fromList=t}).call(b,c(30))},function(a,b){function c(){j=!1,g.length?i=g.concat(i):k=-1,i.length&&d()}function d(){if(!j){var a=setTimeout(c);j=!0;for(var b=i.length;b;){for(g=i,i=[];++k1)for(var c=1;cc;c++)b(a[c],c)}a.exports=d;var g=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b},h=c(32);h.inherits=c(33);var i=c(29),j=c(36);h.inherits(d,i),f(g(j.prototype),function(a){d.prototype[a]||(d.prototype[a]=j.prototype[a])})}).call(b,c(30))},function(a,b,c){(function(b){function d(a,b,c){this.chunk=a,this.encoding=b,this.callback=c}function e(a,b){var d=c(35);a=a||{};var e=a.highWaterMark,f=a.objectMode?16:16384;this.highWaterMark=e||0===e?e:f,this.objectMode=!!a.objectMode,b instanceof d&&(this.objectMode=this.objectMode||!!a.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var g=a.decodeStrings===!1;this.decodeStrings=!g,this.defaultEncoding=a.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){n(b,a)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function f(a){var b=c(35);return this instanceof f||this instanceof b?(this._writableState=new e(a,this),this.writable=!0,void x.call(this)):new f(a)}function g(a,c,d){var e=new Error("write after end");a.emit("error",e),b.nextTick(function(){d(e)})}function h(a,c,d,e){var f=!0;if(!(w.isBuffer(d)||w.isString(d)||w.isNullOrUndefined(d)||c.objectMode)){var g=new TypeError("Invalid non-string/buffer chunk");a.emit("error",g),b.nextTick(function(){e(g)}),f=!1}return f}function i(a,b,c){return!a.objectMode&&a.decodeStrings!==!1&&w.isString(b)&&(b=new v(b,c)),b}function j(a,b,c,e,f){c=i(b,c,e),w.isBuffer(c)&&(e="buffer");var g=b.objectMode?1:c.length;b.length+=g;var h=b.length1){for(var c=[],d=0;d=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,0,c),this.charReceived+=c,this.charReceived=55296&&56319>=d)){if(this.charReceived=this.charLength=0,0===a.length)return b;break}this.charLength+=this.surrogateSize,b=""}this.detectIncompleteChar(a);var e=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,e),e-=this.charReceived),b+=a.toString(this.encoding,0,e);var e=b.length-1,d=b.charCodeAt(e);if(d>=55296&&56319>=d){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),a.copy(this.charBuffer,0,0,f),b.substring(0,e)}return b},j.prototype.detectIncompleteChar=function(a){for(var b=a.length>=3?3:a.length;b>0;b--){var c=a[a.length-b];if(1==b&&c>>5==6){this.charLength=2;break}if(2>=b&&c>>4==14){this.charLength=3;break}if(3>=b&&c>>3==30){this.charLength=4;break}}this.charReceived=b},j.prototype.end=function(a){var b="";if(a&&a.length&&(b=this.write(a)),this.charReceived){var c=this.charReceived,d=this.charBuffer,e=this.encoding;b+=d.slice(0,c).toString(e)}return b}},function(a,b,c){function d(a,b){this.afterTransform=function(a,c){return e(b,a,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function e(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("no writecb in Transform class"));d.writechunk=null,d.writecb=null,i.isNullOrUndefined(c)||a.push(c),e&&e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.lengthe;c=e+=2)b=a[c],a[c]=a[c+1],a[c+1]=b;return a},a.convert=function(h){var i,j,k,l,m,n,o,p,q,r;if("string"==typeof h)return"/"+h;if(h instanceof String){for(o=h.replace(d,function(a){return c[a]}),k=!1,j=q=0,r=o.length;r>q;j=q+=1)if(o.charCodeAt(j)>127){k=!0;break}return k&&(o=g(new b("\ufeff"+o,"utf16le")).toString("binary")),"("+o+")"}if(b.isBuffer(h))return"<"+h.toString("hex")+">";if(h instanceof e)return h.toString();if(h instanceof Date)return"(D:"+f(h.getUTCFullYear(),4)+f(h.getUTCMonth(),2)+f(h.getUTCDate(),2)+f(h.getUTCHours(),2)+f(h.getUTCMinutes(),2)+f(h.getUTCSeconds(),2)+"Z)";if(Array.isArray(h))return l=function(){var b,c,d;for(d=[],b=0,c=h.length;c>b;b++)i=h[b],d.push(a.convert(i));return d}().join(" "),"["+l+"]";if("[object Object]"==={}.toString.call(h)){n=["<<"];for(m in h)p=h[m],n.push("/"+m+" "+a.convert(p));return n.push(">>"),n.join("\n")}return""+h},a}(),a.exports=d,e=c(46)}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(b){(function(){var d,e,f,g=function(a,b){return function(){return a.apply(b,arguments)}};f=c(47),e=function(){function a(a,b,c){this.document=a,this.id=b,this.data=null!=c?c:{},this.finalize=g(this.finalize,this),this.gen=0,this.deflate=null,this.compress=this.document.compress&&!this.data.Filter,this.uncompressedLength=0,this.chunks=[]}return a.prototype.initDeflate=function(){return this.data.Filter="FlateDecode",this.deflate=f.createDeflate(),this.deflate.on("data",function(a){return function(b){return a.chunks.push(b),a.data.Length+=b.length}}(this)),this.deflate.on("end",this.finalize)},a.prototype.write=function(a){var c;return b.isBuffer(a)||(a=new b(a+"\n","binary")),this.uncompressedLength+=a.length,null==(c=this.data).Length&&(c.Length=0),this.compress?(this.deflate||this.initDeflate(),this.deflate.write(a)):(this.chunks.push(a),this.data.Length+=a.length)},a.prototype.end=function(a){return("string"==typeof a||b.isBuffer(a))&&this.write(a),this.deflate?this.deflate.end():this.finalize()},a.prototype.finalize=function(){var a,b,c,e;if(this.offset=this.document._offset,this.document._write(""+this.id+" "+this.gen+" obj"),this.document._write(d.convert(this.data)),this.chunks.length){for(this.document._write("stream"),e=this.chunks,b=0,c=e.length;c>b;b++)a=e[b],this.document._write(a);this.chunks.length=0,this.document._write("\nendstream")}return this.document._write("endobj"),this.document._refEnd(this)},a.prototype.toString=function(){return""+this.id+" "+this.gen+" R"},a}(),a.exports=e,d=c(45)}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(a,d){function e(b,c,d){function e(){for(var a;null!==(a=b.read());)h.push(a),i+=a.length;b.once("readable",e)}function f(a){b.removeListener("end",g),b.removeListener("readable",e),d(a)}function g(){var c=a.concat(h,i);h=[],d(null,c),b.close()}var h=[],i=0;b.on("error",f),b.on("end",g),b.end(c),e()}function f(b,c){if("string"==typeof c&&(c=new a(c)),!a.isBuffer(c))throw new TypeError("Not a string or buffer");var d=p.Z_FINISH;return b._processChunk(c,d)}function g(a){return this instanceof g?void n.call(this,a,p.DEFLATE):new g(a)}function h(a){return this instanceof h?void n.call(this,a,p.INFLATE):new h(a)}function i(a){return this instanceof i?void n.call(this,a,p.GZIP):new i(a)}function j(a){return this instanceof j?void n.call(this,a,p.GUNZIP):new j(a)}function k(a){return this instanceof k?void n.call(this,a,p.DEFLATERAW):new k(a)}function l(a){return this instanceof l?void n.call(this,a,p.INFLATERAW):new l(a)}function m(a){return this instanceof m?void n.call(this,a,p.UNZIP):new m(a)}function n(c,d){if(this._opts=c=c||{},this._chunkSize=c.chunkSize||b.Z_DEFAULT_CHUNK,o.call(this,c),c.flush&&c.flush!==p.Z_NO_FLUSH&&c.flush!==p.Z_PARTIAL_FLUSH&&c.flush!==p.Z_SYNC_FLUSH&&c.flush!==p.Z_FULL_FLUSH&&c.flush!==p.Z_FINISH&&c.flush!==p.Z_BLOCK)throw new Error("Invalid flush flag: "+c.flush);if(this._flushFlag=c.flush||p.Z_NO_FLUSH,c.chunkSize&&(c.chunkSizeb.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+c.chunkSize);if(c.windowBits&&(c.windowBitsb.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+c.windowBits);if(c.level&&(c.levelb.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+c.level);if(c.memLevel&&(c.memLevelb.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+c.memLevel);if(c.strategy&&c.strategy!=b.Z_FILTERED&&c.strategy!=b.Z_HUFFMAN_ONLY&&c.strategy!=b.Z_RLE&&c.strategy!=b.Z_FIXED&&c.strategy!=b.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+c.strategy);if(c.dictionary&&!a.isBuffer(c.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new p.Zlib(d);var e=this;this._hadError=!1,this._binding.onerror=function(a,c){e._binding=null,e._hadError=!0;var d=new Error(a);d.errno=c,d.code=b.codes[c],e.emit("error",d)};var f=b.Z_DEFAULT_COMPRESSION;"number"==typeof c.level&&(f=c.level);var g=b.Z_DEFAULT_STRATEGY;"number"==typeof c.strategy&&(g=c.strategy),this._binding.init(c.windowBits||b.Z_DEFAULT_WINDOWBITS,f,c.memLevel||b.Z_DEFAULT_MEMLEVEL,g,c.dictionary),this._buffer=new a(this._chunkSize),this._offset=0,this._closed=!1,this._level=f,this._strategy=g,this.once("end",this.close)}var o=c(42),p=c(48),q=c(60),r=c(63).ok;p.Z_MIN_WINDOWBITS=8,p.Z_MAX_WINDOWBITS=15,p.Z_DEFAULT_WINDOWBITS=15,p.Z_MIN_CHUNK=64,p.Z_MAX_CHUNK=1/0,p.Z_DEFAULT_CHUNK=16384,p.Z_MIN_MEMLEVEL=1,p.Z_MAX_MEMLEVEL=9,p.Z_DEFAULT_MEMLEVEL=8,p.Z_MIN_LEVEL=-1,p.Z_MAX_LEVEL=9,p.Z_DEFAULT_LEVEL=p.Z_DEFAULT_COMPRESSION,Object.keys(p).forEach(function(a){a.match(/^Z/)&&(b[a]=p[a])}),b.codes={Z_OK:p.Z_OK,Z_STREAM_END:p.Z_STREAM_END,Z_NEED_DICT:p.Z_NEED_DICT,Z_ERRNO:p.Z_ERRNO,Z_STREAM_ERROR:p.Z_STREAM_ERROR,Z_DATA_ERROR:p.Z_DATA_ERROR,Z_MEM_ERROR:p.Z_MEM_ERROR,Z_BUF_ERROR:p.Z_BUF_ERROR,Z_VERSION_ERROR:p.Z_VERSION_ERROR},Object.keys(b.codes).forEach(function(a){b.codes[b.codes[a]]=a}),b.Deflate=g,b.Inflate=h,b.Gzip=i,b.Gunzip=j,b.DeflateRaw=k,b.InflateRaw=l,b.Unzip=m,b.createDeflate=function(a){return new g(a)},b.createInflate=function(a){return new h(a)},b.createDeflateRaw=function(a){return new k(a)},b.createInflateRaw=function(a){return new l(a)},b.createGzip=function(a){return new i(a)},b.createGunzip=function(a){return new j(a)},b.createUnzip=function(a){return new m(a)},b.deflate=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new g(b),a,c)},b.deflateSync=function(a,b){return f(new g(b),a)},b.gzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new i(b),a,c)},b.gzipSync=function(a,b){return f(new i(b),a)},b.deflateRaw=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new k(b),a,c)},b.deflateRawSync=function(a,b){return f(new k(b),a)},b.unzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new m(b),a,c)},b.unzipSync=function(a,b){return f(new m(b),a)},b.inflate=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new h(b),a,c)},b.inflateSync=function(a,b){return f(new h(b),a)},b.gunzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new j(b),a,c)},b.gunzipSync=function(a,b){return f(new j(b),a)},b.inflateRaw=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new l(b),a,c)},b.inflateRawSync=function(a,b){return f(new l(b),a)},q.inherits(n,o),n.prototype.params=function(a,c,e){if(ab.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+a);if(c!=b.Z_FILTERED&&c!=b.Z_HUFFMAN_ONLY&&c!=b.Z_RLE&&c!=b.Z_FIXED&&c!=b.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+c);if(this._level!==a||this._strategy!==c){var f=this;this.flush(p.Z_SYNC_FLUSH,function(){f._binding.params(a,c),f._hadError||(f._level=a,f._strategy=c,e&&e())})}else d.nextTick(e)},n.prototype.reset=function(){return this._binding.reset()},n.prototype._flush=function(b){this._transform(new a(0),"",b)},n.prototype.flush=function(b,c){var e=this._writableState;if(("function"==typeof b||void 0===b&&!c)&&(c=b,b=p.Z_FULL_FLUSH),e.ended)c&&d.nextTick(c);else if(e.ending)c&&this.once("end",c);else if(e.needDrain){var f=this;this.once("drain",function(){f.flush(c)})}else this._flushFlag=b,this.write(new a(0),"",c)},n.prototype.close=function(a){if(a&&d.nextTick(a),!this._closed){this._closed=!0,this._binding.close();var b=this;d.nextTick(function(){b.emit("close")})}},n.prototype._transform=function(b,c,d){var e,f=this._writableState,g=f.ending||f.ended,h=g&&(!b||f.length===b.length);if(null===!b&&!a.isBuffer(b))return d(new Error("invalid input"));h?e=p.Z_FINISH:(e=this._flushFlag,b.length>=f.length&&(this._flushFlag=this._opts.flush||p.Z_NO_FLUSH));this._processChunk(b,e,d)},n.prototype._processChunk=function(b,c,d){function e(k,n){if(!i._hadError){var o=g-n;if(r(o>=0,"have should not go down"),o>0){var p=i._buffer.slice(i._offset,i._offset+o);i._offset+=o,j?i.push(p):(l.push(p),m+=p.length)}if((0===n||i._offset>=i._chunkSize)&&(g=i._chunkSize,i._offset=0,i._buffer=new a(i._chunkSize)),0===n){if(h+=f-k,f=k,!j)return!0;var q=i._binding.write(c,b,h,f,i._buffer,i._offset,i._chunkSize);return q.callback=e,void(q.buffer=b)}return j?void d():!1}}var f=b&&b.length,g=this._chunkSize-this._offset,h=0,i=this,j="function"==typeof d;if(!j){var k,l=[],m=0;this.on("error",function(a){k=a});do var n=this._binding.writeSync(c,b,h,f,this._buffer,this._offset,g);while(!this._hadError&&e(n[0],n[1]));if(this._hadError)throw k;var o=a.concat(l,m);return this.close(),o}var p=this._binding.write(c,b,h,f,this._buffer,this._offset,g);p.buffer=b,p.callback=e},q.inherits(g,n),q.inherits(h,n),q.inherits(i,n),q.inherits(j,n),q.inherits(k,n),q.inherits(l,n),q.inherits(m,n)}).call(b,c(2).Buffer,c(30))},function(a,b,c){(function(a,d){function e(a){if(ab.UNZIP)throw new TypeError("Bad argument");this.mode=a,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function f(a,b){for(var c=0;c4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-ja?a.strstart-(a.w_size-ja):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ia,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ia-(m-f),f=m-ia,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-ja)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=ha)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sa;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sa;if(a.strstart-a.block_start>=a.w_size-ja&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sa:sa}function o(a,b){for(var c,d;;){if(a.lookahead=ha&&(a.ins_h=(a.ins_h<=ha)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-ha),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=ha){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<=ha&&(a.ins_h=(a.ins_h<4096)&&(a.match_length=ha-1)),a.prev_length>=ha&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-ha,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-ha),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<=ha&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ia;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ia-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=ha?(c=D._tr_tally(a,1,a.match_length-ha),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sa:ta}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sa;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sa:ta}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=ha-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fa),this.dyn_dtree=new C.Buf16(2*(2*da+1)),this.bl_tree=new C.Buf16(2*(2*ea+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(ga+1),this.heap=new C.Buf16(2*ca+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*ca+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?la:qa,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===ra&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===la)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=ma):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wa),h.status=qa);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=ka),m+=31-m%31,h.status=qa,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===ma)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=na)}else h.status=na;if(h.status===na)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=oa)}else h.status=oa;if(h.status===oa)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pa)}else h.status=pa;if(h.status===pa&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qa)):h.status=qa),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===ra&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==ra){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if((o===ua||o===va)&&(h.status=ra),o===sa||o===ua)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===ta&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==la&&b!==ma&&b!==na&&b!==oa&&b!==pa&&b!==qa&&b!==ra?d(a,O):(a.state=null,b===qa?d(a,P):M)):O}var B,C=c(52),D=c(53),E=c(54),F=c(55),G=c(49),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,aa=29,ba=256,ca=ba+1+aa,da=30,ea=19,fa=2*ca+1,ga=15,ha=3,ia=258,ja=ia+ha+1,ka=32,la=42,ma=69,na=73,oa=91,pa=103,qa=113,ra=666,sa=1,ta=2,ua=3,va=4,wa=3,xa=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xa(0,0,0,0,n),new xa(4,4,8,4,o),new xa(4,5,16,8,o),new xa(4,6,32,32,o),new xa(4,4,16,16,p),new xa(8,16,32,32,p),new xa(8,16,128,128,p),new xa(8,32,128,256,p),new xa(32,128,258,1024,p),new xa(32,258,258,4096,p)],b.deflateInit=y,b.deflateInit2=x,b.deflateReset=v,b.deflateResetKeep=u,b.deflateSetHeader=w,b.deflate=z,b.deflateEnd=A,b.deflateInfo="pako deflate (from Nodeca project)"},function(a,b){"use strict";var c="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;b.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},b.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var d={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},e={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};b.setTyped=function(a){a?(b.Buf8=Uint8Array,b.Buf16=Uint16Array,b.Buf32=Int32Array,b.assign(b,d)):(b.Buf8=Array,b.Buf16=Array,b.Buf32=Array,b.assign(b,e))},b.setTyped(c)},function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?ga[a]:ga[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ia[d]=c,a=0;a<1<<_[d];a++)ha[c++]=d;for(ha[c-1]=d,e=0,d=0;16>d;d++)for(ja[d]=e,a=0;a<1<>=7;R>d;d++)for(ja[d]=e<<7,a=0;a<1<=b;b++)f[b]=0;for(a=0;143>=a;)ea[2*a+1]=8,a++,f[8]++;for(;255>=a;)ea[2*a+1]=9,a++,f[9]++;for(;279>=a;)ea[2*a+1]=7,a++,f[7]++;for(;287>=a;)ea[2*a+1]=8,a++,f[8]++;for(l(ea,Q+1,f),a=0;R>a;a++)fa[2*a+1]=5,fa[2*a]=i(a,5);ka=new na(ea,_,P+1,Q,U),la=new na(fa,aa,0,R,U),ma=new na(new Array(0),ba,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++hh?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++jj){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*ca[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*ca[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pa||(m(),pa=!0),a.l_desc=new oa(a.dyn_ltree,ka),a.d_desc=new oa(a.dyn_dtree,la),a.bl_desc=new oa(a.bl_tree,ma),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,ea),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,ea,fa)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(ha[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=c(52),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],aa=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ba=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ca=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],da=512,ea=new Array(2*(Q+2));d(ea);var fa=new Array(2*R);d(fa);var ga=new Array(da);d(ga);var ha=new Array(N-M+1);d(ha);var ia=new Array(O);d(ia);var ja=new Array(R);d(ja);var ka,la,ma,na=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},oa=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pa=!1;b._tr_init=z,b._tr_stored_block=A,b._tr_flush_block=C,b._tr_tally=D,b._tr_align=B},function(a,b){"use strict";function c(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}a.exports=c},function(a,b){"use strict";function c(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function d(a,b,c,d){var f=e,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^f[255&(a^b[h])];return-1^a}var e=c();a.exports=d},function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(oa),b.distcode=b.distdyn=new r.Buf32(pa),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,ra)}function k(a){if(sa){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sa=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whaven;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Ba,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=la;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=la;break}if(m>>>=4,n-=4,wa=(15&m)+8,0===c.wbits)c.wbits=wa;else if(wa>c.wbits){a.msg="invalid window size",c.mode=la;break}c.dmax=1<n;){if(0===i)break a;i--,m+=e[g++]<>8&1),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,Ba[2]=m>>>16&255,Ba[3]=m>>>24&255,c.check=t(c.check,Ba,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>8),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wa=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wa)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.name+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.comment+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>=7&n,n-=7&n,c.mode=ia;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=ba,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=la}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<>>16^65535)){a.msg="invalid stored block lengths",c.mode=la;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=la;break}c.have=0,c.mode=_;case _:for(;c.haven;){if(0===i)break a;i--,m+=e[g++]<>>=3,n-=3}for(;c.have<19;)c.lens[Ca[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ya={bits:c.lenbits},xa=v(w,c.lens,0,19,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid code lengths set",c.mode=la;break}c.have=0,c.mode=aa;case aa:for(;c.have>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<sa)m>>>=qa,n-=qa,c.lens[c.have++]=sa;else{if(16===sa){for(za=qa+2;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,0===c.have){a.msg="invalid bit length repeat",c.mode=la;break}wa=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sa){for(za=qa+3;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,wa=0,q=3+(7&m),m>>>=3,n-=3}else{for(za=qa+7;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,wa=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=la;break}for(;q--;)c.lens[c.have++]=wa}}if(c.mode===la)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=la;break}if(c.lenbits=9,ya={bits:c.lenbits},xa=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid literal/lengths set",c.mode=la;break}if(c.distbits=6,c.distcode=c.distdyn,ya={bits:c.distbits},xa=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ya),c.distbits=ya.bits,xa){a.msg="invalid distances set",c.mode=la;break}if(c.mode=ba,b===B)break a;case ba:c.mode=ca;case ca:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Aa=c.lencode[m&(1<>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,c.length=sa,0===ra){c.mode=ha;break}if(32&ra){c.back=-1,c.mode=V;break}if(64&ra){a.msg="invalid literal/length code",c.mode=la;break}c.extra=15&ra,c.mode=da;case da:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=ea;case ea:for(;Aa=c.distcode[m&(1<>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,64&ra){a.msg="invalid distance code",c.mode=la;break}c.offset=sa,c.extra=15&ra,c.mode=fa;case fa:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=la;break}c.mode=ga;case ga:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=la;break}q>c.wnext?(q-=c.wnext,oa=c.wsize-q):oa=c.wnext-q,q>c.length&&(q=c.length),pa=c.window}else pa=f,oa=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pa[oa++];while(--q);0===c.length&&(c.mode=ca);break;case ha:if(0===j)break a;f[h++]=c.length,j--,c.mode=ca;break;case ia:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<n;){if(0===i)break a;i--,m+=e[g++]<q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<q&&(p+=B[f++]<>>=w,q-=w),15>q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<q&&(p+=B[f++]<q&&(p+=B[f++]<k){a.msg="invalid distance too far back",e.mode=c;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&e.sane){a.msg="invalid distance too far back",e.mode=c;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),e.hold=p,e.bits=q}},function(a,b,c){"use strict";var d=c(52),e=15,f=852,g=592,h=0,i=1,j=2,k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];a.exports=function(a,b,c,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new d.Buf16(e+1),Q=new d.Buf16(e+1),R=null,S=0;for(D=0;e>=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[c+E]]++;for(H=C,G=e;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;e>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===h||1!==G))return-1;for(Q[1]=0,D=1;e>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[c+E]&&(r[Q[b[c+E]]++]=E);if(a===h?(N=R=r,y=19):a===i?(N=k,O-=257,R=l,S-=257,y=256):(N=m,R=n,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<f||a===j&&L>g)return 1;for(var T=0;;){T++,z=D-J,r[E]y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[c+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<f||a===j&&L>g)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},function(a,b){a.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(a,b,c){(function(a,d){function e(a,c){var d={seen:[],stylize:g};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),p(c)?d.showHidden=c:c&&b._extend(d,c),v(d.showHidden)&&(d.showHidden=!1),v(d.depth)&&(d.depth=2),v(d.colors)&&(d.colors=!1),v(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=f),i(d,a,d.depth)}function f(a,b){var c=e.styles[b];return c?"["+e.colors[c][0]+"m"+a+"["+e.colors[c][1]+"m":a}function g(a,b){return a}function h(a){var b={};return a.forEach(function(a,c){b[a]=!0}),b}function i(a,c,d){if(a.customInspect&&c&&A(c.inspect)&&c.inspect!==b.inspect&&(!c.constructor||c.constructor.prototype!==c)){var e=c.inspect(d,a);return t(e)||(e=i(a,e,d)),e}var f=j(a,c);if(f)return f;var g=Object.keys(c),p=h(g);if(a.showHidden&&(g=Object.getOwnPropertyNames(c)),z(c)&&(g.indexOf("message")>=0||g.indexOf("description")>=0))return k(c);if(0===g.length){if(A(c)){var q=c.name?": "+c.name:"";return a.stylize("[Function"+q+"]","special")}if(w(c))return a.stylize(RegExp.prototype.toString.call(c),"regexp");if(y(c))return a.stylize(Date.prototype.toString.call(c),"date");if(z(c))return k(c)}var r="",s=!1,u=["{","}"];if(o(c)&&(s=!0,u=["[","]"]),A(c)){var v=c.name?": "+c.name:"";r=" [Function"+v+"]"}if(w(c)&&(r=" "+RegExp.prototype.toString.call(c)),y(c)&&(r=" "+Date.prototype.toUTCString.call(c)),z(c)&&(r=" "+k(c)),0===g.length&&(!s||0==c.length))return u[0]+r+u[1];if(0>d)return w(c)?a.stylize(RegExp.prototype.toString.call(c),"regexp"):a.stylize("[Object]","special");a.seen.push(c);var x;return x=s?l(a,c,d,p,g):g.map(function(b){return m(a,c,d,p,b,s)}),a.seen.pop(),n(x,r,u)}function j(a,b){if(v(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return s(b)?a.stylize(""+b,"number"):p(b)?a.stylize(""+b,"boolean"):q(b)?a.stylize("null","null"):void 0}function k(a){return"["+Error.prototype.toString.call(a)+"]"}function l(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)F(b,String(g))?f.push(m(a,b,c,d,String(g),!0)):f.push("");return e.forEach(function(e){e.match(/^\d+$/)||f.push(m(a,b,c,d,e,!0))}),f}function m(a,b,c,d,e,f){var g,h,j;if(j=Object.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?h=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(h=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),h||(a.seen.indexOf(j.value)<0?(h=q(c)?i(a,j.value,null):i(a,j.value,c-1),h.indexOf("\n")>-1&&(h=f?h.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+h.split("\n").map(function(a){return" "+a}).join("\n"))):h=a.stylize("[Circular]","special")),v(g)){if(f&&e.match(/^\d+$/))return h;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+h}function n(a,b,c){var d=0,e=a.reduce(function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function o(a){return Array.isArray(a)}function p(a){return"boolean"==typeof a}function q(a){return null===a}function r(a){return null==a}function s(a){return"number"==typeof a}function t(a){return"string"==typeof a}function u(a){return"symbol"==typeof a}function v(a){return void 0===a}function w(a){return x(a)&&"[object RegExp]"===C(a)}function x(a){return"object"==typeof a&&null!==a}function y(a){return x(a)&&"[object Date]"===C(a)}function z(a){return x(a)&&("[object Error]"===C(a)||a instanceof Error)}function A(a){return"function"==typeof a}function B(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),J[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=/%[sdj%]/g;b.format=function(a){if(!t(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(d[c++]);case"%d":return Number(d[c++]);case"%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),h=d[c];f>c;h=d[++c])g+=q(h)||!x(h)?" "+h:" "+e(h);return g},b.deprecate=function(c,e){function f(){if(!g){if(d.throwDeprecation)throw new Error(e);d.traceDeprecation?console.trace(e):console.error(e),g=!0}return c.apply(this,arguments)}if(v(a.process))return function(){return b.deprecate(c,e).apply(this,arguments)};if(d.noDeprecation===!0)return c;var g=!1;return f};var H,I={};b.debuglog=function(a){if(v(H)&&(H=d.env.NODE_DEBUG||""),a=a.toUpperCase(),!I[a])if(new RegExp("\\b"+a+"\\b","i").test(H)){var c=d.pid;I[a]=function(){var d=b.format.apply(b,arguments);console.error("%s %d: %s",a,c,d)}}else I[a]=function(){};return I[a]},b.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},b.isArray=o,b.isBoolean=p,b.isNull=q,b.isNullOrUndefined=r,b.isNumber=s,b.isString=t,b.isSymbol=u,b.isUndefined=v,b.isRegExp=w,b.isObject=x,b.isDate=y,b.isError=z,b.isFunction=A,b.isPrimitive=B,b.isBuffer=c(61);var J=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];b.log=function(){console.log("%s - %s",E(),b.format.apply(b,arguments))},b.inherits=c(62),b._extend=function(a,b){if(!b||!x(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}}).call(b,function(){return this}(),c(30))},function(a,b){a.exports=function(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.readUInt8}},function(a,b){"function"==typeof Object.create?a.exports=function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:a.exports=function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},function(a,b,c){function d(a,b){return n.isUndefined(b)?""+b:n.isNumber(b)&&!isFinite(b)?b.toString():n.isFunction(b)||n.isRegExp(b)?b.toString():b}function e(a,b){return n.isString(a)?a.length=0;f--)if(g[f]!=h[f])return!1;for(f=g.length-1;f>=0;f--)if(e=g[f],!i(a[e],b[e]))return!1;return!0}function l(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function m(a,b,c,d){var e;n.isString(c)&&(d=c,c=null);try{b()}catch(f){e=f}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&g(e,c,"Missing expected exception"+d),!a&&l(e,c)&&g(e,c,"Got unwanted exception"+d),a&&e&&c&&!l(e,c)||!a&&e)throw e}var n=c(60),o=Array.prototype.slice,p=Object.prototype.hasOwnProperty,q=a.exports=h;q.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,a.message?(this.message=a.message,this.generatedMessage=!1):(this.message=f(this),this.generatedMessage=!0);var b=a.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,b);else{var c=new Error;if(c.stack){var d=c.stack,e=b.name,h=d.indexOf("\n"+e);if(h>=0){var i=d.indexOf("\n",h+1);d=d.substring(i+1)}this.stack=d}}},n.inherits(q.AssertionError,Error),q.fail=g,q.ok=h,q.equal=function(a,b,c){a!=b&&g(a,b,c,"==",q.equal)},q.notEqual=function(a,b,c){a==b&&g(a,b,c,"!=",q.notEqual)},q.deepEqual=function(a,b,c){i(a,b)||g(a,b,c,"deepEqual",q.deepEqual)},q.notDeepEqual=function(a,b,c){i(a,b)&&g(a,b,c,"notDeepEqual",q.notDeepEqual)},q.strictEqual=function(a,b,c){a!==b&&g(a,b,c,"===",q.strictEqual)},q.notStrictEqual=function(a,b,c){a===b&&g(a,b,c,"!==",q.notStrictEqual)},q["throws"]=function(a,b,c){m.apply(this,[!0].concat(o.call(arguments)))},q.doesNotThrow=function(a,b){m.apply(this,[!1].concat(o.call(arguments)))},q.ifError=function(a){if(a)throw a};var r=Object.keys||function(a){var b=[];for(var c in a)p.call(a,c)&&b.push(c);return b}},function(a,b){(function(){var b;b=function(){function a(a,d){var e;this.document=a,null==d&&(d={}),this.size=d.size||"letter",this.layout=d.layout||"portrait","number"==typeof d.margin?this.margins={top:d.margin,left:d.margin,bottom:d.margin,right:d.margin}:this.margins=d.margins||b,e=Array.isArray(this.size)?this.size:c[this.size.toUpperCase()],this.width=e["portrait"===this.layout?0:1],this.height=e["portrait"===this.layout?1:0],this.content=this.document.ref(),this.resources=this.document.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"]}),Object.defineProperties(this,{fonts:{get:function(a){return function(){var b;return null!=(b=a.resources.data).Font?b.Font:b.Font={}}}(this)},xobjects:{get:function(a){return function(){var b;return null!=(b=a.resources.data).XObject?b.XObject:b.XObject={}}}(this)},ext_gstates:{get:function(a){return function(){var b;return null!=(b=a.resources.data).ExtGState?b.ExtGState:b.ExtGState={}}}(this)},patterns:{get:function(a){return function(){var b;return null!=(b=a.resources.data).Pattern?b.Pattern:b.Pattern={}}}(this)},annotations:{get:function(a){return function(){var b;return null!=(b=a.dictionary.data).Annots?b.Annots:b.Annots=[]}}(this)}}),this.dictionary=this.document.ref({Type:"Page",Parent:this.document._root.data.Pages,MediaBox:[0,0,this.width,this.height],Contents:this.content,Resources:this.resources})}var b,c;return a.prototype.maxY=function(){return this.height-this.margins.bottom},a.prototype.write=function(a){return this.content.write(a)},a.prototype.end=function(){return this.dictionary.end(),this.resources.end(),this.content.end()},b={top:72,left:72,bottom:72,right:72},c={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09], -EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]},a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f,g;g=c(66),b=g.PDFGradient,d=g.PDFLinearGradient,e=g.PDFRadialGradient,a.exports={initColor:function(){return this._opacityRegistry={},this._opacityCount=0,this._gradCount=0},_normalizeColor:function(a){var c,d;return a instanceof b?a:("string"==typeof a&&("#"===a.charAt(0)?(4===a.length&&(a=a.replace(/#([0-9A-F])([0-9A-F])([0-9A-F])/i,"#$1$1$2$2$3$3")),c=parseInt(a.slice(1),16),a=[c>>16,c>>8&255,255&c]):f[a]&&(a=f[a])),Array.isArray(a)?(3===a.length?a=function(){var b,c,e;for(e=[],b=0,c=a.length;c>b;b++)d=a[b],e.push(d/255);return e}():4===a.length&&(a=function(){var b,c,e;for(e=[],b=0,c=a.length;c>b;b++)d=a[b],e.push(d/100);return e}()),a):null)},_setColor:function(a,c){var d,e,f,g;return(a=this._normalizeColor(a))?(this._sMasked&&(d=this.ref({Type:"ExtGState",SMask:"None"}),d.end(),e="Gs"+ ++this._opacityCount,this.page.ext_gstates[e]=d,this.addContent("/"+e+" gs"),this._sMasked=!1),f=c?"SCN":"scn",a instanceof b?(this._setColorSpace("Pattern",c),a.apply(f)):(g=4===a.length?"DeviceCMYK":"DeviceRGB",this._setColorSpace(g,c),a=a.join(" "),this.addContent(""+a+" "+f)),!0):!1},_setColorSpace:function(a,b){var c;return c=b?"CS":"cs",this.addContent("/"+a+" "+c)},fillColor:function(a,b){var c;return null==b&&(b=1),c=this._setColor(a,!1),c&&this.fillOpacity(b),this._fillColor=[a,b],this},strokeColor:function(a,b){var c;return null==b&&(b=1),c=this._setColor(a,!0),c&&this.strokeOpacity(b),this},opacity:function(a){return this._doOpacity(a,a),this},fillOpacity:function(a){return this._doOpacity(a,null),this},strokeOpacity:function(a){return this._doOpacity(null,a),this},_doOpacity:function(a,b){var c,d,e,f,g;if(null!=a||null!=b)return null!=a&&(a=Math.max(0,Math.min(1,a))),null!=b&&(b=Math.max(0,Math.min(1,b))),e=""+a+"_"+b,this._opacityRegistry[e]?(g=this._opacityRegistry[e],c=g[0],f=g[1]):(c={Type:"ExtGState"},null!=a&&(c.ca=a),null!=b&&(c.CA=b),c=this.ref(c),c.end(),d=++this._opacityCount,f="Gs"+d,this._opacityRegistry[e]=[c,f]),this.page.ext_gstates[f]=c,this.addContent("/"+f+" gs")},linearGradient:function(a,b,c,e){return new d(this,a,b,c,e)},radialGradient:function(a,b,c,d,f,g){return new e(this,a,b,c,d,f,g)}},f={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}).call(this)},function(a,b){(function(){var b,c,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};b=function(){function a(a){this.doc=a,this.stops=[],this.embedded=!1,this.transform=[1,0,0,1,0,0],this._colorSpace="DeviceRGB"}return a.prototype.stop=function(a,b,c){return null==c&&(c=1),c=Math.max(0,Math.min(1,c)),this.stops.push([a,this.doc._normalizeColor(b),c]),this},a.prototype.embed=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J;if(!this.embedded&&0!==this.stops.length){for(this.embedded=!0,k=this.stops[this.stops.length-1],k[0]<1&&this.stops.push([1,k[1],k[2]]),a=[],d=[],C=[],j=E=0,H=this.stops.length-1;H>=0?H>E:E>H;j=H>=0?++E:--E)d.push(0,1),j+2!==this.stops.length&&a.push(this.stops[j+1][0]),e=this.doc.ref({FunctionType:2,Domain:[0,1],C0:this.stops[j+0][1],C1:this.stops[j+1][1],N:1}),C.push(e),e.end();if(1===C.length?e=C[0]:(e=this.doc.ref({FunctionType:3,Domain:[0,1],Functions:C,Bounds:a,Encode:d}),e.end()),this.id="Sh"+ ++this.doc._gradCount,l=this.doc._ctm.slice(),m=l[0],n=l[1],q=l[2],t=l[3],u=l[4],v=l[5],I=this.transform,o=I[0],p=I[1],r=I[2],s=I[3],b=I[4],c=I[5],l[0]=m*o+q*p,l[1]=n*o+t*p,l[2]=m*r+q*s,l[3]=n*r+t*s,l[4]=m*b+q*c+u,l[5]=n*b+t*c+v,A=this.shader(e),A.end(),x=this.doc.ref({Type:"Pattern",PatternType:2,Shading:A,Matrix:function(){var a,b,c;for(c=[],a=0,b=l.length;b>a;a++)D=l[a],c.push(+D.toFixed(5));return c}()}),this.doc.page.patterns[this.id]=x,x.end(),this.stops.some(function(a){return a[2]<1})){for(g=this.opacityGradient(),g._colorSpace="DeviceGray",J=this.stops,F=0,G=J.length;G>F;F++)B=J[F],g.stop(B[0],[B[2]]);g=g.embed(),h=this.doc.ref({Type:"Group",S:"Transparency",CS:"DeviceGray"}),h.end(),y=this.doc.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"],Shading:{Sh1:g.data.Shading}}),y.end(),f=this.doc.ref({Type:"XObject",Subtype:"Form",FormType:1,BBox:[0,0,this.doc.page.width,this.doc.page.height],Group:h,Resources:y}),f.end("/Sh1 sh"),z=this.doc.ref({Type:"Mask",S:"Luminosity",G:f}),z.end(),i=this.doc.ref({Type:"ExtGState",SMask:z}),this.opacity_id=++this.doc._opacityCount,w="Gs"+this.opacity_id,this.doc.page.ext_gstates[w]=i,i.end()}return x}},a.prototype.apply=function(a){return this.embedded||this.embed(),this.doc.addContent("/"+this.id+" "+a),this.opacity_id?(this.doc.addContent("/Gs"+this.opacity_id+" gs"),this.doc._sMasked=!0):void 0},a}(),c=function(a){function b(a,c,d,e,f){this.doc=a,this.x1=c,this.y1=d,this.x2=e,this.y2=f,b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.shader=function(a){return this.doc.ref({ShadingType:2,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.x2,this.y2],Function:a,Extend:[!0,!0]})},b.prototype.opacityGradient=function(){return new b(this.doc,this.x1,this.y1,this.x2,this.y2)},b}(b),d=function(a){function b(a,c,d,e,f,g,h){this.doc=a,this.x1=c,this.y1=d,this.r1=e,this.x2=f,this.y2=g,this.r2=h,b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.shader=function(a){return this.doc.ref({ShadingType:3,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.r1,this.x2,this.y2,this.r2],Function:a,Extend:[!0,!0]})},b.prototype.opacityGradient=function(){return new b(this.doc,this.x1,this.y1,this.r1,this.x2,this.y2,this.r2)},b}(b),a.exports={PDFGradient:b,PDFLinearGradient:c,PDFRadialGradient:d}}).call(this)},function(a,b,c){(function(){var b,d,e=[].slice;d=c(68),b=4*((Math.sqrt(2)-1)/3),a.exports={initVector:function(){return this._ctm=[1,0,0,1,0,0],this._ctmStack=[]},save:function(){return this._ctmStack.push(this._ctm.slice()),this.addContent("q")},restore:function(){return this._ctm=this._ctmStack.pop()||[1,0,0,1,0,0],this.addContent("Q")},closePath:function(){return this.addContent("h")},lineWidth:function(a){return this.addContent(""+a+" w")},_CAP_STYLES:{BUTT:0,ROUND:1,SQUARE:2},lineCap:function(a){return"string"==typeof a&&(a=this._CAP_STYLES[a.toUpperCase()]),this.addContent(""+a+" J")},_JOIN_STYLES:{MITER:0,ROUND:1,BEVEL:2},lineJoin:function(a){return"string"==typeof a&&(a=this._JOIN_STYLES[a.toUpperCase()]),this.addContent(""+a+" j")},miterLimit:function(a){return this.addContent(""+a+" M")},dash:function(a,b){var c,d,e;return null==b&&(b={}),null==a?this:(d=null!=(e=b.space)?e:a,c=b.phase||0,this.addContent("["+a+" "+d+"] "+c+" d"))},undash:function(){return this.addContent("[] 0 d")},moveTo:function(a,b){return this.addContent(""+a+" "+b+" m")},lineTo:function(a,b){return this.addContent(""+a+" "+b+" l")},bezierCurveTo:function(a,b,c,d,e,f){return this.addContent(""+a+" "+b+" "+c+" "+d+" "+e+" "+f+" c")},quadraticCurveTo:function(a,b,c,d){return this.addContent(""+a+" "+b+" "+c+" "+d+" v")},rect:function(a,b,c,d){return this.addContent(""+a+" "+b+" "+c+" "+d+" re")},roundedRect:function(a,b,c,d,e){return null==e&&(e=0),this.moveTo(a+e,b),this.lineTo(a+c-e,b),this.quadraticCurveTo(a+c,b,a+c,b+e),this.lineTo(a+c,b+d-e),this.quadraticCurveTo(a+c,b+d,a+c-e,b+d),this.lineTo(a+e,b+d),this.quadraticCurveTo(a,b+d,a,b+d-e),this.lineTo(a,b+e),this.quadraticCurveTo(a,b,a+e,b)},ellipse:function(a,c,d,e){var f,g,h,i,j,k;return null==e&&(e=d),a-=d,c-=e,f=d*b,g=e*b,h=a+2*d,j=c+2*e,i=a+d,k=c+e,this.moveTo(a,k),this.bezierCurveTo(a,k-g,i-f,c,i,c),this.bezierCurveTo(i+f,c,h,k-g,h,k),this.bezierCurveTo(h,k+g,i+f,j,i,j),this.bezierCurveTo(i-f,j,a,k+g,a,k),this.closePath()},circle:function(a,b,c){return this.ellipse(a,b,c)},polygon:function(){var a,b,c,d;for(b=1<=arguments.length?e.call(arguments,0):[],this.moveTo.apply(this,b.shift()),c=0,d=b.length;d>c;c++)a=b[c],this.lineTo.apply(this,a);return this.closePath()},path:function(a){return d.apply(this,a),this},_windingRule:function(a){return/even-?odd/.test(a)?"*":""},fill:function(a,b){return/(even-?odd)|(non-?zero)/.test(a)&&(b=a,a=null),a&&this.fillColor(a),this.addContent("f"+this._windingRule(b))},stroke:function(a){return a&&this.strokeColor(a),this.addContent("S")},fillAndStroke:function(a,b,c){var d;return null==b&&(b=a),d=/(even-?odd)|(non-?zero)/,d.test(a)&&(c=a,a=null),d.test(b)&&(c=b,b=a),a&&(this.fillColor(a),this.strokeColor(b)),this.addContent("B"+this._windingRule(c))},clip:function(a){return this.addContent("W"+this._windingRule(a)+" n")},transform:function(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o;return g=this._ctm,h=g[0],i=g[1],j=g[2],k=g[3],l=g[4],m=g[5],g[0]=h*a+j*b,g[1]=i*a+k*b,g[2]=h*c+j*d,g[3]=i*c+k*d,g[4]=h*e+j*f+l,g[5]=i*e+k*f+m,o=function(){var g,h,i,j;for(i=[a,b,c,d,e,f],j=[],g=0,h=i.length;h>g;g++)n=i[g],j.push(+n.toFixed(5));return j}().join(" "),this.addContent(""+o+" cm")},translate:function(a,b){return this.transform(1,0,0,1,a,b)},rotate:function(a,b){var c,d,e,f,g,h,i,j;return null==b&&(b={}),d=a*Math.PI/180,c=Math.cos(d),e=Math.sin(d),f=h=0,null!=b.origin&&(j=b.origin,f=j[0],h=j[1],g=f*c-h*e,i=f*e+h*c,f-=g,h-=i),this.transform(c,e,-e,c,f,h)},scale:function(a,b,c){var d,e,f;return null==b&&(b=a),null==c&&(c={}),2===arguments.length&&(b=a,c=b),d=e=0,null!=c.origin&&(f=c.origin,d=f[0],e=f[1],d-=a*d,e-=b*e),this.transform(a,0,0,b,d,e)}}}).call(this)},function(a,b){(function(){var b;b=function(){function a(){}var b,c,d,e,f,g,h,i,j,k,l,m,n;return a.apply=function(a,c){var d;return d=g(c),b(d,a)},f={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},g=function(a){var b,c,d,e,g,h,i,j,k;for(i=[],b=[],e="",g=!1,h=0,j=0,k=a.length;k>j;j++)if(c=a[j],null!=f[c])h=f[c],d&&(e.length>0&&(b[b.length]=+e),i[i.length]={cmd:d,args:b},b=[],e="",g=!1),d=c;else if(" "===c||","===c||"-"===c&&e.length>0&&"e"!==e[e.length-1]||"."===c&&g){if(0===e.length)continue;b.length===h?(i[i.length]={cmd:d,args:b},b=[+e],"M"===d&&(d="L"),"m"===d&&(d="l")):b[b.length]=+e,g="."===c,e="-"===c||"."===c?c:""}else e+=c,"."===c&&(g=!0);return e.length>0&&(b.length===h?(i[i.length]={cmd:d,args:b},b=[+e],"M"===d&&(d="L"),"m"===d&&(d="l")):b[b.length]=+e),i[i.length]={cmd:d,args:b},i},d=e=h=i=m=n=0,b=function(a,b){var c,f,g,k,l;for(d=e=h=i=m=n=0,f=g=0,k=a.length;k>g;f=++g)c=a[f],"function"==typeof j[l=c.cmd]&&j[l](b,c.args);return d=e=h=i=0},j={M:function(a,b){return d=b[0],e=b[1],h=i=null,m=d,n=e,a.moveTo(d,e)},m:function(a,b){return d+=b[0],e+=b[1],h=i=null,m=d,n=e,a.moveTo(d,e)},C:function(a,b){return d=b[4],e=b[5],h=b[2],i=b[3],a.bezierCurveTo.apply(a,b)},c:function(a,b){return a.bezierCurveTo(b[0]+d,b[1]+e,b[2]+d,b[3]+e,b[4]+d,b[5]+e),h=d+b[2],i=e+b[3],d+=b[4],e+=b[5]},S:function(a,b){return null===h&&(h=d,i=e),a.bezierCurveTo(d-(h-d),e-(i-e),b[0],b[1],b[2],b[3]),h=b[0],i=b[1],d=b[2],e=b[3]},s:function(a,b){return null===h&&(h=d,i=e),a.bezierCurveTo(d-(h-d),e-(i-e),d+b[0],e+b[1],d+b[2],e+b[3]),h=d+b[0],i=e+b[1],d+=b[2],e+=b[3]},Q:function(a,b){return h=b[0],i=b[1],d=b[2],e=b[3],a.quadraticCurveTo(b[0],b[1],d,e)},q:function(a,b){return a.quadraticCurveTo(b[0]+d,b[1]+e,b[2]+d,b[3]+e),h=d+b[0],i=e+b[1],d+=b[2],e+=b[3]},T:function(a,b){return null===h?(h=d,i=e):(h=d-(h-d),i=e-(i-e)),a.quadraticCurveTo(h,i,b[0],b[1]),h=d-(h-d),i=e-(i-e),d=b[0],e=b[1]},t:function(a,b){return null===h?(h=d,i=e):(h=d-(h-d),i=e-(i-e)),a.quadraticCurveTo(h,i,d+b[0],e+b[1]),d+=b[0],e+=b[1]},A:function(a,b){return l(a,d,e,b),d=b[5],e=b[6]},a:function(a,b){return b[5]+=d,b[6]+=e,l(a,d,e,b),d=b[5],e=b[6]},L:function(a,b){return d=b[0],e=b[1],h=i=null,a.lineTo(d,e)},l:function(a,b){return d+=b[0],e+=b[1],h=i=null,a.lineTo(d,e)},H:function(a,b){return d=b[0],h=i=null,a.lineTo(d,e)},h:function(a,b){return d+=b[0],h=i=null,a.lineTo(d,e)},V:function(a,b){return e=b[0],h=i=null,a.lineTo(d,e)},v:function(a,b){return e+=b[0],h=i=null,a.lineTo(d,e)},Z:function(a){return a.closePath(),d=m,e=n},z:function(a){return a.closePath(),d=m,e=n}},l=function(a,b,d,e){var f,g,h,i,j,l,m,n,o,p,q,r,s;for(l=e[0],m=e[1],j=e[2],i=e[3],p=e[4],g=e[5],h=e[6],o=c(g,h,l,m,i,p,j,b,d),s=[],q=0,r=o.length;r>q;q++)n=o[q],f=k.apply(null,n),s.push(a.bezierCurveTo.apply(a,f));return s},c=function(a,b,c,d,e,f,g,j,k){var l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K;for(y=g*(Math.PI/180),x=Math.sin(y),p=Math.cos(y),c=Math.abs(c),d=Math.abs(d),h=p*(j-a)*.5+x*(k-b)*.5,i=p*(k-b)*.5-x*(j-a)*.5,s=h*h/(c*c)+i*i/(d*d),s>1&&(s=Math.sqrt(s),c*=s,d*=s),l=p/c,m=x/c,n=-x/d,o=p/d,E=l*j+m*k,H=n*j+o*k,F=l*a+m*b,I=n*a+o*b,q=(F-E)*(F-E)+(I-H)*(I-H),w=1/q-.25,0>w&&(w=0),v=Math.sqrt(w),f===e&&(v=-v),G=.5*(E+F)-v*(I-H),J=.5*(H+I)+v*(F-E),z=Math.atan2(H-J,E-G),A=Math.atan2(I-J,F-G),D=A-z,0>D&&1===f?D+=2*Math.PI:D>0&&0===f&&(D-=2*Math.PI),u=Math.ceil(Math.abs(D/(.5*Math.PI+.001))),t=[],r=K=0;u>=0?u>K:K>u;r=u>=0?++K:--K)B=z+r*D/u,C=z+(r+1)*D/u,t[r]=[G,J,B,C,c,d,x,p];return t},k=function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q,r,s,t;return i=h*e,j=-g*f,k=g*e,l=h*f,n=.5*(d-c),m=8/3*Math.sin(.5*n)*Math.sin(.5*n)/Math.sin(n),o=a+Math.cos(c)-m*Math.sin(c),r=b+Math.sin(c)+m*Math.cos(c),q=a+Math.cos(d),t=b+Math.sin(d),p=q+m*Math.sin(d),s=t-m*Math.cos(d),[i*o+j*r,k*o+l*r,i*p+j*s,k*p+l*s,i*q+j*t,k*q+l*t]},a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b;b=c(70),a.exports={initFonts:function(){this._fontFamilies={},this._fontCount=0,this._fontSize=12,this._font=null,this._registeredFonts={}},font:function(a,c,d){var e,f,g,h;return"number"==typeof c&&(d=c,c=null),"string"==typeof a&&this._registeredFonts[a]?(e=a,h=this._registeredFonts[a],a=h.src,c=h.family):(e=c||a,"string"!=typeof e&&(e=null)),null!=d&&this.fontSize(d),(f=this._fontFamilies[e])?(this._font=f,this):(g="F"+ ++this._fontCount,this._font=new b(this,a,c,g),(f=this._fontFamilies[this._font.name])?(this._font=f,this):(e&&(this._fontFamilies[e]=this._font),this._fontFamilies[this._font.name]=this._font,this))},fontSize:function(a){return this._fontSize=a,this},currentLineHeight:function(a){return null==a&&(a=!1),this._font.lineHeight(this._fontSize,a)},registerFont:function(a,b,c){return this._registeredFonts[a]={src:b,family:c},this}}}).call(this)},function(a,b,c){(function(b,d){(function(){var e,f,g,h,i;h=c(71),e=c(87),g=c(88),i=c(44),f=function(){function a(a,d,f,i){if(this.document=a,this.id=i,"string"==typeof d){if(d in c)return this.isAFM=!0,this.font=new e(c[d]()),void this.registerAFM(d);if(/\.(ttf|ttc)$/i.test(d))this.font=h.open(d,f);else{if(!/\.dfont$/i.test(d))throw new Error("Not a supported font format or standard PDF font.");this.font=h.fromDFont(d,f)}}else if(b.isBuffer(d))this.font=h.fromBuffer(d,f);else if(d instanceof Uint8Array)this.font=h.fromBuffer(new b(d),f);else{if(!(d instanceof ArrayBuffer))throw new Error("Not a supported font format or standard PDF font.");this.font=h.fromBuffer(new b(new Uint8Array(d)),f)}this.subset=new g(this.font),this.registerTTF()}var c,f;return c={Courier:function(){return i.readFileSync(d+"/font/data/Courier.afm","utf8")},"Courier-Bold":function(){return i.readFileSync(d+"/font/data/Courier-Bold.afm","utf8")},"Courier-Oblique":function(){return i.readFileSync(d+"/font/data/Courier-Oblique.afm","utf8")},"Courier-BoldOblique":function(){return i.readFileSync(d+"/font/data/Courier-BoldOblique.afm","utf8")},Helvetica:function(){return i.readFileSync(d+"/font/data/Helvetica.afm","utf8")},"Helvetica-Bold":function(){return i.readFileSync(d+"/font/data/Helvetica-Bold.afm","utf8")},"Helvetica-Oblique":function(){return i.readFileSync(d+"/font/data/Helvetica-Oblique.afm","utf8")},"Helvetica-BoldOblique":function(){return i.readFileSync(d+"/font/data/Helvetica-BoldOblique.afm","utf8")},"Times-Roman":function(){return i.readFileSync(d+"/font/data/Times-Roman.afm","utf8")},"Times-Bold":function(){return i.readFileSync(d+"/font/data/Times-Bold.afm","utf8")},"Times-Italic":function(){return i.readFileSync(d+"/font/data/Times-Italic.afm","utf8")},"Times-BoldItalic":function(){return i.readFileSync(d+"/font/data/Times-BoldItalic.afm","utf8")},Symbol:function(){return i.readFileSync(d+"/font/data/Symbol.afm","utf8")},ZapfDingbats:function(){return i.readFileSync(d+"/font/data/ZapfDingbats.afm","utf8")}},a.prototype.use=function(a){var b;return null!=(b=this.subset)?b.use(a):void 0},a.prototype.embed=function(){return this.embedded||null==this.dictionary?void 0:(this.isAFM?this.embedAFM():this.embedTTF(),this.embedded=!0)},a.prototype.encode=function(a){var b;return this.isAFM?this.font.encodeText(a):(null!=(b=this.subset)?b.encodeText(a):void 0)||a},a.prototype.ref=function(){return null!=this.dictionary?this.dictionary:this.dictionary=this.document.ref()},a.prototype.registerTTF=function(){var a,b,c,d,e;if(this.name=this.font.name.postscriptName,this.scaleFactor=1e3/this.font.head.unitsPerEm,this.bbox=function(){var b,c,d,e;for(d=this.font.bbox,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(Math.round(a*this.scaleFactor));return e}.call(this),this.stemV=0,this.font.post.exists?(d=this.font.post.italic_angle,b=d>>16,c=255&d,b&!0&&(b=-((65535^b)+1)),this.italicAngle=+(""+b+"."+c)):this.italicAngle=0,this.ascender=Math.round(this.font.ascender*this.scaleFactor),this.decender=Math.round(this.font.decender*this.scaleFactor),this.lineGap=Math.round(this.font.lineGap*this.scaleFactor),this.capHeight=this.font.os2.exists&&this.font.os2.capHeight||this.ascender,this.xHeight=this.font.os2.exists&&this.font.os2.xHeight||0,this.familyClass=(this.font.os2.exists&&this.font.os2.familyClass||0)>>8,this.isSerif=1===(e=this.familyClass)||2===e||3===e||4===e||5===e||7===e,this.isScript=10===this.familyClass,this.flags=0,this.font.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.font.cmap.unicode)throw new Error("No unicode cmap for font")},a.prototype.embedTTF=function(){var a,b,c,d,e,g,h,i;return d=this.subset.encode(),h=this.document.ref(),h.write(d),h.data.Length1=h.uncompressedLength,h.end(),e=this.document.ref({Type:"FontDescriptor",FontName:this.subset.postscriptName,FontFile2:h,FontBBox:this.bbox,Flags:this.flags,StemV:this.stemV,ItalicAngle:this.italicAngle,Ascent:this.ascender,Descent:this.decender,CapHeight:this.capHeight,XHeight:this.xHeight}),e.end(),g=+Object.keys(this.subset.cmap)[0],a=function(){var a,b;a=this.subset.cmap,b=[];for(c in a)i=a[c],b.push(Math.round(this.font.widthOfGlyph(i)));return b}.call(this),b=this.document.ref(),b.end(f(this.subset.subset)),this.dictionary.data={Type:"Font",BaseFont:this.subset.postscriptName,Subtype:"TrueType",FontDescriptor:e,FirstChar:g,LastChar:g+a.length-1,Widths:a,Encoding:"MacRomanEncoding",ToUnicode:b},this.dictionary.end()},f=function(a){var b,c,d,e,f,g,h;for(f="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<00>\nendcodespacerange",c=Object.keys(a).sort(function(a,b){return a-b}),d=[],g=0,h=c.length;h>g;g++)b=c[g],d.length>=100&&(f+="\n"+d.length+" beginbfchar\n"+d.join("\n")+"\nendbfchar",d=[]),e=("0000"+a[b].toString(16)).slice(-4),b=(+b).toString(16),d.push("<"+b+"><"+e+">");return d.length&&(f+="\n"+d.length+" beginbfchar\n"+d.join("\n")+"\nendbfchar\n"),f+="endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"},a.prototype.registerAFM=function(a){var b;return this.name=a,b=this.font,this.ascender=b.ascender,this.decender=b.decender,this.bbox=b.bbox,this.lineGap=b.lineGap,b},a.prototype.embedAFM=function(){return this.dictionary.data={Type:"Font",BaseFont:this.name,Subtype:"Type1",Encoding:"WinAnsiEncoding"},this.dictionary.end()},a.prototype.widthOfString=function(a,b){var c,d,e,f,g,h;for(a=""+a,f=0,d=g=0,h=a.length;h>=0?h>g:g>h;d=h>=0?++g:--g)c=a.charCodeAt(d),f+=this.font.widthOfGlyph(this.font.characterToGlyph(c))||0;return e=b/1e3,f*e},a.prototype.lineHeight=function(a,b){var c;return null==b&&(b=!1),c=b?this.lineGap:0,(this.ascender+c-this.decender)/1e3*a},a}(),a.exports=f}).call(this)}).call(b,c(2).Buffer,"/")},function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l,m,n,o,p,q;q=c(44),e=c(72),d=c(73),f=c(74),m=c(75),h=c(78),b=c(79),j=c(80),i=c(81),l=c(82),o=c(83),n=c(84),k=c(85),g=c(86),p=function(){function a(a,b){var c,d,f,g,h,i,j,k,l;if(this.rawData=a,c=this.contents=new e(this.rawData),"ttcf"===c.readString(4)){if(!b)throw new Error("Must specify a font name for TTC files.");for(i=c.readInt(),f=c.readInt(),h=[],d=j=0;f>=0?f>j:j>f;d=f>=0?++j:--j)h[d]=c.readInt();for(d=k=0,l=h.length;l>k;d=++k)if(g=h[d],c.pos=g,this.parse(),this.name.postscriptName===b)return;throw new Error("Font "+b+" not found in TTC file.")}c.pos=0,this.parse()}return a.open=function(b,c){var d;return d=q.readFileSync(b),new a(d,c)},a.fromDFont=function(b,c){var e;return e=d.open(b),new a(e.getNamedFont(c))},a.fromBuffer=function(b,c){var e,f,g;try{if(g=new a(b,c),!(g.head.exists&&g.name.exists&&g.cmap.exists||(e=new d(b),g=new a(e.getNamedFont(c)),g.head.exists&&g.name.exists&&g.cmap.exists)))throw new Error("Invalid TTF file in DFont");return g}catch(h){throw f=h,new Error("Unknown font format in buffer: "+f.message)}},a.prototype.parse=function(){return this.directory=new f(this.contents),this.head=new h(this),this.name=new m(this),this.cmap=new b(this),this.hhea=new i(this),this.maxp=new l(this),this.hmtx=new j(this),this.post=new o(this),this.os2=new n(this),this.loca=new k(this),this.glyf=new g(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},a.prototype.characterToGlyph=function(a){var b;return(null!=(b=this.cmap.unicode)?b.codeMap[a]:void 0)||0},a.prototype.widthOfGlyph=function(a){var b;return b=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(a).advance*b},a}(),a.exports=p}).call(this)},function(a,b){(function(){var b;b=function(){function a(a){this.data=null!=a?a:[],this.pos=0,this.length=this.data.length}return a.prototype.readByte=function(){return this.data[this.pos++]},a.prototype.writeByte=function(a){return this.data[this.pos++]=a},a.prototype.byteAt=function(a){return this.data[a]},a.prototype.readBool=function(){return!!this.readByte()},a.prototype.writeBool=function(a){return this.writeByte(a?1:0)},a.prototype.readUInt32=function(){var a,b,c,d;return a=16777216*this.readByte(),b=this.readByte()<<16,c=this.readByte()<<8,d=this.readByte(),a+b+c+d},a.prototype.writeUInt32=function(a){return this.writeByte(a>>>24&255),this.writeByte(a>>16&255),this.writeByte(a>>8&255),this.writeByte(255&a)},a.prototype.readInt32=function(){var a;return a=this.readUInt32(),a>=2147483648?a-4294967296:a},a.prototype.writeInt32=function(a){return 0>a&&(a+=4294967296),this.writeUInt32(a)},a.prototype.readUInt16=function(){var a,b;return a=this.readByte()<<8,b=this.readByte(),a|b},a.prototype.writeUInt16=function(a){return this.writeByte(a>>8&255),this.writeByte(255&a)},a.prototype.readInt16=function(){var a;return a=this.readUInt16(),a>=32768?a-65536:a},a.prototype.writeInt16=function(a){return 0>a&&(a+=65536),this.writeUInt16(a)},a.prototype.readString=function(a){var b,c,d;for(c=[],b=d=0;a>=0?a>d:d>a;b=a>=0?++d:--d)c[b]=String.fromCharCode(this.readByte());return c.join("")},a.prototype.writeString=function(a){var b,c,d,e;for(e=[],b=c=0,d=a.length;d>=0?d>c:c>d;b=d>=0?++c:--c)e.push(this.writeByte(a.charCodeAt(b)));return e},a.prototype.stringAt=function(a,b){return this.pos=a,this.readString(b)},a.prototype.readShort=function(){return this.readInt16()},a.prototype.writeShort=function(a){return this.writeInt16(a)},a.prototype.readLongLong=function(){var a,b,c,d,e,f,g,h;return a=this.readByte(),b=this.readByte(),c=this.readByte(),d=this.readByte(),e=this.readByte(),f=this.readByte(),g=this.readByte(),h=this.readByte(),128&a?-1*(72057594037927940*(255^a)+281474976710656*(255^b)+1099511627776*(255^c)+4294967296*(255^d)+16777216*(255^e)+65536*(255^f)+256*(255^g)+(255^h)+1):72057594037927940*a+281474976710656*b+1099511627776*c+4294967296*d+16777216*e+65536*f+256*g+h},a.prototype.writeLongLong=function(a){var b,c;return b=Math.floor(a/4294967296),c=4294967295&a,this.writeByte(b>>24&255),this.writeByte(b>>16&255),this.writeByte(b>>8&255),this.writeByte(255&b),this.writeByte(c>>24&255),this.writeByte(c>>16&255),this.writeByte(c>>8&255),this.writeByte(255&c)},a.prototype.readInt=function(){return this.readInt32()},a.prototype.writeInt=function(a){return this.writeInt32(a)},a.prototype.slice=function(a,b){return this.data.slice(a,b)},a.prototype.read=function(a){var b,c,d;for(b=[],c=d=0;a>=0?a>d:d>a;c=a>=0?++d:--d)b.push(this.readByte());return b},a.prototype.write=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;d>c;c++)b=a[c],e.push(this.writeByte(b));return e},a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f,g;g=c(44),d=c(72),e=c(74),f=c(75),b=function(){function a(a){this.contents=new d(a),this.parse(this.contents)}return a.open=function(b){var c;return c=g.readFileSync(b),new a(c)},a.prototype.parse=function(a){var b,c,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G;for(j=a.readInt(),u=a.readInt(),i=a.readInt(),t=a.readInt(),this.map={},a.pos=u+24,E=a.readShort()+u,y=a.readShort()+u,a.pos=E,v=a.readShort(),o=F=0;v>=F;o=F+=1){for(D=a.readString(4),w=a.readShort(),C=a.readShort(),this.map[D]={list:[],named:{}},B=a.pos,a.pos=E+C,q=G=0;w>=G;q=G+=1)p=a.readShort(),z=a.readShort(),b=a.readByte(),c=a.readByte()<<16,g=a.readByte()<<8,h=a.readByte(),k=j+(0|c|g|h),n=a.readUInt32(),l={id:p,attributes:b,offset:k,handle:n},A=a.pos,-1!==z&&u+t>y+z?(a.pos=y+z,r=a.readByte(),l.name=a.readString(r)):"sfnt"===D&&(a.pos=l.offset,s=a.readUInt32(),m={},m.contents=new d(a.slice(a.pos,a.pos+s)),m.directory=new e(m.contents),x=new f(m),l.name=x.fontName[0].raw),a.pos=A,this.map[D].list.push(l),l.name&&(this.map[D].named[l.name]=l);a.pos=B}},a.prototype.getNamedFont=function(a){var b,c,d,e,f,g;if(b=this.contents,e=b.pos,c=null!=(g=this.map.sfnt)?g.named[a]:void 0,!c)throw new Error("Font "+a+" not found in DFont file.");return b.pos=c.offset,d=b.readUInt32(),f=b.slice(b.pos,b.pos+d),b.pos=e,f},a}(),a.exports=b}).call(this)},function(a,b,c){(function(b){(function(){var d,e,f=[].slice;d=c(72),e=function(){function a(a){var b,c,d,e;for(this.scalarType=a.readInt(),this.tableCount=a.readShort(),this.searchRange=a.readShort(),this.entrySelector=a.readShort(),this.rangeShift=a.readShort(),this.tables={},c=d=0,e=this.tableCount;e>=0?e>d:d>e;c=e>=0?++d:--d)b={tag:a.readString(4),checksum:a.readInt(),offset:a.readInt(),length:a.readInt()},this.tables[b.tag]=b}var c;return a.prototype.encode=function(a){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;p=Object.keys(a).length,j=Math.log(2),m=16*Math.floor(Math.log(p)/j),h=Math.floor(m/j),l=16*p-m,f=new d,f.writeInt(this.scalarType),f.writeShort(p),f.writeShort(m),f.writeShort(h),f.writeShort(l),g=16*p,k=f.pos+g,i=null,q=[];for(r in a)for(o=a[r],f.writeString(r),f.writeInt(c(o)),f.writeInt(k),f.writeInt(o.length),q=q.concat(o),"head"===r&&(i=k),k+=o.length;k%4;)q.push(0),k++;return f.write(q),n=c(f.data),e=2981146554-n,f.pos=i+8,f.writeUInt32(e),new b(f.data)},c=function(a){var b,c,e,g,h;for(a=f.call(a);a.length%4;)a.push(0);for(e=new d(a),c=0,b=g=0,h=a.length;h>g;b=g+=4)c+=e.readUInt32();return 4294967295&c},a}(),a.exports=e}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(){var b,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};f=c(76),b=c(72),g=c(77),e=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}var e;return i(c,a),c.prototype.tag="name",c.prototype.parse=function(a){var b,c,e,f,g,h,i,j,k,l,m,n,o;for(a.pos=this.offset,f=a.readShort(),b=a.readShort(),i=a.readShort(),c=[],g=l=0;b>=0?b>l:l>b;g=b>=0?++l:--l)c.push({platformID:a.readShort(),encodingID:a.readShort(),languageID:a.readShort(),nameID:a.readShort(),length:a.readShort(),offset:this.offset+i+a.readShort()});for(j={},g=m=0,n=c.length;n>m;g=++m)e=c[g],a.pos=e.offset,k=a.readString(e.length),h=new d(k,e),null==j[o=e.nameID]&&(j[o]=[]),j[e.nameID].push(h);return this.strings=j,this.copyright=j[0],this.fontFamily=j[1],this.fontSubfamily=j[2],this.uniqueSubfamily=j[3],this.fontName=j[4],this.version=j[5],this.postscriptName=j[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,""), -this.trademark=j[7],this.manufacturer=j[8],this.designer=j[9],this.description=j[10],this.vendorUrl=j[11],this.designerUrl=j[12],this.license=j[13],this.licenseUrl=j[14],this.preferredFamily=j[15],this.preferredSubfamily=j[17],this.compatibleFull=j[18],this.sampleText=j[19]},e="AAAAAA",c.prototype.encode=function(){var a,c,f,h,i,j,k,l,m,n,o,p,q,r;m={},r=this.strings;for(a in r)o=r[a],m[a]=o;i=new d(""+e+"+"+this.postscriptName,{platformID:1,encodingID:0,languageID:0}),m[6]=[i],e=g.successorOf(e),j=0;for(a in m)c=m[a],null!=c&&(j+=c.length);n=new b,k=new b,n.writeShort(0),n.writeShort(j),n.writeShort(6+12*j);for(f in m)if(c=m[f],null!=c)for(p=0,q=c.length;q>p;p++)l=c[p],n.writeShort(l.platformID),n.writeShort(l.encodingID),n.writeShort(l.languageID),n.writeShort(f),n.writeShort(l.length),n.writeShort(k.pos),k.writeString(l.raw);return h={postscriptName:i.raw,table:n.data.concat(k.data)}},c}(f),a.exports=e,d=function(){function a(a,b){this.raw=a,this.length=this.raw.length,this.platformID=b.platformID,this.encodingID=b.encodingID,this.languageID=b.languageID}return a}()}).call(this)},function(a,b){(function(){var b;b=function(){function a(a){var b;this.file=a,b=this.file.directory.tables[this.tag],this.exists=!!b,b&&(this.offset=b.offset,this.length=b.length,this.parse(this.file.contents))}return a.prototype.parse=function(){},a.prototype.encode=function(){},a.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},a}(),a.exports=b}).call(this)},function(a,b){(function(){b.successorOf=function(a){var b,c,d,e,f,g,h,i,j,k;for(c="abcdefghijklmnopqrstuvwxyz",i=c.length,k=a,e=a.length;e>=0;){if(h=a.charAt(--e),isNaN(h)){if(f=c.indexOf(h.toLowerCase()),-1===f)j=h,d=!0;else if(j=c.charAt((f+1)%i),g=h===h.toUpperCase(),g&&(j=j.toUpperCase()),d=f+1>=i,d&&0===e){b=g?"A":"a",k=b+j+k.slice(1);break}}else if(j=+h+1,d=j>9,d&&(j=0),d&&0===e){k="1"+j+k.slice(1);break}if(k=k.slice(0,e)+j+k.slice(e+1),!d)break}return k},b.invert=function(a){var b,c,d;c={};for(b in a)d=a[b],c[d]=b;return c}}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="head",c.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.revision=a.readInt(),this.checkSumAdjustment=a.readInt(),this.magicNumber=a.readInt(),this.flags=a.readShort(),this.unitsPerEm=a.readShort(),this.created=a.readLongLong(),this.modified=a.readLongLong(),this.xMin=a.readShort(),this.yMin=a.readShort(),this.xMax=a.readShort(),this.yMax=a.readShort(),this.macStyle=a.readShort(),this.lowestRecPPEM=a.readShort(),this.fontDirectionHint=a.readShort(),this.indexToLocFormat=a.readShort(),this.glyphDataFormat=a.readShort()},c.prototype.encode=function(a){var c;return c=new b,c.writeInt(this.version),c.writeInt(this.revision),c.writeInt(this.checkSumAdjustment),c.writeInt(this.magicNumber),c.writeShort(this.flags),c.writeShort(this.unitsPerEm),c.writeLongLong(this.created),c.writeLongLong(this.modified),c.writeShort(this.xMin),c.writeShort(this.yMin),c.writeShort(this.xMax),c.writeShort(this.yMax),c.writeShort(this.macStyle),c.writeShort(this.lowestRecPPEM),c.writeShort(this.fontDirectionHint),c.writeShort(a.type),c.writeShort(this.glyphDataFormat),c.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f,g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};f=c(76),e=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return h(c,a),c.prototype.tag="cmap",c.prototype.parse=function(a){var c,d,e,f;for(a.pos=this.offset,this.version=a.readUInt16(),e=a.readUInt16(),this.tables=[],this.unicode=null,d=f=0;e>=0?e>f:f>e;d=e>=0?++f:--f)c=new b(a,this.offset),this.tables.push(c),c.isUnicode&&null==this.unicode&&(this.unicode=c);return!0},c.encode=function(a,c){var d,f;return null==c&&(c="macroman"),d=b.encode(a,c),f=new e,f.writeUInt16(0),f.writeUInt16(1),d.table=f.data.concat(d.subtable),d},c}(f),b=function(){function a(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;switch(this.platformID=a.readUInt16(),this.encodingID=a.readShort(),this.offset=b+a.readInt(),l=a.pos,a.pos=this.offset,this.format=a.readUInt16(),this.length=a.readUInt16(),this.language=a.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(h=r=0;256>r;h=++r)this.codeMap[h]=a.readByte();break;case 4:for(n=a.readUInt16(),m=n/2,a.pos+=6,e=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),a.pos+=2,p=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),i=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),j=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),d=(this.length-a.pos+this.offset)/2,g=function(){var b,c;for(c=[],h=b=0;d>=0?d>b:b>d;h=d>=0?++b:--b)c.push(a.readUInt16());return c}(),h=s=0,u=e.length;u>s;h=++s)for(q=e[h],o=p[h],c=t=o;q>=o?q>=t:t>=q;c=q>=o?++t:--t)0===j[h]?f=c+i[h]:(k=j[h]/2+(c-o)-(m-h),f=g[k]||0,0!==f&&(f+=i[h])),this.codeMap[c]=65535&f}a.pos=l}return a.encode=function(a,b){var c,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X;switch(F=new e,g=Object.keys(a).sort(function(a,b){return a-b}),b){case"macroman":for(p=0,q=function(){var a,b;for(b=[],o=a=0;256>a;o=++a)b.push(0);return b}(),s={0:0},f={},G=0,K=g.length;K>G;G++)d=g[G],null==s[U=a[d]]&&(s[U]=++p),f[d]={old:a[d],"new":s[a[d]]},q[d]=s[a[d]];return F.writeUInt16(1),F.writeUInt16(0),F.writeUInt32(12),F.writeUInt16(0),F.writeUInt16(262),F.writeUInt16(0),F.write(q),y={charMap:f,subtable:F.data,maxGlyphID:p+1};case"unicode":for(D=[],l=[],t=0,s={},c={},r=j=null,H=0,L=g.length;L>H;H++)d=g[H],v=a[d],null==s[v]&&(s[v]=++t),c[d]={old:v,"new":s[v]},h=s[v]-d,(null==r||h!==j)&&(r&&l.push(r),D.push(d),j=h),r=d;for(r&&l.push(r),l.push(65535),D.push(65535),A=D.length,B=2*A,z=2*Math.pow(Math.log(A)/Math.LN2,2),m=Math.log(z/2)/Math.LN2,x=2*A-z,i=[],w=[],n=[],o=I=0,M=D.length;M>I;o=++I){if(C=D[o],k=l[o],65535===C){i.push(0),w.push(0);break}if(E=c[C]["new"],C-E>=32768)for(i.push(0),w.push(2*(n.length+A-o)),d=J=C;k>=C?k>=J:J>=k;d=k>=C?++J:--J)n.push(c[d]["new"]);else i.push(E-C),w.push(0)}for(F.writeUInt16(3),F.writeUInt16(1),F.writeUInt32(12),F.writeUInt16(4),F.writeUInt16(16+8*A+2*n.length),F.writeUInt16(0),F.writeUInt16(B),F.writeUInt16(z),F.writeUInt16(m),F.writeUInt16(x),S=0,N=l.length;N>S;S++)d=l[S],F.writeUInt16(d);for(F.writeUInt16(0),T=0,O=D.length;O>T;T++)d=D[T],F.writeUInt16(d);for(V=0,P=i.length;P>V;V++)h=i[V],F.writeUInt16(h);for(W=0,Q=w.length;Q>W;W++)u=w[W],F.writeUInt16(u);for(X=0,R=n.length;R>X;X++)p=n[X],F.writeUInt16(p);return y={charMap:c,subtable:F.data,maxGlyphID:t+1}}},a}(),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="hmtx",c.prototype.parse=function(a){var b,c,d,e,f,g,h,i;for(a.pos=this.offset,this.metrics=[],b=f=0,h=this.file.hhea.numberOfMetrics;h>=0?h>f:f>h;b=h>=0?++f:--f)this.metrics.push({advance:a.readUInt16(),lsb:a.readInt16()});for(d=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var c,e;for(e=[],b=c=0;d>=0?d>c:c>d;b=d>=0?++c:--c)e.push(a.readInt16());return e}(),this.widths=function(){var a,b,c,d;for(c=this.metrics,d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(e.advance);return d}.call(this),c=this.widths[this.widths.length-1],i=[],b=g=0;d>=0?d>g:g>d;b=d>=0?++g:--g)i.push(this.widths.push(c));return i},c.prototype.forGlyph=function(a){var b;return a in this.metrics?this.metrics[a]:b={advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[a-this.metrics.length]}},c.prototype.encode=function(a){var c,d,e,f,g;for(e=new b,f=0,g=a.length;g>f;f++)c=a[f],d=this.forGlyph(c),e.writeUInt16(d.advance),e.writeUInt16(d.lsb);return e.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="hhea",c.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.ascender=a.readShort(),this.decender=a.readShort(),this.lineGap=a.readShort(),this.advanceWidthMax=a.readShort(),this.minLeftSideBearing=a.readShort(),this.minRightSideBearing=a.readShort(),this.xMaxExtent=a.readShort(),this.caretSlopeRise=a.readShort(),this.caretSlopeRun=a.readShort(),this.caretOffset=a.readShort(),a.pos+=8,this.metricDataFormat=a.readShort(),this.numberOfMetrics=a.readUInt16()},c.prototype.encode=function(a){var c,d,e,f;for(d=new b,d.writeInt(this.version),d.writeShort(this.ascender),d.writeShort(this.decender),d.writeShort(this.lineGap),d.writeShort(this.advanceWidthMax),d.writeShort(this.minLeftSideBearing),d.writeShort(this.minRightSideBearing),d.writeShort(this.xMaxExtent),d.writeShort(this.caretSlopeRise),d.writeShort(this.caretSlopeRun),d.writeShort(this.caretOffset),c=e=0,f=8;f>=0?f>e:e>f;c=f>=0?++e:--e)d.writeByte(0);return d.writeShort(this.metricDataFormat),d.writeUInt16(a.length),d.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="maxp",c.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.numGlyphs=a.readUInt16(),this.maxPoints=a.readUInt16(),this.maxContours=a.readUInt16(),this.maxCompositePoints=a.readUInt16(),this.maxComponentContours=a.readUInt16(),this.maxZones=a.readUInt16(),this.maxTwilightPoints=a.readUInt16(),this.maxStorage=a.readUInt16(),this.maxFunctionDefs=a.readUInt16(),this.maxInstructionDefs=a.readUInt16(),this.maxStackElements=a.readUInt16(),this.maxSizeOfInstructions=a.readUInt16(),this.maxComponentElements=a.readUInt16(),this.maxComponentDepth=a.readUInt16()},c.prototype.encode=function(a){var c;return c=new b,c.writeInt(this.version),c.writeUInt16(a.length),c.writeUInt16(this.maxPoints),c.writeUInt16(this.maxContours),c.writeUInt16(this.maxCompositePoints),c.writeUInt16(this.maxComponentContours),c.writeUInt16(this.maxZones),c.writeUInt16(this.maxTwilightPoints),c.writeUInt16(this.maxStorage),c.writeUInt16(this.maxFunctionDefs),c.writeUInt16(this.maxInstructionDefs),c.writeUInt16(this.maxStackElements),c.writeUInt16(this.maxSizeOfInstructions),c.writeUInt16(this.maxComponentElements),c.writeUInt16(this.maxComponentDepth),c.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}var d;return g(c,a),c.prototype.tag="post",c.prototype.parse=function(a){var b,c,d,e,f;switch(a.pos=this.offset,this.format=a.readInt(),this.italicAngle=a.readInt(),this.underlinePosition=a.readShort(),this.underlineThickness=a.readShort(),this.isFixedPitch=a.readInt(),this.minMemType42=a.readInt(),this.maxMemType42=a.readInt(),this.minMemType1=a.readInt(),this.maxMemType1=a.readInt(),this.format){case 65536:break;case 131072:for(d=a.readUInt16(),this.glyphNameIndex=[],b=e=0;d>=0?d>e:e>d;b=d>=0?++e:--e)this.glyphNameIndex.push(a.readUInt16());for(this.names=[],f=[];a.pos=0?d>c:c>d;b=d>=0?++c:--c)e.push(a.readUInt32());return e}.call(this)}},c.prototype.glyphFor=function(a){var b;switch(this.format){case 65536:return d[a]||".notdef";case 131072:return b=this.glyphNameIndex[a],257>=b?d[b]:this.names[b-258]||".notdef";case 151552:return d[a+this.offsets[a]]||".notdef";case 196608:return".notdef";case 262144:return this.map[a]||65535}},c.prototype.encode=function(a){var c,e,f,g,h,i,j,k,l,m,n,o,p,q,r;if(!this.exists)return null;if(i=this.raw(),196608===this.format)return i;for(l=new b(i.slice(0,32)),l.writeUInt32(131072),l.pos=32,f=[],k=[],m=0,p=a.length;p>m;m++)c=a[m],h=this.glyphFor(c),g=d.indexOf(h),-1!==g?f.push(g):(f.push(257+k.length),k.push(h));for(l.writeUInt16(Object.keys(a).length),n=0,q=f.length;q>n;n++)e=f[n],l.writeUInt16(e);for(o=0,r=k.length;r>o;o++)j=k[o],l.writeByte(j.length),l.writeString(j);return l.data},d=".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\nzero one two three four five six seven eight nine colon semicolon less equal greater\nquestion at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\nbracketleft backslash bracketright asciicircum underscore grave\na b c d e f g h i j k l m n o p q r s t u v w x y z\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\nsterling section bullet paragraph germandbls registered copyright trademark acute\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\nCacute cacute Ccaron ccaron dcroat".split(/\s+/g),c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=c(76),b=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.tag="OS/2",b.prototype.parse=function(a){var b;return a.pos=this.offset,this.version=a.readUInt16(),this.averageCharWidth=a.readShort(),this.weightClass=a.readUInt16(),this.widthClass=a.readUInt16(),this.type=a.readShort(),this.ySubscriptXSize=a.readShort(),this.ySubscriptYSize=a.readShort(),this.ySubscriptXOffset=a.readShort(),this.ySubscriptYOffset=a.readShort(),this.ySuperscriptXSize=a.readShort(),this.ySuperscriptYSize=a.readShort(),this.ySuperscriptXOffset=a.readShort(),this.ySuperscriptYOffset=a.readShort(),this.yStrikeoutSize=a.readShort(),this.yStrikeoutPosition=a.readShort(),this.familyClass=a.readShort(),this.panose=function(){var c,d;for(d=[],b=c=0;10>c;b=++c)d.push(a.readByte());return d}(),this.charRange=function(){var c,d;for(d=[],b=c=0;4>c;b=++c)d.push(a.readInt());return d}(),this.vendorID=a.readString(4),this.selection=a.readShort(),this.firstCharIndex=a.readShort(),this.lastCharIndex=a.readShort(),this.version>0&&(this.ascent=a.readShort(),this.descent=a.readShort(),this.lineGap=a.readShort(),this.winAscent=a.readShort(),this.winDescent=a.readShort(),this.codePageRange=function(){var c,d;for(d=[],b=c=0;2>c;b=++c)d.push(a.readInt());return d}(),this.version>1)?(this.xHeight=a.readShort(),this.capHeight=a.readShort(),this.defaultChar=a.readShort(),this.breakChar=a.readShort(),this.maxContext=a.readShort()):void 0},b.prototype.encode=function(){return this.raw()},b}(d),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="loca",c.prototype.parse=function(a){var b,c;return a.pos=this.offset,b=this.file.head.indexToLocFormat,0===b?this.offsets=function(){var b,d,e;for(e=[],c=b=0,d=this.length;d>b;c=b+=2)e.push(2*a.readUInt16());return e}.call(this):this.offsets=function(){var b,d,e;for(e=[],c=b=0,d=this.length;d>b;c=b+=4)e.push(a.readUInt32());return e}.call(this)},c.prototype.indexOf=function(a){return this.offsets[a]},c.prototype.lengthOf=function(a){return this.offsets[a+1]-this.offsets[a]},c.prototype.encode=function(a){var c,d,e,f,g,h,i,j,k,l,m;for(f=new b,g=0,j=a.length;j>g;g++)if(d=a[g],d>65535){for(m=this.offsets,h=0,k=m.length;k>h;h++)c=m[h],f.writeUInt32(c);return e={format:1,table:f.data}}for(i=0,l=a.length;l>i;i++)c=a[i],f.writeUInt16(c/2);return e={format:0,table:f.data}},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},j=[].slice;g=c(76),d=c(72),e=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return i(c,a),c.prototype.tag="glyf",c.prototype.parse=function(a){return this.cache={}},c.prototype.glyphFor=function(a){var c,e,g,h,i,j,k,l,m,n;return a in this.cache?this.cache[a]:(h=this.file.loca,c=this.file.contents,e=h.indexOf(a),g=h.lengthOf(a),0===g?this.cache[a]=null:(c.pos=this.offset+e,j=new d(c.read(g)),i=j.readShort(),l=j.readShort(),n=j.readShort(),k=j.readShort(),m=j.readShort(),-1===i?this.cache[a]=new b(j,l,n,k,m):this.cache[a]=new f(j,i,l,n,k,m),this.cache[a]))},c.prototype.encode=function(a,b,c){var d,e,f,g,h,i;for(g=[],f=[],h=0,i=b.length;i>h;h++)e=b[h],d=a[e],f.push(g.length),d&&(g=g.concat(d.encode(c)));return f.push(g.length),{table:g,offsets:f}},c}(g),f=function(){function a(a,b,c,d,e,f){this.raw=a,this.numberOfContours=b,this.xMin=c,this.yMin=d,this.xMax=e,this.yMax=f,this.compound=!1}return a.prototype.encode=function(){return this.raw.data},a}(),b=function(){function a(a,d,h,i,j){var k,l;for(this.raw=a,this.xMin=d,this.yMin=h,this.xMax=i,this.yMax=j,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],k=this.raw;;){if(l=k.readShort(),this.glyphOffsets.push(k.pos),this.glyphIDs.push(k.readShort()),!(l&c))break;l&b?k.pos+=4:k.pos+=2,l&g?k.pos+=8:l&e?k.pos+=4:l&f&&(k.pos+=2)}}var b,c,e,f,g,h;return b=1,f=8,c=32,e=64,g=128,h=256,a.prototype.encode=function(a){var b,c,e,f,g,h;for(e=new d(j.call(this.raw.data)),h=this.glyphIDs,b=f=0,g=h.length;g>f;b=++f)c=h[b],e.pos=this.glyphOffsets[b],e.writeShort(a[c]);return e.data},a}(),a.exports=e}).call(this)},function(a,b,c){(function(){var b,d;d=c(44),b=function(){function a(a){var b,d;this.contents=a,this.attributes={},this.glyphWidths={},this.boundingBoxes={},this.parse(),this.charWidths=function(){var a,b;for(b=[],d=a=0;255>=a;d=++a)b.push(this.glyphWidths[c[d]]);return b}.call(this),this.bbox=function(){var a,c,d,e;for(d=this.attributes.FontBBox.split(/\s+/),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(+b);return e}.call(this),this.ascender=+(this.attributes.Ascender||0),this.decender=+(this.attributes.Descender||0),this.lineGap=this.bbox[3]-this.bbox[1]-(this.ascender-this.decender)}var b,c;return a.open=function(b){return new a(d.readFileSync(b,"utf8"))},a.prototype.parse=function(){var a,b,c,d,e,f,g,h,i,j;for(f="",j=this.contents.split("\n"),h=0,i=j.length;i>h;h++)if(c=j[h],d=c.match(/^Start(\w+)/))f=d[1];else if(d=c.match(/^End(\w+)/))f="";else switch(f){case"FontMetrics":d=c.match(/(^\w+)\s+(.*)/),b=d[1],g=d[2],(a=this.attributes[b])?(Array.isArray(a)||(a=this.attributes[b]=[a]),a.push(g)):this.attributes[b]=g;break;case"CharMetrics":if(!/^CH?\s/.test(c))continue;e=c.match(/\bN\s+(\.?\w+)\s*;/)[1],this.glyphWidths[e]=+c.match(/\bWX\s+(\d+)\s*;/)[1]}},b={402:131,8211:150,8212:151,8216:145,8217:146,8218:130,8220:147,8221:148,8222:132,8224:134,8225:135,8226:149,8230:133,8364:128,8240:137,8249:139,8250:155,710:136,8482:153,338:140,339:156,732:152,352:138,353:154,376:159,381:142,382:158},a.prototype.encodeText=function(a){var c,d,e,f,g;for(e="",d=f=0,g=a.length;g>=0?g>f:f>g;d=g>=0?++f:--f)c=a.charCodeAt(d),c=b[c]||c,e+=String.fromCharCode(c);return e},a.prototype.characterToGlyph=function(a){return c[b[a]||a]},a.prototype.widthOfGlyph=function(a){return this.glyphWidths[a]},c=".notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n\nspace exclam quotedbl numbersign\ndollar percent ampersand quotesingle\nparenleft parenright asterisk plus\ncomma hyphen period slash\nzero one two three\nfour five six seven\neight nine colon semicolon\nless equal greater question\n\nat A B C\nD E F G\nH I J K\nL M N O\nP Q R S\nT U V W\nX Y Z bracketleft\nbackslash bracketright asciicircum underscore\n\ngrave a b c\nd e f g\nh i j k\nl m n o\np q r s\nt u v w\nx y z braceleft\nbar braceright asciitilde .notdef\n\nEuro .notdef quotesinglbase florin\nquotedblbase ellipsis dagger daggerdbl\ncircumflex perthousand Scaron guilsinglleft\nOE .notdef Zcaron .notdef\n.notdef quoteleft quoteright quotedblleft\nquotedblright bullet endash emdash\ntilde trademark scaron guilsinglright\noe .notdef zcaron ydieresis\n\nspace exclamdown cent sterling\ncurrency yen brokenbar section\ndieresis copyright ordfeminine guillemotleft\nlogicalnot hyphen registered macron\ndegree plusminus twosuperior threesuperior\nacute mu paragraph periodcentered\ncedilla onesuperior ordmasculine guillemotright\nonequarter onehalf threequarters questiondown\n\nAgrave Aacute Acircumflex Atilde\nAdieresis Aring AE Ccedilla\nEgrave Eacute Ecircumflex Edieresis\nIgrave Iacute Icircumflex Idieresis\nEth Ntilde Ograve Oacute\nOcircumflex Otilde Odieresis multiply\nOslash Ugrave Uacute Ucircumflex\nUdieresis Yacute Thorn germandbls\n\nagrave aacute acircumflex atilde\nadieresis aring ae ccedilla\negrave eacute ecircumflex edieresis\nigrave iacute icircumflex idieresis\neth ntilde ograve oacute\nocircumflex otilde odieresis divide\noslash ugrave uacute ucircumflex\nudieresis yacute thorn ydieresis".split(/\s+/),a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=c(79),e=c(77),d=function(){function a(a){this.font=a,this.subset={},this.unicodes={},this.next=33}return a.prototype.use=function(a){var b,c,d;{if("string"!=typeof a)return this.unicodes[a]?void 0:(this.subset[this.next]=a,this.unicodes[a]=this.next++);for(b=c=0,d=a.length;d>=0?d>c:c>d;b=d>=0?++c:--c)this.use(a.charCodeAt(b))}},a.prototype.encodeText=function(a){var b,c,d,e,f;for(d="",c=e=0,f=a.length;f>=0?f>e:e>f;c=f>=0?++e:--e)b=this.unicodes[a.charCodeAt(c)],d+=String.fromCharCode(b);return d},a.prototype.generateCmap=function(){var a,b,c,d,e;d=this.font.cmap.tables[0].codeMap,a={},e=this.subset;for(b in e)c=e[b],a[b]=d[c];return a},a.prototype.glyphIDs=function(){var a,b,c,d,e,g;d=this.font.cmap.tables[0].codeMap,a=[0],g=this.subset;for(b in g)c=g[b],e=d[c],null!=e&&f.call(a,e)<0&&a.push(e);return a.sort()},a.prototype.glyphsFor=function(a){var b,c,d,e,f,g,h;for(d={},f=0,g=a.length;g>f;f++)e=a[f],d[e]=this.font.glyf.glyphFor(e);b=[];for(e in d)c=d[e],(null!=c?c.compound:void 0)&&b.push.apply(b,c.glyphIDs);if(b.length>0){h=this.glyphsFor(b);for(e in h)c=h[e],d[e]=c}return d},a.prototype.encode=function(){var a,c,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s;a=b.encode(this.generateCmap(),"unicode"),f=this.glyphsFor(this.glyphIDs()),n={0:0},r=a.charMap;for(c in r)h=r[c],n[h.old]=h["new"];m=a.maxGlyphID;for(o in f)o in n||(n[o]=m++);k=e.invert(n),l=Object.keys(k).sort(function(a,b){return a-b}),p=function(){var a,b,c;for(c=[],a=0,b=l.length;b>a;a++)g=l[a],c.push(k[g]);return c}(),d=this.font.glyf.encode(f,p,n),i=this.font.loca.encode(d.offsets),j=this.font.name.encode(),this.postscriptName=j.postscriptName,this.cmap={},s=a.charMap;for(c in s)h=s[c],this.cmap[c]=h.old;return q={cmap:a.table,glyf:d.table,loca:i.table,hmtx:this.font.hmtx.encode(p),hhea:this.font.hhea.encode(p),maxp:this.font.maxp.encode(p),post:this.font.post.encode(p),name:j.table,head:this.font.head.encode(i)},this.font.os2.exists&&(q["OS/2"]=this.font.os2.raw()),this.font.directory.encode(q)},a}(),a.exports=d}).call(this)},function(a,b,c){(function(){var b;b=c(90),a.exports={initText:function(){return this.x=0,this.y=0,this._lineGap=0},lineGap:function(a){return this._lineGap=a,this},moveDown:function(a){return null==a&&(a=1),this.y+=this.currentLineHeight(!0)*a+this._lineGap,this},moveUp:function(a){return null==a&&(a=1),this.y-=this.currentLineHeight(!0)*a+this._lineGap,this},_text:function(a,c,d,e,f){var g,h,i,j,k;if(e=this._initOptions(c,d,e),a=""+a,e.wordSpacing&&(a=a.replace(/\s{2,}/g," ")),e.width)h=this._wrapper,h||(h=new b(this,e),h.on("line",f)),this._wrapper=e.continued?h:null,this._textOptions=e.continued?e:null,h.wrap(a,e);else for(k=a.split("\n"),i=0,j=k.length;j>i;i++)g=k[i],f(g,e);return this},text:function(a,b,c,d){return this._text(a,b,c,d,this._line.bind(this))},widthOfString:function(a,b){return null==b&&(b={}),this._font.widthOfString(a,this._fontSize)+(b.characterSpacing||0)*(a.length-1)},heightOfString:function(a,b){var c,d,e,f;return null==b&&(b={}),e=this.x,f=this.y,b=this._initOptions(b),b.height=1/0,d=b.lineGap||this._lineGap||0,this._text(a,this.x,this.y,b,function(a){return function(b,c){return a.y+=a.currentLineHeight(!0)+d}}(this)),c=this.y-f,this.x=e,this.y=f,c},list:function(a,c,d,e,f){var g,h,i,j,k,l,m,n;return e=this._initOptions(c,d,e),n=Math.round(this._font.ascender/1e3*this._fontSize/3),i=e.textIndent||5*n,j=e.bulletIndent||8*n,l=1,k=[],m=[],g=function(a){var b,c,d,e,f;for(f=[],b=d=0,e=a.length;e>d;b=++d)c=a[b],Array.isArray(c)?(l++,g(c),f.push(l--)):(k.push(c),f.push(m.push(l)));return f},g(a),f=new b(this,e),f.on("line",this._line.bind(this)),l=1,h=0,f.on("firstLine",function(a){return function(){var b,c;return(c=m[h++])!==l&&(b=j*(c-l),a.x+=b,f.lineWidth-=b,l=c),a.circle(a.x-i+n,a.y+n+n/2,n),a.fill()}}(this)),f.on("sectionStart",function(a){return function(){var b;return b=i+j*(l-1),a.x+=b,f.lineWidth-=b}}(this)),f.on("sectionEnd",function(a){return function(){var b;return b=i+j*(l-1),a.x-=b,f.lineWidth+=b}}(this)),f.wrap(k.join("\n"),e),this},_initOptions:function(a,b,c){var d,e,f,g;if(null==a&&(a={}),null==c&&(c={}),"object"==typeof a&&(c=a,a=null),c=function(){var a,b,d;b={};for(a in c)d=c[a],b[a]=d;return b}(),this._textOptions){g=this._textOptions;for(d in g)f=g[d],"continued"!==d&&null==c[d]&&(c[d]=f)}return null!=a&&(this.x=a),null!=b&&(this.y=b),c.lineBreak!==!1&&(e=this.page.margins,null==c.width&&(c.width=this.page.width-this.x-e.right)),c.columns||(c.columns=0),null==c.columnGap&&(c.columnGap=18),c},_line:function(a,b,c){var d;return null==b&&(b={}),this._fragment(a,this.x,this.y,b),d=b.lineGap||this._lineGap||0,c?this.y+=this.currentLineHeight(!0)+d:this.x+=this.widthOfString(a)},_fragment:function(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(a=""+a,0!==a.length){if(e=d.align||"left",r=d.wordSpacing||0,f=d.characterSpacing||0,d.width)switch(e){case"right":p=this.widthOfString(a.replace(/\s+$/,""),d),b+=d.lineWidth-p;break;case"center":b+=d.lineWidth/2-d.textWidth/2;break;case"justify":s=a.trim().split(/\s+/),p=this.widthOfString(a.replace(/\s+/g,""),d),o=this.widthOfString(" ")+f,r=Math.max(0,(d.lineWidth-p)/Math.max(1,s.length-1)-o)}if(n=d.textWidth+r*(d.wordCount-1)+f*(a.length-1),d.link&&this.link(b,c,n,this.currentLineHeight(),d.link),(d.underline||d.strike)&&(this.save(),d.stroke||this.strokeColor.apply(this,this._fillColor),k=this._fontSize<10?.5:Math.floor(this._fontSize/10),this.lineWidth(k),h=d.underline?1:2,l=c+this.currentLineHeight()/h,d.underline&&(l-=k),this.moveTo(b,l),this.lineTo(b+n,l),this.stroke(),this.restore()),this.save(),this.transform(1,0,0,-1,0,this.page.height),c=this.page.height-c-this._font.ascender/1e3*this._fontSize,null==(t=this.page.fonts)[w=this._font.id]&&(t[w]=this._font.ref()),this._font.use(a),this.addContent("BT"),this.addContent(""+b+" "+c+" Td"),this.addContent("/"+this._font.id+" "+this._fontSize+" Tf"),m=d.fill&&d.stroke?2:d.stroke?1:0,m&&this.addContent(""+m+" Tr"),f&&this.addContent(""+f+" Tc"),r){for(s=a.trim().split(/\s+/),r+=this.widthOfString(" ")+f,r*=1e3/this._fontSize,g=[],u=0,v=s.length;v>u;u++)q=s[u],i=this._font.encode(q),i=function(){var a,b,c;for(c=[],j=a=0,b=i.length;b>a;j=a+=1)c.push(i.charCodeAt(j).toString(16));return c}().join(""),g.push("<"+i+"> "+-r);this.addContent("["+g.join(" ")+"] TJ")}else i=this._font.encode(a),i=function(){var a,b,c;for(c=[],j=a=0,b=i.length;b>a;j=a+=1)c.push(i.charCodeAt(j).toString(16)); -return c}().join(""),this.addContent("<"+i+"> Tj");return this.addContent("ET"),this.restore()}}}}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};b=c(26).EventEmitter,d=c(91),e=function(a){function b(a,b){var c;this.document=a,this.indent=b.indent||0,this.characterSpacing=b.characterSpacing||0,this.wordSpacing=0===b.wordSpacing,this.columns=b.columns||1,this.columnGap=null!=(c=b.columnGap)?c:18,this.lineWidth=(b.width-this.columnGap*(this.columns-1))/this.columns,this.spaceLeft=this.lineWidth,this.startX=this.document.x,this.startY=this.document.y,this.column=1,this.ellipsis=b.ellipsis,this.continuedX=0,null!=b.height?(this.height=b.height,this.maxY=this.startY+b.height):this.maxY=this.document.page.maxY(),this.on("firstLine",function(a){return function(b){var c;return c=a.continuedX||a.indent,a.document.x+=c,a.lineWidth-=c,a.once("line",function(){return a.document.x-=c,a.lineWidth+=c,b.continued&&!a.continuedX&&(a.continuedX=a.indent),b.continued?void 0:a.continuedX=0})}}(this)),this.on("lastLine",function(a){return function(b){var c;return c=b.align,"justify"===c&&(b.align="left"),a.lastLine=!0,a.once("line",function(){return a.document.y+=b.paragraphGap||0,b.align=c,a.lastLine=!1})}}(this))}return g(b,a),b.prototype.wordWidth=function(a){return this.document.widthOfString(a,this)+this.characterSpacing+this.wordSpacing},b.prototype.eachWord=function(a,b){var c,e,f,g,h,i,j,k,l,m;for(e=new d(a),h=null,m={};c=e.nextBreak();){if(l=a.slice((null!=h?h.position:void 0)||0,c.position),k=null!=m[l]?m[l]:m[l]=this.wordWidth(l),k>this.lineWidth+this.continuedX)for(i=h,f={};l.length;){for(g=l.length;k>this.spaceLeft;)k=this.wordWidth(l.slice(0,--g));if(f.required=gthis.maxY||f>this.maxY)&&this.nextSection(),c="",g=0,h=0,e=0,i=this.document.y,d=function(a){return function(){return b.textWidth=g+a.wordSpacing*(h-1),b.wordCount=h,b.lineWidth=a.lineWidth,i=a.document.y,a.emit("line",c,b,a),e++}}(this),this.emit("sectionStart",b,this),this.eachWord(a,function(a){return function(e,f,i,j){var k,l;if((null==j||j.required)&&(a.emit("firstLine",b,a),a.spaceLeft=a.lineWidth),f<=a.spaceLeft&&(c+=e,g+=f,h++),i.required||f>a.spaceLeft){if(i.required&&a.emit("lastLine",b,a),k=a.document.currentLineHeight(!0),null!=a.height&&a.ellipsis&&a.document.y+2*k>a.maxY&&a.column>=a.columns){for(a.ellipsis===!0&&(a.ellipsis="…"),c=c.replace(/\s+$/,""),g=a.wordWidth(c+a.ellipsis);g>a.lineWidth;)c=c.slice(0,-1).replace(/\s+$/,""),g=a.wordWidth(c+a.ellipsis);c+=a.ellipsis}return d(),a.document.y+k>a.maxY&&(l=a.nextSection(),!l)?(h=0,c="",!1):i.required?(f>a.spaceLeft&&(c=e,g=f,h=1,d()),a.spaceLeft=a.lineWidth,c="",g=0,h=0):(a.spaceLeft=a.lineWidth-f,c=e,g=f,h=1)}return a.spaceLeft-=f}}(this)),h>0&&(this.emit("lastLine",b,this),d()),this.emit("sectionEnd",b,this),b.continued===!0?(e>1&&(this.continuedX=0),this.continuedX+=b.textWidth,this.document.y=i):this.document.x=this.startX},b.prototype.nextSection=function(a){var b;if(this.emit("sectionEnd",a,this),++this.column>this.columns){if(null!=this.height)return!1;this.document.addPage(),this.column=1,this.startY=this.document.page.margins.top,this.maxY=this.document.page.maxY(),this.document.x=this.startX,this.document._fillColor&&(b=this.document).fillColor.apply(b,this.document._fillColor),this.emit("pageBreak",a,this)}else this.document.x+=this.lineWidth+this.columnGap,this.document.y=this.startY,this.emit("columnBreak",a,this);return this.emit("sectionStart",a,this),!0},b}(b),a.exports=e}).call(this)},function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D;w=c(92),A=new w(c(93)),C=c(94),f=C.BK,k=C.CR,o=C.LF,q=C.NL,g=C.CB,e=C.BA,v=C.SP,x=C.WJ,v=C.SP,f=C.BK,o=C.LF,q=C.NL,b=C.AI,d=C.AL,t=C.SA,u=C.SG,y=C.XX,i=C.CJ,m=C.ID,r=C.NS,z=C.characterClasses,D=c(95),l=D.DI_BRK,n=D.IN_BRK,h=D.CI_BRK,j=D.CP_BRK,s=D.PR_BRK,B=D.pairTable,p=function(){function a(a){this.string=a,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null}var c,m,p;return a.prototype.nextCodePoint=function(){var a,b;return a=this.string.charCodeAt(this.pos++),b=this.string.charCodeAt(this.pos),a>=55296&&56319>=a&&b>=56320&&57343>=b?(this.pos++,1024*(a-55296)+(b-56320)+65536):a},m=function(a){switch(a){case b:return d;case t:case u:case y:return d;case i:return r;default:return a}},p=function(a){switch(a){case o:case q:return f;case g:return e;case v:return x;default:return a}},a.prototype.nextCharClass=function(a){return null==a&&(a=!1),m(A.get(this.nextCodePoint()))},c=function(){function a(a,b){this.position=a,this.required=null!=b?b:!1}return a}(),a.prototype.nextBreak=function(){var a,b,d;for(null==this.curClass&&(this.curClass=p(this.nextCharClass()));this.pos=this.string.length?this.lastPos>n,g=1<>p,k=1024>>p,h=l+k,r=h,q=32,f=r+q,c=1<a||a>1114111?this.errorValue:55296>a||a>56319&&65535>=a?(b=(this.data[a>>p]<=a?(b=(this.data[l+(a-55296>>p)]<>n)],b=this.data[b+(a>>p&i)],b=(b<h?(n=i,j=i/m):(j=g,n=g*m),"center"===f.align?c=c+i/2-n/2:"right"===f.align&&(c=c+i-n),"center"===f.valign?e=e+g/2-j/2:"bottom"===f.valign&&(e=e+g-j)),this.y===e&&(this.y+=j),this.save(),this.transform(n,0,0,-j,c,e+j),this.addContent("/"+l.label+" Do"),this.restore(),this}}}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(b){(function(){var d,e,f,g,h;h=c(44),d=c(72),e=c(98),g=c(99),f=function(){function a(){}return a.open=function(a,c){var d,f;if(b.isBuffer(a))d=a;else if(f=/^data:.+;base64,(.*)$/.exec(a))d=new b(f[1],"base64");else if(d=h.readFileSync(a),!d)return;if(255===d[0]&&216===d[1])return new e(d,c);if(137===d[0]&&"PNG"===d.toString("ascii",1,4))return new g(d,c);throw new Error("Unknown image format.")},a}(),a.exports=f}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(){var b,d,e=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};d=c(44),b=function(){function a(a,c){var d,f,g;if(this.data=a,this.label=c,65496!==this.data.readUInt16BE(0))throw"SOI not found in JPEG";for(g=2;g=0));)g+=this.data.readUInt16BE(g);if(e.call(b,f)<0)throw"Invalid JPEG.";g+=2,this.bits=this.data[g++],this.height=this.data.readUInt16BE(g),g+=2,this.width=this.data.readUInt16BE(g),g+=2,d=this.data[g++],this.colorSpace=function(){switch(d){case 1:return"DeviceGray";case 3:return"DeviceRGB";case 4:return"DeviceCMYK"}}(),this.obj=null}var b;return b=[65472,65473,65474,65475,65477,65478,65479,65480,65481,65482,65483,65484,65485,65486,65487],a.prototype.embed=function(a){return this.obj?void 0:(this.obj=a.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.bits,Width:this.width,Height:this.height,ColorSpace:this.colorSpace,Filter:"DCTDecode"}),"DeviceCMYK"===this.colorSpace&&(this.obj.data.Decode=[1,0,1,0,1,0,1,0]),this.obj.end(this.data),this.data=null)},a}(),a.exports=b}).call(this)},function(a,b,c){(function(b){(function(){var d,e,f;f=c(47),d=c(100),e=function(){function a(a,b){this.label=b,this.image=new d(a),this.width=this.image.width,this.height=this.image.height,this.imgData=this.image.imgData,this.obj=null}return a.prototype.embed=function(a){var c,d,e,f,g,h,i,j;if(this.document=a,!this.obj){if(this.obj=a.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.image.bits,Width:this.width,Height:this.height,Filter:"FlateDecode"}),this.image.hasAlphaChannel||(e=a.ref({Predictor:15,Colors:this.image.colors,BitsPerComponent:this.image.bits,Columns:this.width}),this.obj.data.DecodeParms=e,e.end()),0===this.image.palette.length?this.obj.data.ColorSpace=this.image.colorSpace:(d=a.ref(),d.end(new b(this.image.palette)),this.obj.data.ColorSpace=["Indexed","DeviceRGB",this.image.palette.length/3-1,d]),this.image.transparency.grayscale)return g=this.image.transparency.greyscale,this.obj.data.Mask=[g,g];if(this.image.transparency.rgb){for(f=this.image.transparency.rgb,c=[],i=0,j=f.length;j>i;i++)h=f[i],c.push(h,h);return this.obj.data.Mask=c}return this.image.transparency.indexed?this.loadIndexedAlphaChannel():this.image.hasAlphaChannel?this.splitAlphaChannel():this.finalize()}},a.prototype.finalize=function(){var a;return this.alphaChannel&&(a=this.document.ref({Type:"XObject",Subtype:"Image",Height:this.height,Width:this.width,BitsPerComponent:8,Filter:"FlateDecode",ColorSpace:"DeviceGray",Decode:[0,1]}),a.end(this.alphaChannel),this.obj.data.SMask=a),this.obj.end(this.imgData),this.image=null,this.imgData=null},a.prototype.splitAlphaChannel=function(){return this.image.decodePixels(function(a){return function(c){var d,e,g,h,i,j,k,l,m;for(g=a.image.colors*a.image.bits/8,m=a.width*a.height,j=new b(m*g),e=new b(m),i=l=d=0,k=c.length;k>i;)j[l++]=c[i++],j[l++]=c[i++],j[l++]=c[i++],e[d++]=c[i++];return h=0,f.deflate(j,function(b,c){if(a.imgData=c,b)throw b;return 2===++h?a.finalize():void 0}),f.deflate(e,function(b,c){if(a.alphaChannel=c,b)throw b;return 2===++h?a.finalize():void 0})}}(this))},a.prototype.loadIndexedAlphaChannel=function(a){var c;return c=this.image.transparency.indexed,this.image.decodePixels(function(a){return function(d){var e,g,h,i,j;for(e=new b(a.width*a.height),g=0,h=i=0,j=d.length;j>i;h=i+=1)e[g++]=c[d[h]];return f.deflate(e,function(b,c){if(a.alphaChannel=c,b)throw b;return a.finalize()})}}(this))},a}(),a.exports=e}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(b){(function(){var d,e,f;e=c(44),f=c(47),a.exports=d=function(){function a(a){var c,d,e,f,g,h,i,j,k,l,m;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.text={};;){switch(c=this.readUInt32(),h=function(){var a,b;for(b=[],e=a=0;4>a;e=++a)b.push(String.fromCharCode(this.data[this.pos++]));return b}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"PLTE":this.palette=this.read(c);break;case"IDAT":for(e=k=0;c>k;e=k+=1)this.imgData.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(c),i=255-this.transparency.indexed.length,i>0)for(e=l=0;i>=0?i>l:l>i;e=i>=0?++l:--l)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(c)[0];break;case 2:this.transparency.rgb=this.read(c)}break;case"tEXt":j=this.read(c),f=j.indexOf(0),g=String.fromCharCode.apply(String,j.slice(0,f)),this.text[g]=String.fromCharCode.apply(String,j.slice(f+1));break;case"IEND":return this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(m=this.colorType)||6===m,d=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*d,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new b(this.imgData));default:this.pos+=c}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return a.decode=function(b,c){return e.readFile(b,function(b,d){var e;return e=new a(d),e.decode(function(a){return c(a)})})},a.load=function(b){var c;return c=e.readFileSync(b),new a(c)},a.prototype.read=function(a){var b,c,d;for(d=[],b=c=0;a>=0?a>c:c>a;b=a>=0?++c:--c)d.push(this.data[this.pos++]);return d},a.prototype.readUInt32=function(){var a,b,c,d;return a=this.data[this.pos++]<<24,b=this.data[this.pos++]<<16,c=this.data[this.pos++]<<8,d=this.data[this.pos++],a|b|c|d},a.prototype.readUInt16=function(){var a,b;return a=this.data[this.pos++]<<8,b=this.data[this.pos++],a|b},a.prototype.decodePixels=function(a){var c=this;return f.inflate(this.imgData,function(d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B;if(d)throw d;for(q=c.pixelBitlength/8,u=q*c.width,r=new b(u*c.height),k=e.length,t=0,s=0,g=0;k>s;){switch(e[s++]){case 0:for(i=x=0;u>x;i=x+=1)r[g++]=e[s++];break;case 1:for(i=y=0;u>y;i=y+=1)f=e[s++],j=q>i?0:r[g-q],r[g++]=(f+j)%256;break;case 2:for(i=z=0;u>z;i=z+=1)f=e[s++],h=(i-i%q)/q,v=t&&r[(t-1)*u+h*q+i%q],r[g++]=(v+f)%256;break;case 3:for(i=A=0;u>A;i=A+=1)f=e[s++],h=(i-i%q)/q,j=q>i?0:r[g-q],v=t&&r[(t-1)*u+h*q+i%q],r[g++]=(f+Math.floor((j+v)/2))%256;break;case 4:for(i=B=0;u>B;i=B+=1)f=e[s++],h=(i-i%q)/q,j=q>i?0:r[g-q],0===t?v=w=0:(v=r[(t-1)*u+h*q+i%q],w=h&&r[(t-1)*u+(h-1)*q+i%q]),l=j+v-w,m=Math.abs(l-j),o=Math.abs(l-v),p=Math.abs(l-w),n=o>=m&&p>=m?j:p>=o?v:w,r[g++]=(f+n)%256;break;default:throw new Error("Invalid filter algorithm: "+e[s-1])}t++}return a(r)})},a.prototype.decodePalette=function(){var a,c,d,e,f,g,h,i,j,k;for(e=this.palette,h=this.transparency.indexed||[],g=new b(h.length+e.length),f=0,d=e.length,a=0,c=i=0,j=e.length;j>i;c=i+=3)g[f++]=e[c],g[f++]=e[c+1],g[f++]=e[c+2],g[f++]=null!=(k=h[a++])?k:255;return g},a.prototype.copyToImageData=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(d=this.colors,k=null,c=this.hasAlphaChannel,this.palette.length&&(k=null!=(m=this._decodedPalette)?m:this._decodedPalette=this.decodePalette(),d=4,c=!0),e=(null!=a?a.data:void 0)||a,j=e.length,g=k||b,f=h=0,1===d)for(;j>f;)i=k?4*b[f/4]:h,l=g[i++],e[f++]=l,e[f++]=l,e[f++]=l,e[f++]=c?g[i++]:255,h=i;else for(;j>f;)i=k?4*b[f/4]:h,e[f++]=g[i++],e[f++]=g[i++],e[f++]=g[i++],e[f++]=c?g[i++]:255,h=i},a.prototype.decode=function(a){var c,d=this;return c=new b(this.width*this.height*4),this.decodePixels(function(b){return d.copyToImageData(c,b),a(c)})},a}()}).call(this)}).call(b,c(2).Buffer)},function(a,b){(function(){a.exports={annotate:function(a,b,c,d,e){var f,g,h;e.Type="Annot",e.Rect=this._convertRect(a,b,c,d),e.Border=[0,0,0],"Link"!==e.Subtype&&null==e.C&&(e.C=this._normalizeColor(e.color||[0,0,0])),delete e.color,"string"==typeof e.Dest&&(e.Dest=new String(e.Dest));for(f in e)h=e[f],e[f[0].toUpperCase()+f.slice(1)]=h;return g=this.ref(e),this.page.annotations.push(g),g.end(),this},note:function(a,b,c,d,e,f){return null==f&&(f={}),f.Subtype="Text",f.Contents=new String(e),f.Name="Comment",null==f.color&&(f.color=[243,223,92]),this.annotate(a,b,c,d,f)},link:function(a,b,c,d,e,f){return null==f&&(f={}),f.Subtype="Link",f.A=this.ref({S:"URI",URI:new String(e)}),f.A.end(),this.annotate(a,b,c,d,f)},_markup:function(a,b,c,d,e){var f,g,h,i,j;return null==e&&(e={}),j=this._convertRect(a,b,c,d),f=j[0],h=j[1],g=j[2],i=j[3],e.QuadPoints=[f,i,g,i,f,h,g,h],e.Contents=new String,this.annotate(a,b,c,d,e)},highlight:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Highlight",null==e.color&&(e.color=[241,238,148]),this._markup(a,b,c,d,e)},underline:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Underline",this._markup(a,b,c,d,e)},strike:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="StrikeOut",this._markup(a,b,c,d,e)},lineAnnotation:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Line",e.Contents=new String,e.L=[a,this.page.height-b,c,this.page.height-d],this.annotate(a,b,c,d,e)},rectAnnotation:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Square",e.Contents=new String,this.annotate(a,b,c,d,e)},ellipseAnnotation:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Circle",e.Contents=new String,this.annotate(a,b,c,d,e)},textAnnotation:function(a,b,c,d,e,f){return null==f&&(f={}),f.Subtype="FreeText",f.Contents=new String(e),f.DA=new String,this.annotate(a,b,c,d,f)},_convertRect:function(a,b,c,d){var e,f,g,h,i,j,k,l,m;return l=b,b+=d,k=a+c,m=this._ctm,e=m[0],f=m[1],g=m[2],h=m[3],i=m[4],j=m[5],a=e*a+g*b+i,b=f*a+h*b+j,k=e*k+g*l+i,l=f*k+h*l+j,[a,b,k,l]}}}).call(this)},function(a,b){a.exports={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]}},function(a,b,c){(function(b){"use strict";function d(a,b){this.pdfDoc=a,this.imageDictionary=b||{}}var e=(c(24),c(97));d.prototype.measureImage=function(a){function c(a){var c=g.imageDictionary[a];if(!c)return a;var d=c.indexOf("base64,");if(0>d)throw"invalid image format, images dictionary should contain dataURL entries";return new b(c.substring(d+7),"base64")}var d,f,g=this;return this.pdfDoc._imageRegistry[a]?d=this.pdfDoc._imageRegistry[a]:(f="I"+ ++this.pdfDoc._imageCount,d=e.open(c(a),f),d.embed(this.pdfDoc),this.pdfDoc._imageRegistry[a]=d),{width:d.width,height:d.height}},a.exports=d}).call(b,c(2).Buffer)},function(a,b){"use strict";function c(a){for(var b=[],c=null,d=0,e=a.inlines.length;e>d;d++){var f=a.inlines[d],g=f.decoration;if(g){var h=f.decorationColor||f.color||"black",i=f.decorationStyle||"solid";g=Array.isArray(g)?g:[g];for(var j=0,k=g.length;k>j;j++){var l=g[j];c&&l===c.decoration&&i===c.decorationStyle&&h===c.decorationColor&&"lineThrough"!==l?c.inlines.push(f):(c={line:a,decoration:l,decorationColor:h,decorationStyle:i,inlines:[f]},b.push(c))}}else c=null}return b}function d(a,b,c,d){function e(){for(var b=0,c=0,d=a.inlines.length;d>c;c++){var e=a.inlines[c];b=e.fontSize>b?c:b}return a.inlines[b]}function f(){for(var b=0,c=0,d=a.inlines.length;d>c;c++)b+=a.inlines[c].width;return b}var g=a.inlines[0],h=e(),i=f(),j=a.line.getAscenderHeight(),k=h.font.ascender/1e3*h.fontSize,l=h.height,m=l-k,n=.5+.12*Math.floor(Math.max(h.fontSize-8,0)/2);switch(a.decoration){case"underline":c+=j+.45*m;break;case"overline":c+=j-.85*k;break;case"lineThrough":c+=j-.25*k;break;default:throw"Unkown decoration : "+a.decoration}if(d.save(),"double"===a.decorationStyle){var o=Math.max(.5,2*n);d.fillColor(a.decorationColor).rect(b+g.x,c-n/2,i,n/2).fill().rect(b+g.x,c+o-n/2,i,n/2).fill()}else if("dashed"===a.decorationStyle){var p=Math.ceil(i/6.8),q=b+g.x;d.rect(q,c,i,n).clip(),d.fillColor(a.decorationColor);for(var r=0;p>r;r++)d.rect(q,c-n/2,3.96,n).fill(),q+=6.8}else if("dotted"===a.decorationStyle){var s=Math.ceil(i/(3*n)),t=b+g.x;d.rect(t,c,i,n).clip(),d.fillColor(a.decorationColor);for(var u=0;s>u;u++)d.rect(t,c-n/2,n,n).fill(),t+=3*n}else if("wavy"===a.decorationStyle){var v=.7,w=1,x=Math.ceil(i/(2*v))+1,y=b+g.x-1;d.rect(b+g.x,c-w,i,c+w).clip(),d.lineWidth(.24),d.moveTo(y,c);for(var z=0;x>z;z++)d.bezierCurveTo(y+v,c-w,y+2*v,c-w,y+3*v,c).bezierCurveTo(y+4*v,c+w,y+5*v,c+w,y+6*v,c),y+=6*v;d.stroke(a.decorationColor)}else d.fillColor(a.decorationColor).rect(b+g.x,c-n/2,i,n).fill();d.restore()}function e(a,b,e,f){for(var g=c(a),h=0,i=g.length;i>h;h++)d(g[h],b,e,f)}function f(a,b,c,d){for(var e=a.getHeight(),f=0,g=a.inlines.length;g>f;f++){var h=a.inlines[f];h.background&&d.fillColor(h.background).rect(b+h.x,c,h.width,e).fill()}}a.exports={drawBackground:f,drawDecorations:e}},function(a,b,c){var d,e,f=f||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(a){var b=new MouseEvent("click");a.dispatchEvent(b)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},p=function(b,i,l){l||(b=o(b));var p,q,r,s=this,t=b.type,u=!1,v=function(){n(s,"writestart progress write writeend".split(" "))},w=function(){if((u||!p)&&(p=c().createObjectURL(b)),q)q.location.href=p;else{var d=a.open(p,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=p)}s.readyState=s.DONE,v(),m(p)},x=function(a){return function(){return s.readyState!==s.DONE?a.apply(this,arguments):void 0}},y={create:!0,exclusive:!1};return s.readyState=s.INIT,i||(i="download"),e?(p=c().createObjectURL(b),d.href=p,d.download=i,void setTimeout(function(){f(d),v(),m(p),s.readyState=s.DONE})):(a.chrome&&t&&t!==j&&(r=b.slice||b.webkitSlice,b=r.call(b,0,b.size,j),u=!0),g&&"download"!==i&&(i+=".download"),(t===j||g)&&(q=a),h?(k+=b.size,void h(a.TEMPORARY,k,x(function(a){a.root.getDirectory("saved",y,x(function(a){var c=function(){a.getFile(i,y,x(function(a){a.createWriter(x(function(c){c.onwriteend=function(b){q.location.href=a.toURL(),s.readyState=s.DONE,n(s,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&w()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=s["on"+a]}),c.write(b),s.abort=function(){c.abort(),s.readyState=s.DONE},s.readyState=s.WRITING}),w)}),w)};a.getFile(i,{create:!1},x(function(a){a.remove(),c()}),x(function(a){a.code===a.NOT_FOUND_ERR?c():w()}))}),w)}),w)):void w())},q=p.prototype,r=function(a,b,c){return new p(a,b,c)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b,c){return c||(a=o(a)),navigator.msSaveOrOpenBlob(a,b||"download")}:(q.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},q.readyState=q.INIT=0,q.WRITING=1,q.DONE=2,q.error=q.onwritestart=q.onprogress=q.onwrite=q.onabort=q.onerror=q.onwriteend=null,r)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof a&&a.exports?a.exports.saveAs=f:null!==c(106)&&null!=c(107)&&(d=[],e=function(){return f}.apply(b,d),!(void 0!==e&&(a.exports=e)))},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){(function(b){a.exports=b}).call(b,{})}]),window.pdfMake=window.pdfMake||{},window.pdfMake.vfs={"LICENSE.txt":"DQogICAgICAgICAgICAgICAgICAgICAgICAgIC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PTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuDQogICBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kDQogICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4NCg==", +}},f.prototype._read=function(a){var b=this._transformState;i.isNull(b.writechunk)||!b.writecb||b.transforming?b.needTransform=!0:(b.transforming=!0,this._transform(b.writechunk,b.writeencoding,b.afterTransform))}},function(a,b,c){function d(a){return this instanceof d?void e.call(this,a):new d(a)}a.exports=d;var e=c(38),f=c(32);f.inherits=c(33),f.inherits(d,e),d.prototype._transform=function(a,b,c){c(null,a)}},function(a,b,c){a.exports=c(36)},function(a,b,c){a.exports=c(35)},function(a,b,c){a.exports=c(38)},function(a,b,c){a.exports=c(39)},function(a,b,c){(function(b,c){"use strict";function d(){this.fileSystem={},this.baseSystem={}}function e(a){return 0===a.indexOf(c)&&(a=a.substring(c.length)),0===a.indexOf("/")&&(a=a.substring(1)),a}d.prototype.readFileSync=function(a){a=e(a);var c=this.baseSystem[a];return c?new b(c,"base64"):this.fileSystem[a]},d.prototype.writeFileSync=function(a,b){this.fileSystem[e(a)]=b},d.prototype.bindFS=function(a){this.baseSystem=a},a.exports=new d}).call(b,c(2).Buffer,"/")},function(a,b,c){(function(b){(function(){var d,e;d=function(){function a(){}var c,d,f,g;return f=function(a,b){return(Array(b+1).join("0")+a).slice(-b)},d=/[\n\r\t\b\f\(\)\\]/g,c={"\n":"\\n","\r":"\\r"," ":"\\t","\b":"\\b","\f":"\\f","\\":"\\\\","(":"\\(",")":"\\)"},g=function(a){var b,c,d,e,f;if(d=a.length,1&d)throw new Error("Buffer length must be even");for(c=e=0,f=d-1;f>e;c=e+=2)b=a[c],a[c]=a[c+1],a[c+1]=b;return a},a.convert=function(h){var i,j,k,l,m,n,o,p,q,r;if("string"==typeof h)return"/"+h;if(h instanceof String){for(o=h.replace(d,function(a){return c[a]}),k=!1,j=q=0,r=o.length;r>q;j=q+=1)if(o.charCodeAt(j)>127){k=!0;break}return k&&(o=g(new b("\ufeff"+o,"utf16le")).toString("binary")),"("+o+")"}if(b.isBuffer(h))return"<"+h.toString("hex")+">";if(h instanceof e)return h.toString();if(h instanceof Date)return"(D:"+f(h.getUTCFullYear(),4)+f(h.getUTCMonth(),2)+f(h.getUTCDate(),2)+f(h.getUTCHours(),2)+f(h.getUTCMinutes(),2)+f(h.getUTCSeconds(),2)+"Z)";if(Array.isArray(h))return l=function(){var b,c,d;for(d=[],b=0,c=h.length;c>b;b++)i=h[b],d.push(a.convert(i));return d}().join(" "),"["+l+"]";if("[object Object]"==={}.toString.call(h)){n=["<<"];for(m in h)p=h[m],n.push("/"+m+" "+a.convert(p));return n.push(">>"),n.join("\n")}return""+h},a}(),a.exports=d,e=c(46)}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(b){(function(){var d,e,f,g=function(a,b){return function(){return a.apply(b,arguments)}};f=c(47),e=function(){function a(a,b,c){this.document=a,this.id=b,this.data=null!=c?c:{},this.finalize=g(this.finalize,this),this.gen=0,this.deflate=null,this.compress=this.document.compress&&!this.data.Filter,this.uncompressedLength=0,this.chunks=[]}return a.prototype.initDeflate=function(){return this.data.Filter="FlateDecode",this.deflate=f.createDeflate(),this.deflate.on("data",function(a){return function(b){return a.chunks.push(b),a.data.Length+=b.length}}(this)),this.deflate.on("end",this.finalize)},a.prototype.write=function(a){var c;return b.isBuffer(a)||(a=new b(a+"\n","binary")),this.uncompressedLength+=a.length,null==(c=this.data).Length&&(c.Length=0),this.compress?(this.deflate||this.initDeflate(),this.deflate.write(a)):(this.chunks.push(a),this.data.Length+=a.length)},a.prototype.end=function(a){return("string"==typeof a||b.isBuffer(a))&&this.write(a),this.deflate?this.deflate.end():this.finalize()},a.prototype.finalize=function(){var a,b,c,e;if(this.offset=this.document._offset,this.document._write(""+this.id+" "+this.gen+" obj"),this.document._write(d.convert(this.data)),this.chunks.length){for(this.document._write("stream"),e=this.chunks,b=0,c=e.length;c>b;b++)a=e[b],this.document._write(a);this.chunks.length=0,this.document._write("\nendstream")}return this.document._write("endobj"),this.document._refEnd(this)},a.prototype.toString=function(){return""+this.id+" "+this.gen+" R"},a}(),a.exports=e,d=c(45)}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(a,d){function e(b,c,d){function e(){for(var a;null!==(a=b.read());)h.push(a),i+=a.length;b.once("readable",e)}function f(a){b.removeListener("end",g),b.removeListener("readable",e),d(a)}function g(){var c=a.concat(h,i);h=[],d(null,c),b.close()}var h=[],i=0;b.on("error",f),b.on("end",g),b.end(c),e()}function f(b,c){if("string"==typeof c&&(c=new a(c)),!a.isBuffer(c))throw new TypeError("Not a string or buffer");var d=p.Z_FINISH;return b._processChunk(c,d)}function g(a){return this instanceof g?void n.call(this,a,p.DEFLATE):new g(a)}function h(a){return this instanceof h?void n.call(this,a,p.INFLATE):new h(a)}function i(a){return this instanceof i?void n.call(this,a,p.GZIP):new i(a)}function j(a){return this instanceof j?void n.call(this,a,p.GUNZIP):new j(a)}function k(a){return this instanceof k?void n.call(this,a,p.DEFLATERAW):new k(a)}function l(a){return this instanceof l?void n.call(this,a,p.INFLATERAW):new l(a)}function m(a){return this instanceof m?void n.call(this,a,p.UNZIP):new m(a)}function n(c,d){if(this._opts=c=c||{},this._chunkSize=c.chunkSize||b.Z_DEFAULT_CHUNK,o.call(this,c),c.flush&&c.flush!==p.Z_NO_FLUSH&&c.flush!==p.Z_PARTIAL_FLUSH&&c.flush!==p.Z_SYNC_FLUSH&&c.flush!==p.Z_FULL_FLUSH&&c.flush!==p.Z_FINISH&&c.flush!==p.Z_BLOCK)throw new Error("Invalid flush flag: "+c.flush);if(this._flushFlag=c.flush||p.Z_NO_FLUSH,c.chunkSize&&(c.chunkSizeb.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+c.chunkSize);if(c.windowBits&&(c.windowBitsb.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+c.windowBits);if(c.level&&(c.levelb.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+c.level);if(c.memLevel&&(c.memLevelb.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+c.memLevel);if(c.strategy&&c.strategy!=b.Z_FILTERED&&c.strategy!=b.Z_HUFFMAN_ONLY&&c.strategy!=b.Z_RLE&&c.strategy!=b.Z_FIXED&&c.strategy!=b.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+c.strategy);if(c.dictionary&&!a.isBuffer(c.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new p.Zlib(d);var e=this;this._hadError=!1,this._binding.onerror=function(a,c){e._binding=null,e._hadError=!0;var d=new Error(a);d.errno=c,d.code=b.codes[c],e.emit("error",d)};var f=b.Z_DEFAULT_COMPRESSION;"number"==typeof c.level&&(f=c.level);var g=b.Z_DEFAULT_STRATEGY;"number"==typeof c.strategy&&(g=c.strategy),this._binding.init(c.windowBits||b.Z_DEFAULT_WINDOWBITS,f,c.memLevel||b.Z_DEFAULT_MEMLEVEL,g,c.dictionary),this._buffer=new a(this._chunkSize),this._offset=0,this._closed=!1,this._level=f,this._strategy=g,this.once("end",this.close)}var o=c(42),p=c(48),q=c(60),r=c(63).ok;p.Z_MIN_WINDOWBITS=8,p.Z_MAX_WINDOWBITS=15,p.Z_DEFAULT_WINDOWBITS=15,p.Z_MIN_CHUNK=64,p.Z_MAX_CHUNK=1/0,p.Z_DEFAULT_CHUNK=16384,p.Z_MIN_MEMLEVEL=1,p.Z_MAX_MEMLEVEL=9,p.Z_DEFAULT_MEMLEVEL=8,p.Z_MIN_LEVEL=-1,p.Z_MAX_LEVEL=9,p.Z_DEFAULT_LEVEL=p.Z_DEFAULT_COMPRESSION,Object.keys(p).forEach(function(a){a.match(/^Z/)&&(b[a]=p[a])}),b.codes={Z_OK:p.Z_OK,Z_STREAM_END:p.Z_STREAM_END,Z_NEED_DICT:p.Z_NEED_DICT,Z_ERRNO:p.Z_ERRNO,Z_STREAM_ERROR:p.Z_STREAM_ERROR,Z_DATA_ERROR:p.Z_DATA_ERROR,Z_MEM_ERROR:p.Z_MEM_ERROR,Z_BUF_ERROR:p.Z_BUF_ERROR,Z_VERSION_ERROR:p.Z_VERSION_ERROR},Object.keys(b.codes).forEach(function(a){b.codes[b.codes[a]]=a}),b.Deflate=g,b.Inflate=h,b.Gzip=i,b.Gunzip=j,b.DeflateRaw=k,b.InflateRaw=l,b.Unzip=m,b.createDeflate=function(a){return new g(a)},b.createInflate=function(a){return new h(a)},b.createDeflateRaw=function(a){return new k(a)},b.createInflateRaw=function(a){return new l(a)},b.createGzip=function(a){return new i(a)},b.createGunzip=function(a){return new j(a)},b.createUnzip=function(a){return new m(a)},b.deflate=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new g(b),a,c)},b.deflateSync=function(a,b){return f(new g(b),a)},b.gzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new i(b),a,c)},b.gzipSync=function(a,b){return f(new i(b),a)},b.deflateRaw=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new k(b),a,c)},b.deflateRawSync=function(a,b){return f(new k(b),a)},b.unzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new m(b),a,c)},b.unzipSync=function(a,b){return f(new m(b),a)},b.inflate=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new h(b),a,c)},b.inflateSync=function(a,b){return f(new h(b),a)},b.gunzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new j(b),a,c)},b.gunzipSync=function(a,b){return f(new j(b),a)},b.inflateRaw=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new l(b),a,c)},b.inflateRawSync=function(a,b){return f(new l(b),a)},q.inherits(n,o),n.prototype.params=function(a,c,e){if(ab.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+a);if(c!=b.Z_FILTERED&&c!=b.Z_HUFFMAN_ONLY&&c!=b.Z_RLE&&c!=b.Z_FIXED&&c!=b.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+c);if(this._level!==a||this._strategy!==c){var f=this;this.flush(p.Z_SYNC_FLUSH,function(){f._binding.params(a,c),f._hadError||(f._level=a,f._strategy=c,e&&e())})}else d.nextTick(e)},n.prototype.reset=function(){return this._binding.reset()},n.prototype._flush=function(b){this._transform(new a(0),"",b)},n.prototype.flush=function(b,c){var e=this._writableState;if(("function"==typeof b||void 0===b&&!c)&&(c=b,b=p.Z_FULL_FLUSH),e.ended)c&&d.nextTick(c);else if(e.ending)c&&this.once("end",c);else if(e.needDrain){var f=this;this.once("drain",function(){f.flush(c)})}else this._flushFlag=b,this.write(new a(0),"",c)},n.prototype.close=function(a){if(a&&d.nextTick(a),!this._closed){this._closed=!0,this._binding.close();var b=this;d.nextTick(function(){b.emit("close")})}},n.prototype._transform=function(b,c,d){var e,f=this._writableState,g=f.ending||f.ended,h=g&&(!b||f.length===b.length);if(null===!b&&!a.isBuffer(b))return d(new Error("invalid input"));h?e=p.Z_FINISH:(e=this._flushFlag,b.length>=f.length&&(this._flushFlag=this._opts.flush||p.Z_NO_FLUSH));this._processChunk(b,e,d)},n.prototype._processChunk=function(b,c,d){function e(k,n){if(!i._hadError){var o=g-n;if(r(o>=0,"have should not go down"),o>0){var p=i._buffer.slice(i._offset,i._offset+o);i._offset+=o,j?i.push(p):(l.push(p),m+=p.length)}if((0===n||i._offset>=i._chunkSize)&&(g=i._chunkSize,i._offset=0,i._buffer=new a(i._chunkSize)),0===n){if(h+=f-k,f=k,!j)return!0;var q=i._binding.write(c,b,h,f,i._buffer,i._offset,i._chunkSize);return q.callback=e,void(q.buffer=b)}return j?void d():!1}}var f=b&&b.length,g=this._chunkSize-this._offset,h=0,i=this,j="function"==typeof d;if(!j){var k,l=[],m=0;this.on("error",function(a){k=a});do var n=this._binding.writeSync(c,b,h,f,this._buffer,this._offset,g);while(!this._hadError&&e(n[0],n[1]));if(this._hadError)throw k;var o=a.concat(l,m);return this.close(),o}var p=this._binding.write(c,b,h,f,this._buffer,this._offset,g);p.buffer=b,p.callback=e},q.inherits(g,n),q.inherits(h,n),q.inherits(i,n),q.inherits(j,n),q.inherits(k,n),q.inherits(l,n),q.inherits(m,n)}).call(b,c(2).Buffer,c(30))},function(a,b,c){(function(a,d){function e(a){if(ab.UNZIP)throw new TypeError("Bad argument");this.mode=a,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function f(a,b){for(var c=0;c4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-ja?a.strstart-(a.w_size-ja):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ia,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ia-(m-f),f=m-ia,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-ja)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=ha)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sa;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sa;if(a.strstart-a.block_start>=a.w_size-ja&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sa:sa}function o(a,b){for(var c,d;;){if(a.lookahead=ha&&(a.ins_h=(a.ins_h<=ha)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-ha),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=ha){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<=ha&&(a.ins_h=(a.ins_h<4096)&&(a.match_length=ha-1)),a.prev_length>=ha&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-ha,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-ha),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<=ha&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ia;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ia-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=ha?(c=D._tr_tally(a,1,a.match_length-ha),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sa:ta}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sa;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sa:ta}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=ha-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fa),this.dyn_dtree=new C.Buf16(2*(2*da+1)),this.bl_tree=new C.Buf16(2*(2*ea+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(ga+1),this.heap=new C.Buf16(2*ca+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*ca+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?la:qa,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===ra&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===la)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=ma):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wa),h.status=qa);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=ka),m+=31-m%31,h.status=qa,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===ma)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=na)}else h.status=na;if(h.status===na)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=oa)}else h.status=oa;if(h.status===oa)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pa)}else h.status=pa;if(h.status===pa&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qa)):h.status=qa),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===ra&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==ra){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if(o!==ua&&o!==va||(h.status=ra),o===sa||o===ua)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===ta&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==la&&b!==ma&&b!==na&&b!==oa&&b!==pa&&b!==qa&&b!==ra?d(a,O):(a.state=null,b===qa?d(a,P):M)):O}var B,C=c(52),D=c(53),E=c(54),F=c(55),G=c(49),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,aa=29,ba=256,ca=ba+1+aa,da=30,ea=19,fa=2*ca+1,ga=15,ha=3,ia=258,ja=ia+ha+1,ka=32,la=42,ma=69,na=73,oa=91,pa=103,qa=113,ra=666,sa=1,ta=2,ua=3,va=4,wa=3,xa=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xa(0,0,0,0,n),new xa(4,4,8,4,o),new xa(4,5,16,8,o),new xa(4,6,32,32,o),new xa(4,4,16,16,p),new xa(8,16,32,32,p),new xa(8,16,128,128,p),new xa(8,32,128,256,p),new xa(32,128,258,1024,p),new xa(32,258,258,4096,p)],b.deflateInit=y,b.deflateInit2=x,b.deflateReset=v,b.deflateResetKeep=u,b.deflateSetHeader=w,b.deflate=z,b.deflateEnd=A,b.deflateInfo="pako deflate (from Nodeca project)"},function(a,b){"use strict";var c="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;b.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},b.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var d={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},e={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};b.setTyped=function(a){a?(b.Buf8=Uint8Array,b.Buf16=Uint16Array,b.Buf32=Int32Array,b.assign(b,d)):(b.Buf8=Array,b.Buf16=Array,b.Buf32=Array,b.assign(b,e))},b.setTyped(c)},function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?ga[a]:ga[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ia[d]=c,a=0;a<1<<_[d];a++)ha[c++]=d;for(ha[c-1]=d,e=0,d=0;16>d;d++)for(ja[d]=e,a=0;a<1<>=7;R>d;d++)for(ja[d]=e<<7,a=0;a<1<=b;b++)f[b]=0;for(a=0;143>=a;)ea[2*a+1]=8,a++,f[8]++;for(;255>=a;)ea[2*a+1]=9,a++,f[9]++;for(;279>=a;)ea[2*a+1]=7,a++,f[7]++;for(;287>=a;)ea[2*a+1]=8,a++,f[8]++;for(l(ea,Q+1,f),a=0;R>a;a++)fa[2*a+1]=5,fa[2*a]=i(a,5);ka=new na(ea,_,P+1,Q,U),la=new na(fa,aa,0,R,U),ma=new na(new Array(0),ba,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++hh?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++jj){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*ca[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*ca[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pa||(m(),pa=!0),a.l_desc=new oa(a.dyn_ltree,ka),a.d_desc=new oa(a.dyn_dtree,la),a.bl_desc=new oa(a.bl_tree,ma),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,ea),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,ea,fa)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(ha[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=c(52),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],aa=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ba=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ca=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],da=512,ea=new Array(2*(Q+2));d(ea);var fa=new Array(2*R);d(fa);var ga=new Array(da);d(ga);var ha=new Array(N-M+1);d(ha);var ia=new Array(O);d(ia);var ja=new Array(R);d(ja);var ka,la,ma,na=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},oa=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pa=!1;b._tr_init=z,b._tr_stored_block=A,b._tr_flush_block=C,b._tr_tally=D,b._tr_align=B},function(a,b){"use strict";function c(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}a.exports=c},function(a,b){"use strict";function c(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function d(a,b,c,d){var f=e,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^f[255&(a^b[h])];return-1^a}var e=c();a.exports=d},function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(oa),b.distcode=b.distdyn=new r.Buf32(pa),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,ra)}function k(a){if(sa){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sa=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whaven;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Ba,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=la;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=la;break}if(m>>>=4,n-=4,wa=(15&m)+8,0===c.wbits)c.wbits=wa;else if(wa>c.wbits){a.msg="invalid window size",c.mode=la;break}c.dmax=1<n;){if(0===i)break a;i--,m+=e[g++]<>8&1),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,Ba[2]=m>>>16&255,Ba[3]=m>>>24&255,c.check=t(c.check,Ba,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>8),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wa=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wa)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.name+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.comment+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>=7&n,n-=7&n,c.mode=ia;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=ba,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=la}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<>>16^65535)){a.msg="invalid stored block lengths",c.mode=la;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=la;break}c.have=0,c.mode=_;case _:for(;c.haven;){if(0===i)break a;i--,m+=e[g++]<>>=3,n-=3}for(;c.have<19;)c.lens[Ca[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ya={bits:c.lenbits},xa=v(w,c.lens,0,19,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid code lengths set",c.mode=la;break}c.have=0,c.mode=aa;case aa:for(;c.have>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<sa)m>>>=qa,n-=qa,c.lens[c.have++]=sa;else{if(16===sa){for(za=qa+2;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,0===c.have){a.msg="invalid bit length repeat",c.mode=la;break}wa=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sa){for(za=qa+3;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,wa=0,q=3+(7&m),m>>>=3,n-=3}else{for(za=qa+7;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,wa=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=la;break}for(;q--;)c.lens[c.have++]=wa}}if(c.mode===la)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=la;break}if(c.lenbits=9,ya={bits:c.lenbits},xa=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid literal/lengths set",c.mode=la;break}if(c.distbits=6,c.distcode=c.distdyn,ya={bits:c.distbits},xa=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ya),c.distbits=ya.bits,xa){a.msg="invalid distances set",c.mode=la;break}if(c.mode=ba,b===B)break a;case ba:c.mode=ca;case ca:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Aa=c.lencode[m&(1<>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,c.length=sa,0===ra){c.mode=ha;break}if(32&ra){c.back=-1,c.mode=V;break}if(64&ra){a.msg="invalid literal/length code",c.mode=la;break}c.extra=15&ra,c.mode=da;case da:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=ea;case ea:for(;Aa=c.distcode[m&(1<>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,64&ra){a.msg="invalid distance code",c.mode=la;break}c.offset=sa,c.extra=15&ra,c.mode=fa;case fa:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=la;break}c.mode=ga;case ga:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=la;break}q>c.wnext?(q-=c.wnext,oa=c.wsize-q):oa=c.wnext-q,q>c.length&&(q=c.length),pa=c.window}else pa=f,oa=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pa[oa++];while(--q);0===c.length&&(c.mode=ca);break;case ha:if(0===j)break a;f[h++]=c.length,j--,c.mode=ca;break;case ia:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<n;){if(0===i)break a;i--,m+=e[g++]<q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<q&&(p+=B[f++]<>>=w,q-=w),15>q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<q&&(p+=B[f++]<q&&(p+=B[f++]<k){a.msg="invalid distance too far back",e.mode=c;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&e.sane){a.msg="invalid distance too far back",e.mode=c;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),e.hold=p,e.bits=q}},function(a,b,c){"use strict";var d=c(52),e=15,f=852,g=592,h=0,i=1,j=2,k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];a.exports=function(a,b,c,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new d.Buf16(e+1),Q=new d.Buf16(e+1),R=null,S=0;for(D=0;e>=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[c+E]]++;for(H=C,G=e;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;e>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===h||1!==G))return-1;for(Q[1]=0,D=1;e>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[c+E]&&(r[Q[b[c+E]]++]=E);if(a===h?(N=R=r,y=19):a===i?(N=k,O-=257,R=l,S-=257,y=256):(N=m,R=n,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<f||a===j&&L>g)return 1;for(var T=0;;){T++,z=D-J,r[E]y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[c+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<f||a===j&&L>g)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},function(a,b){a.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(a,b,c){(function(a,d){function e(a,c){var d={seen:[],stylize:g};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),p(c)?d.showHidden=c:c&&b._extend(d,c),v(d.showHidden)&&(d.showHidden=!1),v(d.depth)&&(d.depth=2),v(d.colors)&&(d.colors=!1),v(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=f),i(d,a,d.depth)}function f(a,b){var c=e.styles[b];return c?"["+e.colors[c][0]+"m"+a+"["+e.colors[c][1]+"m":a}function g(a,b){return a}function h(a){var b={};return a.forEach(function(a,c){b[a]=!0}),b}function i(a,c,d){if(a.customInspect&&c&&A(c.inspect)&&c.inspect!==b.inspect&&(!c.constructor||c.constructor.prototype!==c)){var e=c.inspect(d,a);return t(e)||(e=i(a,e,d)),e}var f=j(a,c);if(f)return f;var g=Object.keys(c),p=h(g);if(a.showHidden&&(g=Object.getOwnPropertyNames(c)),z(c)&&(g.indexOf("message")>=0||g.indexOf("description")>=0))return k(c);if(0===g.length){if(A(c)){var q=c.name?": "+c.name:"";return a.stylize("[Function"+q+"]","special")}if(w(c))return a.stylize(RegExp.prototype.toString.call(c),"regexp");if(y(c))return a.stylize(Date.prototype.toString.call(c),"date");if(z(c))return k(c)}var r="",s=!1,u=["{","}"];if(o(c)&&(s=!0,u=["[","]"]),A(c)){var v=c.name?": "+c.name:"";r=" [Function"+v+"]"}if(w(c)&&(r=" "+RegExp.prototype.toString.call(c)),y(c)&&(r=" "+Date.prototype.toUTCString.call(c)),z(c)&&(r=" "+k(c)),0===g.length&&(!s||0==c.length))return u[0]+r+u[1];if(0>d)return w(c)?a.stylize(RegExp.prototype.toString.call(c),"regexp"):a.stylize("[Object]","special");a.seen.push(c);var x;return x=s?l(a,c,d,p,g):g.map(function(b){return m(a,c,d,p,b,s)}),a.seen.pop(),n(x,r,u)}function j(a,b){if(v(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return s(b)?a.stylize(""+b,"number"):p(b)?a.stylize(""+b,"boolean"):q(b)?a.stylize("null","null"):void 0}function k(a){return"["+Error.prototype.toString.call(a)+"]"}function l(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)F(b,String(g))?f.push(m(a,b,c,d,String(g),!0)):f.push("");return e.forEach(function(e){e.match(/^\d+$/)||f.push(m(a,b,c,d,e,!0))}),f}function m(a,b,c,d,e,f){var g,h,j;if(j=Object.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?h=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(h=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),h||(a.seen.indexOf(j.value)<0?(h=q(c)?i(a,j.value,null):i(a,j.value,c-1),h.indexOf("\n")>-1&&(h=f?h.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+h.split("\n").map(function(a){return" "+a}).join("\n"))):h=a.stylize("[Circular]","special")),v(g)){if(f&&e.match(/^\d+$/))return h;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+h}function n(a,b,c){var d=0,e=a.reduce(function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function o(a){return Array.isArray(a)}function p(a){return"boolean"==typeof a}function q(a){return null===a}function r(a){return null==a}function s(a){return"number"==typeof a}function t(a){return"string"==typeof a}function u(a){return"symbol"==typeof a}function v(a){return void 0===a}function w(a){return x(a)&&"[object RegExp]"===C(a)}function x(a){return"object"==typeof a&&null!==a}function y(a){return x(a)&&"[object Date]"===C(a)}function z(a){return x(a)&&("[object Error]"===C(a)||a instanceof Error)}function A(a){return"function"==typeof a}function B(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),J[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=/%[sdj%]/g;b.format=function(a){if(!t(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(d[c++]);case"%d":return Number(d[c++]);case"%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),h=d[c];f>c;h=d[++c])g+=q(h)||!x(h)?" "+h:" "+e(h);return g},b.deprecate=function(c,e){function f(){if(!g){if(d.throwDeprecation)throw new Error(e);d.traceDeprecation?console.trace(e):console.error(e),g=!0}return c.apply(this,arguments)}if(v(a.process))return function(){return b.deprecate(c,e).apply(this,arguments)};if(d.noDeprecation===!0)return c;var g=!1;return f};var H,I={};b.debuglog=function(a){if(v(H)&&(H=d.env.NODE_DEBUG||""),a=a.toUpperCase(),!I[a])if(new RegExp("\\b"+a+"\\b","i").test(H)){var c=d.pid;I[a]=function(){var d=b.format.apply(b,arguments);console.error("%s %d: %s",a,c,d)}}else I[a]=function(){};return I[a]},b.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},b.isArray=o,b.isBoolean=p,b.isNull=q,b.isNullOrUndefined=r,b.isNumber=s,b.isString=t,b.isSymbol=u,b.isUndefined=v,b.isRegExp=w,b.isObject=x,b.isDate=y,b.isError=z,b.isFunction=A,b.isPrimitive=B,b.isBuffer=c(61);var J=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];b.log=function(){console.log("%s - %s",E(),b.format.apply(b,arguments))},b.inherits=c(62),b._extend=function(a,b){if(!b||!x(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}}).call(b,function(){return this}(),c(30))},function(a,b){a.exports=function(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.readUInt8}},function(a,b){"function"==typeof Object.create?a.exports=function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:a.exports=function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},function(a,b,c){function d(a,b){return n.isUndefined(b)?""+b:n.isNumber(b)&&!isFinite(b)?b.toString():n.isFunction(b)||n.isRegExp(b)?b.toString():b}function e(a,b){return n.isString(a)?a.length=0;f--)if(g[f]!=h[f])return!1;for(f=g.length-1;f>=0;f--)if(e=g[f],!i(a[e],b[e]))return!1;return!0}function l(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0:!1}function m(a,b,c,d){var e;n.isString(c)&&(d=c,c=null);try{b()}catch(f){e=f}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&g(e,c,"Missing expected exception"+d),!a&&l(e,c)&&g(e,c,"Got unwanted exception"+d),a&&e&&c&&!l(e,c)||!a&&e)throw e}var n=c(60),o=Array.prototype.slice,p=Object.prototype.hasOwnProperty,q=a.exports=h;q.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,a.message?(this.message=a.message,this.generatedMessage=!1):(this.message=f(this),this.generatedMessage=!0);var b=a.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,b);else{var c=new Error;if(c.stack){var d=c.stack,e=b.name,h=d.indexOf("\n"+e);if(h>=0){var i=d.indexOf("\n",h+1);d=d.substring(i+1)}this.stack=d}}},n.inherits(q.AssertionError,Error),q.fail=g,q.ok=h,q.equal=function(a,b,c){a!=b&&g(a,b,c,"==",q.equal)},q.notEqual=function(a,b,c){a==b&&g(a,b,c,"!=",q.notEqual)},q.deepEqual=function(a,b,c){i(a,b)||g(a,b,c,"deepEqual",q.deepEqual)},q.notDeepEqual=function(a,b,c){i(a,b)&&g(a,b,c,"notDeepEqual",q.notDeepEqual)},q.strictEqual=function(a,b,c){a!==b&&g(a,b,c,"===",q.strictEqual)},q.notStrictEqual=function(a,b,c){a===b&&g(a,b,c,"!==",q.notStrictEqual)},q["throws"]=function(a,b,c){m.apply(this,[!0].concat(o.call(arguments)))},q.doesNotThrow=function(a,b){m.apply(this,[!1].concat(o.call(arguments)))},q.ifError=function(a){if(a)throw a};var r=Object.keys||function(a){var b=[];for(var c in a)p.call(a,c)&&b.push(c);return b}},function(a,b){(function(){var b;b=function(){function a(a,d){var e;this.document=a,null==d&&(d={}),this.size=d.size||"letter",this.layout=d.layout||"portrait","number"==typeof d.margin?this.margins={top:d.margin,left:d.margin,bottom:d.margin,right:d.margin}:this.margins=d.margins||b,e=Array.isArray(this.size)?this.size:c[this.size.toUpperCase()],this.width=e["portrait"===this.layout?0:1],this.height=e["portrait"===this.layout?1:0],this.content=this.document.ref(),this.resources=this.document.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"]}),Object.defineProperties(this,{fonts:{get:function(a){return function(){var b;return null!=(b=a.resources.data).Font?b.Font:b.Font={}}}(this)},xobjects:{get:function(a){return function(){var b;return null!=(b=a.resources.data).XObject?b.XObject:b.XObject={}}}(this)},ext_gstates:{get:function(a){return function(){var b;return null!=(b=a.resources.data).ExtGState?b.ExtGState:b.ExtGState={}}}(this)},patterns:{get:function(a){return function(){var b;return null!=(b=a.resources.data).Pattern?b.Pattern:b.Pattern={}}}(this)},annotations:{get:function(a){return function(){var b;return null!=(b=a.dictionary.data).Annots?b.Annots:b.Annots=[]}}(this)}}),this.dictionary=this.document.ref({Type:"Page",Parent:this.document._root.data.Pages,MediaBox:[0,0,this.width,this.height],Contents:this.content,Resources:this.resources})}var b,c;return a.prototype.maxY=function(){return this.height-this.margins.bottom},a.prototype.write=function(a){return this.content.write(a)},a.prototype.end=function(){return this.dictionary.end(),this.resources.end(),this.content.end()},b={top:72,left:72,bottom:72,right:72},c={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008], +LETTER:[612,792],TABLOID:[792,1224]},a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f,g;g=c(66),b=g.PDFGradient,d=g.PDFLinearGradient,e=g.PDFRadialGradient,a.exports={initColor:function(){return this._opacityRegistry={},this._opacityCount=0,this._gradCount=0},_normalizeColor:function(a){var c,d;return a instanceof b?a:("string"==typeof a&&("#"===a.charAt(0)?(4===a.length&&(a=a.replace(/#([0-9A-F])([0-9A-F])([0-9A-F])/i,"#$1$1$2$2$3$3")),c=parseInt(a.slice(1),16),a=[c>>16,c>>8&255,255&c]):f[a]&&(a=f[a])),Array.isArray(a)?(3===a.length?a=function(){var b,c,e;for(e=[],b=0,c=a.length;c>b;b++)d=a[b],e.push(d/255);return e}():4===a.length&&(a=function(){var b,c,e;for(e=[],b=0,c=a.length;c>b;b++)d=a[b],e.push(d/100);return e}()),a):null)},_setColor:function(a,c){var d,e,f,g;return(a=this._normalizeColor(a))?(this._sMasked&&(d=this.ref({Type:"ExtGState",SMask:"None"}),d.end(),e="Gs"+ ++this._opacityCount,this.page.ext_gstates[e]=d,this.addContent("/"+e+" gs"),this._sMasked=!1),f=c?"SCN":"scn",a instanceof b?(this._setColorSpace("Pattern",c),a.apply(f)):(g=4===a.length?"DeviceCMYK":"DeviceRGB",this._setColorSpace(g,c),a=a.join(" "),this.addContent(""+a+" "+f)),!0):!1},_setColorSpace:function(a,b){var c;return c=b?"CS":"cs",this.addContent("/"+a+" "+c)},fillColor:function(a,b){var c;return null==b&&(b=1),c=this._setColor(a,!1),c&&this.fillOpacity(b),this._fillColor=[a,b],this},strokeColor:function(a,b){var c;return null==b&&(b=1),c=this._setColor(a,!0),c&&this.strokeOpacity(b),this},opacity:function(a){return this._doOpacity(a,a),this},fillOpacity:function(a){return this._doOpacity(a,null),this},strokeOpacity:function(a){return this._doOpacity(null,a),this},_doOpacity:function(a,b){var c,d,e,f,g;if(null!=a||null!=b)return null!=a&&(a=Math.max(0,Math.min(1,a))),null!=b&&(b=Math.max(0,Math.min(1,b))),e=""+a+"_"+b,this._opacityRegistry[e]?(g=this._opacityRegistry[e],c=g[0],f=g[1]):(c={Type:"ExtGState"},null!=a&&(c.ca=a),null!=b&&(c.CA=b),c=this.ref(c),c.end(),d=++this._opacityCount,f="Gs"+d,this._opacityRegistry[e]=[c,f]),this.page.ext_gstates[f]=c,this.addContent("/"+f+" gs")},linearGradient:function(a,b,c,e){return new d(this,a,b,c,e)},radialGradient:function(a,b,c,d,f,g){return new e(this,a,b,c,d,f,g)}},f={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}).call(this)},function(a,b){(function(){var b,c,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};b=function(){function a(a){this.doc=a,this.stops=[],this.embedded=!1,this.transform=[1,0,0,1,0,0],this._colorSpace="DeviceRGB"}return a.prototype.stop=function(a,b,c){return null==c&&(c=1),c=Math.max(0,Math.min(1,c)),this.stops.push([a,this.doc._normalizeColor(b),c]),this},a.prototype.embed=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J;if(!this.embedded&&0!==this.stops.length){for(this.embedded=!0,k=this.stops[this.stops.length-1],k[0]<1&&this.stops.push([1,k[1],k[2]]),a=[],d=[],C=[],j=E=0,H=this.stops.length-1;H>=0?H>E:E>H;j=H>=0?++E:--E)d.push(0,1),j+2!==this.stops.length&&a.push(this.stops[j+1][0]),e=this.doc.ref({FunctionType:2,Domain:[0,1],C0:this.stops[j+0][1],C1:this.stops[j+1][1],N:1}),C.push(e),e.end();if(1===C.length?e=C[0]:(e=this.doc.ref({FunctionType:3,Domain:[0,1],Functions:C,Bounds:a,Encode:d}),e.end()),this.id="Sh"+ ++this.doc._gradCount,l=this.doc._ctm.slice(),m=l[0],n=l[1],q=l[2],t=l[3],u=l[4],v=l[5],I=this.transform,o=I[0],p=I[1],r=I[2],s=I[3],b=I[4],c=I[5],l[0]=m*o+q*p,l[1]=n*o+t*p,l[2]=m*r+q*s,l[3]=n*r+t*s,l[4]=m*b+q*c+u,l[5]=n*b+t*c+v,A=this.shader(e),A.end(),x=this.doc.ref({Type:"Pattern",PatternType:2,Shading:A,Matrix:function(){var a,b,c;for(c=[],a=0,b=l.length;b>a;a++)D=l[a],c.push(+D.toFixed(5));return c}()}),this.doc.page.patterns[this.id]=x,x.end(),this.stops.some(function(a){return a[2]<1})){for(g=this.opacityGradient(),g._colorSpace="DeviceGray",J=this.stops,F=0,G=J.length;G>F;F++)B=J[F],g.stop(B[0],[B[2]]);g=g.embed(),h=this.doc.ref({Type:"Group",S:"Transparency",CS:"DeviceGray"}),h.end(),y=this.doc.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"],Shading:{Sh1:g.data.Shading}}),y.end(),f=this.doc.ref({Type:"XObject",Subtype:"Form",FormType:1,BBox:[0,0,this.doc.page.width,this.doc.page.height],Group:h,Resources:y}),f.end("/Sh1 sh"),z=this.doc.ref({Type:"Mask",S:"Luminosity",G:f}),z.end(),i=this.doc.ref({Type:"ExtGState",SMask:z}),this.opacity_id=++this.doc._opacityCount,w="Gs"+this.opacity_id,this.doc.page.ext_gstates[w]=i,i.end()}return x}},a.prototype.apply=function(a){return this.embedded||this.embed(),this.doc.addContent("/"+this.id+" "+a),this.opacity_id?(this.doc.addContent("/Gs"+this.opacity_id+" gs"),this.doc._sMasked=!0):void 0},a}(),c=function(a){function b(a,c,d,e,f){this.doc=a,this.x1=c,this.y1=d,this.x2=e,this.y2=f,b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.shader=function(a){return this.doc.ref({ShadingType:2,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.x2,this.y2],Function:a,Extend:[!0,!0]})},b.prototype.opacityGradient=function(){return new b(this.doc,this.x1,this.y1,this.x2,this.y2)},b}(b),d=function(a){function b(a,c,d,e,f,g,h){this.doc=a,this.x1=c,this.y1=d,this.r1=e,this.x2=f,this.y2=g,this.r2=h,b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.shader=function(a){return this.doc.ref({ShadingType:3,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.r1,this.x2,this.y2,this.r2],Function:a,Extend:[!0,!0]})},b.prototype.opacityGradient=function(){return new b(this.doc,this.x1,this.y1,this.r1,this.x2,this.y2,this.r2)},b}(b),a.exports={PDFGradient:b,PDFLinearGradient:c,PDFRadialGradient:d}}).call(this)},function(a,b,c){(function(){var b,d,e=[].slice;d=c(68),b=4*((Math.sqrt(2)-1)/3),a.exports={initVector:function(){return this._ctm=[1,0,0,1,0,0],this._ctmStack=[]},save:function(){return this._ctmStack.push(this._ctm.slice()),this.addContent("q")},restore:function(){return this._ctm=this._ctmStack.pop()||[1,0,0,1,0,0],this.addContent("Q")},closePath:function(){return this.addContent("h")},lineWidth:function(a){return this.addContent(""+a+" w")},_CAP_STYLES:{BUTT:0,ROUND:1,SQUARE:2},lineCap:function(a){return"string"==typeof a&&(a=this._CAP_STYLES[a.toUpperCase()]),this.addContent(""+a+" J")},_JOIN_STYLES:{MITER:0,ROUND:1,BEVEL:2},lineJoin:function(a){return"string"==typeof a&&(a=this._JOIN_STYLES[a.toUpperCase()]),this.addContent(""+a+" j")},miterLimit:function(a){return this.addContent(""+a+" M")},dash:function(a,b){var c,d,e;return null==b&&(b={}),null==a?this:(d=null!=(e=b.space)?e:a,c=b.phase||0,this.addContent("["+a+" "+d+"] "+c+" d"))},undash:function(){return this.addContent("[] 0 d")},moveTo:function(a,b){return this.addContent(""+a+" "+b+" m")},lineTo:function(a,b){return this.addContent(""+a+" "+b+" l")},bezierCurveTo:function(a,b,c,d,e,f){return this.addContent(""+a+" "+b+" "+c+" "+d+" "+e+" "+f+" c")},quadraticCurveTo:function(a,b,c,d){return this.addContent(""+a+" "+b+" "+c+" "+d+" v")},rect:function(a,b,c,d){return this.addContent(""+a+" "+b+" "+c+" "+d+" re")},roundedRect:function(a,b,c,d,e){return null==e&&(e=0),this.moveTo(a+e,b),this.lineTo(a+c-e,b),this.quadraticCurveTo(a+c,b,a+c,b+e),this.lineTo(a+c,b+d-e),this.quadraticCurveTo(a+c,b+d,a+c-e,b+d),this.lineTo(a+e,b+d),this.quadraticCurveTo(a,b+d,a,b+d-e),this.lineTo(a,b+e),this.quadraticCurveTo(a,b,a+e,b)},ellipse:function(a,c,d,e){var f,g,h,i,j,k;return null==e&&(e=d),a-=d,c-=e,f=d*b,g=e*b,h=a+2*d,j=c+2*e,i=a+d,k=c+e,this.moveTo(a,k),this.bezierCurveTo(a,k-g,i-f,c,i,c),this.bezierCurveTo(i+f,c,h,k-g,h,k),this.bezierCurveTo(h,k+g,i+f,j,i,j),this.bezierCurveTo(i-f,j,a,k+g,a,k),this.closePath()},circle:function(a,b,c){return this.ellipse(a,b,c)},polygon:function(){var a,b,c,d;for(b=1<=arguments.length?e.call(arguments,0):[],this.moveTo.apply(this,b.shift()),c=0,d=b.length;d>c;c++)a=b[c],this.lineTo.apply(this,a);return this.closePath()},path:function(a){return d.apply(this,a),this},_windingRule:function(a){return/even-?odd/.test(a)?"*":""},fill:function(a,b){return/(even-?odd)|(non-?zero)/.test(a)&&(b=a,a=null),a&&this.fillColor(a),this.addContent("f"+this._windingRule(b))},stroke:function(a){return a&&this.strokeColor(a),this.addContent("S")},fillAndStroke:function(a,b,c){var d;return null==b&&(b=a),d=/(even-?odd)|(non-?zero)/,d.test(a)&&(c=a,a=null),d.test(b)&&(c=b,b=a),a&&(this.fillColor(a),this.strokeColor(b)),this.addContent("B"+this._windingRule(c))},clip:function(a){return this.addContent("W"+this._windingRule(a)+" n")},transform:function(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o;return g=this._ctm,h=g[0],i=g[1],j=g[2],k=g[3],l=g[4],m=g[5],g[0]=h*a+j*b,g[1]=i*a+k*b,g[2]=h*c+j*d,g[3]=i*c+k*d,g[4]=h*e+j*f+l,g[5]=i*e+k*f+m,o=function(){var g,h,i,j;for(i=[a,b,c,d,e,f],j=[],g=0,h=i.length;h>g;g++)n=i[g],j.push(+n.toFixed(5));return j}().join(" "),this.addContent(""+o+" cm")},translate:function(a,b){return this.transform(1,0,0,1,a,b)},rotate:function(a,b){var c,d,e,f,g,h,i,j;return null==b&&(b={}),d=a*Math.PI/180,c=Math.cos(d),e=Math.sin(d),f=h=0,null!=b.origin&&(j=b.origin,f=j[0],h=j[1],g=f*c-h*e,i=f*e+h*c,f-=g,h-=i),this.transform(c,e,-e,c,f,h)},scale:function(a,b,c){var d,e,f;return null==b&&(b=a),null==c&&(c={}),2===arguments.length&&(b=a,c=b),d=e=0,null!=c.origin&&(f=c.origin,d=f[0],e=f[1],d-=a*d,e-=b*e),this.transform(a,0,0,b,d,e)}}}).call(this)},function(a,b){(function(){var b;b=function(){function a(){}var b,c,d,e,f,g,h,i,j,k,l,m,n;return a.apply=function(a,c){var d;return d=g(c),b(d,a)},f={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},g=function(a){var b,c,d,e,g,h,i,j,k;for(i=[],b=[],e="",g=!1,h=0,j=0,k=a.length;k>j;j++)if(c=a[j],null!=f[c])h=f[c],d&&(e.length>0&&(b[b.length]=+e),i[i.length]={cmd:d,args:b},b=[],e="",g=!1),d=c;else if(" "===c||","===c||"-"===c&&e.length>0&&"e"!==e[e.length-1]||"."===c&&g){if(0===e.length)continue;b.length===h?(i[i.length]={cmd:d,args:b},b=[+e],"M"===d&&(d="L"),"m"===d&&(d="l")):b[b.length]=+e,g="."===c,e="-"===c||"."===c?c:""}else e+=c,"."===c&&(g=!0);return e.length>0&&(b.length===h?(i[i.length]={cmd:d,args:b},b=[+e],"M"===d&&(d="L"),"m"===d&&(d="l")):b[b.length]=+e),i[i.length]={cmd:d,args:b},i},d=e=h=i=m=n=0,b=function(a,b){var c,f,g,k,l;for(d=e=h=i=m=n=0,f=g=0,k=a.length;k>g;f=++g)c=a[f],"function"==typeof j[l=c.cmd]&&j[l](b,c.args);return d=e=h=i=0},j={M:function(a,b){return d=b[0],e=b[1],h=i=null,m=d,n=e,a.moveTo(d,e)},m:function(a,b){return d+=b[0],e+=b[1],h=i=null,m=d,n=e,a.moveTo(d,e)},C:function(a,b){return d=b[4],e=b[5],h=b[2],i=b[3],a.bezierCurveTo.apply(a,b)},c:function(a,b){return a.bezierCurveTo(b[0]+d,b[1]+e,b[2]+d,b[3]+e,b[4]+d,b[5]+e),h=d+b[2],i=e+b[3],d+=b[4],e+=b[5]},S:function(a,b){return null===h&&(h=d,i=e),a.bezierCurveTo(d-(h-d),e-(i-e),b[0],b[1],b[2],b[3]),h=b[0],i=b[1],d=b[2],e=b[3]},s:function(a,b){return null===h&&(h=d,i=e),a.bezierCurveTo(d-(h-d),e-(i-e),d+b[0],e+b[1],d+b[2],e+b[3]),h=d+b[0],i=e+b[1],d+=b[2],e+=b[3]},Q:function(a,b){return h=b[0],i=b[1],d=b[2],e=b[3],a.quadraticCurveTo(b[0],b[1],d,e)},q:function(a,b){return a.quadraticCurveTo(b[0]+d,b[1]+e,b[2]+d,b[3]+e),h=d+b[0],i=e+b[1],d+=b[2],e+=b[3]},T:function(a,b){return null===h?(h=d,i=e):(h=d-(h-d),i=e-(i-e)),a.quadraticCurveTo(h,i,b[0],b[1]),h=d-(h-d),i=e-(i-e),d=b[0],e=b[1]},t:function(a,b){return null===h?(h=d,i=e):(h=d-(h-d),i=e-(i-e)),a.quadraticCurveTo(h,i,d+b[0],e+b[1]),d+=b[0],e+=b[1]},A:function(a,b){return l(a,d,e,b),d=b[5],e=b[6]},a:function(a,b){return b[5]+=d,b[6]+=e,l(a,d,e,b),d=b[5],e=b[6]},L:function(a,b){return d=b[0],e=b[1],h=i=null,a.lineTo(d,e)},l:function(a,b){return d+=b[0],e+=b[1],h=i=null,a.lineTo(d,e)},H:function(a,b){return d=b[0],h=i=null,a.lineTo(d,e)},h:function(a,b){return d+=b[0],h=i=null,a.lineTo(d,e)},V:function(a,b){return e=b[0],h=i=null,a.lineTo(d,e)},v:function(a,b){return e+=b[0],h=i=null,a.lineTo(d,e)},Z:function(a){return a.closePath(),d=m,e=n},z:function(a){return a.closePath(),d=m,e=n}},l=function(a,b,d,e){var f,g,h,i,j,l,m,n,o,p,q,r,s;for(l=e[0],m=e[1],j=e[2],i=e[3],p=e[4],g=e[5],h=e[6],o=c(g,h,l,m,i,p,j,b,d),s=[],q=0,r=o.length;r>q;q++)n=o[q],f=k.apply(null,n),s.push(a.bezierCurveTo.apply(a,f));return s},c=function(a,b,c,d,e,f,g,j,k){var l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K;for(y=g*(Math.PI/180),x=Math.sin(y),p=Math.cos(y),c=Math.abs(c),d=Math.abs(d),h=p*(j-a)*.5+x*(k-b)*.5,i=p*(k-b)*.5-x*(j-a)*.5,s=h*h/(c*c)+i*i/(d*d),s>1&&(s=Math.sqrt(s),c*=s,d*=s),l=p/c,m=x/c,n=-x/d,o=p/d,E=l*j+m*k,H=n*j+o*k,F=l*a+m*b,I=n*a+o*b,q=(F-E)*(F-E)+(I-H)*(I-H),w=1/q-.25,0>w&&(w=0),v=Math.sqrt(w),f===e&&(v=-v),G=.5*(E+F)-v*(I-H),J=.5*(H+I)+v*(F-E),z=Math.atan2(H-J,E-G),A=Math.atan2(I-J,F-G),D=A-z,0>D&&1===f?D+=2*Math.PI:D>0&&0===f&&(D-=2*Math.PI),u=Math.ceil(Math.abs(D/(.5*Math.PI+.001))),t=[],r=K=0;u>=0?u>K:K>u;r=u>=0?++K:--K)B=z+r*D/u,C=z+(r+1)*D/u,t[r]=[G,J,B,C,c,d,x,p];return t},k=function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q,r,s,t;return i=h*e,j=-g*f,k=g*e,l=h*f,n=.5*(d-c),m=8/3*Math.sin(.5*n)*Math.sin(.5*n)/Math.sin(n),o=a+Math.cos(c)-m*Math.sin(c),r=b+Math.sin(c)+m*Math.cos(c),q=a+Math.cos(d),t=b+Math.sin(d),p=q+m*Math.sin(d),s=t-m*Math.cos(d),[i*o+j*r,k*o+l*r,i*p+j*s,k*p+l*s,i*q+j*t,k*q+l*t]},a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b;b=c(70),a.exports={initFonts:function(){this._fontFamilies={},this._fontCount=0,this._fontSize=12,this._font=null,this._registeredFonts={}},font:function(a,c,d){var e,f,g,h;return"number"==typeof c&&(d=c,c=null),"string"==typeof a&&this._registeredFonts[a]?(e=a,h=this._registeredFonts[a],a=h.src,c=h.family):(e=c||a,"string"!=typeof e&&(e=null)),null!=d&&this.fontSize(d),(f=this._fontFamilies[e])?(this._font=f,this):(g="F"+ ++this._fontCount,this._font=new b(this,a,c,g),(f=this._fontFamilies[this._font.name])?(this._font=f,this):(e&&(this._fontFamilies[e]=this._font),this._fontFamilies[this._font.name]=this._font,this))},fontSize:function(a){return this._fontSize=a,this},currentLineHeight:function(a){return null==a&&(a=!1),this._font.lineHeight(this._fontSize,a)},registerFont:function(a,b,c){return this._registeredFonts[a]={src:b,family:c},this}}}).call(this)},function(a,b,c){(function(b,d){(function(){var e,f,g,h,i;h=c(71),e=c(87),g=c(88),i=c(44),f=function(){function a(a,d,f,i){if(this.document=a,this.id=i,"string"==typeof d){if(d in c)return this.isAFM=!0,this.font=new e(c[d]()),void this.registerAFM(d);if(/\.(ttf|ttc)$/i.test(d))this.font=h.open(d,f);else{if(!/\.dfont$/i.test(d))throw new Error("Not a supported font format or standard PDF font.");this.font=h.fromDFont(d,f)}}else if(b.isBuffer(d))this.font=h.fromBuffer(d,f);else if(d instanceof Uint8Array)this.font=h.fromBuffer(new b(d),f);else{if(!(d instanceof ArrayBuffer))throw new Error("Not a supported font format or standard PDF font.");this.font=h.fromBuffer(new b(new Uint8Array(d)),f)}this.subset=new g(this.font),this.registerTTF()}var c,f;return c={Courier:function(){return i.readFileSync(d+"/font/data/Courier.afm","utf8")},"Courier-Bold":function(){return i.readFileSync(d+"/font/data/Courier-Bold.afm","utf8")},"Courier-Oblique":function(){return i.readFileSync(d+"/font/data/Courier-Oblique.afm","utf8")},"Courier-BoldOblique":function(){return i.readFileSync(d+"/font/data/Courier-BoldOblique.afm","utf8")},Helvetica:function(){return i.readFileSync(d+"/font/data/Helvetica.afm","utf8")},"Helvetica-Bold":function(){return i.readFileSync(d+"/font/data/Helvetica-Bold.afm","utf8")},"Helvetica-Oblique":function(){return i.readFileSync(d+"/font/data/Helvetica-Oblique.afm","utf8")},"Helvetica-BoldOblique":function(){return i.readFileSync(d+"/font/data/Helvetica-BoldOblique.afm","utf8")},"Times-Roman":function(){return i.readFileSync(d+"/font/data/Times-Roman.afm","utf8")},"Times-Bold":function(){return i.readFileSync(d+"/font/data/Times-Bold.afm","utf8")},"Times-Italic":function(){return i.readFileSync(d+"/font/data/Times-Italic.afm","utf8")},"Times-BoldItalic":function(){return i.readFileSync(d+"/font/data/Times-BoldItalic.afm","utf8")},Symbol:function(){return i.readFileSync(d+"/font/data/Symbol.afm","utf8")},ZapfDingbats:function(){return i.readFileSync(d+"/font/data/ZapfDingbats.afm","utf8")}},a.prototype.use=function(a){var b;return null!=(b=this.subset)?b.use(a):void 0},a.prototype.embed=function(){return this.embedded||null==this.dictionary?void 0:(this.isAFM?this.embedAFM():this.embedTTF(),this.embedded=!0)},a.prototype.encode=function(a){var b;return this.isAFM?this.font.encodeText(a):(null!=(b=this.subset)?b.encodeText(a):void 0)||a},a.prototype.ref=function(){return null!=this.dictionary?this.dictionary:this.dictionary=this.document.ref()},a.prototype.registerTTF=function(){var a,b,c,d,e;if(this.name=this.font.name.postscriptName,this.scaleFactor=1e3/this.font.head.unitsPerEm,this.bbox=function(){var b,c,d,e;for(d=this.font.bbox,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(Math.round(a*this.scaleFactor));return e}.call(this),this.stemV=0,this.font.post.exists?(d=this.font.post.italic_angle,b=d>>16,c=255&d,b&!0&&(b=-((65535^b)+1)),this.italicAngle=+(""+b+"."+c)):this.italicAngle=0,this.ascender=Math.round(this.font.ascender*this.scaleFactor),this.decender=Math.round(this.font.decender*this.scaleFactor),this.lineGap=Math.round(this.font.lineGap*this.scaleFactor),this.capHeight=this.font.os2.exists&&this.font.os2.capHeight||this.ascender,this.xHeight=this.font.os2.exists&&this.font.os2.xHeight||0,this.familyClass=(this.font.os2.exists&&this.font.os2.familyClass||0)>>8,this.isSerif=1===(e=this.familyClass)||2===e||3===e||4===e||5===e||7===e,this.isScript=10===this.familyClass,this.flags=0,this.font.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.font.cmap.unicode)throw new Error("No unicode cmap for font")},a.prototype.embedTTF=function(){var a,b,c,d,e,g,h,i;return d=this.subset.encode(),h=this.document.ref(),h.write(d),h.data.Length1=h.uncompressedLength,h.end(),e=this.document.ref({Type:"FontDescriptor",FontName:this.subset.postscriptName,FontFile2:h,FontBBox:this.bbox,Flags:this.flags,StemV:this.stemV,ItalicAngle:this.italicAngle,Ascent:this.ascender,Descent:this.decender,CapHeight:this.capHeight,XHeight:this.xHeight}),e.end(),g=+Object.keys(this.subset.cmap)[0],a=function(){var a,b;a=this.subset.cmap,b=[];for(c in a)i=a[c],b.push(Math.round(this.font.widthOfGlyph(i)));return b}.call(this),b=this.document.ref(),b.end(f(this.subset.subset)),this.dictionary.data={Type:"Font",BaseFont:this.subset.postscriptName,Subtype:"TrueType",FontDescriptor:e,FirstChar:g,LastChar:g+a.length-1,Widths:a,Encoding:"MacRomanEncoding",ToUnicode:b},this.dictionary.end()},f=function(a){var b,c,d,e,f,g,h;for(f="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<00>\nendcodespacerange",c=Object.keys(a).sort(function(a,b){return a-b}),d=[],g=0,h=c.length;h>g;g++)b=c[g],d.length>=100&&(f+="\n"+d.length+" beginbfchar\n"+d.join("\n")+"\nendbfchar",d=[]),e=("0000"+a[b].toString(16)).slice(-4),b=(+b).toString(16),d.push("<"+b+"><"+e+">");return d.length&&(f+="\n"+d.length+" beginbfchar\n"+d.join("\n")+"\nendbfchar\n"),f+="endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"},a.prototype.registerAFM=function(a){var b;return this.name=a,b=this.font,this.ascender=b.ascender,this.decender=b.decender,this.bbox=b.bbox,this.lineGap=b.lineGap,b},a.prototype.embedAFM=function(){return this.dictionary.data={Type:"Font",BaseFont:this.name,Subtype:"Type1",Encoding:"WinAnsiEncoding"},this.dictionary.end()},a.prototype.widthOfString=function(a,b){var c,d,e,f,g,h;for(a=""+a,f=0,d=g=0,h=a.length;h>=0?h>g:g>h;d=h>=0?++g:--g)c=a.charCodeAt(d),f+=this.font.widthOfGlyph(this.font.characterToGlyph(c))||0;return e=b/1e3,f*e},a.prototype.lineHeight=function(a,b){var c;return null==b&&(b=!1),c=b?this.lineGap:0,(this.ascender+c-this.decender)/1e3*a},a}(),a.exports=f}).call(this)}).call(b,c(2).Buffer,"/")},function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l,m,n,o,p,q;q=c(44),e=c(72),d=c(73),f=c(74),m=c(75),h=c(78),b=c(79),j=c(80),i=c(81),l=c(82),o=c(83),n=c(84),k=c(85),g=c(86),p=function(){function a(a,b){var c,d,f,g,h,i,j,k,l;if(this.rawData=a,c=this.contents=new e(this.rawData),"ttcf"===c.readString(4)){if(!b)throw new Error("Must specify a font name for TTC files.");for(i=c.readInt(),f=c.readInt(),h=[],d=j=0;f>=0?f>j:j>f;d=f>=0?++j:--j)h[d]=c.readInt();for(d=k=0,l=h.length;l>k;d=++k)if(g=h[d],c.pos=g,this.parse(),this.name.postscriptName===b)return;throw new Error("Font "+b+" not found in TTC file.")}c.pos=0,this.parse()}return a.open=function(b,c){var d;return d=q.readFileSync(b),new a(d,c)},a.fromDFont=function(b,c){var e;return e=d.open(b),new a(e.getNamedFont(c))},a.fromBuffer=function(b,c){var e,f,g;try{if(g=new a(b,c),!(g.head.exists&&g.name.exists&&g.cmap.exists||(e=new d(b),g=new a(e.getNamedFont(c)),g.head.exists&&g.name.exists&&g.cmap.exists)))throw new Error("Invalid TTF file in DFont");return g}catch(h){throw f=h,new Error("Unknown font format in buffer: "+f.message)}},a.prototype.parse=function(){return this.directory=new f(this.contents),this.head=new h(this),this.name=new m(this),this.cmap=new b(this),this.hhea=new i(this),this.maxp=new l(this),this.hmtx=new j(this),this.post=new o(this),this.os2=new n(this),this.loca=new k(this),this.glyf=new g(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},a.prototype.characterToGlyph=function(a){var b;return(null!=(b=this.cmap.unicode)?b.codeMap[a]:void 0)||0},a.prototype.widthOfGlyph=function(a){var b;return b=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(a).advance*b},a}(),a.exports=p}).call(this)},function(a,b){(function(){var b;b=function(){function a(a){this.data=null!=a?a:[],this.pos=0,this.length=this.data.length}return a.prototype.readByte=function(){return this.data[this.pos++]},a.prototype.writeByte=function(a){return this.data[this.pos++]=a},a.prototype.byteAt=function(a){return this.data[a]},a.prototype.readBool=function(){return!!this.readByte()},a.prototype.writeBool=function(a){return this.writeByte(a?1:0)},a.prototype.readUInt32=function(){var a,b,c,d;return a=16777216*this.readByte(),b=this.readByte()<<16,c=this.readByte()<<8,d=this.readByte(),a+b+c+d},a.prototype.writeUInt32=function(a){return this.writeByte(a>>>24&255),this.writeByte(a>>16&255),this.writeByte(a>>8&255),this.writeByte(255&a)},a.prototype.readInt32=function(){var a;return a=this.readUInt32(),a>=2147483648?a-4294967296:a},a.prototype.writeInt32=function(a){return 0>a&&(a+=4294967296),this.writeUInt32(a)},a.prototype.readUInt16=function(){var a,b;return a=this.readByte()<<8,b=this.readByte(),a|b},a.prototype.writeUInt16=function(a){return this.writeByte(a>>8&255),this.writeByte(255&a)},a.prototype.readInt16=function(){var a;return a=this.readUInt16(),a>=32768?a-65536:a},a.prototype.writeInt16=function(a){return 0>a&&(a+=65536),this.writeUInt16(a)},a.prototype.readString=function(a){var b,c,d;for(c=[],b=d=0;a>=0?a>d:d>a;b=a>=0?++d:--d)c[b]=String.fromCharCode(this.readByte());return c.join("")},a.prototype.writeString=function(a){var b,c,d,e;for(e=[],b=c=0,d=a.length;d>=0?d>c:c>d;b=d>=0?++c:--c)e.push(this.writeByte(a.charCodeAt(b)));return e},a.prototype.stringAt=function(a,b){return this.pos=a,this.readString(b)},a.prototype.readShort=function(){return this.readInt16()},a.prototype.writeShort=function(a){return this.writeInt16(a)},a.prototype.readLongLong=function(){var a,b,c,d,e,f,g,h;return a=this.readByte(),b=this.readByte(),c=this.readByte(),d=this.readByte(),e=this.readByte(),f=this.readByte(),g=this.readByte(),h=this.readByte(),128&a?-1*(72057594037927940*(255^a)+281474976710656*(255^b)+1099511627776*(255^c)+4294967296*(255^d)+16777216*(255^e)+65536*(255^f)+256*(255^g)+(255^h)+1):72057594037927940*a+281474976710656*b+1099511627776*c+4294967296*d+16777216*e+65536*f+256*g+h},a.prototype.writeLongLong=function(a){var b,c;return b=Math.floor(a/4294967296),c=4294967295&a,this.writeByte(b>>24&255),this.writeByte(b>>16&255),this.writeByte(b>>8&255),this.writeByte(255&b),this.writeByte(c>>24&255),this.writeByte(c>>16&255),this.writeByte(c>>8&255),this.writeByte(255&c)},a.prototype.readInt=function(){return this.readInt32()},a.prototype.writeInt=function(a){return this.writeInt32(a)},a.prototype.slice=function(a,b){return this.data.slice(a,b)},a.prototype.read=function(a){var b,c,d;for(b=[],c=d=0;a>=0?a>d:d>a;c=a>=0?++d:--d)b.push(this.readByte());return b},a.prototype.write=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;d>c;c++)b=a[c],e.push(this.writeByte(b));return e},a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f,g;g=c(44),d=c(72),e=c(74),f=c(75),b=function(){function a(a){this.contents=new d(a),this.parse(this.contents)}return a.open=function(b){var c;return c=g.readFileSync(b),new a(c)},a.prototype.parse=function(a){var b,c,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G;for(j=a.readInt(),u=a.readInt(),i=a.readInt(),t=a.readInt(),this.map={},a.pos=u+24,E=a.readShort()+u,y=a.readShort()+u,a.pos=E,v=a.readShort(),o=F=0;v>=F;o=F+=1){for(D=a.readString(4),w=a.readShort(),C=a.readShort(),this.map[D]={list:[],named:{}},B=a.pos,a.pos=E+C,q=G=0;w>=G;q=G+=1)p=a.readShort(),z=a.readShort(),b=a.readByte(),c=a.readByte()<<16,g=a.readByte()<<8,h=a.readByte(),k=j+(0|c|g|h),n=a.readUInt32(),l={id:p,attributes:b,offset:k,handle:n},A=a.pos,-1!==z&&u+t>y+z?(a.pos=y+z,r=a.readByte(),l.name=a.readString(r)):"sfnt"===D&&(a.pos=l.offset,s=a.readUInt32(),m={},m.contents=new d(a.slice(a.pos,a.pos+s)),m.directory=new e(m.contents),x=new f(m),l.name=x.fontName[0].raw),a.pos=A,this.map[D].list.push(l),l.name&&(this.map[D].named[l.name]=l);a.pos=B}},a.prototype.getNamedFont=function(a){var b,c,d,e,f,g;if(b=this.contents,e=b.pos,c=null!=(g=this.map.sfnt)?g.named[a]:void 0,!c)throw new Error("Font "+a+" not found in DFont file.");return b.pos=c.offset,d=b.readUInt32(),f=b.slice(b.pos,b.pos+d),b.pos=e,f},a}(),a.exports=b}).call(this)},function(a,b,c){(function(b){(function(){var d,e,f=[].slice;d=c(72),e=function(){function a(a){var b,c,d,e;for(this.scalarType=a.readInt(),this.tableCount=a.readShort(),this.searchRange=a.readShort(),this.entrySelector=a.readShort(),this.rangeShift=a.readShort(),this.tables={},c=d=0,e=this.tableCount;e>=0?e>d:d>e;c=e>=0?++d:--d)b={tag:a.readString(4),checksum:a.readInt(),offset:a.readInt(),length:a.readInt()},this.tables[b.tag]=b}var c;return a.prototype.encode=function(a){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;p=Object.keys(a).length,j=Math.log(2),m=16*Math.floor(Math.log(p)/j),h=Math.floor(m/j),l=16*p-m,f=new d,f.writeInt(this.scalarType),f.writeShort(p),f.writeShort(m),f.writeShort(h),f.writeShort(l),g=16*p,k=f.pos+g,i=null,q=[];for(r in a)for(o=a[r],f.writeString(r),f.writeInt(c(o)),f.writeInt(k),f.writeInt(o.length),q=q.concat(o),"head"===r&&(i=k),k+=o.length;k%4;)q.push(0),k++;return f.write(q),n=c(f.data),e=2981146554-n,f.pos=i+8,f.writeUInt32(e),new b(f.data)},c=function(a){var b,c,e,g,h;for(a=f.call(a);a.length%4;)a.push(0);for(e=new d(a),c=0,b=g=0,h=a.length;h>g;b=g+=4)c+=e.readUInt32();return 4294967295&c},a}(),a.exports=e}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(){var b,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};f=c(76),b=c(72),g=c(77),e=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}var e;return i(c,a),c.prototype.tag="name",c.prototype.parse=function(a){var b,c,e,f,g,h,i,j,k,l,m,n,o;for(a.pos=this.offset,f=a.readShort(),b=a.readShort(),i=a.readShort(),c=[],g=l=0;b>=0?b>l:l>b;g=b>=0?++l:--l)c.push({platformID:a.readShort(),encodingID:a.readShort(),languageID:a.readShort(),nameID:a.readShort(),length:a.readShort(),offset:this.offset+i+a.readShort()});for(j={},g=m=0,n=c.length;n>m;g=++m)e=c[g],a.pos=e.offset,k=a.readString(e.length),h=new d(k,e),null==j[o=e.nameID]&&(j[o]=[]),j[e.nameID].push(h);return this.strings=j,this.copyright=j[0],this.fontFamily=j[1],this.fontSubfamily=j[2],this.uniqueSubfamily=j[3],this.fontName=j[4],this.version=j[5],this.postscriptName=j[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,""),this.trademark=j[7],this.manufacturer=j[8],this.designer=j[9], +this.description=j[10],this.vendorUrl=j[11],this.designerUrl=j[12],this.license=j[13],this.licenseUrl=j[14],this.preferredFamily=j[15],this.preferredSubfamily=j[17],this.compatibleFull=j[18],this.sampleText=j[19]},e="AAAAAA",c.prototype.encode=function(){var a,c,f,h,i,j,k,l,m,n,o,p,q,r;m={},r=this.strings;for(a in r)o=r[a],m[a]=o;i=new d(""+e+"+"+this.postscriptName,{platformID:1,encodingID:0,languageID:0}),m[6]=[i],e=g.successorOf(e),j=0;for(a in m)c=m[a],null!=c&&(j+=c.length);n=new b,k=new b,n.writeShort(0),n.writeShort(j),n.writeShort(6+12*j);for(f in m)if(c=m[f],null!=c)for(p=0,q=c.length;q>p;p++)l=c[p],n.writeShort(l.platformID),n.writeShort(l.encodingID),n.writeShort(l.languageID),n.writeShort(f),n.writeShort(l.length),n.writeShort(k.pos),k.writeString(l.raw);return h={postscriptName:i.raw,table:n.data.concat(k.data)}},c}(f),a.exports=e,d=function(){function a(a,b){this.raw=a,this.length=this.raw.length,this.platformID=b.platformID,this.encodingID=b.encodingID,this.languageID=b.languageID}return a}()}).call(this)},function(a,b){(function(){var b;b=function(){function a(a){var b;this.file=a,b=this.file.directory.tables[this.tag],this.exists=!!b,b&&(this.offset=b.offset,this.length=b.length,this.parse(this.file.contents))}return a.prototype.parse=function(){},a.prototype.encode=function(){},a.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},a}(),a.exports=b}).call(this)},function(a,b){(function(){b.successorOf=function(a){var b,c,d,e,f,g,h,i,j,k;for(c="abcdefghijklmnopqrstuvwxyz",i=c.length,k=a,e=a.length;e>=0;){if(h=a.charAt(--e),isNaN(h)){if(f=c.indexOf(h.toLowerCase()),-1===f)j=h,d=!0;else if(j=c.charAt((f+1)%i),g=h===h.toUpperCase(),g&&(j=j.toUpperCase()),d=f+1>=i,d&&0===e){b=g?"A":"a",k=b+j+k.slice(1);break}}else if(j=+h+1,d=j>9,d&&(j=0),d&&0===e){k="1"+j+k.slice(1);break}if(k=k.slice(0,e)+j+k.slice(e+1),!d)break}return k},b.invert=function(a){var b,c,d;c={};for(b in a)d=a[b],c[d]=b;return c}}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="head",c.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.revision=a.readInt(),this.checkSumAdjustment=a.readInt(),this.magicNumber=a.readInt(),this.flags=a.readShort(),this.unitsPerEm=a.readShort(),this.created=a.readLongLong(),this.modified=a.readLongLong(),this.xMin=a.readShort(),this.yMin=a.readShort(),this.xMax=a.readShort(),this.yMax=a.readShort(),this.macStyle=a.readShort(),this.lowestRecPPEM=a.readShort(),this.fontDirectionHint=a.readShort(),this.indexToLocFormat=a.readShort(),this.glyphDataFormat=a.readShort()},c.prototype.encode=function(a){var c;return c=new b,c.writeInt(this.version),c.writeInt(this.revision),c.writeInt(this.checkSumAdjustment),c.writeInt(this.magicNumber),c.writeShort(this.flags),c.writeShort(this.unitsPerEm),c.writeLongLong(this.created),c.writeLongLong(this.modified),c.writeShort(this.xMin),c.writeShort(this.yMin),c.writeShort(this.xMax),c.writeShort(this.yMax),c.writeShort(this.macStyle),c.writeShort(this.lowestRecPPEM),c.writeShort(this.fontDirectionHint),c.writeShort(a.type),c.writeShort(this.glyphDataFormat),c.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f,g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};f=c(76),e=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return h(c,a),c.prototype.tag="cmap",c.prototype.parse=function(a){var c,d,e,f;for(a.pos=this.offset,this.version=a.readUInt16(),e=a.readUInt16(),this.tables=[],this.unicode=null,d=f=0;e>=0?e>f:f>e;d=e>=0?++f:--f)c=new b(a,this.offset),this.tables.push(c),c.isUnicode&&null==this.unicode&&(this.unicode=c);return!0},c.encode=function(a,c){var d,f;return null==c&&(c="macroman"),d=b.encode(a,c),f=new e,f.writeUInt16(0),f.writeUInt16(1),d.table=f.data.concat(d.subtable),d},c}(f),b=function(){function a(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;switch(this.platformID=a.readUInt16(),this.encodingID=a.readShort(),this.offset=b+a.readInt(),l=a.pos,a.pos=this.offset,this.format=a.readUInt16(),this.length=a.readUInt16(),this.language=a.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(h=r=0;256>r;h=++r)this.codeMap[h]=a.readByte();break;case 4:for(n=a.readUInt16(),m=n/2,a.pos+=6,e=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),a.pos+=2,p=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),i=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),j=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),d=(this.length-a.pos+this.offset)/2,g=function(){var b,c;for(c=[],h=b=0;d>=0?d>b:b>d;h=d>=0?++b:--b)c.push(a.readUInt16());return c}(),h=s=0,u=e.length;u>s;h=++s)for(q=e[h],o=p[h],c=t=o;q>=o?q>=t:t>=q;c=q>=o?++t:--t)0===j[h]?f=c+i[h]:(k=j[h]/2+(c-o)-(m-h),f=g[k]||0,0!==f&&(f+=i[h])),this.codeMap[c]=65535&f}a.pos=l}return a.encode=function(a,b){var c,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X;switch(F=new e,g=Object.keys(a).sort(function(a,b){return a-b}),b){case"macroman":for(p=0,q=function(){var a,b;for(b=[],o=a=0;256>a;o=++a)b.push(0);return b}(),s={0:0},f={},G=0,K=g.length;K>G;G++)d=g[G],null==s[U=a[d]]&&(s[U]=++p),f[d]={old:a[d],"new":s[a[d]]},q[d]=s[a[d]];return F.writeUInt16(1),F.writeUInt16(0),F.writeUInt32(12),F.writeUInt16(0),F.writeUInt16(262),F.writeUInt16(0),F.write(q),y={charMap:f,subtable:F.data,maxGlyphID:p+1};case"unicode":for(D=[],l=[],t=0,s={},c={},r=j=null,H=0,L=g.length;L>H;H++)d=g[H],v=a[d],null==s[v]&&(s[v]=++t),c[d]={old:v,"new":s[v]},h=s[v]-d,null!=r&&h===j||(r&&l.push(r),D.push(d),j=h),r=d;for(r&&l.push(r),l.push(65535),D.push(65535),A=D.length,B=2*A,z=2*Math.pow(Math.log(A)/Math.LN2,2),m=Math.log(z/2)/Math.LN2,x=2*A-z,i=[],w=[],n=[],o=I=0,M=D.length;M>I;o=++I){if(C=D[o],k=l[o],65535===C){i.push(0),w.push(0);break}if(E=c[C]["new"],C-E>=32768)for(i.push(0),w.push(2*(n.length+A-o)),d=J=C;k>=C?k>=J:J>=k;d=k>=C?++J:--J)n.push(c[d]["new"]);else i.push(E-C),w.push(0)}for(F.writeUInt16(3),F.writeUInt16(1),F.writeUInt32(12),F.writeUInt16(4),F.writeUInt16(16+8*A+2*n.length),F.writeUInt16(0),F.writeUInt16(B),F.writeUInt16(z),F.writeUInt16(m),F.writeUInt16(x),S=0,N=l.length;N>S;S++)d=l[S],F.writeUInt16(d);for(F.writeUInt16(0),T=0,O=D.length;O>T;T++)d=D[T],F.writeUInt16(d);for(V=0,P=i.length;P>V;V++)h=i[V],F.writeUInt16(h);for(W=0,Q=w.length;Q>W;W++)u=w[W],F.writeUInt16(u);for(X=0,R=n.length;R>X;X++)p=n[X],F.writeUInt16(p);return y={charMap:c,subtable:F.data,maxGlyphID:t+1}}},a}(),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="hmtx",c.prototype.parse=function(a){var b,c,d,e,f,g,h,i;for(a.pos=this.offset,this.metrics=[],b=f=0,h=this.file.hhea.numberOfMetrics;h>=0?h>f:f>h;b=h>=0?++f:--f)this.metrics.push({advance:a.readUInt16(),lsb:a.readInt16()});for(d=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var c,e;for(e=[],b=c=0;d>=0?d>c:c>d;b=d>=0?++c:--c)e.push(a.readInt16());return e}(),this.widths=function(){var a,b,c,d;for(c=this.metrics,d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(e.advance);return d}.call(this),c=this.widths[this.widths.length-1],i=[],b=g=0;d>=0?d>g:g>d;b=d>=0?++g:--g)i.push(this.widths.push(c));return i},c.prototype.forGlyph=function(a){var b;return a in this.metrics?this.metrics[a]:b={advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[a-this.metrics.length]}},c.prototype.encode=function(a){var c,d,e,f,g;for(e=new b,f=0,g=a.length;g>f;f++)c=a[f],d=this.forGlyph(c),e.writeUInt16(d.advance),e.writeUInt16(d.lsb);return e.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="hhea",c.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.ascender=a.readShort(),this.decender=a.readShort(),this.lineGap=a.readShort(),this.advanceWidthMax=a.readShort(),this.minLeftSideBearing=a.readShort(),this.minRightSideBearing=a.readShort(),this.xMaxExtent=a.readShort(),this.caretSlopeRise=a.readShort(),this.caretSlopeRun=a.readShort(),this.caretOffset=a.readShort(),a.pos+=8,this.metricDataFormat=a.readShort(),this.numberOfMetrics=a.readUInt16()},c.prototype.encode=function(a){var c,d,e,f;for(d=new b,d.writeInt(this.version),d.writeShort(this.ascender),d.writeShort(this.decender),d.writeShort(this.lineGap),d.writeShort(this.advanceWidthMax),d.writeShort(this.minLeftSideBearing),d.writeShort(this.minRightSideBearing),d.writeShort(this.xMaxExtent),d.writeShort(this.caretSlopeRise),d.writeShort(this.caretSlopeRun),d.writeShort(this.caretOffset),c=e=0,f=8;f>=0?f>e:e>f;c=f>=0?++e:--e)d.writeByte(0);return d.writeShort(this.metricDataFormat),d.writeUInt16(a.length),d.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="maxp",c.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.numGlyphs=a.readUInt16(),this.maxPoints=a.readUInt16(),this.maxContours=a.readUInt16(),this.maxCompositePoints=a.readUInt16(),this.maxComponentContours=a.readUInt16(),this.maxZones=a.readUInt16(),this.maxTwilightPoints=a.readUInt16(),this.maxStorage=a.readUInt16(),this.maxFunctionDefs=a.readUInt16(),this.maxInstructionDefs=a.readUInt16(),this.maxStackElements=a.readUInt16(),this.maxSizeOfInstructions=a.readUInt16(),this.maxComponentElements=a.readUInt16(),this.maxComponentDepth=a.readUInt16()},c.prototype.encode=function(a){var c;return c=new b,c.writeInt(this.version),c.writeUInt16(a.length),c.writeUInt16(this.maxPoints),c.writeUInt16(this.maxContours),c.writeUInt16(this.maxCompositePoints),c.writeUInt16(this.maxComponentContours),c.writeUInt16(this.maxZones),c.writeUInt16(this.maxTwilightPoints),c.writeUInt16(this.maxStorage),c.writeUInt16(this.maxFunctionDefs),c.writeUInt16(this.maxInstructionDefs),c.writeUInt16(this.maxStackElements),c.writeUInt16(this.maxSizeOfInstructions),c.writeUInt16(this.maxComponentElements),c.writeUInt16(this.maxComponentDepth),c.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}var d;return g(c,a),c.prototype.tag="post",c.prototype.parse=function(a){var b,c,d,e,f;switch(a.pos=this.offset,this.format=a.readInt(),this.italicAngle=a.readInt(),this.underlinePosition=a.readShort(),this.underlineThickness=a.readShort(),this.isFixedPitch=a.readInt(),this.minMemType42=a.readInt(),this.maxMemType42=a.readInt(),this.minMemType1=a.readInt(),this.maxMemType1=a.readInt(),this.format){case 65536:break;case 131072:for(d=a.readUInt16(),this.glyphNameIndex=[],b=e=0;d>=0?d>e:e>d;b=d>=0?++e:--e)this.glyphNameIndex.push(a.readUInt16());for(this.names=[],f=[];a.pos=0?d>c:c>d;b=d>=0?++c:--c)e.push(a.readUInt32());return e}.call(this)}},c.prototype.glyphFor=function(a){var b;switch(this.format){case 65536:return d[a]||".notdef";case 131072:return b=this.glyphNameIndex[a],257>=b?d[b]:this.names[b-258]||".notdef";case 151552:return d[a+this.offsets[a]]||".notdef";case 196608:return".notdef";case 262144:return this.map[a]||65535}},c.prototype.encode=function(a){var c,e,f,g,h,i,j,k,l,m,n,o,p,q,r;if(!this.exists)return null;if(i=this.raw(),196608===this.format)return i;for(l=new b(i.slice(0,32)),l.writeUInt32(131072),l.pos=32,f=[],k=[],m=0,p=a.length;p>m;m++)c=a[m],h=this.glyphFor(c),g=d.indexOf(h),-1!==g?f.push(g):(f.push(257+k.length),k.push(h));for(l.writeUInt16(Object.keys(a).length),n=0,q=f.length;q>n;n++)e=f[n],l.writeUInt16(e);for(o=0,r=k.length;r>o;o++)j=k[o],l.writeByte(j.length),l.writeString(j);return l.data},d=".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\nzero one two three four five six seven eight nine colon semicolon less equal greater\nquestion at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\nbracketleft backslash bracketright asciicircum underscore grave\na b c d e f g h i j k l m n o p q r s t u v w x y z\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\nsterling section bullet paragraph germandbls registered copyright trademark acute\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\nCacute cacute Ccaron ccaron dcroat".split(/\s+/g),c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=c(76),b=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.tag="OS/2",b.prototype.parse=function(a){var b;return a.pos=this.offset,this.version=a.readUInt16(),this.averageCharWidth=a.readShort(),this.weightClass=a.readUInt16(),this.widthClass=a.readUInt16(),this.type=a.readShort(),this.ySubscriptXSize=a.readShort(),this.ySubscriptYSize=a.readShort(),this.ySubscriptXOffset=a.readShort(),this.ySubscriptYOffset=a.readShort(),this.ySuperscriptXSize=a.readShort(),this.ySuperscriptYSize=a.readShort(),this.ySuperscriptXOffset=a.readShort(),this.ySuperscriptYOffset=a.readShort(),this.yStrikeoutSize=a.readShort(),this.yStrikeoutPosition=a.readShort(),this.familyClass=a.readShort(),this.panose=function(){var c,d;for(d=[],b=c=0;10>c;b=++c)d.push(a.readByte());return d}(),this.charRange=function(){var c,d;for(d=[],b=c=0;4>c;b=++c)d.push(a.readInt());return d}(),this.vendorID=a.readString(4),this.selection=a.readShort(),this.firstCharIndex=a.readShort(),this.lastCharIndex=a.readShort(),this.version>0&&(this.ascent=a.readShort(),this.descent=a.readShort(),this.lineGap=a.readShort(),this.winAscent=a.readShort(),this.winDescent=a.readShort(),this.codePageRange=function(){var c,d;for(d=[],b=c=0;2>c;b=++c)d.push(a.readInt());return d}(),this.version>1)?(this.xHeight=a.readShort(),this.capHeight=a.readShort(),this.defaultChar=a.readShort(),this.breakChar=a.readShort(),this.maxContext=a.readShort()):void 0},b.prototype.encode=function(){return this.raw()},b}(d),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="loca",c.prototype.parse=function(a){var b,c;return a.pos=this.offset,b=this.file.head.indexToLocFormat,0===b?this.offsets=function(){var b,d,e;for(e=[],c=b=0,d=this.length;d>b;c=b+=2)e.push(2*a.readUInt16());return e}.call(this):this.offsets=function(){var b,d,e;for(e=[],c=b=0,d=this.length;d>b;c=b+=4)e.push(a.readUInt32());return e}.call(this)},c.prototype.indexOf=function(a){return this.offsets[a]},c.prototype.lengthOf=function(a){return this.offsets[a+1]-this.offsets[a]},c.prototype.encode=function(a){var c,d,e,f,g,h,i,j,k,l,m;for(f=new b,g=0,j=a.length;j>g;g++)if(d=a[g],d>65535){for(m=this.offsets,h=0,k=m.length;k>h;h++)c=m[h],f.writeUInt32(c);return e={format:1,table:f.data}}for(i=0,l=a.length;l>i;i++)c=a[i],f.writeUInt16(c/2);return e={format:0,table:f.data}},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},j=[].slice;g=c(76),d=c(72),e=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return i(c,a),c.prototype.tag="glyf",c.prototype.parse=function(a){return this.cache={}},c.prototype.glyphFor=function(a){var c,e,g,h,i,j,k,l,m,n;return a in this.cache?this.cache[a]:(h=this.file.loca,c=this.file.contents,e=h.indexOf(a),g=h.lengthOf(a),0===g?this.cache[a]=null:(c.pos=this.offset+e,j=new d(c.read(g)),i=j.readShort(),l=j.readShort(),n=j.readShort(),k=j.readShort(),m=j.readShort(),-1===i?this.cache[a]=new b(j,l,n,k,m):this.cache[a]=new f(j,i,l,n,k,m),this.cache[a]))},c.prototype.encode=function(a,b,c){var d,e,f,g,h,i;for(g=[],f=[],h=0,i=b.length;i>h;h++)e=b[h],d=a[e],f.push(g.length),d&&(g=g.concat(d.encode(c)));return f.push(g.length),{table:g,offsets:f}},c}(g),f=function(){function a(a,b,c,d,e,f){this.raw=a,this.numberOfContours=b,this.xMin=c,this.yMin=d,this.xMax=e,this.yMax=f,this.compound=!1}return a.prototype.encode=function(){return this.raw.data},a}(),b=function(){function a(a,d,h,i,j){var k,l;for(this.raw=a,this.xMin=d,this.yMin=h,this.xMax=i,this.yMax=j,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],k=this.raw;;){if(l=k.readShort(),this.glyphOffsets.push(k.pos),this.glyphIDs.push(k.readShort()),!(l&c))break;l&b?k.pos+=4:k.pos+=2,l&g?k.pos+=8:l&e?k.pos+=4:l&f&&(k.pos+=2)}}var b,c,e,f,g,h;return b=1,f=8,c=32,e=64,g=128,h=256,a.prototype.encode=function(a){var b,c,e,f,g,h;for(e=new d(j.call(this.raw.data)),h=this.glyphIDs,b=f=0,g=h.length;g>f;b=++f)c=h[b],e.pos=this.glyphOffsets[b],e.writeShort(a[c]);return e.data},a}(),a.exports=e}).call(this)},function(a,b,c){(function(){var b,d;d=c(44),b=function(){function a(a){var b,d;this.contents=a,this.attributes={},this.glyphWidths={},this.boundingBoxes={},this.parse(),this.charWidths=function(){var a,b;for(b=[],d=a=0;255>=a;d=++a)b.push(this.glyphWidths[c[d]]);return b}.call(this),this.bbox=function(){var a,c,d,e;for(d=this.attributes.FontBBox.split(/\s+/),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(+b);return e}.call(this),this.ascender=+(this.attributes.Ascender||0),this.decender=+(this.attributes.Descender||0),this.lineGap=this.bbox[3]-this.bbox[1]-(this.ascender-this.decender)}var b,c;return a.open=function(b){return new a(d.readFileSync(b,"utf8"))},a.prototype.parse=function(){var a,b,c,d,e,f,g,h,i,j;for(f="",j=this.contents.split("\n"),h=0,i=j.length;i>h;h++)if(c=j[h],d=c.match(/^Start(\w+)/))f=d[1];else if(d=c.match(/^End(\w+)/))f="";else switch(f){case"FontMetrics":d=c.match(/(^\w+)\s+(.*)/),b=d[1],g=d[2],(a=this.attributes[b])?(Array.isArray(a)||(a=this.attributes[b]=[a]),a.push(g)):this.attributes[b]=g;break;case"CharMetrics":if(!/^CH?\s/.test(c))continue;e=c.match(/\bN\s+(\.?\w+)\s*;/)[1],this.glyphWidths[e]=+c.match(/\bWX\s+(\d+)\s*;/)[1]}},b={402:131,8211:150,8212:151,8216:145,8217:146,8218:130,8220:147,8221:148,8222:132,8224:134,8225:135,8226:149,8230:133,8364:128,8240:137,8249:139,8250:155,710:136,8482:153,338:140,339:156,732:152,352:138,353:154,376:159,381:142,382:158},a.prototype.encodeText=function(a){var c,d,e,f,g;for(e="",d=f=0,g=a.length;g>=0?g>f:f>g;d=g>=0?++f:--f)c=a.charCodeAt(d),c=b[c]||c,e+=String.fromCharCode(c);return e},a.prototype.characterToGlyph=function(a){return c[b[a]||a]},a.prototype.widthOfGlyph=function(a){return this.glyphWidths[a]},c=".notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n\nspace exclam quotedbl numbersign\ndollar percent ampersand quotesingle\nparenleft parenright asterisk plus\ncomma hyphen period slash\nzero one two three\nfour five six seven\neight nine colon semicolon\nless equal greater question\n\nat A B C\nD E F G\nH I J K\nL M N O\nP Q R S\nT U V W\nX Y Z bracketleft\nbackslash bracketright asciicircum underscore\n\ngrave a b c\nd e f g\nh i j k\nl m n o\np q r s\nt u v w\nx y z braceleft\nbar braceright asciitilde .notdef\n\nEuro .notdef quotesinglbase florin\nquotedblbase ellipsis dagger daggerdbl\ncircumflex perthousand Scaron guilsinglleft\nOE .notdef Zcaron .notdef\n.notdef quoteleft quoteright quotedblleft\nquotedblright bullet endash emdash\ntilde trademark scaron guilsinglright\noe .notdef zcaron ydieresis\n\nspace exclamdown cent sterling\ncurrency yen brokenbar section\ndieresis copyright ordfeminine guillemotleft\nlogicalnot hyphen registered macron\ndegree plusminus twosuperior threesuperior\nacute mu paragraph periodcentered\ncedilla onesuperior ordmasculine guillemotright\nonequarter onehalf threequarters questiondown\n\nAgrave Aacute Acircumflex Atilde\nAdieresis Aring AE Ccedilla\nEgrave Eacute Ecircumflex Edieresis\nIgrave Iacute Icircumflex Idieresis\nEth Ntilde Ograve Oacute\nOcircumflex Otilde Odieresis multiply\nOslash Ugrave Uacute Ucircumflex\nUdieresis Yacute Thorn germandbls\n\nagrave aacute acircumflex atilde\nadieresis aring ae ccedilla\negrave eacute ecircumflex edieresis\nigrave iacute icircumflex idieresis\neth ntilde ograve oacute\nocircumflex otilde odieresis divide\noslash ugrave uacute ucircumflex\nudieresis yacute thorn ydieresis".split(/\s+/),a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=c(79),e=c(77),d=function(){function a(a){this.font=a,this.subset={},this.unicodes={},this.next=33}return a.prototype.use=function(a){var b,c,d;{if("string"!=typeof a)return this.unicodes[a]?void 0:(this.subset[this.next]=a,this.unicodes[a]=this.next++);for(b=c=0,d=a.length;d>=0?d>c:c>d;b=d>=0?++c:--c)this.use(a.charCodeAt(b))}},a.prototype.encodeText=function(a){var b,c,d,e,f;for(d="",c=e=0,f=a.length;f>=0?f>e:e>f;c=f>=0?++e:--e)b=this.unicodes[a.charCodeAt(c)],d+=String.fromCharCode(b);return d},a.prototype.generateCmap=function(){var a,b,c,d,e;d=this.font.cmap.tables[0].codeMap,a={},e=this.subset;for(b in e)c=e[b],a[b]=d[c];return a},a.prototype.glyphIDs=function(){var a,b,c,d,e,g;d=this.font.cmap.tables[0].codeMap,a=[0],g=this.subset;for(b in g)c=g[b],e=d[c],null!=e&&f.call(a,e)<0&&a.push(e);return a.sort()},a.prototype.glyphsFor=function(a){var b,c,d,e,f,g,h;for(d={},f=0,g=a.length;g>f;f++)e=a[f],d[e]=this.font.glyf.glyphFor(e);b=[];for(e in d)c=d[e],(null!=c?c.compound:void 0)&&b.push.apply(b,c.glyphIDs);if(b.length>0){h=this.glyphsFor(b);for(e in h)c=h[e],d[e]=c}return d},a.prototype.encode=function(){var a,c,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s;a=b.encode(this.generateCmap(),"unicode"),f=this.glyphsFor(this.glyphIDs()),n={0:0},r=a.charMap;for(c in r)h=r[c],n[h.old]=h["new"];m=a.maxGlyphID;for(o in f)o in n||(n[o]=m++);k=e.invert(n),l=Object.keys(k).sort(function(a,b){return a-b}),p=function(){var a,b,c;for(c=[],a=0,b=l.length;b>a;a++)g=l[a],c.push(k[g]);return c}(),d=this.font.glyf.encode(f,p,n),i=this.font.loca.encode(d.offsets),j=this.font.name.encode(),this.postscriptName=j.postscriptName,this.cmap={},s=a.charMap;for(c in s)h=s[c],this.cmap[c]=h.old;return q={cmap:a.table,glyf:d.table,loca:i.table,hmtx:this.font.hmtx.encode(p),hhea:this.font.hhea.encode(p),maxp:this.font.maxp.encode(p),post:this.font.post.encode(p),name:j.table,head:this.font.head.encode(i)},this.font.os2.exists&&(q["OS/2"]=this.font.os2.raw()),this.font.directory.encode(q)},a}(),a.exports=d}).call(this)},function(a,b,c){(function(){var b;b=c(90),a.exports={initText:function(){return this.x=0,this.y=0,this._lineGap=0},lineGap:function(a){return this._lineGap=a,this},moveDown:function(a){return null==a&&(a=1),this.y+=this.currentLineHeight(!0)*a+this._lineGap,this},moveUp:function(a){return null==a&&(a=1),this.y-=this.currentLineHeight(!0)*a+this._lineGap,this},_text:function(a,c,d,e,f){var g,h,i,j,k;if(e=this._initOptions(c,d,e),a=""+a,e.wordSpacing&&(a=a.replace(/\s{2,}/g," ")),e.width)h=this._wrapper,h||(h=new b(this,e),h.on("line",f)),this._wrapper=e.continued?h:null,this._textOptions=e.continued?e:null,h.wrap(a,e);else for(k=a.split("\n"),i=0,j=k.length;j>i;i++)g=k[i],f(g,e);return this},text:function(a,b,c,d){return this._text(a,b,c,d,this._line.bind(this))},widthOfString:function(a,b){return null==b&&(b={}),this._font.widthOfString(a,this._fontSize)+(b.characterSpacing||0)*(a.length-1)},heightOfString:function(a,b){var c,d,e,f;return null==b&&(b={}),e=this.x,f=this.y,b=this._initOptions(b),b.height=1/0,d=b.lineGap||this._lineGap||0,this._text(a,this.x,this.y,b,function(a){return function(b,c){return a.y+=a.currentLineHeight(!0)+d}}(this)),c=this.y-f,this.x=e,this.y=f,c},list:function(a,c,d,e,f){var g,h,i,j,k,l,m,n;return e=this._initOptions(c,d,e),n=Math.round(this._font.ascender/1e3*this._fontSize/3),i=e.textIndent||5*n,j=e.bulletIndent||8*n,l=1,k=[],m=[],g=function(a){var b,c,d,e,f;for(f=[],b=d=0,e=a.length;e>d;b=++d)c=a[b],Array.isArray(c)?(l++,g(c),f.push(l--)):(k.push(c),f.push(m.push(l)));return f},g(a),f=new b(this,e),f.on("line",this._line.bind(this)),l=1,h=0,f.on("firstLine",function(a){return function(){var b,c;return(c=m[h++])!==l&&(b=j*(c-l),a.x+=b,f.lineWidth-=b,l=c),a.circle(a.x-i+n,a.y+n+n/2,n),a.fill()}}(this)),f.on("sectionStart",function(a){return function(){var b;return b=i+j*(l-1),a.x+=b,f.lineWidth-=b}}(this)),f.on("sectionEnd",function(a){return function(){var b;return b=i+j*(l-1),a.x-=b,f.lineWidth+=b}}(this)),f.wrap(k.join("\n"),e),this},_initOptions:function(a,b,c){var d,e,f,g;if(null==a&&(a={}),null==c&&(c={}),"object"==typeof a&&(c=a,a=null),c=function(){var a,b,d;b={};for(a in c)d=c[a],b[a]=d;return b}(),this._textOptions){g=this._textOptions;for(d in g)f=g[d],"continued"!==d&&null==c[d]&&(c[d]=f)}return null!=a&&(this.x=a),null!=b&&(this.y=b),c.lineBreak!==!1&&(e=this.page.margins,null==c.width&&(c.width=this.page.width-this.x-e.right)),c.columns||(c.columns=0),null==c.columnGap&&(c.columnGap=18),c},_line:function(a,b,c){var d;return null==b&&(b={}),this._fragment(a,this.x,this.y,b),d=b.lineGap||this._lineGap||0,c?this.y+=this.currentLineHeight(!0)+d:this.x+=this.widthOfString(a)},_fragment:function(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(a=""+a,0!==a.length){if(e=d.align||"left",r=d.wordSpacing||0,f=d.characterSpacing||0,d.width)switch(e){case"right":p=this.widthOfString(a.replace(/\s+$/,""),d),b+=d.lineWidth-p;break;case"center":b+=d.lineWidth/2-d.textWidth/2;break;case"justify":s=a.trim().split(/\s+/),p=this.widthOfString(a.replace(/\s+/g,""),d),o=this.widthOfString(" ")+f,r=Math.max(0,(d.lineWidth-p)/Math.max(1,s.length-1)-o)}if(n=d.textWidth+r*(d.wordCount-1)+f*(a.length-1),d.link&&this.link(b,c,n,this.currentLineHeight(),d.link),(d.underline||d.strike)&&(this.save(),d.stroke||this.strokeColor.apply(this,this._fillColor),k=this._fontSize<10?.5:Math.floor(this._fontSize/10),this.lineWidth(k),h=d.underline?1:2,l=c+this.currentLineHeight()/h,d.underline&&(l-=k),this.moveTo(b,l),this.lineTo(b+n,l),this.stroke(),this.restore()),this.save(),this.transform(1,0,0,-1,0,this.page.height),c=this.page.height-c-this._font.ascender/1e3*this._fontSize,null==(t=this.page.fonts)[w=this._font.id]&&(t[w]=this._font.ref()),this._font.use(a),this.addContent("BT"),this.addContent(""+b+" "+c+" Td"),this.addContent("/"+this._font.id+" "+this._fontSize+" Tf"),m=d.fill&&d.stroke?2:d.stroke?1:0,m&&this.addContent(""+m+" Tr"),f&&this.addContent(""+f+" Tc"),r){for(s=a.trim().split(/\s+/),r+=this.widthOfString(" ")+f,r*=1e3/this._fontSize,g=[],u=0,v=s.length;v>u;u++)q=s[u],i=this._font.encode(q),i=function(){var a,b,c;for(c=[],j=a=0,b=i.length;b>a;j=a+=1)c.push(i.charCodeAt(j).toString(16));return c}().join(""),g.push("<"+i+"> "+-r);this.addContent("["+g.join(" ")+"] TJ")}else i=this._font.encode(a),i=function(){var a,b,c;for(c=[],j=a=0,b=i.length;b>a;j=a+=1)c.push(i.charCodeAt(j).toString(16));return c}().join(""), +this.addContent("<"+i+"> Tj");return this.addContent("ET"),this.restore()}}}}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};b=c(26).EventEmitter,d=c(91),e=function(a){function b(a,b){var c;this.document=a,this.indent=b.indent||0,this.characterSpacing=b.characterSpacing||0,this.wordSpacing=0===b.wordSpacing,this.columns=b.columns||1,this.columnGap=null!=(c=b.columnGap)?c:18,this.lineWidth=(b.width-this.columnGap*(this.columns-1))/this.columns,this.spaceLeft=this.lineWidth,this.startX=this.document.x,this.startY=this.document.y,this.column=1,this.ellipsis=b.ellipsis,this.continuedX=0,null!=b.height?(this.height=b.height,this.maxY=this.startY+b.height):this.maxY=this.document.page.maxY(),this.on("firstLine",function(a){return function(b){var c;return c=a.continuedX||a.indent,a.document.x+=c,a.lineWidth-=c,a.once("line",function(){return a.document.x-=c,a.lineWidth+=c,b.continued&&!a.continuedX&&(a.continuedX=a.indent),b.continued?void 0:a.continuedX=0})}}(this)),this.on("lastLine",function(a){return function(b){var c;return c=b.align,"justify"===c&&(b.align="left"),a.lastLine=!0,a.once("line",function(){return a.document.y+=b.paragraphGap||0,b.align=c,a.lastLine=!1})}}(this))}return g(b,a),b.prototype.wordWidth=function(a){return this.document.widthOfString(a,this)+this.characterSpacing+this.wordSpacing},b.prototype.eachWord=function(a,b){var c,e,f,g,h,i,j,k,l,m;for(e=new d(a),h=null,m={};c=e.nextBreak();){if(l=a.slice((null!=h?h.position:void 0)||0,c.position),k=null!=m[l]?m[l]:m[l]=this.wordWidth(l),k>this.lineWidth+this.continuedX)for(i=h,f={};l.length;){for(g=l.length;k>this.spaceLeft;)k=this.wordWidth(l.slice(0,--g));if(f.required=gthis.maxY||f>this.maxY)&&this.nextSection(),c="",g=0,h=0,e=0,i=this.document.y,d=function(a){return function(){return b.textWidth=g+a.wordSpacing*(h-1),b.wordCount=h,b.lineWidth=a.lineWidth,i=a.document.y,a.emit("line",c,b,a),e++}}(this),this.emit("sectionStart",b,this),this.eachWord(a,function(a){return function(e,f,i,j){var k,l;if((null==j||j.required)&&(a.emit("firstLine",b,a),a.spaceLeft=a.lineWidth),f<=a.spaceLeft&&(c+=e,g+=f,h++),i.required||f>a.spaceLeft){if(i.required&&a.emit("lastLine",b,a),k=a.document.currentLineHeight(!0),null!=a.height&&a.ellipsis&&a.document.y+2*k>a.maxY&&a.column>=a.columns){for(a.ellipsis===!0&&(a.ellipsis="…"),c=c.replace(/\s+$/,""),g=a.wordWidth(c+a.ellipsis);g>a.lineWidth;)c=c.slice(0,-1).replace(/\s+$/,""),g=a.wordWidth(c+a.ellipsis);c+=a.ellipsis}return d(),a.document.y+k>a.maxY&&(l=a.nextSection(),!l)?(h=0,c="",!1):i.required?(f>a.spaceLeft&&(c=e,g=f,h=1,d()),a.spaceLeft=a.lineWidth,c="",g=0,h=0):(a.spaceLeft=a.lineWidth-f,c=e,g=f,h=1)}return a.spaceLeft-=f}}(this)),h>0&&(this.emit("lastLine",b,this),d()),this.emit("sectionEnd",b,this),b.continued===!0?(e>1&&(this.continuedX=0),this.continuedX+=b.textWidth,this.document.y=i):this.document.x=this.startX},b.prototype.nextSection=function(a){var b;if(this.emit("sectionEnd",a,this),++this.column>this.columns){if(null!=this.height)return!1;this.document.addPage(),this.column=1,this.startY=this.document.page.margins.top,this.maxY=this.document.page.maxY(),this.document.x=this.startX,this.document._fillColor&&(b=this.document).fillColor.apply(b,this.document._fillColor),this.emit("pageBreak",a,this)}else this.document.x+=this.lineWidth+this.columnGap,this.document.y=this.startY,this.emit("columnBreak",a,this);return this.emit("sectionStart",a,this),!0},b}(b),a.exports=e}).call(this)},function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D;w=c(92),A=new w(c(93)),C=c(94),f=C.BK,k=C.CR,o=C.LF,q=C.NL,g=C.CB,e=C.BA,v=C.SP,x=C.WJ,v=C.SP,f=C.BK,o=C.LF,q=C.NL,b=C.AI,d=C.AL,t=C.SA,u=C.SG,y=C.XX,i=C.CJ,m=C.ID,r=C.NS,z=C.characterClasses,D=c(95),l=D.DI_BRK,n=D.IN_BRK,h=D.CI_BRK,j=D.CP_BRK,s=D.PR_BRK,B=D.pairTable,p=function(){function a(a){this.string=a,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null}var c,m,p;return a.prototype.nextCodePoint=function(){var a,b;return a=this.string.charCodeAt(this.pos++),b=this.string.charCodeAt(this.pos),a>=55296&&56319>=a&&b>=56320&&57343>=b?(this.pos++,1024*(a-55296)+(b-56320)+65536):a},m=function(a){switch(a){case b:return d;case t:case u:case y:return d;case i:return r;default:return a}},p=function(a){switch(a){case o:case q:return f;case g:return e;case v:return x;default:return a}},a.prototype.nextCharClass=function(a){return null==a&&(a=!1),m(A.get(this.nextCodePoint()))},c=function(){function a(a,b){this.position=a,this.required=null!=b?b:!1}return a}(),a.prototype.nextBreak=function(){var a,b,d;for(null==this.curClass&&(this.curClass=p(this.nextCharClass()));this.pos=this.string.length?this.lastPos>n,g=1<>p,k=1024>>p,h=l+k,r=h,q=32,f=r+q,c=1<a||a>1114111?this.errorValue:55296>a||a>56319&&65535>=a?(b=(this.data[a>>p]<=a?(b=(this.data[l+(a-55296>>p)]<>n)],b=this.data[b+(a>>p&i)],b=(b<h?(n=i,j=i/m):(j=g,n=g*m),"center"===f.align?c=c+i/2-n/2:"right"===f.align&&(c=c+i-n),"center"===f.valign?e=e+g/2-j/2:"bottom"===f.valign&&(e=e+g-j)),this.y===e&&(this.y+=j),this.save(),this.transform(n,0,0,-j,c,e+j),this.addContent("/"+l.label+" Do"),this.restore(),this}}}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(b){(function(){var d,e,f,g,h;h=c(44),d=c(72),e=c(98),g=c(99),f=function(){function a(){}return a.open=function(a,c){var d,f;if(b.isBuffer(a))d=a;else if(f=/^data:.+;base64,(.*)$/.exec(a))d=new b(f[1],"base64");else if(d=h.readFileSync(a),!d)return;if(255===d[0]&&216===d[1])return new e(d,c);if(137===d[0]&&"PNG"===d.toString("ascii",1,4))return new g(d,c);throw new Error("Unknown image format.")},a}(),a.exports=f}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(){var b,d,e=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};d=c(44),b=function(){function a(a,c){var d,f,g;if(this.data=a,this.label=c,65496!==this.data.readUInt16BE(0))throw"SOI not found in JPEG";for(g=2;g=0));)g+=this.data.readUInt16BE(g);if(e.call(b,f)<0)throw"Invalid JPEG.";g+=2,this.bits=this.data[g++],this.height=this.data.readUInt16BE(g),g+=2,this.width=this.data.readUInt16BE(g),g+=2,d=this.data[g++],this.colorSpace=function(){switch(d){case 1:return"DeviceGray";case 3:return"DeviceRGB";case 4:return"DeviceCMYK"}}(),this.obj=null}var b;return b=[65472,65473,65474,65475,65477,65478,65479,65480,65481,65482,65483,65484,65485,65486,65487],a.prototype.embed=function(a){return this.obj?void 0:(this.obj=a.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.bits,Width:this.width,Height:this.height,ColorSpace:this.colorSpace,Filter:"DCTDecode"}),"DeviceCMYK"===this.colorSpace&&(this.obj.data.Decode=[1,0,1,0,1,0,1,0]),this.obj.end(this.data),this.data=null)},a}(),a.exports=b}).call(this)},function(a,b,c){(function(b){(function(){var d,e,f;f=c(47),d=c(100),e=function(){function a(a,b){this.label=b,this.image=new d(a),this.width=this.image.width,this.height=this.image.height,this.imgData=this.image.imgData,this.obj=null}return a.prototype.embed=function(a){var c,d,e,f,g,h,i,j;if(this.document=a,!this.obj){if(this.obj=a.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.image.bits,Width:this.width,Height:this.height,Filter:"FlateDecode"}),this.image.hasAlphaChannel||(e=a.ref({Predictor:15,Colors:this.image.colors,BitsPerComponent:this.image.bits,Columns:this.width}),this.obj.data.DecodeParms=e,e.end()),0===this.image.palette.length?this.obj.data.ColorSpace=this.image.colorSpace:(d=a.ref(),d.end(new b(this.image.palette)),this.obj.data.ColorSpace=["Indexed","DeviceRGB",this.image.palette.length/3-1,d]),this.image.transparency.grayscale)return g=this.image.transparency.greyscale,this.obj.data.Mask=[g,g];if(this.image.transparency.rgb){for(f=this.image.transparency.rgb,c=[],i=0,j=f.length;j>i;i++)h=f[i],c.push(h,h);return this.obj.data.Mask=c}return this.image.transparency.indexed?this.loadIndexedAlphaChannel():this.image.hasAlphaChannel?this.splitAlphaChannel():this.finalize()}},a.prototype.finalize=function(){var a;return this.alphaChannel&&(a=this.document.ref({Type:"XObject",Subtype:"Image",Height:this.height,Width:this.width,BitsPerComponent:8,Filter:"FlateDecode",ColorSpace:"DeviceGray",Decode:[0,1]}),a.end(this.alphaChannel),this.obj.data.SMask=a),this.obj.end(this.imgData),this.image=null,this.imgData=null},a.prototype.splitAlphaChannel=function(){return this.image.decodePixels(function(a){return function(c){var d,e,g,h,i,j,k,l,m;for(g=a.image.colors*a.image.bits/8,m=a.width*a.height,j=new b(m*g),e=new b(m),i=l=d=0,k=c.length;k>i;)j[l++]=c[i++],j[l++]=c[i++],j[l++]=c[i++],e[d++]=c[i++];return h=0,f.deflate(j,function(b,c){if(a.imgData=c,b)throw b;return 2===++h?a.finalize():void 0}),f.deflate(e,function(b,c){if(a.alphaChannel=c,b)throw b;return 2===++h?a.finalize():void 0})}}(this))},a.prototype.loadIndexedAlphaChannel=function(a){var c;return c=this.image.transparency.indexed,this.image.decodePixels(function(a){return function(d){var e,g,h,i,j;for(e=new b(a.width*a.height),g=0,h=i=0,j=d.length;j>i;h=i+=1)e[g++]=c[d[h]];return f.deflate(e,function(b,c){if(a.alphaChannel=c,b)throw b;return a.finalize()})}}(this))},a}(),a.exports=e}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(b){(function(){var d,e,f;e=c(44),f=c(47),a.exports=d=function(){function a(a){var c,d,e,f,g,h,i,j,k,l,m;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.text={};;){switch(c=this.readUInt32(),h=function(){var a,b;for(b=[],e=a=0;4>a;e=++a)b.push(String.fromCharCode(this.data[this.pos++]));return b}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"PLTE":this.palette=this.read(c);break;case"IDAT":for(e=k=0;c>k;e=k+=1)this.imgData.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(c),i=255-this.transparency.indexed.length,i>0)for(e=l=0;i>=0?i>l:l>i;e=i>=0?++l:--l)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(c)[0];break;case 2:this.transparency.rgb=this.read(c)}break;case"tEXt":j=this.read(c),f=j.indexOf(0),g=String.fromCharCode.apply(String,j.slice(0,f)),this.text[g]=String.fromCharCode.apply(String,j.slice(f+1));break;case"IEND":return this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(m=this.colorType)||6===m,d=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*d,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new b(this.imgData));default:this.pos+=c}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return a.decode=function(b,c){return e.readFile(b,function(b,d){var e;return e=new a(d),e.decode(function(a){return c(a)})})},a.load=function(b){var c;return c=e.readFileSync(b),new a(c)},a.prototype.read=function(a){var b,c,d;for(d=[],b=c=0;a>=0?a>c:c>a;b=a>=0?++c:--c)d.push(this.data[this.pos++]);return d},a.prototype.readUInt32=function(){var a,b,c,d;return a=this.data[this.pos++]<<24,b=this.data[this.pos++]<<16,c=this.data[this.pos++]<<8,d=this.data[this.pos++],a|b|c|d},a.prototype.readUInt16=function(){var a,b;return a=this.data[this.pos++]<<8,b=this.data[this.pos++],a|b},a.prototype.decodePixels=function(a){var c=this;return f.inflate(this.imgData,function(d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B;if(d)throw d;for(q=c.pixelBitlength/8,u=q*c.width,r=new b(u*c.height),k=e.length,t=0,s=0,g=0;k>s;){switch(e[s++]){case 0:for(i=x=0;u>x;i=x+=1)r[g++]=e[s++];break;case 1:for(i=y=0;u>y;i=y+=1)f=e[s++],j=q>i?0:r[g-q],r[g++]=(f+j)%256;break;case 2:for(i=z=0;u>z;i=z+=1)f=e[s++],h=(i-i%q)/q,v=t&&r[(t-1)*u+h*q+i%q],r[g++]=(v+f)%256;break;case 3:for(i=A=0;u>A;i=A+=1)f=e[s++],h=(i-i%q)/q,j=q>i?0:r[g-q],v=t&&r[(t-1)*u+h*q+i%q],r[g++]=(f+Math.floor((j+v)/2))%256;break;case 4:for(i=B=0;u>B;i=B+=1)f=e[s++],h=(i-i%q)/q,j=q>i?0:r[g-q],0===t?v=w=0:(v=r[(t-1)*u+h*q+i%q],w=h&&r[(t-1)*u+(h-1)*q+i%q]),l=j+v-w,m=Math.abs(l-j),o=Math.abs(l-v),p=Math.abs(l-w),n=o>=m&&p>=m?j:p>=o?v:w,r[g++]=(f+n)%256;break;default:throw new Error("Invalid filter algorithm: "+e[s-1])}t++}return a(r)})},a.prototype.decodePalette=function(){var a,c,d,e,f,g,h,i,j,k;for(e=this.palette,h=this.transparency.indexed||[],g=new b(h.length+e.length),f=0,d=e.length,a=0,c=i=0,j=e.length;j>i;c=i+=3)g[f++]=e[c],g[f++]=e[c+1],g[f++]=e[c+2],g[f++]=null!=(k=h[a++])?k:255;return g},a.prototype.copyToImageData=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(d=this.colors,k=null,c=this.hasAlphaChannel,this.palette.length&&(k=null!=(m=this._decodedPalette)?m:this._decodedPalette=this.decodePalette(),d=4,c=!0),e=(null!=a?a.data:void 0)||a,j=e.length,g=k||b,f=h=0,1===d)for(;j>f;)i=k?4*b[f/4]:h,l=g[i++],e[f++]=l,e[f++]=l,e[f++]=l,e[f++]=c?g[i++]:255,h=i;else for(;j>f;)i=k?4*b[f/4]:h,e[f++]=g[i++],e[f++]=g[i++],e[f++]=g[i++],e[f++]=c?g[i++]:255,h=i},a.prototype.decode=function(a){var c,d=this;return c=new b(this.width*this.height*4),this.decodePixels(function(b){return d.copyToImageData(c,b),a(c)})},a}()}).call(this)}).call(b,c(2).Buffer)},function(a,b){(function(){a.exports={annotate:function(a,b,c,d,e){var f,g,h;e.Type="Annot",e.Rect=this._convertRect(a,b,c,d),e.Border=[0,0,0],"Link"!==e.Subtype&&null==e.C&&(e.C=this._normalizeColor(e.color||[0,0,0])),delete e.color,"string"==typeof e.Dest&&(e.Dest=new String(e.Dest));for(f in e)h=e[f],e[f[0].toUpperCase()+f.slice(1)]=h;return g=this.ref(e),this.page.annotations.push(g),g.end(),this},note:function(a,b,c,d,e,f){return null==f&&(f={}),f.Subtype="Text",f.Contents=new String(e),f.Name="Comment",null==f.color&&(f.color=[243,223,92]),this.annotate(a,b,c,d,f)},link:function(a,b,c,d,e,f){return null==f&&(f={}),f.Subtype="Link",f.A=this.ref({S:"URI",URI:new String(e)}),f.A.end(),this.annotate(a,b,c,d,f)},_markup:function(a,b,c,d,e){var f,g,h,i,j;return null==e&&(e={}),j=this._convertRect(a,b,c,d),f=j[0],h=j[1],g=j[2],i=j[3],e.QuadPoints=[f,i,g,i,f,h,g,h],e.Contents=new String,this.annotate(a,b,c,d,e)},highlight:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Highlight",null==e.color&&(e.color=[241,238,148]),this._markup(a,b,c,d,e)},underline:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Underline",this._markup(a,b,c,d,e)},strike:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="StrikeOut",this._markup(a,b,c,d,e)},lineAnnotation:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Line",e.Contents=new String,e.L=[a,this.page.height-b,c,this.page.height-d],this.annotate(a,b,c,d,e)},rectAnnotation:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Square",e.Contents=new String,this.annotate(a,b,c,d,e)},ellipseAnnotation:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Circle",e.Contents=new String,this.annotate(a,b,c,d,e)},textAnnotation:function(a,b,c,d,e,f){return null==f&&(f={}),f.Subtype="FreeText",f.Contents=new String(e),f.DA=new String,this.annotate(a,b,c,d,f)},_convertRect:function(a,b,c,d){var e,f,g,h,i,j,k,l,m;return l=b,b+=d,k=a+c,m=this._ctm,e=m[0],f=m[1],g=m[2],h=m[3],i=m[4],j=m[5],a=e*a+g*b+i,b=f*a+h*b+j,k=e*k+g*l+i,l=f*k+h*l+j,[a,b,k,l]}}}).call(this)},function(a,b){a.exports={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]}},function(a,b,c){(function(b){"use strict";function d(a,b){this.pdfDoc=a,this.imageDictionary=b||{}}var e=(c(24),c(97));d.prototype.measureImage=function(a){function c(a){var c=g.imageDictionary[a];if(!c)return a;var d=c.indexOf("base64,");if(0>d)throw"invalid image format, images dictionary should contain dataURL entries";return new b(c.substring(d+7),"base64")}var d,f,g=this;return this.pdfDoc._imageRegistry[a]?d=this.pdfDoc._imageRegistry[a]:(f="I"+ ++this.pdfDoc._imageCount,d=e.open(c(a),f),d.embed(this.pdfDoc),this.pdfDoc._imageRegistry[a]=d),{width:d.width,height:d.height}},a.exports=d}).call(b,c(2).Buffer)},function(a,b){"use strict";function c(a){for(var b=[],c=null,d=0,e=a.inlines.length;e>d;d++){var f=a.inlines[d],g=f.decoration;if(g){var h=f.decorationColor||f.color||"black",i=f.decorationStyle||"solid";g=Array.isArray(g)?g:[g];for(var j=0,k=g.length;k>j;j++){var l=g[j];c&&l===c.decoration&&i===c.decorationStyle&&h===c.decorationColor&&"lineThrough"!==l?c.inlines.push(f):(c={line:a,decoration:l,decorationColor:h,decorationStyle:i,inlines:[f]},b.push(c))}}else c=null}return b}function d(a,b,c,d){function e(){for(var b=0,c=0,d=a.inlines.length;d>c;c++){var e=a.inlines[c];b=e.fontSize>b?c:b}return a.inlines[b]}function f(){for(var b=0,c=0,d=a.inlines.length;d>c;c++)b+=a.inlines[c].width;return b}var g=a.inlines[0],h=e(),i=f(),j=a.line.getAscenderHeight(),k=h.font.ascender/1e3*h.fontSize,l=h.height,m=l-k,n=.5+.12*Math.floor(Math.max(h.fontSize-8,0)/2);switch(a.decoration){case"underline":c+=j+.45*m;break;case"overline":c+=j-.85*k;break;case"lineThrough":c+=j-.25*k;break;default:throw"Unkown decoration : "+a.decoration}if(d.save(),"double"===a.decorationStyle){var o=Math.max(.5,2*n);d.fillColor(a.decorationColor).rect(b+g.x,c-n/2,i,n/2).fill().rect(b+g.x,c+o-n/2,i,n/2).fill()}else if("dashed"===a.decorationStyle){var p=Math.ceil(i/6.8),q=b+g.x;d.rect(q,c,i,n).clip(),d.fillColor(a.decorationColor);for(var r=0;p>r;r++)d.rect(q,c-n/2,3.96,n).fill(),q+=6.8}else if("dotted"===a.decorationStyle){var s=Math.ceil(i/(3*n)),t=b+g.x;d.rect(t,c,i,n).clip(),d.fillColor(a.decorationColor);for(var u=0;s>u;u++)d.rect(t,c-n/2,n,n).fill(),t+=3*n}else if("wavy"===a.decorationStyle){var v=.7,w=1,x=Math.ceil(i/(2*v))+1,y=b+g.x-1;d.rect(b+g.x,c-w,i,c+w).clip(),d.lineWidth(.24),d.moveTo(y,c);for(var z=0;x>z;z++)d.bezierCurveTo(y+v,c-w,y+2*v,c-w,y+3*v,c).bezierCurveTo(y+4*v,c+w,y+5*v,c+w,y+6*v,c),y+=6*v;d.stroke(a.decorationColor)}else d.fillColor(a.decorationColor).rect(b+g.x,c-n/2,i,n).fill();d.restore()}function e(a,b,e,f){for(var g=c(a),h=0,i=g.length;i>h;h++)d(g[h],b,e,f)}function f(a,b,c,d){for(var e=a.getHeight(),f=0,g=a.inlines.length;g>f;f++){var h=a.inlines[f];h.background&&d.fillColor(h.background).rect(b+h.x,c,h.width,e).fill()}}a.exports={drawBackground:f,drawDecorations:e}},function(a,b,c){var d,e,f=f||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(a){var b=new MouseEvent("click");a.dispatchEvent(b)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},p=function(b,i,l){l||(b=o(b));var p,q,r,s=this,t=b.type,u=!1,v=function(){n(s,"writestart progress write writeend".split(" "))},w=function(){if(!u&&p||(p=c().createObjectURL(b)),q)q.location.href=p;else{var d=a.open(p,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=p)}s.readyState=s.DONE,v(),m(p)},x=function(a){return function(){return s.readyState!==s.DONE?a.apply(this,arguments):void 0}},y={create:!0,exclusive:!1};return s.readyState=s.INIT,i||(i="download"),e?(p=c().createObjectURL(b),d.href=p,d.download=i,void setTimeout(function(){f(d),v(),m(p),s.readyState=s.DONE})):(a.chrome&&t&&t!==j&&(r=b.slice||b.webkitSlice,b=r.call(b,0,b.size,j),u=!0),g&&"download"!==i&&(i+=".download"),(t===j||g)&&(q=a),h?(k+=b.size,void h(a.TEMPORARY,k,x(function(a){a.root.getDirectory("saved",y,x(function(a){var c=function(){a.getFile(i,y,x(function(a){a.createWriter(x(function(c){c.onwriteend=function(b){q.location.href=a.toURL(),s.readyState=s.DONE,n(s,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&w()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=s["on"+a]}),c.write(b),s.abort=function(){c.abort(),s.readyState=s.DONE},s.readyState=s.WRITING}),w)}),w)};a.getFile(i,{create:!1},x(function(a){a.remove(),c()}),x(function(a){a.code===a.NOT_FOUND_ERR?c():w()}))}),w)}),w)):void w())},q=p.prototype,r=function(a,b,c){return new p(a,b,c)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b,c){return c||(a=o(a)),navigator.msSaveOrOpenBlob(a,b||"download")}:(q.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},q.readyState=q.INIT=0,q.WRITING=1,q.DONE=2,q.error=q.onwritestart=q.onprogress=q.onwrite=q.onabort=q.onerror=q.onwriteend=null,r)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof a&&a.exports?a.exports.saveAs=f:null!==c(106)&&null!=c(107)&&(d=[],e=function(){return f}.apply(b,d),!(void 0!==e&&(a.exports=e)))},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){(function(b){a.exports=b}).call(b,{})}]),window.pdfMake=window.pdfMake||{},window.pdfMake.vfs={"LICENSE.txt":"DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBcGFjaGUgTGljZW5zZQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgVmVyc2lvbiAyLjAsIEphbnVhcnkgMjAwNA0KICAgICAgICAgICAgICAgICAgICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzLw0KDQogICBURVJNUyBBTkQgQ09ORElUSU9OUyBGT1IgVVNFLCBSRVBST0RVQ1RJT04sIEFORCBESVNUUklCVVRJT04NCg0KICAgMS4gRGVmaW5pdGlvbnMuDQoNCiAgICAgICJMaWNlbnNlIiBzaGFsbCBtZWFuIHRoZSB0ZXJtcyBhbmQgY29uZGl0aW9ucyBmb3IgdXNlLCByZXByb2R1Y3Rpb24sDQogICAgICBhbmQgZGlzdHJpYnV0aW9uIGFzIGRlZmluZWQgYnkgU2VjdGlvbnMgMSB0aHJvdWd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AAPAAABIwMjEyM3MxMhNyEHIQMzA7HLpLWk0x7TQ/5aHgQBHv5aQ8sDNvzKAzaVAU+Wlv6xAAABAAf/7AKkBUEAHwAAAQMzByMHMwcjAwYWMzI2NwcOASMiJjcTIzczNyM3MxMCGjW/HL8m1R7VQBIkKxQzEwIcXSxjYyBAyB7IJo0cjTUFQf75jb6V/r1WOQgFgxEVj5wBQ5W+jQEH////1QAABH8HIgImACMAAAAHAEIBawFd////1QAABMMHHwImACMAAAAHAHMCFwFZ////1QAABI0HRgImACMAAAAHAJoBBgFd////1QAABNQHUQImACMAAAAHAKABJQFg////1QAABMwHDAImACMAAAAHAGgBBwFc////1QAABH8HiAImACMAAAAHAJ4BkgGo////1QAABMYHnwImACMAAAAHAdQBiQEs//8AYv5EBPgFxQAmACUAAAAHAHcBt//3//8AWAAABPIHIgImACcAAAAHAEIBNwFd//8AWAAABPIHHwImACcAAAAHAHMB4wFZ//8AWAAABPIHRgImACcAAAAHAJoA0gFd//8AWAAABPIHDAImACcAAAAHAGgA0wFc//8AYgAAAkQHIgImACsAAAAHAEL//AFd//8AYgAAA1MHHwImACsAAAAHAHMApwFZ//8AYgAAAx4HRgImACsAAAAHAJr/lwFd//8AYgAAA10HDAImACsAAAAHAGj/mAFc//8AWAAABXoHUQImADAAAAAHAKABTgFg//8AXv/rBTYHNwAmADEAAAAHAEIBjAFy//8AXv/rBTYHNAAmADEAAAAHAHMCOAFu//8AXv/rBTYHWwAmADEAAAAHAJoBJwFy//8AXv/rBTYHZgAmADEAAAAHAKABRgF1//8AXv/rBTYHIQAmADEAAAAHAGgBKAFx//8AZ//rBVcHIgImADcAAAAHAEIBdwFd//8AZ//rBVcHHwImADcAAAAHAHMCIwFZ//8AZ//rBVcHRgImADcAAAAHAJoBEgFd//8AZ//rBVcHDAImADcAAAAHAGgBEwFc//8A7gAABVMHHQImADsAAAAHAHMB6QFX//8AOv/sA/cF4AImAEMAAAAHAEIAswAb//8AOv/sBAsF3QImAEMAAAAHAHMBX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TWXEeMxI7YjslJRELeBMZY1o5YywDAwEp7y31ASX++915rcU5MgLMqoYafZkA//8AWAAABPIHRwImACcAAAAHAJsA6AFe//8AR//sA+sGBgImAEcAAAAGAJtCHQAA//8AaP/rBQ8HWwImACkAAAAHAJoBBgFy//8AN/5LBD0GBAImAEkAAAAGAJpWGwAA//8AaP/rBQ8HYQImACkAAAAHAJwBYQGx//8AN/5LBD0GCgImAEkAAAAHAJwAsQBa//8AaP/rBQ8HIgImACkAAAAHAJ0BxwFy//8AN/5LBD0FywImAEkAAAAHAJ0BFwAb//8AaP3lBQ8FxQImACkAAAAHAZEBRv62//8AN/5LBD0GbQImAEkAAAAHAaUBKABW//8AWAAABXkHRgImACoAAAAHAJoBKQFd//8ANQAABBkHRQImAEoAAAAHAJoAYwFc//8AYgAAA2UHUQImACsAAAAHAKD/tgFg//8APgAAAv4F+gImAIoAAAAHAKD/TwAJ//8AYgAAA28G+gImACsAAAAHAG7/twFK//8APgAAAwgFpAImAIoAAAAHAG7/UP/0//8AYgAAA0EHTAImACsAAAAHAJz/8gGc//8APgAAAtoF9QImAIoAAAAGAJyLRQAA////mv5YAjoFsAImACsAAAAGAJ/jCAAA////e/5QAjEGGAImAEsAAAAGAJ/EAAAA//8AYgAAAogHDQImACsAAAAHAJ0AVwFd//8AYv/rBnYFsAAmACsAAAAHACwCJAAA//8ARP5LBCEGGAAmAEsAAAAHAEwB6AAA//8AD//rBSwHOQImACwAAAAHAJoBpQFQ////G/5LAsQF3AImAJgAAAAHAJr/Pf/z//8APv31BTUFsAAmAC0AAAAHAZEBIP7G//8ANv33BCgGGAImAE0AAAAHAZEAxP7I//8AWAAAA60G4AImAC4AAAAHAHMAjwEa//8ARAAAA0MHXAImAE4AAAAHAHMAlwGW//8AWP33A60FsAImAC4AAAAHAZEBGv7I////qP33AjEGGAImAE4AAAAHAZH/wv7I//8AWAAAA9UFsQImAC4AAAAHAZECsgTF//8ARAAAA3IGGAAmAE4AAAAHAZECTwUs//8AWAAAA60F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DAQFZ//8ABP/rBmAF3gImAIQAAAAHAHMCegAY//8AJv+jBWsHXQImAIEAAAAHAHMCMQGX//8ATP95BDgF3AImAIcAAAAHAHMBUAAW//8ACwAABEkEjQImAakAAAAHAdP/Uv97//8ACwAABEkEjQImAakAAAAHAdP/Uv97//8AvQAABCUEjQImAbgAAAAGAdMo9wAA////1AAAA+gF3wImAaYAAAAHAEIA2QAa////1AAABDEF3AImAaYAAAAHAHMBhQAW////1AAAA/sGAwImAaYAAAAGAJp0GgAA////1AAABEIGDgImAaYAAAAHAKAAkwAd////1AAABDoFyQImAaYAAAAGAGh1GQAA////1AAAA+gGRQImAaYAAAAHAJ4BAABl////1AAABDQGXQImAaYAAAAHAdQA9//q//8ATf5HBEIEnQImAagAAAAHAHcBU//6//8APgAABB0F3wImAaoAAAAHAEIAqgAa//8APgAABB0F3AImAaoAAAAHAHMBVgAW//8APgAABB0GAwImAaoAAAAGAJpFGgAA//8APgAABB0FyQImAaoAAAAGAGhGGQAA//8APgAAAd8F3wImAa4AAAAGAEKXGgAA//8APgAAAu4F3AImAa4AAAAGAHNCFgAA//8APgAAArkGAwImAa4AAAAHAJr/MgAa//8APgAAAvgFyQImAa4AAAAHAGj/MwAZ//8APgAABL4GDgImAbMAAAAHAKAAsQAd//8ATf/vBG8F7wImAbQAAAAHAEIA3QAq//8ATf/vBG8F7AImAbQAAAAHAHMBiQAm//8ATf/vBG8GEwImAbQAAAAGAJp4KgAA//8ATf/vBG8GHgImAbQAAAAHAKAAlwAt//8ATf/vBG8F2QImAbQAAAAGAGh5KQAA//8AWP/vBLwF4AImAbkAAAAHAEIA9QAb//8AWP/vBLwF3QImAbkAAAAHAHMBoQAX//8AWP/vBLwGBAImAbkAAAAHAJoAkAAb//8AWP/vBLwFygImAbkAAAAHAGgAkQAa//8AtQAABIEF2wImAb0AAAAHAHMBWAAV////1AAABEwFtwImAaYAAAAHAG4AlAAH////1AAABB4GCQImAaYAAAAHAJwAzwBZAAL/1P5QA+gEjQAaAB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/uMwtSO4mmqrAUx3hEJIy8axsuzWi6F0V393R0/Hw7ir1uurgXIA//8AYgAAAjoFsAIGACsAAP//AGIAAANdBwwCJgArAAAABwBo/5gBXP//AA//6wRSBbACBgAsAAD//wA+AAAFNQWwAAYALQAA//8APgAABTUGxwAmAC0AAAAHAHMBxQEB//8Ao//rBUUHTAImANkAAAAHAJwBPgGc////1QAABH8FsAIGACMAAP//AFgAAATQBbACBgAkAAD//wBXAAAEuQWwAgYArAAA//8AWAAABPIFsAIGACcAAP//AFgAAAV6B0wCJgDXAAAABwCcAY4BnP//AFgAAAazBbACBgAvAAD//wBYAAAFeQWwAgYAKgAA//8AXv/rBTYFxQAGADEAAP//AFgAAAV7BbACBgCxAAD//wBYAAAFGAWwAgYAMgAA//8AYv/rBPgFxQAGACUAAP//AOwAAAULBbACBgA2AAD////8AAAFHQWwAgYAOgAA//8AOv/sA/cETgIGAEMAAP//AEf/7APrBE4CBgBHAAD//wBAAAAERwX1AiYA6wAAAAcAnADIAEX//wBG/+wEHAROAgYAUQAA////4v5gBCYETgIGAFIAAAABAEf/7AP7BE4AGwAAJTI2NzMGBCMiAj8BNgAzMhYHIzYmIyIGDwEGFgHxWqAPrBn+8qbXuyUHJwER4a7BGqwQameNpBoHHFWBeFyazwEy6ir1ASfeqmyG4qQqsdYAAP///7z+SwQqBDoCBgBbAAD////pAAAD8QQ6AgYAWgAA//8AR//sA/IFywImAEcAAAAGAGgtGwAA//8APgAAA5UFyAImAOcAAAAHAHMA5wAC//8AO//sA8kETgIGAFUAAP//AEQAAAIxBhgCBgBLAAD//wA+AAAC9gW1AiYAigAAAAcAaP8xAAX///8d/ksCOQYYAgYATAAA//8AQAAABGEFxwImAOwAAAAHAHMBTQAB////vP5LBCoF9QImAFsAAAAGAJx/RQAA//8A7AAABuwHIgImADkAAAAHAEICAQFd//8AsgAABfoFywImAFkAAAAHAEIBegAG//8A7AAABuwHHwImADkAAAAHAHMCrQFZ//8AsgAABfoFyAImAFkAAAAHAHMC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3gAAAAcAaAEjAAX////8/ksFHQWwAiYAOgAAAAcBmgN+AAD////p/ksD8QQ6AiYAWgAAAAcBmgKWAAD//wBE/+sElQYYAgYARgAA////3v5LBXEFsAImANgAAAAHAZoD/AAA////1f5LBEkEOgImAO0AAAAHAZoDHwAA////1f6xBH8FsAImACMAAAAHAKgErAAA//8AOv6xA/cETgImAEMAAAAHAKgEBQAA////1QAABH8HxgImACMAAAAHAKYE5QFT//8AOv/sA/cGhAImAEMAAAAHAKYELQAR////1QAABg4HqAImACMAAAAHAaMA8AEW//8AOv/sBVYGZwImAEMAAAAGAaM41QAA////1QAABLcHpQImACMAAAAHAaIA+gEl//8AOv/sA/8GZAImAEMAAAAGAaJC5AAA////1QAABZ4H2wImACMAAAAHAaEA9QEN//8AOv/sBOYGmgImAEMAAAAGAaE9zAAA////1QAABLYH5QImACMAAAAHAaAA9gET//8AOv/sA/4GpAImAEMAAAAGAaA+0gAA////1f6xBI0HRgImACMAAAAnAJoBBgFdAAcAqASsAAD//wA6/rED9wYEAiYAQwAAACYAmk4bAAcAqAQFAAAAAP///9UAAASqB90CJgAjAAAABwGfASkBVP//ADr/7AP3BpsCJgBDAAAABgGfcRIAAP///9UAAATOB+ACJgAjAAAABwGkAS8BZ///ADr/7AQWBp4CJgBDAAAABgGkdyUAAP///9UAAASVCEsCJgAjAAAABwGeASkBSf//ADr/7AP3BwkCJgBDAAAABgGecQcAAP///9UAAATMCB8CJgAjAAAABwGdASsBUf//ADr/7AQUBt0CJgBDAAAABgGdcw8AAP///9X+sQSwB0wCJgAjAAAAJwCcAWEBnAAHAKgErAAA//8AOv6xA/gGCgImAEMAAAAnAJwAqQBaAAcAqAQFAAD//wBY/rsE8gWwAiYAJwAAAAcAqAR3AAr//wBH/rED6wROAiYARwAAAAcAqARRAAD//wBYAAAE8gfGAiYAJwAAAAcApgSxAVP//wBH/+wD6waFAiYARwAAAAcApgQLABL//wBYAAAE8gdRAiYAJwAAAAcAoADxAWD//wBH/+wD+gYQAiY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UJBoQCJgCVAAAABwCmBEYAEf//AFn/6wYlB0ECJgCUAAAABwCgATIBUP//AEb/7AUJBg8CJgCVAAAABwCgAIYAHv//AFn+sQYlBjYCJgCUAAAABwCoBLEAAP//AEb+qAUJBLACJgCVAAAABwCoBEj/9///AGf+qgVXBbACJgA3AAAABwCoBLL/+f//AFr+sQQ7BDoCJgBXAAAABwCoBAsAAP//AGf/6wVXB8YCJgA3AAAABwCmBPEBU///AFr/7AQ7BnACJgBXAAAABwCmBED//f//AGf/6walBx8CJgCWAAAABwBzAiIBWf//AFr/7AVXBcgCJgCXAAAABwBzAXIAAv//AGf/6walByICJgCWAAAABwBCAXYBXf//AFr/7AVXBcsCJgCXAAAABwBCAMYABv//AGf/6walB8YCJgCWAAAABwCmBPABU///AFr/7AVXBnACJgCXAAAABwCmBED//f//AGf/6walB1ECJgCWAAAABwCgATABYP//AFr/7AVXBfoCJgCXAAAABwCgAIAACf//AGf+qQalBg0CJgCWAAAABwCoBLH/+P//AFr+sQVXBJECJgCXAAAABwCoBAsAAP//AO7+uwVTBbACJgA7AAAABwCoBH0ACv///7z+FAQqBDoCJgBbAAAABwCoBKj/Y///AO4AAAVTB8QCJgA7AAAABwCmBLcBUf///7z+SwQqBnACJgBbAAAABwCmBAP//f//AO4AAAVTB08CJgA7AAAABwCgAPcBXv///7z+SwQqBfoCJgBbAAAABgCgQwkAAAACAET/6wUmBhgAGgAoAAABIwMjNycOASMiAj8BGgEzMhYXEyM3MzczBzMBBhYzMjY3Ey4BIyIGBwUItPedCQM8kFiwri8EOO7BWIcrN+oe6SS1JLX8AyRhiUx1M2Uba1R8nyYE0vsuaAI/QAE06hUBHAEUSEUBEZWxsfyis9FTTwH6RE/ZvQD//wAT/u4FJgYYACYARgAAACcB0wH8AkYABgBBfYMAAP//AD7+mQU1BbAAJgAtAAAABwGcA/QAAP//AED+mQRhBDoCJgDsAAAABwGcAxMAAP//AFj+mQV5BbACJgAqAAAABwGcBBwAAP//AED+mQRGBDoCJgDvA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AnAAAABwCaAH8BWf//AJ8AAAR1Bw0CJgAnAAAABwBoAFsBXf///8wAAAGgByICJgArAAAABwBC/4IBXP//AK0AAAKEByECJgArAAAABwBzADgBW////9gAAAJ5B0cCJgArAAAABwCa/z0BWf///70AAAKSBw0CJgArAAAABwBo/xkBXf//AJ8AAAUQB2MCJgAwAAAABwCgAO4BbP//AHT/6wUbBzcCJgAxAAAABwBCASMBcf//AHT/6wUbBzYCJgAxAAAABwBzAdoBcP//AHT/6wUbB1wCJgAxAAAABwCaAN4Bbv//AHT/6wUbB3gCJgAxAAAABwCgAOABgf//AHT/6wUbByICJgAxAAAABwBoALoBcv//AIb/6wTxByICJgA3AAAABwBCARcBXP//AIb/6wTxByECJgA3AAAABwBzAc4BW///AIb/6wTxB0cCJgA3AAAABwCaANIBWf//AIb/6wTxBw0CJgA3AAAABwBoAK4BXf//ABMAAATvByECJgA7AAAABwBzAZYBW///AF7/7AQBBeACJgBDAAAABwBCAIEAGv//AF7/7AQBBd8CJgBDAAAABwBzATgAGf//AF7/7AQBBgUCJgBDAAAABgCaPBcAAP//AF7/7AQBBiECJgBDAAAABgCgPioAAP//AF7/7AQBBcsCJgBDAAAABgBoGBsAAP//AF7/7AQBBk0CJgBDAAAABwCeANEAcf//AF7/7AQBBnwCJgBDAAAABwHUANf/5///AFH+PAP3BE4CJgBFAAAABwB3AT7/+///AFn/7AP4BeECJgBHAAAABwBCAIMAG///AFn/7AP4BeACJgBHAAAABwBzAToAGv//AFn/7AP4BgYCJgBHAAAABgCaPhgAAP//AFn/7AP4BcwCJgBHAAAABgBoGhwAAP///68AAAGCBcsCJgCKAAAABwBC/2UABf//AI8AAAJnBcoCJgCKAAAABgBzGwQAAP///7sAAAJcBfACJgCKAAAABwCa/yAAAv///6AAAAJ1BbYCJgCKAAAABwBo/vwABv//AH4AAAQLBiECJgBQAAAABgCgWSoAAP//AFP/7AQ0BeACJgBRAAAABwBCAJ4AGv//AFP/7AQ0Bd8CJgBRAAAABwBzAVUAGf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AP4BeECJgBHAAAABwBCAIMAG///AIYAAAQSBcsCJgDrAAAABwBCAKcABf//AEgAAAVRBbACBgC0AAD//wBP/iIFfgQ6AgYAyAAA//8AEQAABO8HRAImARQAAAAHAKcEOwFW////4wAABBgGMgImARUAAAAHAKcD1wBE//8AU/5LCIQETgAmAFEAAAAHAFsEiAAA//8AdP5LCYsFxQAmADEAAAAHAFsFjwAA//8ASv46BHsFxQImANYAAAAHAZwBkv+g//8ATf47A8QETQImAOoAAAAHAZwBOf+h//8AdP4+BNgFxQImACUAAAAHAZwB0/+k//8AUf4+A/cETgImAEUAAAAHAZwBS/+k//8AEwAABO8FsAIGADsAAP//ACD+XwP1BDoCBgC4AAD//wCtAAABoAWwAgYAKwAA//8AGAAAB4kHXAImANUAAAAHAJwCHAGs//8AFwAABl8GBQImAOkAAAAHAJwBpQBV//8ArQAAAaAFsAIGACsAAP//ABoAAAUoB1wCJgAjAAAABwCcAOoBrP//AF7/7AQBBhoCJgBDAAAABgCcb2oAAP//ABoAAAUoBw0CJgAjAAAABwBoAJMBXf//AF7/7AQBBcsCJgBDAAAABgBoGBsAAP////YAAAdXBbACBgB/AAD//wA0/+sGhAROAgYAhAAA//8AnwAABHUHXAImACcAAAAHAJwAsgGs//8AWf/sA/gGGwImAEcAAAAGAJxxawAA//8AU//qBRsG2gImAUEAAAAHAGgAcwEq//8AWf/sA/gEUAIGAJkAAP//AFn/7AP4BcwCJgCZAAAABgBoGhwAAP//ABgAAAeJBw0CJgDVAAAABwBoAcUBXf//ABcAAAZfBbYCJgDpAAAABwBoAU4ABv//AEr/6wR7ByICJgDWAAAABwBoAFgBcv//AE3/7APEBcoCJgDqAAAABgBoABoAAP//AJoAAAULBvYCJgDXAAAABwBuAOUBRv//AIYAAAQSBaACJgDrAAAABgBuXfAAAP//AJoAAAULBw0CJgDXAAAABwBoAMYBXf//AIYAAAQSBbYCJgDrAAAABgBoPgYAAP//AHT/6wUbByICJgAxAAAABwBoALoBcv//AFP/7AQ0BcsCJ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z1f7VubOUprenqaUDMYN3dJCObrja08topDArqoHM3tTVd52VfIqAlgAAAAABALYAAAT+BbAACwAAATMRIxEjASMRMxEzBEW5uQP9Lbm5AwWw+lAEb/uRBbD7kgABADAAAAT0BbAADwAAAREjESEDCgErATUzMhIbAQT0uv3xEQ677jMojHEMFgWw+lAFGv3r/l3+npUBEQFfAqsAAQBR/+sEyAWwABQAAAEXATMBDgEjIiYnNx4BMzI2PwEBMwJOSwFY1/38PIiaGUEKBgpAEktCKCr+DtAC+8MDePtAhIEGA5ACAkpSVgQ+AAADAFP/xAXjBewAFQAeACcAAAEzIAAREAAhIxUjNSMgABEQACEzNTMDIgYVFBY7AREzETMyNjU0JiMDeBsBAgFO/rL+/hu5Hf79/rQBTAEDHbnWxtHRxh25HcTS0sQFHv69/vv++f67xsYBQwEHAQUBRc7+nenMzucDavyW6c7L6AAAAAABALT+oQWSBbAACwAAEzMRIREzETMDIxEhtLkC17mVEqX72QWw+uUFG/rp/ggBXwABAJcAAATEBbAAEwAAAREjEQ4BIyImNREzERQWMzI2NxEExLlhsHv187qMomm8ZwWw+lACYR0azvIBxv46q38cHAK4AAEAtAAABtIFsAALAAABESERMxEhETMRIREBbgH6uQH4ufniBbD65QUb+uUFG/pQBbAAAAABALT+oQdrBbAADwAAAREhETMRIREzETMDIxEhEQFuAfq5Afi5mRKm+gEFsPrlBRv65QUb+uX+DAFfBbAAAAAAAgARAAAFuAWwAAwAFQAAEyERITIWFRQGIyERIQERITI2NTQmIxECVQFo7vz97f3f/mQCVQFonJSUnAWw/ajhx8joBRv9qP3Sn355mAAAAAADALUAAAY1BbAACgATABcAAAEhMhYVFAYjIREzGQEhMjY1NCYjASMRMwFuAWju/P3t/d+5AWiclJScA1+5uQNY4cfI6AWw/RP90p9+eZj9PQWwAAACAKYAAASxBbAACgATAAABITIWFRQGIyERMxkBITI2NTQmIwFfAWju/P3t/d+5AWiclJScA1jhx8joBbD9E/3Sn355mAAAAAABALH/7AT2BcYAHwAAEzQAMzI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AAATTBx0CJgA7AAAABwBzAaABV///AHL/7APsBeACJgBDAAAABwBCAJYAG///AHL/7APsBd0CJgBDAAAABwBzAVAAF///AHL/7APsBgQCJgBDAAAABgCaUhsAAP//AHL/7APsBg8CJgBDAAAABgCgTB4AAP//AHL/7APsBcoCJgBDAAAABgBoLBoAAP//AHL/7APsBkYCJgBDAAAABwCeANMAZv//AHL/7APsBl4CJgBDAAAABwHUAOP/6///AGH+RAPyBE4CJgBFAAAABwB3AUX/9///AGL/7APpBeECJgBHAAAABwBCAJsAHP//AGL/7APpBd4CJgBHAAAABwBzAVUAGP//AGL/7APpBgUCJgBHAAAABgCaVxwAAP//AGL/7APpBcsCJgBHAAAABgBoMRsAAP///7UAAAFVBcsCJgCKAAAABwBC/2YABv//AJsAAAI9BcgCJgCKAAAABgBzHwIAAP///8sAAAIoBe8CJgCKAAAABwCa/yIABv///6UAAAJOBbUCJgCKAAAABwBo/vwABf//AJEAAAP4Bg8CJgBQAAAABgCgZR4AAP//AGD/7AQnBeACJgBRAAAABwBCALMAG///AGD/7AQnBd0CJgBRAAAABwBzAW0AF///AGD/7AQnBgQCJgBRAAAABgCabxsAAP//AGD/7AQnBg8CJgBRAAAABgCgaR4AAP//AGD/7AQnBcoCJgBRAAAABgBoSRoAAP//AI3/7AP2BcsCJgBXAAAABwBCALEABv//AI3/7AP2BcgCJgBXAAAABwBzAWsAAv//AI3/7AP2Be8CJgBXAAAABgCabQYAAP//AI3/7AP2BbUCJgBXAAAABgBoRwUAAP//ABv+SwPkBcgCJgBbAAAABwBzASkAAv//ABv+SwPkBbUCJgBbAAAABgBoBQUAAP//ACcAAAUiBvoCJgAjAAAABwBuAM4BSv//AHL/7APsBbgCJgBDAAAABgBuUAgAAP//ACcAAAUiB0wCJgAjAAAABwCcAPsBnP//AHL/7APsBgoCJgBDAAAABgCcfVoAAAACACf+UAUiBbAAGgAdAAABMwEjDgEVFBYzMjY3Fw4BIyImNTQ2NwMhAyMBIQMCWaACKSVTWCMrHS8Y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goCJgBDAAAABgCcfVoAAP//ACcAAAUiBwwCJgAjAAAABwBoAKoBXP//AHL/7APsBcoCJgBDAAAABgBoLBoAAP////IAAAdXBbACBgB/AAD//wA9/+sGfAROAgYAhAAA//8AtgAABHUHTAImACcAAAAHAJwAxwGc//8AYv/sA+kGCwImAEcAAAAHAJwAggBb//8AX//rBRAG3gImAUEAAAAHAGgAfQEu//8AYv/sA+kETwIGAJkAAP//AGL/7APpBcsCJgCZAAAABgBoMRsAAP//ABsAAAcoBwwCJgDVAAAABwBoAacBXP//ABUAAAYEBbUCJgDpAAAABwBoATwABf//AFH/6wRnByECJgDWAAAABwBoAGEBcf//AFj/7QOsBckCJgDqAAAABgBoCBkAAP//ALYAAAT+BvoCJgDXAAAABwBuAQQBSv//AJwAAAQBBaQCJgDrAAAABgBudfQAAP//ALYAAAT+BwwCJgDXAAAABwBoAOABXP//AJwAAAQBBbUCJgDrAAAABgBoUQUAAP//AIL/6wUNByECJgAxAAAABwBoAMoBcf//AGD/7AQnBcoCJgBRAAAABgBoSRoAAP//AHP/6wT+BcUCBgESAAD//wBg/+wEJwROAgYBEwAA//8Ac//rBP4HBwImARIAAAAHAGgA0gFX//8AYP/sBCcF5gImARMAAAAGAGgyNgAA//8Asf/sBPYHIgImAOIAAAAHAGgAtwFy//8AZP/rA+AFygImAPoAAAAGAGgmGgAA//8AUf/rBMgG+gImANkAAAAHAG4ArQFK//8AG/5LA+QFpAImAFsAAAAGAG4p9AAA//8AUf/rBMgHDAImANkAAAAHAGgAiQFc//8AG/5LA+QFtQImAFsAAAAGAGgFBQAA//8AUf/rBMgHSwImANkAAAAHAKEBNgFd//8AG/5LA/oF9AImAFsAAAAHAKEAsgAG//8AlwAABMQHDAImANwAAAAHAGgAswFc//8AZwAAA70FtQImAPQAAAAGAGgOBQAA//8AtQAABjUHDAAmAOEPAAAnACsEuQAAAAcAaAF9AVz//wCdAAAFfwW1ACYA+QAAACcAigQqAAAABwBoARcABf//AEH+SwUXBbACJgA6AAA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JHQkMAAAADAAAAAFJkICBkb3ViQG/gAAAAAAAAAAAAR3JuIGRvdWJAb+AAAAAAAAAAAABCbCAgZG91YkBv4AAAAAAAAAAAAEJyZFRVbnRGI1JsdAAAAAAAAAAAAAAAAEJsZCBVbnRGI1JsdAAAAAAAAAAAAAAAAFJzbHRVbnRGI1B4bEBSAAAAAAAAAAAACnZlY3RvckRhdGFib29sAQAAAABQZ1BzZW51bQAAAABQZ1BzAAAAAFBnUEMAAAAATGVmdFVudEYjUmx0AAAAAAAAAAAAAAAAVG9wIFVudEYjUmx0AAAAAAAAAAAAAAAAU2NsIFVudEYjUHJjQFkAAAAAAAA4QklNA+0AAAAAABAASAAAAAEAAgBIAAAAAQACOEJJTQQmAAAAAAAOAAAAAAAAAAAAAD+AAAA4QklNBA0AAAAAAAQAAAB4OEJJTQQZAAAAAAAEAAAAHjhCSU0D8wAAAAAACQAAAAAAAAAAAQA4QklNJxAAAAAAAAoAAQAAAAAAAAACOEJJTQP1AAAAAABIAC9mZgABAGxmZgAGAAAAAAABAC9mZgABAKGZmgAGAAAAAAABADIAAAABAFoAAAAGAAAAAAABADUAAAABAC0AAAAGAAAAAAABOEJJTQP4AAAAAABwAAD/////////////////////////////A+gAAAAA/////////////////////////////wPoAAAAAP////////////////////////////8D6AAAAAD/////////////////////////////A+gAADhCSU0EAAAAAAAAAgABOEJJTQQCAAAAAAAEAAAAADhCSU0EMAAAAAAAAgEBOEJJTQQtAAAAAAAGAAEAAAACOEJJTQQIAAAAAAAQAAAAAQAAAkAAAAJAAAAAADhCSU0EHgAAAAAABAAAAAA4QklNBBoAAAAAA0sAAAAGAAAAAAAAAAAAAAE2AAACtwAAAAsAQgBlAHoAIABuAGEAegB3AHkALQAxAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAK3AAABNgAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABAAAAABAAAAAAAAbnVsbAAAAAIAAAAGYm91bmRzT2Jq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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPD94cGFja2V0IGVuZD0idyI/Pv/iDFhJQ0NfUFJPRklMRQABAQAADEhMaW5vAhAAAG1udHJSR0IgWFlaIAfOAAIACQAGADEAAGFjc3BNU0ZUAAAA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+EZFibWP6ProDx4hPjZtiTTYEUOTUqGnRWIuC1rMGu6EBCCDuTxIJHQfF1yU7pApXZLAzH1pEW55Dn6oJOx2rUdz/wuV7suu7Xo2Zc/VrhlUMQCA/EtyBJ+z9GE2pV7mFeJZrj91yUhCrfaDCgqB0PfAqlCn72UTO3qjjzJrUgMePbuciQxHNq8jt3uSbmYQychRaM3xjoBtTfv/lYYhlNSmjsfUYCat2JCasG5FeO4oBk+it2KxDn8aMhPwCQNQGu/KoC1riyFplai7+sSm2P78bSg8iDsDVqjpTBRZxvoqrzCMGo0ZBoRUUT4eXvg2tMTKlBfWHIR8CA9eRrU7bgDqMQDbA23HwEu+9UcjqFHWoG3XCQjdDKl0ySESemwIIVwzArT4gNulf9jgARu1YgCesBJJQ8lFaA16EkdMK7rrd9a9N+UY5LUL9kclr1O5pkiB3qOJDRtraFlCiR1ZjzrTnUjYA0Aof9jgqPej1ISZvMPq/vkHpAjkFK/F8VNiP+CyYEK5o9SZqLtZ3qeabGIioPTpTpkJBI4lCdL43C/GFkK/FzDGg79skFNqEolChWYNIKVdeVCe9BTbHZiqypKQtXoApKkh6Up0ag6fPAeagd7cf1urFKenQhweXTx33/AONsI5p3f//Z" -},function(){function a(a,b){b=b||"";for(var c=1024,d=window.atob(a),e=[],f=0,g=d.length;g>f;f+=c){for(var h=d.slice(f,f+c),i=new Array(h.length),j=0;j=b.toIndex&&(b.toIndex+=1),e.$apply(function(){d.apply(i(),[b.fromIndex,b.toIndex])}),g.api.draggableRows.raise.rowDropped(b,this),void c.preventDefault())}};h.addEventListener("dragover",j.onDragOverEventListener,!1),h.addEventListener("dragstart",j.onDragStartEventListener,!1),h.addEventListener("dragleave",j.onDragLeaveEventListener,!1),h.addEventListener("dragenter",j.onDragEnterEventListener,!1),h.addEventListener("dragend",j.onDragEndEventListener,!1),h.addEventListener("drop",j.onDropEventListener)}}]).directive("uiGridDraggableRow",["uiGridDraggableRowService",function(a){return{restrict:"ACE",scope:{grid:"="},compile:function(){return{pre:function(b,c){a.prepareDraggableRow(b,c)}}}}}]).directive("uiGridDraggableRows",["uiGridDraggableRowsService",function(a){return{restrict:"A",replace:!0,priority:0,require:"uiGrid",scope:!1,compile:function(){return{pre:function(b,c,d,e){a.initializeGrid(e.grid,b,c)}}}}}])}(),function(a,b){"object"==typeof module&&module.exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(k.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",k.cssRules.length),m[e]=1),e}function d(a,b){var c,d,e=a.style;if(b=b.charAt(0).toUpperCase()+b.slice(1),void 0!==e[b])return b;for(d=0;d',c)}k.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.scale*d.width,left:d.scale*d.radius,top:-d.scale*d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.scale*(d.length+d.width),k=2*d.scale*j,l=-(d.width+d.length)*d.scale*2+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;ka&&(d="-",a=-a),a=""+a;a.lengtha;a++)if(m[a]===d){m.splice(a,1),h(-1,c,"");break}}return!e&&p&&p.then&&p.then(i),d}var t=new i,u=l[0],v=!1;if(u&&u.match(a,f)){if(!u.matchData(g))throw new Error("Expected "+u+" with different data\nEXPECTED: "+r(u.data)+"\nGOT: "+g);if(!u.matchHeaders(j))throw new Error("Expected "+u+" with different headers\nEXPECTED: "+r(u.headers)+"\nGOT: "+r(j));if(l.shift(),u.response)return void m.push(s(u));v=!0}for(var w,x=-1;w=k[++x];)if(w.match(a,f,g,j||{})){if(w.response)(e?e.defer:n)(s(w));else{if(!w.passThrough)throw new Error("No response defined !");d(a,f,g,h,j,p,q)}return}throw v?new Error("No response defined !"):new Error("Unexpected request: "+a+" "+f+"\n"+(u?"Expected "+u:"No more request expected"))}function j(a){b.forEach(["GET","DELETE","JSONP"],function(b){g[a+b]=function(d,e){return g[a](b,d,c,e)}}),b.forEach(["PUT","POST","PATCH"],function(b){g[a+b]=function(c,d,e){return g[a](b,c,d,e)}})}var k=[],l=[],m=[],n=b.bind(m,m.push),o=b.copy;return g.when=function(a,b,c,d){var g=new h(a,b,c,d),i={respond:function(a,b,c,d){g.response=f(a,b,c,d)}};return e&&(i.passThrough=function(){g.passThrough=!0}),k.push(g),i},j("when"),g.expect=function(a,b,c,d){var e=new h(a,b,c,d);return l.push(e),{respond:function(a,b,c,d){e.response=f(a,b,c,d)}}},j("expect"),g.flush=function(c){if(a.$digest(),!m.length)throw new Error("No pending request to flush !");if(b.isDefined(c))for(;c--;){if(!m.length)throw new Error("No more pending request to flush !");m.shift()()}else for(;m.length;)m.shift()();g.verifyNoOutstandingExpectation()},g.verifyNoOutstandingExpectation=function(){if(a.$digest(),l.length)throw new Error("Unsatisfied requests: "+l.join(", "))},g.verifyNoOutstandingRequest=function(){if(m.length)throw new Error("Unflushed requests: "+m.length)},g.resetExpectations=function(){l.length=0,m.length=0},g}function h(a,c,d,e){this.data=d,this.headers=e,this.match=function(c,d,e,f){return a!=c?!1:this.matchUrl(d)?b.isDefined(e)&&!this.matchData(e)?!1:b.isDefined(f)&&!this.matchHeaders(f)?!1:!0:!1},this.matchUrl=function(a){return c?b.isFunction(c.test)?c.test(a):c==a:!0},this.matchHeaders=function(a){return b.isUndefined(e)?!0:b.isFunction(e)?e(a):b.equals(e,a)},this.matchData=function(a){return b.isUndefined(d)?!0:d&&b.isFunction(d.test)?d.test(a):d&&b.isFunction(d)?d(a):d&&!b.isString(d)?b.equals(d,b.fromJson(a)):d==a},this.toString=function(){return a+" "+c}}function i(){i.$$lastInstance=this,this.open=function(a,b,c){this.$$method=a,this.$$url=b,this.$$async=c,this.$$reqHeaders={},this.$$respHeaders={}},this.send=function(a){this.$$data=a},this.setRequestHeader=function(a,b){this.$$reqHeaders[a]=b},this.getResponseHeader=function(a){var d=this.$$respHeaders[a];return d?d:(a=b.lowercase(a),(d=this.$$respHeaders[a])?d:(d=c,b.forEach(this.$$respHeaders,function(c,e){d||b.lowercase(e)!=a||(d=c)}),d))},this.getAllResponseHeaders=function(){var a=[];return b.forEach(this.$$respHeaders,function(b,c){a.push(c+": "+b)}),a.join("\n")},this.abort=b.noop}b.mock={},b.mock.$BrowserProvider=function(){this.$get=function(){return new b.mock.$Browser}},b.mock.$Browser=function(){var a=this;this.isMock=!0,a.$$url="http://server/",a.$$lastUrl=a.$$url,a.pollFns=[],a.$$completeOutstandingRequest=b.noop,a.$$incOutstandingRequestCount=b.noop,a.onUrlChange=function(b){return a.pollFns.push(function(){a.$$lastUrl!=a.$$url&&(a.$$lastUrl=a.$$url,b(a.$$url))}),b},a.cookieHash={},a.lastCookieHash={},a.deferredFns=[],a.deferredNextId=0,a.defer=function(b,c){return c=c||0,a.deferredFns.push({time:a.defer.now+c,fn:b,id:a.deferredNextId}),a.deferredFns.sort(function(a,b){return a.time-b.time}),a.deferredNextId++},a.defer.now=0,a.defer.cancel=function(d){var e;return b.forEach(a.deferredFns,function(a,b){a.id===d&&(e=b)}),e!==c?(a.deferredFns.splice(e,1),!0):!1},a.defer.flush=function(c){if(b.isDefined(c))a.defer.now+=c;else{if(!a.deferredFns.length)throw new Error("No deferred tasks to be flushed");a.defer.now=a.deferredFns[a.deferredFns.length-1].time}for(;a.deferredFns.length&&a.deferredFns[0].time<=a.defer.now;)a.deferredFns.shift().fn()},a.$$baseHref="",a.baseHref=function(){return this.$$baseHref}},b.mock.$Browser.prototype={poll:function(){b.forEach(this.pollFns,function(a){a()})},addPollFn:function(a){return this.pollFns.push(a),a},url:function(a,b){return a?(this.$$url=a,this):this.$$url},cookies:function(a,c){return a?void(b.isUndefined(c)?delete this.cookieHash[a]:b.isString(c)&&c.length<=4096&&(this.cookieHash[a]=c)):(b.equals(this.cookieHash,this.lastCookieHash)||(this.lastCookieHash=b.copy(this.cookieHash),this.cookieHash=b.copy(this.cookieHash)),this.cookieHash)},notifyWhenNoOutstandingRequests:function(a){a()}},b.mock.$ExceptionHandlerProvider=function(){var a;this.mode=function(b){switch(b){case"rethrow":a=function(a){throw a};break;case"log":var c=[];a=function(a){1==arguments.length?c.push(a):c.push([].slice.call(arguments,0))},a.errors=c;break;default:throw new Error("Unknown mode '"+b+"', only 'log'/'rethrow' modes are allowed!")}},this.$get=function(){return a},this.mode("rethrow")},b.mock.$LogProvider=function(){function a(a,b,c){return a.concat(Array.prototype.slice.call(b,c))}var c=!0;this.debugEnabled=function(a){return b.isDefined(a)?(c=a,this):c},this.$get=function(){var d={log:function(){d.log.logs.push(a([],arguments,0))},warn:function(){d.warn.logs.push(a([],arguments,0))},info:function(){d.info.logs.push(a([],arguments,0))},error:function(){d.error.logs.push(a([],arguments,0))},debug:function(){c&&d.debug.logs.push(a([],arguments,0))}};return d.reset=function(){d.log.logs=[],d.info.logs=[],d.warn.logs=[],d.error.logs=[],d.debug.logs=[]},d.assertEmpty=function(){var a=[];if(b.forEach(["error","warn","info","log","debug"],function(c){b.forEach(d[c].logs,function(d){b.forEach(d,function(b){a.push("MOCK $log ("+c+"): "+String(b)+"\n"+(b.stack||""))})})}),a.length)throw a.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or an expected log message was not checked and removed:"),a.push(""),new Error(a.join("\n---------\n"))},d.reset(),d}},b.mock.$IntervalProvider=function(){this.$get=["$rootScope","$q",function(a,d){var e=[],f=0,g=0,h=function(h,i,j,k){function l(){if(m.notify(o++),j>0&&o>=j){var d;m.resolve(o),b.forEach(e,function(a,b){a.id===n.$$intervalId&&(d=b)}),d!==c&&e.splice(d,1)}p||a.$apply()}var m=d.defer(),n=m.promise,o=0,p=b.isDefined(k)&&!k;return j=b.isDefined(j)?j:0,n.then(null,null,h),n.$$intervalId=f,e.push({nextTime:g+i,delay:i,fn:l,id:f,deferred:m}),e.sort(function(a,b){return a.nextTime-b.nextTime}),f++,n};return h.cancel=function(a){if(!a)return!1;var d;return b.forEach(e,function(b,c){b.id===a.$$intervalId&&(d=c)}),d!==c?(e[d].deferred.reject("canceled"),e.splice(d,1),!0):!1},h.flush=function(a){for(g+=a;e.length&&e[0].nextTime<=g;){var b=e[0];b.fn(),b.nextTime+=b.delay,e.sort(function(a,b){return a.nextTime-b.nextTime})}return a},h}]};var j=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;if(b.mock.TzDate=function(a,c){var e=new Date(0);if(b.isString(c)){var g=c;if(e.origDate=d(c),c=e.origDate.getTime(),isNaN(c))throw{name:"Illegal Argument",message:"Arg '"+g+"' passed into TzDate constructor is not a valid date string"}}else e.origDate=new Date(c);var h=new Date(c).getTimezoneOffset();e.offsetDiff=60*h*1e3-1e3*a*60*60,e.date=new Date(c+e.offsetDiff),e.getTime=function(){return e.date.getTime()-e.offsetDiff},e.toLocaleDateString=function(){return e.date.toLocaleDateString()},e.getFullYear=function(){return e.date.getFullYear()},e.getMonth=function(){return e.date.getMonth()},e.getDate=function(){return e.date.getDate()},e.getHours=function(){return e.date.getHours()},e.getMinutes=function(){return e.date.getMinutes()},e.getSeconds=function(){return e.date.getSeconds()},e.getMilliseconds=function(){return e.date.getMilliseconds()},e.getTimezoneOffset=function(){return 60*a},e.getUTCFullYear=function(){return e.origDate.getUTCFullYear()},e.getUTCMonth=function(){return e.origDate.getUTCMonth()},e.getUTCDate=function(){return e.origDate.getUTCDate()},e.getUTCHours=function(){return e.origDate.getUTCHours()},e.getUTCMinutes=function(){return e.origDate.getUTCMinutes()},e.getUTCSeconds=function(){return e.origDate.getUTCSeconds()},e.getUTCMilliseconds=function(){return e.origDate.getUTCMilliseconds()},e.getDay=function(){return e.date.getDay()},e.toISOString&&(e.toISOString=function(){return f(e.origDate.getUTCFullYear(),4)+"-"+f(e.origDate.getUTCMonth()+1,2)+"-"+f(e.origDate.getUTCDate(),2)+"T"+f(e.origDate.getUTCHours(),2)+":"+f(e.origDate.getUTCMinutes(),2)+":"+f(e.origDate.getUTCSeconds(),2)+"."+f(e.origDate.getUTCMilliseconds(),3)+"Z"});var i=["getUTCDay","getYear","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toDateString","toGMTString","toJSON","toLocaleFormat","toLocaleString","toLocaleTimeString","toSource","toString","toTimeString","toUTCString","valueOf"];return b.forEach(i,function(a){e[a]=function(){throw new Error("Method '"+a+"' is not implemented in the TzDate mock")}}),e},b.mock.TzDate.prototype=Date.prototype,b.mock.animate=b.module("ngAnimateMock",["ng"]).config(["$provide",function(a){var c=[];a.value("$$animateReflow",function(a){var b=c.length;return c.push(a),function(){c.splice(b,1)}}),a.decorator("$animate",["$delegate","$$asyncCallback",function(a,d){var e={queue:[],enabled:a.enabled,triggerCallbacks:function(){d.flush()},triggerReflow:function(){b.forEach(c,function(a){a()}),c=[]}};return b.forEach(["enter","leave","move","addClass","removeClass","setClass"],function(b){e[b]=function(){e.queue.push({event:b,element:arguments[0],args:arguments}),a[b].apply(a,arguments)}}),e}])}]),b.mock.dump=function(a){function c(a){var e;return b.isElement(a)?(a=b.element(a),e=b.element("
              "),b.forEach(a,function(a){e.append(b.element(a).clone())}),e=e.html()):b.isArray(a)?(e=[],b.forEach(a,function(a){e.push(c(a))}),e="[ "+e.join(", ")+" ]"):e=b.isObject(a)?b.isFunction(a.$eval)&&b.isFunction(a.$apply)?d(a):a instanceof Error?a.stack||""+a.name+": "+a.message:b.toJson(a,!0):String(a),e}function d(a,c){c=c||" ";var e=[c+"Scope("+a.$id+"): {"];for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&!f.match(/^(\$|this)/)&&e.push(" "+f+": "+b.toJson(a[f]));for(var g=a.$$childHead;g;)e.push(d(g,c+" ")),g=g.$$nextSibling;return e.push("}"),e.join("\n"+c)}return c(a)},b.mock.$HttpBackendProvider=function(){this.$get=["$rootScope",g]},b.mock.$TimeoutDecorator=function(a,c){function d(a){var c=[];return b.forEach(a,function(a){c.push("{id: "+a.id+", time: "+a.time+"}")}),c.join(", ")}return a.flush=function(a){c.defer.flush(a)},a.verifyNoPendingTasks=function(){if(c.deferredFns.length)throw new Error("Deferred tasks to flush ("+c.deferredFns.length+"): "+d(c.deferredFns))},a},b.mock.$RAFDecorator=function(a){var b=[],c=function(a){var c=b.length;return b.push(a),function(){b.splice(c,1)}};return c.supported=a.supported,c.flush=function(){if(0===b.length)throw new Error("No rAF callbacks present");for(var a=b.length,c=0;a>c;c++)b[c]();b=[]},c},b.mock.$AsyncCallbackDecorator=function(a){var c=[],d=function(a){c.push(a)};return d.flush=function(){b.forEach(c,function(a){a()}),c=[]},d},b.mock.$RootElementProvider=function(){this.$get=function(){return b.element("
              ")}},b.module("ngMock",["ng"]).provider({$browser:b.mock.$BrowserProvider,$exceptionHandler:b.mock.$ExceptionHandlerProvider,$log:b.mock.$LogProvider,$interval:b.mock.$IntervalProvider,$httpBackend:b.mock.$HttpBackendProvider,$rootElement:b.mock.$RootElementProvider}).config(["$provide",function(a){a.decorator("$timeout",b.mock.$TimeoutDecorator),a.decorator("$$rAF",b.mock.$RAFDecorator),a.decorator("$$asyncCallback",b.mock.$AsyncCallbackDecorator)}]),b.module("ngMockE2E",["ng"]).config(["$provide",function(a){a.decorator("$httpBackend",b.mock.e2e.$httpBackendDecorator)}]),b.mock.e2e={},b.mock.e2e.$httpBackendDecorator=["$rootScope","$delegate","$browser",g],b.mock.clearDataCache=function(){var a,c=b.element.cache;for(a in c)if(Object.prototype.hasOwnProperty.call(c,a)){var d=c[a].handle;d&&b.element(d.elem).off(),delete c[a]}},a.jasmine||a.mocha){var k=null,l=function(){return!!k};(a.beforeEach||a.setup)(function(){k=this}),(a.afterEach||a.teardown)(function(){var a=k.$injector;k.$injector=null,k.$modules=null,k=null,a&&(a.get("$rootElement").off(),a.get("$browser").pollFns.length=0),b.mock.clearDataCache(),b.forEach(b.element.fragments,function(a,c){delete b.element.fragments[c]}),i.$$lastInstance=null,b.forEach(b.callbacks,function(a,c){delete b.callbacks[c]}),b.callbacks.counter=0}),a.module=b.mock.module=function(){function a(){if(k.$injector)throw new Error("Injector already created, can not register a module!");var a=k.$modules||(k.$modules=[]);b.forEach(c,function(c){b.isObject(c)&&!b.isArray(c)?a.push(function(a){b.forEach(c,function(b,c){a.value(c,b)})}):a.push(c)})}var c=Array.prototype.slice.call(arguments,0);return l()?a():a};var m=function(a,b){this.message=a.message,this.name=a.name,a.line&&(this.line=a.line),a.sourceId&&(this.sourceId=a.sourceId),a.stack&&b&&(this.stack=a.stack+"\n"+b.stack),a.stackArray&&(this.stackArray=a.stackArray)};m.prototype.toString=Error.prototype.toString,a.inject=b.mock.inject=function(){function a(){var a=k.$modules||[];a.unshift("ngMock"),a.unshift("ng");var e=k.$injector;e||(e=k.$injector=b.injector(a));for(var f=0,g=c.length;g>f;f++)try{e.invoke(c[f]||b.noop,this)}catch(h){if(h.stack&&d)throw new m(h,d);throw h}finally{d=null}}var c=Array.prototype.slice.call(arguments,0),d=new Error("Declaration Location");return l()?a.call(k):a}}}(window,window.angular),function(){var a;a=function(a,b){var c,d;for(c in a)d=a[c],"$$hashKey"!==c&&(b[c]=d)},angular.module("builder.controller",["builder.provider"]).controller("fbFormObjectEditableController",["$scope","$injector",function(b,c){var d;return d=c.get("$builder"),b.setupScope=function(c){var e;return a(c,b),b.optionsText=c.options.join("\n"),b.$watch("[label, description, placeholder, required, options, validation]",function(){return c.label=b.label,c.description=b.description,c.placeholder=b.placeholder,c.required=b.required,c.options=b.options,c.validation=b.validation},!0),b.$watch("optionsText",function(a){var c;return b.options=function(){var b,d,e,f;for(e=a.split("\n"),f=[],b=0,d=e.length;d>b;b++)c=e[b],c.length>0&&f.push(c);return f}(),b.inputText=b.options[0]}),e=d.components[c.component],b.validationOptions=e.validationOptions},b.data={model:null,backup:function(){return this.model={label:b.label,description:b.description,placeholder:b.placeholder,required:b.required,optionsText:b.optionsText,validation:b.validation}},rollback:function(){return this.model?(b.label=this.model.label,b.description=this.model.description,b.placeholder=this.model.placeholder,b.required=this.model.required,b.optionsText=this.model.optionsText,b.validation=this.model.validation):void 0}}}]).controller("fbComponentsController",["$scope","$injector",function(a,b){var c;return c=b.get("$builder"),a.selectGroup=function(b,d){var e,f,g,h;null!=b&&b.preventDefault(),a.activeGroup=d,a.components=[],g=c.components,h=[];for(f in g)e=g[f],e.group===d&&h.push(a.components.push(e));return h},a.groups=c.groups,a.activeGroup=a.groups[0],a.allComponents=c.components,a.$watch("allComponents",function(){return a.selectGroup(null,a.activeGroup)})}]).controller("fbComponentController",["$scope",function(b){return b.copyObjectToScope=function(c){return a(c,b)}}]).controller("fbFormController",["$scope","$injector",function(a,b){var c,d;return c=b.get("$builder"),d=b.get("$timeout"),null==a.input&&(a.input=[]),a.$watch("form",function(){return a.input.length>a.form.length&&a.input.splice(a.form.length),d(function(){return a.$broadcast(c.broadcastChannel.updateInput)})},!0)}]).controller("fbFormObjectController",["$scope","$injector",function(b,c){var d;return d=c.get("$builder"),b.copyObjectToScope=function(c){return a(c,b)},b.updateInput=function(a){var c;return c={id:b.formObject.id,label:b.formObject.label,value:null!=a?a:""},b.$parent.input.splice(b.$index,1,c)}}])}.call(this),function(){angular.module("builder.directive",["builder.provider","builder.controller","builder.drag","validator"]).directive("fbBuilder",["$injector",function(a){var b,c;return b=a.get("$builder"),c=a.get("$drag"),{restrict:"A",scope:{fbBuilder:"="},template:"
              \n
              \n
              ",link:function(a,d,e){var f,g,h;return a.formName=e.fbBuilder,null==(g=b.forms)[h=a.formName]&&(g[h]=[]),a.formObjects=b.forms[a.formName],f=!0,$(d).addClass("fb-builder"),c.droppable($(d),{move:function(a){var b,c,e,g,h,i,j,k,l,m,n;if(f&&($("div.fb-form-object-editable").popover("hide"),f=!1),e=$(d).find(".fb-form-object-editable:not(.empty,.dragging)"),0===e.length)return void(0===$(d).find(".fb-form-object-editable.empty").length&&$(d).find(">div:first").append($("
              ")));for(j=[],j.push(-1e3),h=k=0,m=e.length;m>k;h=k+=1)c=$(e[h]),i=c.offset(),g=c.height(),j.push(i.top+g/2);for(j.push(j[j.length-1]+1e3),h=l=1,n=j.length;n>l;h=l+=1)if(a.pageY>j[h-1]&&a.pageY<=j[h]){$(d).find(".empty").remove(),b=$("
              "),h-1l&&k--,b.updateFormObjectIndex(a.formName,l,k))):(j=i.object.formObject,j.editable&&b.removeFormObject(e.fbBuilder,j.index)),$(d).find(".empty").remove()):void $(d).find(".empty").remove()}})}}}]).directive("fbFormObjectEditable",["$injector",function(a){var b,c,d,e;return b=a.get("$builder"),d=a.get("$drag"),c=a.get("$compile"),e=a.get("$validator"),{restrict:"A",controller:"fbFormObjectEditableController",scope:{formObject:"=fbFormObjectEditable"},link:function(a,f){var g;return a.inputArray=[],a.$component=b.components[a.formObject.component],a.setupScope(a.formObject),a.$watch("$component.template",function(b){var d;if(b)return d=c(b)(a),$(f).html(d)}),$(f).on("click",function(){return!1}),d.draggable($(f),{object:{formObject:a.formObject}}),a.formObject.editable?(g={},a.$watch("$component.popoverTemplate",function(b){return b?($(f).removeClass(g.id),g={id:"fb-"+Math.random().toString().substr(2),isClickedSave:!1,view:null,html:b},g.html=$(g.html).addClass(g.id),g.view=c(g.html)(a),$(f).addClass(g.id),$(f).popover({html:!0,title:a.$component.label,content:g.view,container:"body"})):void 0}),a.popover={save:function(b){b.preventDefault(),e.validate(a).success(function(){return g.isClickedSave=!0,$(f).popover("hide")})},remove:function(c){c.preventDefault(),b.removeFormObject(a.$parent.formName,a.$parent.$index),$(f).popover("hide")},shown:function(){return a.data.backup(),g.isClickedSave=!1},cancel:function(b){a.data.rollback(),b&&(b.preventDefault(),$(f).popover("hide"))}},$(f).on("show.bs.popover",function(){var a,b,c;return d.isMouseMoved()?!1:($("div.fb-form-object-editable:not(."+g.id+")").popover("hide"),a=$("form."+g.id).closest(".popover"),a.length>0?(b=$(f).offset().top+$(f).height()/2,c=b-a.height()/2,a.css({position:"absolute",top:c}),a.show(),setTimeout(function(){return a.addClass("in"),$(f).triggerHandler("shown.bs.popover")},0),!1):void 0)}),$(f).on("shown.bs.popover",function(){$(".popover ."+g.id+" input:first").select(),a.$apply(function(){return a.popover.shown()})}),$(f).on("hide.bs.popover",function(){var b;return b=$("form."+g.id).closest(".popover"),g.isClickedSave||(a.$$phase||a.$root.$$phase?a.popover.cancel():a.$apply(function(){return a.popover.cancel()})),b.removeClass("in"),setTimeout(function(){return b.hide()},300),!1})):void 0}}}]).directive("fbComponents",function(){return{restrict:"A",template:'\n
              \n
              \n
              ',controller:"fbComponentsController"}}).directive("fbComponent",["$injector",function(a){var b,c,d;return b=a.get("$builder"),d=a.get("$drag"),c=a.get("$compile"),{restrict:"A",scope:{component:"=fbComponent"},controller:"fbComponentController",link:function(a,b){return a.copyObjectToScope(a.component),d.draggable($(b),{ +},function(){function a(a,b){b=b||"";for(var c=1024,d=window.atob(a),e=[],f=0,g=d.length;g>f;f+=c){for(var h=d.slice(f,f+c),i=new Array(h.length),j=0;j=b.toIndex&&(b.toIndex+=1),e.$apply(function(){d.apply(i(),[b.fromIndex,b.toIndex])}),g.api.draggableRows.raise.rowDropped(b,this),void c.preventDefault())}};h.addEventListener("dragover",j.onDragOverEventListener,!1),h.addEventListener("dragstart",j.onDragStartEventListener,!1),h.addEventListener("dragleave",j.onDragLeaveEventListener,!1),h.addEventListener("dragenter",j.onDragEnterEventListener,!1),h.addEventListener("dragend",j.onDragEndEventListener,!1),h.addEventListener("drop",j.onDropEventListener)}}]).directive("uiGridDraggableRow",["uiGridDraggableRowService",function(a){return{restrict:"ACE",scope:{grid:"="},compile:function(){return{pre:function(b,c){a.prepareDraggableRow(b,c)}}}}}]).directive("uiGridDraggableRows",["uiGridDraggableRowsService",function(a){return{restrict:"A",replace:!0,priority:0,require:"uiGrid",scope:!1,compile:function(){return{pre:function(b,c,d,e){a.initializeGrid(e.grid,b,c)}}}}}])}(),function(a,b){"object"==typeof module&&module.exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(k.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",k.cssRules.length),m[e]=1),e}function d(a,b){var c,d,e=a.style;if(b=b.charAt(0).toUpperCase()+b.slice(1),void 0!==e[b])return b;for(d=0;d',c)}k.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.scale*d.width,left:d.scale*d.radius,top:-d.scale*d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.scale*(d.length+d.width),k=2*d.scale*j,l=-(d.width+d.length)*d.scale*2+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;ka&&(d="-",a=-a),a=""+a;a.lengtha;a++)if(m[a]===d){m.splice(a,1),h(-1,c,"");break}}return!e&&p&&p.then&&p.then(i),d}var t=new i,u=l[0],v=!1;if(u&&u.match(a,f)){if(!u.matchData(g))throw new Error("Expected "+u+" with different data\nEXPECTED: "+r(u.data)+"\nGOT: "+g);if(!u.matchHeaders(j))throw new Error("Expected "+u+" with different headers\nEXPECTED: "+r(u.headers)+"\nGOT: "+r(j));if(l.shift(),u.response)return void m.push(s(u));v=!0}for(var w,x=-1;w=k[++x];)if(w.match(a,f,g,j||{})){if(w.response)(e?e.defer:n)(s(w));else{if(!w.passThrough)throw new Error("No response defined !");d(a,f,g,h,j,p,q)}return}throw v?new Error("No response defined !"):new Error("Unexpected request: "+a+" "+f+"\n"+(u?"Expected "+u:"No more request expected"))}function j(a){b.forEach(["GET","DELETE","JSONP"],function(b){g[a+b]=function(d,e){return g[a](b,d,c,e)}}),b.forEach(["PUT","POST","PATCH"],function(b){g[a+b]=function(c,d,e){return g[a](b,c,d,e)}})}var k=[],l=[],m=[],n=b.bind(m,m.push),o=b.copy;return g.when=function(a,b,c,d){var g=new h(a,b,c,d),i={respond:function(a,b,c,d){g.response=f(a,b,c,d)}};return e&&(i.passThrough=function(){g.passThrough=!0}),k.push(g),i},j("when"),g.expect=function(a,b,c,d){var e=new h(a,b,c,d);return l.push(e),{respond:function(a,b,c,d){e.response=f(a,b,c,d)}}},j("expect"),g.flush=function(c){if(a.$digest(),!m.length)throw new Error("No pending request to flush !");if(b.isDefined(c))for(;c--;){if(!m.length)throw new Error("No more pending request to flush !");m.shift()()}else for(;m.length;)m.shift()();g.verifyNoOutstandingExpectation()},g.verifyNoOutstandingExpectation=function(){if(a.$digest(),l.length)throw new Error("Unsatisfied requests: "+l.join(", "))},g.verifyNoOutstandingRequest=function(){if(m.length)throw new Error("Unflushed requests: "+m.length)},g.resetExpectations=function(){l.length=0,m.length=0},g}function h(a,c,d,e){this.data=d,this.headers=e,this.match=function(c,d,e,f){return a!=c?!1:this.matchUrl(d)?b.isDefined(e)&&!this.matchData(e)?!1:!b.isDefined(f)||this.matchHeaders(f):!1},this.matchUrl=function(a){return c?b.isFunction(c.test)?c.test(a):c==a:!0},this.matchHeaders=function(a){return b.isUndefined(e)?!0:b.isFunction(e)?e(a):b.equals(e,a)},this.matchData=function(a){return b.isUndefined(d)?!0:d&&b.isFunction(d.test)?d.test(a):d&&b.isFunction(d)?d(a):d&&!b.isString(d)?b.equals(d,b.fromJson(a)):d==a},this.toString=function(){return a+" "+c}}function i(){i.$$lastInstance=this,this.open=function(a,b,c){this.$$method=a,this.$$url=b,this.$$async=c,this.$$reqHeaders={},this.$$respHeaders={}},this.send=function(a){this.$$data=a},this.setRequestHeader=function(a,b){this.$$reqHeaders[a]=b},this.getResponseHeader=function(a){var d=this.$$respHeaders[a];return d?d:(a=b.lowercase(a),(d=this.$$respHeaders[a])?d:(d=c,b.forEach(this.$$respHeaders,function(c,e){d||b.lowercase(e)!=a||(d=c)}),d))},this.getAllResponseHeaders=function(){var a=[];return b.forEach(this.$$respHeaders,function(b,c){a.push(c+": "+b)}),a.join("\n")},this.abort=b.noop}b.mock={},b.mock.$BrowserProvider=function(){this.$get=function(){return new b.mock.$Browser}},b.mock.$Browser=function(){var a=this;this.isMock=!0,a.$$url="http://server/",a.$$lastUrl=a.$$url,a.pollFns=[],a.$$completeOutstandingRequest=b.noop,a.$$incOutstandingRequestCount=b.noop,a.onUrlChange=function(b){return a.pollFns.push(function(){a.$$lastUrl!=a.$$url&&(a.$$lastUrl=a.$$url,b(a.$$url))}),b},a.cookieHash={},a.lastCookieHash={},a.deferredFns=[],a.deferredNextId=0,a.defer=function(b,c){return c=c||0,a.deferredFns.push({time:a.defer.now+c,fn:b,id:a.deferredNextId}),a.deferredFns.sort(function(a,b){return a.time-b.time}),a.deferredNextId++},a.defer.now=0,a.defer.cancel=function(d){var e;return b.forEach(a.deferredFns,function(a,b){a.id===d&&(e=b)}),e!==c?(a.deferredFns.splice(e,1),!0):!1},a.defer.flush=function(c){if(b.isDefined(c))a.defer.now+=c;else{if(!a.deferredFns.length)throw new Error("No deferred tasks to be flushed");a.defer.now=a.deferredFns[a.deferredFns.length-1].time}for(;a.deferredFns.length&&a.deferredFns[0].time<=a.defer.now;)a.deferredFns.shift().fn()},a.$$baseHref="",a.baseHref=function(){return this.$$baseHref}},b.mock.$Browser.prototype={poll:function(){b.forEach(this.pollFns,function(a){a()})},addPollFn:function(a){return this.pollFns.push(a),a},url:function(a,b){return a?(this.$$url=a,this):this.$$url},cookies:function(a,c){return a?void(b.isUndefined(c)?delete this.cookieHash[a]:b.isString(c)&&c.length<=4096&&(this.cookieHash[a]=c)):(b.equals(this.cookieHash,this.lastCookieHash)||(this.lastCookieHash=b.copy(this.cookieHash),this.cookieHash=b.copy(this.cookieHash)),this.cookieHash)},notifyWhenNoOutstandingRequests:function(a){a()}},b.mock.$ExceptionHandlerProvider=function(){var a;this.mode=function(b){switch(b){case"rethrow":a=function(a){throw a};break;case"log":var c=[];a=function(a){1==arguments.length?c.push(a):c.push([].slice.call(arguments,0))},a.errors=c;break;default:throw new Error("Unknown mode '"+b+"', only 'log'/'rethrow' modes are allowed!")}},this.$get=function(){return a},this.mode("rethrow")},b.mock.$LogProvider=function(){function a(a,b,c){return a.concat(Array.prototype.slice.call(b,c))}var c=!0;this.debugEnabled=function(a){return b.isDefined(a)?(c=a,this):c},this.$get=function(){var d={log:function(){d.log.logs.push(a([],arguments,0))},warn:function(){d.warn.logs.push(a([],arguments,0))},info:function(){d.info.logs.push(a([],arguments,0))},error:function(){d.error.logs.push(a([],arguments,0))},debug:function(){c&&d.debug.logs.push(a([],arguments,0))}};return d.reset=function(){d.log.logs=[],d.info.logs=[],d.warn.logs=[],d.error.logs=[],d.debug.logs=[]},d.assertEmpty=function(){var a=[];if(b.forEach(["error","warn","info","log","debug"],function(c){b.forEach(d[c].logs,function(d){b.forEach(d,function(b){a.push("MOCK $log ("+c+"): "+String(b)+"\n"+(b.stack||""))})})}),a.length)throw a.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or an expected log message was not checked and removed:"),a.push(""),new Error(a.join("\n---------\n"))},d.reset(),d}},b.mock.$IntervalProvider=function(){this.$get=["$rootScope","$q",function(a,d){var e=[],f=0,g=0,h=function(h,i,j,k){function l(){if(m.notify(o++),j>0&&o>=j){var d;m.resolve(o),b.forEach(e,function(a,b){a.id===n.$$intervalId&&(d=b)}),d!==c&&e.splice(d,1)}p||a.$apply()}var m=d.defer(),n=m.promise,o=0,p=b.isDefined(k)&&!k;return j=b.isDefined(j)?j:0,n.then(null,null,h),n.$$intervalId=f,e.push({nextTime:g+i,delay:i,fn:l,id:f,deferred:m}),e.sort(function(a,b){return a.nextTime-b.nextTime}),f++,n};return h.cancel=function(a){if(!a)return!1;var d;return b.forEach(e,function(b,c){b.id===a.$$intervalId&&(d=c)}),d!==c?(e[d].deferred.reject("canceled"),e.splice(d,1),!0):!1},h.flush=function(a){for(g+=a;e.length&&e[0].nextTime<=g;){var b=e[0];b.fn(),b.nextTime+=b.delay,e.sort(function(a,b){return a.nextTime-b.nextTime})}return a},h}]};var j=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;if(b.mock.TzDate=function(a,c){var e=new Date(0);if(b.isString(c)){var g=c;if(e.origDate=d(c),c=e.origDate.getTime(),isNaN(c))throw{name:"Illegal Argument",message:"Arg '"+g+"' passed into TzDate constructor is not a valid date string"}}else e.origDate=new Date(c);var h=new Date(c).getTimezoneOffset();e.offsetDiff=60*h*1e3-1e3*a*60*60,e.date=new Date(c+e.offsetDiff),e.getTime=function(){return e.date.getTime()-e.offsetDiff},e.toLocaleDateString=function(){return e.date.toLocaleDateString()},e.getFullYear=function(){return e.date.getFullYear()},e.getMonth=function(){return e.date.getMonth()},e.getDate=function(){return e.date.getDate()},e.getHours=function(){return e.date.getHours()},e.getMinutes=function(){return e.date.getMinutes()},e.getSeconds=function(){return e.date.getSeconds()},e.getMilliseconds=function(){return e.date.getMilliseconds()},e.getTimezoneOffset=function(){return 60*a},e.getUTCFullYear=function(){return e.origDate.getUTCFullYear()},e.getUTCMonth=function(){return e.origDate.getUTCMonth()},e.getUTCDate=function(){return e.origDate.getUTCDate()},e.getUTCHours=function(){return e.origDate.getUTCHours()},e.getUTCMinutes=function(){return e.origDate.getUTCMinutes()},e.getUTCSeconds=function(){return e.origDate.getUTCSeconds()},e.getUTCMilliseconds=function(){return e.origDate.getUTCMilliseconds()},e.getDay=function(){return e.date.getDay()},e.toISOString&&(e.toISOString=function(){return f(e.origDate.getUTCFullYear(),4)+"-"+f(e.origDate.getUTCMonth()+1,2)+"-"+f(e.origDate.getUTCDate(),2)+"T"+f(e.origDate.getUTCHours(),2)+":"+f(e.origDate.getUTCMinutes(),2)+":"+f(e.origDate.getUTCSeconds(),2)+"."+f(e.origDate.getUTCMilliseconds(),3)+"Z"});var i=["getUTCDay","getYear","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toDateString","toGMTString","toJSON","toLocaleFormat","toLocaleString","toLocaleTimeString","toSource","toString","toTimeString","toUTCString","valueOf"];return b.forEach(i,function(a){e[a]=function(){throw new Error("Method '"+a+"' is not implemented in the TzDate mock")}}),e},b.mock.TzDate.prototype=Date.prototype,b.mock.animate=b.module("ngAnimateMock",["ng"]).config(["$provide",function(a){var c=[];a.value("$$animateReflow",function(a){var b=c.length;return c.push(a),function(){c.splice(b,1)}}),a.decorator("$animate",["$delegate","$$asyncCallback",function(a,d){var e={queue:[],enabled:a.enabled,triggerCallbacks:function(){d.flush()},triggerReflow:function(){b.forEach(c,function(a){a()}),c=[]}};return b.forEach(["enter","leave","move","addClass","removeClass","setClass"],function(b){e[b]=function(){e.queue.push({event:b,element:arguments[0],args:arguments}),a[b].apply(a,arguments)}}),e}])}]),b.mock.dump=function(a){function c(a){var e;return b.isElement(a)?(a=b.element(a),e=b.element("
              "),b.forEach(a,function(a){e.append(b.element(a).clone())}),e=e.html()):b.isArray(a)?(e=[],b.forEach(a,function(a){e.push(c(a))}),e="[ "+e.join(", ")+" ]"):e=b.isObject(a)?b.isFunction(a.$eval)&&b.isFunction(a.$apply)?d(a):a instanceof Error?a.stack||""+a.name+": "+a.message:b.toJson(a,!0):String(a),e}function d(a,c){c=c||" ";var e=[c+"Scope("+a.$id+"): {"];for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&!f.match(/^(\$|this)/)&&e.push(" "+f+": "+b.toJson(a[f]));for(var g=a.$$childHead;g;)e.push(d(g,c+" ")),g=g.$$nextSibling;return e.push("}"),e.join("\n"+c)}return c(a)},b.mock.$HttpBackendProvider=function(){this.$get=["$rootScope",g]},b.mock.$TimeoutDecorator=function(a,c){function d(a){var c=[];return b.forEach(a,function(a){c.push("{id: "+a.id+", time: "+a.time+"}")}),c.join(", ")}return a.flush=function(a){c.defer.flush(a)},a.verifyNoPendingTasks=function(){if(c.deferredFns.length)throw new Error("Deferred tasks to flush ("+c.deferredFns.length+"): "+d(c.deferredFns))},a},b.mock.$RAFDecorator=function(a){var b=[],c=function(a){var c=b.length;return b.push(a),function(){b.splice(c,1)}};return c.supported=a.supported,c.flush=function(){if(0===b.length)throw new Error("No rAF callbacks present");for(var a=b.length,c=0;a>c;c++)b[c]();b=[]},c},b.mock.$AsyncCallbackDecorator=function(a){var c=[],d=function(a){c.push(a)};return d.flush=function(){b.forEach(c,function(a){a()}),c=[]},d},b.mock.$RootElementProvider=function(){this.$get=function(){return b.element("
              ")}},b.module("ngMock",["ng"]).provider({$browser:b.mock.$BrowserProvider,$exceptionHandler:b.mock.$ExceptionHandlerProvider,$log:b.mock.$LogProvider,$interval:b.mock.$IntervalProvider,$httpBackend:b.mock.$HttpBackendProvider,$rootElement:b.mock.$RootElementProvider}).config(["$provide",function(a){a.decorator("$timeout",b.mock.$TimeoutDecorator),a.decorator("$$rAF",b.mock.$RAFDecorator),a.decorator("$$asyncCallback",b.mock.$AsyncCallbackDecorator)}]),b.module("ngMockE2E",["ng"]).config(["$provide",function(a){a.decorator("$httpBackend",b.mock.e2e.$httpBackendDecorator)}]),b.mock.e2e={},b.mock.e2e.$httpBackendDecorator=["$rootScope","$delegate","$browser",g],b.mock.clearDataCache=function(){var a,c=b.element.cache;for(a in c)if(Object.prototype.hasOwnProperty.call(c,a)){var d=c[a].handle;d&&b.element(d.elem).off(),delete c[a]}},a.jasmine||a.mocha){var k=null,l=function(){return!!k};(a.beforeEach||a.setup)(function(){k=this}),(a.afterEach||a.teardown)(function(){var a=k.$injector;k.$injector=null,k.$modules=null,k=null,a&&(a.get("$rootElement").off(),a.get("$browser").pollFns.length=0),b.mock.clearDataCache(),b.forEach(b.element.fragments,function(a,c){delete b.element.fragments[c]}),i.$$lastInstance=null,b.forEach(b.callbacks,function(a,c){delete b.callbacks[c]}),b.callbacks.counter=0}),a.module=b.mock.module=function(){function a(){if(k.$injector)throw new Error("Injector already created, can not register a module!");var a=k.$modules||(k.$modules=[]);b.forEach(c,function(c){b.isObject(c)&&!b.isArray(c)?a.push(function(a){b.forEach(c,function(b,c){a.value(c,b)})}):a.push(c)})}var c=Array.prototype.slice.call(arguments,0);return l()?a():a};var m=function(a,b){this.message=a.message,this.name=a.name,a.line&&(this.line=a.line),a.sourceId&&(this.sourceId=a.sourceId),a.stack&&b&&(this.stack=a.stack+"\n"+b.stack),a.stackArray&&(this.stackArray=a.stackArray)};m.prototype.toString=Error.prototype.toString,a.inject=b.mock.inject=function(){function a(){var a=k.$modules||[];a.unshift("ngMock"),a.unshift("ng");var e=k.$injector;e||(e=k.$injector=b.injector(a));for(var f=0,g=c.length;g>f;f++)try{e.invoke(c[f]||b.noop,this)}catch(h){if(h.stack&&d)throw new m(h,d);throw h}finally{d=null}}var c=Array.prototype.slice.call(arguments,0),d=new Error("Declaration Location");return l()?a.call(k):a}}}(window,window.angular),function(){var a;a=function(a,b){var c,d;for(c in a)d=a[c],"$$hashKey"!==c&&(b[c]=d)},angular.module("builder.controller",["builder.provider"]).controller("fbFormObjectEditableController",["$scope","$injector",function(b,c){var d;return d=c.get("$builder"),b.setupScope=function(c){var e;return a(c,b),b.optionsText=c.options.join("\n"),b.$watch("[label, description, placeholder, required, options, validation]",function(){return c.label=b.label,c.description=b.description,c.placeholder=b.placeholder,c.required=b.required,c.options=b.options,c.validation=b.validation},!0),b.$watch("optionsText",function(a){var c;return b.options=function(){var b,d,e,f;for(e=a.split("\n"),f=[],b=0,d=e.length;d>b;b++)c=e[b],c.length>0&&f.push(c);return f}(),b.inputText=b.options[0]}),e=d.components[c.component],b.validationOptions=e.validationOptions},b.data={model:null,backup:function(){return this.model={label:b.label,description:b.description,placeholder:b.placeholder,required:b.required,optionsText:b.optionsText,validation:b.validation}},rollback:function(){return this.model?(b.label=this.model.label,b.description=this.model.description,b.placeholder=this.model.placeholder,b.required=this.model.required,b.optionsText=this.model.optionsText,b.validation=this.model.validation):void 0}}}]).controller("fbComponentsController",["$scope","$injector",function(a,b){var c;return c=b.get("$builder"),a.selectGroup=function(b,d){var e,f,g,h;null!=b&&b.preventDefault(),a.activeGroup=d,a.components=[],g=c.components,h=[];for(f in g)e=g[f],e.group===d&&h.push(a.components.push(e));return h},a.groups=c.groups,a.activeGroup=a.groups[0],a.allComponents=c.components,a.$watch("allComponents",function(){return a.selectGroup(null,a.activeGroup)})}]).controller("fbComponentController",["$scope",function(b){return b.copyObjectToScope=function(c){return a(c,b)}}]).controller("fbFormController",["$scope","$injector",function(a,b){var c,d;return c=b.get("$builder"),d=b.get("$timeout"),null==a.input&&(a.input=[]),a.$watch("form",function(){return a.input.length>a.form.length&&a.input.splice(a.form.length),d(function(){return a.$broadcast(c.broadcastChannel.updateInput)})},!0)}]).controller("fbFormObjectController",["$scope","$injector",function(b,c){var d;return d=c.get("$builder"),b.copyObjectToScope=function(c){return a(c,b)},b.updateInput=function(a){var c;return c={id:b.formObject.id,label:b.formObject.label,value:null!=a?a:""},b.$parent.input.splice(b.$index,1,c)}}])}.call(this),function(){angular.module("builder.directive",["builder.provider","builder.controller","builder.drag","validator"]).directive("fbBuilder",["$injector",function(a){var b,c;return b=a.get("$builder"),c=a.get("$drag"),{restrict:"A",scope:{fbBuilder:"="},template:"
              \n
              \n
              ",link:function(a,d,e){var f,g,h;return a.formName=e.fbBuilder,null==(g=b.forms)[h=a.formName]&&(g[h]=[]),a.formObjects=b.forms[a.formName],f=!0,$(d).addClass("fb-builder"),c.droppable($(d),{move:function(a){var b,c,e,g,h,i,j,k,l,m,n;if(f&&($("div.fb-form-object-editable").popover("hide"),f=!1),e=$(d).find(".fb-form-object-editable:not(.empty,.dragging)"),0===e.length)return void(0===$(d).find(".fb-form-object-editable.empty").length&&$(d).find(">div:first").append($("
              ")));for(j=[],j.push(-1e3),h=k=0,m=e.length;m>k;h=k+=1)c=$(e[h]),i=c.offset(),g=c.height(),j.push(i.top+g/2);for(j.push(j[j.length-1]+1e3),h=l=1,n=j.length;n>l;h=l+=1)if(a.pageY>j[h-1]&&a.pageY<=j[h]){$(d).find(".empty").remove(),b=$("
              "),h-1l&&k--,b.updateFormObjectIndex(a.formName,l,k))):(j=i.object.formObject,j.editable&&b.removeFormObject(e.fbBuilder,j.index)),$(d).find(".empty").remove()):void $(d).find(".empty").remove()}})}}}]).directive("fbFormObjectEditable",["$injector",function(a){var b,c,d,e;return b=a.get("$builder"),d=a.get("$drag"),c=a.get("$compile"),e=a.get("$validator"),{restrict:"A",controller:"fbFormObjectEditableController",scope:{formObject:"=fbFormObjectEditable"},link:function(a,f){var g;return a.inputArray=[],a.$component=b.components[a.formObject.component],a.setupScope(a.formObject),a.$watch("$component.template",function(b){var d;if(b)return d=c(b)(a),$(f).html(d)}),$(f).on("click",function(){return!1}),d.draggable($(f),{object:{formObject:a.formObject}}),a.formObject.editable?(g={},a.$watch("$component.popoverTemplate",function(b){return b?($(f).removeClass(g.id),g={id:"fb-"+Math.random().toString().substr(2),isClickedSave:!1,view:null,html:b},g.html=$(g.html).addClass(g.id),g.view=c(g.html)(a),$(f).addClass(g.id),$(f).popover({html:!0,title:a.$component.label,content:g.view,container:"body"})):void 0}),a.popover={save:function(b){b.preventDefault(),e.validate(a).success(function(){return g.isClickedSave=!0,$(f).popover("hide")})},remove:function(c){c.preventDefault(),b.removeFormObject(a.$parent.formName,a.$parent.$index),$(f).popover("hide")},shown:function(){return a.data.backup(),g.isClickedSave=!1},cancel:function(b){a.data.rollback(),b&&(b.preventDefault(),$(f).popover("hide"))}},$(f).on("show.bs.popover",function(){var a,b,c;return d.isMouseMoved()?!1:($("div.fb-form-object-editable:not(."+g.id+")").popover("hide"),a=$("form."+g.id).closest(".popover"),a.length>0?(b=$(f).offset().top+$(f).height()/2,c=b-a.height()/2,a.css({position:"absolute",top:c}),a.show(),setTimeout(function(){return a.addClass("in"),$(f).triggerHandler("shown.bs.popover")},0),!1):void 0)}),$(f).on("shown.bs.popover",function(){$(".popover ."+g.id+" input:first").select(),a.$apply(function(){return a.popover.shown()})}),$(f).on("hide.bs.popover",function(){var b;return b=$("form."+g.id).closest(".popover"),g.isClickedSave||(a.$$phase||a.$root.$$phase?a.popover.cancel():a.$apply(function(){return a.popover.cancel()})),b.removeClass("in"),setTimeout(function(){return b.hide()},300),!1})):void 0}}}]).directive("fbComponents",function(){return{restrict:"A",template:'\n
              \n
              \n
              ',controller:"fbComponentsController"}}).directive("fbComponent",["$injector",function(a){var b,c,d;return b=a.get("$builder"),d=a.get("$drag"),c=a.get("$compile"),{restrict:"A",scope:{component:"=fbComponent"},controller:"fbComponentController",link:function(a,b){return a.copyObjectToScope(a.component),d.draggable($(b),{ mode:"mirror",defer:!1,object:{componentName:a.component.name}}),a.$watch("component.template",function(d){var e;if(d)return e=c(d)(a),$(b).html(e)})}}}]).directive("fbForm",["$injector",function(a){return{restrict:"A",require:"ngModel",scope:{formName:"@fbForm",input:"=ngModel","default":"=fbDefault"},template:'
              ',controller:"fbFormController",link:function(b,c,d){var e,f,g;return e=a.get("$builder"),null==(f=e.forms)[g=b.formName]&&(f[g]=[]),b.form=e.forms[b.formName]}}}]).directive("fbFormObject",["$injector",function(a){var b,c,d;return b=a.get("$builder"),c=a.get("$compile"),d=a.get("$parse"),{restrict:"A",controller:"fbFormObjectController",link:function(a,e,f){return a.formObject=d(f.fbFormObject)(a),a.$component=b.components[a.formObject.component],a.$on(b.broadcastChannel.updateInput,function(){return a.updateInput(a.inputText)}),a.$component.arrayToText&&(a.inputArray=[],a.$watch("inputArray",function(b,c){var d,e;if(b!==c){d=[];for(e in a.inputArray)a.inputArray[e]&&d.push(a.options[e]);return a.inputText=d.join(", ")}},!0)),a.$watch("inputText",function(){return a.updateInput(a.inputText)}),a.$watch(f.fbFormObject,function(){return a.copyObjectToScope(a.formObject)},!0),a.$watch("$component.template",function(b){var d,f,g;if(b)return f=$(b),d=f.find("[ng-model='inputText']"),d.attr({validator:"{{validation}}"}),g=c(f)(a),$(e).html(g)}),!a.$component.arrayToText&&a.formObject.options.length>0&&(a.inputText=a.formObject.options[0]),a.$watch("default["+a.formObject.id+"]",function(b){return b?a.$component.arrayToText?a.inputArray=b:a.inputText=b:void 0})}}}])}.call(this),function(){angular.module("builder.drag",[]).provider("$drag",function(){var a,b,c;a=null,b=null,this.data={draggables:{},droppables:{}},this.mouseMoved=!1,this.isMouseMoved=function(a){return function(){return a.mouseMoved}}(this),this.hooks={down:{},move:{},up:{}},this.eventMouseMove=function(){},this.eventMouseUp=function(){},$(function(a){return function(){return $(document).on("mousedown",function(b){var c,d,e;a.mouseMoved=!1,e=a.hooks.down;for(d in e)(c=e[d])(b)}),$(document).on("mousemove",function(b){var c,d,e;a.mouseMoved=!0,e=a.hooks.move;for(d in e)(c=e[d])(b)}),$(document).on("mouseup",function(b){var c,d,e;e=a.hooks.up;for(d in e)(c=e[d])(b)})}}(this)),this.currentId=0,this.getNewId=function(a){return function(){return""+a.currentId++}}(this),this.setupEasing=function(){return jQuery.extend(jQuery.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}})},this.setupProviders=function(c){return a=c,b=a.get("$rootScope")},this.isHover=function(a){return function(a,b){var c,d,e,f,g;return d=a.offset(),e=b.offset(),f={width:a.width(),height:a.height()},g={width:b.width(),height:b.height()},c={x:!1,y:!1},c.x=d.left>e.left&&d.lefte.left&&d.left+f.widthe.top&&d.tope.top&&d.top+f.height$(window).innerHeight()-50))return a.autoScroll.up=!1,a.autoScroll.down=!1;if(a.autoScroll.up=!1,a.autoScroll.down=!0,!a.autoScroll.scrolling)return a.autoScroll.scroll()}}}(this),stop:function(a){return function(){return a.autoScroll.up=!1,a.autoScroll.down=!1}}(this)},this.dragMirrorMode=function(a){return function(b,c,d){var e;return null==c&&(c=!0),e={id:a.getNewId(),mode:"mirror",maternal:b[0],element:null,object:d},b.on("mousedown",function(d){var f;return d.preventDefault(),f=b.clone(),e.element=f[0],f.addClass("fb-draggable form-horizontal prepare-dragging"),a.hooks.move.drag=function(c,d){var g,h,i,j;if(!f.hasClass("prepare-dragging")||(f.css({width:b.width(),height:b.height()}),f.removeClass("prepare-dragging"),f.addClass("dragging"),!d)){f.offset({left:c.pageX-f.width()/2,top:c.pageY-f.height()/2}),a.autoScroll.start(c),i=a.data.droppables,j=[];for(h in i)g=i[h],a.isHover(f,$(g.element))?j.push(g.move(c,e)):j.push(g.out(c,e));return j}},a.hooks.up.drag=function(b){var c,d,g,h;h=a.data.droppables;for(d in h)c=h[d],g=a.isHover(f,$(c.element)),c.up(b,g,e);return delete a.hooks.move.drag,delete a.hooks.up.drag,e.element=null,f.remove(),a.autoScroll.stop()},$("body").append(f),c?void 0:a.hooks.move.drag(d,c)}),e}}(this),this.dragDragMode=function(a){return function(b,c,d){var e;return null==c&&(c=!0),e={id:a.getNewId(),mode:"drag",maternal:null,element:b[0],object:d},b.addClass("fb-draggable"),b.on("mousedown",function(d){return d.preventDefault(),b.hasClass("dragging")?void 0:(b.addClass("prepare-dragging"),a.hooks.move.drag=function(c,d){var f,g,h;if(!b.hasClass("prepare-dragging")||(b.css({width:b.width(),height:b.height()}),b.removeClass("prepare-dragging"),b.addClass("dragging"),!d)){b.offset({left:c.pageX-b.width()/2,top:c.pageY-b.height()/2}),a.autoScroll.start(c),h=a.data.droppables;for(g in h)f=h[g],a.isHover(b,$(f.element))?f.move(c,e):f.out(c,e)}},a.hooks.up.drag=function(c){var d,f,g,h;h=a.data.droppables;for(f in h)d=h[f],g=a.isHover(b,$(d.element)),d.up(c,g,e);return delete a.hooks.move.drag,delete a.hooks.up.drag,b.css({width:"",height:"",left:"",top:""}),b.removeClass("dragging defer-dragging"),a.autoScroll.stop()},c?void 0:a.hooks.move.drag(d,c))}),e}}(this),this.dropMode=function(a){return function(c,d){var e;return e={id:a.getNewId(),element:c[0],move:function(a,c){return b.$apply(function(){return"function"==typeof d.move?d.move(a,c):void 0})},up:function(a,c,e){return b.$apply(function(){return"function"==typeof d.up?d.up(a,c,e):void 0})},out:function(a,c){return b.$apply(function(){return"function"==typeof d.out?d.out(a,c):void 0})}}}}(this),this.draggable=function(a){return function(b,c){var d,e,f,g,h,i,j;if(null==c&&(c={}),f=[],"mirror"===c.mode)for(g=0,i=b.length;i>g;g++)e=b[g],d=a.dragMirrorMode($(e),c.defer,c.object),f.push(d.id),a.data.draggables[d.id]=d;else for(h=0,j=b.length;j>h;h++)e=b[h],d=a.dragDragMode($(e),c.defer,c.object),f.push(d.id),a.data.draggables[d.id]=d;return f}}(this),this.droppable=function(a){return function(b,c){var d,e,f,g,h;for(null==c&&(c={}),f=[],g=0,h=b.length;h>g;g++)e=b[g],d=a.dropMode($(e),c),f.push(d),a.data.droppables[d.id]=d;return f}}(this),this.get=function(a){return this.setupEasing(),this.setupProviders(a),{isMouseMoved:this.isMouseMoved,data:this.data,draggable:this.draggable,droppable:this.droppable}},this.get.$inject=["$injector"],this.$get=this.get})}.call(this),function(){angular.module("builder",["builder.directive"])}.call(this),function(){var a=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};angular.module("builder.provider",[]).provider("$builder",function(){var b,c,d;c=null,b=null,d=null,this.version="0.0.2",this.components={},this.groups=[],this.broadcastChannel={updateInput:"$updateInput"},this.forms={"default":[]},this.formsId={"default":0},this.convertComponent=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;return c={name:a,group:null!=(d=b.group)?d:"Default",label:null!=(e=b.label)?e:"",description:null!=(f=b.description)?f:"",placeholder:null!=(g=b.placeholder)?g:"",editable:null!=(h=b.editable)?h:!0,required:null!=(i=b.required)?i:!1,validation:null!=(j=b.validation)?j:"/.*/",validationOptions:null!=(k=b.validationOptions)?k:[],options:null!=(l=b.options)?l:[],arrayToText:null!=(m=b.arrayToText)?m:!1,template:b.template,templateUrl:b.templateUrl,popoverTemplate:b.popoverTemplate,popoverTemplateUrl:b.popoverTemplateUrl},c.template||c.templateUrl||console.error("The template is empty."),c.popoverTemplate||c.popoverTemplateUrl||console.error("The popoverTemplate is empty."),c},this.convertFormObject=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;if(null==b&&(b={}),c=this.components[b.component],null==c)throw"The component "+b.component+" was not registered.";if(b.id){for(d=!1,i=this.forms[a],g=0,h=i.length;h>g;g++)if(e=i[g],b.id<=e.id){b.id=this.formsId[a]++,d=!0;break}d||(this.formsId[a]=b.id+1)}return f={id:null!=(j=b.id)?j:this.formsId[a]++,component:b.component,editable:null!=(k=b.editable)?k:c.editable,index:null!=(l=b.index)?l:0,label:null!=(m=b.label)?m:c.label,description:null!=(n=b.description)?n:c.description,placeholder:null!=(o=b.placeholder)?o:c.placeholder,options:null!=(p=b.options)?p:c.options,required:null!=(q=b.required)?q:c.required,validation:null!=(r=b.validation)?r:c.validation}},this.reindexFormObject=function(a){return function(b){var c,d,e,f;for(c=a.forms[b],d=e=0,f=c.length;f>e;d=e+=1)c[d].index=d}}(this),this.setupProviders=function(a){return function(a){return c=a,b=c.get("$http"),d=c.get("$templateCache")}}(this),this.loadTemplate=function(a){return null==a.template&&b.get(a.templateUrl,{cache:d}).success(function(b){return a.template=b}),null==a.popoverTemplate?b.get(a.popoverTemplateUrl,{cache:d}).success(function(b){return a.popoverTemplate=b}):void 0},this.registerComponent=function(b){return function(d,e){var f,g;null==e&&(e={}),null==b.components[d]?(f=b.convertComponent(d,e),b.components[d]=f,null!=c&&b.loadTemplate(f),g=f.group,a.call(b.groups,g)<0&&b.groups.push(f.group)):console.error("The component "+d+" was registered.")}}(this),this.addFormObject=function(a){return function(b,c){var d;return null==c&&(c={}),null==(d=a.forms)[b]&&(d[b]=[]),a.insertFormObject(b,a.forms[b].length,c)}}(this),this.insertFormObject=function(a){return function(b,c,d){var e,f;return null==d&&(d={}),null==(e=a.forms)[b]&&(e[b]=[]),null==(f=a.formsId)[b]&&(f[b]=0),c>a.forms[b].length?c=a.forms[b].length:0>c&&(c=0),a.forms[b].splice(c,0,a.convertFormObject(b,d)),a.reindexFormObject(b),a.forms[b][c]}}(this),this.removeFormObject=function(a){return function(b,c){var d;return d=a.forms[b],d.splice(c,1),a.reindexFormObject(b)}}(this),this.updateFormObjectIndex=function(a){return function(b,c,d){var e,f;if(c!==d)return f=a.forms[b],e=f.splice(c,1)[0],f.splice(d,0,e),a.reindexFormObject(b)}}(this),this.$get=["$injector",function(a){return function(b){var c,d,e;a.setupProviders(b),e=a.components;for(d in e)c=e[d],a.loadTemplate(c);return{version:a.version,components:a.components,groups:a.groups,forms:a.forms,broadcastChannel:a.broadcastChannel,registerComponent:a.registerComponent,addFormObject:a.addFormObject,insertFormObject:a.insertFormObject,removeFormObject:a.removeFormObject,updateFormObjectIndex:a.updateFormObjectIndex}}}(this)]})}.call(this),function(){angular.module("builder.components",["builder","validator.rules"]).config(["$builderProvider",function(a){return a.registerComponent("textInput",{group:"Default",label:"Text Input",description:"description",placeholder:"placeholder",required:!1,validationOptions:[{label:"none",rule:"/.*/"},{label:"number",rule:"[number]"},{label:"email",rule:"[email]"},{label:"url",rule:"[url]"}],template:'
              \n \n
              \n \n

              {{description}}

              \n
              \n
              ',popoverTemplate:"
              \n
              \n \n \n
              \n
              \n \n \n
              \n
              \n \n \n
              \n
              \n \n
              \n
              0\">\n \n \n
              \n\n
              \n
              \n \n \n \n
              \n
              "}),a.registerComponent("textArea",{group:"Default",label:"Text Area",description:"description",placeholder:"placeholder",required:!1,template:'
              \n \n
              \n
              - {{text}} -
              - - - it('should have transcluded', function() { - var titleElement = element(by.model('title')); - titleElement.clear(); - titleElement.sendKeys('TITLE'); - var textElement = element(by.model('text')); - textElement.clear(); - textElement.sendKeys('TEXT'); - expect(element(by.binding('title')).getText()).toEqual('TITLE'); - expect(element(by.binding('text')).getText()).toEqual('TEXT'); - }); - - + * ### Basic transclusion + * This example demonstrates basic transclusion of content into a component directive. + * + * + * + *
              + *
              + *
              + * {{text}} + *
              + *
              + * + * it('should have transcluded', function() { + * var titleElement = element(by.model('title')); + * titleElement.clear(); + * titleElement.sendKeys('TITLE'); + * var textElement = element(by.model('text')); + * textElement.clear(); + * textElement.sendKeys('TEXT'); + * expect(element(by.binding('title')).getText()).toEqual('TITLE'); + * expect(element(by.binding('text')).getText()).toEqual('TEXT'); + * }); + * + *
              + * + * @example + * ### Transclude fallback content + * This example shows how to use `NgTransclude` with fallback content, that + * is displayed if no transcluded content is provided. + * + * + * + * + * + * + * + * + * Button2 + * + * + * + * it('should have different transclude element content', function() { + * expect(element(by.id('fallback')).getText()).toBe('Button1'); + * expect(element(by.id('modified')).getText()).toBe('Button2'); + * }); + * + * * + * @example + * ### Multi-slot transclusion + * This example demonstrates using multi-slot transclusion in a component directive. + * + * + * + *
              + *
              + *
              + * + * {{title}} + *

              {{text}}

              + *
              + *
              + *
              + * + * angular.module('multiSlotTranscludeExample', []) + * .directive('pane', function(){ + * return { + * restrict: 'E', + * transclude: { + * 'title': '?paneTitle', + * 'body': 'paneBody', + * 'footer': '?paneFooter' + * }, + * template: '
              ' + + * '
              Fallback Title
              ' + + * '
              ' + + * '' + + * '
              ' + * }; + * }) + * .controller('ExampleController', ['$scope', function($scope) { + * $scope.title = 'Lorem Ipsum'; + * $scope.link = "https://google.com"; + * $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...'; + * }]); + *
              + * + * it('should have transcluded the title and the body', function() { + * var titleElement = element(by.model('title')); + * titleElement.clear(); + * titleElement.sendKeys('TITLE'); + * var textElement = element(by.model('text')); + * textElement.clear(); + * textElement.sendKeys('TEXT'); + * expect(element(by.css('.title')).getText()).toEqual('TITLE'); + * expect(element(by.binding('text')).getText()).toEqual('TEXT'); + * expect(element(by.css('.footer')).getText()).toEqual('Fallback Footer'); + * }); + * + *
              */ +var ngTranscludeMinErr = minErr('ngTransclude'); var ngTranscludeDirective = ngDirective({ restrict: 'EAC', link: function($scope, $element, $attrs, controller, $transclude) { + + if ($attrs.ngTransclude === $attrs.$attr.ngTransclude) { + // If the attribute is of the form: `ng-transclude="ng-transclude"` + // then treat it like the default + $attrs.ngTransclude = ''; + } + + function ngTranscludeCloneAttachFn(clone) { + if (clone.length) { + $element.empty(); + $element.append(clone); + } + } + if (!$transclude) { - throw minErr('ngTransclude')('orphan', + throw ngTranscludeMinErr('orphan', 'Illegal use of ngTransclude directive in the template! ' + 'No parent directive that requires a transclusion found. ' + 'Element: {0}', startingTag($element)); } - $transclude(function(clone) { - $element.empty(); - $element.append(clone); - }); + // If there is no slot name defined or the slot name is not optional + // then transclude the slot + var slotName = $attrs.ngTransclude || $attrs.ngTranscludeSlot; + $transclude(ngTranscludeCloneAttachFn, null, slotName); } }); @@ -37574,6 +38696,9 @@ var SelectController = // Tell the select control that an option, with the given value, has been added self.addOption = function(value, element) { + // Skip comment nodes, as they only pollute the `optionsMap` + if (element[0].nodeType === NODE_TYPE_COMMENT) return; + assertNotHasOwnProperty(value, '"option value"'); if (value === '') { self.emptyOption = element; @@ -37648,7 +38773,7 @@ var SelectController = * * The `select` directive is used together with {@link ngModel `ngModel`} to provide data-binding * between the scope and the `` menu is selected, the value of the selected option will be bound @@ -37658,7 +38783,7 @@ var SelectController = * *
              * Note that the value of a `select` directive used without `ngOptions` is always a string. - * When the model needs to be bound to a non-string value, you must either explictly convert it + * When the model needs to be bound to a non-string value, you must either explicitly convert it * using a directive (see example below) or use `ngOptions` to specify the set of options. * This is because an option element can only be bound to string values at present. *
              @@ -37850,7 +38975,8 @@ var selectDirective = function() { controller: SelectController, priority: 1, link: { - pre: selectPreLink + pre: selectPreLink, + post: selectPostLink } }; @@ -37864,13 +38990,6 @@ var selectDirective = function() { selectCtrl.ngModelCtrl = ngModelCtrl; - // We delegate rendering to the `writeValue` method, which can be changed - // if the select can have multiple selected values or if the options are being - // generated by `ngOptions` - ngModelCtrl.$render = function() { - selectCtrl.writeValue(ngModelCtrl.$viewValue); - }; - // When the selected item(s) changes we delegate getting the value of the select control // to the `readValue` method, which can be changed if the select can have multiple // selected values or if the options are being generated by `ngOptions` @@ -37924,6 +39043,23 @@ var selectDirective = function() { } } + + function selectPostLink(scope, element, attrs, ctrls) { + // if ngModel is not defined, we don't need to do anything + var ngModelCtrl = ctrls[1]; + if (!ngModelCtrl) return; + + var selectCtrl = ctrls[0]; + + // We delegate rendering to the `writeValue` method, which can be changed + // if the select can have multiple selected values or if the options are being + // generated by `ngOptions`. + // This must be done in the postLink fn to prevent $render to be called before + // all nodes have been linked correctly. + ngModelCtrl.$render = function() { + selectCtrl.writeValue(ngModelCtrl.$viewValue); + }; + } }; @@ -37935,7 +39071,6 @@ var optionDirective = ['$interpolate', function($interpolate) { restrict: 'E', priority: 100, compile: function(element, attr) { - if (isDefined(attr.value)) { // If the value attribute is defined, check if it contains an interpolation var interpolateValueFn = $interpolate(attr.value, true); @@ -37949,7 +39084,6 @@ var optionDirective = ['$interpolate', function($interpolate) { } return function(scope, element, attr) { - // This is an optimization over using ^^ since we don't want to have to search // all the way to the root of the DOM for every single option element var selectCtrlName = '$selectController', @@ -37970,6 +39104,64 @@ var styleDirective = valueFn({ terminal: false }); +/** + * @ngdoc directive + * @name ngRequired + * + * @description + * + * ngRequired adds the required {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. + * It is most often used for {@link input `input`} and {@link select `select`} controls, but can also be + * applied to custom controls. + * + * The directive sets the `required` attribute on the element if the Angular expression inside + * `ngRequired` evaluates to true. A special directive for setting `required` is necessary because we + * cannot use interpolation inside `required`. See the {@link guide/interpolation interpolation guide} + * for more info. + * + * The validator will set the `required` error key to true if the `required` attribute is set and + * calling {@link ngModel.NgModelController#$isEmpty `NgModelController.$isEmpty`} with the + * {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} returns `true`. For example, the + * `$isEmpty()` implementation for `input[text]` checks the length of the `$viewValue`. When developing + * custom controls, `$isEmpty()` can be overwritten to account for a $viewValue that is not string-based. + * + * @example + * + * + * + *
              + *
              + * + * + *
              + * + *
              + *
              + * required error set? = {{form.input.$error.required}}
              + * model = {{model}} + *
              + *
              + *
              + * + var required = element(by.binding('form.input.$error.required')); + var model = element(by.binding('model')); + var input = element(by.id('input')); + + it('should set the required error', function() { + expect(required.getText()).toContain('true'); + + input.sendKeys('123'); + expect(required.getText()).not.toContain('true'); + expect(model.getText()).toContain('123'); + }); + * + *
              + */ var requiredDirective = function() { return { restrict: 'A', @@ -37989,7 +39181,81 @@ var requiredDirective = function() { }; }; +/** + * @ngdoc directive + * @name ngPattern + * + * @description + * + * ngPattern adds the pattern {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. + * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls. + * + * The validator sets the `pattern` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} + * does not match a RegExp which is obtained by evaluating the Angular expression given in the + * `ngPattern` attribute value: + * * If the expression evaluates to a RegExp object, then this is used directly. + * * If the expression evaluates to a string, then it will be converted to a RegExp after wrapping it + * in `^` and `$` characters. For instance, `"abc"` will be converted to `new RegExp('^abc$')`. + * + *
              + * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to + * start at the index of the last search's match, thus not taking the whole input value into + * account. + *
              + * + *
              + * **Note:** This directive is also added when the plain `pattern` attribute is used, with two + * differences: + *
                + *
              1. + * `ngPattern` does not set the `pattern` attribute and therefore HTML5 constraint validation is + * not available. + *
              2. + *
              3. + * The `ngPattern` attribute must be an expression, while the `pattern` value must be + * interpolated. + *
              4. + *
              + *
              + * + * @example + * + * + * + *
              + *
              + * + * + *
              + * + *
              + *
              + * input valid? = {{form.input.$valid}}
              + * model = {{model}} + *
              + *
              + *
              + * + var model = element(by.binding('model')); + var input = element(by.id('input')); + + it('should validate the input with the default pattern', function() { + input.sendKeys('aaa'); + expect(model.getText()).not.toContain('aaa'); + input.clear().then(function() { + input.sendKeys('123'); + expect(model.getText()).toContain('123'); + }); + }); + * + *
              + */ var patternDirective = function() { return { restrict: 'A', @@ -38021,7 +39287,72 @@ var patternDirective = function() { }; }; +/** + * @ngdoc directive + * @name ngMaxlength + * + * @description + * + * ngMaxlength adds the maxlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. + * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls. + * + * The validator sets the `maxlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} + * is longer than the integer obtained by evaluating the Angular expression given in the + * `ngMaxlength` attribute value. + * + *
              + * **Note:** This directive is also added when the plain `maxlength` attribute is used, with two + * differences: + *
                + *
              1. + * `ngMaxlength` does not set the `maxlength` attribute and therefore HTML5 constraint + * validation is not available. + *
              2. + *
              3. + * The `ngMaxlength` attribute must be an expression, while the `maxlength` value must be + * interpolated. + *
              4. + *
              + *
              + * + * @example + * + * + * + *
              + *
              + * + * + *
              + * + *
              + *
              + * input valid? = {{form.input.$valid}}
              + * model = {{model}} + *
              + *
              + *
              + * + var model = element(by.binding('model')); + var input = element(by.id('input')); + + it('should validate the input with the default maxlength', function() { + input.sendKeys('abcdef'); + expect(model.getText()).not.toContain('abcdef'); + input.clear().then(function() { + input.sendKeys('abcde'); + expect(model.getText()).toContain('abcde'); + }); + }); + * + *
              + */ var maxlengthDirective = function() { return { restrict: 'A', @@ -38042,6 +39373,70 @@ var maxlengthDirective = function() { }; }; +/** + * @ngdoc directive + * @name ngMinlength + * + * @description + * + * ngMinlength adds the minlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. + * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls. + * + * The validator sets the `minlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} + * is shorter than the integer obtained by evaluating the Angular expression given in the + * `ngMinlength` attribute value. + * + *
              + * **Note:** This directive is also added when the plain `minlength` attribute is used, with two + * differences: + *
                + *
              1. + * `ngMinlength` does not set the `minlength` attribute and therefore HTML5 constraint + * validation is not available. + *
              2. + *
              3. + * The `ngMinlength` value must be an expression, while the `minlength` value must be + * interpolated. + *
              4. + *
              + *
              + * + * @example + * + * + * + *
              + *
              + * + * + *
              + * + *
              + *
              + * input valid? = {{form.input.$valid}}
              + * model = {{model}} + *
              + *
              + *
              + * + var model = element(by.binding('model')); + var input = element(by.id('input')); + + it('should validate the input with the default minlength', function() { + input.sendKeys('ab'); + expect(model.getText()).not.toContain('ab'); + + input.sendKeys('abc'); + expect(model.getText()).toContain('abc'); + }); + * + *
              + */ var minlengthDirective = function() { return { restrict: 'A', @@ -38154,6 +39549,20 @@ $provide.value("$locale", { "Nov", "Dec" ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], "WEEKENDRANGE": [ 5, 6 @@ -38197,6 +39606,7 @@ $provide.value("$locale", { ] }, "id": "en-us", + "localeID": "en_US", "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} }); }]); diff --git a/public/bower_components/angular-smart-table/smart-table.js b/public/bower_components/angular-smart-table/smart-table.js index 871bb9c..d8acea2 100644 --- a/public/bower_components/angular-smart-table/smart-table.js +++ b/public/bower_components/angular-smart-table/smart-table.js @@ -1,5 +1,5 @@ /** -* @version 2.1.5 +* @version 2.1.6 * @license MIT */ (function (ng, undefined){ @@ -330,81 +330,93 @@ ng.module('smart-table') }]); ng.module('smart-table') - .directive('stSort', ['stConfig', '$parse', '$timeout', function (stConfig, $parse, $timeout) { - return { - restrict: 'A', - require: '^stTable', - link: function (scope, element, attr, ctrl) { - - var predicate = attr.stSort; - var getter = $parse(predicate); - var index = 0; - var classAscent = attr.stClassAscent || stConfig.sort.ascentClass; - var classDescent = attr.stClassDescent || stConfig.sort.descentClass; - var stateClasses = [classAscent, classDescent]; - var sortDefault; - var skipNatural = attr.stSkipNatural !== undefined ? attr.stSkipNatural : stConfig.sort.skipNatural; - var promise = null; - var throttle = attr.stDelay || stConfig.sort.delay; - - if (attr.stSortDefault) { - sortDefault = scope.$eval(attr.stSortDefault) !== undefined ? scope.$eval(attr.stSortDefault) : attr.stSortDefault; - } - - //view --> table state - function sort () { - index++; - var func; - predicate = ng.isFunction(getter(scope)) || ng.isArray(getter(scope)) ? getter(scope) : attr.stSort; - if (index % 3 === 0 && !!skipNatural !== true) { - //manual reset - index = 0; - ctrl.tableState().sort = {}; - ctrl.tableState().pagination.start = 0; - func = ctrl.pipe.bind(ctrl); - } else { - func = ctrl.sortBy.bind(ctrl, predicate, index % 2 === 0); - } - if (promise !== null) { - $timeout.cancel(promise); - } - if (throttle < 0) { - scope.$apply(func); - } else { - promise = $timeout(func, throttle); - } - } - - element.bind('click', function sortClick () { - if (predicate) { - sort(); - } - }); - - if (sortDefault) { - index = sortDefault === 'reverse' ? 1 : 0; - sort(); - } - - //table state --> view - scope.$watch(function () { - return ctrl.tableState().sort; - }, function (newValue) { - if (newValue.predicate !== predicate) { - index = 0; - element - .removeClass(classAscent) - .removeClass(classDescent); - } else { - index = newValue.reverse === true ? 2 : 1; - element - .removeClass(stateClasses[index % 2]) - .addClass(stateClasses[index - 1]); - } - }, true); - } - }; - }]); + .directive('stSort', ['stConfig', '$parse', '$timeout', function (stConfig, $parse, $timeout) { + return { + restrict: 'A', + require: '^stTable', + link: function (scope, element, attr, ctrl) { + + var predicate = attr.stSort; + var getter = $parse(predicate); + var index = 0; + var classAscent = attr.stClassAscent || stConfig.sort.ascentClass; + var classDescent = attr.stClassDescent || stConfig.sort.descentClass; + var stateClasses = [classAscent, classDescent]; + var sortDefault; + var skipNatural = attr.stSkipNatural !== undefined ? attr.stSkipNatural : stConfig.sort.skipNatural; + var descendingFirst = attr.stDescendingFirst === 'true'; + var promise = null; + var throttle = attr.stDelay || stConfig.sort.delay; + + if (attr.stSortDefault) { + sortDefault = scope.$eval(attr.stSortDefault) !== undefined ? scope.$eval(attr.stSortDefault) : attr.stSortDefault; + } + + //view --> table state + function sort () { + if ( descendingFirst ) { + if ( index === 0 ) { + index = 2; + } else if ( index === 2 ) { + index = 1; + } else { + index = 0; + } + } else { + index++; + } + + var func; + predicate = ng.isFunction(getter(scope)) || ng.isArray(getter(scope)) ? getter(scope) : attr.stSort; + if (index % 3 === 0 && !!skipNatural !== true) { + //manual reset + index = 0; + ctrl.tableState().sort = {}; + ctrl.tableState().pagination.start = 0; + func = ctrl.pipe.bind(ctrl); + } else { + func = ctrl.sortBy.bind(ctrl, predicate, index % 2 === 0); + } + if (promise !== null) { + $timeout.cancel(promise); + } + if (throttle < 0) { + func(); + } else { + promise = $timeout(func, throttle); + } + } + + element.bind('click', function sortClick () { + if (predicate) { + scope.$apply(sort); + } + }); + + if (sortDefault) { + index = sortDefault === 'reverse' ? 1 : 0; + sort(); + } + + //table state --> view + scope.$watch(function () { + return ctrl.tableState().sort; + }, function (newValue) { + if (newValue.predicate !== predicate) { + index = 0; + element + .removeClass(classAscent) + .removeClass(classDescent); + } else { + index = newValue.reverse === true ? 2 : 1; + element + .removeClass(stateClasses[index % 2]) + .addClass(stateClasses[index - 1]); + } + }, true); + } + }; + }]); ng.module('smart-table') .directive('stPagination', ['stConfig', function (stConfig) { diff --git a/public/bower_components/angular-spinner/angular-spinner.js b/public/bower_components/angular-spinner/angular-spinner.js index 6417909..c365930 100644 --- a/public/bower_components/angular-spinner/angular-spinner.js +++ b/public/bower_components/angular-spinner/angular-spinner.js @@ -1,7 +1,7 @@ /** - * angular-spinner version 0.8.0 + * angular-spinner version 0.8.1 * License: MIT. - * Copyright (C) 2013, 2014, 2015, Uri Shaked and contributors. + * Copyright (C) 2013, 2014, 2015, 2016, Uri Shaked and contributors. */ 'format amd'; @@ -83,6 +83,7 @@ // order of precedence: element options, theme, defaults. options = angular.extend( + {}, usSpinnerConfig.config, usSpinnerConfig.themes[attr.spinnerTheme], options); diff --git a/public/bower_components/angular-touch/angular-touch.js b/public/bower_components/angular-touch/angular-touch.js index f622e94..332be04 100644 --- a/public/bower_components/angular-touch/angular-touch.js +++ b/public/bower_components/angular-touch/angular-touch.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.4.8 + * @license AngularJS v1.4.9 * (c) 2010-2015 Google, Inc. http://angularjs.org * License: MIT */ @@ -43,8 +43,7 @@ function nodeName_(element) { * * Requires the {@link ngTouch `ngTouch`} module to be installed. * - * `$swipe` is used by the `ngSwipeLeft` and `ngSwipeRight` directives in `ngTouch`, and by - * `ngCarousel` in a separate component. + * `$swipe` is used by the `ngSwipeLeft` and `ngSwipeRight` directives in `ngTouch`. * * # Usage * The `$swipe` service is an object with a single method: `bind`. `bind` takes an element diff --git a/public/bower_components/angular-ui-grid/pagination/less/pagination.less b/public/bower_components/angular-ui-grid/pagination/less/pagination.less index 8104847..0b0acc2 100644 --- a/public/bower_components/angular-ui-grid/pagination/less/pagination.less +++ b/public/bower_components/angular-ui-grid/pagination/less/pagination.less @@ -3,13 +3,13 @@ @import (reference) "../../../less/bootstrap/bootstrap"; .ui-grid-pager-panel { - position: absolute; - left: 0; - bottom: 0; - width: 100%; - padding-top: 3px; - padding-bottom: 3px; - box-sizing: content-box; + position: absolute; + left: 0; + bottom: 0; + width: 100%; + padding-top: 3px; + padding-bottom: 3px; + box-sizing: content-box; } .ui-grid-pager-container { @@ -53,6 +53,14 @@ margin-left: -3px; } + .first-bar-rtl { + width: 10px; + border-left: 2px solid #4d4d4d; + margin-top: -6px; + height: 12px; + margin-right: -7px; + } + .first-triangle { width: 0; height: 0; @@ -86,6 +94,16 @@ height: 12px; margin-left: 1px; } + + .last-bar-rtl { + width: 10px; + border-left: 2px solid #4d4d4d; + margin-top: -6px; + height: 12px; + margin-right: -11px; + } + + } .ui-grid-pager-row-count-picker { diff --git a/public/bower_components/angular-ui-grid/ui-grid.css b/public/bower_components/angular-ui-grid/ui-grid.css index 6901e72..e0b9a27 100644 --- a/public/bower_components/angular-ui-grid/ui-grid.css +++ b/public/bower_components/angular-ui-grid/ui-grid.css @@ -1,5 +1,5 @@ /*! - * ui-grid - v3.1.0 - 2016-01-19 + * ui-grid - v3.1.1 - 2016-02-09 * Copyright (c) 2016 ; License: MIT */ #ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:before, @@ -680,9 +680,6 @@ fieldset[disabled] a.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 { background-image: none; } -.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, .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]:hover, fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover, @@ -691,13 +688,7 @@ fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button: fieldset[disabled] .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.disabled.focus, .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled].focus, -fieldset[disabled] .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.disabled:active, -.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled]:active, -fieldset[disabled] .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.disabled.active, -.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled].active, -fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active { +fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus { background-color: transparent; border-color: transparent; } @@ -1378,9 +1369,6 @@ fieldset[disabled] a.ui-grid-pager-control button { .open > .dropdown-toggle.ui-grid-pager-control button { background-image: none; } -.ui-grid-pager-control button.disabled, -.ui-grid-pager-control button[disabled], -fieldset[disabled] .ui-grid-pager-control button, .ui-grid-pager-control button.disabled:hover, .ui-grid-pager-control button[disabled]:hover, fieldset[disabled] .ui-grid-pager-control button:hover, @@ -1389,13 +1377,7 @@ fieldset[disabled] .ui-grid-pager-control button:hover, fieldset[disabled] .ui-grid-pager-control button:focus, .ui-grid-pager-control button.disabled.focus, .ui-grid-pager-control button[disabled].focus, -fieldset[disabled] .ui-grid-pager-control button.focus, -.ui-grid-pager-control button.disabled:active, -.ui-grid-pager-control button[disabled]:active, -fieldset[disabled] .ui-grid-pager-control button:active, -.ui-grid-pager-control button.disabled.active, -.ui-grid-pager-control button[disabled].active, -fieldset[disabled] .ui-grid-pager-control button.active { +fieldset[disabled] .ui-grid-pager-control button.focus { background-color: #f3f3f3; border-color: #cccccc; } @@ -1446,6 +1428,10 @@ fieldset[disabled] .ui-grid-pager-control button.active { .ui-grid-pager-control input::-webkit-input-placeholder { color: #999999; } +.ui-grid-pager-control input::-ms-expand { + border: 0; + background-color: transparent; +} .ui-grid-pager-control input[disabled], .ui-grid-pager-control input[readonly], fieldset[disabled] .ui-grid-pager-control input { @@ -1480,6 +1466,13 @@ select[multiple].ui-grid-pager-control input { height: 12px; margin-left: -3px; } +.ui-grid-pager-control .first-bar-rtl { + width: 10px; + border-left: 2px solid #4d4d4d; + margin-top: -6px; + height: 12px; + margin-right: -7px; +} .ui-grid-pager-control .first-triangle { width: 0; height: 0; @@ -1509,6 +1502,13 @@ select[multiple].ui-grid-pager-control input { height: 12px; margin-left: 1px; } +.ui-grid-pager-control .last-bar-rtl { + width: 10px; + border-left: 2px solid #4d4d4d; + margin-top: -6px; + height: 12px; + margin-right: -11px; +} .ui-grid-pager-row-count-picker { float: left; } @@ -1554,6 +1554,10 @@ select[multiple].ui-grid-pager-control input { .ui-grid-pager-row-count-picker select::-webkit-input-placeholder { color: #999999; } +.ui-grid-pager-row-count-picker select::-ms-expand { + border: 0; + background-color: transparent; +} .ui-grid-pager-row-count-picker select[disabled], .ui-grid-pager-row-count-picker select[readonly], fieldset[disabled] .ui-grid-pager-row-count-picker select { diff --git a/public/bower_components/angular-ui-grid/ui-grid.eot b/public/bower_components/angular-ui-grid/ui-grid.eot index 94a994e..7c3e956 100644 Binary files a/public/bower_components/angular-ui-grid/ui-grid.eot and b/public/bower_components/angular-ui-grid/ui-grid.eot differ diff --git a/public/bower_components/angular-ui-grid/ui-grid.js b/public/bower_components/angular-ui-grid/ui-grid.js index 7900f31..88bed45 100644 --- a/public/bower_components/angular-ui-grid/ui-grid.js +++ b/public/bower_components/angular-ui-grid/ui-grid.js @@ -1,5 +1,5 @@ /*! - * ui-grid - v3.1.0 - 2016-01-19 + * ui-grid - v3.1.1 - 2016-02-09 * Copyright (c) 2016 ; License: MIT */ @@ -285,7 +285,7 @@ function ( i18nService, uiGridConstants, gridUtil ) { * */ setColMenuItemWatch: function ( $scope ){ - var deregFunction = $scope.$watch('col.menuItems', function (n, o) { + var deregFunction = $scope.$watch('col.menuItems', function (n) { if (typeof(n) !== 'undefined' && n && angular.isArray(n)) { n.forEach(function (item) { if (typeof(item.context) === 'undefined' || !item.context) { @@ -450,16 +450,6 @@ function ( i18nService, uiGridConstants, gridUtil ) { $event.stopPropagation(); $scope.hideColumn(); } - }, - { - title: i18nService.getSafeText('columnMenu.close'), - screenReaderOnly: true, - shown: function(){ - return true; - }, - action: function($event){ - $event.stopPropagation(); - } } ]; }, @@ -512,8 +502,6 @@ function ( i18nService, uiGridConstants, gridUtil ) { */ repositionMenu: function( $scope, column, positionData, $elm, $columnElement ) { var menu = $elm[0].querySelectorAll('.ui-grid-menu'); - var containerId = column.renderContainer ? column.renderContainer : 'body'; - var renderContainer = column.grid.renderContainers[containerId]; // It's possible that the render container of the column we're attaching to is // offset from the grid (i.e. pinned containers), we need to get the difference in the offsetLeft @@ -616,6 +604,7 @@ function ($timeout, gridUtil, uiGridConstants, uiGridColumnMenuService, $documen $scope.colElement = $columnElement; $scope.colElementPosition = colElementPosition; $scope.$broadcast('show-menu', { originalEvent: event }); + } }; @@ -658,6 +647,8 @@ function ($timeout, gridUtil, uiGridConstants, uiGridColumnMenuService, $documen $scope.$on('menu-shown', function() { $timeout( function() { uiGridColumnMenuService.repositionMenu( $scope, $scope.col, $scope.colElementPosition, $elm, $scope.colElement ); + //Focus on the first item + gridUtil.focus.bySelector($document, '.ui-grid-menu-items .ui-grid-menu-item', true); delete $scope.colElementPosition; delete $scope.columnElement; }, 200); @@ -753,7 +744,7 @@ function ($timeout, gridUtil, uiGridConstants, uiGridColumnMenuService, $documen controller: ['$scope', function ($scope) { var self = this; - $scope.$watch('menuItems', function (n, o) { + $scope.$watch('menuItems', function (n) { self.menuItems = n; }); }] @@ -1058,8 +1049,8 @@ function ($timeout, gridUtil, uiGridConstants, uiGridColumnMenuService, $documen }; $scope.isSortPriorityVisible = function() { //show sort priority if column is sorted and there is at least one other sorted column - return $scope.col.sort.priority && $scope.grid.columns.some(function(element, index){ - return element.sort.priority && element !== $scope.col; + return angular.isNumber($scope.col.sort.priority) && $scope.grid.columns.some(function(element, index){ + return angular.isNumber(element.sort.priority) && element !== $scope.col; }); }; $scope.getSortDirectionAriaLabel = function(){ @@ -2003,8 +1994,6 @@ function ($compile, $timeout, $window, $document, gridUtil, uiGridConstants, i18 templateUrl: 'ui-grid/uiGridMenu', replace: false, link: function ($scope, $elm, $attrs, uiGridCtrl) { - var menuMid; - var $animate; var gridMenuMaxHeight; $scope.dynamicStyles = ''; @@ -2059,17 +2048,22 @@ function ($compile, $timeout, $window, $document, gridUtil, uiGridConstants, i18 // Turn off an existing document click handler angular.element(document).off('click touchstart', applyHideMenu); + $elm.off('keyup', checkKeyUp); + $elm.off('keydown', checkKeyDown); // Turn on the document click handler, but in a timeout so it doesn't apply to THIS click if there is one $timeout(function() { angular.element(document).on(docEventType, applyHideMenu); + $elm.on('keyup', checkKeyUp); + $elm.on('keydown', checkKeyDown); + }); //automatically set the focus to the first button element in the now open menu. gridUtil.focus.bySelector($elm, 'button[type=button]', true); }; - $scope.hideMenu = function(event, args) { + $scope.hideMenu = function(event) { if ( $scope.shown ){ /* * In order to animate cleanly we animate the addition of ng-hide, then use a $timeout to @@ -2089,6 +2083,8 @@ function ($compile, $timeout, $window, $document, gridUtil, uiGridConstants, i18 } angular.element(document).off('click touchstart', applyHideMenu); + $elm.off('keyup', checkKeyUp); + $elm.off('keydown', checkKeyDown); }; $scope.$on('hide-menu', function (event, args) { @@ -2109,6 +2105,34 @@ function ($compile, $timeout, $window, $document, gridUtil, uiGridConstants, i18 } }; + // close menu on ESC and keep tab cyclical + var checkKeyUp = function(event) { + if (event.keyCode === 27) { + $scope.hideMenu(); + } + }; + + var checkKeyDown = function(event) { + var setFocus = function(elm) { + elm.focus(); + event.preventDefault(); + return false; + }; + if (event.keyCode === 9) { + var firstMenuItem, lastMenuItem; + var menuItemButtons = $elm[0].querySelectorAll('button:not(.ng-hide)'); + if (menuItemButtons.length > 0) { + firstMenuItem = menuItemButtons[0]; + lastMenuItem = menuItemButtons[menuItemButtons.length - 1]; + if (event.target === lastMenuItem && !event.shiftKey) { + setFocus(firstMenuItem); + } else if (event.target === firstMenuItem && event.shiftKey) { + setFocus(lastMenuItem); + } + } + } + }; + if (typeof($scope.autoHide) === 'undefined' || $scope.autoHide === undefined) { $scope.autoHide = true; } @@ -2131,12 +2155,7 @@ function ($compile, $timeout, $window, $document, gridUtil, uiGridConstants, i18 } $scope.$on('$destroy', $scope.$on(uiGridConstants.events.ITEM_DRAGGING, applyHideMenu )); - }, - - - controller: ['$scope', '$element', '$attrs', function ($scope, $element, $attrs) { - var self = this; - }] + } }; return uiGridMenu; @@ -2156,15 +2175,12 @@ function ($compile, $timeout, $window, $document, gridUtil, uiGridConstants, i18 leaveOpen: '=', screenReaderOnly: '=' }, - require: ['?^uiGrid', '^uiGridMenu'], + require: ['?^uiGrid'], templateUrl: 'ui-grid/uiGridMenuItem', replace: false, - compile: function($elm, $attrs) { + compile: function() { return { - pre: function ($scope, $elm, $attrs, controllers) { - var uiGridCtrl = controllers[0], - uiGridMenuCtrl = controllers[1]; - + pre: function ($scope, $elm) { if ($scope.templateUrl) { gridUtil.getTemplate($scope.templateUrl) .then(function (contents) { @@ -2176,8 +2192,7 @@ function ($compile, $timeout, $window, $document, gridUtil, uiGridConstants, i18 } }, post: function ($scope, $elm, $attrs, controllers) { - var uiGridCtrl = controllers[0], - uiGridMenuCtrl = controllers[1]; + var uiGridCtrl = controllers[0]; // TODO(c0bra): validate that shown and active are functions if they're defined. An exception is already thrown above this though // if (typeof($scope.shown) !== 'undefined' && $scope.shown && typeof($scope.shown) !== 'function') { @@ -3141,10 +3156,10 @@ angular.module('ui.grid') }, dataWatchFunction) ); } else { deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.data; }, dataWatchFunction) ); - deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.data.length; }, dataWatchFunction) ); + deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.data.length; }, function(){ dataWatchFunction($scope.uiGrid.data); }) ); } deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.columnDefs; }, columnDefsWatchFunction) ); - deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.columnDefs.length; }, columnDefsWatchFunction) ); + deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.columnDefs.length; }, function(){ columnDefsWatchFunction($scope.uiGrid.columnDefs); }) ); } else { if (angular.isString($scope.uiGrid.data)) { deregFunctions.push( $scope.$parent.$watchCollection($scope.uiGrid.data, dataWatchFunction) ); @@ -3157,7 +3172,7 @@ angular.module('ui.grid') function columnDefsWatchFunction(n, o) { if (n && n !== o) { - self.grid.options.columnDefs = n; + self.grid.options.columnDefs = $scope.uiGrid.columnDefs; self.grid.buildColumns({ orderByColumnDefs: true }) .then(function(){ @@ -3407,13 +3422,13 @@ function uiGridDirective($compile, $templateCache, $timeout, $window, gridUtil, } }); - if (grid.options.enableFiltering) { - var allColumnsHaveFilteringTurnedOff = grid.options.columnDefs.every(function(col) { + if (grid.options.enableFiltering && !maxNumberOfFilters) { + var allColumnsHaveFilteringTurnedOff = grid.options.columnDefs.length && grid.options.columnDefs.every(function(col) { return col.enableFiltering === false; }); if (!allColumnsHaveFilteringTurnedOff) { - maxNumberOfFilters++; + maxNumberOfFilters = 1; } } @@ -3923,12 +3938,12 @@ angular.module('ui.grid') * that have sorting on them, sorted in priority order. * * @param {$scope} scope The scope of the controller. This is used to deregister this event when the scope is destroyed. - * @param {Function} callBack Will be called when the event is emited. The function passes back an array of columns with - * sorts on them, in priority order. + * @param {Function} callBack Will be called when the event is emited. The function passes back the grid and an array of + * columns with sorts on them, in priority order. * * @example *
              -     *      gridApi.core.on.sortChanged( $scope, function(sortColumns){
              +     *      gridApi.core.on.sortChanged( $scope, function(grid, sortColumns){
                    *        // do something
                    *      });
                    * 
              @@ -3941,7 +3956,7 @@ angular.module('ui.grid') * @methodOf ui.grid.core.api:PublicApi * @description The visibility of a column has changed, * the column itself is passed out as a parameter of the event. - * + * * @param {$scope} scope The scope of the controller. This is used to deregister this event when the scope is destroyed. * @param {Function} callBack Will be called when the event is emited. The function passes back the GridCol that has changed. * @@ -4631,17 +4646,17 @@ angular.module('ui.grid') * append to the newRows and add to newHash * run the processors * ``` - * + * * Rows are identified using the hashKey if configured. If not configured, then rows * are identified using the gridOptions.rowEquality function - * + * * This method is useful when trying to select rows immediately after loading data without * using a $timeout/$interval, e.g.: - * + * * $scope.gridOptions.data = someData; * $scope.gridApi.grid.modifyRows($scope.gridOptions.data); * $scope.gridApi.selection.selectRow($scope.gridOptions.data[0]); - * + * * OR to persist row selection after data update (e.g. rows selected, new data loaded, want * originally selected rows to be re-selected)) */ @@ -5420,12 +5435,12 @@ angular.module('ui.grid') p = 0; self.columns.forEach(function (col) { - if (col.sort && col.sort.priority && col.sort.priority > p) { - p = col.sort.priority; + if (col.sort && col.sort.priority !== undefined && col.sort.priority >= p) { + p = col.sort.priority + 1; } }); - return p + 1; + return p; }; /** @@ -5504,7 +5519,7 @@ angular.module('ui.grid') if (!add) { self.resetColumnSorting(column); - column.sort.priority = 0; + column.sort.priority = undefined; // Get the actual priority since there may be columns which have suppressRemoveSort set column.sort.priority = self.getNextColumnSortPriority(); } @@ -9808,14 +9823,14 @@ var module = angular.module('ui.grid'); /** * @ngdoc object * @name ui.grid.class:RowSorter - * @description RowSorter provides the default sorting mechanisms, - * including guessing column types and applying appropriate sort + * @description RowSorter provides the default sorting mechanisms, + * including guessing column types and applying appropriate sort * algorithms - * - */ + * + */ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGridConstants) { - var currencyRegexStr = + var currencyRegexStr = '(' + uiGridConstants.CURRENCY_SYMBOLS .map(function (a) { return '\\' + a; }) // Escape all the currency symbols ($ at least will jack up this regex) @@ -9898,7 +9913,7 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr * @methodOf ui.grid.class:RowSorter * @name basicSort * @description Sorts any values that provide the < method, including strings - * or numbers. Handles nulls and undefined through calling handleNulls + * or numbers. Handles nulls and undefined through calling handleNulls * @param {object} a sort value a * @param {object} b sort value b * @returns {number} normal sort function, returns -ve, 0, +ve @@ -9923,7 +9938,7 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr * @ngdoc method * @methodOf ui.grid.class:RowSorter * @name sortNumber - * @description Sorts numerical values. Handles nulls and undefined through calling handleNulls + * @description Sorts numerical values. Handles nulls and undefined through calling handleNulls * @param {object} a sort value a * @param {object} b sort value b * @returns {number} normal sort function, returns -ve, 0, +ve @@ -9942,8 +9957,8 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr * @ngdoc method * @methodOf ui.grid.class:RowSorter * @name sortNumberStr - * @description Sorts numerical values that are stored in a string (i.e. parses them to numbers first). - * Handles nulls and undefined through calling handleNulls + * @description Sorts numerical values that are stored in a string (i.e. parses them to numbers first). + * Handles nulls and undefined through calling handleNulls * @param {object} a sort value a * @param {object} b sort value b * @returns {number} normal sort function, returns -ve, 0, +ve @@ -9957,36 +9972,36 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr numB, // The parsed number form of 'b' badA = false, badB = false; - + // Try to parse 'a' to a float numA = parseFloat(a.replace(/[^0-9.-]/g, '')); - + // If 'a' couldn't be parsed to float, flag it as bad if (isNaN(numA)) { badA = true; } - + // Try to parse 'b' to a float numB = parseFloat(b.replace(/[^0-9.-]/g, '')); - + // If 'b' couldn't be parsed to float, flag it as bad if (isNaN(numB)) { badB = true; } - + // We want bad ones to get pushed to the bottom... which effectively is "greater than" if (badA && badB) { return 0; } - + if (badA) { return 1; } - + if (badB) { return -1; } - + return numA - numB; } }; @@ -9996,7 +10011,7 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr * @ngdoc method * @methodOf ui.grid.class:RowSorter * @name sortAlpha - * @description Sorts string values. Handles nulls and undefined through calling handleNulls + * @description Sorts string values. Handles nulls and undefined through calling handleNulls * @param {object} a sort value a * @param {object} b sort value b * @returns {number} normal sort function, returns -ve, 0, +ve @@ -10008,7 +10023,7 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr } else { var strA = a.toString().toLowerCase(), strB = b.toString().toLowerCase(); - + return strA === strB ? 0 : strA.localeCompare(strB); } }; @@ -10037,7 +10052,7 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr } var timeA = a.getTime(), timeB = b.getTime(); - + return timeA === timeB ? 0 : (timeA < timeB ? -1 : 1); } }; @@ -10047,8 +10062,8 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr * @ngdoc method * @methodOf ui.grid.class:RowSorter * @name sortBool - * @description Sorts boolean values, true is considered larger than false. - * Handles nulls and undefined through calling handleNulls + * @description Sorts boolean values, true is considered larger than false. + * Handles nulls and undefined through calling handleNulls * @param {object} a sort value a * @param {object} b sort value b * @returns {number} normal sort function, returns -ve, 0, +ve @@ -10061,7 +10076,7 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr if (a && b) { return 0; } - + if (!a && !b) { return 0; } @@ -10076,17 +10091,17 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr * @ngdoc method * @methodOf ui.grid.class:RowSorter * @name getSortFn - * @description Get the sort function for the column. Looks first in + * @description Get the sort function for the column. Looks first in * rowSorter.colSortFnCache using the column name, failing that it * looks at col.sortingAlgorithm (and puts it in the cache), failing that * it guesses the sort algorithm based on the data type. - * + * * The cache currently seems a bit pointless, as none of the work we do is * processor intensive enough to need caching. Presumably in future we might * inspect the row data itself to guess the sort function, and in that case * it would make sense to have a cache, the infrastructure is in place to allow * that. - * + * * @param {Grid} grid the grid to consider * @param {GridCol} col the column to find a function for * @param {array} rows an array of grid rows. Currently unused, but presumably in future @@ -10139,7 +10154,7 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr * @description Used where multiple columns are present in the sort criteria, * we determine which column should take precedence in the sort by sorting * the columns based on their sort.priority - * + * * @param {gridColumn} a column a * @param {gridColumn} b column b * @returns {number} normal sort function, returns -ve, 0, +ve @@ -10161,11 +10176,11 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr } } // Only A has a priority - else if (a.sort.priority || a.sort.priority === 0) { + else if (a.sort.priority || a.sort.priority === undefined) { return -1; } // Only B has a priority - else if (b.sort.priority || b.sort.priority === 0) { + else if (b.sort.priority || b.sort.priority === undefined) { return 1; } // Neither has a priority @@ -10182,14 +10197,14 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr * @description Prevents the internal sorting from executing. Events will * still be fired when the sort changes, and the sort information on * the columns will be updated, allowing an external sorter (for example, - * server sorting) to be implemented. Defaults to false. - * + * server sorting) to be implemented. Defaults to false. + * */ /** * @ngdoc method * @methodOf ui.grid.class:RowSorter * @name sort - * @description sorts the grid + * @description sorts the grid * @param {Object} grid the grid itself * @param {array} rows the rows to be sorted * @param {array} columns the columns in which to look @@ -10201,7 +10216,7 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr if (!rows) { return; } - + if (grid.options.useExternalSorting){ return rows; } @@ -10263,7 +10278,7 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr idx++; } - // Chrome doesn't implement a stable sort function. If our sort returns 0 + // Chrome doesn't implement a stable sort function. If our sort returns 0 // (i.e. the items are equal), and we're at the last sort column in the list, // then return the previous order using our custom // index variable @@ -10280,13 +10295,13 @@ module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGr }; var newRows = rows.sort(rowSortFn); - + // remove the custom index field on each row, used to make a stable sort out of unstable sorts (e.g. Chrome) var clearIndex = function( row, idx ){ delete row.entity.$$uiGridIndex; }; rows.forEach(clearIndex); - + return newRows; }; @@ -10318,7 +10333,7 @@ if (typeof Function.prototype.bind !== "function") { }; } -function getStyles (elem) { +function getStyles (elem) { var e = elem; if (typeof(e.length) !== 'undefined' && e.length) { e = elem[0]; @@ -11472,7 +11487,7 @@ module.service('gridUtil', ['$log', '$window', '$document', '$http', '$templateC if (timeout) { $timeout.cancel(timeout); } - timeout = $timeout(later, wait); + timeout = $timeout(later, wait, false); if (callNow) { result = func.apply(context, args); } @@ -11522,7 +11537,7 @@ module.service('gridUtil', ['$log', '$window', '$document', '$http', '$templateC function runFunc(endDate){ lastCall = +new Date(); func.apply(context, args); - $interval(function(){ queued = null; }, 0, 1); + $interval(function(){ queued = null; }, 0, 1, false); } return function(){ @@ -11535,7 +11550,7 @@ module.service('gridUtil', ['$log', '$window', '$document', '$http', '$templateC runFunc(); } else if (options.trailing){ - queued = $interval(runFunc, wait - sinceLast, 1); + queued = $interval(runFunc, wait - sinceLast, 1, false); } } }; @@ -12708,8 +12723,17 @@ module.filter('px', function() { jsonNotArray: 'インポートしたJSONファイルには配列が含まれている必要があります。処理を中止します。' }, pagination: { + aria: { + pageToFirst: '最初のページ', + pageBack: '前のページ', + pageSelected: '現在のページ', + pageForward: '次のページ', + pageToLast: '最後のページ' + }, sizes: '項目/ページ', - totalItems: '項目' + totalItems: '項目', + through: 'から', + of: '項目/全' } }); return $delegate; @@ -16337,7 +16361,7 @@ module.filter('px', function() { $timeout(function () { $elm[0].focus(); //only select text if it is not being replaced below in the cellNav viewPortKeyPress - if ($scope.col.colDef.enableCellEditOnFocus || !(uiGridCtrl && uiGridCtrl.grid.api.cellNav)) { + if ($elm[0].select && $scope.col.colDef.enableCellEditOnFocus || !(uiGridCtrl && uiGridCtrl.grid.api.cellNav)) { $elm[0].select(); } else { @@ -16785,7 +16809,7 @@ module.filter('px', function() { /** * @ngdoc object * @name ui.grid.expandable.api:GridRow - * + * * @description Additional properties added to GridRow when using the expandable module */ /** @@ -16871,6 +16895,43 @@ module.filter('px', function() { */ toggleAllRows: function() { service.toggleAllRows(grid); + }, + /** + * @ngdoc function + * @name expandRow + * @methodOf ui.grid.expandable.api:PublicApi + * @description Expand the data row + * @param {object} rowEntity gridOptions.data[] array instance + */ + expandRow: function (rowEntity) { + var row = grid.getRow(rowEntity); + if (row !== null && !row.isExpanded) { + service.toggleRowExpansion(grid, row); + } + }, + /** + * @ngdoc function + * @name collapseRow + * @methodOf ui.grid.expandable.api:PublicApi + * @description Collapse the data row + * @param {object} rowEntity gridOptions.data[] array instance + */ + collapseRow: function (rowEntity) { + var row = grid.getRow(rowEntity); + if (row !== null && row.isExpanded) { + service.toggleRowExpansion(grid, row); + } + }, + /** + * @ngdoc function + * @name getExpandedRows + * @methodOf ui.grid.expandable.api:PublicApi + * @description returns all expandedRow's entity references + */ + getExpandedRows: function () { + return service.getExpandedRows(grid).map(function (gridRow) { + return gridRow.entity; + }); } } } @@ -16900,7 +16961,7 @@ module.filter('px', function() { if (angular.isUndefined(row.expandedRowHeight)){ row.expandedRowHeight = grid.options.expandableRowHeight; } - + if (row.isExpanded) { row.height = row.grid.options.rowHeight + row.expandedRowHeight; } @@ -16938,6 +16999,12 @@ module.filter('px', function() { else { service.expandAllRows(grid); } + }, + + getExpandedRows: function (grid) { + return grid.rows.filter(function (row) { + return row.isExpanded; + }); } }; return service; @@ -21374,45 +21441,91 @@ module.filter('px', function() { } } + var targetIndex; + //Case where column should be moved to a position on its left if (totalMouseMovement < 0) { var totalColumnsLeftWidth = 0; - for (var il = columnIndex - 1; il >= 0; il--) { - if (angular.isUndefined(columns[il].colDef.visible) || columns[il].colDef.visible === true) { - totalColumnsLeftWidth += columns[il].drawnWidth || columns[il].width || columns[il].colDef.width; - if (totalColumnsLeftWidth > Math.abs(totalMouseMovement)) { - uiGridMoveColumnService.redrawColumnAtPosition - ($scope.grid, columnIndex, il + 1); - break; + var il; + if ( $scope.grid.isRTL() ){ + for (il = columnIndex + 1; il < columns.length; il++) { + if (angular.isUndefined(columns[il].colDef.visible) || columns[il].colDef.visible === true) { + totalColumnsLeftWidth += columns[il].drawnWidth || columns[il].width || columns[il].colDef.width; + if (totalColumnsLeftWidth > Math.abs(totalMouseMovement)) { + uiGridMoveColumnService.redrawColumnAtPosition + ($scope.grid, columnIndex, il - 1); + break; + } + } + } + } + else { + for (il = columnIndex - 1; il >= 0; il--) { + if (angular.isUndefined(columns[il].colDef.visible) || columns[il].colDef.visible === true) { + totalColumnsLeftWidth += columns[il].drawnWidth || columns[il].width || columns[il].colDef.width; + if (totalColumnsLeftWidth > Math.abs(totalMouseMovement)) { + uiGridMoveColumnService.redrawColumnAtPosition + ($scope.grid, columnIndex, il + 1); + break; + } } } } - //Case where column should be moved to beginning of the grid. + + //Case where column should be moved to beginning (or end in RTL) of the grid. if (totalColumnsLeftWidth < Math.abs(totalMouseMovement)) { + targetIndex = 0; + if ( $scope.grid.isRTL() ){ + targetIndex = columns.length - 1; + } uiGridMoveColumnService.redrawColumnAtPosition - ($scope.grid, columnIndex, 0); + ($scope.grid, columnIndex, targetIndex); } } //Case where column should be moved to a position on its right else if (totalMouseMovement > 0) { var totalColumnsRightWidth = 0; - for (var ir = columnIndex + 1; ir < columns.length; ir++) { - if (angular.isUndefined(columns[ir].colDef.visible) || columns[ir].colDef.visible === true) { - totalColumnsRightWidth += columns[ir].drawnWidth || columns[ir].width || columns[ir].colDef.width; - if (totalColumnsRightWidth > totalMouseMovement) { - uiGridMoveColumnService.redrawColumnAtPosition - ($scope.grid, columnIndex, ir - 1); - break; + var ir; + if ( $scope.grid.isRTL() ){ + for (ir = columnIndex - 1; ir > 0; ir--) { + if (angular.isUndefined(columns[ir].colDef.visible) || columns[ir].colDef.visible === true) { + totalColumnsRightWidth += columns[ir].drawnWidth || columns[ir].width || columns[ir].colDef.width; + if (totalColumnsRightWidth > totalMouseMovement) { + uiGridMoveColumnService.redrawColumnAtPosition + ($scope.grid, columnIndex, ir); + break; + } } } } - //Case where column should be moved to end of the grid. + else { + for (ir = columnIndex + 1; ir < columns.length; ir++) { + if (angular.isUndefined(columns[ir].colDef.visible) || columns[ir].colDef.visible === true) { + totalColumnsRightWidth += columns[ir].drawnWidth || columns[ir].width || columns[ir].colDef.width; + if (totalColumnsRightWidth > totalMouseMovement) { + uiGridMoveColumnService.redrawColumnAtPosition + ($scope.grid, columnIndex, ir - 1); + break; + } + } + } + } + + + //Case where column should be moved to end (or beginning in RTL) of the grid. if (totalColumnsRightWidth < totalMouseMovement) { + targetIndex = columns.length - 1; + if ( $scope.grid.isRTL() ){ + targetIndex = 0; + } uiGridMoveColumnService.redrawColumnAtPosition - ($scope.grid, columnIndex, columns.length - 1); + ($scope.grid, columnIndex, targetIndex); } } + + + }; var onDownEvents = function(){ @@ -21474,8 +21587,8 @@ module.filter('px', function() { //Update css of moving column to adjust to new left value or fire scroll in case column has reached edge of grid if ((currentElmLeft >= gridLeft || changeValue > 0) && (currentElmRight <= rightMoveLimit || changeValue < 0)) { - movingElm.css({visibility: 'visible', 'left': (movingElm[0].offsetLeft + - (newElementLeft < rightMoveLimit ? changeValue : (rightMoveLimit - currentElmLeft))) + 'px'}); + movingElm.css({visibility: 'visible', 'left': (movingElm[0].offsetLeft + + (newElementLeft < rightMoveLimit ? changeValue : (rightMoveLimit - currentElmLeft))) + 'px'}); } else if (totalColumnWidth > Math.ceil(uiGridCtrl.grid.gridWidth)) { changeValue *= 8; @@ -22159,7 +22272,7 @@ module.filter('px', function() { return typeof(this.context.col.renderContainer) !== 'undefined' && this.context.col.renderContainer !== null && this.context.col.renderContainer !== 'body'; }, action: function () { - service.pinColumn(this.context.col.grid, this.context.col, uiGridPinningConstants.container.UNPIN); + service.pinColumn(this.context.col.grid, this.context.col, uiGridPinningConstants.container.NONE); } }; @@ -22177,6 +22290,7 @@ module.filter('px', function() { pinColumn: function(grid, col, container) { if (container === uiGridPinningConstants.container.NONE) { col.renderContainer = null; + col.colDef.pinnedLeft = col.colDef.pinnedRight = false; } else { col.renderContainer = container; @@ -23781,6 +23895,7 @@ module.filter('px', function() { savedState.selection = service.saveSelection( grid ); savedState.grouping = service.saveGrouping( grid ); savedState.treeView = service.saveTreeView( grid ); + savedState.pagination = service.savePagination( grid ); return savedState; }, @@ -23817,6 +23932,10 @@ module.filter('px', function() { service.restoreTreeView( grid, state.treeView ); } + if ( state.pagination ){ + service.restorePagination( grid, state.pagination ); + } + grid.refresh(); }, @@ -23970,6 +24089,26 @@ module.filter('px', function() { /** * @ngdoc function + * @name savePagination + * @methodOf ui.grid.saveState.service:uiGridSaveStateService + * @description Saves the pagination state, if the pagination feature is enabled + * @param {Grid} grid the grid whose state we'd like to save + * @returns {object} the pagination state ready to be saved + */ + savePagination: function( grid ) { + if ( !grid.api.pagination || !grid.options.paginationPageSize ){ + return {}; + } + + return { + paginationCurrentPage: grid.options.paginationCurrentPage, + paginationPageSize: grid.options.paginationPageSize + }; + }, + + + /** + * @ngdoc function * @name saveTreeView * @methodOf ui.grid.saveState.service:uiGridSaveStateService * @description Saves the tree view state, if the tree feature is enabled @@ -24038,8 +24177,9 @@ module.filter('px', function() { grid.api.core.raise.columnVisibilityChanged(currentCol); } - if ( grid.options.saveWidths ){ + if ( grid.options.saveWidths && currentCol.width !== columnState.width){ currentCol.width = columnState.width; + currentCol.hasCustomWidth = true; } if ( grid.options.saveSort && @@ -24193,6 +24333,25 @@ module.filter('px', function() { /** * @ngdoc function + * @name restorePagination + * @methodOf ui.grid.saveState.service:uiGridSaveStateService + * @description Restores the pagination information, if pagination is enabled. + * @param {Grid} grid the grid whose state we'd like to restore + * @param {object} pagination the pagination object to be restored + * @param {number} pagination.paginationCurrentPage the page number to restore + * @param {number} pagination.paginationPageSize the number of items displayed per page + */ + restorePagination: function( grid, pagination ){ + if ( !grid.api.pagination || !grid.options.paginationPageSize ){ + return; + } + + grid.options.paginationCurrentPage = pagination.paginationCurrentPage; + grid.options.paginationPageSize = pagination.paginationPageSize; + }, + + /** + * @ngdoc function * @name findRowByIdentity * @methodOf ui.grid.saveState.service:uiGridSaveStateService * @description Finds a row given it's identity value, returns the first found row @@ -25783,6 +25942,16 @@ module.filter('px', function() { *
              Defaults to {} */ gridOptions.treeCustomAggregations = gridOptions.treeCustomAggregations || {}; + + /** + * @ngdoc object + * @name enableExpandAll + * @propertyOf ui.grid.treeBase.api:GridOptions + * @description Enable the expand all button at the top of the row header + * + *
              Defaults to true + */ + gridOptions.enableExpandAll = gridOptions.enableExpandAll !== false; }, @@ -27768,12 +27937,12 @@ angular.module('ui.grid').run(['$templateCache', function($templateCache) { $templateCache.put('ui-grid/uiGridHeaderCell', - "
              {{ col.displayName CUSTOM_FILTERS }} {{col.sort.priority}}
               
              " + "
              {{ col.displayName CUSTOM_FILTERS }} {{col.sort.priority + 1}}
               
              " ); $templateCache.put('ui-grid/uiGridMenu', - "
              " + "
              " ); @@ -27843,7 +28012,7 @@ angular.module('ui.grid').run(['$templateCache', function($templateCache) { $templateCache.put('ui-grid/pagination', - "
              0\">/ {{ paginationApi.getTotalPages() }}
              1\"> {{sizesLabel}}
              {{grid.options.paginationPageSize}} {{sizesLabel}}
              0\">{{showingLow}} - {{showingHigh}} {{paginationOf}} {{grid.options.totalItems}} {{totalItemsLabel}}
              " + "
              0\">/ {{ paginationApi.getTotalPages() }}
              1\"> {{sizesLabel}}
              {{grid.options.paginationPageSize}} {{sizesLabel}}
              0\">{{showingLow}} - {{showingHigh}} {{paginationOf}} {{grid.options.totalItems}} {{totalItemsLabel}}
              " ); @@ -27883,7 +28052,7 @@ angular.module('ui.grid').run(['$templateCache', function($templateCache) { $templateCache.put('ui-grid/treeBaseHeaderCell', - "
              " + "
              " ); diff --git a/public/bower_components/angular-ui-grid/ui-grid.svg b/public/bower_components/angular-ui-grid/ui-grid.svg index 3d675f6..3556111 100644 --- a/public/bower_components/angular-ui-grid/ui-grid.svg +++ b/public/bower_components/angular-ui-grid/ui-grid.svg @@ -1,7 +1,7 @@ -Copyright (C) 2015 by original authors @ fontello.com +Copyright (C) 2016 by original authors @ fontello.com diff --git a/public/bower_components/angular-ui-grid/ui-grid.ttf b/public/bower_components/angular-ui-grid/ui-grid.ttf index 4995dad..9cee108 100644 Binary files a/public/bower_components/angular-ui-grid/ui-grid.ttf and b/public/bower_components/angular-ui-grid/ui-grid.ttf differ diff --git a/public/bower_components/angular-ui-grid/ui-grid.woff b/public/bower_components/angular-ui-grid/ui-grid.woff index a595797..fbbbb4e 100644 Binary files a/public/bower_components/angular-ui-grid/ui-grid.woff and b/public/bower_components/angular-ui-grid/ui-grid.woff differ diff --git a/public/bower_components/angular-ui-router/angular-ui-router.js b/public/bower_components/angular-ui-router/angular-ui-router.js index 57c62cc..26f7657 100644 --- a/public/bower_components/angular-ui-router/angular-ui-router.js +++ b/public/bower_components/angular-ui-router/angular-ui-router.js @@ -1,6 +1,6 @@ /** * State-based routing for AngularJS - * @version v0.2.15 + * @version v0.2.18 * @link http://angular-ui.github.com/ * @license MIT License, http://www.opensource.org/licenses/MIT */ @@ -22,7 +22,8 @@ var isDefined = angular.isDefined, isArray = angular.isArray, forEach = angular.forEach, extend = angular.extend, - copy = angular.copy; + copy = angular.copy, + toJson = angular.toJson; function inherit(parent, extra) { return extend(new (extend(function() {}, { prototype: parent }))(), extra); @@ -109,7 +110,7 @@ function inheritParams(currentParams, newParams, $current, $to) { var parents = ancestors($current, $to), parentParams, inherited = {}, inheritList = []; for (var i in parents) { - if (!parents[i].params) continue; + if (!parents[i] || !parents[i].params) continue; parentParams = objectKeys(parents[i].params); if (!parentParams.length) continue; @@ -522,7 +523,7 @@ function $Resolve( $q, $injector) { * propagated immediately. Once the `$resolve` promise has been rejected, no * further invocables will be called. * - * Cyclic dependencies between invocables are not permitted and will caues `$resolve` + * Cyclic dependencies between invocables are not permitted and will cause `$resolve` * to throw an error. As a special case, an injectable can depend on a parameter * with the same name as the injectable, which will be fulfilled from the `parent` * injectable of the same name. This allows inherited values to be decorated. @@ -746,13 +747,13 @@ function UrlMatcher(pattern, config, parentMatcher) { // The regular expression is somewhat complicated due to the need to allow curly braces // inside the regular expression. The placeholder regexp breaks down as follows: // ([:*])([\w\[\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case) - // \{([\w\[\]]+)(?:\:( ... ))?\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case + // \{([\w\[\]]+)(?:\:\s*( ... ))?\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either // [^{}\\]+ - anything other than curly braces or backslash // \\. - a backslash escape // \{(?:[^{}\\]+|\\.)*\} - a matched set of curly braces containing other atoms - var placeholder = /([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, - searchPlaceholder = /([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, + var placeholder = /([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, + searchPlaceholder = /([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, compiled = '^', last = 0, m, segments = this.segments = [], parentParams = parentMatcher ? parentMatcher.params : {}, @@ -762,7 +763,7 @@ function UrlMatcher(pattern, config, parentMatcher) { function addParameter(id, type, config, location) { paramNames.push(id); if (parentParams[id]) return parentParams[id]; - if (!/^\w+(-+\w+)*(?:\[\])?$/.test(id)) throw new Error("Invalid parameter name '" + id + "' in pattern '" + pattern + "'"); + if (!/^\w+([-.]+\w+)*(?:\[\])?$/.test(id)) throw new Error("Invalid parameter name '" + id + "' in pattern '" + pattern + "'"); if (params[id]) throw new Error("Duplicate parameter name '" + id + "' in pattern '" + pattern + "'"); params[id] = new $$UMFP.Param(id, type, config, location); return params[id]; @@ -773,7 +774,10 @@ function UrlMatcher(pattern, config, parentMatcher) { if (!pattern) return result; switch(squash) { case false: surroundPattern = ['(', ')' + (optional ? "?" : "")]; break; - case true: surroundPattern = ['?(', ')?']; break; + case true: + result = result.replace(/\/$/, ''); + surroundPattern = ['(?:\/(', ')|\/)?']; + break; default: surroundPattern = ['(' + squash + "|", ')?']; break; } return result + surroundPattern[0] + pattern + surroundPattern[1]; @@ -789,7 +793,11 @@ function UrlMatcher(pattern, config, parentMatcher) { cfg = config.params[id]; segment = pattern.substring(last, m.index); regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null); - type = $$UMFP.type(regexp || "string") || inherit($$UMFP.type("string"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) }); + + if (regexp) { + type = $$UMFP.type(regexp) || inherit($$UMFP.type("string"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) }); + } + return { id: id, regexp: regexp, segment: segment, type: type, cfg: cfg }; @@ -919,20 +927,29 @@ UrlMatcher.prototype.exec = function (path, searchParams) { return map(allReversed, unquoteDashes).reverse(); } + var param, paramVal; for (i = 0; i < nPath; i++) { paramName = paramNames[i]; - var param = this.params[paramName]; - var paramVal = m[i+1]; + param = this.params[paramName]; + paramVal = m[i+1]; // if the param value matches a pre-replace pair, replace the value before decoding. - for (j = 0; j < param.replace; j++) { + for (j = 0; j < param.replace.length; j++) { if (param.replace[j].from === paramVal) paramVal = param.replace[j].to; } if (paramVal && param.array === true) paramVal = decodePathArray(paramVal); + if (isDefined(paramVal)) paramVal = param.type.decode(paramVal); values[paramName] = param.value(paramVal); } for (/**/; i < nTotal; i++) { paramName = paramNames[i]; values[paramName] = this.params[paramName].value(searchParams[paramName]); + param = this.params[paramName]; + paramVal = searchParams[paramName]; + for (j = 0; j < param.replace.length; j++) { + if (param.replace[j].from === paramVal) paramVal = param.replace[j].to; + } + if (isDefined(paramVal)) paramVal = param.type.decode(paramVal); + values[paramName] = param.value(paramVal); } return values; @@ -956,7 +973,7 @@ UrlMatcher.prototype.parameters = function (param) { /** * @ngdoc function - * @name ui.router.util.type:UrlMatcher#validate + * @name ui.router.util.type:UrlMatcher#validates * @methodOf ui.router.util.type:UrlMatcher * * @description @@ -1009,6 +1026,8 @@ UrlMatcher.prototype.format = function (values) { if (isPathParam) { var nextSegment = segments[i + 1]; + var isFinalPathParam = i + 1 === nPath; + if (squash === false) { if (encoded != null) { if (isArray(encoded)) { @@ -1024,9 +1043,12 @@ UrlMatcher.prototype.format = function (values) { } else if (isString(squash)) { result += squash + nextSegment; } + + if (isFinalPathParam && param.squash === true && result.slice(-1) === '/') result = result.slice(0, -1); } else { if (encoded == null || (isDefaultValue && squash !== false)) continue; if (!isArray(encoded)) encoded = [ encoded ]; + if (encoded.length === 0) continue; encoded = map(encoded, encodeURIComponent).join('&' + name + '='); result += (search ? '&' : '?') + (name + '=' + encoded); search = true; @@ -1191,6 +1213,7 @@ Type.prototype.$asArray = function(mode, isSearch) { // Wraps type (.is/.encode/.decode) functions to operate on each value of an array function arrayHandler(callback, allTruthyMode) { return function handleArray(val) { + if (isArray(val) && val.length === 0) return val; val = arrayWrap(val); var result = map(val, callback); if (allTruthyMode === true) @@ -1239,11 +1262,15 @@ function $UrlMatcherFactory() { var isCaseInsensitive = false, isStrictMode = true, defaultSquashPolicy = false; - function valToString(val) { return val != null ? val.toString().replace(/\//g, "%2F") : val; } - function valFromString(val) { return val != null ? val.toString().replace(/%2F/g, "/") : val; } + // Use tildes to pre-encode slashes. + // If the slashes are simply URLEncoded, the browser can choose to pre-decode them, + // and bidirectional encoding/decoding fails. + // Tilde was chosen because it's not a RFC 3986 section 2.2 Reserved Character + function valToString(val) { return val != null ? val.toString().replace(/~/g, "~~").replace(/\//g, "~2F") : val; } + function valFromString(val) { return val != null ? val.toString().replace(/~2F/g, "/").replace(/~~/g, "~") : val; } var $types = {}, enqueue = true, typeQueue = [], injector, defaultTypes = { - string: { + "string": { encode: valToString, decode: valFromString, // TODO: in 1.0, make string .is() return false if value is undefined/null by default. @@ -1251,19 +1278,19 @@ function $UrlMatcherFactory() { is: function(val) { return val == null || !isDefined(val) || typeof val === "string"; }, pattern: /[^/]*/ }, - int: { + "int": { encode: valToString, decode: function(val) { return parseInt(val, 10); }, is: function(val) { return isDefined(val) && this.decode(val.toString()) === val; }, pattern: /\d+/ }, - bool: { + "bool": { encode: function(val) { return val ? 1 : 0; }, decode: function(val) { return parseInt(val, 10) !== 0; }, is: function(val) { return val === true || val === false; }, pattern: /0|1/ }, - date: { + "date": { encode: function (val) { if (!this.is(val)) return undefined; @@ -1282,14 +1309,14 @@ function $UrlMatcherFactory() { pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/, capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/ }, - json: { + "json": { encode: angular.toJson, decode: angular.fromJson, is: angular.isObject, equals: angular.equals, pattern: /[^/]*/ }, - any: { // does not encode/decode + "any": { // does not encode/decode encode: angular.identity, decode: angular.identity, equals: angular.equals, @@ -1583,7 +1610,12 @@ function $UrlMatcherFactory() { if (config.type && urlType) throw new Error("Param '"+id+"' has two type configurations."); if (urlType) return urlType; if (!config.type) return (location === "config" ? $types.any : $types.string); - return config.type instanceof Type ? config.type : new Type(config.type); + + if (angular.isString(config.type)) + return $types[config.type]; + if (config.type instanceof Type) + return config.type; + return new Type(config.type); } // array config: param name (param[]) overrides default settings. explicit config overrides param name. @@ -1778,7 +1810,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { * }); *
              * - * @param {object} rule Handler function that takes `$injector` and `$location` + * @param {function} rule Handler function that takes `$injector` and `$location` * services as arguments. You can use them to return a valid path as a string. * * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance @@ -1814,7 +1846,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { * }); * * - * @param {string|object} rule The url path you want to redirect to or a function + * @param {string|function} rule The url path you want to redirect to or a function * rule that returns the url path. The function version is passed two params: * `$injector` and `$location` services, and must return a url string. * @@ -1843,7 +1875,9 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { * @methodOf ui.router.router.$urlRouterProvider * * @description - * Registers a handler for a given url matching. if handle is a string, it is + * Registers a handler for a given url matching. + * + * If the handler is a string, it is * treated as a redirect, and is interpolated according to the syntax of match * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise). * @@ -1872,7 +1906,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { * * * @param {string|object} what The incoming path that you want to redirect. - * @param {string|object} handler The path you want to redirect your user to. + * @param {string|function} handler The path you want to redirect your user to. */ this.when = function (what, handler) { var redirect, handlerIsString = isString(handler); @@ -1983,8 +2017,8 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { * */ this.$get = $get; - $get.$inject = ['$location', '$rootScope', '$injector', '$browser']; - function $get( $location, $rootScope, $injector, $browser) { + $get.$inject = ['$location', '$rootScope', '$injector', '$browser', '$sniffer']; + function $get( $location, $rootScope, $injector, $browser, $sniffer) { var baseHref = $browser.baseHref(), location = $location.url(), lastPushedUrl; @@ -2117,6 +2151,8 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { if (angular.isObject(isHtml5)) { isHtml5 = isHtml5.enabled; } + + isHtml5 = isHtml5 && $sniffer.history; var url = urlMatcher.format(params); options = options || {}; @@ -2190,7 +2226,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) { // inherit 'data' from parent and override by own values (if any) data: function(state) { if (state.parent && state.parent.data) { - state.data = state.self.data = extend({}, state.parent.data, state.data); + state.data = state.self.data = inherit(state.parent.data, state.data); } return state.data; }, @@ -2224,7 +2260,8 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) { // Derive parameters for this state and ensure they're a super-set of parent's parameters params: function(state) { - return state.parent && state.parent.params ? extend(state.parent.params.$$new(), state.ownParams) : new $$UMFP.ParamSet(); + var ownParams = pick(state.ownParams, state.ownParams.$$keys()); + return state.parent && state.parent.params ? extend(state.parent.params.$$new(), ownParams) : new $$UMFP.ParamSet(); }, // If there is no explicit multi-view configuration, make one up so we don't have @@ -2321,7 +2358,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) { var name = state.name; if (!isString(name) || name.indexOf('@') >= 0) throw new Error("State must have a valid name"); - if (states.hasOwnProperty(name)) throw new Error("State '" + name + "'' is already defined"); + if (states.hasOwnProperty(name)) throw new Error("State '" + name + "' is already defined"); // Get parent name var parentName = (name.indexOf('.') !== -1) ? name.substring(0, name.lastIndexOf('.')) @@ -2689,7 +2726,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) { * * Callback function for when a state is entered. Good way * to trigger an action or dispatch an event, such as opening a dialog. - * If minifying your scripts, make sure to explictly annotate this function, + * If minifying your scripts, make sure to explicitly annotate this function, * because it won't be automatically annotated by your build tools. * *
              onEnter: function(MyService, $stateParams) {
              @@ -2701,7 +2738,7 @@ function $StateProvider(   $urlRouterProvider,   $urlMatcherFactory) {
                  *
                  * Callback function for when a state is exited. Good way to
                  *   trigger an action or dispatch an event, such as opening a dialog.
              -   * If minifying your scripts, make sure to explictly annotate this function,
              +   * If minifying your scripts, make sure to explicitly annotate this function,
                  * because it won't be automatically annotated by your build tools.
                  *
                  * 
              onExit: function(MyService, $stateParams) {
              @@ -3032,7 +3069,8 @@ function $StateProvider(   $urlRouterProvider,   $urlMatcherFactory) {
                    *
                    * @param {object=} params A map of the parameters that will be sent to the state, 
                    * will populate $stateParams. Any parameters that are not specified will be inherited from currently 
              -     * defined parameters. This allows, for example, going to a sibling state that shares parameters
              +     * defined parameters. Only parameters specified in the state definition can be overridden, new 
              +     * parameters will be ignored. This allows, for example, going to a sibling state that shares parameters
                    * specified in a parent state. Parameter inheritance only works between common ancestor states, I.e.
                    * transitioning to a sibling will get you the parameters for all parents, transitioning to a child
                    * will get you all current parameters, etc.
              @@ -3044,9 +3082,10 @@ function $StateProvider(   $urlRouterProvider,   $urlMatcherFactory) {
                    * - **`relative`** - {object=$state.$current}, When transitioning with relative path (e.g '^'), 
                    *    defines which state to be relative from.
                    * - **`notify`** - {boolean=true}, If `true` will broadcast $stateChangeStart and $stateChangeSuccess events.
              -     * - **`reload`** (v0.2.5) - {boolean=false}, If `true` will force transition even if the state or params 
              -     *    have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd
              -     *    use this when you want to force a reload when *everything* is the same, including search params.
              +     * - **`reload`** (v0.2.5) - {boolean=false|string|object}, If `true` will force transition even if no state or params
              +     *    have changed.  It will reload the resolves and views of the current state and parent states.
              +     *    If `reload` is a string (or state object), the state object is fetched (by name, or object reference); and \
              +     *    the transition reloads the resolves and views for that matched state, and all its children states.
                    *
                    * @returns {promise} A promise representing the state of the new transition.
                    *
              @@ -3184,6 +3223,7 @@ function $StateProvider(   $urlRouterProvider,   $urlMatcherFactory) {
                       if (hash) toParams['#'] = hash;
                       $state.params = toParams;
                       copy($state.params, $stateParams);
              +        copy(filterByKeys(to.params.$$keys(), $stateParams), to.locals.globals.$stateParams);
                       if (options.location && to.navigable && to.navigable.url) {
                         $urlRouter.push(to.navigable.url, toParams, {
                           $$avoidResync: true, replace: options.location === 'replace'
              @@ -3196,7 +3236,10 @@ function $StateProvider(   $urlRouterProvider,   $urlMatcherFactory) {
               
                     // Filter parameters before we pass them to event handlers etc.
                     toParams = filterByKeys(to.params.$$keys(), toParams || {});
              -
              +      
              +      // Re-add the saved hash before we start returning things or broadcasting $stateChangeStart
              +      if (hash) toParams['#'] = hash;
              +      
                     // Broadcast start event and cancel the transition if requested
                     if (options.notify) {
                       /**
              @@ -3226,9 +3269,10 @@ function $StateProvider(   $urlRouterProvider,   $urlMatcherFactory) {
                        * })
                        * 
              */ - if ($rootScope.$broadcast('$stateChangeStart', to.self, toParams, from.self, fromParams).defaultPrevented) { + if ($rootScope.$broadcast('$stateChangeStart', to.self, toParams, from.self, fromParams, options).defaultPrevented) { $rootScope.$broadcast('$stateChangeCancel', to.self, toParams, from.self, fromParams); - $urlRouter.update(); + //Don't update and resync url if there's been a new transition started. see issue #2238, #600 + if ($state.transition == null) $urlRouter.update(); return TransitionPrevented; } } @@ -3274,9 +3318,6 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) { } } - // Re-add the saved hash before we start returning things - if (hash) toParams['#'] = hash; - // Run it again, to catch any transitions in callbacks if ($state.transition !== transition) return TransitionSuperseded; @@ -3610,7 +3651,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) { } angular.module('ui.router.state') - .value('$stateParams', {}) + .factory('$stateParams', function () { return {}; }) .provider('$state', $StateProvider); @@ -3651,32 +3692,6 @@ function $ViewProvider() { if (options.view) { result = $templateFactory.fromConfig(options.view, options.params, options.locals); } - if (result && options.notify) { - /** - * @ngdoc event - * @name ui.router.state.$state#$viewContentLoading - * @eventOf ui.router.state.$view - * @eventType broadcast on root scope - * @description - * - * Fired once the view **begins loading**, *before* the DOM is rendered. - * - * @param {Object} event Event object. - * @param {Object} viewConfig The view config properties (template, controller, etc). - * - * @example - * - *
              -         * $scope.$on('$viewContentLoading',
              -         * function(event, viewConfig){
              -         *     // Access to all the view config properties.
              -         *     // and one special property 'targetView'
              -         *     // viewConfig.targetView
              -         * });
              -         * 
              - */ - $rootScope.$broadcast('$viewContentLoading', options); - } return result; } }; @@ -3738,6 +3753,8 @@ function $ViewScrollProvider() { angular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider); +var ngMajorVer = angular.version.major; +var ngMinorVer = angular.version.minor; /** * @ngdoc directive * @name ui.router.state.directive:ui-view @@ -3762,6 +3779,9 @@ angular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider) * service, {@link ui.router.state.$uiViewScroll}. This custom service let's you * scroll ui-view elements into view when they are populated during a state activation. * + * @param {string=} noanimation If truthy, the non-animated renderer will be selected (no animations + * will be applied to the ui-view) + * * *Note: To revert back to old [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) * functionality, call `$uiViewScrollProvider.useAnchorScroll()`.* * @@ -3873,26 +3893,44 @@ function $ViewDirective( $state, $injector, $uiViewScroll, $interpolate) // Returns a set of DOM manipulation functions based on which Angular version // it should use function getRenderer(attrs, scope) { - var statics = function() { - return { - enter: function (element, target, cb) { target.after(element); cb(); }, - leave: function (element, cb) { element.remove(); cb(); } - }; + var statics = { + enter: function (element, target, cb) { target.after(element); cb(); }, + leave: function (element, cb) { element.remove(); cb(); } }; + if (!!attrs.noanimation) return statics; + + function animEnabled(element) { + if (ngMajorVer === 1 && ngMinorVer >= 4) return !!$animate.enabled(element); + if (ngMajorVer === 1 && ngMinorVer >= 2) return !!$animate.enabled(); + return (!!$animator); + } + + // ng 1.2+ if ($animate) { return { enter: function(element, target, cb) { - var promise = $animate.enter(element, null, target, cb); - if (promise && promise.then) promise.then(cb); + if (!animEnabled(element)) { + statics.enter(element, target, cb); + } else if (angular.version.minor > 2) { + $animate.enter(element, null, target).then(cb); + } else { + $animate.enter(element, null, target, cb); + } }, leave: function(element, cb) { - var promise = $animate.leave(element, cb); - if (promise && promise.then) promise.then(cb); + if (!animEnabled(element)) { + statics.leave(element, cb); + } else if (angular.version.minor > 2) { + $animate.leave(element).then(cb); + } else { + $animate.leave(element, cb); + } } }; } + // ng 1.1.5 if ($animator) { var animate = $animator && $animator(scope, attrs); @@ -3902,7 +3940,7 @@ function $ViewDirective( $state, $injector, $uiViewScroll, $interpolate) }; } - return statics(); + return statics; } var directive = { @@ -3920,31 +3958,41 @@ function $ViewDirective( $state, $injector, $uiViewScroll, $interpolate) scope.$on('$stateChangeSuccess', function() { updateView(false); }); - scope.$on('$viewContentLoading', function() { - updateView(false); - }); updateView(true); function cleanupLastView() { - if (previousEl) { - previousEl.remove(); - previousEl = null; + var _previousEl = previousEl; + var _currentScope = currentScope; + + if (_currentScope) { + _currentScope._willBeDestroyed = true; } - if (currentScope) { - currentScope.$destroy(); - currentScope = null; + function cleanOld() { + if (_previousEl) { + _previousEl.remove(); + } + + if (_currentScope) { + _currentScope.$destroy(); + } } if (currentEl) { renderer.leave(currentEl, function() { + cleanOld(); previousEl = null; }); previousEl = currentEl; - currentEl = null; + } else { + cleanOld(); + previousEl = null; } + + currentEl = null; + currentScope = null; } function updateView(firstTime) { @@ -3952,10 +4000,24 @@ function $ViewDirective( $state, $injector, $uiViewScroll, $interpolate) name = getUiViewName(scope, attrs, $element, $interpolate), previousLocals = name && $state.$current && $state.$current.locals[name]; - if (!firstTime && previousLocals === latestLocals) return; // nothing to do + if (!firstTime && previousLocals === latestLocals || scope._willBeDestroyed) return; // nothing to do newScope = scope.$new(); latestLocals = $state.$current.locals[name]; + /** + * @ngdoc event + * @name ui.router.state.directive:ui-view#$viewContentLoading + * @eventOf ui.router.state.directive:ui-view + * @eventType emits on ui-view directive scope + * @description + * + * Fired once the view **begins loading**, *before* the DOM is rendered. + * + * @param {Object} event Event object. + * @param {string} viewName Name of the view. + */ + newScope.$emit('$viewContentLoading', name); + var clone = $transclude(newScope, function(clone) { renderer.enter(clone, $element, function onUiViewEnter() { if(currentScope) { @@ -3976,12 +4038,13 @@ function $ViewDirective( $state, $injector, $uiViewScroll, $interpolate) * @name ui.router.state.directive:ui-view#$viewContentLoaded * @eventOf ui.router.state.directive:ui-view * @eventType emits on ui-view directive scope - * @description * + * @description * Fired once the view is **loaded**, *after* the DOM is rendered. * * @param {Object} event Event object. + * @param {string} viewName Name of the view. */ - currentScope.$emit('$viewContentLoaded'); + currentScope.$emit('$viewContentLoaded', name); currentScope.$eval(onloadExp); } }; @@ -4058,6 +4121,43 @@ function stateContext(el) { } } +function getTypeInfo(el) { + // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute. + var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]'; + var isForm = el[0].nodeName === "FORM"; + + return { + attr: isForm ? "action" : (isSvg ? 'xlink:href' : 'href'), + isAnchor: el.prop("tagName").toUpperCase() === "A", + clickable: !isForm + }; +} + +function clickHook(el, $state, $timeout, type, current) { + return function(e) { + var button = e.which || e.button, target = current(); + + if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) { + // HACK: This is to allow ng-clicks to be processed before the transition is initiated: + var transition = $timeout(function() { + $state.go(target.state, target.params, target.options); + }); + e.preventDefault(); + + // if the state has no URL, ignore one preventDefault from the directive. + var ignorePreventDefaultCount = type.isAnchor && !target.href ? 1: 0; + + e.preventDefault = function() { + if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition); + }; + } + }; +} + +function defaultOpts(el, $state) { + return { relative: stateContext(el) || $state.$current, inherit: true }; +} + /** * @ngdoc directive * @name ui.router.state.directive:ui-sref @@ -4068,17 +4168,17 @@ function stateContext(el) { * @restrict A * * @description - * A directive that binds a link (`` tag) to a state. If the state has an associated - * URL, the directive will automatically generate & update the `href` attribute via - * the {@link ui.router.state.$state#methods_href $state.href()} method. Clicking - * the link will trigger a state transition with optional parameters. + * A directive that binds a link (`` tag) to a state. If the state has an associated + * URL, the directive will automatically generate & update the `href` attribute via + * the {@link ui.router.state.$state#methods_href $state.href()} method. Clicking + * the link will trigger a state transition with optional parameters. * - * Also middle-clicking, right-clicking, and ctrl-clicking on the link will be + * Also middle-clicking, right-clicking, and ctrl-clicking on the link will be * handled natively by the browser. * - * You can also use relative state paths within ui-sref, just like the relative + * You can also use relative state paths within ui-sref, just like the relative * paths passed to `$state.go()`. You just need to be aware that the path is relative - * to the state that the link lives in, in other words the state that loaded the + * to the state that the link lives in, in other words the state that loaded the * template containing the link. * * You can specify options to pass to {@link ui.router.state.$state#go $state.go()} @@ -4086,22 +4186,22 @@ function stateContext(el) { * and `reload`. * * @example - * Here's an example of how you'd use ui-sref and how it would compile. If you have the + * Here's an example of how you'd use ui-sref and how it would compile. If you have the * following template: *
                * Home | About | Next page
              - * 
              + *
                * 
                * 
              - * + * * Then the compiled html would be (assuming Html5Mode is off and current state is contacts): *
                * Home | About | Next page
              - * 
              + *
                * 
                * 
              + * + * It is also possible to pass ui-sref-active an expression that evaluates + * to an object hash, whose keys represent active class names and whose + * values represent the respective state names/globs. + * ui-sref-active will match if the current active state **includes** any of + * the specified state names/globs, even the abstract ones. + * + * @Example + * Given the following template, with "admin" being an abstract state: + *
              + * 
              + * 
              + * + * When the current state is "admin.roles" the "active" class will be applied + * to both the
              and elements. It is important to note that the state + * names/globs passed to ui-sref-active shadow the state provided by ui-sref. */ /** @@ -4272,53 +4395,98 @@ $StateRefActiveDirective.$inject = ['$state', '$stateParams', '$interpolate']; function $StateRefActiveDirective($state, $stateParams, $interpolate) { return { restrict: "A", - controller: ['$scope', '$element', '$attrs', function ($scope, $element, $attrs) { - var states = [], activeClass; + controller: ['$scope', '$element', '$attrs', '$timeout', function ($scope, $element, $attrs, $timeout) { + var states = [], activeClasses = {}, activeEqClass, uiSrefActive; // There probably isn't much point in $observing this // uiSrefActive and uiSrefActiveEq share the same directive object with some // slight difference in logic routing - activeClass = $interpolate($attrs.uiSrefActiveEq || $attrs.uiSrefActive || '', false)($scope); - - // Allow uiSref to communicate with uiSrefActive[Equals] - this.$$addStateInfo = function (newState, newParams) { - var state = $state.get(newState, stateContext($element)); + activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope); - states.push({ - state: state || { name: newState }, - params: newParams + try { + uiSrefActive = $scope.$eval($attrs.uiSrefActive); + } catch (e) { + // Do nothing. uiSrefActive is not a valid expression. + // Fall back to using $interpolate below + } + uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope); + if (isObject(uiSrefActive)) { + forEach(uiSrefActive, function(stateOrName, activeClass) { + if (isString(stateOrName)) { + var ref = parseStateRef(stateOrName, $state.current.name); + addState(ref.state, $scope.$eval(ref.paramExpr), activeClass); + } }); + } + // Allow uiSref to communicate with uiSrefActive[Equals] + this.$$addStateInfo = function (newState, newParams) { + // we already got an explicit state provided by ui-sref-active, so we + // shadow the one that comes from ui-sref + if (isObject(uiSrefActive) && states.length > 0) { + return; + } + addState(newState, newParams, uiSrefActive); update(); }; $scope.$on('$stateChangeSuccess', update); - // Update route state - function update() { - if (anyMatch()) { - $element.addClass(activeClass); - } else { - $element.removeClass(activeClass); + function addState(stateName, stateParams, activeClass) { + var state = $state.get(stateName, stateContext($element)); + var stateHash = createStateHash(stateName, stateParams); + + states.push({ + state: state || { name: stateName }, + params: stateParams, + hash: stateHash + }); + + activeClasses[stateHash] = activeClass; + } + + /** + * @param {string} state + * @param {Object|string} [params] + * @return {string} + */ + function createStateHash(state, params) { + if (!isString(state)) { + throw new Error('state should be a string'); + } + if (isObject(params)) { + return state + toJson(params); } + params = $scope.$eval(params); + if (isObject(params)) { + return state + toJson(params); + } + return state; } - function anyMatch() { + // Update route state + function update() { for (var i = 0; i < states.length; i++) { - if (isMatch(states[i].state, states[i].params)) { - return true; + if (anyMatch(states[i].state, states[i].params)) { + addClass($element, activeClasses[states[i].hash]); + } else { + removeClass($element, activeClasses[states[i].hash]); } - } - return false; - } - function isMatch(state, params) { - if (typeof $attrs.uiSrefActiveEq !== 'undefined') { - return $state.is(state.name, params); - } else { - return $state.includes(state.name, params); + if (exactMatch(states[i].state, states[i].params)) { + addClass($element, activeEqClass); + } else { + removeClass($element, activeEqClass); + } } } + + function addClass(el, className) { $timeout(function () { el.addClass(className); }); } + function removeClass(el, className) { el.removeClass(className); } + function anyMatch(state, params) { return $state.includes(state.name, params); } + function exactMatch(state, params) { return $state.is(state.name, params); } + + update(); }] }; } @@ -4326,7 +4494,8 @@ function $StateRefActiveDirective($state, $stateParams, $interpolate) { angular.module('ui.router.state') .directive('uiSref', $StateRefDirective) .directive('uiSrefActive', $StateRefActiveDirective) - .directive('uiSrefActiveEq', $StateRefActiveDirective); + .directive('uiSrefActiveEq', $StateRefActiveDirective) + .directive('uiState', $StateRefDynamicDirective); /** * @ngdoc filter @@ -4339,8 +4508,8 @@ angular.module('ui.router.state') */ $IsStateFilter.$inject = ['$state']; function $IsStateFilter($state) { - var isFilter = function (state) { - return $state.is(state); + var isFilter = function (state, params) { + return $state.is(state, params); }; isFilter.$stateful = true; return isFilter; @@ -4357,8 +4526,8 @@ function $IsStateFilter($state) { */ $IncludedByStateFilter.$inject = ['$state']; function $IncludedByStateFilter($state) { - var includesFilter = function (state) { - return $state.includes(state); + var includesFilter = function (state, params, options) { + return $state.includes(state, params, options); }; includesFilter.$stateful = true; return includesFilter; diff --git a/public/bower_components/angular-xeditable/xeditable.css b/public/bower_components/angular-xeditable/xeditable.css index 6e9b19f..8919a90 100644 --- a/public/bower_components/angular-xeditable/xeditable.css +++ b/public/bower_components/angular-xeditable/xeditable.css @@ -1,7 +1,116 @@ -/*! -angular-xeditable - 0.1.9 -Edit-in-place for angular.js -Build date: 2015-03-26 -*/ -.editable-wrap{display:inline-block;white-space:nowrap;margin:0}.editable-wrap .editable-controls,.editable-wrap .editable-error{margin-bottom:0}.editable-wrap .editable-controls>input,.editable-wrap .editable-controls>select,.editable-wrap .editable-controls>textarea{margin-bottom:0}.editable-wrap .editable-input{display:inline-block}.editable-buttons{display:inline-block;vertical-align:top}.editable-buttons button{margin-left:5px}.editable-input.editable-has-buttons{width:auto}.editable-bstime .editable-input input[type=text]{width:46px}.editable-bstime .well-small{margin-bottom:0;padding:10px}.editable-range output{display:inline-block;min-width:30px;vertical-align:top;text-align:center}.editable-color input[type=color]{width:50px}.editable-checkbox label span,.editable-checklist label span,.editable-radiolist label span{margin-left:7px;margin-right:10px}.editable-hide{display:none!important}.editable-click,a.editable-click{text-decoration:none;color:#428bca;border-bottom:dashed 1px #428bca}.editable-click:hover,a.editable-click:hover{text-decoration:none;color:#2a6496;border-bottom-color:#2a6496}.editable-empty,.editable-empty:hover,.editable-empty:focus,a.editable-empty,a.editable-empty:hover,a.editable-empty:focus{font-style:italic;color:#D14;text-decoration:none} \ No newline at end of file +/* ==== editable-form ==== */ + +/* class for single editable element */ +.editable-wrap { + display: inline-block; + white-space: nowrap; + margin: 0; +} + +/* remove bottom-margin for bootstrap */ +.editable-wrap .editable-controls, +.editable-wrap .editable-error { + margin-bottom: 0; +} + +/* remove bottom-margin of inputs */ +.editable-wrap .editable-controls > input, +.editable-wrap .editable-controls > select, +.editable-wrap .editable-controls > textarea { + margin-bottom: 0; +} + +/* keep buttons on the same line */ +.editable-wrap .editable-input { + display: inline-block; +} + +.editable-buttons { + display: inline-block; + vertical-align: top; +} + +.editable-buttons button { + margin-left: 5px; +} + +/* in bootstrap width: 100% => buttons go outside the box */ +.editable-input.editable-has-buttons { + width: auto; +} + +/* ==== editable-bstime ==== */ + +/* workaround for bootstrap that sets width: 100% and inputs become too wide */ +.editable-bstime .editable-input input[type="text"] { + width: 46px; +} + +/* less padding for .well */ +.editable-bstime .well-small { + margin-bottom: 0; + padding: 10px; +} + +/* ==== editable-range ==== */ + +.editable-range output { + display: inline-block; + min-width: 30px; + vertical-align: top; + text-align: center; +} + +/* ==== editable-color ==== */ + +.editable-color input[type="color"] { + width: 50px; +} + + +/* ==== editable-checkbox ==== */ +/* ==== editable-checklist ==== */ +/* ==== editable-radiolist ==== */ + +.editable-checkbox label span, +.editable-checklist label span, +.editable-radiolist label span { + margin-left: 7px; + margin-right: 10px; +} + +/* ==== element ==== */ + +/* hiding element */ +.editable-hide { + display: none !important; +} + +.editable-click, +a.editable-click { + text-decoration: none; + color: #428bca; + border-bottom: dashed 1px #428bca; +} + +.editable-click:hover, +a.editable-click:hover { + text-decoration: none; + color: #2a6496; + border-bottom-color: #2a6496; +} + +/* editable-empty */ +.editable-empty, +.editable-empty:hover, +.editable-empty:focus, +a.editable-empty, +a.editable-empty:hover, +a.editable-empty:focus { + font-style: italic; + color: #DD1144; + text-decoration: none; +} + + diff --git a/public/bower_components/angular-xeditable/xeditable.js b/public/bower_components/angular-xeditable/xeditable.js index cde698b..c6e1378 100644 --- a/public/bower_components/angular-xeditable/xeditable.js +++ b/public/bower_components/angular-xeditable/xeditable.js @@ -1,7 +1,7 @@ /*! -angular-xeditable - 0.1.9 +angular-xeditable - 0.1.10 Edit-in-place for angular.js -Build date: 2015-03-26 +Build date: 2016-02-16 */ /** * Angular-xeditable module @@ -228,9 +228,20 @@ angular.module('xeditable').directive('editableCombodate', ['editableDirectiveFa inputTpl: '', render: function() { this.parent.render.call(this); - var combodate = editableCombodate.getInstance(this.inputEl, {value: new Date(this.scope.$data)}); + var options = { + value: new Date(this.scope.$data) + }; var self = this; + angular.forEach(["format", "template", "minYear", "maxYear", "yearDescending", "minuteStep", "secondStep", "firstItem", "errorClass", "customClass", "roundTime", "smartDays"], function(name) { + + var attrName = "e" + name.charAt(0).toUpperCase() + name.slice(1); + if (attrName in self.attrs) { + options[name] = self.attrs[attrName]; + } + }); + + var combodate = editableCombodate.getInstance(this.inputEl, options); combodate.$widget.find('select').bind('change', function(e) { self.scope.$data = (new Date(combodate.getValue())).toISOString(); }); @@ -238,6 +249,7 @@ angular.module('xeditable').directive('editableCombodate', ['editableDirectiveFa }); } ]); + /* Input types: text|email|tel|number|url|search|color|date|datetime|time|month|week */ @@ -857,7 +869,7 @@ function($parse, $compile, editableThemes, $rootScope, $document, editableContro // element wrapped by form if(ctrl[1]) { eFormCtrl = ctrl[1]; - hasForm = true; + hasForm = attrs.eSingle === undefined; } else if(attrs.eForm) { // element not wrapped by
              , but we hane `e-form` attr var getter = $parse(attrs.eForm)(scope); if(getter) { // form exists in scope (above), e.g. editable column @@ -1040,6 +1052,11 @@ angular.module('xeditable').factory('editableFormController', } }); + $rootScope.$on('closeEdit', function() { + for(var i=0; i < shown.length; i++) { + shown[i].$hide(); + } + }); var base = { $addEditable: function(editable) { @@ -1058,6 +1075,7 @@ angular.module('xeditable').factory('editableFormController', if (this.$visible) { editable.catchError(editable.show()); } + editable.catchError(editable.setWaiting(this.$waiting)); }, $removeEditable: function(editable) { diff --git a/public/bower_components/angular/angular.js b/public/bower_components/angular/angular.js index a3aee7d..62ac185 100644 --- a/public/bower_components/angular/angular.js +++ b/public/bower_components/angular/angular.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.4.8 + * @license AngularJS v1.4.9 * (c) 2010-2015 Google, Inc. http://angularjs.org * License: MIT */ @@ -57,7 +57,7 @@ function minErr(module, ErrorConstructor) { return match; }); - message += '\nhttp://errors.angularjs.org/1.4.8/' + + message += '\nhttp://errors.angularjs.org/1.4.9/' + (module ? module + '/' : '') + code; for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') { @@ -284,7 +284,8 @@ function isArrayLike(obj) { // NodeList objects (with `item` method) and // other objects with suitable length characteristics are array-like return isNumber(length) && - (length >= 0 && (length - 1) in obj || typeof obj.item == 'function'); + (length >= 0 && ((length - 1) in obj || obj instanceof Array) || typeof obj.item == 'function'); + } /** @@ -1987,7 +1988,7 @@ function setupModuleLoader(window) { * unspecified then the module is being retrieved for further configuration. * @param {Function=} configFn Optional configuration function for the module. Same as * {@link angular.Module#config Module#config()}. - * @returns {module} new module with the {@link angular.Module} api. + * @returns {angular.Module} new module with the {@link angular.Module} api. */ return function module(name, requires, configFn) { var assertNotHasOwnProperty = function(name, context) { @@ -2344,8 +2345,10 @@ function toDebugString(obj) { $AnchorScrollProvider, $AnimateProvider, $CoreAnimateCssProvider, + $$CoreAnimateJsProvider, $$CoreAnimateQueueProvider, - $$CoreAnimateRunnerProvider, + $$AnimateRunnerFactoryProvider, + $$AnimateAsyncRunFactoryProvider, $BrowserProvider, $CacheFactoryProvider, $ControllerProvider, @@ -2398,11 +2401,11 @@ function toDebugString(obj) { * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". */ var version = { - full: '1.4.8', // all of these placeholder strings will be replaced by grunt's + full: '1.4.9', // all of these placeholder strings will be replaced by grunt's major: 1, // package task minor: 4, - dot: 8, - codeName: 'ice-manipulation' + dot: 9, + codeName: 'implicit-superannuation' }; @@ -2504,8 +2507,10 @@ function publishExternalAPI(angular) { $anchorScroll: $AnchorScrollProvider, $animate: $AnimateProvider, $animateCss: $CoreAnimateCssProvider, + $$animateJs: $$CoreAnimateJsProvider, $$animateQueue: $$CoreAnimateQueueProvider, - $$AnimateRunner: $$CoreAnimateRunnerProvider, + $$AnimateRunner: $$AnimateRunnerFactoryProvider, + $$animateAsyncRun: $$AnimateAsyncRunFactoryProvider, $browser: $BrowserProvider, $cacheFactory: $CacheFactoryProvider, $controller: $ControllerProvider, @@ -2576,16 +2581,22 @@ function publishExternalAPI(angular) { * * If jQuery is available, `angular.element` is an alias for the * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element` - * delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite." + * delegates to Angular's built-in subset of jQuery, called "jQuery lite" or **jqLite**. + * + * jqLite is a tiny, API-compatible subset of jQuery that allows + * Angular to manipulate the DOM in a cross-browser compatible way. jqLite implements only the most + * commonly needed functionality with the goal of having a very small footprint. * - *
              jqLite is a tiny, API-compatible subset of jQuery that allows - * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most - * commonly needed functionality with the goal of having a very small footprint.
              + * To use `jQuery`, simply ensure it is loaded before the `angular.js` file. You can also use the + * {@link ngJq `ngJq`} directive to specify that jqlite should be used over jQuery, or to use a + * specific version of jQuery if multiple versions exist on the page. * - * To use `jQuery`, simply ensure it is loaded before the `angular.js` file. + *
              **Note:** All element references in Angular are always wrapped with jQuery or + * jqLite (such as the element argument in a directive's compile / link function). They are never raw DOM references.
              * - *
              **Note:** all element references in Angular are always wrapped with jQuery or - * jqLite; they are never raw DOM references.
              + *
              **Note:** Keep in mind that this function will not find elements + * by tag name / CSS selector. For lookups by tag name, try instead `angular.element(document).find(...)` + * or `$document.find()`, or use the standard DOM APIs, e.g. `document.querySelectorAll()`.
              * * ## Angular's jqLite * jqLite provides only the following jQuery methods: @@ -2598,7 +2609,8 @@ function publishExternalAPI(angular) { * - [`children()`](http://api.jquery.com/children/) - Does not support selectors * - [`clone()`](http://api.jquery.com/clone/) * - [`contents()`](http://api.jquery.com/contents/) - * - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`. As a setter, does not convert numbers to strings or append 'px'. + * - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`. + * As a setter, does not convert numbers to strings or append 'px', and also does not have automatic property prefixing. * - [`data()`](http://api.jquery.com/data/) * - [`detach()`](http://api.jquery.com/detach/) * - [`empty()`](http://api.jquery.com/empty/) @@ -4285,7 +4297,7 @@ function annotate(fn, strictDi, name) { * @description * * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator - * intercepts the creation of a service, allowing it to override or modify the behaviour of the + * intercepts the creation of a service, allowing it to override or modify the behavior of the * service. The object returned by the decorator may be the original service, or a new service * object which replaces or wraps and delegates to the original service. * @@ -4871,27 +4883,8 @@ function prepareAnimateOptions(options) { : {}; } -var $$CoreAnimateRunnerProvider = function() { - this.$get = ['$q', '$$rAF', function($q, $$rAF) { - function AnimateRunner() {} - AnimateRunner.all = noop; - AnimateRunner.chain = noop; - AnimateRunner.prototype = { - end: noop, - cancel: noop, - resume: noop, - pause: noop, - complete: noop, - then: function(pass, fail) { - return $q(function(resolve) { - $$rAF(function() { - resolve(); - }); - }).then(pass, fail); - } - }; - return AnimateRunner; - }]; +var $$CoreAnimateJsProvider = function() { + this.$get = function() {}; }; // this is prefixed with Core since it conflicts with @@ -4919,7 +4912,12 @@ var $$CoreAnimateQueueProvider = function() { addRemoveClassesPostDigest(element, options.addClass, options.removeClass); } - return new $$AnimateRunner(); // jshint ignore:line + var runner = new $$AnimateRunner(); // jshint ignore:line + + // since there are no animations to run the runner needs to be + // notified that the animation call is complete. + runner.complete(); + return runner; } }; @@ -5384,10 +5382,23 @@ var $AnimateProvider = ['$provide', function($provide) { * @kind function * * @description Performs an inline animation on the element which applies the provided to and from CSS styles to the element. - * If any detected CSS transition, keyframe or JavaScript matches the provided className value then the animation will take - * on the provided styles. For example, if a transition animation is set for the given className then the provided from and - * to styles will be applied alongside the given transition. If a JavaScript animation is detected then the provided styles - * will be given in as function paramters into the `animate` method (or as apart of the `options` parameter). + * If any detected CSS transition, keyframe or JavaScript matches the provided className value, then the animation will take + * on the provided styles. For example, if a transition animation is set for the given className, then the provided `from` and + * `to` styles will be applied alongside the given transition. If the CSS style provided in `from` does not have a corresponding + * style in `to`, the style in `from` is applied immediately, and no animation is run. + * If a JavaScript animation is detected then the provided styles will be given in as function parameters into the `animate` + * method (or as part of the `options` parameter): + * + * ```js + * ngModule.animation('.my-inline-animation', function() { + * return { + * animate : function(element, from, to, done, options) { + * //animation + * done(); + * } + * } + * }); + * ``` * * @param {DOMElement} element the element which the CSS styles will be applied to * @param {object} from the from (starting) CSS styles that will be applied to the element and across the animation. @@ -5412,6 +5423,190 @@ var $AnimateProvider = ['$provide', function($provide) { }]; }]; +var $$AnimateAsyncRunFactoryProvider = function() { + this.$get = ['$$rAF', function($$rAF) { + var waitQueue = []; + + function waitForTick(fn) { + waitQueue.push(fn); + if (waitQueue.length > 1) return; + $$rAF(function() { + for (var i = 0; i < waitQueue.length; i++) { + waitQueue[i](); + } + waitQueue = []; + }); + } + + return function() { + var passed = false; + waitForTick(function() { + passed = true; + }); + return function(callback) { + passed ? callback() : waitForTick(callback); + }; + }; + }]; +}; + +var $$AnimateRunnerFactoryProvider = function() { + this.$get = ['$q', '$sniffer', '$$animateAsyncRun', '$document', '$timeout', + function($q, $sniffer, $$animateAsyncRun, $document, $timeout) { + + var INITIAL_STATE = 0; + var DONE_PENDING_STATE = 1; + var DONE_COMPLETE_STATE = 2; + + AnimateRunner.chain = function(chain, callback) { + var index = 0; + + next(); + function next() { + if (index === chain.length) { + callback(true); + return; + } + + chain[index](function(response) { + if (response === false) { + callback(false); + return; + } + index++; + next(); + }); + } + }; + + AnimateRunner.all = function(runners, callback) { + var count = 0; + var status = true; + forEach(runners, function(runner) { + runner.done(onProgress); + }); + + function onProgress(response) { + status = status && response; + if (++count === runners.length) { + callback(status); + } + } + }; + + function AnimateRunner(host) { + this.setHost(host); + + var rafTick = $$animateAsyncRun(); + var timeoutTick = function(fn) { + $timeout(fn, 0, false); + }; + + this._doneCallbacks = []; + this._tick = function(fn) { + var doc = $document[0]; + + // the document may not be ready or attached + // to the module for some internal tests + if (doc && doc.hidden) { + timeoutTick(fn); + } else { + rafTick(fn); + } + }; + this._state = 0; + } + + AnimateRunner.prototype = { + setHost: function(host) { + this.host = host || {}; + }, + + done: function(fn) { + if (this._state === DONE_COMPLETE_STATE) { + fn(); + } else { + this._doneCallbacks.push(fn); + } + }, + + progress: noop, + + getPromise: function() { + if (!this.promise) { + var self = this; + this.promise = $q(function(resolve, reject) { + self.done(function(status) { + status === false ? reject() : resolve(); + }); + }); + } + return this.promise; + }, + + then: function(resolveHandler, rejectHandler) { + return this.getPromise().then(resolveHandler, rejectHandler); + }, + + 'catch': function(handler) { + return this.getPromise()['catch'](handler); + }, + + 'finally': function(handler) { + return this.getPromise()['finally'](handler); + }, + + pause: function() { + if (this.host.pause) { + this.host.pause(); + } + }, + + resume: function() { + if (this.host.resume) { + this.host.resume(); + } + }, + + end: function() { + if (this.host.end) { + this.host.end(); + } + this._resolve(true); + }, + + cancel: function() { + if (this.host.cancel) { + this.host.cancel(); + } + this._resolve(false); + }, + + complete: function(response) { + var self = this; + if (self._state === INITIAL_STATE) { + self._state = DONE_PENDING_STATE; + self._tick(function() { + self._resolve(response); + }); + } + }, + + _resolve: function(response) { + if (this._state !== DONE_COMPLETE_STATE) { + forEach(this._doneCallbacks, function(fn) { + fn(response); + }); + this._doneCallbacks.length = 0; + this._state = DONE_COMPLETE_STATE; + } + } + }; + + return AnimateRunner; + }]; +}; + /** * @ngdoc service * @name $animateCss @@ -5424,37 +5619,18 @@ var $AnimateProvider = ['$provide', function($provide) { * Click here {@link ngAnimate.$animateCss to read the documentation for $animateCss}. */ var $CoreAnimateCssProvider = function() { - this.$get = ['$$rAF', '$q', function($$rAF, $q) { + this.$get = ['$$rAF', '$q', '$$AnimateRunner', function($$rAF, $q, $$AnimateRunner) { - var RAFPromise = function() {}; - RAFPromise.prototype = { - done: function(cancel) { - this.defer && this.defer[cancel === true ? 'reject' : 'resolve'](); - }, - end: function() { - this.done(); - }, - cancel: function() { - this.done(true); - }, - getPromise: function() { - if (!this.defer) { - this.defer = $q.defer(); - } - return this.defer.promise; - }, - then: function(f1,f2) { - return this.getPromise().then(f1,f2); - }, - 'catch': function(f1) { - return this.getPromise()['catch'](f1); - }, - 'finally': function(f1) { - return this.getPromise()['finally'](f1); + return function(element, initialOptions) { + // all of the animation functions should create + // a copy of the options data, however, if a + // parent service has already created a copy then + // we should stick to using that + var options = initialOptions || {}; + if (!options.$$prepared) { + options = copy(options); } - }; - return function(element, options) { // there is no point in applying the styles since // there is no animation that goes on at all in // this version of $animateCss. @@ -5467,7 +5643,8 @@ var $CoreAnimateCssProvider = function() { options.from = null; } - var closed, runner = new RAFPromise(); + /* jshint newcap: false*/ + var closed, runner = new $$AnimateRunner(); return { start: run, end: run @@ -5475,16 +5652,16 @@ var $CoreAnimateCssProvider = function() { function run() { $$rAF(function() { - close(); + applyAnimationContents(); if (!closed) { - runner.done(); + runner.complete(); } closed = true; }); return runner; } - function close() { + function applyAnimationContents() { if (options.addClass) { element.addClass(options.addClass); options.addClass = null; @@ -6476,10 +6653,23 @@ function $TemplateCacheProvider() { * * * #### `bindToController` - * When an isolate scope is used for a component (see above), and `controllerAs` is used, `bindToController: true` will + * This property is used to bind scope properties directly to the controller. It can be either + * `true` or an object hash with the same format as the `scope` property. Additionally, a controller + * alias must be set, either by using `controllerAs: 'myAlias'` or by specifying the alias in the controller + * definition: `controller: 'myCtrl as myAlias'`. + * + * When an isolate scope is used for a directive (see above), `bindToController: true` will * allow a component to have its properties bound to the controller, rather than to scope. When the controller * is instantiated, the initial values of the isolate scope bindings are already available. * + * It is also possible to set `bindToController` to an object hash with the same format as the `scope` property. + * This will set up the scope bindings to the controller directly. Note that `scope` can still be used + * to define which kind of scope is created. By default, no scope is created. Use `scope: {}` to create an isolate + * scope (useful for component directives). + * + * If both `bindToController` and `scope` are defined and have object hashes, `bindToController` overrides `scope`. + * + * * #### `controller` * Controller constructor function. The controller is instantiated before the * pre-linking phase and can be accessed by other directives (see @@ -6815,19 +7005,19 @@ function $TemplateCacheProvider() { * * The `$parent` scope hierarchy will look like this: * - * ``` - * - $rootScope - * - isolate - * - transclusion - * ``` + ``` + - $rootScope + - isolate + - transclusion + ``` * * but the scopes will inherit prototypically from different scopes to their `$parent`. * - * ``` - * - $rootScope - * - transclusion - * - isolate - * ``` + ``` + - $rootScope + - transclusion + - isolate + ``` * * * ### Attributes @@ -6959,8 +7149,15 @@ function $TemplateCacheProvider() { * directives; if given, it will be passed through to the link functions of * directives found in `element` during compilation. * * `transcludeControllers` - an object hash with keys that map controller names - * to controller instances; if given, it will make the controllers - * available to directives. + * to a hash with the key `instance`, which maps to the controller instance; + * if given, it will make the controllers available to directives on the compileNode: + * ``` + * { + * parent: { + * instance: parentControllerInstance + * } + * } + * ``` * * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add * the cloned elements; only needed for transcludes that are allowed to contain non html * elements (e.g. SVG elements). See also the directive.controller property. @@ -7249,9 +7446,9 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { this.$get = [ '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse', - '$controller', '$rootScope', '$document', '$sce', '$animate', '$$sanitizeUri', + '$controller', '$rootScope', '$sce', '$animate', '$$sanitizeUri', function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse, - $controller, $rootScope, $document, $sce, $animate, $$sanitizeUri) { + $controller, $rootScope, $sce, $animate, $$sanitizeUri) { var Attributes = function(element, attributesToCopy) { if (attributesToCopy) { @@ -7463,7 +7660,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { * @param {string} key Normalized key. (ie ngAttribute) . * @param {function(interpolatedValue)} fn Function that will be called whenever the interpolated value of the attribute changes. - * See the {@link guide/directive#text-and-attribute-bindings Directives} guide for more info. + * See the {@link guide/interpolation#how-text-and-attribute-bindings-work Interpolation + * guide} for more info. * @returns {function()} Returns a deregistration function for this observer. */ $observe: function(key, fn) { @@ -9047,7 +9245,7 @@ function removeComments(jqNodes) { var $controllerMinErr = minErr('$controller'); -var CNTRL_REG = /^(\S+)(\s+as\s+(\w+))?$/; +var CNTRL_REG = /^(\S+)(\s+as\s+([\w$]+))?$/; function identifierForController(controller, ident) { if (ident && isString(ident)) return ident; if (isString(controller)) { @@ -10235,6 +10433,10 @@ function $HttpProvider() { throw minErr('$http')('badreq', 'Http request configuration must be an object. Received: {0}', requestConfig); } + if (!isString(requestConfig.url)) { + throw minErr('$http')('badreq', 'Http request configuration url must be a string. Received: {0}', requestConfig.url); + } + var config = extend({ method: 'get', transformRequest: defaults.transformRequest, @@ -10847,7 +11049,7 @@ $interpolateMinErr.interr = function(text, err) { * Used for configuring the interpolation markup. Defaults to `{{` and `}}`. * * @example - + -
              +
              //demo.label//
              @@ -13599,7 +13801,7 @@ ASTCompiler.prototype = { right = this.nextId(); left = {}; if (!isAssignable(ast.left)) { - throw $parseMinErr('lval', 'Trying to assing a value to a non l-value'); + throw $parseMinErr('lval', 'Trying to assign a value to a non l-value'); } this.recurse(ast.left, undefined, left, function() { self.if_(self.notNull(left.context), function() { @@ -14190,9 +14392,6 @@ Parser.prototype = { } }; -var getterFnCacheDefault = createMap(); -var getterFnCacheExpensive = createMap(); - function isPossiblyDangerousMemberName(name) { return name == 'constructor'; } @@ -14305,7 +14504,7 @@ function $ParseProvider() { return addInterceptor(exp, interceptorFn); default: - return noop; + return addInterceptor(noop, interceptorFn); } }; @@ -16460,6 +16659,21 @@ function $RootScopeProvider() { } /** + * @ngdoc service + * @name $rootElement + * + * @description + * The root element of Angular application. This is either the element where {@link + * ng.directive:ngApp ngApp} was declared or the element passed into + * {@link angular.bootstrap}. The element represents the root element of application. It is also the + * location where the application's {@link auto.$injector $injector} service gets + * published, and can be retrieved using `$rootElement.injector()`. + */ + + +// the implementation is in angular.bootstrap + +/** * @description * Private service to sanitize uris for links and images. Used by $compile and $sanitize. */ @@ -17896,8 +18110,8 @@ function $TimeoutProvider() { * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block. * @param {...*=} Pass additional parameters to the executed function. - * @returns {Promise} Promise that will be resolved when the timeout is reached. The value this - * promise will be resolved with is the return value of the `fn` function. + * @returns {Promise} Promise that will be resolved when the timeout is reached. The promise + * will be resolved with the return value of the `fn` function. * */ function timeout(fn, delay, invokeApply) { @@ -18573,6 +18787,10 @@ function getTypeForFilter(val) { return (val === null) ? 'null' : typeof val; } +var MAX_DIGITS = 22; +var DECIMAL_SEP = '.'; +var ZERO_CHAR = '0'; + /** * @ngdoc filter * @name currency @@ -18662,7 +18880,7 @@ function currencyFilter($locale) { * @param {(number|string)=} fractionSize Number of decimal places to round the number to. * If this is not provided then the fraction size is computed from the current locale's number * formatting pattern. In the case of the default locale, it will be 3. - * @returns {string} Number rounded to decimalPlaces and places a “,” after each third digit. + * @returns {string} Number rounded to fractionSize and places a “,” after each third digit. * * @example @@ -18697,8 +18915,6 @@ function currencyFilter($locale) { */ - - numberFilter.$inject = ['$locale']; function numberFilter($locale) { var formats = $locale.NUMBER_FORMATS; @@ -18712,93 +18928,194 @@ function numberFilter($locale) { }; } -var DECIMAL_SEP = '.'; -function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) { - if (isObject(number)) return ''; +/** + * Parse a number (as a string) into three components that can be used + * for formatting the number. + * + * (Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/) + * + * @param {string} numStr The number to parse + * @return {object} An object describing this number, containing the following keys: + * - d : an array of digits containing leading zeros as necessary + * - i : the number of the digits in `d` that are to the left of the decimal point + * - e : the exponent for numbers that would need more than `MAX_DIGITS` digits in `d` + * + */ +function parse(numStr) { + var exponent = 0, digits, numberOfIntegerDigits; + var i, j, zeros; - var isNegative = number < 0; - number = Math.abs(number); + // Decimal point? + if ((numberOfIntegerDigits = numStr.indexOf(DECIMAL_SEP)) > -1) { + numStr = numStr.replace(DECIMAL_SEP, ''); + } - var isInfinity = number === Infinity; - if (!isInfinity && !isFinite(number)) return ''; + // Exponential form? + if ((i = numStr.search(/e/i)) > 0) { + // Work out the exponent. + if (numberOfIntegerDigits < 0) numberOfIntegerDigits = i; + numberOfIntegerDigits += +numStr.slice(i + 1); + numStr = numStr.substring(0, i); + } else if (numberOfIntegerDigits < 0) { + // There was no decimal point or exponent so it is an integer. + numberOfIntegerDigits = numStr.length; + } - var numStr = number + '', - formatedText = '', - hasExponent = false, - parts = []; + // Count the number of leading zeros. + for (i = 0; numStr.charAt(i) == ZERO_CHAR; i++); - if (isInfinity) formatedText = '\u221e'; + if (i == (zeros = numStr.length)) { + // The digits are all zero. + digits = [0]; + numberOfIntegerDigits = 1; + } else { + // Count the number of trailing zeros + zeros--; + while (numStr.charAt(zeros) == ZERO_CHAR) zeros--; - if (!isInfinity && numStr.indexOf('e') !== -1) { - var match = numStr.match(/([\d\.]+)e(-?)(\d+)/); - if (match && match[2] == '-' && match[3] > fractionSize + 1) { - number = 0; - } else { - formatedText = numStr; - hasExponent = true; + // Trailing zeros are insignificant so ignore them + numberOfIntegerDigits -= i; + digits = []; + // Convert string to array of digits without leading/trailing zeros. + for (j = 0; i <= zeros; i++, j++) { + digits[j] = +numStr.charAt(i); } } - if (!isInfinity && !hasExponent) { - var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length; + // If the number overflows the maximum allowed digits then use an exponent. + if (numberOfIntegerDigits > MAX_DIGITS) { + digits = digits.splice(0, MAX_DIGITS - 1); + exponent = numberOfIntegerDigits - 1; + numberOfIntegerDigits = 1; + } + + return { d: digits, e: exponent, i: numberOfIntegerDigits }; +} - // determine fractionSize if it is not specified - if (isUndefined(fractionSize)) { - fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac); +/** + * Round the parsed number to the specified number of decimal places + * This function changed the parsedNumber in-place + */ +function roundNumber(parsedNumber, fractionSize, minFrac, maxFrac) { + var digits = parsedNumber.d; + var fractionLen = digits.length - parsedNumber.i; + + // determine fractionSize if it is not specified; `+fractionSize` converts it to a number + fractionSize = (isUndefined(fractionSize)) ? Math.min(Math.max(minFrac, fractionLen), maxFrac) : +fractionSize; + + // The index of the digit to where rounding is to occur + var roundAt = fractionSize + parsedNumber.i; + var digit = digits[roundAt]; + + if (roundAt > 0) { + digits.splice(roundAt); + } else { + // We rounded to zero so reset the parsedNumber + parsedNumber.i = 1; + digits.length = roundAt = fractionSize + 1; + for (var i=0; i < roundAt; i++) digits[i] = 0; } - // safely round numbers in JS without hitting imprecisions of floating-point arithmetics - // inspired by: - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round - number = +(Math.round(+(number.toString() + 'e' + fractionSize)).toString() + 'e' + -fractionSize); + if (digit >= 5) digits[roundAt - 1]++; - var fraction = ('' + number).split(DECIMAL_SEP); - var whole = fraction[0]; - fraction = fraction[1] || ''; + // Pad out with zeros to get the required fraction length + for (; fractionLen < fractionSize; fractionLen++) digits.push(0); - var i, pos = 0, - lgroup = pattern.lgSize, - group = pattern.gSize; - if (whole.length >= (lgroup + group)) { - pos = whole.length - lgroup; - for (i = 0; i < pos; i++) { - if ((pos - i) % group === 0 && i !== 0) { - formatedText += groupSep; - } - formatedText += whole.charAt(i); - } + // Do any carrying, e.g. a digit was rounded up to 10 + var carry = digits.reduceRight(function(carry, d, i, digits) { + d = d + carry; + digits[i] = d % 10; + return Math.floor(d / 10); + }, 0); + if (carry) { + digits.unshift(carry); + parsedNumber.i++; } +} - for (i = pos; i < whole.length; i++) { - if ((whole.length - i) % lgroup === 0 && i !== 0) { - formatedText += groupSep; - } - formatedText += whole.charAt(i); +/** + * Format a number into a string + * @param {number} number The number to format + * @param {{ + * minFrac, // the minimum number of digits required in the fraction part of the number + * maxFrac, // the maximum number of digits required in the fraction part of the number + * gSize, // number of digits in each group of separated digits + * lgSize, // number of digits in the last group of digits before the decimal separator + * negPre, // the string to go in front of a negative number (e.g. `-` or `(`)) + * posPre, // the string to go in front of a positive number + * negSuf, // the string to go after a negative number (e.g. `)`) + * posSuf // the string to go after a positive number + * }} pattern + * @param {string} groupSep The string to separate groups of number (e.g. `,`) + * @param {string} decimalSep The string to act as the decimal separator (e.g. `.`) + * @param {[type]} fractionSize The size of the fractional part of the number + * @return {string} The number formatted as a string + */ +function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) { + + if (!(isString(number) || isNumber(number)) || isNaN(number)) return ''; + + var isInfinity = !isFinite(number); + var isZero = false; + var numStr = Math.abs(number) + '', + formattedText = '', + parsedNumber; + + if (isInfinity) { + formattedText = '\u221e'; + } else { + parsedNumber = parse(numStr); + + roundNumber(parsedNumber, fractionSize, pattern.minFrac, pattern.maxFrac); + + var digits = parsedNumber.d; + var integerLen = parsedNumber.i; + var exponent = parsedNumber.e; + var decimals = []; + isZero = digits.reduce(function(isZero, d) { return isZero && !d; }, true); + + // pad zeros for small numbers + while (integerLen < 0) { + digits.unshift(0); + integerLen++; } - // format fraction part. - while (fraction.length < fractionSize) { - fraction += '0'; + // extract decimals digits + if (integerLen > 0) { + decimals = digits.splice(integerLen); + } else { + decimals = digits; + digits = [0]; } - if (fractionSize && fractionSize !== "0") formatedText += decimalSep + fraction.substr(0, fractionSize); - } else { - if (fractionSize > 0 && number < 1) { - formatedText = number.toFixed(fractionSize); - number = parseFloat(formatedText); - formatedText = formatedText.replace(DECIMAL_SEP, decimalSep); + // format the integer digits with grouping separators + var groups = []; + if (digits.length > pattern.lgSize) { + groups.unshift(digits.splice(-pattern.lgSize).join('')); } - } + while (digits.length > pattern.gSize) { + groups.unshift(digits.splice(-pattern.gSize).join('')); + } + if (digits.length) { + groups.unshift(digits.join('')); + } + formattedText = groups.join(groupSep); - if (number === 0) { - isNegative = false; - } + // append the decimal digits + if (decimals.length) { + formattedText += decimalSep + decimals.join(''); + } - parts.push(isNegative ? pattern.negPre : pattern.posPre, - formatedText, - isNegative ? pattern.negSuf : pattern.posSuf); - return parts.join(''); + if (exponent) { + formattedText += 'e+' + exponent; + } + } + if (number < 0 && !isZero) { + return pattern.negPre + formattedText + pattern.negSuf; + } else { + return pattern.posPre + formattedText + pattern.posSuf; + } } function padNumber(num, digits, trim) { @@ -18808,7 +19125,7 @@ function padNumber(num, digits, trim) { num = -num; } num = '' + num; - while (num.length < digits) num = '0' + num; + while (num.length < digits) num = ZERO_CHAR + num; if (trim) { num = num.substr(num.length - digits); } @@ -19319,17 +19636,6 @@ function limitToFilter() { * `reverse` is not set, which means it defaults to `false`. -
              @@ -19345,6 +19651,17 @@ function limitToFilter() {
              + + angular.module('orderByExample', []) + .controller('ExampleController', ['$scope', function($scope) { + $scope.friends = + [{name:'John', phone:'555-1212', age:10}, + {name:'Mary', phone:'555-9876', age:19}, + {name:'Mike', phone:'555-4321', age:21}, + {name:'Adam', phone:'555-5678', age:35}, + {name:'Julie', phone:'555-8765', age:29}]; + }]); +
              * * The predicate and reverse parameters can be controlled dynamically through scope properties, @@ -19352,49 +19669,24 @@ function limitToFilter() { * @example - -
              Sorting predicate = {{predicate}}; reverse = {{reverse}}

              - [
              unsorted ] + - - - + + + @@ -19404,6 +19696,31 @@ function limitToFilter() {
              - Name - - - Phone Number - - - Age - - + + + + + + + + +
              {{friend.name}}
              + + angular.module('orderByExample', []) + .controller('ExampleController', ['$scope', function($scope) { + $scope.friends = + [{name:'John', phone:'555-1212', age:10}, + {name:'Mary', phone:'555-9876', age:19}, + {name:'Mike', phone:'555-4321', age:21}, + {name:'Adam', phone:'555-5678', age:35}, + {name:'Julie', phone:'555-8765', age:29}]; + $scope.predicate = 'age'; + $scope.reverse = true; + $scope.order = function(predicate) { + $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false; + $scope.predicate = predicate; + }; + }]); + + + .sortorder:after { + content: '\25b2'; + } + .sortorder.reverse:after { + content: '\25bc'; + } + * * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the @@ -19415,21 +19732,30 @@ function limitToFilter() { * @example -
              - - - - - - - - - - - -
              Name - (^)Phone NumberAge
              {{friend.name}}{{friend.phone}}{{friend.age}}
              -
              +
              +
              Sorting predicate = {{predicate}}; reverse = {{reverse}}
              + + + + + + + + + + + +
              + + + + + + + + +
              {{friend.name}}{{friend.phone}}{{friend.age}}
              +
              @@ -19443,12 +19769,23 @@ function limitToFilter() { { name: 'Adam', phone: '555-5678', age: 35 }, { name: 'Julie', phone: '555-8765', age: 29 } ]; - $scope.order = function(predicate, reverse) { - $scope.friends = orderBy($scope.friends, predicate, reverse); + $scope.order = function(predicate) { + $scope.predicate = predicate; + $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false; + $scope.friends = orderBy($scope.friends, predicate, $scope.reverse); }; - $scope.order('-age',false); + $scope.order('age', true); }]); + + + .sortorder:after { + content: '\25b2'; + } + .sortorder.reverse:after { + content: '\25bc'; + } +
              */ orderByFilter.$inject = ['$parse']; @@ -19778,20 +20115,7 @@ var htmlAnchorDirective = valueFn({ * {@link guide/expression expression} inside `ngDisabled` evaluates to truthy. * * A special directive is necessary because we cannot use interpolation inside the `disabled` - * attribute. The following example would make the button enabled on Chrome/Firefox - * but not on older IEs: - * - * ```html - * - *
              - * - *
              - * ``` - * - * This is because the HTML specification does not require browsers to preserve the values of - * boolean attributes such as `disabled` (Their presence means true and their absence means false.) - * If we put an Angular interpolation expression into such an attribute then the - * binding information would be lost when the browser removes the attribute. + * attribute. See the {@link guide/interpolation interpolation guide} for more info. * * @example @@ -19826,15 +20150,9 @@ var htmlAnchorDirective = valueFn({ * Note that this directive should not be used together with {@link ngModel `ngModel`}, * as this can lead to unexpected behavior. * - * ### Why do we need `ngChecked`? + * A special directive is necessary because we cannot use interpolation inside the `checked` + * attribute. See the {@link guide/interpolation interpolation guide} for more info. * - * The HTML specification does not require browsers to preserve the values of boolean attributes - * such as checked. (Their presence means true and their absence means false.) - * If we put an Angular interpolation expression into such an attribute then the - * binding information would be lost when the browser removes the attribute. - * The `ngChecked` directive solves this problem for the `checked` attribute. - * This complementary directive is not removed by the browser and so provides - * a permanent reliable place to store the binding information. * @example @@ -19863,13 +20181,12 @@ var htmlAnchorDirective = valueFn({ * @priority 100 * * @description - * The HTML specification does not require browsers to preserve the values of boolean attributes - * such as readonly. (Their presence means true and their absence means false.) - * If we put an Angular interpolation expression into such an attribute then the - * binding information would be lost when the browser removes the attribute. - * The `ngReadonly` directive solves this problem for the `readonly` attribute. - * This complementary directive is not removed by the browser and so provides - * a permanent reliable place to store the binding information. + * + * Sets the `readOnly` attribute on the element, if the expression inside `ngReadonly` is truthy. + * + * A special directive is necessary because we cannot use interpolation inside the `readOnly` + * attribute. See the {@link guide/interpolation interpolation guide} for more info. + * * @example @@ -19898,13 +20215,11 @@ var htmlAnchorDirective = valueFn({ * @priority 100 * * @description - * The HTML specification does not require browsers to preserve the values of boolean attributes - * such as selected. (Their presence means true and their absence means false.) - * If we put an Angular interpolation expression into such an attribute then the - * binding information would be lost when the browser removes the attribute. - * The `ngSelected` directive solves this problem for the `selected` attribute. - * This complementary directive is not removed by the browser and so provides - * a permanent reliable place to store the binding information. + * + * Sets the `selected` attribute on the element, if the expression inside `ngSelected` is truthy. + * + * A special directive is necessary because we cannot use interpolation inside the `selected` + * attribute. See the {@link guide/interpolation interpolation guide} for more info. * * @example @@ -19936,13 +20251,12 @@ var htmlAnchorDirective = valueFn({ * @priority 100 * * @description - * The HTML specification does not require browsers to preserve the values of boolean attributes - * such as open. (Their presence means true and their absence means false.) - * If we put an Angular interpolation expression into such an attribute then the - * binding information would be lost when the browser removes the attribute. - * The `ngOpen` directive solves this problem for the `open` attribute. - * This complementary directive is not removed by the browser and so provides - * a permanent reliable place to store the binding information. + * + * Sets the `open` attribute on the element, if the expression inside `ngOpen` is truthy. + * + * A special directive is necessary because we cannot use interpolation inside the `open` + * attribute. See the {@link guide/interpolation interpolation guide} for more info. + * * @example @@ -20398,13 +20712,9 @@ function FormController(element, attrs, $scope, $animate, $interpolate) { * * In Angular, forms can be nested. This means that the outer form is valid when all of the child * forms are valid as well. However, browsers do not allow nesting of `` elements, so - * Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to - * `` but can be nested. This allows you to have nested forms, which is very useful when - * using Angular validation directives in forms that are dynamically generated using the - * {@link ng.directive:ngRepeat `ngRepeat`} directive. Since you cannot dynamically generate the `name` - * attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an - * `ngForm` directive and nest these in an outer `form` element. - * + * Angular provides the {@link ng.directive:ngForm `ngForm`} directive, which behaves identically to + * `form` but can be nested. Nested forms can be useful, for example, if the validity of a sub-group + * of controls needs to be determined. * * # CSS classes * - `ng-valid` is set if the form is valid. @@ -20625,7 +20935,18 @@ var ngFormDirective = formDirectiveFactory(true); // Regex code is obtained from SO: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231 var ISO_DATE_REGEXP = /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/; // See valid URLs in RFC3987 (http://tools.ietf.org/html/rfc3987) -var URL_REGEXP = /^[A-Za-z][A-Za-z\d.+-]*:\/*(?:\w+(?::\w+)?@)?[^\s/]+(?::\d+)?(?:\/[\w#!:.?+=&%@\-/]*)?$/; +// Note: We are being more lenient, because browsers are too. +// 1. Scheme +// 2. Slashes +// 3. Username +// 4. Password +// 5. Hostname +// 6. Port +// 7. Path +// 8. Query +// 9. Fragment +// 1111111111111111 222 333333 44444 555555555555555555555555 666 77777777 8888888 999 +var URL_REGEXP = /^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i; var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i; var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/; var DATE_REGEXP = /^(\d{4})-(\d{2})-(\d{2})$/; @@ -24389,6 +24710,8 @@ var ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate', //set the 2nd param to true to ignore the template request error so that the inner //contents and scope can be cleaned up. $templateRequest(src, true).then(function(response) { + if (scope.$$destroyed) return; + if (thisChangeId !== changeCounter) return; var newScope = scope.$new(); ctrl.template = response; @@ -24410,6 +24733,8 @@ var ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate', currentScope.$emit('$includeContentLoaded', src); scope.$eval(onloadExp); }, function() { + if (scope.$$destroyed) return; + if (thisChangeId === changeCounter) { cleanupLastIncludeContent(); scope.$emit('$includeContentError', src); @@ -25088,11 +25413,14 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$ * which may be caused by a pending debounced event or because the input is waiting for a some * future event. * - * If you have an input that uses `ng-model-options` to set up debounced events or events such - * as blur you can have a situation where there is a period when the `$viewValue` - * is out of synch with the ngModel's `$modelValue`. + * If you have an input that uses `ng-model-options` to set up debounced updates or updates that + * depend on special events such as blur, you can have a situation where there is a period when + * the `$viewValue` is out of sync with the ngModel's `$modelValue`. + * + * In this case, you can use `$rollbackViewValue()` to manually cancel the debounced / future update + * and reset the input to the last committed view value. * - * In this case, you can run into difficulties if you try to update the ngModel's `$modelValue` + * It is also possible that you run into difficulties if you try to update the ngModel's `$modelValue` * programmatically before these debounced/future events have resolved/occurred, because Angular's * dirty checking mechanism is not able to tell whether the model has actually changed or not. * @@ -25105,39 +25433,63 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$ * angular.module('cancel-update-example', []) * * .controller('CancelUpdateController', ['$scope', function($scope) { - * $scope.resetWithCancel = function(e) { - * if (e.keyCode == 27) { - * $scope.myForm.myInput1.$rollbackViewValue(); - * $scope.myValue = ''; - * } - * }; - * $scope.resetWithoutCancel = function(e) { + * $scope.model = {}; + * + * $scope.setEmpty = function(e, value, rollback) { * if (e.keyCode == 27) { - * $scope.myValue = ''; + * e.preventDefault(); + * if (rollback) { + * $scope.myForm[value].$rollbackViewValue(); + * } + * $scope.model[value] = ''; * } * }; * }]); * * *
              - *

              Try typing something in each input. See that the model only updates when you - * blur off the input. - *

              - *

              Now see what happens if you start typing then press the Escape key

              + *

              Both of these inputs are only updated if they are blurred. Hitting escape should + * empty them. Follow these steps and observe the difference:

              + *
                + *
              1. Type something in the input. You will see that the model is not yet updated
              2. + *
              3. Press the Escape key. + *
                  + *
                1. In the first example, nothing happens, because the model is already '', and no + * update is detected. If you blur the input, the model will be set to the current view. + *
                2. + *
                3. In the second example, the pending update is cancelled, and the input is set back + * to the last committed view value (''). Blurring the input does nothing. + *
                4. + *
                + *
              4. + *
              * * - *

              With $rollbackViewValue()

              - *
              - * myValue: "{{ myValue }}" - * - *

              Without $rollbackViewValue()

              - *
              - * myValue: "{{ myValue }}" + *
              + *

              Without $rollbackViewValue():

              + * + * value1: "{{ model.value1 }}" + *
              + * + *
              + *

              With $rollbackViewValue():

              + * + * value2: "{{ model.value2 }}" + *
              * *
              *
              + + div { + display: table-cell; + } + div:nth-child(1) { + padding-right: 30px; + } + + *
              */ this.$rollbackViewValue = function() { @@ -25251,7 +25603,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$ forEach(ctrl.$asyncValidators, function(validator, name) { var promise = validator(modelValue, viewValue); if (!isPromiseLike(promise)) { - throw ngModelMinErr("$asyncValidators", + throw ngModelMinErr('nopromise', "Expected asynchronous validator to return a promise but got '{0}' instead.", promise); } setValidity(name, undefined); @@ -26697,7 +27049,7 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) { (current === emptyOption_ || current === unknownOption_ || current.nodeType === NODE_TYPE_COMMENT || - current.value === '')) { + (nodeName_(current) === 'option' && current.value === ''))) { current = current.nextSibling; } } @@ -26787,7 +27139,8 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) { // Check to see if the value has changed due to the update to the options if (!ngModelCtrl.$isEmpty(previousValue)) { var nextValue = selectCtrl.readValue(); - if (ngOptions.trackBy ? !equals(previousValue, nextValue) : previousValue !== nextValue) { + var isNotPrimitive = ngOptions.trackBy || multiple; + if (isNotPrimitive ? !equals(previousValue, nextValue) : previousValue !== nextValue) { ngModelCtrl.$setViewValue(nextValue); ngModelCtrl.$render(); } @@ -28456,7 +28809,7 @@ var SelectController = * * The `select` directive is used together with {@link ngModel `ngModel`} to provide data-binding * between the scope and the `` menu is selected, the value of the selected option will be bound @@ -28658,7 +29011,8 @@ var selectDirective = function() { controller: SelectController, priority: 1, link: { - pre: selectPreLink + pre: selectPreLink, + post: selectPostLink } }; @@ -28672,13 +29026,6 @@ var selectDirective = function() { selectCtrl.ngModelCtrl = ngModelCtrl; - // We delegate rendering to the `writeValue` method, which can be changed - // if the select can have multiple selected values or if the options are being - // generated by `ngOptions` - ngModelCtrl.$render = function() { - selectCtrl.writeValue(ngModelCtrl.$viewValue); - }; - // When the selected item(s) changes we delegate getting the value of the select control // to the `readValue` method, which can be changed if the select can have multiple // selected values or if the options are being generated by `ngOptions` @@ -28732,6 +29079,23 @@ var selectDirective = function() { } } + + function selectPostLink(scope, element, attrs, ctrls) { + // if ngModel is not defined, we don't need to do anything + var ngModelCtrl = ctrls[1]; + if (!ngModelCtrl) return; + + var selectCtrl = ctrls[0]; + + // We delegate rendering to the `writeValue` method, which can be changed + // if the select can have multiple selected values or if the options are being + // generated by `ngOptions`. + // This must be done in the postLink fn to prevent $render to be called before + // all nodes have been linked correctly. + ngModelCtrl.$render = function() { + selectCtrl.writeValue(ngModelCtrl.$viewValue); + }; + } }; @@ -28778,6 +29142,64 @@ var styleDirective = valueFn({ terminal: false }); +/** + * @ngdoc directive + * @name ngRequired + * + * @description + * + * ngRequired adds the required {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. + * It is most often used for {@link input `input`} and {@link select `select`} controls, but can also be + * applied to custom controls. + * + * The directive sets the `required` attribute on the element if the Angular expression inside + * `ngRequired` evaluates to true. A special directive for setting `required` is necessary because we + * cannot use interpolation inside `required`. See the {@link guide/interpolation interpolation guide} + * for more info. + * + * The validator will set the `required` error key to true if the `required` attribute is set and + * calling {@link ngModel.NgModelController#$isEmpty `NgModelController.$isEmpty` with the + * {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} returns `true`. For example, the + * `$isEmpty()` implementation for `input[text]` checks the length of the `$viewValue`. When developing + * custom controls, `$isEmpty()` can be overwritten to account for a $viewValue that is not string-based. + * + * @example + * + * + * + *
              + *
              + * + * + *
              + * + *
              + *
              + * required error set? = {{form.input.$error.required}}
              + * model = {{model}} + *
              + *
              + *
              + * + var required = element(by.binding('form.input.$error.required')); + var model = element(by.binding('model')); + var input = element(by.id('input')); + + it('should set the required error', function() { + expect(required.getText()).toContain('true'); + + input.sendKeys('123'); + expect(required.getText()).not.toContain('true'); + expect(model.getText()).toContain('123'); + }); + * + *
              + */ var requiredDirective = function() { return { restrict: 'A', @@ -28797,7 +29219,81 @@ var requiredDirective = function() { }; }; +/** + * @ngdoc directive + * @name ngPattern + * + * @description + * + * ngPattern adds the pattern {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. + * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls. + * + * The validator sets the `pattern` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} + * does not match a RegExp which is obtained by evaluating the Angular expression given in the + * `ngPattern` attribute value: + * * If the expression evaluates to a RegExp object, then this is used directly. + * * If the expression evaluates to a string, then it will be converted to a RegExp after wrapping it + * in `^` and `$` characters. For instance, `"abc"` will be converted to `new RegExp('^abc$')`. + * + *
              + * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to + * start at the index of the last search's match, thus not taking the whole input value into + * account. + *
              + * + *
              + * **Note:** This directive is also added when the plain `pattern` attribute is used, with two + * differences: + *
                + *
              1. + * `ngPattern` does not set the `pattern` attribute and therefore HTML5 constraint validation is + * not available. + *
              2. + *
              3. + * The `ngPattern` attribute must be an expression, while the `pattern` value must be + * interpolated. + *
              4. + *
              + *
              + * + * @example + * + * + * + *
              + *
              + * + * + *
              + * + *
              + *
              + * input valid? = {{form.input.$valid}}
              + * model = {{model}} + *
              + *
              + *
              + * + var model = element(by.binding('model')); + var input = element(by.id('input')); + + it('should validate the input with the default pattern', function() { + input.sendKeys('aaa'); + expect(model.getText()).not.toContain('aaa'); + input.clear().then(function() { + input.sendKeys('123'); + expect(model.getText()).toContain('123'); + }); + }); + * + *
              + */ var patternDirective = function() { return { restrict: 'A', @@ -28829,7 +29325,72 @@ var patternDirective = function() { }; }; +/** + * @ngdoc directive + * @name ngMaxlength + * + * @description + * + * ngMaxlength adds the maxlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. + * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls. + * + * The validator sets the `maxlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} + * is longer than the integer obtained by evaluating the Angular expression given in the + * `ngMaxlength` attribute value. + * + *
              + * **Note:** This directive is also added when the plain `maxlength` attribute is used, with two + * differences: + *
                + *
              1. + * `ngMaxlength` does not set the `maxlength` attribute and therefore HTML5 constraint + * validation is not available. + *
              2. + *
              3. + * The `ngMaxlength` attribute must be an expression, while the `maxlength` value must be + * interpolated. + *
              4. + *
              + *
              + * + * @example + * + * + * + *
              + *
              + * + * + *
              + * + *
              + *
              + * input valid? = {{form.input.$valid}}
              + * model = {{model}} + *
              + *
              + *
              + * + var model = element(by.binding('model')); + var input = element(by.id('input')); + + it('should validate the input with the default maxlength', function() { + input.sendKeys('abcdef'); + expect(model.getText()).not.toContain('abcdef'); + input.clear().then(function() { + input.sendKeys('abcde'); + expect(model.getText()).toContain('abcde'); + }); + }); + * + *
              + */ var maxlengthDirective = function() { return { restrict: 'A', @@ -28850,6 +29411,70 @@ var maxlengthDirective = function() { }; }; +/** + * @ngdoc directive + * @name ngMinlength + * + * @description + * + * ngMinlength adds the minlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. + * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls. + * + * The validator sets the `minlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} + * is shorter than the integer obtained by evaluating the Angular expression given in the + * `ngMinlength` attribute value. + * + *
              + * **Note:** This directive is also added when the plain `minlength` attribute is used, with two + * differences: + *
                + *
              1. + * `ngMinlength` does not set the `minlength` attribute and therefore HTML5 constraint + * validation is not available. + *
              2. + *
              3. + * The `ngMinlength` value must be an expression, while the `minlength` value must be + * interpolated. + *
              4. + *
              + *
              + * + * @example + * + * + * + *
              + *
              + * + * + *
              + * + *
              + *
              + * input valid? = {{form.input.$valid}}
              + * model = {{model}} + *
              + *
              + *
              + * + var model = element(by.binding('model')); + var input = element(by.id('input')); + + it('should validate the input with the default minlength', function() { + input.sendKeys('ab'); + expect(model.getText()).not.toContain('ab'); + + input.sendKeys('abc'); + expect(model.getText()).toContain('abc'); + }); + * + *
              + */ var minlengthDirective = function() { return { restrict: 'A', @@ -28962,6 +29587,20 @@ $provide.value("$locale", { "Nov", "Dec" ], + "STANDALONEMONTH": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], "WEEKENDRANGE": [ 5, 6 diff --git a/public/bower_components/es5-shim/es5-shim.js b/public/bower_components/es5-shim/es5-shim.js index d2c0ad0..bd53d0a 100644 --- a/public/bower_components/es5-shim/es5-shim.js +++ b/public/bower_components/es5-shim/es5-shim.js @@ -1512,7 +1512,7 @@ if ( } else { array_push.call(output, strSlice(string, lastLastIndex)); } - return output.length > splitLimit ? strSlice(output, 0, splitLimit) : output; + return output.length > splitLimit ? arraySlice(output, 0, splitLimit) : output; }; }()); diff --git a/public/bower_components/jquery.actual/jquery.actual.js b/public/bower_components/jquery.actual/jquery.actual.js index a4455d5..b6ddb80 100644 --- a/public/bower_components/jquery.actual/jquery.actual.js +++ b/public/bower_components/jquery.actual/jquery.actual.js @@ -1,7 +1,7 @@ /*! Copyright 2012, Ben Lin (http://dreamerslab.com/) * Licensed under the MIT License (LICENSE.txt). * - * Version: 1.0.16 + * Version: 1.0.18 * * Requires: jQuery >= 1.2.3 */ diff --git a/public/bower_components/lodash/.bower.json b/public/bower_components/lodash/.bower.json index 7381731..f6a4b84 100644 --- a/public/bower_components/lodash/.bower.json +++ b/public/bower_components/lodash/.bower.json @@ -1,15 +1,14 @@ { "name": "lodash", "homepage": "https://github.com/lodash/lodash", - "version": "4.5.1", - "_release": "4.5.1", + "version": "4.6.1", + "_release": "4.6.1", "_resolution": { "type": "version", - "tag": "4.5.1", - "commit": "1c1028b78ced111a320bbfb8ee8c2cf4b3d5265d" + "tag": "4.6.1", + "commit": "f5f152d28d26653e808c6bd58807bc6689660b7e" }, "_source": "git://github.com/lodash/lodash.git", "_target": "^4.5.1", - "_originalSource": "lodash", - "_direct": true + "_originalSource": "lodash" } \ No newline at end of file diff --git a/public/bower_components/lodash/.github/CONTRIBUTING.md b/public/bower_components/lodash/.github/CONTRIBUTING.md index 2fd78f8..f95d490 100644 --- a/public/bower_components/lodash/.github/CONTRIBUTING.md +++ b/public/bower_components/lodash/.github/CONTRIBUTING.md @@ -9,10 +9,10 @@ may have already been discussed or fixed in `master`. To contribute, ## Feature Requests -Feature requests are always welcome. They should be submitted in the +Feature requests should be submitted in the [issue tracker](https://github.com/lodash/lodash/issues), with a description of the expected behavior & use case, where they’ll remain closed until sufficient -interest has been shown by the community. Before submitting a request, +interest, e.g. :+1:’s, has been shown by the community. Before submitting a request, please search for similar ones in the [closed issues](https://github.com/lodash/lodash/issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement). diff --git a/public/bower_components/lodash/.travis.yml b/public/bower_components/lodash/.travis.yml index cf36374..48bc131 100644 --- a/public/bower_components/lodash/.travis.yml +++ b/public/bower_components/lodash/.travis.yml @@ -43,7 +43,7 @@ before_install: PATTERN[3]="|\s*else\s*\{\s*assocSet\(data\b[\s\S]+?\}|" PATTERN[4]="|\s*if\s*\(ctorString\b[\s\S]+?\}\s*\}|" PATTERN[5]="|\bindex,\s*iterable\)\s*===\s*false\)[^}]+?(break;)|" - PATTERN[6]="|\s*if\s*\(!lodashFunc\)\s*\{\s*return;\s*\}|" + PATTERN[6]="|\s*if\s*\(\!lodashFunc\)\s*\{\s*return;\s*\}|" PATTERN[7]="|\s*define\([\s\S]+?\);|" PATTERN[8]="|\s*root\._\s*=\s*_;|" diff --git a/public/bower_components/lodash/CODE_OF_CONDUCT.md b/public/bower_components/lodash/CODE_OF_CONDUCT.md index ec7efa0..963fe25 100644 --- a/public/bower_components/lodash/CODE_OF_CONDUCT.md +++ b/public/bower_components/lodash/CODE_OF_CONDUCT.md @@ -1,24 +1,41 @@ -# Contributor Code of Conduct +# Contributor Covenant Code of Conduct -As contributors and maintainers of this project, and in the interest of -fostering an open and welcoming community, we pledge to respect all people who -contribute through reporting issues, posting feature requests, updating -documentation, submitting pull requests or patches, and other activities. +## Our Pledge -We are committed to making participation in this project a harassment-free -experience for everyone, regardless of level of experience, gender, gender -identity and expression, sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment -* Publishing other's private information, such as physical or electronic - addresses, without explicit permission -* Other unethical or unprofessional conduct +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions @@ -26,24 +43,32 @@ that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. -By adopting this Code of Conduct, project maintainers commit themselves to -fairly and consistently applying these principles to every aspect of managing -this project. Project maintainers who do not follow or enforce the Code of -Conduct may be permanently removed from the project team. +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. +## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting a project maintainer at -[coc@lodash.com](mailto:coc@lodash.com). All complaints will be reviewed and -investigated and will result in a response that is deemed necessary and -appropriate to the circumstances. Maintainers are obligated to maintain -confidentiality with regard to the reporter of an incident. +reported by contacting the project team at [coc@lodash.com](mailto:coc@lodash.com). +The project team will review and investigate all complaints, and will respond in +a way that it deems appropriate to the circumstances. The project team is obligated +to maintain confidentiality with regard to the reporter of an incident. Further +details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 1.3.0, available at -[http://contributor-covenant.org/version/1/3/0/][version] +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/3/0/ +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/public/bower_components/lodash/README.md b/public/bower_components/lodash/README.md index 440a09d..1581d0a 100644 --- a/public/bower_components/lodash/README.md +++ b/public/bower_components/lodash/README.md @@ -1,4 +1,4 @@ -# lodash v4.5.1 +# lodash v4.6.1 The [lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module. @@ -20,11 +20,11 @@ $ lodash core -o ./dist/lodash.core.js ## Download -Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.5.1/LICENSE) & supports [modern environments](#support).
              +Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.6.1/LICENSE) & supports [modern environments](#support).
              Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you. - * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.5.1/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.5.1/dist/lodash.core.min.js)) - * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.5.1/dist/lodash.js) ([~21 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.5.1/dist/lodash.min.js)) + * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.6.1/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.6.1/dist/lodash.core.min.js)) + * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.6.1/dist/lodash.js) ([~21 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.6.1/dist/lodash.min.js)) * [CDN copies](https://www.jsdelivr.com/projects/lodash) ## Why Lodash? @@ -43,10 +43,10 @@ Lodash is available in a [variety of builds](https://lodash.com/custom-builds) & * [lodash](https://www.npmjs.com/package/lodash) & [per method packages](https://www.npmjs.com/browse/keyword/lodash-modularized) * [lodash-amd](https://www.npmjs.com/package/lodash-amd) * [lodash-es](https://www.npmjs.com/package/lodash-es) & [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash) - * [lodash/fp](https://github.com/lodash/lodash/tree/4.5.1-npm/fp) + * [lodash/fp](https://github.com/lodash/lodash/tree/4.6.1-npm/fp) ## Further Reading - * [Contributing](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md) + * [Contributing](https://github.com/lodash/lodash/blob/4.6.1/.github/CONTRIBUTING.md) * [Release Notes](https://github.com/lodash/lodash/releases/tag/4.0.0) * [Wiki (Changelog, Roadmap, etc.)](https://github.com/lodash/lodash/wiki) diff --git a/public/bower_components/lodash/dist/lodash.core.js b/public/bower_components/lodash/dist/lodash.core.js index 2c541fb..d8ba4fd 100644 --- a/public/bower_components/lodash/dist/lodash.core.js +++ b/public/bower_components/lodash/dist/lodash.core.js @@ -1,6 +1,6 @@ /** * @license - * lodash 4.5.1 (Custom Build) + * lodash 4.6.1 (Custom Build) * Build: `lodash core -o ./dist/lodash.core.js` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -13,7 +13,10 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.5.1'; + var VERSION = '4.6.1'; + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; /** Used to compose bitmasks for wrapper metadata. */ var BIND_FLAG = 1, @@ -23,9 +26,6 @@ var UNORDERED_COMPARE_FLAG = 1, PARTIAL_COMPARE_FLAG = 2; - /** Used as the `TypeError` message for "Functions" methods. */ - var FUNC_ERROR_TEXT = 'Expected a function'; - /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991; @@ -426,46 +426,48 @@ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, - * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, `difference`, - * `differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`, - * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flattenDepth`, - * `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, `functionsIn`, - * `groupBy`, `initial`, `intersection`, `intersectionBy`, `intersectionWith`, - * `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, `keys`, `keysIn`, - * `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, `memoize`, - * `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, `nthArg`, - * `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, `overEvery`, - * `overSome`, `partial`, `partialRight`, `partition`, `pick`, `pickBy`, `plant`, - * `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, `pullAt`, `push`, - * `range`, `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, - * `sampleSize`, `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, - * `splice`, `spread`, `tail`, `take`, `takeRight`, `takeRightWhile`, - * `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, `toPairs`, `toPairsIn`, - * `toPath`, `toPlainObject`, `transform`, `unary`, `union`, `unionBy`, - * `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, `unshift`, `unzip`, - * `unzipWith`, `values`, `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, - * `xorWith`, `zip`, `zipObject`, `zipObjectDeep`, and `zipWith` + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatten`, `flattenDeep`, `flattenDepth`, `flip`, `flow`, `flowRight`, + * `fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`, `intersection`, + * `intersectionBy`, `intersectionWith`, `invert`, `invertBy`, `invokeMap`, + * `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, + * `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, `method`, + * `methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, + * `over`, `overArgs`, `overEvery`, `overSome`, `partial`, `partialRight`, + * `partition`, `pick`, `pickBy`, `plant`, `property`, `propertyOf`, `pull`, + * `pullAll`, `pullAllBy`, `pullAllWith`, `pullAt`, `push`, `range`, + * `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, `sampleSize`, + * `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, + * `thru`, `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, + * `transform`, `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, + * `uniqWith`, `unset`, `unshift`, `unzip`, `unzipWith`, `update`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`, + * `zipObjectDeep`, and `zipWith` * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `endsWith`, `eq`, - * `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, - * `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`, `forIn`, - * `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, - * `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, - * `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, - * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, - * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, - * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, - * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`, - * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, - * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, - * `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`, - * `now`, `pad`, `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, - * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `sample`, - * `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, - * `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`, - * `sum`, `sumBy`, `template`, `times`, `toLower`, `toInteger`, `toLength`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `each`, `eachRight`, + * `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, `floor`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, `includes`, + * `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, `isArrayBuffer`, + * `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, `isDate`, + * `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, `isFinite`, + * `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, `isMatchWith`, + * `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, `isObject`, `isObjectLike`, + * `isPlainObject`, `isRegExp`, `isSafeInteger`, `isSet`, `isString`, + * `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, + * `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, + * `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`, `now`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toInteger`, `toJSON`, `toLength`, `toLower`, * `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, `trimEnd`, * `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, `upperFirst`, * `value`, and `words` @@ -765,44 +767,45 @@ if (!objIsArr) { objTag = objectToString.call(object); - if (objTag == argsTag) { - objTag = objectTag; - } + objTag = objTag == argsTag ? objectTag : objTag; } if (!othIsArr) { othTag = objectToString.call(other); - if (othTag == argsTag) { - othTag = objectTag; - } + othTag = othTag == argsTag ? objectTag : othTag; } var objIsObj = objTag == objectTag && !isHostObject(object), othIsObj = othTag == objectTag && !isHostObject(other), isSameTag = objTag == othTag; - if (isSameTag && !(objIsArr || objIsObj)) { - return equalByTag(object, other, objTag, equalFunc, customizer, bitmask); + stack || (stack = []); + var stacked = find(stack, function(entry) { + return entry[0] === object; + }); + if (stacked && stacked[1]) { + return stacked[1] == other; + } + stack.push([object, other]); + if (isSameTag && !objIsObj) { + var result = (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) + : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); + stack.pop(); + return result; } - var isPartial = bitmask & PARTIAL_COMPARE_FLAG; - if (!isPartial) { + if (!(bitmask & PARTIAL_COMPARE_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { - return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack); + var result = equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack); + stack.pop(); + return result; } } if (!isSameTag) { return false; } - stack || (stack = []); - var stacked = find(stack, function(entry) { - return entry[0] === object; - }); - if (stacked && stacked[1]) { - return stacked[1] == other; - } - stack.push([object, other]); - var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, bitmask, stack); + var result = equalObjects(object, other, equalFunc, customizer, bitmask, stack); stack.pop(); return result; } @@ -1205,9 +1208,9 @@ * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. - * @param {Object} [stack] Tracks traversed `array` and `other` objects. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { @@ -1263,11 +1266,12 @@ * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalByTag(object, other, tag, equalFunc, customizer, bitmask) { + function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { switch (tag) { case boolTag: @@ -1301,9 +1305,9 @@ * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { @@ -1395,7 +1399,7 @@ */ function isPrototype(value) { var Ctor = value && value.constructor, - proto = (isFunction(Ctor) && Ctor.prototype) || objectProto; + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } @@ -2452,8 +2456,7 @@ * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -2525,14 +2528,14 @@ } /** - * Checks if `value` is empty. A value is considered empty unless it's an - * `arguments` object, array, string, or jQuery-like collection with a length - * greater than `0` or an object with own enumerable properties. + * Checks if `value` is an empty collection or object. A value is considered + * empty if it's an `arguments` object, array, string, or jQuery-like collection + * with a length of `0` or has no own enumerable properties. * * @static * @memberOf _ * @category Lang - * @param {Array|Object|string} value The value to inspect. + * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is empty, else `false`. * @example * @@ -2642,8 +2645,8 @@ */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } diff --git a/public/bower_components/lodash/dist/lodash.core.min.js b/public/bower_components/lodash/dist/lodash.core.min.js index 8658b91..d6a4405 100644 --- a/public/bower_components/lodash/dist/lodash.core.min.js +++ b/public/bower_components/lodash/dist/lodash.core.min.js @@ -1,29 +1,29 @@ /** * @license - * lodash 4.5.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * lodash 4.6.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE * Build: `lodash core -o ./dist/lodash.core.js` */ ;(function(){function n(n,t){for(var r=-1,e=t.length,u=n.length;++r-1&&0==n%1&&(null==t?9007199254740991:t)>n}function a(n){if(Y(n)&&!Pn(n)){if(n instanceof l)return n;if(En.call(n,"__wrapped__")){var t=new l(n.__wrapped__,n.__chain__);return t.__actions__=N(n.__actions__),t}}return new l(n)}function l(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function p(n,t,r,e){var u;return(u=n===an)||(u=xn[r], -u=(n===u||n!==n&&u!==u)&&!En.call(e,r)),u?t:n}function s(n){return X(n)?Fn(n):{}}function h(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(an,r)},t)}function v(n,t){var r=true;return $n(n,function(n,e,u){return r=!!t(n,e,u)}),r}function y(n,t){var r=[];return $n(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function _(t,r,e,u){u||(u=[]);for(var o=-1,i=t.length;++o0&&Y(c)&&L(c)&&(e||Pn(c)||K(c))?r>1?_(c,r-1,e,u):n(u,c):e||(u[u.length]=c); -}return u}function g(n,t){return n&&qn(n,t,en)}function b(n,t){return y(t,function(t){return Q(n[t])})}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!X(n)&&!Y(t)?n!==n&&t!==t:m(n,t,j,r,e,u)}function m(n,t,r,e,u,o){var i=Pn(n),f=Pn(t),a="[object Array]",l="[object Array]";i||(a=kn.call(n),"[object Arguments]"==a&&(a="[object Object]")),f||(l=kn.call(t),"[object Arguments]"==l&&(l="[object Object]"));var p="[object Object]"==a&&!c(n),f="[object Object]"==l&&!c(t);return!(l=a==l)||i||p?2&u||(a=p&&En.call(n,"__wrapped__"), -f=f&&En.call(t,"__wrapped__"),!a&&!f)?l?(o||(o=[]),(a=J(o,function(t){return t[0]===n}))&&a[1]?a[1]==t:(o.push([n,t]),t=(i?I:q)(n,t,r,e,u,o),o.pop(),t)):false:r(a?n.value():n,f?t.value():t,e,u,o):$(n,t,a)}function d(n){var t=typeof n;return"function"==t?n:null==n?cn:("object"==t?x:A)(n)}function w(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function O(n,t){var r=-1,e=L(n)?Array(n.length):[];return $n(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function x(n){var t=en(n);return function(r){ -var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&j(n[u],r[u],an,3)))return false}return true}}function E(n,t){return n=Object(n),P(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function A(n){return function(t){return null==t?an:t[n]}}function k(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e1?r[u-1]:an,o=typeof o=="function"?(u--,o):an;for(t=Object(t);++ef))return false;for(a=true;++iarguments.length,$n)}function U(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Un(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=an),r}}function V(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");return t=In(t===an?n.length-1:Un(t),0),function(){for(var r=arguments,e=-1,u=In(r.length-t,0),o=Array(u);++et}function K(n){return Y(n)&&L(n)&&En.call(n,"callee")&&(!Rn.call(n,"callee")||"[object Arguments]"==kn.call(n))}function L(n){return null!=n&&!(typeof n=="function"&&Q(n))&&W(zn(n))}function Q(n){return n=X(n)?kn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function W(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function X(n){var t=typeof n;return!!n&&("object"==t||"function"==t); -}function Y(n){return!!n&&typeof n=="object"}function Z(n){return typeof n=="number"||Y(n)&&"[object Number]"==kn.call(n)}function nn(n){return typeof n=="string"||!Pn(n)&&Y(n)&&"[object String]"==kn.call(n)}function tn(n,t){return t>n}function rn(n){return typeof n=="string"?n:null==n?"":n+""}function en(n){var t=C(n);if(!t&&!L(n))return Dn(Object(n));var r,e=z(n),u=!!e,e=e||[],o=e.length;for(r in n)!En.call(n,r)||u&&("length"==r||f(r,o))||t&&"constructor"==r||e.push(r);return e}function un(n){for(var t=-1,r=C(n),e=w(n),u=e.length,o=z(n),i=!!o,o=o||[],c=o.length;++t"'`]/g,sn=RegExp(pn.source),hn=/^(?:0|[1-9]\d*)$/,vn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},yn={"function":true,object:true},_n=yn[typeof exports]&&exports&&!exports.nodeType?exports:an,gn=yn[typeof module]&&module&&!module.nodeType?module:an,bn=gn&&gn.exports===_n?_n:an,jn=o(yn[typeof self]&&self),mn=o(yn[typeof window]&&window),dn=o(yn[typeof this]&&this),wn=o(_n&&gn&&typeof global=="object"&&global)||mn!==(dn&&dn.window)&&mn||jn||dn||Function("return this")(),On=Array.prototype,xn=Object.prototype,En=xn.hasOwnProperty,An=0,kn=xn.toString,Nn=wn._,Sn=wn.Reflect,Tn=Sn?Sn.f:an,Fn=Object.create,Rn=xn.propertyIsEnumerable,Bn=wn.isFinite,Dn=Object.keys,In=Math.max,$n=function(n,t){ -return function(r,e){if(null==r)return r;if(!L(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++oe&&!c||!i||u&&!f&&a||o&&a){r=1;break n}if(e>r&&!u||!a||c&&!o&&i||f&&i){r=-1;break n}}r=0}return r||n.b-t.b; -}),A("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return L(n)?n.length?N(n):[]:on(n)},a.values=on,a.extend=Kn,fn(a,a),a.clone=function(n){return X(n)?Pn(n)?N(n):F(n,en(n)):n},a.escape=function(n){return(n=rn(n))&&sn.test(n)?n.replace(pn,i):n},a.every=function(n,t,r){return t=r?an:t,v(n,d(t))},a.find=J,a.forEach=M,a.has=function(n,t){return null!=n&&En.call(n,t)},a.head=G,a.identity=cn,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?In(e+r,0):r:0, -r=(r||0)-1;for(var u=t===t;++r-1&&0==n%1&&(null==t?9007199254740991:t)>n}function a(n){if(Y(n)&&!Pn(n)){if(n instanceof l)return n;if(An.call(n,"__wrapped__")){var t=new l(n.__wrapped__,n.__chain__);return t.__actions__=N(n.__actions__),t}}return new l(n)}function l(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function p(n,t,r,e){var u;return(u=n===an)||(u=xn[r], +u=(n===u||n!==n&&u!==u)&&!An.call(e,r)),u?t:n}function s(n){return X(n)?Fn(n):{}}function h(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(an,r)},t)}function v(n,t){var r=true;return $n(n,function(n,e,u){return r=!!t(n,e,u)}),r}function y(n,t){var r=[];return $n(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function _(t,r,e,u){u||(u=[]);for(var o=-1,i=t.length;++o0&&Y(c)&&L(c)&&(e||Pn(c)||K(c))?r>1?_(c,r-1,e,u):n(u,c):e||(u[u.length]=c); +}return u}function b(n,t){return n&&qn(n,t,en)}function g(n,t){return y(t,function(t){return Q(n[t])})}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!X(n)&&!Y(t)?n!==n&&t!==t:d(n,t,j,r,e,u)}function d(n,t,r,e,u,o){var i=Pn(n),f=Pn(t),a="[object Array]",l="[object Array]";i||(a=kn.call(n),a="[object Arguments]"==a?"[object Object]":a),f||(l=kn.call(t),l="[object Arguments]"==l?"[object Object]":l);var p="[object Object]"==a&&!c(n),f="[object Object]"==l&&!c(t),l=a==l;o||(o=[]);var s=J(o,function(t){ +return t[0]===n});return s&&s[1]?s[1]==t:(o.push([n,t]),l&&!p?(t=i||isTypedArray(n)?I(n,t,r,e,u,o):$(n,t,a),o.pop(),t):2&u||(i=p&&An.call(n,"__wrapped__"),a=f&&An.call(t,"__wrapped__"),!i&&!a)?l?(t=q(n,t,r,e,u,o),o.pop(),t):false:(t=r(i?n.value():n,a?t.value():t,e,u,o),o.pop(),t))}function m(n){var t=typeof n;return"function"==t?n:null==n?cn:("object"==t?x:E)(n)}function w(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function O(n,t){var r=-1,e=L(n)?Array(n.length):[];return $n(n,function(n,u,o){ +e[++r]=t(n,u,o)}),e}function x(n){var t=en(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&j(n[u],r[u],an,3)))return false}return true}}function A(n,t){return n=Object(n),P(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function E(n){return function(t){return null==t?an:t[n]}}function k(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e1?r[u-1]:an,o=typeof o=="function"?(u--,o):an;for(t=Object(t);++ef))return false;for(a=true;++iarguments.length,$n)}function U(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Un(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=an),r}}function V(n){var t;if(typeof n!="function")throw new TypeError("Expected a function"); +return t=In(t===an?n.length-1:Un(t),0),function(){for(var r=arguments,e=-1,u=In(r.length-t,0),o=Array(u);++et}function K(n){return Y(n)&&L(n)&&An.call(n,"callee")&&(!Rn.call(n,"callee")||"[object Arguments]"==kn.call(n))}function L(n){return null!=n&&W(zn(n))&&!Q(n)}function Q(n){return n=X(n)?kn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function W(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n; +}function X(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function Y(n){return!!n&&typeof n=="object"}function Z(n){return typeof n=="number"||Y(n)&&"[object Number]"==kn.call(n)}function nn(n){return typeof n=="string"||!Pn(n)&&Y(n)&&"[object String]"==kn.call(n)}function tn(n,t){return t>n}function rn(n){return typeof n=="string"?n:null==n?"":n+""}function en(n){var t=C(n);if(!t&&!L(n))return Dn(Object(n));var r,e=z(n),u=!!e,e=e||[],o=e.length;for(r in n)!An.call(n,r)||u&&("length"==r||f(r,o))||t&&"constructor"==r||e.push(r); +return e}function un(n){for(var t=-1,r=C(n),e=w(n),u=e.length,o=z(n),i=!!o,o=o||[],c=o.length;++t"'`]/g,sn=RegExp(pn.source),hn=/^(?:0|[1-9]\d*)$/,vn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},yn={"function":true,object:true},_n=yn[typeof exports]&&exports&&!exports.nodeType?exports:an,bn=yn[typeof module]&&module&&!module.nodeType?module:an,gn=bn&&bn.exports===_n?_n:an,jn=o(yn[typeof self]&&self),dn=o(yn[typeof window]&&window),mn=o(yn[typeof this]&&this),wn=o(_n&&bn&&typeof global=="object"&&global)||dn!==(mn&&mn.window)&&dn||jn||mn||Function("return this")(),On=Array.prototype,xn=Object.prototype,An=xn.hasOwnProperty,En=0,kn=xn.toString,Nn=wn._,Sn=wn.Reflect,Tn=Sn?Sn.f:an,Fn=Object.create,Rn=xn.propertyIsEnumerable,Bn=wn.isFinite,Dn=Object.keys,In=Math.max,$n=function(n,t){ +return function(r,e){if(null==r)return r;if(!L(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++oe&&!c||!i||u&&!f&&a||o&&a){r=1;break n}if(e>r&&!u||!a||c&&!o&&i||f&&i){r=-1;break n}}r=0}return r||n.b-t.b; +}),E("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return L(n)?n.length?N(n):[]:on(n)},a.values=on,a.extend=Kn,fn(a,a),a.clone=function(n){return X(n)?Pn(n)?N(n):F(n,en(n)):n},a.escape=function(n){return(n=rn(n))&&sn.test(n)?n.replace(pn,i):n},a.every=function(n,t,r){return t=r?an:t,v(n,m(t))},a.find=J,a.forEach=M,a.has=function(n,t){return null!=n&&An.call(n,t)},a.head=G,a.identity=cn,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?In(e+r,0):r:0, +r=(r||0)-1;for(var u=t===t;++r2?r-2:1,i&&r>=i?n:B(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!W(r))return t(r,Object(e));var n=[],i=[];return m(x(e),function(t){ -var a=e[t];W(a)&&(i.push(t),n.push(r.prototype[t]))}),t(r,Object(e)),m(i,function(t,e){var i=n[e];W(i)?r.prototype[t]=i:delete r.prototype[t]}),r}},runInContext:function(e){return function(r){return n(t,e(r),s)}}},L=function(t,e){t=i.aliasToReal[t]||t;var r=M[t];if(r)return r(e);var n=e;l.immutable&&(a.array[t]?n=w(e,E):a.object[t]?n=w(e,k(e)):a.set[t]&&(n=w(e,j)));var s;return m(b,function(e){return m(i.aryMethod[e],function(r){if(t==r){var a=!c&&i.iterateeAry[t],o=i.iterateeRearg[t],u=i.methodSpread[t]; -return s=n,l.fixed&&(s=void 0===u?d(s,e):I(s,u)),l.rearg&&e>1&&(f||!i.skipRearg[t])&&(s=R(s,i.methodRearg[t]||i.aryRearg[e])),l.cap&&(o?s=z(s,o):a&&(s=q(s,a))),l.curry&&e>1&&(s=g(s,e)),!1}}),!s}),s||(s=n),i.placeholder[t]&&(u=!0,e.placeholder=s.placeholder=o),s};if(!p)return L(e,r);var S=r,C=[];return m(b,function(t){m(i.aryMethod[t],function(t){var e=S[i.remap[t]||t];e&&C.push([t,L(t,e)])})}),m(C,function(t){S[t[0]]=t[1]}),u&&(S.placeholder=o),m(x(S),function(t){m(i.realToAlias[t]||[],function(e){ -S[e]=S[t]})}),S}var i=r(2),a=i.mutate,o={};t.exports=n},function(t,e){e.aliasToReal={__:"placeholder",all:"some",allPass:"overEvery",apply:"spread",assoc:"set",assocPath:"set",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",each:"forEach",eachRight:"forEachRight",equals:"isEqual",extend:"assignIn",extendWith:"assignInWith",first:"head",init:"initial",mapObj:"mapValues",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",pickAll:"pick",pipe:"flow", +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()}(this,function(){return function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function i(t,e){return n(t,t,e)}var n=r(1);"function"==typeof _&&(_=i(_.runInContext())), +t.exports=i},function(t,e,r){function i(t,e,r,u){var s,l="function"==typeof e,p=e===Object(e);if(p&&(u=r,r=e,e=void 0),null==r)throw new TypeError;u||(u={});var c={cap:"cap"in u?u.cap:!0,curry:"curry"in u?u.curry:!0,fixed:"fixed"in u?u.fixed:!0,immutable:"immutable"in u?u.immutable:!0,rearg:"rearg"in u?u.rearg:!0},h="rearg"in u&&u.rearg,f=l?r:{ary:t.ary,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isFunction:t.isFunction,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,spread:t.spread, +toPath:t.toPath},d=f.ary,y=f.clone,g=f.curry,m=f.forEach,v=f.isArray,W=f.isFunction,x=f.keys,R=f.rearg,I=f.spread,O=f.toPath,b=x(n.aryMethod),A=function(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}},B=function(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}},E=function(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r},j=function(t,e){e=O(e);for(var r=-1,i=e.length,n=y(Object(t)),a=n;null!=a&&++r2?r-2:1,n&&r>=n?i:B(i,r)):i}},mixin:function(t){return function(e){var r=this;if(!W(r))return t(r,Object(e));var i=[],n=[];return m(x(e),function(t){ +var a=e[t];W(a)&&(n.push(t),i.push(r.prototype[t]))}),t(r,Object(e)),m(n,function(t,e){var n=i[e];W(n)?r.prototype[t]=n:delete r.prototype[t]}),r}},runInContext:function(e){return function(r){return i(t,e(r),u)}}},L=function(t,e){t=n.aliasToReal[t]||t;var r=M[t];if(r)return r(e);var i=e;c.immutable&&(a.array[t]?i=w(e,E):a.object[t]?i=w(e,k(e)):a.set[t]&&(i=w(e,j)));var u;return m(b,function(e){return m(n.aryMethod[e],function(r){if(t==r){var a=!l&&n.iterateeAry[t],o=n.iterateeRearg[t],s=n.methodSpread[t]; +return u=i,c.fixed&&(u=void 0===s?d(u,e):I(u,s)),c.rearg&&e>1&&(h||!n.skipRearg[t])&&(u=R(u,n.methodRearg[t]||n.aryRearg[e])),c.cap&&(o?u=z(u,o):a&&(u=q(u,a))),c.curry&&e>1&&(u=g(u,e)),!1}}),!u}),u||(u=i),n.placeholder[t]&&(s=!0,e.placeholder=u.placeholder=o),u};if(!p)return L(e,r);var S=r,C=[];return m(b,function(t){m(n.aryMethod[t],function(t){var e=S[n.remap[t]||t];e&&C.push([t,L(t,e)])})}),m(C,function(t){S[t[0]]=t[1]}),s&&(S.placeholder=o),m(x(S),function(t){m(n.realToAlias[t]||[],function(e){ +S[e]=S[t]})}),S}var n=r(2),a=n.mutate,o={};t.exports=i},function(t,e){e.aliasToReal={__:"placeholder",all:"some",allPass:"overEvery",apply:"spread",assoc:"set",assocPath:"set",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",each:"forEach",eachRight:"forEachRight",equals:"isEqual",extend:"assignIn",extendWith:"assignInWith",first:"head",init:"initial",mapObj:"mapValues",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",pickAll:"pick",pipe:"flow", prop:"get",propOf:"propertyOf",propOr:"getOr",somePass:"overSome",unapply:"rest",unnest:"flatten",useWith:"overArgs",whereEq:"filter",zipObj:"zipObject"},e.aryMethod={1:["attempt","castArray","ceil","create","curry","curryRight","floor","fromPairs","invert","iteratee","memoize","method","methodOf","mixin","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words"],2:["add","after","ary","assign","assignIn","at","before","bind","bindKey","chunk","cloneDeepWith","cloneWith","concat","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","delay","difference","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","merge","minBy","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"], -3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","getOr","inRange","intersectionBy","intersectionWith","isEqualWith","isMatchWith","mergeWith","orderBy","pullAllBy","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","xorBy","xorWith","zipWith"],4:["fill","setWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={assignWith:2,assignInWith:2,cloneDeepWith:1,cloneWith:1,dropRightWhile:1,dropWhile:1,every:1, -filter:1,find:1,findIndex:1,findKey:1,findLast:1,findLastIndex:1,findLastKey:1,flatMap:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,isEqualWith:2,isMatchWith:2,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1]},e.methodRearg={assignInWith:[1,2,0],assignWith:[1,2,0],getOr:[2,1,0],isMatchWith:[2,1,0],mergeWith:[1,2,0],pullAllBy:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0], -sortedLastIndexBy:[2,1,0],zipWith:[1,2,0]},e.methodSpread={partial:1,partialRight:1},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignIn:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsDeep:!0,merge:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};for(var i in r){ -var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={curryN:"curry",curryRightN:"curryRight",getOr:"get",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart"},e.skipRearg={add:!0,assign:!0,assignIn:!0,concat:!0,difference:!0,gt:!0,gte:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,partial:!0,partialRight:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0}}])}); \ No newline at end of file +3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","getOr","inRange","intersectionBy","intersectionWith","isEqualWith","isMatchWith","mergeWith","orderBy","pullAllBy","pullAllWith","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={assignWith:2,assignInWith:2,cloneDeepWith:1,cloneWith:1, +dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findIndex:1,findKey:1,findLast:1,findLastIndex:1,findLastKey:1,flatMap:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,isEqualWith:2,isMatchWith:2,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1]},e.methodRearg={assignInWith:[1,2,0],assignWith:[1,2,0],getOr:[2,1,0],isMatchWith:[2,1,0],mergeWith:[1,2,0],pullAllBy:[2,1,0], +pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],updateWith:[3,1,2,0],zipWith:[1,2,0]},e.methodSpread={partial:1,partialRight:1},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignIn:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsDeep:!0,merge:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0, +partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,i={};for(var n in r){var a=r[n];t.call(i,a)?i[a].push(n):i[a]=[n]}return i}(),e.remap={curryN:"curry",curryRightN:"curryRight",getOr:"get",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart"},e.skipRearg={add:!0,assign:!0,assignIn:!0,concat:!0,difference:!0,gt:!0,gte:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,partial:!0,partialRight:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0, +zipObject:!0}}])}); \ No newline at end of file diff --git a/public/bower_components/lodash/dist/lodash.js b/public/bower_components/lodash/dist/lodash.js index 0873443..cab4e79 100644 --- a/public/bower_components/lodash/dist/lodash.js +++ b/public/bower_components/lodash/dist/lodash.js @@ -1,6 +1,6 @@ /** * @license - * lodash 4.5.1 (Custom Build) + * lodash 4.6.1 (Custom Build) * Build: `lodash -o ./dist/lodash.js` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -13,7 +13,19 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.5.1'; + var VERSION = '4.6.1'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; /** Used to compose bitmasks for wrapper metadata. */ var BIND_FLAG = 1, @@ -39,20 +51,11 @@ var HOT_COUNT = 150, HOT_SPAN = 16; - /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; - /** Used to indicate the type of lazy iteratees. */ var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3; - /** Used as the `TypeError` message for "Functions" methods. */ - var FUNC_ERROR_TEXT = 'Expected a function'; - - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; - /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, @@ -64,9 +67,6 @@ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; - /** Used as the internal argument placeholder. */ - var PLACEHOLDER = '__lodash_placeholder__'; - /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', @@ -382,6 +382,7 @@ * @returns {Object} Returns `map`. */ function addMapEntry(map, pair) { + // Don't return `Map#set` because it doesn't return the map instance in IE 11. map.set(pair[0], pair[1]); return map; } @@ -539,13 +540,13 @@ function arrayFilter(array, predicate) { var index = -1, length = array.length, - resIndex = -1, + resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { - result[++resIndex] = value; + result[resIndex++] = value; } } return result; @@ -565,8 +566,7 @@ } /** - * A specialized version of `_.includesWith` for arrays without support for - * specifying an index to search from. + * This function is like `arrayIncludes` except that it accepts a comparator. * * @private * @param {Array} array The array to search. @@ -791,6 +791,28 @@ } /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** * The base implementation of `_.reduce` and `_.reduceRight`, without support * for iteratee shorthands, which iterates over `collection` using `eachFunc`. * @@ -812,9 +834,9 @@ } /** - * The base implementation of `_.sortBy` which uses `comparer` to define - * the sort order of `array` and replaces criteria objects with their - * corresponding values. + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. * * @private * @param {Array} array The array to sort. @@ -1187,14 +1209,14 @@ function replaceHolders(array, placeholder) { var index = -1, length = array.length, - resIndex = -1, + resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value === placeholder || value === PLACEHOLDER) { array[index] = PLACEHOLDER; - result[++resIndex] = index; + result[resIndex++] = index; } } return result; @@ -1371,6 +1393,12 @@ /** Used to store function metadata. */ var metaMap = WeakMap && new WeakMap; + /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ + var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); + + /** Used to lookup unminified function names. */ + var realNames = {}; + /** Used to detect maps, sets, and weakmaps. */ var mapCtorString = Map ? funcToString.call(Map) : '', setCtorString = Set ? funcToString.call(Set) : '', @@ -1378,11 +1406,8 @@ /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = Symbol ? symbolProto.valueOf : undefined, - symbolToString = Symbol ? symbolProto.toString : undefined; - - /** Used to lookup unminified function names. */ - var realNames = {}; + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; /*------------------------------------------------------------------------*/ @@ -1428,46 +1453,48 @@ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, - * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, `difference`, - * `differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`, - * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flattenDepth`, - * `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, `functionsIn`, - * `groupBy`, `initial`, `intersection`, `intersectionBy`, `intersectionWith`, - * `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, `keys`, `keysIn`, - * `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, `memoize`, - * `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, `nthArg`, - * `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, `overEvery`, - * `overSome`, `partial`, `partialRight`, `partition`, `pick`, `pickBy`, `plant`, - * `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, `pullAt`, `push`, - * `range`, `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, - * `sampleSize`, `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, - * `splice`, `spread`, `tail`, `take`, `takeRight`, `takeRightWhile`, - * `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, `toPairs`, `toPairsIn`, - * `toPath`, `toPlainObject`, `transform`, `unary`, `union`, `unionBy`, - * `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, `unshift`, `unzip`, - * `unzipWith`, `values`, `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, - * `xorWith`, `zip`, `zipObject`, `zipObjectDeep`, and `zipWith` + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatten`, `flattenDeep`, `flattenDepth`, `flip`, `flow`, `flowRight`, + * `fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`, `intersection`, + * `intersectionBy`, `intersectionWith`, `invert`, `invertBy`, `invokeMap`, + * `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, + * `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, `method`, + * `methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, + * `over`, `overArgs`, `overEvery`, `overSome`, `partial`, `partialRight`, + * `partition`, `pick`, `pickBy`, `plant`, `property`, `propertyOf`, `pull`, + * `pullAll`, `pullAllBy`, `pullAllWith`, `pullAt`, `push`, `range`, + * `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, `sampleSize`, + * `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, + * `thru`, `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, + * `transform`, `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, + * `uniqWith`, `unset`, `unshift`, `unzip`, `unzipWith`, `update`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`, + * `zipObjectDeep`, and `zipWith` * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `endsWith`, `eq`, - * `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, - * `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`, `forIn`, - * `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, - * `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, - * `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, - * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, - * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, - * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, - * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`, - * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, - * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, - * `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`, - * `now`, `pad`, `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, - * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `sample`, - * `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, - * `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`, - * `sum`, `sumBy`, `template`, `times`, `toLower`, `toInteger`, `toLength`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `each`, `eachRight`, + * `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, `floor`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, `includes`, + * `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, `isArrayBuffer`, + * `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, `isDate`, + * `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, `isFinite`, + * `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, `isMatchWith`, + * `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, `isObject`, `isObjectLike`, + * `isPlainObject`, `isRegExp`, `isSafeInteger`, `isSet`, `isString`, + * `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, + * `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, + * `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`, `now`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toInteger`, `toJSON`, `toLength`, `toLower`, * `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, `trimEnd`, * `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, `upperFirst`, * `value`, and `words` @@ -2156,7 +2183,8 @@ } /** - * This function is like `assignValue` except that it doesn't assign `undefined` values. + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. * * @private * @param {Object} object The object to modify. @@ -2300,13 +2328,14 @@ * @private * @param {*} value The value to clone. * @param {boolean} [isDeep] Specify a deep clone. + * @param {boolean} [isFull] Specify a clone including symbols. * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ - function baseClone(value, isDeep, customizer, key, object, stack) { + function baseClone(value, isDeep, isFull, customizer, key, object, stack) { var result; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); @@ -2336,7 +2365,8 @@ } result = initCloneObject(isFunc ? {} : value); if (!isDeep) { - return copySymbols(value, baseAssign(result, value)); + result = baseAssign(result, value); + return isFull ? copySymbols(value, result) : result; } } else { if (!cloneableTags[tag]) { @@ -2355,9 +2385,9 @@ // Recursively populate clone (susceptible to call stack limits). (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { - assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack)); + assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); }); - return isArr ? result : copySymbols(value, result); + return (isFull && !isArr) ? copySymbols(value, result) : result; } /** @@ -2739,9 +2769,11 @@ */ function baseIntersection(arrays, iteratee, comparator) { var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), + maxLength = Infinity, result = []; while (othIndex--) { @@ -2749,18 +2781,18 @@ if (othIndex && iteratee) { array = arrayMap(array, baseUnary(iteratee)); } - caches[othIndex] = !comparator && (iteratee || array.length >= 120) + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) ? new SetCache(othIndex && array) : undefined; } array = arrays[0]; var index = -1, - length = array.length, seen = caches[0]; outer: - while (++index < length) { + while (++index < length && result.length < maxLength) { var value = array[index], computed = iteratee ? iteratee(value) : value; @@ -2768,7 +2800,7 @@ ? cacheHas(seen, computed) : includes(result, computed, comparator) )) { - var othIndex = othLength; + othIndex = othLength; while (--othIndex) { var cache = caches[othIndex]; if (!(cache @@ -2872,33 +2904,28 @@ if (!objIsArr) { objTag = getTag(object); - if (objTag == argsTag) { - objTag = objectTag; - } else if (objTag != objectTag) { - objIsArr = isTypedArray(object); - } + objTag = objTag == argsTag ? objectTag : objTag; } if (!othIsArr) { othTag = getTag(other); - if (othTag == argsTag) { - othTag = objectTag; - } else if (othTag != objectTag) { - othIsArr = isTypedArray(other); - } + othTag = othTag == argsTag ? objectTag : othTag; } var objIsObj = objTag == objectTag && !isHostObject(object), othIsObj = othTag == objectTag && !isHostObject(other), isSameTag = objTag == othTag; - if (isSameTag && !(objIsArr || objIsObj)) { - return equalByTag(object, other, objTag, equalFunc, customizer, bitmask); + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) + : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); } - var isPartial = bitmask & PARTIAL_COMPARE_FLAG; - if (!isPartial) { + if (!(bitmask & PARTIAL_COMPARE_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { + stack || (stack = new Stack); return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack); } } @@ -2906,7 +2933,7 @@ return false; } stack || (stack = new Stack); - return (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, bitmask, stack); + return equalObjects(object, other, equalFunc, customizer, bitmask, stack); } /** @@ -3163,7 +3190,7 @@ } else { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = baseClone(srcValue, !customizer); } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { @@ -3172,7 +3199,7 @@ } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = baseClone(srcValue, !customizer); } else { newValue = objValue; @@ -3188,6 +3215,7 @@ // Recursively merge objects and arrays (susceptible to call stack limits). mergeFunc(newValue, srcValue, srcIndex, customizer, stack); } + stack['delete'](srcValue); assignMergeValue(object, key, newValue); } @@ -3201,12 +3229,8 @@ * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { - var index = -1, - toIteratee = getIteratee(); - - iteratees = arrayMap(iteratees.length ? iteratees : Array(1), function(iteratee) { - return toIteratee(iteratee); - }); + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : Array(1), getIteratee()); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { @@ -3284,18 +3308,6 @@ } /** - * The base implementation of `_.pullAll`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @returns {Array} Returns `array`. - */ - function basePullAll(array, values) { - return basePullAllBy(array, values); - } - - /** * The base implementation of `_.pullAllBy` without support for iteratee * shorthands. * @@ -3303,22 +3315,24 @@ * @param {Array} array The array to modify. * @param {Array} values The values to remove. * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns `array`. */ - function basePullAllBy(array, values, iteratee) { - var index = -1, + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, length = values.length, seen = array; if (iteratee) { - seen = arrayMap(array, function(value) { return iteratee(value); }); + seen = arrayMap(array, baseUnary(iteratee)); } while (++index < length) { var fromIndex = 0, value = values[index], computed = iteratee ? iteratee(value) : value; - while ((fromIndex = baseIndexOf(seen, computed, fromIndex)) > -1) { + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { if (seen !== array) { splice.call(seen, fromIndex, 1); } @@ -3604,7 +3618,7 @@ value = array[0], computed = iteratee ? iteratee(value) : value, seen = computed, - resIndex = 0, + resIndex = 1, result = [value]; while (++index < length) { @@ -3613,7 +3627,7 @@ if (!eq(computed, seen)) { seen = computed; - result[++resIndex] = value; + result[resIndex++] = value; } } return result; @@ -3695,6 +3709,20 @@ } /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** * The base implementation of methods like `_.dropWhile` and `_.takeWhile` * without support for iteratee shorthands. * @@ -3795,9 +3823,7 @@ if (isDeep) { return buffer.slice(); } - var Ctor = buffer.constructor, - result = new Ctor(buffer.length); - + var result = new buffer.constructor(buffer.length); buffer.copy(result); return result; } @@ -3810,11 +3836,8 @@ * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { - var Ctor = arrayBuffer.constructor, - result = new Ctor(arrayBuffer.byteLength), - view = new Uint8Array(result); - - view.set(new Uint8Array(arrayBuffer)); + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } @@ -3826,8 +3849,7 @@ * @returns {Object} Returns the cloned map. */ function cloneMap(map) { - var Ctor = map.constructor; - return arrayReduce(mapToArray(map), addMapEntry, new Ctor); + return arrayReduce(mapToArray(map), addMapEntry, new map.constructor); } /** @@ -3838,9 +3860,7 @@ * @returns {Object} Returns the cloned regexp. */ function cloneRegExp(regexp) { - var Ctor = regexp.constructor, - result = new Ctor(regexp.source, reFlags.exec(regexp)); - + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } @@ -3853,8 +3873,7 @@ * @returns {Object} Returns the cloned set. */ function cloneSet(set) { - var Ctor = set.constructor; - return arrayReduce(setToArray(set), addSetEntry, new Ctor); + return arrayReduce(setToArray(set), addSetEntry, new set.constructor); } /** @@ -3865,7 +3884,7 @@ * @returns {Object} Returns the cloned symbol object. */ function cloneSymbol(symbol) { - return Symbol ? Object(symbolValueOf.call(symbol)) : {}; + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } /** @@ -3877,11 +3896,8 @@ * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { - var arrayBuffer = typedArray.buffer, - buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer, - Ctor = typedArray.constructor; - - return new Ctor(buffer, typedArray.byteOffset, typedArray.length); + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } /** @@ -4678,9 +4694,9 @@ * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. - * @param {Object} [stack] Tracks traversed `array` and `other` objects. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { @@ -4747,11 +4763,12 @@ * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalByTag(object, other, tag, equalFunc, customizer, bitmask) { + function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { switch (tag) { case arrayBufferTag: if ((object.byteLength != other.byteLength) || @@ -4786,12 +4803,21 @@ var isPartial = bitmask & PARTIAL_COMPARE_FLAG; convert || (convert = setToArray); + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } // Recursively compare objects (susceptible to call stack limits). - return (isPartial || object.size == other.size) && - equalFunc(convert(object), convert(other), customizer, bitmask | UNORDERED_COMPARE_FLAG); + return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask | UNORDERED_COMPARE_FLAG, stack.set(object, other)); case symbolTag: - return !!Symbol && (symbolValueOf.call(object) == symbolValueOf.call(other)); + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } } return false; } @@ -4804,9 +4830,9 @@ * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { @@ -4959,7 +4985,7 @@ * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { - var value = object == null ? undefined : object[key]; + var value = object[key]; return isNative(value) ? value : undefined; } @@ -5101,7 +5127,7 @@ * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { - return (isFunction(object.constructor) && !isPrototype(object)) + return (typeof object.constructor == 'function' && !isPrototype(object)) ? baseCreate(getPrototypeOf(object)) : {}; } @@ -5250,7 +5276,7 @@ */ function isPrototype(value) { var Ctor = value && value.constructor, - proto = (isFunction(Ctor) && Ctor.prototype) || objectProto; + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } @@ -5351,8 +5377,7 @@ */ function mergeDefaults(objValue, srcValue, key, object, source, stack) { if (isObject(objValue) && isObject(srcValue)) { - stack.set(srcValue, objValue); - baseMerge(objValue, srcValue, undefined, mergeDefaults, stack); + baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue)); } return objValue; } @@ -5486,11 +5511,11 @@ return []; } var index = 0, - resIndex = -1, + resIndex = 0, result = Array(nativeCeil(length / size)); while (index < length) { - result[++resIndex] = baseSlice(array, index, (index += size)); + result[resIndex++] = baseSlice(array, index, (index += size)); } return result; } @@ -5512,13 +5537,13 @@ function compact(array) { var index = -1, length = array ? array.length : 0, - resIndex = -1, + resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value) { - result[++resIndex] = value; + result[resIndex++] = value; } } return result; @@ -5556,7 +5581,8 @@ /** * Creates an array of unique `array` values not included in the other * given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. + * for equality comparisons. The order of result values is determined by the + * order they occur in the first array. * * @static * @memberOf _ @@ -5578,7 +5604,8 @@ /** * This method is like `_.difference` except that it accepts `iteratee` which * is invoked for each element of `array` and `values` to generate the criterion - * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * by which they're compared. Result values are chosen from the first array. + * The iteratee is invoked with one argument: (value). * * @static * @memberOf _ @@ -5608,8 +5635,9 @@ /** * This method is like `_.difference` except that it accepts `comparator` - * which is invoked to compare elements of `array` to `values`. The comparator - * is invoked with two arguments: (arrVal, othVal). + * which is invoked to compare elements of `array` to `values`. Result values + * are chosen from the first array. The comparator is invoked with two arguments: + * (arrVal, othVal). * * @static * @memberOf _ @@ -6065,13 +6093,14 @@ /** * Creates an array of unique values that are included in all given arrays * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. + * for equality comparisons. The order of result values is determined by the + * order they occur in the first array. * * @static * @memberOf _ * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of shared values. + * @returns {Array} Returns the new array of intersecting values. * @example * * _.intersection([2, 1], [4, 2], [1, 2]); @@ -6087,14 +6116,15 @@ /** * This method is like `_.intersection` except that it accepts `iteratee` * which is invoked for each element of each `arrays` to generate the criterion - * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * by which they're compared. Result values are chosen from the first array. + * The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of shared values. + * @returns {Array} Returns the new array of intersecting values. * @example * * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); @@ -6120,15 +6150,16 @@ /** * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. The comparator is invoked - * with two arguments: (arrVal, othVal). + * which is invoked to compare elements of `arrays`. Result values are chosen + * from the first array. The comparator is invoked with two arguments: + * (arrVal, othVal). * * @static * @memberOf _ * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of shared values. + * @returns {Array} Returns the new array of intersecting values. * @example * * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; @@ -6280,7 +6311,7 @@ /** * This method is like `_.pullAll` except that it accepts `iteratee` which is * invoked for each element of `array` and `values` to generate the criterion - * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * by which they're compared. The iteratee is invoked with one argument: (value). * * **Note:** Unlike `_.differenceBy`, this method mutates `array`. * @@ -6301,7 +6332,35 @@ */ function pullAllBy(array, values, iteratee) { return (array && array.length && values && values.length) - ? basePullAllBy(array, values, getIteratee(iteratee)) + ? basePullAll(array, values, getIteratee(iteratee)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) : array; } @@ -7023,7 +7082,8 @@ /** * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) - * of the given arrays. + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. * * @static * @memberOf _ @@ -7042,7 +7102,7 @@ /** * This method is like `_.xor` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by which - * uniqueness is computed. The iteratee is invoked with one argument: (value). + * by which they're compared. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ @@ -9409,7 +9469,7 @@ * // => true */ function clone(value) { - return baseClone(value); + return baseClone(value, false, true); } /** @@ -9442,7 +9502,7 @@ * // => 0 */ function cloneWith(value, customizer) { - return baseClone(value, false, customizer); + return baseClone(value, false, true, customizer); } /** @@ -9462,7 +9522,7 @@ * // => false */ function cloneDeep(value) { - return baseClone(value, true); + return baseClone(value, true, true); } /** @@ -9492,7 +9552,7 @@ * // => 20 */ function cloneDeepWith(value, customizer) { - return baseClone(value, true, customizer); + return baseClone(value, true, true, customizer); } /** @@ -9669,8 +9729,7 @@ * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -9782,14 +9841,14 @@ } /** - * Checks if `value` is empty. A value is considered empty unless it's an - * `arguments` object, array, string, or jQuery-like collection with a length - * greater than `0` or an object with own enumerable properties. + * Checks if `value` is an empty collection or object. A value is considered + * empty if it's an `arguments` object, array, string, or jQuery-like collection + * with a length of `0` or has no own enumerable properties. * * @static * @memberOf _ * @category Lang - * @param {Array|Object|string} value The value to inspect. + * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is empty, else `false`. * @example * @@ -9961,8 +10020,8 @@ */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } @@ -10798,7 +10857,7 @@ return ''; } if (isSymbol(value)) { - return Symbol ? symbolToString.call(value) : ''; + return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; @@ -10837,7 +10896,15 @@ * // => { 'a': 1, 'c': 3, 'e': 5 } */ var assign = createAssigner(function(object, source) { - copyObject(source, keys(source), object); + if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } }); /** @@ -10870,7 +10937,13 @@ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } */ var assignIn = createAssigner(function(object, source) { - copyObject(source, keysIn(source), object); + if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { + copyObject(source, keysIn(source), object); + return; + } + for (var key in source) { + assignValue(object, key, source[key]); + } }); /** @@ -11601,12 +11674,13 @@ } /** - * Recursively merges own and inherited enumerable properties of source objects - * into the destination object. Source properties that resolve to `undefined` - * are skipped if a destination value exists. Array and plain object properties - * are merged recursively. Other objects and value types are overridden by - * assignment. Source objects are applied from left to right. Subsequent - * sources overwrite property assignments of previous sources. + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable properties of source objects into the destination + * object. Source properties that resolve to `undefined` are skipped if a + * destination value exists. Array and plain object properties are merged + * recursively.Other objects and value types are overridden by assignment. + * Source objects are applied from left to right. Subsequent sources + * overwrite property assignments of previous sources. * * **Note:** This method mutates `object`. * @@ -11859,8 +11933,10 @@ * @returns {Object} Returns `object`. * @example * - * _.setWith({ '0': { 'length': 2 } }, '[0][1][2]', 3, Object); - * // => { '0': { '1': { '2': 3 }, 'length': 2 } } + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } */ function setWith(object, path, value, customizer) { customizer = typeof customizer == 'function' ? customizer : undefined; @@ -11998,6 +12074,64 @@ } /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, baseCastFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, baseCastFunction(updater), customizer); + } + + /** * Creates an array of the own enumerable property values of `object`. * * **Note:** Non-object values are coerced to objects. @@ -12933,7 +13067,8 @@ } /** - * Converts `string`, as a whole, to lower case. + * Converts `string`, as a whole, to lower case just like + * [String#toLowerCase](https://mdn.io/toLowerCase). * * @static * @memberOf _ @@ -12956,7 +13091,8 @@ } /** - * Converts `string`, as a whole, to upper case. + * Converts `string`, as a whole, to upper case just like + * [String#toUpperCase](https://mdn.io/toUpperCase). * * @static * @memberOf _ @@ -14330,6 +14466,7 @@ // Ensure wrappers are instances of `baseLodash`. lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; LodashWrapper.prototype = baseCreate(baseLodash.prototype); LodashWrapper.prototype.constructor = LodashWrapper; @@ -14451,6 +14588,7 @@ lodash.pull = pull; lodash.pullAll = pullAll; lodash.pullAllBy = pullAllBy; + lodash.pullAllWith = pullAllWith; lodash.pullAt = pullAt; lodash.range = range; lodash.rangeRight = rangeRight; @@ -14493,6 +14631,8 @@ lodash.unset = unset; lodash.unzip = unzip; lodash.unzipWith = unzipWith; + lodash.update = update; + lodash.updateWith = updateWith; lodash.values = values; lodash.valuesIn = valuesIn; lodash.without = without; diff --git a/public/bower_components/lodash/dist/lodash.min.js b/public/bower_components/lodash/dist/lodash.min.js index d900b24..12c24c4 100644 --- a/public/bower_components/lodash/dist/lodash.min.js +++ b/public/bower_components/lodash/dist/lodash.min.js @@ -1,120 +1,121 @@ /** * @license - * lodash 4.5.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * lodash 4.6.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE * Build: `lodash -o ./dist/lodash.js` */ ;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,o=n.length;++ut&&!o||!u||r&&!i&&f||e&&f)return 1;if(t>n&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function S(n){return Un[n]}function R(n){return zn[n]}function W(n){return"\\"+$n[n]}function B(n,t,r){var e=n.length;for(t+=r?0:-1;r?t--:++t-1&&0==n%1&&(null==t?9007199254740991:t)>n}function z(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function L(n,t){for(var r=-1,e=n.length,u=-1,o=[];++rr?false:(r==n.length-1?n.pop():Iu.call(n,r,1),true)}function Zn(n,t){var r=Pn(n,t);return 0>r?Z:n[r][1]}function Pn(n,t){for(var r=n.length;r--;)if(pe(n[r][0],t))return r;return-1}function Tn(n,t,r){var e=Pn(n,t);0>e?n.push([t,r]):n[e][1]=r}function Kn(n,t,r,e){return n===Z||pe(n,cu[r])&&!lu.call(e,r)?t:n}function Gn(n,t,r){(r!==Z&&!pe(n[t],r)||typeof t=="number"&&r===Z&&!(t in n))&&(n[t]=r)}function Yn(n,t,r){ -var e=n[t];lu.call(n,t)&&pe(e,r)&&(r!==Z||t in n)||(n[t]=r)}function Hn(n,t,r,e){return Hu(n,function(n,u,o){t(e,n,r(n),o)}),e}function Qn(n,t){return n&&nr(t,De(t),n)}function Xn(n,t){for(var r=-1,e=null==n,u=t.length,o=Array(u);++rr?r:n),t!==Z&&(n=t>n?t:n)),n}function ut(n,t,r,e,o,i){var f;if(r&&(f=o?r(n,e,o,i):r(n)), -f!==Z)return f;if(!je(n))return n;if(e=Zo(n)){if(f=Br(n),!t)return Xt(n,f)}else{var c=Rr(n),a="[object Function]"==c||"[object GeneratorFunction]"==c;if(qo(n))return Jt(n,t);if("[object Object]"==c||"[object Arguments]"==c||a&&!o){if(C(n))return o?n:{};if(f=Cr(a?{}:n),!t)return rr(n,Qn(f,n))}else{if(!Cn[c])return o?n:{};f=Ur(n,c,t)}}return i||(i=new $n),(o=i.get(n))?o:(i.set(n,f),(e?u:pt)(n,function(e,u){Yn(f,u,ut(e,t,r,u,n,i))}),e?f:rr(n,f))}function ot(n){var t=De(n),r=t.length;return function(e){ -if(null==e)return!r;for(var u=r;u--;){var o=t[u],i=n[o],f=e[o];if(f===Z&&!(o in Object(e))||!i(f))return false}return true}}function it(n){return je(n)?Ou(n):{}}function ft(n,t,r){if(typeof n!="function")throw new iu("Expected a function");return Eu(function(){n.apply(Z,r)},t)}function ct(n,t,r,e){var u=-1,o=f,i=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=a(t,w(r))),e?(o=c,i=false):t.length>=200&&(o=Ln,i=false,t=new Mn(t));n:for(;++u0&&de(i)&&(r||Zo(i)||ge(i))?t>1?st(i,t-1,r,e):l(e,i):r||(e[e.length]=i)}return e}function ht(n,t){return null==n?n:Xu(n,t,Ze)}function pt(n,t){return n&&Xu(n,t,De)}function _t(n,t){return n&&no(n,t,De)}function gt(n,t){return i(t,function(t){ -return be(n[t])})}function vt(n,t){t=Lr(t,n)?[t+""]:rt(t);for(var r=0,e=t.length;null!=n&&e>r;)n=n[t[r++]];return r&&r==e?n:Z}function dt(n,t){return lu.call(n,t)||typeof n=="object"&&t in n&&null===ju(n)}function yt(n,t){return t in Object(n)}function bt(n,t,r){for(var e=r?c:f,u=n.length,o=u,i=Array(u),l=[];o--;){var s=n[o];o&&t&&(s=a(s,w(t))),i[o]=r||!t&&120>s.length?Z:new Mn(o&&s)}var s=n[0],h=-1,p=s.length,_=i[0];n:for(;++h=f){e=c;break n}e=c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b}return e})}function Wt(n,t){return n=Object(n),s(t,function(t,r){return r in n&&(t[r]=n[r]),t},{}); -}function Bt(n,t){var r={};return ht(n,function(n,e){t(n,e)&&(r[e]=n)}),r}function Ct(n){return function(t){return null==t?Z:t[n]}}function Ut(n){return function(t){return vt(t,n)}}function zt(n,t,r){var e=-1,u=t.length,o=n;for(r&&(o=a(n,function(n){return r(n)}));++et&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e=u){for(;u>e;){var o=e+u>>>1,i=n[o];(r?t>=i:t>i)&&null!==i?e=o+1:u=o}return u}return Zt(n,t,Ye,r)}function Zt(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,f=null===t,c=t===Z;o>u;){var a=Ru((u+o)/2),l=r(n[a]),s=l!==Z,h=l===l;(i?h||e:f?h&&s&&(e||null!=l):c?h&&(e||s):null==l?0:e?t>=l:t>l)?u=a+1:o=a}return zu(o,4294967294)}function qt(n,t){for(var r=0,e=n.length,u=n[0],o=t?t(u):u,i=o,f=0,c=[u];++re?t[e]:Z);return i}function Jt(n,t){if(t)return n.slice();var r=new n.constructor(n.length);return n.copy(r),r}function Yt(n){var t=new n.constructor(n.byteLength);return new bu(t).set(new bu(n)), -t}function Ht(n,t,r,e){var u=-1,o=n.length,i=r.length,f=-1,c=t.length,a=Uu(o-i,0),l=Array(c+a);for(e=!e;++fu)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Qt(n,t,r,e){var u=-1,o=n.length,i=-1,f=r.length,c=-1,a=t.length,l=Uu(o-f,0),s=Array(l+a);for(e=!e;++uu)&&(s[l+r[i]]=n[u++]);return s}function Xt(n,t){var r=-1,e=n.length;for(t||(t=Array(e));++r1?r[u-1]:Z,i=u>2?r[2]:Z,o=typeof o=="function"?(u--,o):Z;for(i&&Mr(r[0],r[1],i)&&(o=3>u?Z:o,u=1),t=Object(t);++ei&&f[0]!==a&&f[i-1]!==a?[]:L(f,a),i-=c.length,e>i?br(n,t,pr,u.placeholder,Z,f,c,Z,Z,e-i):r(this&&this!==Vn&&this instanceof u?o:n,this,f)}var o=lr(n);return u}function hr(n){return he(function(t){t=st(t,1);var r=t.length,e=r,u=wn.prototype.thru;for(n&&t.reverse();e--;){var o=t[e];if(typeof o!="function")throw new iu("Expected a function");if(u&&!i&&"wrapper"==Or(o))var i=new wn([],true)}for(e=i?e:r;++e=200)return i.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++ud)return m=L(b,m),br(n,t,pr,l.placeholder,r,b,m,f,c,a-d);if(m=h?r:this,y=p?m[n]:n,d=b.length,f){x=b.length; -for(var j=zu(f.length,x),w=Xt(b);j--;){var A=f[j];b[j]=U(A,x)?w[A]:Z}}else g&&d>1&&b.reverse();return s&&d>c&&(b.length=c),this&&this!==Vn&&this instanceof l&&(y=v||lr(y)),y.apply(m,b)}var s=128&t,h=1&t,p=2&t,_=24&t,g=512&t,v=p?Z:lr(n);return l}function _r(n,t){return function(r,e){return xt(r,n,t(e),{})}}function gr(n){return he(function(t){return t=a(st(t,1),kr()),he(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function vr(n,t,r){return t=Ce(t),n=F(n),t&&t>n?(t-=n,r=r===Z?" ":r+"", -n=Ge(r,Su(t/F(r))),En.test(r)?n.match(kn).slice(0,t).join(""):n.slice(0,t)):""}function dr(n,t,e,u){function o(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Vn&&this instanceof o?f:n;++at?1:-1:ze(e)||0;var u=-1;r=Uu(Su((r-t)/(e||1)),0);for(var o=Array(r);r--;)o[n?r:++u]=t, -t+=e;return o}}function br(n,t,r,e,u,o,i,f,c,a){var l=8&t;f=f?Xt(f):Z;var s=l?i:Z;i=l?Z:i;var h=l?o:Z;return o=l?Z:o,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),t=[n,t,u,h,s,o,i,f,c,a],r=r.apply(Z,t),Fr(n)&&io(r,t),r.placeholder=e,r}function xr(n){var t=uu[n];return function(n,r){if(n=ze(n),r=Ce(r)){var e=(Le(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(Le(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function mr(n,t,r,e,u,o,i,f){var c=2&t;if(!c&&typeof n!="function")throw new iu("Expected a function"); -var a=e?e.length:0;if(a||(t&=-97,e=u=Z),i=i===Z?i:Uu(Ce(i),0),f=f===Z?f:Ce(f),a-=u?u.length:0,64&t){var l=e,s=u;e=u=Z}var h=c?Z:eo(n);return o=[n,t,r,e,u,l,s,o,i,f],h&&(r=o[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&h[8]>=o[7].length||384==n&&h[8]>=h[7].length&&8==r,131>t||e)&&(1&n&&(o[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?Ht(e,r,h[4]):Xt(r),o[4]=e?L(o[3],"__lodash_placeholder__"):Xt(h[4])),(r=h[5])&&(e=o[5],o[5]=e?Qt(e,r,h[6]):Xt(r),o[6]=e?L(o[5],"__lodash_placeholder__"):Xt(h[6])),(r=h[7])&&(o[7]=Xt(r)), -128&n&&(o[8]=null==o[8]?h[8]:zu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=t),n=o[0],t=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:n.length:Uu(o[9]-a,0),!f&&24&t&&(t&=-25),c=t&&1!=t?8==t||16==t?sr(n,t,f):32!=t&&33!=t||u.length?pr.apply(Z,o):dr(n,t,r,e):fr(n,t,r),(h?to:io)(c,o)}function jr(n,t,r,e,u,o){var i=-1,f=2&u,c=1&u,a=n.length,l=t.length;if(!(a==l||f&&l>a))return false;if(l=o.get(n))return l==t;for(l=true,o.set(n,t);++it?0:t,e)):[]}function Kr(n,t,r){var e=n?n.length:0;return e?(t=r||t===Z?1:Ce(t), -t=e-t,Ft(n,0,0>t?0:t)):[]}function Gr(n){return n?n[0]:Z}function Vr(n){var t=n?n.length:0;return t?n[t-1]:Z}function Jr(n,t){return n&&n.length&&t&&t.length?zt(n,t):n}function Yr(n){return n?$u.call(n):n}function Hr(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){return de(n)?(t=Uu(n.length,t),true):void 0}),m(t,function(t){return a(n,Ct(t))})}function Qr(n,t){if(!n||!n.length)return[];var e=Hr(n);return null==t?e:a(e,function(n){return r(t,Z,n)})}function Xr(n){return n=yn(n),n.__chain__=true, -n}function ne(n,t){return t(n)}function te(){return this}function re(n,t){return typeof t=="function"&&Zo(n)?u(n,t):Hu(n,tt(t))}function ee(n,t){var r;if(typeof t=="function"&&Zo(n)){for(r=n.length;r--&&false!==t(n[r],r,n););r=n}else r=Qu(n,tt(t));return r}function ue(n,t){return(Zo(n)?a:kt)(n,kr(t,3))}function oe(n,t){var r=-1,e=Be(n),u=e.length,o=u-1;for(t=et(Ce(t),0,u);++r=n&&(t=Z),r}}function ce(n,t,r){return t=r?Z:t,n=mr(n,8,Z,Z,Z,Z,Z,t),n.placeholder=ce.placeholder,n}function ae(n,t,r){return t=r?Z:t,n=mr(n,16,Z,Z,Z,Z,Z,t),n.placeholder=ae.placeholder,n}function le(n,t,r){function e(){p&&xu(p),a&&xu(a),g=0,c=a=h=p=_=Z}function u(t,r){r&&xu(r),a=p=_=Z,t&&(g=Co(),l=n.apply(h,c),p||a||(c=h=Z))}function o(){var n=t-(Co()-s); -0>=n||n>t?u(_,a):p=Eu(o,n)}function i(){u(y,p)}function f(){if(c=arguments,s=Co(),h=this,_=y&&(p||!v),false===d)var r=v&&!p;else{g||a||v||(g=s);var e=d-(s-g),u=(0>=e||e>d)&&(v||a);u?(a&&(a=xu(a)),g=s,l=n.apply(h,c)):a||(a=Eu(i,e))}return u&&p?p=xu(p):p||t===d||(p=Eu(o,t)),r&&(u=true,l=n.apply(h,c)),!u||p||a||(c=h=Z),l}var c,a,l,s,h,p,_,g=0,v=false,d=false,y=true;if(typeof n!="function")throw new iu("Expected a function");return t=ze(t)||0,je(r)&&(v=!!r.leading,d="maxWait"in r&&Uu(ze(r.maxWait)||0,t),y="trailing"in r?!!r.trailing:y), -f.cancel=e,f.flush=function(){return(p&&_||a&&y)&&(l=n.apply(h,c)),e(),l},f}function se(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new iu("Expected a function");var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)};return r.cache=new se.Cache,r}function he(n,t){if(typeof n!="function")throw new iu("Expected a function");return t=Uu(t===Z?n.length-1:Ce(t),0),function(){for(var e=arguments,u=-1,o=Uu(e.length-t,0),i=Array(o);++ut}function ge(n){return de(n)&&lu.call(n,"callee")&&(!ku.call(n,"callee")||"[object Arguments]"==pu.call(n))}function ve(n){return null!=n&&!(typeof n=="function"&&be(n))&&me(uo(n))}function de(n){return we(n)&&ve(n)}function ye(n){return we(n)?"[object Error]"==pu.call(n)||typeof n.message=="string"&&typeof n.name=="string":false; -}function be(n){return n=je(n)?pu.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function xe(n){return typeof n=="number"&&n==Ce(n)}function me(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function je(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function we(n){return!!n&&typeof n=="object"}function Ae(n){return null==n?false:be(n)?gu.test(au.call(n)):we(n)&&(C(n)?gu:vn).test(n)}function Oe(n){return typeof n=="number"||we(n)&&"[object Number]"==pu.call(n); -}function ke(n){return!we(n)||"[object Object]"!=pu.call(n)||C(n)?false:(n=ju(n),null===n?true:(n=n.constructor,typeof n=="function"&&n instanceof n&&au.call(n)==hu))}function Ee(n){return je(n)&&"[object RegExp]"==pu.call(n)}function Ie(n){return typeof n=="string"||!Zo(n)&&we(n)&&"[object String]"==pu.call(n)}function Se(n){return typeof n=="symbol"||we(n)&&"[object Symbol]"==pu.call(n)}function Re(n){return we(n)&&me(n.length)&&!!Bn[pu.call(n)]}function We(n,t){return t>n}function Be(n){if(!n)return[]; -if(ve(n))return Ie(n)?n.match(kn):Xt(n);if(Au&&n[Au])return z(n[Au]());var t=Rr(n);return("[object Map]"==t?M:"[object Set]"==t?$:Pe)(n)}function Ce(n){if(!n)return 0===n?n:0;if(n=ze(n),n===q||n===-q)return 1.7976931348623157e308*(0>n?-1:1);var t=n%1;return n===n?t?n-t:n:0}function Ue(n){return n?et(Ce(n),0,4294967295):0}function ze(n){if(je(n)&&(n=be(n.valueOf)?n.valueOf():n,n=je(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(fn,"");var t=gn.test(n);return t||dn.test(n)?Nn(n.slice(2),t?2:8):_n.test(n)?P:+n; -}function Me(n){return nr(n,Ze(n))}function Le(n){if(typeof n=="string")return n;if(null==n)return"";if(Se(n))return yu?Ju.call(n):"";var t=n+"";return"0"==t&&1/n==-q?"-0":t}function $e(n,t,r){return n=null==n?Z:vt(n,t),n===Z?r:n}function Fe(n,t){return Wr(n,t,dt)}function Ne(n,t){return Wr(n,t,yt)}function De(n){var t=Nr(n);if(!t&&!ve(n))return Cu(Object(n));var r,e=zr(n),u=!!e,e=e||[],o=e.length;for(r in n)!dt(n,r)||u&&("length"==r||U(r,o))||t&&"constructor"==r||e.push(r);return e}function Ze(n){ -for(var t=-1,r=Nr(n),e=Ot(n),u=e.length,o=zr(n),i=!!o,o=o||[],f=o.length;++tt||t>9007199254740991)return r;do t%2&&(r+=n),t=Ru(t/2),n+=n;while(t);return r}function Ve(n,t,r){ -return n=Le(n),t=r?Z:t,t===Z&&(t=Rn.test(n)?Sn:In),n.match(t)||[]}function Je(n){return function(){return n}}function Ye(n){return n}function He(n){return At(typeof n=="function"?n:ut(n,true))}function Qe(n,t,r){var e=De(t),o=gt(t,e);null!=r||je(t)&&(o.length||!e.length)||(r=t,t=n,n=this,o=gt(t,De(t)));var i=je(r)&&"chain"in r?r.chain:true,f=be(n);return u(o,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=n(this.__wrapped__);return(r.__actions__=Xt(this.__actions__)).push({ -func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,l([this.value()],arguments))})}),n}function Xe(){}function nu(n){return Lr(n)?Ct(n):Ut(n)}function tu(n){return n&&n.length?x(n,Ye):0}E=E?Jn.defaults({},E,Jn.pick(Vn,Wn)):Vn;var ru=E.Date,eu=E.Error,uu=E.Math,ou=E.RegExp,iu=E.TypeError,fu=E.Array.prototype,cu=E.Object.prototype,au=E.Function.prototype.toString,lu=cu.hasOwnProperty,su=0,hu=au.call(Object),pu=cu.toString,_u=Vn._,gu=ou("^"+au.call(lu).replace(un,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vu=qn?E.Buffer:Z,du=E.Reflect,yu=E.Symbol,bu=E.Uint8Array,xu=E.clearTimeout,mu=du?du.enumerate:Z,ju=Object.getPrototypeOf,wu=Object.getOwnPropertySymbols,Au=typeof(Au=yu&&yu.iterator)=="symbol"?Au:Z,Ou=Object.create,ku=cu.propertyIsEnumerable,Eu=E.setTimeout,Iu=fu.splice,Su=uu.ceil,Ru=uu.floor,Wu=E.isFinite,Bu=fu.join,Cu=Object.keys,Uu=uu.max,zu=uu.min,Mu=E.parseInt,Lu=uu.random,$u=fu.reverse,Fu=Ir(E,"Map"),Nu=Ir(E,"Set"),Du=Ir(E,"WeakMap"),Zu=Ir(Object,"create"),qu=Du&&new Du,Pu=Fu?au.call(Fu):"",Tu=Nu?au.call(Nu):"",Ku=Du?au.call(Du):"",Gu=yu?yu.prototype:Z,Vu=yu?Gu.valueOf:Z,Ju=yu?Gu.toString:Z,Yu={}; -yn.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:"",imports:{_:yn}};var Hu=or(pt),Qu=or(_t,true),Xu=ir(),no=ir(true);mu&&!ku.call({valueOf:1},"valueOf")&&(Ot=function(n){return z(mu(n))});var to=qu?function(n,t){return qu.set(n,t),n}:Ye,ro=Nu&&2===new Nu([1,2]).size?function(n){return new Nu(n)}:Xe,eo=qu?function(n){return qu.get(n)}:Xe,uo=Ct("length"),oo=wu||function(){return[]};(Fu&&"[object Map]"!=Rr(new Fu)||Nu&&"[object Set]"!=Rr(new Nu)||Du&&"[object WeakMap]"!=Rr(new Du))&&(Rr=function(n){ -var t=pu.call(n);if(n="[object Object]"==t?n.constructor:null,n=typeof n=="function"?au.call(n):"")switch(n){case Pu:return"[object Map]";case Tu:return"[object Set]";case Ku:return"[object WeakMap]"}return t});var io=function(){var n=0,t=0;return function(r,e){var u=Co(),o=16-(u-t);if(t=u,o>0){if(150<=++n)return r}else n=0;return to(r,e)}}(),fo=he(function(n,t){Zo(n)||(n=null==n?[]:[Object(n)]),t=st(t,1);for(var r=n,e=t,u=-1,o=r.length,i=-1,f=e.length,c=Array(o+f);++u1?n[t-1]:Z,t=typeof t=="function"?(n.pop(),t):Z;return Qr(n,t)}),ko=he(function(n){n=st(n,1);var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Xn(t,n)};return 1>=t&&!this.__actions__.length&&e instanceof An&&U(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:ne,args:[u],thisArg:Z}),new wn(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(Z),n})):this.thru(u)}),Eo=er(function(n,t,r){lu.call(n,r)?++n[r]:n[r]=1}),Io=er(function(n,t,r){lu.call(n,r)?n[r].push(t):n[r]=[t]; -}),So=he(function(n,t,e){var u=-1,o=typeof t=="function",i=Lr(t),f=ve(n)?Array(n.length):[];return Hu(n,function(n){var c=o?t:i&&null!=n?n[t]:Z;f[++u]=c?r(c,n,e):mt(n,t,e)}),f}),Ro=er(function(n,t,r){n[r]=t}),Wo=er(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Bo=he(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Mr(n,t[0],t[1])?t=[]:r>2&&Mr(t[0],t[1],t[2])&&(t.length=1),Rt(n,st(t,1),[])}),Co=ru.now,Uo=he(function(n,t,r){var e=1;if(r.length)var u=L(r,Sr(Uo)),e=32|e;return mr(n,e,t,r,u); -}),zo=he(function(n,t,r){var e=3;if(r.length)var u=L(r,Sr(zo)),e=32|e;return mr(t,e,n,r,u)}),Mo=he(function(n,t){return ft(n,1,t)}),Lo=he(function(n,t,r){return ft(n,ze(t)||0,r)}),$o=he(function(n,t){t=a(st(t,1),kr());var e=t.length;return he(function(u){for(var o=-1,i=zu(u.length,e);++oe.length?Tn(e,n,t):(r.array=null,r.map=new zn(e))),(r=r.map)&&r.set(n,t), -this},se.Cache=zn,yn.after=function(n,t){if(typeof t!="function")throw new iu("Expected a function");return n=Ce(n),function(){return 1>--n?t.apply(this,arguments):void 0}},yn.ary=ie,yn.assign=Po,yn.assignIn=To,yn.assignInWith=Ko,yn.assignWith=Go,yn.at=Vo,yn.before=fe,yn.bind=Uo,yn.bindAll=pi,yn.bindKey=zo,yn.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return Zo(n)?n:[n]},yn.chain=Xr,yn.chunk=function(n,t){t=Uu(Ce(t),0);var r=n?n.length:0;if(!r||1>t)return[];for(var e=0,u=-1,o=Array(Su(r/t));r>e;)o[++u]=Ft(n,e,e+=t); -return o},yn.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++tr&&(r=-r>u?0:u+r),e=e===Z||e>u?u:Ce(e),0>e&&(e+=u), -e=r>e?0:Ue(e);e>r;)n[r++]=t;return n},yn.filter=function(n,t){return(Zo(n)?i:lt)(n,kr(t,3))},yn.flatMap=function(n,t){return st(ue(n,t),1)},yn.flatten=function(n){return n&&n.length?st(n,1):[]},yn.flattenDeep=function(n){return n&&n.length?st(n,q):[]},yn.flattenDepth=function(n,t){return n&&n.length?(t=t===Z?1:Ce(t),st(n,t)):[]},yn.flip=function(n){return mr(n,512)},yn.flow=_i,yn.flowRight=gi,yn.fromPairs=function(n){for(var t=-1,r=n?n.length:0,e={};++tt?0:t)):[]},yn.takeRight=function(n,t,r){var e=n?n.length:0;return e?(t=r||t===Z?1:Ce(t),t=e-t,Ft(n,0>t?0:t,e)):[]},yn.takeRightWhile=function(n,t){return n&&n.length?Tt(n,kr(t,3),false,true):[]},yn.takeWhile=function(n,t){return n&&n.length?Tt(n,kr(t,3)):[]},yn.tap=function(n,t){return t(n),n},yn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new iu("Expected a function");return je(r)&&(e="leading"in r?!!r.leading:e, -u="trailing"in r?!!r.trailing:u),le(n,t,{leading:e,maxWait:t,trailing:u})},yn.thru=ne,yn.toArray=Be,yn.toPairs=qe,yn.toPairsIn=function(n){return j(n,Ze(n))},yn.toPath=function(n){return Zo(n)?a(n,String):qr(n)},yn.toPlainObject=Me,yn.transform=function(n,t,r){var e=Zo(n)||Re(n);if(t=kr(t,4),null==r)if(e||je(n)){var o=n.constructor;r=e?Zo(n)?new o:[]:be(o)?it(ju(n)):{}}else r={};return(e?u:pt)(n,function(n,e,u){return t(r,n,e,u)}),r},yn.unary=function(n){return ie(n,1)},yn.union=vo,yn.unionBy=yo, -yn.unionWith=bo,yn.uniq=function(n){return n&&n.length?Pt(n):[]},yn.uniqBy=function(n,t){return n&&n.length?Pt(n,kr(t)):[]},yn.uniqWith=function(n,t){return n&&n.length?Pt(n,Z,t):[]},yn.unset=function(n,t){var r;if(null==n)r=true;else{r=n;var e=t,e=Lr(e,r)?[e+""]:rt(e);r=Zr(r,e),e=Vr(e),r=null!=r&&Fe(r,e)?delete r[e]:true}return r},yn.unzip=Hr,yn.unzipWith=Qr,yn.values=Pe,yn.valuesIn=function(n){return null==n?[]:A(n,Ze(n))},yn.without=xo,yn.words=Ve,yn.wrap=function(n,t){return t=null==t?Ye:t,Fo(t,n); -},yn.xor=mo,yn.xorBy=jo,yn.xorWith=wo,yn.zip=Ao,yn.zipObject=function(n,t){return Vt(n||[],t||[],Yn)},yn.zipObjectDeep=function(n,t){return Vt(n||[],t||[],$t)},yn.zipWith=Oo,yn.extend=To,yn.extendWith=Ko,Qe(yn,yn),yn.add=function(n,t){var r;return n===Z&&t===Z?0:(n!==Z&&(r=n),t!==Z&&(r=r===Z?t:r+t),r)},yn.attempt=hi,yn.camelCase=ui,yn.capitalize=Te,yn.ceil=wi,yn.clamp=function(n,t,r){return r===Z&&(r=t,t=Z),r!==Z&&(r=ze(r),r=r===r?r:0),t!==Z&&(t=ze(t),t=t===t?t:0),et(ze(n),t,r)},yn.clone=function(n){ -return ut(n)},yn.cloneDeep=function(n){return ut(n,true)},yn.cloneDeepWith=function(n,t){return ut(n,true,t)},yn.cloneWith=function(n,t){return ut(n,false,t)},yn.deburr=Ke,yn.endsWith=function(n,t,r){n=Le(n),t=typeof t=="string"?t:t+"";var e=n.length;return r=r===Z?e:et(Ce(r),0,e),r-=t.length,r>=0&&n.indexOf(t,r)==r},yn.eq=pe,yn.escape=function(n){return(n=Le(n))&&H.test(n)?n.replace(J,R):n},yn.escapeRegExp=function(n){return(n=Le(n))&&on.test(n)?n.replace(un,"\\$&"):n},yn.every=function(n,t,r){var e=Zo(n)?o:at; -return r&&Mr(n,t,r)&&(t=Z),e(n,kr(t,3))},yn.find=function(n,t){if(t=kr(t,3),Zo(n)){var r=v(n,t);return r>-1?n[r]:Z}return g(n,t,Hu)},yn.findIndex=function(n,t){return n&&n.length?v(n,kr(t,3)):-1},yn.findKey=function(n,t){return g(n,kr(t,3),pt,true)},yn.findLast=function(n,t){if(t=kr(t,3),Zo(n)){var r=v(n,t,true);return r>-1?n[r]:Z}return g(n,t,Qu)},yn.findLastIndex=function(n,t){return n&&n.length?v(n,kr(t,3),true):-1},yn.findLastKey=function(n,t){return g(n,kr(t,3),_t,true)},yn.floor=Ai,yn.forEach=re,yn.forEachRight=ee, -yn.forIn=function(n,t){return null==n?n:Xu(n,tt(t),Ze)},yn.forInRight=function(n,t){return null==n?n:no(n,tt(t),Ze)},yn.forOwn=function(n,t){return n&&pt(n,tt(t))},yn.forOwnRight=function(n,t){return n&&_t(n,tt(t))},yn.get=$e,yn.gt=_e,yn.gte=function(n,t){return n>=t},yn.has=Fe,yn.hasIn=Ne,yn.head=Gr,yn.identity=Ye,yn.includes=function(n,t,r,e){return n=ve(n)?n:Pe(n),r=r&&!e?Ce(r):0,e=n.length,0>r&&(r=Uu(e+r,0)),Ie(n)?e>=r&&-1r&&(r=Uu(e+r,0)),d(n,t,r)):-1},yn.inRange=function(n,t,r){return t=ze(t)||0,r===Z?(r=t,t=0):r=ze(r)||0,n=ze(n),n>=zu(t,r)&&n=-9007199254740991&&9007199254740991>=n},yn.isSet=function(n){return we(n)&&"[object Set]"==Rr(n)},yn.isString=Ie,yn.isSymbol=Se, -yn.isTypedArray=Re,yn.isUndefined=function(n){return n===Z},yn.isWeakMap=function(n){return we(n)&&"[object WeakMap]"==Rr(n)},yn.isWeakSet=function(n){return we(n)&&"[object WeakSet]"==pu.call(n)},yn.join=function(n,t){return n?Bu.call(n,t):""},yn.kebabCase=oi,yn.last=Vr,yn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(r!==Z&&(u=Ce(r),u=(0>u?Uu(e+u,0):zu(u,e-1))+1),t!==t)return B(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},yn.lowerCase=ii,yn.lowerFirst=fi,yn.lt=We, -yn.lte=function(n,t){return t>=n},yn.max=function(n){return n&&n.length?_(n,Ye,_e):Z},yn.maxBy=function(n,t){return n&&n.length?_(n,kr(t),_e):Z},yn.mean=function(n){return tu(n)/(n?n.length:0)},yn.min=function(n){return n&&n.length?_(n,Ye,We):Z},yn.minBy=function(n,t){return n&&n.length?_(n,kr(t),We):Z},yn.noConflict=function(){return Vn._===this&&(Vn._=_u),this},yn.noop=Xe,yn.now=Co,yn.pad=function(n,t,r){n=Le(n),t=Ce(t);var e=F(n);return t&&t>e?(e=(t-e)/2,t=Ru(e),e=Su(e),vr("",t,r)+n+vr("",e,r)):n; -},yn.padEnd=function(n,t,r){return n=Le(n),n+vr(n,t,r)},yn.padStart=function(n,t,r){return n=Le(n),vr(n,t,r)+n},yn.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),n=Le(n).replace(fn,""),Mu(n,t||(pn.test(n)?16:10))},yn.random=function(n,t,r){if(r&&typeof r!="boolean"&&Mr(n,t,r)&&(t=r=Z),r===Z&&(typeof t=="boolean"?(r=t,t=Z):typeof n=="boolean"&&(r=n,n=Z)),n===Z&&t===Z?(n=0,t=1):(n=ze(n)||0,t===Z?(t=n,n=0):t=ze(t)||0),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Lu(),zu(n+r*(t-n+Fn("1e-"+((r+"").length-1))),t)):Lt(n,t); -},yn.reduce=function(n,t,r){var e=Zo(n)?s:y,u=3>arguments.length;return e(n,kr(t,4),r,u,Hu)},yn.reduceRight=function(n,t,r){var e=Zo(n)?h:y,u=3>arguments.length;return e(n,kr(t,4),r,u,Qu)},yn.repeat=Ge,yn.replace=function(){var n=arguments,t=Le(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},yn.result=function(n,t,r){if(Lr(t,n))e=null==n?Z:n[t];else{t=rt(t);var e=$e(n,t);n=Zr(n,t)}return e===Z&&(e=r),be(e)?e.call(n):e},yn.round=Oi,yn.runInContext=D,yn.sample=function(n){n=ve(n)?n:Pe(n);var t=n.length; -return t>0?n[Lt(0,t-1)]:Z},yn.size=function(n){if(null==n)return 0;if(ve(n)){var t=n.length;return t&&Ie(n)?F(n):t}return De(n).length},yn.snakeCase=ai,yn.some=function(n,t,r){var e=Zo(n)?p:Nt;return r&&Mr(n,t,r)&&(t=Z),e(n,kr(t,3))},yn.sortedIndex=function(n,t){return Dt(n,t)},yn.sortedIndexBy=function(n,t,r){return Zt(n,t,kr(r))},yn.sortedIndexOf=function(n,t){var r=n?n.length:0;if(r){var e=Dt(n,t);if(r>e&&pe(n[e],t))return e}return-1},yn.sortedLastIndex=function(n,t){return Dt(n,t,true)},yn.sortedLastIndexBy=function(n,t,r){ -return Zt(n,t,kr(r),true)},yn.sortedLastIndexOf=function(n,t){if(n&&n.length){var r=Dt(n,t,true)-1;if(pe(n[r],t))return r}return-1},yn.startCase=li,yn.startsWith=function(n,t,r){return n=Le(n),r=et(Ce(r),0,n.length),n.lastIndexOf(t,r)==r},yn.subtract=function(n,t){var r;return n===Z&&t===Z?0:(n!==Z&&(r=n),t!==Z&&(r=r===Z?t:r-t),r)},yn.sum=tu,yn.sumBy=function(n,t){return n&&n.length?x(n,kr(t)):0},yn.template=function(n,t,r){var e=yn.templateSettings;r&&Mr(n,t,r)&&(t=Z),n=Le(n),t=Ko({},t,e,Kn),r=Ko({},t.imports,e.imports,Kn); -var u,o,i=De(r),f=A(r,i),c=0;r=t.interpolate||xn;var a="__p+='";r=ou((t.escape||xn).source+"|"+r.source+"|"+(r===nn?sn:xn).source+"|"+(t.evaluate||xn).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,i,f,l){return e||(e=i),a+=n.slice(c,l).replace(mn,W),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t}),a+="';",(t=t.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(T,""):a).replace(K,"$1").replace(G,"$1;"), -a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",t=hi(function(){return Function(i,l+"return "+a).apply(Z,f)}),t.source=a,ye(t))throw t;return t},yn.times=function(n,t){if(n=Ce(n),1>n||n>9007199254740991)return[];var r=4294967295,e=zu(n,4294967295);for(t=tt(t),n-=4294967295,e=m(e,t);++r=o)return n;if(o=r-F(e),1>o)return e;if(r=i?i.slice(0,o).join(""):n.slice(0,o),u===Z)return r+e;if(i&&(o+=r.length-o),Ee(u)){if(n.slice(o).search(u)){var f=r;for(u.global||(u=ou(u.source,Le(hn.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index; -r=r.slice(0,c===Z?o:c)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},yn.unescape=function(n){return(n=Le(n))&&Y.test(n)?n.replace(V,N):n},yn.uniqueId=function(n){var t=++su;return Le(n)+t},yn.upperCase=si,yn.upperFirst=ci,yn.each=re,yn.eachRight=ee,yn.first=Gr,Qe(yn,function(){var n={};return pt(yn,function(t,r){lu.call(yn.prototype,r)||(n[r]=t)}),n}(),{chain:false}),yn.VERSION="4.5.1",u("bind bindKey curry curryRight partial partialRight".split(" "),function(n){yn[n].placeholder=yn; -}),u(["drop","take"],function(n,t){An.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new An(this);r=r===Z?1:Uu(Ce(r),0);var u=this.clone();return e?u.__takeCount__=zu(r,u.__takeCount__):u.__views__.push({size:zu(r,4294967295),type:n+(0>u.__dir__?"Right":"")}),u},An.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;An.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({ -iteratee:kr(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");An.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");An.prototype[n]=function(){return this.__filtered__?new An(this):this[r](1)}}),An.prototype.compact=function(){return this.filter(Ye)},An.prototype.find=function(n){return this.filter(n).head()},An.prototype.findLast=function(n){return this.reverse().find(n); -},An.prototype.invokeMap=he(function(n,t){return typeof n=="function"?new An(this):this.map(function(r){return mt(r,n,t)})}),An.prototype.reject=function(n){return n=kr(n,3),this.filter(function(t){return!n(t)})},An.prototype.slice=function(n,t){n=Ce(n);var r=this;return r.__filtered__&&(n>0||0>t)?new An(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==Z&&(t=Ce(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},An.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},An.prototype.toArray=function(){ -return this.take(4294967295)},pt(An.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=yn[e?"take"+("last"==t?"Right":""):t],o=e||/^find/.test(t);u&&(yn.prototype[t]=function(){var t=this.__wrapped__,i=e?[1]:arguments,f=t instanceof An,c=i[0],a=f||Zo(t),s=function(n){return n=u.apply(yn,l([n],i)),e&&h?n[0]:n};a&&r&&typeof c=="function"&&1!=c.length&&(f=a=false);var h=this.__chain__,p=!!this.__actions__.length,c=o&&!h,f=f&&!p;return!o&&a?(t=f?t:new An(this), -t=n.apply(t,i),t.__actions__.push({func:ne,args:[s],thisArg:Z}),new wn(t,h)):c&&f?n.apply(this,i):(t=this.thru(s),c?e?t.value()[0]:t.value():t)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=fu[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);yn.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),pt(An.prototype,function(n,t){var r=yn[t];if(r){var e=r.name+"";(Yu[e]||(Yu[e]=[])).push({ -name:t,func:r})}}),Yu[pr(Z,2).name]=[{name:"wrapper",func:Z}],An.prototype.clone=function(){var n=new An(this.__wrapped__);return n.__actions__=Xt(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Xt(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Xt(this.__views__),n},An.prototype.reverse=function(){if(this.__filtered__){var n=new An(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},An.prototype.value=function(){ -var n,t=this.__wrapped__.value(),r=this.__dir__,e=Zo(t),u=0>r,o=e?t.length:0;n=0;for(var i=o,f=this.__views__,c=-1,a=f.length;++co||o==n&&a==n)return Kt(t,this.__actions__);e=[];n:for(;n--&&a>c;){for(u+=r,o=-1,l=t[u];++o=this.__values__.length,t=n?Z:this.__values__[this.__index__++];return{done:n,value:t}},yn.prototype.plant=function(n){ -for(var t,r=this;r instanceof jn;){var e=Pr(r);e.__index__=0,e.__values__=Z,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},yn.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof An?(this.__actions__.length&&(n=new An(this)),n=n.reverse(),n.__actions__.push({func:ne,args:[Yr],thisArg:Z}),new wn(n,this.__chain__)):this.thru(Yr)},yn.prototype.toJSON=yn.prototype.valueOf=yn.prototype.value=function(){return Kt(this.__wrapped__,this.__actions__)},Au&&(yn.prototype[Au]=te), -yn}var Z,q=1/0,P=NaN,T=/\b__p\+='';/g,K=/\b(__p\+=)''\+/g,G=/(__e\(.*?\)|\b__t\))\+'';/g,V=/&(?:amp|lt|gt|quot|#39|#96);/g,J=/[&<>"'`]/g,Y=RegExp(V.source),H=RegExp(J.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,nn=/<%=([\s\S]+?)%>/g,tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,en=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,un=/[\\^$.*+?()[\]{}|]/g,on=RegExp(un.source),fn=/^\s+|\s+$/g,cn=/^\s+/,an=/\s+$/,ln=/\\(\\)?/g,sn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,hn=/\w*$/,pn=/^0x/i,_n=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,vn=/^\[object .+?Constructor\]$/,dn=/^0o[0-7]+$/i,yn=/^(?:0|[1-9]\d*)$/,bn=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,xn=/($^)/,mn=/['\n\r\u2028\u2029\\]/g,jn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",wn="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+jn,An="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",On=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),kn=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+An+jn,"g"),En=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),In=/[a-zA-Z0-9]+/g,Sn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|\\d+",wn].join("|"),"g"),Rn=/[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wn="Array Buffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Bn={}; -Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true,Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object Boolean]"]=Bn["[object Date]"]=Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object WeakMap]"]=false; -var Cn={};Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object Date]"]=Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object Symbol]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true, -Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object WeakMap]"]=false;var Un={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O", -"\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},zn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Mn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ln={"function":true,object:true},$n={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029" -},Fn=parseFloat,Nn=parseInt,Dn=Ln[typeof exports]&&exports&&!exports.nodeType?exports:Z,Zn=Ln[typeof module]&&module&&!module.nodeType?module:Z,qn=Zn&&Zn.exports===Dn?Dn:Z,Pn=E(Dn&&Zn&&typeof global=="object"&&global),Tn=E(Ln[typeof self]&&self),Kn=E(Ln[typeof window]&&window),Gn=E(Ln[typeof this]&&this),Vn=Pn||Kn!==(Gn&&Gn.window)&&Kn||Tn||Gn||Function("return this")(),Jn=D();(Kn||Tn||{})._=Jn,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Jn}):Dn&&Zn?(qn&&((Zn.exports=Jn)._=Jn), -Dn._=Jn):Vn._=Jn}).call(this); \ No newline at end of file +return true}function i(n,t){for(var r=-1,e=n.length,u=0,o=[];++rt&&!o||!u||r&&!i&&f||e&&f)return 1;if(t>n&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function R(n){return zn[n]}function W(n){return Mn[n]}function B(n){return"\\"+Fn[n]}function C(n,t,r){ +var e=n.length;for(t+=r?0:-1;r?t--:++t-1&&0==n%1&&(null==t?9007199254740991:t)>n}function M(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function L(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function $(n,t){for(var r=-1,e=n.length,u=0,o=[];++rr?false:(r==n.length-1?n.pop():Iu.call(n,r,1),true)}function qn(n,t){var r=Tn(n,t);return 0>r?q:n[r][1]}function Tn(n,t){for(var r=n.length;r--;)if(pe(n[r][0],t))return r;return-1}function Kn(n,t,r){var e=Tn(n,t);0>e?n.push([t,r]):n[e][1]=r}function Gn(n,t,r,e){return n===q||pe(n,cu[r])&&!lu.call(e,r)?t:n}function Yn(n,t,r){(r===q||pe(n[t],r))&&(typeof t!="number"||r!==q||t in n)||(n[t]=r); +}function Hn(n,t,r){var e=n[t];lu.call(n,t)&&pe(e,r)&&(r!==q||t in n)||(n[t]=r)}function Qn(n,t,r,e){return Qu(n,function(n,u,o){t(e,n,r(n),o)}),e}function Xn(n,t){return n&&tr(t,De(t),n)}function nt(n,t){for(var r=-1,e=null==n,u=t.length,o=Array(u);++rr?r:n),t!==q&&(n=t>n?t:n)),n}function ot(n,t,r,e,o,i,f){ +var c;if(e&&(c=i?e(n,o,i,f):e(n)),c!==q)return c;if(!me(n))return n;if(o=qo(n)){if(c=Br(n),!t)return nr(n,c)}else{var a=Rr(n),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(Po(n))return Yt(n,t);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(U(n))return i?n:{};if(c=Cr(l?{}:n),!t)return c=Xn(c,n),r?er(n,c):c}else{if(!Un[a])return i?n:{};c=Ur(n,a,t)}}return f||(f=new Fn),(i=f.get(n))?i:(f.set(n,c),(o?u:_t)(n,function(u,o){Hn(c,o,ot(u,t,r,e,o,n,f))}),r&&!o?er(n,c):c)}function it(n){ +var t=De(n),r=t.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=t[u],i=n[o],f=e[o];if(f===q&&!(o in Object(e))||!i(f))return false}return true}}function ft(n){return me(n)?Ou(n):{}}function ct(n,t,r){if(typeof n!="function")throw new iu("Expected a function");return Eu(function(){n.apply(q,r)},t)}function at(n,t,r,e){var u=-1,o=f,i=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=a(t,A(r))),e?(o=c,i=false):t.length>=200&&(o=$n,i=false,t=new Ln(t));n:for(;++u0&&de(i)&&(r||qo(i)||ve(i))?t>1?ht(i,t-1,r,e):l(e,i):r||(e[e.length]=i)}return e}function pt(n,t){null==n||no(n,t,Ze)}function _t(n,t){return n&&no(n,t,De)}function vt(n,t){return n&&to(n,t,De); +}function gt(n,t){return i(t,function(t){return be(n[t])})}function dt(n,t){t=Lr(t,n)?[t+""]:et(t);for(var r=0,e=t.length;null!=n&&e>r;)n=n[t[r++]];return r&&r==e?n:q}function yt(n,t){return lu.call(n,t)||typeof n=="object"&&t in n&&null===mu(n)}function bt(n,t){return t in Object(n)}function xt(n,t,r){for(var e=r?c:f,u=n[0].length,o=n.length,i=o,l=Array(o),s=1/0,h=[];i--;){var p=n[i];i&&t&&(p=a(p,A(t))),s=zu(p.length,s),l[i]=r||!t&&(120>u||120>p.length)?q:new Ln(i&&p)}var p=n[0],_=-1,v=l[0];n:for(;++_h.length;){ +var g=p[_],d=t?t(g):g;if(v?!$n(v,d):!e(h,d,r)){for(i=o;--i;){var y=l[i];if(y?!$n(y,d):!e(n[i],d,r))continue n}v&&v.push(d),h.push(g)}}return h}function jt(n,t,r){var e={};return _t(n,function(n,u,o){t(e,r(n),u,o)}),e}function mt(n,t,e){return Lr(t,n)||(t=et(t),n=Zr(n,t),t=Vr(t)),t=null==n?n:n[t],null==t?q:r(t,n,e)}function wt(n,t,r,e,u){if(n===t)n=true;else if(null==n||null==t||!me(n)&&!we(t))n=n!==n&&t!==t;else n:{var o=qo(n),i=qo(t),f="[object Array]",c="[object Array]";o||(f=Rr(n),f="[object Arguments]"==f?"[object Object]":f), +i||(c=Rr(t),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!U(n),i="[object Object]"==c&&!U(t);if((c=f==c)&&!a)u||(u=new Fn),n=o||Re(n)?wr(n,t,wt,r,e,u):Ar(n,t,f,wt,r,e,u);else{if(!(2&e)&&(o=a&&lu.call(n,"__wrapped__"),f=i&&lu.call(t,"__wrapped__"),o||f)){u||(u=new Fn),n=wt(o?n.value():n,f?t.value():t,r,e,u);break n}if(c)t:if(u||(u=new Fn),o=2&e,f=De(n),i=f.length,c=De(t).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in t:yt(t,l))){n=false;break t}}if(c=u.get(n))n=c==t;else{ +c=true,u.set(n,t);for(var s=o;++ae?c*("desc"==r[e]?-1:1):c;break n}}e=n.b-t.b}return e})}function Bt(n,t){return n=Object(n),s(t,function(t,r){return r in n&&(t[r]=n[r]), +t},{})}function Ct(n,t){var r={};return pt(n,function(n,e){t(n,e)&&(r[e]=n)}),r}function Ut(n){return function(t){return null==t?q:t[n]}}function zt(n){return function(t){return dt(t,n)}}function Mt(n,t,r,e){var u=e?y:d,o=-1,i=t.length,f=n;for(r&&(f=a(n,A(r)));++ot&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e=u){for(;u>e;){var o=e+u>>>1,i=n[o];(r?t>=i:t>i)&&null!==i?e=o+1:u=o}return u}return qt(n,t,Ye,r)}function qt(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,f=null===t,c=t===q;o>u;){var a=Ru((u+o)/2),l=r(n[a]),s=l!==q,h=l===l;(i?h||e:f?h&&s&&(e||null!=l):c?h&&(e||s):null==l?0:e?t>=l:t>l)?u=a+1:o=a}return zu(o,4294967294)}function Pt(n,t){for(var r=0,e=n.length,u=n[0],o=t?t(u):u,i=o,f=1,c=[u];++re?t[e]:q);return i}function Yt(n,t){if(t)return n.slice();var r=new n.constructor(n.length);return n.copy(r),r}function Ht(n){var t=new n.constructor(n.byteLength);return new bu(t).set(new bu(n)), +t}function Qt(n,t,r,e){var u=-1,o=n.length,i=r.length,f=-1,c=t.length,a=Uu(o-i,0),l=Array(c+a);for(e=!e;++fu)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Xt(n,t,r,e){var u=-1,o=n.length,i=-1,f=r.length,c=-1,a=t.length,l=Uu(o-f,0),s=Array(l+a);for(e=!e;++uu)&&(s[l+r[i]]=n[u++]);return s}function nr(n,t){var r=-1,e=n.length;for(t||(t=Array(e));++r1?r[u-1]:q,i=u>2?r[2]:q,o=typeof o=="function"?(u--,o):q;for(i&&Mr(r[0],r[1],i)&&(o=3>u?q:o,u=1),t=Object(t);++ei&&f[0]!==a&&f[i-1]!==a?[]:$(f,a),i-=c.length,e>i?xr(n,t,_r,u.placeholder,q,f,c,q,q,e-i):r(this&&this!==Vn&&this instanceof u?o:n,this,f)}var o=sr(n);return u}function pr(n){return he(function(t){t=ht(t,1);var r=t.length,e=r,u=An.prototype.thru;for(n&&t.reverse();e--;){var o=t[e];if(typeof o!="function")throw new iu("Expected a function");if(u&&!i&&"wrapper"==Or(o))var i=new An([],true)}for(e=i?e:r;++e=200)return i.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++ud)return j=$(b,j),xr(n,t,_r,l.placeholder,r,b,j,f,c,a-d);if(j=h?r:this,y=p?j[n]:n,d=b.length,f){x=b.length; +for(var m=zu(f.length,x),w=nr(b);m--;){var A=f[m];b[m]=z(A,x)?w[A]:q}}else v&&d>1&&b.reverse();return s&&d>c&&(b.length=c),this&&this!==Vn&&this instanceof l&&(y=g||sr(y)),y.apply(j,b)}var s=128&t,h=1&t,p=2&t,_=24&t,v=512&t,g=p?q:sr(n);return l}function vr(n,t){return function(r,e){return jt(r,n,t(e))}}function gr(n){return he(function(t){return t=a(ht(t,1),kr()),he(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function dr(n,t,r){return t=Ce(t),n=N(n),t&&t>n?(t-=n,r=r===q?" ":r+"", +n=Ge(r,Su(t/N(r))),In.test(r)?n.match(En).slice(0,t).join(""):n.slice(0,t)):""}function yr(n,t,e,u){function o(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Vn&&this instanceof o?f:n;++at?1:-1:ze(e)||0;var u=-1;r=Uu(Su((r-t)/(e||1)),0);for(var o=Array(r);r--;)o[n?r:++u]=t, +t+=e;return o}}function xr(n,t,r,e,u,o,i,f,c,a){var l=8&t;f=f?nr(f):q;var s=l?i:q;i=l?q:i;var h=l?o:q;return o=l?q:o,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),t=[n,t,u,h,s,o,i,f,c,a],r=r.apply(q,t),Fr(n)&&fo(r,t),r.placeholder=e,r}function jr(n){var t=uu[n];return function(n,r){if(n=ze(n),r=Ce(r)){var e=(Le(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(Le(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function mr(n,t,r,e,u,o,i,f){var c=2&t;if(!c&&typeof n!="function")throw new iu("Expected a function"); +var a=e?e.length:0;if(a||(t&=-97,e=u=q),i=i===q?i:Uu(Ce(i),0),f=f===q?f:Ce(f),a-=u?u.length:0,64&t){var l=e,s=u;e=u=q}var h=c?q:uo(n);return o=[n,t,r,e,u,l,s,o,i,f],h&&(r=o[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&h[8]>=o[7].length||384==n&&h[8]>=h[7].length&&8==r,131>t||e)&&(1&n&&(o[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?Qt(e,r,h[4]):nr(r),o[4]=e?$(o[3],"__lodash_placeholder__"):nr(h[4])),(r=h[5])&&(e=o[5],o[5]=e?Xt(e,r,h[6]):nr(r),o[6]=e?$(o[5],"__lodash_placeholder__"):nr(h[6])),(r=h[7])&&(o[7]=nr(r)), +128&n&&(o[8]=null==o[8]?h[8]:zu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=t),n=o[0],t=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:n.length:Uu(o[9]-a,0),!f&&24&t&&(t&=-25),(h?ro:fo)(t&&1!=t?8==t||16==t?hr(n,t,f):32!=t&&33!=t||u.length?_r.apply(q,o):yr(n,t,r,e):cr(n,t,r),o)}function wr(n,t,r,e,u,o){var i=-1,f=2&u,c=1&u,a=n.length,l=t.length;if(!(a==l||f&&l>a))return false;if(l=o.get(n))return l==t;for(l=true,o.set(n,t);++it?0:t,e)):[]}function Kr(n,t,r){var e=n?n.length:0; +return e?(t=r||t===q?1:Ce(t),t=e-t,Nt(n,0,0>t?0:t)):[]}function Gr(n){return n?n[0]:q}function Vr(n){var t=n?n.length:0;return t?n[t-1]:q}function Jr(n,t){return n&&n.length&&t&&t.length?Mt(n,t):n}function Yr(n){return n?$u.call(n):n}function Hr(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){return de(n)?(t=Uu(n.length,t),true):void 0}),m(t,function(t){return a(n,Ut(t))})}function Qr(n,t){if(!n||!n.length)return[];var e=Hr(n);return null==t?e:a(e,function(n){return r(t,q,n)})}function Xr(n){ +return n=bn(n),n.__chain__=true,n}function ne(n,t){return t(n)}function te(){return this}function re(n,t){return typeof t=="function"&&qo(n)?u(n,t):Qu(n,rt(t))}function ee(n,t){var r;if(typeof t=="function"&&qo(n)){for(r=n.length;r--&&false!==t(n[r],r,n););r=n}else r=Xu(n,rt(t));return r}function ue(n,t){return(qo(n)?a:Et)(n,kr(t,3))}function oe(n,t){var r=-1,e=Be(n),u=e.length,o=u-1;for(t=ut(Ce(t),0,u);++r=n&&(t=q),r}}function ce(n,t,r){return t=r?q:t,n=mr(n,8,q,q,q,q,q,t),n.placeholder=ce.placeholder,n}function ae(n,t,r){return t=r?q:t,n=mr(n,16,q,q,q,q,q,t),n.placeholder=ae.placeholder,n}function le(n,t,r){function e(){p&&xu(p),a&&xu(a),v=0,c=a=h=p=_=q}function u(t,r){r&&xu(r),a=p=_=q,t&&(v=Uo(),l=n.apply(h,c), +p||a||(c=h=q))}function o(){var n=t-(Uo()-s);0>=n||n>t?u(_,a):p=Eu(o,n)}function i(){u(y,p)}function f(){if(c=arguments,s=Uo(),h=this,_=y&&(p||!g),false===d)var r=g&&!p;else{v||a||g||(v=s);var e=d-(s-v),u=(0>=e||e>d)&&(g||a);u?(a&&(a=xu(a)),v=s,l=n.apply(h,c)):a||(a=Eu(i,e))}return u&&p?p=xu(p):p||t===d||(p=Eu(o,t)),r&&(u=true,l=n.apply(h,c)),!u||p||a||(c=h=q),l}var c,a,l,s,h,p,_,v=0,g=false,d=false,y=true;if(typeof n!="function")throw new iu("Expected a function");return t=ze(t)||0,me(r)&&(g=!!r.leading,d="maxWait"in r&&Uu(ze(r.maxWait)||0,t), +y="trailing"in r?!!r.trailing:y),f.cancel=e,f.flush=function(){return(p&&_||a&&y)&&(l=n.apply(h,c)),e(),l},f}function se(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)}if(typeof n!="function"||t&&typeof t!="function")throw new iu("Expected a function");return r.cache=new se.Cache,r}function he(n,t){if(typeof n!="function")throw new iu("Expected a function");return t=Uu(t===q?n.length-1:Ce(t),0),function(){for(var e=arguments,u=-1,o=Uu(e.length-t,0),i=Array(o);++ut}function ve(n){return de(n)&&lu.call(n,"callee")&&(!ku.call(n,"callee")||"[object Arguments]"==pu.call(n))}function ge(n){return null!=n&&je(oo(n))&&!be(n)}function de(n){return we(n)&&ge(n)}function ye(n){return we(n)?"[object Error]"==pu.call(n)||typeof n.message=="string"&&typeof n.name=="string":false; +}function be(n){return n=me(n)?pu.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function xe(n){return typeof n=="number"&&n==Ce(n)}function je(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function me(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function we(n){return!!n&&typeof n=="object"}function Ae(n){return null==n?false:be(n)?vu.test(au.call(n)):we(n)&&(U(n)?vu:dn).test(n)}function Oe(n){return typeof n=="number"||we(n)&&"[object Number]"==pu.call(n); +}function ke(n){return!we(n)||"[object Object]"!=pu.call(n)||U(n)?false:(n=mu(n),null===n?true:(n=n.constructor,typeof n=="function"&&n instanceof n&&au.call(n)==hu))}function Ee(n){return me(n)&&"[object RegExp]"==pu.call(n)}function Ie(n){return typeof n=="string"||!qo(n)&&we(n)&&"[object String]"==pu.call(n)}function Se(n){return typeof n=="symbol"||we(n)&&"[object Symbol]"==pu.call(n)}function Re(n){return we(n)&&je(n.length)&&!!Cn[pu.call(n)]}function We(n,t){return t>n}function Be(n){if(!n)return[]; +if(ge(n))return Ie(n)?n.match(En):nr(n);if(Au&&n[Au])return M(n[Au]());var t=Rr(n);return("[object Map]"==t?L:"[object Set]"==t?F:Pe)(n)}function Ce(n){if(!n)return 0===n?n:0;if(n=ze(n),n===P||n===-P)return 1.7976931348623157e308*(0>n?-1:1);var t=n%1;return n===n?t?n-t:n:0}function Ue(n){return n?ut(Ce(n),0,4294967295):0}function ze(n){if(me(n)&&(n=be(n.valueOf)?n.valueOf():n,n=me(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(cn,"");var t=gn.test(n);return t||yn.test(n)?Dn(n.slice(2),t?2:8):vn.test(n)?T:+n; +}function Me(n){return tr(n,Ze(n))}function Le(n){if(typeof n=="string")return n;if(null==n)return"";if(Se(n))return Hu?Hu.call(n):"";var t=n+"";return"0"==t&&1/n==-P?"-0":t}function $e(n,t,r){return n=null==n?q:dt(n,t),n===q?r:n}function Fe(n,t){return Wr(n,t,yt)}function Ne(n,t){return Wr(n,t,bt)}function De(n){var t=Nr(n);if(!t&&!ge(n))return Cu(Object(n));var r,e=zr(n),u=!!e,e=e||[],o=e.length;for(r in n)!yt(n,r)||u&&("length"==r||z(r,o))||t&&"constructor"==r||e.push(r);return e}function Ze(n){ +for(var t=-1,r=Nr(n),e=kt(n),u=e.length,o=zr(n),i=!!o,o=o||[],f=o.length;++tt||t>9007199254740991)return r;do t%2&&(r+=n),t=Ru(t/2),n+=n;while(t);return r}function Ve(n,t,r){ +return n=Le(n),t=r?q:t,t===q&&(t=Wn.test(n)?Rn:Sn),n.match(t)||[]}function Je(n){return function(){return n}}function Ye(n){return n}function He(n){return Ot(typeof n=="function"?n:ot(n,true))}function Qe(n,t,r){var e=De(t),o=gt(t,e);null!=r||me(t)&&(o.length||!e.length)||(r=t,t=n,n=this,o=gt(t,De(t)));var i=me(r)&&"chain"in r?r.chain:true,f=be(n);return u(o,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=n(this.__wrapped__);return(r.__actions__=nr(this.__actions__)).push({ +func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,l([this.value()],arguments))})}),n}function Xe(){}function nu(n){return Lr(n)?Ut(n):zt(n)}function tu(n){return n&&n.length?j(n,Ye):0}I=I?Jn.defaults({},I,Jn.pick(Vn,Bn)):Vn;var ru=I.Date,eu=I.Error,uu=I.Math,ou=I.RegExp,iu=I.TypeError,fu=I.Array.prototype,cu=I.Object.prototype,au=I.Function.prototype.toString,lu=cu.hasOwnProperty,su=0,hu=au.call(Object),pu=cu.toString,_u=Vn._,vu=ou("^"+au.call(lu).replace(on,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gu=Pn?I.Buffer:q,du=I.Reflect,yu=I.Symbol,bu=I.Uint8Array,xu=I.clearTimeout,ju=du?du.f:q,mu=Object.getPrototypeOf,wu=Object.getOwnPropertySymbols,Au=typeof(Au=yu&&yu.iterator)=="symbol"?Au:q,Ou=Object.create,ku=cu.propertyIsEnumerable,Eu=I.setTimeout,Iu=fu.splice,Su=uu.ceil,Ru=uu.floor,Wu=I.isFinite,Bu=fu.join,Cu=Object.keys,Uu=uu.max,zu=uu.min,Mu=I.parseInt,Lu=uu.random,$u=fu.reverse,Fu=Ir(I,"Map"),Nu=Ir(I,"Set"),Du=Ir(I,"WeakMap"),Zu=Ir(Object,"create"),qu=Du&&new Du,Pu=!ku.call({ +valueOf:1},"valueOf"),Tu={},Ku=Fu?au.call(Fu):"",Gu=Nu?au.call(Nu):"",Vu=Du?au.call(Du):"",Ju=yu?yu.prototype:q,Yu=Ju?Ju.valueOf:q,Hu=Ju?Ju.toString:q;bn.templateSettings={escape:X,evaluate:nn,interpolate:tn,variable:"",imports:{_:bn}};var Qu=ir(_t),Xu=ir(vt,true),no=fr(),to=fr(true);ju&&!ku.call({valueOf:1},"valueOf")&&(kt=function(n){return M(ju(n))});var ro=qu?function(n,t){return qu.set(n,t),n}:Ye,eo=Nu&&2===new Nu([1,2]).size?function(n){return new Nu(n)}:Xe,uo=qu?function(n){return qu.get(n)}:Xe,oo=Ut("length"),io=wu||function(){ +return[]};(Fu&&"[object Map]"!=Rr(new Fu)||Nu&&"[object Set]"!=Rr(new Nu)||Du&&"[object WeakMap]"!=Rr(new Du))&&(Rr=function(n){var t=pu.call(n);if(n="[object Object]"==t?n.constructor:null,n=typeof n=="function"?au.call(n):"")switch(n){case Ku:return"[object Map]";case Gu:return"[object Set]";case Vu:return"[object WeakMap]"}return t});var fo=function(){var n=0,t=0;return function(r,e){var u=Uo(),o=16-(u-t);if(t=u,o>0){if(150<=++n)return r}else n=0;return ro(r,e)}}(),co=he(function(n,t){qo(n)||(n=null==n?[]:[Object(n)]), +t=ht(t,1);for(var r=n,e=t,u=-1,o=r.length,i=-1,f=e.length,c=Array(o+f);++u1?n[t-1]:q,t=typeof t=="function"?(n.pop(),t):q;return Qr(n,t)}),Eo=he(function(n){function t(t){return nt(t,n)}n=ht(n,1);var r=n.length,e=r?n[0]:0,u=this.__wrapped__;return 1>=r&&!this.__actions__.length&&u instanceof On&&z(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:ne,args:[t],thisArg:q}),new An(u,this.__chain__).thru(function(n){return r&&!n.length&&n.push(q), +n})):this.thru(t)}),Io=ur(function(n,t,r){lu.call(n,r)?++n[r]:n[r]=1}),So=ur(function(n,t,r){lu.call(n,r)?n[r].push(t):n[r]=[t]}),Ro=he(function(n,t,e){var u=-1,o=typeof t=="function",i=Lr(t),f=ge(n)?Array(n.length):[];return Qu(n,function(n){var c=o?t:i&&null!=n?n[t]:q;f[++u]=c?r(c,n,e):mt(n,t,e)}),f}),Wo=ur(function(n,t,r){n[r]=t}),Bo=ur(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Co=he(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Mr(n,t[0],t[1])?t=[]:r>2&&Mr(t[0],t[1],t[2])&&(t.length=1), +Wt(n,ht(t,1),[])}),Uo=ru.now,zo=he(function(n,t,r){var e=1;if(r.length)var u=$(r,Sr(zo)),e=32|e;return mr(n,e,t,r,u)}),Mo=he(function(n,t,r){var e=3;if(r.length)var u=$(r,Sr(Mo)),e=32|e;return mr(t,e,n,r,u)}),Lo=he(function(n,t){return ct(n,1,t)}),$o=he(function(n,t,r){return ct(n,ze(t)||0,r)}),Fo=he(function(n,t){t=a(ht(t,1),kr());var e=t.length;return he(function(u){for(var o=-1,i=zu(u.length,e);++oe.length?Kn(e,n,t):(r.array=null,r.map=new Mn(e))),(r=r.map)&&r.set(n,t),this},se.Cache=Mn,bn.after=function(n,t){if(typeof t!="function")throw new iu("Expected a function");return n=Ce(n),function(){return 1>--n?t.apply(this,arguments):void 0}},bn.ary=ie,bn.assign=To,bn.assignIn=Ko, +bn.assignInWith=Go,bn.assignWith=Vo,bn.at=Jo,bn.before=fe,bn.bind=zo,bn.bindAll=_i,bn.bindKey=Mo,bn.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return qo(n)?n:[n]},bn.chain=Xr,bn.chunk=function(n,t){t=Uu(Ce(t),0);var r=n?n.length:0;if(!r||1>t)return[];for(var e=0,u=0,o=Array(Su(r/t));r>e;)o[u++]=Nt(n,e,e+=t);return o},bn.compact=function(n){for(var t=-1,r=n?n.length:0,e=0,u=[];++tr&&(r=-r>u?0:u+r),e=e===q||e>u?u:Ce(e),0>e&&(e+=u),e=r>e?0:Ue(e);e>r;)n[r++]=t;return n},bn.filter=function(n,t){return(qo(n)?i:st)(n,kr(t,3))},bn.flatMap=function(n,t){return ht(ue(n,t),1)},bn.flatten=function(n){ +return n&&n.length?ht(n,1):[]},bn.flattenDeep=function(n){return n&&n.length?ht(n,P):[]},bn.flattenDepth=function(n,t){return n&&n.length?(t=t===q?1:Ce(t),ht(n,t)):[]},bn.flip=function(n){return mr(n,512)},bn.flow=vi,bn.flowRight=gi,bn.fromPairs=function(n){for(var t=-1,r=n?n.length:0,e={};++tt?0:t)):[]},bn.takeRight=function(n,t,r){var e=n?n.length:0;return e?(t=r||t===q?1:Ce(t),t=e-t,Nt(n,0>t?0:t,e)):[]},bn.takeRightWhile=function(n,t){return n&&n.length?Kt(n,kr(t,3),false,true):[]},bn.takeWhile=function(n,t){return n&&n.length?Kt(n,kr(t,3)):[]},bn.tap=function(n,t){return t(n),n},bn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new iu("Expected a function");return me(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),le(n,t,{leading:e,maxWait:t, +trailing:u})},bn.thru=ne,bn.toArray=Be,bn.toPairs=qe,bn.toPairsIn=function(n){return w(n,Ze(n))},bn.toPath=function(n){return qo(n)?a(n,String):qr(n)},bn.toPlainObject=Me,bn.transform=function(n,t,r){var e=qo(n)||Re(n);if(t=kr(t,4),null==r)if(e||me(n)){var o=n.constructor;r=e?qo(n)?new o:[]:be(o)?ft(mu(n)):{}}else r={};return(e?u:_t)(n,function(n,e,u){return t(r,n,e,u)}),r},bn.unary=function(n){return ie(n,1)},bn.union=yo,bn.unionBy=bo,bn.unionWith=xo,bn.uniq=function(n){return n&&n.length?Tt(n):[]; +},bn.uniqBy=function(n,t){return n&&n.length?Tt(n,kr(t)):[]},bn.uniqWith=function(n,t){return n&&n.length?Tt(n,q,t):[]},bn.unset=function(n,t){var r;if(null==n)r=true;else{r=n;var e=t,e=Lr(e,r)?[e+""]:et(e);r=Zr(r,e),e=Vr(e),r=null!=r&&Fe(r,e)?delete r[e]:true}return r},bn.unzip=Hr,bn.unzipWith=Qr,bn.update=function(n,t,r){return null==n?n:Ft(n,t,rt(r)(dt(n,t)),void 0)},bn.updateWith=function(n,t,r,e){return e=typeof e=="function"?e:q,null!=n&&(n=Ft(n,t,rt(r)(dt(n,t)),e)),n},bn.values=Pe,bn.valuesIn=function(n){ +return null==n?[]:O(n,Ze(n))},bn.without=jo,bn.words=Ve,bn.wrap=function(n,t){return t=null==t?Ye:t,No(t,n)},bn.xor=mo,bn.xorBy=wo,bn.xorWith=Ao,bn.zip=Oo,bn.zipObject=function(n,t){return Jt(n||[],t||[],Hn)},bn.zipObjectDeep=function(n,t){return Jt(n||[],t||[],Ft)},bn.zipWith=ko,bn.extend=Ko,bn.extendWith=Go,Qe(bn,bn),bn.add=function(n,t){var r;return n===q&&t===q?0:(n!==q&&(r=n),t!==q&&(r=r===q?t:r+t),r)},bn.attempt=pi,bn.camelCase=oi,bn.capitalize=Te,bn.ceil=Ai,bn.clamp=function(n,t,r){return r===q&&(r=t, +t=q),r!==q&&(r=ze(r),r=r===r?r:0),t!==q&&(t=ze(t),t=t===t?t:0),ut(ze(n),t,r)},bn.clone=function(n){return ot(n,false,true)},bn.cloneDeep=function(n){return ot(n,true,true)},bn.cloneDeepWith=function(n,t){return ot(n,true,true,t)},bn.cloneWith=function(n,t){return ot(n,false,true,t)},bn.deburr=Ke,bn.endsWith=function(n,t,r){n=Le(n),t=typeof t=="string"?t:t+"";var e=n.length;return r=r===q?e:ut(Ce(r),0,e),r-=t.length,r>=0&&n.indexOf(t,r)==r},bn.eq=pe,bn.escape=function(n){return(n=Le(n))&&Q.test(n)?n.replace(Y,W):n}, +bn.escapeRegExp=function(n){return(n=Le(n))&&fn.test(n)?n.replace(on,"\\$&"):n},bn.every=function(n,t,r){var e=qo(n)?o:lt;return r&&Mr(n,t,r)&&(t=q),e(n,kr(t,3))},bn.find=function(n,t){if(t=kr(t,3),qo(n)){var r=g(n,t);return r>-1?n[r]:q}return v(n,t,Qu)},bn.findIndex=function(n,t){return n&&n.length?g(n,kr(t,3)):-1},bn.findKey=function(n,t){return v(n,kr(t,3),_t,true)},bn.findLast=function(n,t){if(t=kr(t,3),qo(n)){var r=g(n,t,true);return r>-1?n[r]:q}return v(n,t,Xu)},bn.findLastIndex=function(n,t){return n&&n.length?g(n,kr(t,3),true):-1; +},bn.findLastKey=function(n,t){return v(n,kr(t,3),vt,true)},bn.floor=Oi,bn.forEach=re,bn.forEachRight=ee,bn.forIn=function(n,t){return null==n?n:no(n,rt(t),Ze)},bn.forInRight=function(n,t){return null==n?n:to(n,rt(t),Ze)},bn.forOwn=function(n,t){return n&&_t(n,rt(t))},bn.forOwnRight=function(n,t){return n&&vt(n,rt(t))},bn.get=$e,bn.gt=_e,bn.gte=function(n,t){return n>=t},bn.has=Fe,bn.hasIn=Ne,bn.head=Gr,bn.identity=Ye,bn.includes=function(n,t,r,e){return n=ge(n)?n:Pe(n),r=r&&!e?Ce(r):0,e=n.length,0>r&&(r=Uu(e+r,0)), +Ie(n)?e>=r&&-1r&&(r=Uu(e+r,0)),d(n,t,r)):-1},bn.inRange=function(n,t,r){return t=ze(t)||0,r===q?(r=t,t=0):r=ze(r)||0,n=ze(n),n>=zu(t,r)&&n=-9007199254740991&&9007199254740991>=n; +},bn.isSet=function(n){return we(n)&&"[object Set]"==Rr(n)},bn.isString=Ie,bn.isSymbol=Se,bn.isTypedArray=Re,bn.isUndefined=function(n){return n===q},bn.isWeakMap=function(n){return we(n)&&"[object WeakMap]"==Rr(n)},bn.isWeakSet=function(n){return we(n)&&"[object WeakSet]"==pu.call(n)},bn.join=function(n,t){return n?Bu.call(n,t):""},bn.kebabCase=ii,bn.last=Vr,bn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(r!==q&&(u=Ce(r),u=(0>u?Uu(e+u,0):zu(u,e-1))+1),t!==t)return C(n,u,true); +for(;u--;)if(n[u]===t)return u;return-1},bn.lowerCase=fi,bn.lowerFirst=ci,bn.lt=We,bn.lte=function(n,t){return t>=n},bn.max=function(n){return n&&n.length?_(n,Ye,_e):q},bn.maxBy=function(n,t){return n&&n.length?_(n,kr(t),_e):q},bn.mean=function(n){return tu(n)/(n?n.length:0)},bn.min=function(n){return n&&n.length?_(n,Ye,We):q},bn.minBy=function(n,t){return n&&n.length?_(n,kr(t),We):q},bn.noConflict=function(){return Vn._===this&&(Vn._=_u),this},bn.noop=Xe,bn.now=Uo,bn.pad=function(n,t,r){n=Le(n), +t=Ce(t);var e=N(n);return t&&t>e?(e=(t-e)/2,t=Ru(e),e=Su(e),dr("",t,r)+n+dr("",e,r)):n},bn.padEnd=function(n,t,r){return n=Le(n),n+dr(n,t,r)},bn.padStart=function(n,t,r){return n=Le(n),dr(n,t,r)+n},bn.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),n=Le(n).replace(cn,""),Mu(n,t||(_n.test(n)?16:10))},bn.random=function(n,t,r){if(r&&typeof r!="boolean"&&Mr(n,t,r)&&(t=r=q),r===q&&(typeof t=="boolean"?(r=t,t=q):typeof n=="boolean"&&(r=n,n=q)),n===q&&t===q?(n=0,t=1):(n=ze(n)||0,t===q?(t=n,n=0):t=ze(t)||0), +n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Lu(),zu(n+r*(t-n+Nn("1e-"+((r+"").length-1))),t)):$t(n,t)},bn.reduce=function(n,t,r){var e=qo(n)?s:b,u=3>arguments.length;return e(n,kr(t,4),r,u,Qu)},bn.reduceRight=function(n,t,r){var e=qo(n)?h:b,u=3>arguments.length;return e(n,kr(t,4),r,u,Xu)},bn.repeat=Ge,bn.replace=function(){var n=arguments,t=Le(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},bn.result=function(n,t,r){if(Lr(t,n))e=null==n?q:n[t];else{t=et(t);var e=$e(n,t);n=Zr(n,t)}return e===q&&(e=r), +be(e)?e.call(n):e},bn.round=ki,bn.runInContext=Z,bn.sample=function(n){n=ge(n)?n:Pe(n);var t=n.length;return t>0?n[$t(0,t-1)]:q},bn.size=function(n){if(null==n)return 0;if(ge(n)){var t=n.length;return t&&Ie(n)?N(n):t}return De(n).length},bn.snakeCase=li,bn.some=function(n,t,r){var e=qo(n)?p:Dt;return r&&Mr(n,t,r)&&(t=q),e(n,kr(t,3))},bn.sortedIndex=function(n,t){return Zt(n,t)},bn.sortedIndexBy=function(n,t,r){return qt(n,t,kr(r))},bn.sortedIndexOf=function(n,t){var r=n?n.length:0;if(r){var e=Zt(n,t); +if(r>e&&pe(n[e],t))return e}return-1},bn.sortedLastIndex=function(n,t){return Zt(n,t,true)},bn.sortedLastIndexBy=function(n,t,r){return qt(n,t,kr(r),true)},bn.sortedLastIndexOf=function(n,t){if(n&&n.length){var r=Zt(n,t,true)-1;if(pe(n[r],t))return r}return-1},bn.startCase=si,bn.startsWith=function(n,t,r){return n=Le(n),r=ut(Ce(r),0,n.length),n.lastIndexOf(t,r)==r},bn.subtract=function(n,t){var r;return n===q&&t===q?0:(n!==q&&(r=n),t!==q&&(r=r===q?t:r-t),r)},bn.sum=tu,bn.sumBy=function(n,t){return n&&n.length?j(n,kr(t)):0; +},bn.template=function(n,t,r){var e=bn.templateSettings;r&&Mr(n,t,r)&&(t=q),n=Le(n),t=Go({},t,e,Gn),r=Go({},t.imports,e.imports,Gn);var u,o,i=De(r),f=O(r,i),c=0;r=t.interpolate||jn;var a="__p+='";r=ou((t.escape||jn).source+"|"+r.source+"|"+(r===tn?hn:jn).source+"|"+(t.evaluate||jn).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,i,f,l){return e||(e=i),a+=n.slice(c,l).replace(mn,B),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"), +e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t}),a+="';",(t=t.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(K,""):a).replace(G,"$1").replace(V,"$1;"),a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",t=pi(function(){return Function(i,l+"return "+a).apply(q,f)}),t.source=a,ye(t))throw t;return t},bn.times=function(n,t){if(n=Ce(n),1>n||n>9007199254740991)return[]; +var r=4294967295,e=zu(n,4294967295);for(t=rt(t),n-=4294967295,e=m(e,t);++r=o)return n;if(o=r-N(e),1>o)return e; +if(r=i?i.slice(0,o).join(""):n.slice(0,o),u===q)return r+e;if(i&&(o+=r.length-o),Ee(u)){if(n.slice(o).search(u)){var f=r;for(u.global||(u=ou(u.source,Le(pn.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===q?o:c)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},bn.unescape=function(n){return(n=Le(n))&&H.test(n)?n.replace(J,D):n},bn.uniqueId=function(n){var t=++su;return Le(n)+t},bn.upperCase=hi,bn.upperFirst=ai,bn.each=re,bn.eachRight=ee,bn.first=Gr, +Qe(bn,function(){var n={};return _t(bn,function(t,r){lu.call(bn.prototype,r)||(n[r]=t)}),n}(),{chain:false}),bn.VERSION="4.6.1",u("bind bindKey curry curryRight partial partialRight".split(" "),function(n){bn[n].placeholder=bn}),u(["drop","take"],function(n,t){On.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new On(this);r=r===q?1:Uu(Ce(r),0);var u=this.clone();return e?u.__takeCount__=zu(r,u.__takeCount__):u.__views__.push({size:zu(r,4294967295),type:n+(0>u.__dir__?"Right":"")}), +u},On.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;On.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:kr(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");On.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");On.prototype[n]=function(){return this.__filtered__?new On(this):this[r](1); +}}),On.prototype.compact=function(){return this.filter(Ye)},On.prototype.find=function(n){return this.filter(n).head()},On.prototype.findLast=function(n){return this.reverse().find(n)},On.prototype.invokeMap=he(function(n,t){return typeof n=="function"?new On(this):this.map(function(r){return mt(r,n,t)})}),On.prototype.reject=function(n){return n=kr(n,3),this.filter(function(t){return!n(t)})},On.prototype.slice=function(n,t){n=Ce(n);var r=this;return r.__filtered__&&(n>0||0>t)?new On(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)), +t!==q&&(t=Ce(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},On.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},On.prototype.toArray=function(){return this.take(4294967295)},_t(On.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=bn[e?"take"+("last"==t?"Right":""):t],o=e||/^find/.test(t);u&&(bn.prototype[t]=function(){function t(n){return n=u.apply(bn,l([n],f)),e&&h?n[0]:n}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof On,a=f[0],s=c||qo(i); +s&&r&&typeof a=="function"&&1!=a.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&s?(i=c?i:new On(this),i=n.apply(i,f),i.__actions__.push({func:ne,args:[t],thisArg:q}),new An(i,h)):a&&c?n.apply(this,f):(i=this.thru(t),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=fu[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);bn.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){ +return t.apply(r,n)})}}),_t(On.prototype,function(n,t){var r=bn[t];if(r){var e=r.name+"";(Tu[e]||(Tu[e]=[])).push({name:t,func:r})}}),Tu[_r(q,2).name]=[{name:"wrapper",func:q}],On.prototype.clone=function(){var n=new On(this.__wrapped__);return n.__actions__=nr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=nr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=nr(this.__views__),n},On.prototype.reverse=function(){if(this.__filtered__){var n=new On(this); +n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},On.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=qo(t),u=0>r,o=e?t.length:0;n=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++co||o==n&&a==n)return Gt(t,this.__actions__); +e=[];n:for(;n--&&a>c;){for(u+=r,o=-1,l=t[u];++o=this.__values__.length,t=n?q:this.__values__[this.__index__++]; +return{done:n,value:t}},bn.prototype.plant=function(n){for(var t,r=this;r instanceof wn;){var e=Pr(r);e.__index__=0,e.__values__=q,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},bn.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof On?(this.__actions__.length&&(n=new On(this)),n=n.reverse(),n.__actions__.push({func:ne,args:[Yr],thisArg:q}),new An(n,this.__chain__)):this.thru(Yr)},bn.prototype.toJSON=bn.prototype.valueOf=bn.prototype.value=function(){return Gt(this.__wrapped__,this.__actions__); +},Au&&(bn.prototype[Au]=te),bn}var q,P=1/0,T=NaN,K=/\b__p\+='';/g,G=/\b(__p\+=)''\+/g,V=/(__e\(.*?\)|\b__t\))\+'';/g,J=/&(?:amp|lt|gt|quot|#39|#96);/g,Y=/[&<>"'`]/g,H=RegExp(J.source),Q=RegExp(Y.source),X=/<%-([\s\S]+?)%>/g,nn=/<%([\s\S]+?)%>/g,tn=/<%=([\s\S]+?)%>/g,rn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,en=/^\w*$/,un=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,on=/[\\^$.*+?()[\]{}|]/g,fn=RegExp(on.source),cn=/^\s+|\s+$/g,an=/^\s+/,ln=/\s+$/,sn=/\\(\\)?/g,hn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pn=/\w*$/,_n=/^0x/i,vn=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,dn=/^\[object .+?Constructor\]$/,yn=/^0o[0-7]+$/i,bn=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,jn=/($^)/,mn=/['\n\r\u2028\u2029\\]/g,wn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",An="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+wn,On="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",kn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),En=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+On+wn,"g"),In=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Sn=/[a-zA-Z0-9]+/g,Rn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|\\d+",An].join("|"),"g"),Wn=/[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bn="Array Buffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Cn={}; +Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object Date]"]=Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object WeakMap]"]=false; +var Un={};Un["[object Arguments]"]=Un["[object Array]"]=Un["[object ArrayBuffer]"]=Un["[object Boolean]"]=Un["[object Date]"]=Un["[object Float32Array]"]=Un["[object Float64Array]"]=Un["[object Int8Array]"]=Un["[object Int16Array]"]=Un["[object Int32Array]"]=Un["[object Map]"]=Un["[object Number]"]=Un["[object Object]"]=Un["[object RegExp]"]=Un["[object Set]"]=Un["[object String]"]=Un["[object Symbol]"]=Un["[object Uint8Array]"]=Un["[object Uint8ClampedArray]"]=Un["[object Uint16Array]"]=Un["[object Uint32Array]"]=true, +Un["[object Error]"]=Un["[object Function]"]=Un["[object WeakMap]"]=false;var zn={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O", +"\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Mn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ln={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},$n={"function":true,object:true},Fn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029" +},Nn=parseFloat,Dn=parseInt,Zn=$n[typeof exports]&&exports&&!exports.nodeType?exports:q,qn=$n[typeof module]&&module&&!module.nodeType?module:q,Pn=qn&&qn.exports===Zn?Zn:q,Tn=I($n[typeof self]&&self),Kn=I($n[typeof window]&&window),Gn=I($n[typeof this]&&this),Vn=I(Zn&&qn&&typeof global=="object"&&global)||Kn!==(Gn&&Gn.window)&&Kn||Tn||Gn||Function("return this")(),Jn=Z();(Kn||Tn||{})._=Jn,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Jn}):Zn&&qn?(Pn&&((qn.exports=Jn)._=Jn), +Zn._=Jn):Vn._=Jn}).call(this); \ No newline at end of file diff --git a/public/bower_components/lodash/dist/mapping.fp.js b/public/bower_components/lodash/dist/mapping.fp.js index ba7376c..aace656 100644 --- a/public/bower_components/lodash/dist/mapping.fp.js +++ b/public/bower_components/lodash/dist/mapping.fp.js @@ -111,25 +111,25 @@ return /******/ (function(modules) { // webpackBootstrap 'hasIn', 'includes', 'indexOf', 'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', 'maxBy', 'merge', 'minBy', 'omit', - 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', - 'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll', - 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', - 'repeat', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', - 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', - 'split', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', 'takeRightWhile', - 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars', 'trimCharsEnd', - 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith', 'unset', - 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject', 'zipObjectDeep' + 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', + 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll', 'pullAt', + 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'result', + 'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex', + 'sortedLastIndexOf', 'sortedUniqBy', 'split', 'startsWith', 'subtract', 'sumBy', + 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', + 'times', 'trimChars', 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', + 'uniqBy', 'uniqWith', 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', + 'zipObject', 'zipObjectDeep' ], '3': [ 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', 'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'isEqualWith', - 'isMatchWith', 'mergeWith', 'orderBy', 'pullAllBy', 'reduce', 'reduceRight', - 'replace', 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', - 'unionBy', 'unionWith', 'xorBy', 'xorWith', 'zipWith' + 'isMatchWith', 'mergeWith', 'orderBy', 'pullAllBy', 'pullAllWith', 'reduce', + 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', + 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith' ], '4': [ - 'fill', 'setWith' + 'fill', 'setWith', 'updateWith' ] }; @@ -193,9 +193,11 @@ return /******/ (function(modules) { // webpackBootstrap 'isMatchWith': [2, 1, 0], 'mergeWith': [1, 2, 0], 'pullAllBy': [2, 1, 0], + 'pullAllWith': [2, 1, 0], 'setWith': [3, 1, 2, 0], 'sortedIndexBy': [2, 1, 0], 'sortedLastIndexBy': [2, 1, 0], + 'updateWith': [3, 1, 2, 0], 'zipWith': [1, 2, 0] }; @@ -212,6 +214,7 @@ return /******/ (function(modules) { // webpackBootstrap 'pull': true, 'pullAll': true, 'pullAllBy': true, + 'pullAllWith': true, 'pullAt': true, 'remove': true, 'reverse': true @@ -229,7 +232,9 @@ return /******/ (function(modules) { // webpackBootstrap 'set': { 'set': true, 'setWith': true, - 'unset': true + 'unset': true, + 'update': true, + 'updateWith': true } }; diff --git a/public/bower_components/lodash/doc/README.md b/public/bower_components/lodash/doc/README.md index ef5893c..cce7cf4 100644 --- a/public/bower_components/lodash/doc/README.md +++ b/public/bower_components/lodash/doc/README.md @@ -1,4 +1,4 @@ -# lodash v4.5.1 +# lodash v4.6.1 @@ -35,6 +35,7 @@ * `_.pull` * `_.pullAll` * `_.pullAllBy` +* `_.pullAllWith` * `_.pullAt` * `_.remove` * `_.reverse` @@ -270,6 +271,8 @@ * `_.toPairsIn` * `_.transform` * `_.unset` +* `_.update` +* `_.updateWith` * `_.values` * `_.valuesIn` @@ -391,7 +394,7 @@ ### `_.chunk(array, [size=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5480 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5505 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package") Creates an array of elements split into groups the length of `size`. If `array` can't be split evenly, the final chunk will be the remaining @@ -419,7 +422,7 @@ _.chunk(['a', 'b', 'c', 'd'], 3); ### `_.compact(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5511 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5536 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package") Creates an array with all falsey values removed. The values `false`, `null`, `0`, `""`, `undefined`, and `NaN` are falsey. @@ -442,7 +445,7 @@ _.compact([0, 1, false, 2, '', 3]); ### `_.concat(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5547 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5572 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package") Creates a new array concatenating `array` with any additional arrays and/or values. @@ -472,11 +475,12 @@ console.log(array); ### `_.difference(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5571 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5597 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package") Creates an array of unique `array` values not included in the other given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) -for equality comparisons. +for equality comparisons. The order of result values is determined by the +order they occur in the first array. #### Arguments 1. `array` *(Array)*: The array to inspect. @@ -497,11 +501,12 @@ _.difference([3, 2, 1], [4, 2]); ### `_.differenceBy(array, [values], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5598 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5625 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package") This method is like `_.difference` except that it accepts `iteratee` which is invoked for each element of `array` and `values` to generate the criterion -by which uniqueness is computed. The iteratee is invoked with one argument: (value). +by which they're compared. Result values are chosen from the first array. +The iteratee is invoked with one argument: (value). #### Arguments 1. `array` *(Array)*: The array to inspect. @@ -527,11 +532,12 @@ _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); ### `_.differenceWith(array, [values], [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5627 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5655 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package") This method is like `_.difference` except that it accepts `comparator` -which is invoked to compare elements of `array` to `values`. The comparator -is invoked with two arguments: (arrVal, othVal). +which is invoked to compare elements of `array` to `values`. Result values +are chosen from the first array. The comparator is invoked with two arguments:
              +(arrVal, othVal). #### Arguments 1. `array` *(Array)*: The array to inspect. @@ -555,7 +561,7 @@ _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); ### `_.drop(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5661 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5689 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package") Creates a slice of `array` with `n` elements dropped from the beginning. @@ -587,7 +593,7 @@ _.drop([1, 2, 3], 0); ### `_.dropRight(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5694 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5722 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package") Creates a slice of `array` with `n` elements dropped from the end. @@ -619,7 +625,7 @@ _.dropRight([1, 2, 3], 0); ### `_.dropRightWhile(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5738 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5766 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package") Creates a slice of `array` excluding elements dropped from the end. Elements are dropped until `predicate` returns falsey. The predicate is @@ -662,7 +668,7 @@ _.dropRightWhile(users, 'active'); ### `_.dropWhile(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5778 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5806 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package") Creates a slice of `array` excluding elements dropped from the beginning. Elements are dropped until `predicate` returns falsey. The predicate is @@ -705,7 +711,7 @@ _.dropWhile(users, 'active'); ### `_.fill(array, value, [start=0], [end=array.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5812 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5840 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package") Fills elements of `array` with `value` from `start` up to, but not including, `end`. @@ -743,7 +749,7 @@ _.fill([4, 6, 8, 10], '*', 1, 3); ### `_.findIndex(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5857 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5885 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package") This method is like `_.find` except that it returns the index of the first element `predicate` returns truthy for instead of the element itself. @@ -785,7 +791,7 @@ _.findIndex(users, 'active'); ### `_.findLastIndex(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5896 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5924 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package") This method is like `_.findIndex` except that it iterates over elements of `collection` from right to left. @@ -827,7 +833,7 @@ _.findLastIndex(users, 'active'); ### `_.flatten(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5915 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5943 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package") Flattens `array` a single level deep. @@ -849,7 +855,7 @@ _.flatten([1, [2, [3, [4]], 5]]); ### `_.flattenDeep(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5933 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5961 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package") Recursively flattens `array`. @@ -871,7 +877,7 @@ _.flattenDeep([1, [2, [3, [4]], 5]]); ### `_.flattenDepth(array, [depth=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5957 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L5985 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package") Recursively flatten `array` up to `depth` times. @@ -899,7 +905,7 @@ _.flattenDepth(array, 2); ### `_.fromPairs(pairs)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L5980 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6008 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package") The inverse of `_.toPairs`; this method returns an object composed from key-value `pairs`. @@ -922,7 +928,7 @@ _.fromPairs([['fred', 30], ['barney', 40]]); ### `_.head(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6009 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6037 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package") Gets the first element of `array`. @@ -950,7 +956,7 @@ _.head([]); ### `_.indexOf(array, value, [fromIndex=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6035 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6063 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package") Gets the index at which the first occurrence of `value` is found in `array` using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) @@ -981,7 +987,7 @@ _.indexOf([1, 2, 1, 2], 2, 2); ### `_.initial(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6060 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6088 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package") Gets all but the last element of `array`. @@ -1003,17 +1009,18 @@ _.initial([1, 2, 3]); ### `_.intersection([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6079 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6108 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package") Creates an array of unique values that are included in all given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) -for equality comparisons. +for equality comparisons. The order of result values is determined by the +order they occur in the first array. #### Arguments 1. `[arrays]` *(...Array)*: The arrays to inspect. #### Returns -*(Array)*: Returns the new array of shared values. +*(Array)*: Returns the new array of intersecting values. #### Example ```js @@ -1027,18 +1034,19 @@ _.intersection([2, 1], [4, 2], [1, 2]); ### `_.intersectionBy([arrays], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6106 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6136 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package") This method is like `_.intersection` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion -by which uniqueness is computed. The iteratee is invoked with one argument: (value). +by which they're compared. Result values are chosen from the first array. +The iteratee is invoked with one argument: (value). #### Arguments 1. `[arrays]` *(...Array)*: The arrays to inspect. 2. `[iteratee=_.identity]` *(Function|Object|string)*: The iteratee invoked per element. #### Returns -*(Array)*: Returns the new array of shared values. +*(Array)*: Returns the new array of intersecting values. #### Example ```js @@ -1056,18 +1064,19 @@ _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); ### `_.intersectionWith([arrays], [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6139 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6170 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package") This method is like `_.intersection` except that it accepts `comparator` -which is invoked to compare elements of `arrays`. The comparator is invoked -with two arguments: (arrVal, othVal). +which is invoked to compare elements of `arrays`. Result values are chosen +from the first array. The comparator is invoked with two arguments:
              +(arrVal, othVal). #### Arguments 1. `[arrays]` *(...Array)*: The arrays to inspect. 2. `[comparator]` *(Function)*: The comparator invoked per element. #### Returns -*(Array)*: Returns the new array of shared values. +*(Array)*: Returns the new array of intersecting values. #### Example ```js @@ -1084,7 +1093,7 @@ _.intersectionWith(objects, others, _.isEqual); ### `_.join(array, [separator=','])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6167 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6198 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package") Converts all elements in `array` into a string separated by `separator`. @@ -1107,7 +1116,7 @@ _.join(['a', 'b', 'c'], '~'); ### `_.last(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6184 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6215 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package") Gets the last element of `array`. @@ -1129,7 +1138,7 @@ _.last([1, 2, 3]); ### `_.lastIndexOf(array, value, [fromIndex=array.length-1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6209 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6240 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package") This method is like `_.indexOf` except that it iterates over elements of `array` from right to left. @@ -1158,7 +1167,7 @@ _.lastIndexOf([1, 2, 1, 2], 2, 2); ### `_.pull(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6252 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6283 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package") Removes all given values from `array` using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) @@ -1190,7 +1199,7 @@ console.log(array); ### `_.pullAll(array, values)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6273 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6304 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package") This method is like `_.pull` except that it accepts an array of values to remove.
              @@ -1219,11 +1228,11 @@ console.log(array); ### `_.pullAllBy(array, values, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6301 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6332 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package") This method is like `_.pullAll` except that it accepts `iteratee` which is invoked for each element of `array` and `values` to generate the criterion -by which uniqueness is computed. The iteratee is invoked with one argument: (value). +by which they're compared. The iteratee is invoked with one argument: (value).

              **Note:** Unlike `_.differenceBy`, this method mutates `array`. @@ -1250,8 +1259,40 @@ console.log(array); +### `_.pullAllWith(array, values, [comparator])` +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6360 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullallwith "See the npm package") + +This method is like `_.pullAll` except that it accepts `comparator` which +is invoked to compare elements of `array` to `values`. The comparator is +invoked with two arguments: (arrVal, othVal). +
              +
              +**Note:** Unlike `_.differenceWith`, this method mutates `array`. + +#### Arguments +1. `array` *(Array)*: The array to modify. +2. `values` *(Array)*: The values to remove. +3. `[comparator]` *(Function)*: The comparator invoked per element. + +#### Returns +*(Array)*: Returns `array`. + +#### Example +```js +var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + +_.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); +console.log(array); +// => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] +``` +* * * + + + + + ### `_.pullAt(array, [indexes])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6331 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6390 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package") Removes elements from `array` corresponding to `indexes` and returns an array of removed elements. @@ -1284,7 +1325,7 @@ console.log(evens); ### `_.remove(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6366 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6425 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package") Removes all elements from `array` that `predicate` returns truthy for and returns an array of the removed elements. The predicate is invoked @@ -1321,7 +1362,7 @@ console.log(evens); ### `_.reverse()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6408 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6467 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package") Reverses `array` so that the first element becomes the last, the second element becomes the second to last, and so on. @@ -1350,7 +1391,7 @@ console.log(array); ### `_.slice(array, [start=0], [end=array.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6426 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6485 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package") Creates a slice of `array` from `start` up to, but not including, `end`.
              @@ -1373,7 +1414,7 @@ to ensure dense arrays are returned. ### `_.sortedIndex(array, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6460 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6519 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package") Uses a binary search to determine the lowest index at which `value` should be inserted into `array` in order to maintain its sort order. @@ -1400,7 +1441,7 @@ _.sortedIndex([4, 5], 4); ### `_.sortedIndexBy(array, value, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6487 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6546 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package") This method is like `_.sortedIndex` except that it accepts `iteratee` which is invoked for `value` and each element of `array` to compute their @@ -1432,7 +1473,7 @@ _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); ### `_.sortedIndexOf(array, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6506 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6565 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package") This method is like `_.indexOf` except that it performs a binary search on a sorted `array`. @@ -1456,7 +1497,7 @@ _.sortedIndexOf([1, 1, 2, 2], 2); ### `_.sortedLastIndex(array, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6533 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6592 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package") This method is like `_.sortedIndex` except that it returns the highest index at which `value` should be inserted into `array` in order to @@ -1481,7 +1522,7 @@ _.sortedLastIndex([4, 5], 4); ### `_.sortedLastIndexBy(array, value, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6555 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6614 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package") This method is like `_.sortedLastIndex` except that it accepts `iteratee` which is invoked for `value` and each element of `array` to compute their @@ -1508,7 +1549,7 @@ _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); ### `_.sortedLastIndexOf(array, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6574 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6633 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package") This method is like `_.lastIndexOf` except that it performs a binary search on a sorted `array`. @@ -1532,7 +1573,7 @@ _.sortedLastIndexOf([1, 1, 2, 2], 2); ### `_.sortedUniq(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6599 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6658 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package") This method is like `_.uniq` except that it's designed and optimized for sorted arrays. @@ -1555,7 +1596,7 @@ _.sortedUniq([1, 1, 2]); ### `_.sortedUniqBy(array, [iteratee])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6620 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6679 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package") This method is like `_.uniqBy` except that it's designed and optimized for sorted arrays. @@ -1579,7 +1620,7 @@ _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); ### `_.tail(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6639 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6698 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package") Gets all but the first element of `array`. @@ -1601,7 +1642,7 @@ _.tail([1, 2, 3]); ### `_.take(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6667 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6726 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package") Creates a slice of `array` with `n` elements taken from the beginning. @@ -1633,7 +1674,7 @@ _.take([1, 2, 3], 0); ### `_.takeRight(array, [n=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6699 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6758 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package") Creates a slice of `array` with `n` elements taken from the end. @@ -1665,7 +1706,7 @@ _.takeRight([1, 2, 3], 0); ### `_.takeRightWhile(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6743 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6802 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package") Creates a slice of `array` with elements taken from the end. Elements are taken until `predicate` returns falsey. The predicate is invoked with three @@ -1708,7 +1749,7 @@ _.takeRightWhile(users, 'active'); ### `_.takeWhile(array, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6783 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6842 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package") Creates a slice of `array` with elements taken from the beginning. Elements are taken until `predicate` returns falsey. The predicate is invoked with @@ -1751,7 +1792,7 @@ _.takeWhile(users, 'active'); ### `_.union([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6804 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6863 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package") Creates an array of unique values, in order, from all given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) @@ -1775,7 +1816,7 @@ _.union([2, 1], [4, 2], [1, 2]); ### `_.unionBy([arrays], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6828 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6887 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package") This method is like `_.union` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion by which @@ -1804,7 +1845,7 @@ _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); ### `_.unionWith([arrays], [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6855 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6914 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package") This method is like `_.union` except that it accepts `comparator` which is invoked to compare elements of `arrays`. The comparator is invoked @@ -1832,7 +1873,7 @@ _.unionWith(objects, others, _.isEqual); ### `_.uniq(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6879 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6938 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package") Creates a duplicate-free version of an array, using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) @@ -1857,7 +1898,7 @@ _.uniq([2, 1, 2]); ### `_.uniqBy(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6905 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6964 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package") This method is like `_.uniq` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -1886,7 +1927,7 @@ _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); ### `_.uniqWith(array, [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6929 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L6988 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package") This method is like `_.uniq` except that it accepts `comparator` which is invoked to compare elements of `array`. The comparator is invoked with @@ -1913,7 +1954,7 @@ _.uniqWith(objects, _.isEqual); ### `_.unzip(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6953 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7012 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package") This method is like `_.zip` except that it accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip @@ -1940,7 +1981,7 @@ _.unzip(zipped); ### `_.unzipWith(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L6988 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7047 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package") This method is like `_.unzip` except that it accepts `iteratee` to specify how regrouped values should be combined. The iteratee is invoked with the @@ -1968,7 +2009,7 @@ _.unzipWith(zipped, _.add); ### `_.without(array, [values])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7017 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7076 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package") Creates an array excluding all given values using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) @@ -1993,10 +2034,11 @@ _.without([1, 2, 1, 3], 1, 2); ### `_.xor([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7037 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7097 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package") Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) -of the given arrays. +of the given arrays. The order of result values is determined by the order +they occur in the arrays. #### Arguments 1. `[arrays]` *(...Array)*: The arrays to inspect. @@ -2016,11 +2058,11 @@ _.xor([2, 1], [4, 2]); ### `_.xorBy([arrays], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7061 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7121 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package") This method is like `_.xor` except that it accepts `iteratee` which is invoked for each element of each `arrays` to generate the criterion by which -uniqueness is computed. The iteratee is invoked with one argument: (value). +by which they're compared. The iteratee is invoked with one argument: (value). #### Arguments 1. `[arrays]` *(...Array)*: The arrays to inspect. @@ -2045,7 +2087,7 @@ _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); ### `_.xorWith([arrays], [comparator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7088 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7148 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package") This method is like `_.xor` except that it accepts `comparator` which is invoked to compare elements of `arrays`. The comparator is invoked with @@ -2073,7 +2115,7 @@ _.xorWith(objects, others, _.isEqual); ### `_.zip([arrays])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7111 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7171 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package") Creates an array of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements @@ -2097,7 +2139,7 @@ _.zip(['fred', 'barney'], [30, 40], [true, false]); ### `_.zipObject([props=[]], [values=[]])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7128 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7188 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package") This method is like `_.fromPairs` except that it accepts two arrays, one of property names and one of corresponding values. @@ -2121,7 +2163,7 @@ _.zipObject(['a', 'b'], [1, 2]); ### `_.zipObjectDeep([props=[]], [values=[]])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7146 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7206 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package") This method is like `_.zipObject` except that it supports property paths. @@ -2144,7 +2186,7 @@ _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); ### `_.zipWith([arrays], [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7168 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7228 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package") This method is like `_.zip` except that it accepts `iteratee` to specify how grouped values should be combined. The iteratee is invoked with the @@ -2177,7 +2219,7 @@ _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { ### `_.countBy(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7559 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7619 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package") Creates an object composed of keys generated from the results of running each element of `collection` through `iteratee`. The corresponding value @@ -2206,7 +2248,7 @@ _.countBy(['one', 'two', 'three'], 'length'); ### `_.every(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7597 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7657 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package") Checks if `predicate` returns truthy for **all** elements of `collection`. Iteration is stopped once `predicate` returns falsey. The predicate is @@ -2248,7 +2290,7 @@ _.every(users, 'active'); ### `_.filter(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7638 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7698 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package") Iterates over elements of `collection`, returning an array of all elements `predicate` returns truthy for. The predicate is invoked with three arguments:
              @@ -2290,7 +2332,7 @@ _.filter(users, 'active'); ### `_.find(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7677 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7737 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package") Iterates over elements of `collection`, returning the first element `predicate` returns truthy for. The predicate is invoked with three arguments:
              @@ -2333,7 +2375,7 @@ _.find(users, 'active'); ### `_.findLast(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7703 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7763 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package") This method is like `_.find` except that it iterates over elements of `collection` from right to left. @@ -2359,7 +2401,7 @@ _.findLast([1, 2, 3, 4], function(n) { ### `_.flatMap(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7732 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7792 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package") Creates an array of flattened values by running each element in `collection` through `iteratee` and concating its result to the other mapped values. @@ -2388,7 +2430,7 @@ _.flatMap([1, 2], duplicate); ### `_.forEach(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7764 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7824 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package") Iterates over elements of `collection` invoking `iteratee` for each element. The iteratee is invoked with three arguments: (value, index|key, collection). @@ -2428,7 +2470,7 @@ _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { ### `_.forEachRight(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7788 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7848 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package") This method is like `_.forEach` except that it iterates over elements of `collection` from right to left. @@ -2457,7 +2499,7 @@ _.forEachRight([1, 2], function(value) { ### `_.groupBy(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7815 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7875 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package") Creates an object composed of keys generated from the results of running each element of `collection` through `iteratee`. The corresponding value @@ -2487,7 +2529,7 @@ _.groupBy(['one', 'two', 'three'], 'length'); ### `_.includes(collection, value, [fromIndex=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7851 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7911 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package") Checks if `value` is in `collection`. If `collection` is a string it's checked for a substring of `value`, otherwise [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) @@ -2523,7 +2565,7 @@ _.includes('pebbles', 'eb'); ### `_.invokeMap(collection, path, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7886 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7946 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package") Invokes the method at `path` of each element in `collection`, returning an array of the results of each invoked method. Any additional arguments @@ -2553,7 +2595,7 @@ _.invokeMap([123, 456], String.prototype.split, ''); ### `_.keyBy(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7926 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7986 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package") Creates an object composed of keys generated from the results of running each element of `collection` through `iteratee`. The corresponding value @@ -2589,7 +2631,7 @@ _.keyBy(array, 'dir'); ### `_.map(collection, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7971 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8031 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package") Creates an array of values by running each element in `collection` through `iteratee`. The iteratee is invoked with three arguments:
              @@ -2641,7 +2683,7 @@ _.map(users, 'user'); ### `_.orderBy(collection, [iteratees=[_.identity]], [orders])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8003 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8063 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package") This method is like `_.sortBy` except that it allows specifying the sort orders of the iteratees to sort by. If `orders` is unspecified, all values @@ -2676,7 +2718,7 @@ _.orderBy(users, ['user', 'age'], ['asc', 'desc']); ### `_.partition(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8052 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8112 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package") Creates an array of elements split into two groups, the first of which contains elements `predicate` returns truthy for, the second of which @@ -2720,7 +2762,7 @@ _.partition(users, 'active'); ### `_.reduce(collection, [iteratee=_.identity], [accumulator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8091 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8151 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package") Reduces `collection` to a value which is the accumulated result of running each element in `collection` through `iteratee`, where each successive @@ -2766,7 +2808,7 @@ _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { ### `_.reduceRight(collection, [iteratee=_.identity], [accumulator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8118 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8178 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package") This method is like `_.reduce` except that it iterates over elements of `collection` from right to left. @@ -2795,7 +2837,7 @@ _.reduceRight(array, function(flattened, other) { ### `_.reject(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8157 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8217 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package") The opposite of `_.filter`; this method returns the elements of `collection` that `predicate` does **not** return truthy for. @@ -2836,7 +2878,7 @@ _.reject(users, 'active'); ### `_.sample(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8178 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8238 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package") Gets a random element from `collection`. @@ -2858,7 +2900,7 @@ _.sample([1, 2, 3, 4]); ### `_.sampleSize(collection, [n=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8203 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8263 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package") Gets `n` random elements at unique keys from `collection` up to the size of `collection`. @@ -2885,7 +2927,7 @@ _.sampleSize([1, 2, 3], 4); ### `_.shuffle(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8235 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8295 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package") Creates an array of shuffled values, using a version of the [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). @@ -2908,7 +2950,7 @@ _.shuffle([1, 2, 3, 4]); ### `_.size(collection)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8259 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8319 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package") Gets the size of `collection` by returning its length for array-like values or the number of own enumerable properties for objects. @@ -2937,7 +2979,7 @@ _.size('pebbles'); ### `_.some(collection, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8304 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8364 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package") Checks if `predicate` returns truthy for **any** element of `collection`. Iteration is stopped once `predicate` returns truthy. The predicate is @@ -2979,7 +3021,7 @@ _.some(users, 'active'); ### `_.sortBy(collection, [iteratees=[_.identity]])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8345 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8405 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package") Creates an array of elements, sorted in ascending order by the results of running each element in a collection through each iteratee. This method @@ -3026,7 +3068,7 @@ _.sortBy(users, 'user', function(o) { ### `_.now()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8376 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8436 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package") ({Function}): Gets the timestamp of the number of milliseconds that have elapsed since the Unix epoch (1 January 1970 00:00:00 UTC). @@ -3054,7 +3096,7 @@ _.defer(function(stamp) { ### `_.after(n, func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8403 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8463 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package") The opposite of `_.before`; this method creates a function that invokes `func` once it's called `n` or more times. @@ -3086,7 +3128,7 @@ _.forEach(saves, function(type) { ### `_.ary(func, [n=func.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8431 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8491 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package") Creates a function that accepts up to `n` arguments, ignoring any additional arguments. @@ -3110,7 +3152,7 @@ _.map(['6', '8', '10'], _.ary(parseInt, 1)); ### `_.before(n, func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8453 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8513 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package") Creates a function that invokes `func`, with the `this` binding and arguments of the created function, while it's called less than `n` times. Subsequent @@ -3135,7 +3177,7 @@ jQuery(element).on('click', _.before(5, addContactToList)); ### `_.bind(func, thisArg, [partials])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8505 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8565 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package") Creates a function that invokes `func` with the `this` binding of `thisArg` and prepends any additional `_.bind` arguments to those provided to the @@ -3181,7 +3223,7 @@ bound('hi'); ### `_.bindKey(object, key, [partials])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8558 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8618 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package") Creates a function that invokes the method at `object[key]` and prepends any additional `_.bindKey` arguments to those provided to the bound function. @@ -3236,7 +3278,7 @@ bound('hi'); ### `_.curry(func, [arity=func.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8607 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8667 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package") Creates a function that accepts arguments of `func` and either invokes `func` returning its result, if at least `arity` number of arguments have @@ -3286,7 +3328,7 @@ curried(1)(_, 3)(2); ### `_.curryRight(func, [arity=func.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8651 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8711 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package") This method is like `_.curry` except that arguments are applied to `func` in the manner of `_.partialRight` instead of `_.partial`. @@ -3333,7 +3375,7 @@ curried(3)(1, _)(2); ### `_.debounce(func, [wait=0], [options])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8707 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8767 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package") Creates a debounced function that delays invoking `func` until after `wait` milliseconds have elapsed since the last time the debounced function was @@ -3390,7 +3432,7 @@ jQuery(window).on('popstate', debounced.cancel); ### `_.defer(func, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8841 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8901 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package") Defers invoking the `func` until the current call stack has cleared. Any additional arguments are provided to `func` when it's invoked. @@ -3416,7 +3458,7 @@ _.defer(function(text) { ### `_.delay(func, wait, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8863 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8923 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package") Invokes `func` after `wait` milliseconds. Any additional arguments are provided to `func` when it's invoked. @@ -3443,7 +3485,7 @@ _.delay(function(text) { ### `_.flip(func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8884 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8944 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package") Creates a function that invokes `func` with arguments reversed. @@ -3469,7 +3511,7 @@ flipped('a', 'b', 'c', 'd'); ### `_.memoize(func, [resolver])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8930 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L8990 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package") Creates a function that memoizes the result of `func`. If `resolver` is provided it determines the cache key for storing the result based on the @@ -3521,7 +3563,7 @@ _.memoize.Cache = WeakMap; ### `_.negate(predicate)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8969 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9029 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package") Creates a function that negates the result of the predicate `func`. The `func` predicate is invoked with the `this` binding and arguments of the @@ -3549,7 +3591,7 @@ _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); ### `_.once(func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L8995 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9055 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package") Creates a function that is restricted to invoking `func` once. Repeat calls to the function return the value of the first invocation. The `func` is @@ -3575,7 +3617,7 @@ initialize(); ### `_.overArgs(func, [transforms])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9030 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9090 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package") Creates a function that invokes `func` with arguments transformed by corresponding `transforms`. @@ -3614,7 +3656,7 @@ func(10, 5); ### `_.partial(func, [partials])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9077 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9137 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package") Creates a function that invokes `func` with `partial` arguments prepended to those provided to the new function. This method is like `_.bind` except @@ -3657,7 +3699,7 @@ greetFred('hi'); ### `_.partialRight(func, [partials])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9113 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9173 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package") This method is like `_.partial` except that partially applied arguments are appended to those provided to the new function. @@ -3699,7 +3741,7 @@ sayHelloTo('fred'); ### `_.rearg(func, indexes)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9140 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9200 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package") Creates a function that invokes `func` with arguments arranged according to the specified indexes where the argument value at the first index is @@ -3729,7 +3771,7 @@ rearged('b', 'c', 'a') ### `_.rest(func, [start=func.length-1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9166 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9226 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package") Creates a function that invokes `func` with the `this` binding of the created function and arguments from `start` and beyond provided as an array. @@ -3761,7 +3803,7 @@ say('hello', 'fred', 'barney', 'pebbles'); ### `_.spread(func, [start=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9226 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9286 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package") Creates a function that invokes `func` with the `this` binding of the created function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3). @@ -3802,7 +3844,7 @@ numbers.then(_.spread(function(x, y) { ### `_.throttle(func, [wait=0], [options])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9282 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9342 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package") Creates a throttled function that only invokes `func` at most once per every `wait` milliseconds. The throttled function comes with a `cancel` @@ -3851,7 +3893,7 @@ jQuery(window).on('popstate', throttled.cancel); ### `_.unary(func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9314 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9374 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package") Creates a function that accepts up to one argument, ignoring any additional arguments. @@ -3874,7 +3916,7 @@ _.map(['6', '8', '10'], _.unary(parseInt)); ### `_.wrap(value, [wrapper=identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9339 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9399 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package") Creates a function that provides `value` to the wrapper function as its first argument. Any additional arguments provided to the function are @@ -3910,7 +3952,7 @@ p('fred, barney, & pebbles'); ### `_.castArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9378 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9438 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package") Casts `value` as an array if it's not one. @@ -3951,7 +3993,7 @@ console.log(_.castArray(array) === array); ### `_.clone(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9410 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9470 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package") Creates a shallow clone of `value`.
              @@ -3985,7 +4027,7 @@ console.log(shallow[0] === objects[0]); ### `_.cloneDeep(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9463 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9523 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package") This method is like `_.clone` except that it recursively clones `value`. @@ -4010,7 +4052,7 @@ console.log(deep[0] === objects[0]); ### `_.cloneDeepWith(value, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9493 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9553 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package") This method is like `_.cloneWith` except that it recursively clones `value`. @@ -4045,7 +4087,7 @@ console.log(el.childNodes.length); ### `_.cloneWith(value, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9443 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9503 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package") This method is like `_.clone` except that it accepts `customizer` which is invoked to produce the cloned value. If `customizer` returns `undefined` @@ -4083,7 +4125,7 @@ console.log(el.childNodes.length); ### `_.eq(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9527 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9587 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package") Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) comparison between two values to determine if they are equivalent. @@ -4122,7 +4164,7 @@ _.eq(NaN, NaN); ### `_.gt(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9551 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9611 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package") Checks if `value` is greater than `other`. @@ -4151,7 +4193,7 @@ _.gt(1, 3); ### `_.gte(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9575 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9635 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package") Checks if `value` is greater than or equal to `other`. @@ -4180,7 +4222,7 @@ _.gte(1, 3); ### `_.isArguments(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9595 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9655 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package") Checks if `value` is likely an `arguments` object. @@ -4205,7 +4247,7 @@ _.isArguments([1, 2, 3]); ### `_.isArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9624 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9684 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package") ({Function}): Checks if `value` is classified as an `Array` object. @@ -4236,7 +4278,7 @@ _.isArray(_.noop); ### `_.isArrayBuffer(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9642 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9702 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package") Checks if `value` is classified as an `ArrayBuffer` object. @@ -4261,7 +4303,7 @@ _.isArrayBuffer(new Array(2)); ### `_.isArrayLike(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9670 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9730 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package") Checks if `value` is array-like. A value is considered array-like if it's not a function and has a `value.length` that's an integer greater than or @@ -4294,7 +4336,7 @@ _.isArrayLike(_.noop); ### `_.isArrayLikeObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9698 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9757 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package") This method is like `_.isArrayLike` except that it also checks if `value` is an object. @@ -4326,7 +4368,7 @@ _.isArrayLikeObject(_.noop); ### `_.isBoolean(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9718 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9777 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package") Checks if `value` is classified as a boolean primitive or object. @@ -4351,7 +4393,7 @@ _.isBoolean(null); ### `_.isBuffer(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9739 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9798 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package") Checks if `value` is a buffer. @@ -4376,7 +4418,7 @@ _.isBuffer(new Uint8Array(2)); ### `_.isDate(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9759 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9818 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package") Checks if `value` is classified as a `Date` object. @@ -4401,7 +4443,7 @@ _.isDate('Mon April 23 2012'); ### `_.isElement(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9779 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9838 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package") Checks if `value` is likely a DOM element. @@ -4426,14 +4468,14 @@ _.isElement(''); ### `_.isEmpty(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9810 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9869 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package") -Checks if `value` is empty. A value is considered empty unless it's an -`arguments` object, array, string, or jQuery-like collection with a length -greater than `0` or an object with own enumerable properties. +Checks if `value` is an empty collection or object. A value is considered +empty if it's an `arguments` object, array, string, or jQuery-like collection +with a length of `0` or has no own enumerable properties. #### Arguments -1. `value` *(Array|Object|string)*: The value to inspect. +1. `value` *(*)*: The value to check. #### Returns *(boolean)*: Returns `true` if `value` is empty, else `false`. @@ -4462,7 +4504,7 @@ _.isEmpty({ 'a': 1 }); ### `_.isEqual(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9851 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9910 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package") Performs a deep comparison between two values to determine if they are equivalent. @@ -4499,7 +4541,7 @@ object === other; ### `_.isEqualWith(value, other, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9886 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9945 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package") This method is like `_.isEqual` except that it accepts `customizer` which is invoked to compare values. If `customizer` returns `undefined` comparisons @@ -4539,7 +4581,7 @@ _.isEqualWith(array, other, customizer); ### `_.isError(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9909 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L9968 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package") Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`, `TypeError`, or `URIError` object. @@ -4565,7 +4607,7 @@ _.isError(Error); ### `_.isFinite(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9941 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10000 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package") Checks if `value` is a finite primitive number.
              @@ -4599,7 +4641,7 @@ _.isFinite(Infinity); ### `_.isFunction(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9961 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10020 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package") Checks if `value` is classified as a `Function` object. @@ -4624,7 +4666,7 @@ _.isFunction(/abc/); ### `_.isInteger(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L9993 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10052 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package") Checks if `value` is an integer.
              @@ -4658,7 +4700,7 @@ _.isInteger('3'); ### `_.isLength(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10021 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10080 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package") Checks if `value` is a valid array-like length.
              @@ -4692,7 +4734,7 @@ _.isLength('3'); ### `_.isMap(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10097 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10156 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package") Checks if `value` is classified as a `Map` object. @@ -4717,7 +4759,7 @@ _.isMap(new WeakMap); ### `_.isMatch(object, source)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10124 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10183 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package") Performs a partial deep comparison between `object` and `source` to determine if `object` contains equivalent property values. This method is @@ -4750,7 +4792,7 @@ _.isMatch(object, { 'age': 36 }); ### `_.isMatchWith(object, source, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10159 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10218 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package") This method is like `_.isMatch` except that it accepts `customizer` which is invoked to compare values. If `customizer` returns `undefined` comparisons @@ -4790,7 +4832,7 @@ _.isMatchWith(object, source, customizer); ### `_.isNaN(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10189 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10248 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package") Checks if `value` is `NaN`.
              @@ -4825,7 +4867,7 @@ _.isNaN(undefined); ### `_.isNative(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10211 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10270 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package") Checks if `value` is a native function. @@ -4850,7 +4892,7 @@ _.isNative(_); ### `_.isNil(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10261 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10320 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package") Checks if `value` is `null` or `undefined`. @@ -4878,7 +4920,7 @@ _.isNil(NaN); ### `_.isNull(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10238 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10297 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package") Checks if `value` is `null`. @@ -4903,7 +4945,7 @@ _.isNull(void 0); ### `_.isNumber(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10290 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10349 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package") Checks if `value` is classified as a `Number` primitive or object.
              @@ -4938,7 +4980,7 @@ _.isNumber('3'); ### `_.isObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10049 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10108 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package") Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) @@ -4970,7 +5012,7 @@ _.isObject(null); ### `_.isObjectLike(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10077 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10136 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package") Checks if `value` is object-like. A value is object-like if it's not `null` and has a `typeof` result of "object". @@ -5002,7 +5044,7 @@ _.isObjectLike(null); ### `_.isPlainObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10322 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10381 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package") Checks if `value` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`. @@ -5038,7 +5080,7 @@ _.isPlainObject(Object.create(null)); ### `_.isRegExp(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10352 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10411 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package") Checks if `value` is classified as a `RegExp` object. @@ -5063,7 +5105,7 @@ _.isRegExp('/abc/'); ### `_.isSafeInteger(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10381 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10440 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package") Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 double precision number which isn't the result of a rounded unsafe integer. @@ -5098,7 +5140,7 @@ _.isSafeInteger('3'); ### `_.isSet(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10401 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10460 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package") Checks if `value` is classified as a `Set` object. @@ -5123,7 +5165,7 @@ _.isSet(new WeakSet); ### `_.isString(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10421 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10480 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package") Checks if `value` is classified as a `String` primitive or object. @@ -5148,7 +5190,7 @@ _.isString(1); ### `_.isSymbol(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10442 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10501 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package") Checks if `value` is classified as a `Symbol` primitive or object. @@ -5173,7 +5215,7 @@ _.isSymbol('abc'); ### `_.isTypedArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10463 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10522 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package") Checks if `value` is classified as a typed array. @@ -5198,7 +5240,7 @@ _.isTypedArray([]); ### `_.isUndefined(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10484 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10543 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package") Checks if `value` is `undefined`. @@ -5223,7 +5265,7 @@ _.isUndefined(null); ### `_.isWeakMap(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10504 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10563 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package") Checks if `value` is classified as a `WeakMap` object. @@ -5248,7 +5290,7 @@ _.isWeakMap(new Map); ### `_.isWeakSet(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10524 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10583 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package") Checks if `value` is classified as a `WeakSet` object. @@ -5273,7 +5315,7 @@ _.isWeakSet(new Set); ### `_.lt(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10548 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10607 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package") Checks if `value` is less than `other`. @@ -5302,7 +5344,7 @@ _.lt(3, 1); ### `_.lte(value, other)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10572 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10631 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package") Checks if `value` is less than or equal to `other`. @@ -5331,7 +5373,7 @@ _.lte(3, 1); ### `_.toArray(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10598 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10657 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package") Converts `value` to an array. @@ -5362,7 +5404,7 @@ _.toArray(null); ### `_.toInteger(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10638 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10697 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package") Converts `value` to an integer.
              @@ -5396,7 +5438,7 @@ _.toInteger('3'); ### `_.toLength(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10676 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10735 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package") Converts `value` to an integer suitable for use as the length of an array-like object. @@ -5431,7 +5473,7 @@ _.toLength('3'); ### `_.toNumber(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10702 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10761 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package") Converts `value` to a number. @@ -5462,7 +5504,7 @@ _.toNumber('3'); ### `_.toPlainObject(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10740 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10799 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package") Converts `value` to a plain object flattening inherited enumerable properties of `value` to own properties of the plain object. @@ -5494,7 +5536,7 @@ _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); ### `_.toSafeInteger(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10767 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10826 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package") Converts `value` to a safe integer. A safe integer can be compared and represented correctly. @@ -5526,7 +5568,7 @@ _.toSafeInteger('3'); ### `_.toString(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10791 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10850 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package") Converts `value` to a string if it's not one. An empty string is returned for `null` and `undefined` values. The sign of `-0` is preserved. @@ -5561,7 +5603,7 @@ _.toString([1, 2, 3]); ### `_.add(augend, addend)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14054 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14190 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package") Adds two numbers. @@ -5584,7 +5626,7 @@ _.add(6, 4); ### `_.ceil(number, [precision=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14088 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14224 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package") Computes `number` rounded up to `precision`. @@ -5613,7 +5655,7 @@ _.ceil(6040, -2); ### `_.floor(number, [precision=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14110 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14246 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package") Computes `number` rounded down to `precision`. @@ -5642,7 +5684,7 @@ _.floor(4060, -2); ### `_.max(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14129 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14265 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package") Computes the maximum value of `array`. If `array` is empty or falsey `undefined` is returned. @@ -5668,7 +5710,7 @@ _.max([]); ### `_.maxBy(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14157 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14293 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package") This method is like `_.max` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -5699,7 +5741,7 @@ _.maxBy(objects, 'n'); ### `_.mean(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14176 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14312 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package") Computes the mean of the values in `array`. @@ -5721,7 +5763,7 @@ _.mean([4, 2, 8, 6]); ### `_.min(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14197 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14333 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package") Computes the minimum value of `array`. If `array` is empty or falsey `undefined` is returned. @@ -5747,7 +5789,7 @@ _.min([]); ### `_.minBy(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14225 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14361 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package") This method is like `_.min` except that it accepts `iteratee` which is invoked for each element in `array` to generate the criterion by which @@ -5778,7 +5820,7 @@ _.minBy(objects, 'n'); ### `_.round(number, [precision=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14251 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14387 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package") Computes `number` rounded to `precision`. @@ -5807,7 +5849,7 @@ _.round(4060, -2); ### `_.subtract(minuend, subtrahend)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14267 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14403 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package") Subtract two numbers. @@ -5830,7 +5872,7 @@ _.subtract(6, 4); ### `_.sum(array)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14294 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14430 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package") Computes the sum of the values in `array`. @@ -5852,7 +5894,7 @@ _.sum([4, 2, 8, 6]); ### `_.sumBy(array, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14322 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14458 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package") This method is like `_.sum` except that it accepts `iteratee` which is invoked for each element in `array` to generate the value to be summed. @@ -5889,7 +5931,7 @@ _.sumBy(objects, 'n'); ### `_.clamp(number, [lower], upper)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12074 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12208 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package") Clamps `number` within the inclusive `lower` and `upper` bounds. @@ -5916,7 +5958,7 @@ _.clamp(10, -5, 5); ### `_.inRange(number, [start=0], end)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12126 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12260 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package") Checks if `n` is between `start` and up to but not including, `end`. If `end` is not specified it's set to `start` with `start` then set to `0`. @@ -5961,7 +6003,7 @@ _.inRange(-3, -2, -6); ### `_.random([lower=0], [upper=1], [floating])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12168 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12302 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package") Produces a random number between the inclusive `lower` and `upper` bounds. If only one argument is provided a number between `0` and the given number @@ -6007,7 +6049,7 @@ _.random(1.2, 5.2); ### `_.assign(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10838 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10897 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package") Assigns own enumerable properties of source objects to the destination object. Source objects are applied from left to right. Subsequent sources @@ -6047,7 +6089,7 @@ _.assign({ 'a': 1 }, new Foo, new Bar); ### `_.assignIn(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10871 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10938 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package") This method is like `_.assign` except that it iterates over own and inherited source properties. @@ -6088,7 +6130,7 @@ _.assignIn({ 'a': 1 }, new Foo, new Bar); ### `_.assignInWith(object, sources, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10902 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L10975 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package") This method is like `_.assignIn` except that it accepts `customizer` which is invoked to produce the assigned values. If `customizer` returns `undefined` @@ -6127,7 +6169,7 @@ defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); ### `_.assignWith(object, sources, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10932 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11005 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package") This method is like `_.assign` except that it accepts `customizer` which is invoked to produce the assigned values. If `customizer` returns `undefined` @@ -6163,7 +6205,7 @@ defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); ### `_.at(object, [paths])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10956 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11029 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package") Creates an array of values corresponding to `paths` of `object`. @@ -6191,7 +6233,7 @@ _.at(['a', 'b', 'c'], 0, 2); ### `_.create(prototype, [properties])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L10992 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11065 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package") Creates an object that inherits from the `prototype` object. If a `properties` object is given its own enumerable properties are assigned to the created object. @@ -6232,7 +6274,7 @@ circle instanceof Shape; ### `_.defaults(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11016 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11089 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package") Assigns own and inherited enumerable properties of source objects to the destination object for all destination properties that resolve to `undefined`. @@ -6261,7 +6303,7 @@ _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); ### `_.defaultsDeep(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11039 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11112 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package") This method is like `_.defaults` except that it recursively assigns default properties. @@ -6288,7 +6330,7 @@ _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'ag ### `_.findKey(object, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11077 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11150 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package") This method is like `_.find` except that it returns the key of the first element `predicate` returns truthy for instead of the element itself. @@ -6330,7 +6372,7 @@ _.findKey(users, 'active'); ### `_.findLastKey(object, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11114 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11187 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package") This method is like `_.findKey` except that it iterates over elements of a collection in the opposite order. @@ -6372,7 +6414,7 @@ _.findLastKey(users, 'active'); ### `_.forIn(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11144 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11217 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package") Iterates over own and inherited enumerable properties of an object invoking `iteratee` for each property. The iteratee is invoked with three arguments:
              @@ -6407,7 +6449,7 @@ _.forIn(new Foo, function(value, key) { ### `_.forInRight(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11174 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11247 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package") This method is like `_.forIn` except that it iterates over properties of `object` in the opposite order. @@ -6440,7 +6482,7 @@ _.forInRight(new Foo, function(value, key) { ### `_.forOwn(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11206 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11279 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package") Iterates over own enumerable properties of an object invoking `iteratee` for each property. The iteratee is invoked with three arguments:
              @@ -6475,7 +6517,7 @@ _.forOwn(new Foo, function(value, key) { ### `_.forOwnRight(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11234 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11307 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package") This method is like `_.forOwn` except that it iterates over properties of `object` in the opposite order. @@ -6508,7 +6550,7 @@ _.forOwnRight(new Foo, function(value, key) { ### `_.functions(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11259 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11332 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package") Creates an array of function property names from own enumerable properties of `object`. @@ -6538,7 +6580,7 @@ _.functions(new Foo); ### `_.functionsIn(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11284 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11357 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package") Creates an array of function property names from own and inherited enumerable properties of `object`. @@ -6568,7 +6610,7 @@ _.functionsIn(new Foo); ### `_.get(object, path, [defaultValue])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11312 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11385 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package") Gets the value at `path` of `object`. If the resolved value is `undefined` the `defaultValue` is used in its place. @@ -6601,7 +6643,7 @@ _.get(object, 'a.b.c', 'default'); ### `_.has(object, path)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11343 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11416 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package") Checks if `path` is a direct property of `object`. @@ -6636,7 +6678,7 @@ _.has(other, 'a'); ### `_.hasIn(object, path)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11372 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11445 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package") Checks if `path` is a direct or inherited property of `object`. @@ -6670,7 +6712,7 @@ _.hasIn(object, 'b'); ### `_.invert(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11393 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11466 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package") Creates an object composed of the inverted keys and values of `object`. If `object` contains duplicate values, subsequent values overwrite property @@ -6696,7 +6738,7 @@ _.invert(object); ### `_.invertBy(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11422 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11495 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package") This method is like `_.invert` except that the inverted object is generated from the results of running each element of `object` through `iteratee`. @@ -6730,7 +6772,7 @@ _.invertBy(object, function(value) { ### `_.invoke(object, path, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11447 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11520 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package") Invokes the method at `path` of `object`. @@ -6756,7 +6798,7 @@ _.invoke(object, 'a[0].b.c.slice', 1, 3); ### `_.keys(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11476 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11549 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package") Creates an array of the own enumerable property names of `object`.
              @@ -6793,7 +6835,7 @@ _.keys('hi'); ### `_.keysIn(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11518 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11591 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package") Creates an array of the own and inherited enumerable property names of `object`.
              @@ -6825,7 +6867,7 @@ _.keysIn(new Foo); ### `_.mapKeys(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11557 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11630 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package") The opposite of `_.mapValues`; this method creates an object with the same values as `object` and keys generated by running each own enumerable @@ -6853,7 +6895,7 @@ _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { ### `_.mapValues(object, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11592 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11665 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package") Creates an object with the same keys as `object` and values generated by running each own enumerable property of `object` through `iteratee`. The @@ -6887,14 +6929,15 @@ _.mapValues(users, 'age'); ### `_.merge(object, [sources])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11631 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package") - -Recursively merges own and inherited enumerable properties of source objects -into the destination object. Source properties that resolve to `undefined` -are skipped if a destination value exists. Array and plain object properties -are merged recursively. Other objects and value types are overridden by -assignment. Source objects are applied from left to right. Subsequent -sources overwrite property assignments of previous sources. +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11705 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package") + +This method is like `_.assign` except that it recursively merges own and +inherited enumerable properties of source objects into the destination +object. Source properties that resolve to `undefined` are skipped if a +destination value exists. Array and plain object properties are merged +recursively.Other objects and value types are overridden by assignment. +Source objects are applied from left to right. Subsequent sources +overwrite property assignments of previous sources.

              **Note:** This method mutates `object`. @@ -6926,7 +6969,7 @@ _.merge(users, ages); ### `_.mergeWith(object, sources, customizer)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11672 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11746 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package") This method is like `_.merge` except that it accepts `customizer` which is invoked to produce the merged values of the destination and source @@ -6973,7 +7016,7 @@ _.mergeWith(object, other, customizer); ### `_.omit(object, [props])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11694 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11768 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package") The opposite of `_.pick`; this method creates an object composed of the own and inherited enumerable properties of `object` that are not omitted. @@ -6999,7 +7042,7 @@ _.omit(object, ['a', 'c']); ### `_.omitBy(object, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11721 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11795 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package") The opposite of `_.pickBy`; this method creates an object composed of the own and inherited enumerable properties of `object` that `predicate` @@ -7027,7 +7070,7 @@ _.omitBy(object, _.isNumber); ### `_.pick(object, [props])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11745 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11819 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package") Creates an object composed of the picked `object` properties. @@ -7052,7 +7095,7 @@ _.pick(object, ['a', 'c']); ### `_.pickBy(object, [predicate=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11766 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11840 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package") Creates an object composed of the `object` properties `predicate` returns truthy for. The predicate is invoked with two arguments: (value, key). @@ -7078,7 +7121,7 @@ _.pickBy(object, _.isNumber); ### `_.result(object, path, [defaultValue])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11798 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11872 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package") This method is like `_.get` except that if the resolved value is a function it's invoked with the `this` binding of its parent object and its result @@ -7115,7 +7158,7 @@ _.result(object, 'a[0].b.c3', _.constant('default')); ### `_.set(object, path, value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11839 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11913 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package") Sets the value at `path` of `object`. If a portion of `path` doesn't exist it's created. Arrays are created for missing index properties while objects @@ -7152,7 +7195,7 @@ console.log(object.x[0].y.z); ### `_.setWith(object, path, value, [customizer])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11864 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11940 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package") This method is like `_.set` except that it accepts `customizer` which is invoked to produce the objects of `path`. If `customizer` returns `undefined` @@ -7173,8 +7216,10 @@ with three arguments: (nsValue, key, nsObject). #### Example ```js -_.setWith({ '0': { 'length': 2 } }, '[0][1][2]', 3, Object); -// => { '0': { '1': { '2': 3 }, 'length': 2 } } +var object = {}; + +_.setWith(object, '[0][1]', 'a', Object); +// => { '0': { '1': 'a' } } ``` * * * @@ -7183,7 +7228,7 @@ _.setWith({ '0': { 'length': 2 } }, '[0][1][2]', 3, Object); ### `_.toPairs(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11890 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11966 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package") Creates an array of own enumerable key-value pairs for `object` which can be consumed by `_.fromPairs`. @@ -7213,7 +7258,7 @@ _.toPairs(new Foo); ### `_.toPairsIn(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11915 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L11991 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package") Creates an array of own and inherited enumerable key-value pairs for `object` which can be consumed by `_.fromPairs`. @@ -7243,7 +7288,7 @@ _.toPairsIn(new Foo); ### `_.transform(object, [iteratee=_.identity], [accumulator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11947 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12023 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package") An alternative to `_.reduce`; this method transforms `object` to a new `accumulator` object which is the result of running each of its own enumerable @@ -7280,7 +7325,7 @@ _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { ### `_.unset(object, path)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L11995 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12071 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package") Removes the property at `path` of `object`.
              @@ -7315,8 +7360,77 @@ console.log(object); +### `_.update(object, path, updater)` +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12101 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.update "See the npm package") + +This method is like `_.set` except that accepts `updater` to produce the +value to set. Use `_.updateWith` to customize `path` creation. The `updater` +is invoked with one argument: (value). +
              +
              +**Note:** This method mutates `object`. + +#### Arguments +1. `object` *(Object)*: The object to modify. +2. `path` *(Array|string)*: The path of the property to set. +3. `updater` *(Function)*: The function to produce the updated value. + +#### Returns +*(Object)*: Returns `object`. + +#### Example +```js +var object = { 'a': [{ 'b': { 'c': 3 } }] }; + +_.update(object, 'a[0].b.c', function(n) { return n * n; }); +console.log(object.a[0].b.c); +// => 9 + +_.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); +console.log(object.x[0].y.z); +// => 0 +``` +* * * + + + + + +### `_.updateWith(object, path, updater, [customizer])` +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12128 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.updatewith "See the npm package") + +This method is like `_.update` except that it accepts `customizer` which is +invoked to produce the objects of `path`. If `customizer` returns `undefined` +path creation is handled by the method instead. The `customizer` is invoked +with three arguments: (nsValue, key, nsObject). +
              +
              +**Note:** This method mutates `object`. + +#### Arguments +1. `object` *(Object)*: The object to modify. +2. `path` *(Array|string)*: The path of the property to set. +3. `updater` *(Function)*: The function to produce the updated value. +4. `[customizer]` *(Function)*: The function to customize assigned values. + +#### Returns +*(Object)*: Returns `object`. + +#### Example +```js +var object = {}; + +_.updateWith(object, '[0][1]', _.constant('a'), Object); +// => { '0': { '1': 'a' } } +``` +* * * + + + + + ### `_.values(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12024 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12158 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package") Creates an array of the own enumerable property values of `object`.
              @@ -7351,7 +7465,7 @@ _.values('hi'); ### `_.valuesIn(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12050 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12184 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package") Creates an array of the own and inherited enumerable property values of `object`.
              @@ -7389,7 +7503,7 @@ _.valuesIn(new Foo); ### `_(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L1500 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L1527 "View in source") [Ⓣ][1] Creates a `lodash` object which wraps `value` to enable implicit method chaining. Methods that operate on and return arrays, collections, and @@ -7441,47 +7555,49 @@ The chainable wrapper methods are:
              `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, -`curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, `difference`, -`differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`, -`dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flattenDepth`, -`flip`, `flow`, `flowRight`, `fromPairs`, `functions`, `functionsIn`, -`groupBy`, `initial`, `intersection`, `intersectionBy`, `intersectionWith`, -`invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, `keys`, `keysIn`, -`map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, `memoize`, -`merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, `nthArg`, -`omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, `overEvery`, -`overSome`, `partial`, `partialRight`, `partition`, `pick`, `pickBy`, `plant`, -`property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, `pullAt`, `push`, -`range`, `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, -`sampleSize`, `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, -`splice`, `spread`, `tail`, `take`, `takeRight`, `takeRightWhile`, -`takeWhile`, `tap`, `throttle`, `thru`, `toArray`, `toPairs`, `toPairsIn`, -`toPath`, `toPlainObject`, `transform`, `unary`, `union`, `unionBy`, -`unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, `unshift`, `unzip`, -`unzipWith`, `values`, `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, -`xorWith`, `zip`, `zipObject`, `zipObjectDeep`, and `zipWith` +`curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, +`difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, +`dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, +`flatten`, `flattenDeep`, `flattenDepth`, `flip`, `flow`, `flowRight`, +`fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`, `intersection`, +`intersectionBy`, `intersectionWith`, `invert`, `invertBy`, `invokeMap`, +`iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, +`matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, `method`, +`methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, +`over`, `overArgs`, `overEvery`, `overSome`, `partial`, `partialRight`, +`partition`, `pick`, `pickBy`, `plant`, `property`, `propertyOf`, `pull`, +`pullAll`, `pullAllBy`, `pullAllWith`, `pullAt`, `push`, `range`, +`rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, `sampleSize`, +`set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`, +`tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, +`thru`, `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, +`transform`, `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, +`uniqWith`, `unset`, `unshift`, `unzip`, `unzipWith`, `update`, `values`, +`valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`, +`zipObjectDeep`, and `zipWith`

              The wrapper methods that are **not** chainable by default are:
              `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, -`cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `endsWith`, `eq`, -`escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, -`findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`, `forIn`, -`forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, -`head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, -`isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, -`isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, -`isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, -`isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, -`isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`, -`isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, -`join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, -`lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`, -`now`, `pad`, `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, -`reduceRight`, `repeat`, `result`, `round`, `runInContext`, `sample`, -`shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, -`sortedLastIndex`, `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`, -`sum`, `sumBy`, `template`, `times`, `toLower`, `toInteger`, `toLength`, +`cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `each`, `eachRight`, +`endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, +`findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, `floor`, +`forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, +`get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, `includes`, +`indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, `isArrayBuffer`, +`isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, `isDate`, +`isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, `isFinite`, +`isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, `isMatchWith`, +`isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, `isObject`, `isObjectLike`, +`isPlainObject`, `isRegExp`, `isSafeInteger`, `isSet`, `isString`, +`isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, +`last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, +`maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`, `now`, `pad`, +`padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, +`repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, +`snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, +`sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`, `sum`, `sumBy`, +`template`, `times`, `toInteger`, `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words` @@ -7520,7 +7636,7 @@ _.isArray(squares.value()); ### `_.chain(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7205 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7265 "View in source") [Ⓣ][1] Creates a `lodash` object that wraps `value` with explicit method chaining enabled. The result of such method chaining must be unwrapped with `_#value`. @@ -7556,7 +7672,7 @@ var youngest = _ ### `_.tap(value, interceptor)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7233 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7293 "View in source") [Ⓣ][1] This method invokes `interceptor` and returns `value`. The interceptor is invoked with one argument; (value). The purpose of this method is to @@ -7587,7 +7703,7 @@ _([1, 2, 3]) ### `_.thru(value, interceptor)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7260 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7320 "View in source") [Ⓣ][1] This method is like `_.tap` except that it returns the result of `interceptor`. The purpose of this method is to "pass thru" values replacing intermediate @@ -7618,7 +7734,7 @@ _(' abc ') ### `_.prototype[Symbol.iterator]()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7436 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7496 "View in source") [Ⓣ][1] Enables the wrapper to be iterable. @@ -7642,7 +7758,7 @@ Array.from(wrapped); ### `_.prototype.at([paths])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7283 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7343 "View in source") [Ⓣ][1] This method is the wrapper version of `_.at`. @@ -7669,7 +7785,7 @@ _(['a', 'b', 'c']).at(0, 2).value(); ### `_.prototype.chain()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7334 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7394 "View in source") [Ⓣ][1] Enables explicit method chaining on the wrapper object. @@ -7702,7 +7818,7 @@ _(users) ### `_.prototype.commit()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7363 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7423 "View in source") [Ⓣ][1] Executes the chained sequence and returns the wrapped result. @@ -7734,7 +7850,7 @@ console.log(array); ### `_.prototype.flatMap([iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7384 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7444 "View in source") [Ⓣ][1] This method is the wrapper version of `_.flatMap`. @@ -7760,7 +7876,7 @@ _([1, 2]).flatMap(duplicate).value(); ### `_.prototype.next()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7409 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7469 "View in source") [Ⓣ][1] Gets the next value on a wrapped object following the [iterator protocol](https://mdn.io/iteration_protocols#iterator). @@ -7788,7 +7904,7 @@ wrapped.next(); ### `_.prototype.plant(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7463 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7523 "View in source") [Ⓣ][1] Creates a clone of the chained sequence planting `value` as the wrapped value. @@ -7820,7 +7936,7 @@ wrapped.value(); ### `_.prototype.reverse()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7502 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7562 "View in source") [Ⓣ][1] This method is the wrapper version of `_.reverse`.
              @@ -7847,7 +7963,7 @@ console.log(array); ### `_.prototype.value()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L7533 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L7593 "View in source") [Ⓣ][1] Executes the chained sequence to extract the unwrapped value. @@ -7875,7 +7991,7 @@ _([1, 2, 3]).value(); ### `_.camelCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12228 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12362 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package") Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). @@ -7903,7 +8019,7 @@ _.camelCase('__foo_bar__'); ### `_.capitalize([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12247 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12381 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package") Converts the first character of `string` to upper case and the remaining to lower case. @@ -7926,7 +8042,7 @@ _.capitalize('FRED'); ### `_.deburr([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12265 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12399 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package") Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). @@ -7949,7 +8065,7 @@ _.deburr('déjà vu'); ### `_.endsWith([string=''], [target], [position=string.length])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12291 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12425 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package") Checks if `string` ends with the given target string. @@ -7979,7 +8095,7 @@ _.endsWith('abc', 'b', 2); ### `_.escape([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12336 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12470 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package") Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to their corresponding HTML entities. @@ -8024,7 +8140,7 @@ _.escape('fred, barney, & pebbles'); ### `_.escapeRegExp([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12357 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12491 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package") Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. @@ -8047,7 +8163,7 @@ _.escapeRegExp('[lodash](https://lodash.com/)'); ### `_.kebabCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12383 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12517 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package") Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). @@ -8075,7 +8191,7 @@ _.kebabCase('__foo_bar__'); ### `_.lowerCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12406 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12540 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package") Converts `string`, as space separated words, to lower case. @@ -8103,7 +8219,7 @@ _.lowerCase('__FOO_BAR__'); ### `_.lowerFirst([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12426 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12560 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package") Converts the first character of `string` to lower case. @@ -8128,7 +8244,7 @@ _.lowerFirst('FRED'); ### `_.pad([string=''], [length=0], [chars=' '])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12468 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12602 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package") Pads `string` on the left and right sides if it's shorter than `length`. Padding characters are truncated if they can't be evenly divided by `length`. @@ -8159,7 +8275,7 @@ _.pad('abc', 3); ### `_.padEnd([string=''], [length=0], [chars=' '])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12505 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12639 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package") Pads `string` on the right side if it's shorter than `length`. Padding characters are truncated if they exceed `length`. @@ -8190,7 +8306,7 @@ _.padEnd('abc', 3); ### `_.padStart([string=''], [length=0], [chars=' '])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12532 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12666 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package") Pads `string` on the left side if it's shorter than `length`. Padding characters are truncated if they exceed `length`. @@ -8221,7 +8337,7 @@ _.padStart('abc', 3); ### `_.parseInt(string, [radix=10])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12560 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12694 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package") Converts `string` to an integer of the specified radix. If `radix` is `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal, @@ -8253,7 +8369,7 @@ _.map(['6', '08', '10'], _.parseInt); ### `_.repeat([string=''], [n=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12592 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12726 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package") Repeats the given string `n` times. @@ -8282,7 +8398,7 @@ _.repeat('abc', 0); ### `_.replace([string=''], pattern, replacement)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12630 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12764 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package") Replaces matches for `pattern` in `string` with `replacement`.
              @@ -8309,7 +8425,7 @@ _.replace('Hi Fred', 'Fred', 'Barney'); ### `_.snakeCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12656 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12790 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package") Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case). @@ -8337,7 +8453,7 @@ _.snakeCase('--foo-bar'); ### `_.split([string=''], separator, [limit])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12677 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12811 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package") Splits `string` by `separator`.
              @@ -8364,7 +8480,7 @@ _.split('a-b-c', '-', 2); ### `_.startCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12700 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12834 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package") Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). @@ -8392,7 +8508,7 @@ _.startCase('__foo_bar__'); ### `_.startsWith([string=''], [target], [position=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12725 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12859 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package") Checks if `string` starts with the given target string. @@ -8422,7 +8538,7 @@ _.startsWith('abc', 'b', 1); ### `_.template([string=''], [options])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12827 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12961 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package") Creates a compiled template function that can interpolate data properties in "interpolate" delimiters, HTML-escape interpolated data properties in @@ -8529,9 +8645,10 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\ ### `_.toLower([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12953 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13088 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package") -Converts `string`, as a whole, to lower case. +Converts `string`, as a whole, to lower case just like +[String#toLowerCase](https://mdn.io/toLowerCase). #### Arguments 1. `[string='']` *(string)*: The string to convert. @@ -8557,9 +8674,10 @@ _.toLower('__FOO_BAR__'); ### `_.toUpper([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12976 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13112 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package") -Converts `string`, as a whole, to upper case. +Converts `string`, as a whole, to upper case just like +[String#toUpperCase](https://mdn.io/toUpperCase). #### Arguments 1. `[string='']` *(string)*: The string to convert. @@ -8585,7 +8703,7 @@ _.toUpper('__foo_bar__'); ### `_.trim([string=''], [chars=whitespace])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13001 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13137 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package") Removes leading and trailing whitespace or specified characters from `string`. @@ -8614,7 +8732,7 @@ _.map([' foo ', ' bar '], _.trim); ### `_.trimEnd([string=''], [chars=whitespace])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13039 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13175 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package") Removes trailing whitespace or specified characters from `string`. @@ -8640,7 +8758,7 @@ _.trimEnd('-_-abc-_-', '_-'); ### `_.trimStart([string=''], [chars=whitespace])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13075 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13211 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package") Removes leading whitespace or specified characters from `string`. @@ -8666,7 +8784,7 @@ _.trimStart('-_-abc-_-', '_-'); ### `_.truncate([string=''], [options=({})], [options.length=30], [options.omission='...'], [options.separator])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13129 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13265 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package") Truncates `string` if it's longer than the given maximum string length. The last characters of the truncated string are replaced with the omission @@ -8711,7 +8829,7 @@ _.truncate('hi-diddly-ho there, neighborino', { ### `_.unescape([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13203 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13339 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package") The inverse of `_.escape`; this method converts the HTML entities `&`, `<`, `>`, `"`, `'`, and ``` in `string` to their @@ -8739,7 +8857,7 @@ _.unescape('fred, barney, & pebbles'); ### `_.upperCase([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13229 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13365 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package") Converts `string`, as space separated words, to upper case. @@ -8767,7 +8885,7 @@ _.upperCase('__foo_bar__'); ### `_.upperFirst([string=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L12444 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L12578 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package") Converts the first character of `string` to upper case. @@ -8792,7 +8910,7 @@ _.upperFirst('FRED'); ### `_.words([string=''], [pattern])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13251 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13387 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package") Splits `string` into an array of its words. @@ -8824,7 +8942,7 @@ _.words('fred, barney, & pebbles', /[^, ]+/g); ### `_.attempt(func)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13283 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13419 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package") Attempts to invoke `func`, returning either the result or the caught error object. Any additional arguments are provided to `func` when it's invoked. @@ -8853,7 +8971,7 @@ if (_.isError(elements)) { ### `_.bindAll(object, methodNames)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13317 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13453 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package") Binds methods of an object to the object itself, overwriting the existing method. @@ -8888,7 +9006,7 @@ jQuery(element).on('click', view.onClick); ### `_.cond(pairs)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13352 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13488 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package") Creates a function that iterates over `pairs` invoking the corresponding function of the first predicate to return truthy. The predicate-function @@ -8925,7 +9043,7 @@ func({ 'a': '1', 'b': '2' }); ### `_.conforms(source)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13394 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13530 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package") Creates a function that invokes the predicate properties of `source` with the corresponding property values of a given object, returning `true` if @@ -8954,7 +9072,7 @@ _.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) })); ### `_.constant(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13414 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13550 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package") Creates a function that returns `value`. @@ -8979,7 +9097,7 @@ getter() === object; ### `_.flow([funcs])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13440 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13576 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package") Creates a function that returns the result of invoking the given functions with the `this` binding of the created function, where each successive @@ -9008,7 +9126,7 @@ addSquare(1, 2); ### `_.flowRight([funcs])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13461 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13597 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package") This method is like `_.flow` except that it creates a function that invokes the given functions from right to left. @@ -9036,7 +9154,7 @@ addSquare(1, 2); ### `_.identity(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13478 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13614 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package") This method returns the first argument given to it. @@ -9060,7 +9178,7 @@ _.identity(object) === object; ### `_.iteratee([func=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13512 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13648 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package") Creates a function that invokes `func` with the arguments of the created function. If `func` is a property name the created callback returns the @@ -9099,7 +9217,7 @@ _.filter(users, 'age > 36'); ### `_.matches(source)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13539 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13675 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package") Creates a function that performs a partial deep comparison between a given object and `source`, returning `true` if the given object has equivalent @@ -9132,7 +9250,7 @@ _.filter(users, _.matches({ 'age': 40, 'active': false })); ### `_.matchesProperty(path, srcValue)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13566 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13702 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package") Creates a function that performs a partial deep comparison between the value at `path` of a given object to `srcValue`, returning `true` if the @@ -9165,7 +9283,7 @@ _.find(users, _.matchesProperty('user', 'fred')); ### `_.method(path, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13593 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13729 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package") Creates a function that invokes the method at `path` of a given object. Any additional arguments are provided to the invoked method. @@ -9197,7 +9315,7 @@ _.invokeMap(_.sortBy(objects, _.method(['a', 'b', 'c'])), 'a.b.c'); ### `_.methodOf(object, [args])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13621 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13757 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package") The opposite of `_.method`; this method creates a function that invokes the method at a given path of `object`. Any additional arguments are @@ -9228,7 +9346,7 @@ _.map([['a', '2'], ['c', '0']], _.methodOf(object)); ### `_.mixin([object=lodash], source, [options])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13663 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13799 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package") Adds all own enumerable function properties of a source object to the destination object. If `object` is a function then methods are added to @@ -9273,7 +9391,7 @@ _('fred').vowels(); ### `_.noConflict()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13711 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13847 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package") Reverts the `_` variable to its previous value and returns a reference to the `lodash` function. @@ -9292,7 +9410,7 @@ var lodash = _.noConflict(); ### `_.noop()` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13732 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13868 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package") A no-operation function that returns `undefined` regardless of the arguments it receives. @@ -9311,7 +9429,7 @@ _.noop(object) === undefined; ### `_.nthArg([n=0])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13751 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13887 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package") Creates a function that returns its nth argument. @@ -9335,7 +9453,7 @@ func('a', 'b', 'c'); ### `_.over(iteratees)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13774 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13910 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package") Creates a function that invokes `iteratees` with the arguments provided to the created function and returns their results. @@ -9360,7 +9478,7 @@ func(1, 2, 3, 4); ### `_.overEvery(predicates)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13798 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13934 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package") Creates a function that checks if **all** of the `predicates` return truthy when invoked with the arguments provided to the created function. @@ -9391,7 +9509,7 @@ func(NaN); ### `_.overSome(predicates)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13822 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13958 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package") Creates a function that checks if **any** of the `predicates` return truthy when invoked with the arguments provided to the created function. @@ -9422,7 +9540,7 @@ func(NaN); ### `_.property(path)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13845 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L13981 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package") Creates a function that returns the value at `path` of a given object. @@ -9452,7 +9570,7 @@ _.map(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); ### `_.propertyOf(object)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13869 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14005 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package") The opposite of `_.property`; this method creates a function that returns the value at a given path of `object`. @@ -9481,7 +9599,7 @@ _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); ### `_.range([start=0], end, [step=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13914 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14050 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package") Creates an array of numbers (positive and/or negative) progressing from `start` up to, but not including, `end`. A step of `-1` is used if a negative @@ -9530,7 +9648,7 @@ _.range(0); ### `_.rangeRight([start=0], end, [step=1])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13950 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14086 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package") This method is like `_.range` except that it populates values in descending order. @@ -9573,7 +9691,7 @@ _.rangeRight(0); ### `_.runInContext([context=root])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L1296 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L1318 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package") Create a new pristine `lodash` function using the `context` object. @@ -9617,7 +9735,7 @@ var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; ### `_.times(n, [iteratee=_.identity])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L13970 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14106 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package") Invokes the iteratee `n` times, returning an array of the results of each invocation. The iteratee is invoked with one argument; (index). @@ -9644,7 +9762,7 @@ _.times(3, String); ### `_.toPath(value)` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14013 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14149 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package") Converts `value` to a property path array. @@ -9678,7 +9796,7 @@ console.log(path === newPath); ### `_.uniqueId([prefix=''])` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14033 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14169 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package") Generates a unique ID. If `prefix` is given the ID is appended to it. @@ -9709,7 +9827,7 @@ _.uniqueId(); ### `_.VERSION` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L14680 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L14820 "View in source") [Ⓣ][1] ({string}): The semantic version number. @@ -9720,7 +9838,7 @@ _.uniqueId(); ### `_.templateSettings` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L1545 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L1572 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package") ({Object}): By default, the template delimiters used by lodash are like those in embedded Ruby (ERB). Change the following template settings to use @@ -9733,7 +9851,7 @@ alternative delimiters. ### `_.templateSettings.escape` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L1553 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L1580 "View in source") [Ⓣ][1] ({RegExp}): Used to detect `data` property values to be HTML-escaped. @@ -9744,7 +9862,7 @@ alternative delimiters. ### `_.templateSettings.evaluate` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L1561 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L1588 "View in source") [Ⓣ][1] ({RegExp}): Used to detect code to be evaluated. @@ -9755,7 +9873,7 @@ alternative delimiters. ### `_.templateSettings.imports` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L1585 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L1612 "View in source") [Ⓣ][1] ({Object}): Used to import variables into the compiled template. @@ -9766,7 +9884,7 @@ alternative delimiters. ### `_.templateSettings.imports._` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L1593 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L1620 "View in source") [Ⓣ][1] ({Function}): A reference to the `lodash` function. @@ -9777,7 +9895,7 @@ alternative delimiters. ### `_.templateSettings.interpolate` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L1569 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L1596 "View in source") [Ⓣ][1] ({RegExp}): Used to detect `data` property values to inject. @@ -9788,7 +9906,7 @@ alternative delimiters. ### `_.templateSettings.variable` -# [Ⓢ](https://github.com/lodash/lodash/blob/4.5.1/lodash.js#L1577 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/lodash/lodash/blob/4.6.1/lodash.js#L1604 "View in source") [Ⓣ][1] ({string}): Used to reference the data object in the template text. diff --git a/public/bower_components/lodash/fp/_baseConvert.js b/public/bower_components/lodash/fp/_baseConvert.js index 30d3706..b074100 100644 --- a/public/bower_components/lodash/fp/_baseConvert.js +++ b/public/bower_components/lodash/fp/_baseConvert.js @@ -1,6 +1,6 @@ var mapping = require('./_mapping'), mutateMap = mapping.mutate, - placeholder = {}; + fallbackHolder = {}; /** * The base implementation of `convert` which accepts a `util` object of methods @@ -40,7 +40,8 @@ function baseConvert(util, name, func, options) { 'rearg': 'rearg' in options ? options.rearg : true }; - var forceRearg = ('rearg' in options) && options.rearg; + var forceRearg = ('rearg' in options) && options.rearg, + placeholder = isLib ? func : fallbackHolder; var helpers = isLib ? func : { 'ary': util.ary, diff --git a/public/bower_components/lodash/fp/_mapping.js b/public/bower_components/lodash/fp/_mapping.js index b3ac217..1d33d4b 100644 --- a/public/bower_components/lodash/fp/_mapping.js +++ b/public/bower_components/lodash/fp/_mapping.js @@ -55,25 +55,25 @@ exports.aryMethod = { 'hasIn', 'includes', 'indexOf', 'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', 'maxBy', 'merge', 'minBy', 'omit', - 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', - 'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll', - 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', - 'repeat', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', - 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', - 'split', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', 'takeRightWhile', - 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars', 'trimCharsEnd', - 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith', 'unset', - 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject', 'zipObjectDeep' + 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', + 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll', 'pullAt', + 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'result', + 'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex', + 'sortedLastIndexOf', 'sortedUniqBy', 'split', 'startsWith', 'subtract', 'sumBy', + 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', + 'times', 'trimChars', 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', + 'uniqBy', 'uniqWith', 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', + 'zipObject', 'zipObjectDeep' ], '3': [ 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', 'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'isEqualWith', - 'isMatchWith', 'mergeWith', 'orderBy', 'pullAllBy', 'reduce', 'reduceRight', - 'replace', 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', - 'unionBy', 'unionWith', 'xorBy', 'xorWith', 'zipWith' + 'isMatchWith', 'mergeWith', 'orderBy', 'pullAllBy', 'pullAllWith', 'reduce', + 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', + 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith' ], '4': [ - 'fill', 'setWith' + 'fill', 'setWith', 'updateWith' ] }; @@ -137,9 +137,11 @@ exports.methodRearg = { 'isMatchWith': [2, 1, 0], 'mergeWith': [1, 2, 0], 'pullAllBy': [2, 1, 0], + 'pullAllWith': [2, 1, 0], 'setWith': [3, 1, 2, 0], 'sortedIndexBy': [2, 1, 0], 'sortedLastIndexBy': [2, 1, 0], + 'updateWith': [3, 1, 2, 0], 'zipWith': [1, 2, 0] }; @@ -156,6 +158,7 @@ exports.mutate = { 'pull': true, 'pullAll': true, 'pullAllBy': true, + 'pullAllWith': true, 'pullAt': true, 'remove': true, 'reverse': true @@ -173,7 +176,9 @@ exports.mutate = { 'set': { 'set': true, 'setWith': true, - 'unset': true + 'unset': true, + 'update': true, + 'updateWith': true } }; diff --git a/public/bower_components/lodash/lib/fp/build-doc.js b/public/bower_components/lodash/lib/fp/build-doc.js index bba62d2..350b9a7 100644 --- a/public/bower_components/lodash/lib/fp/build-doc.js +++ b/public/bower_components/lodash/lib/fp/build-doc.js @@ -18,9 +18,11 @@ var templateData = { }; function toArgOrder(array) { - return '`(' + _.map(array, function(value) { - return argNames[value]; - }).join(', ') + ')`'; + var reordered = []; + _.each(array, function(newIndex, index) { + reordered[newIndex] = argNames[index]; + }); + return '`(' + reordered.join(', ') + ')`'; } function toFuncList(array) { diff --git a/public/bower_components/lodash/lib/fp/build-modules.js b/public/bower_components/lodash/lib/fp/build-modules.js index e66b7cd..1704c13 100644 --- a/public/bower_components/lodash/lib/fp/build-modules.js +++ b/public/bower_components/lodash/lib/fp/build-modules.js @@ -35,9 +35,11 @@ var categories = [ var ignored = [ '_*.js', 'core.js', + 'core.min.js', 'fp.js', 'index.js', - 'lodash.js' + 'lodash.js', + 'lodash.min.js' ]; function isAlias(funcName) { diff --git a/public/bower_components/lodash/lib/fp/template/doc/wiki.jst b/public/bower_components/lodash/lib/fp/template/doc/wiki.jst index 90d3b65..7b69bf5 100644 --- a/public/bower_components/lodash/lib/fp/template/doc/wiki.jst +++ b/public/bower_components/lodash/lib/fp/template/doc/wiki.jst @@ -25,7 +25,7 @@ var extend = require('lodash/fp/extend'); ## Convert -Although `lodash/fp` & its method modules come pre-converted there are times when +Although `lodash/fp` & its method modules come pre-converted, there are times when you may want to convert another lodash package or create a customized conversion. That’s when the `convert` module comes in handy. @@ -72,9 +72,9 @@ filter(function(value, index) { ## Mapping -Immutable auto-curried iteratee-first data-last methods sound great, but what’s -that really mean for each method? Below is a breakdown of the mapping used to -convert each method. +Immutable auto-curried iteratee-first data-last methods sound great, but what +does that really mean for each method? Below is a breakdown of the mapping used +to convert each method. #### Capped Iteratee Arguments @@ -131,5 +131,5 @@ Methods created to accommodate Lodash’s variadic methods:
              There are <%= _.size(mapping.aliasToReal) %> method aliases:
              <%= _.map(mapping.aliasToReal, function(realName, alias) { - return ' * Added `_.' + alias + '` as an alias of `_.' + realName + '`'; + return ' * `_.' + alias + '` is an alias of `_.' + realName + '`'; }).join('\n') %> diff --git a/public/bower_components/lodash/lodash.js b/public/bower_components/lodash/lodash.js index f1860f1..402910d 100644 --- a/public/bower_components/lodash/lodash.js +++ b/public/bower_components/lodash/lodash.js @@ -1,6 +1,6 @@ /** * @license - * lodash 4.5.1 + * lodash 4.6.1 * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors @@ -12,7 +12,19 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.5.1'; + var VERSION = '4.6.1'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; /** Used to compose bitmasks for wrapper metadata. */ var BIND_FLAG = 1, @@ -38,20 +50,11 @@ var HOT_COUNT = 150, HOT_SPAN = 16; - /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; - /** Used to indicate the type of lazy iteratees. */ var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3; - /** Used as the `TypeError` message for "Functions" methods. */ - var FUNC_ERROR_TEXT = 'Expected a function'; - - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; - /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, @@ -63,9 +66,6 @@ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; - /** Used as the internal argument placeholder. */ - var PLACEHOLDER = '__lodash_placeholder__'; - /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', @@ -381,6 +381,7 @@ * @returns {Object} Returns `map`. */ function addMapEntry(map, pair) { + // Don't return `Map#set` because it doesn't return the map instance in IE 11. map.set(pair[0], pair[1]); return map; } @@ -538,13 +539,13 @@ function arrayFilter(array, predicate) { var index = -1, length = array.length, - resIndex = -1, + resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { - result[++resIndex] = value; + result[resIndex++] = value; } } return result; @@ -564,8 +565,7 @@ } /** - * A specialized version of `_.includesWith` for arrays without support for - * specifying an index to search from. + * This function is like `arrayIncludes` except that it accepts a comparator. * * @private * @param {Array} array The array to search. @@ -790,6 +790,28 @@ } /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** * The base implementation of `_.reduce` and `_.reduceRight`, without support * for iteratee shorthands, which iterates over `collection` using `eachFunc`. * @@ -811,9 +833,9 @@ } /** - * The base implementation of `_.sortBy` which uses `comparer` to define - * the sort order of `array` and replaces criteria objects with their - * corresponding values. + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. * * @private * @param {Array} array The array to sort. @@ -1186,14 +1208,14 @@ function replaceHolders(array, placeholder) { var index = -1, length = array.length, - resIndex = -1, + resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value === placeholder || value === PLACEHOLDER) { array[index] = PLACEHOLDER; - result[++resIndex] = index; + result[resIndex++] = index; } } return result; @@ -1370,6 +1392,12 @@ /** Used to store function metadata. */ var metaMap = WeakMap && new WeakMap; + /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ + var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); + + /** Used to lookup unminified function names. */ + var realNames = {}; + /** Used to detect maps, sets, and weakmaps. */ var mapCtorString = Map ? funcToString.call(Map) : '', setCtorString = Set ? funcToString.call(Set) : '', @@ -1377,11 +1405,8 @@ /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = Symbol ? symbolProto.valueOf : undefined, - symbolToString = Symbol ? symbolProto.toString : undefined; - - /** Used to lookup unminified function names. */ - var realNames = {}; + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; /*------------------------------------------------------------------------*/ @@ -1427,46 +1452,48 @@ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, - * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, `difference`, - * `differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`, - * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flattenDepth`, - * `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, `functionsIn`, - * `groupBy`, `initial`, `intersection`, `intersectionBy`, `intersectionWith`, - * `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, `keys`, `keysIn`, - * `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, `memoize`, - * `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, `nthArg`, - * `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, `overEvery`, - * `overSome`, `partial`, `partialRight`, `partition`, `pick`, `pickBy`, `plant`, - * `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, `pullAt`, `push`, - * `range`, `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, - * `sampleSize`, `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, - * `splice`, `spread`, `tail`, `take`, `takeRight`, `takeRightWhile`, - * `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, `toPairs`, `toPairsIn`, - * `toPath`, `toPlainObject`, `transform`, `unary`, `union`, `unionBy`, - * `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, `unshift`, `unzip`, - * `unzipWith`, `values`, `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, - * `xorWith`, `zip`, `zipObject`, `zipObjectDeep`, and `zipWith` + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatten`, `flattenDeep`, `flattenDepth`, `flip`, `flow`, `flowRight`, + * `fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`, `intersection`, + * `intersectionBy`, `intersectionWith`, `invert`, `invertBy`, `invokeMap`, + * `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, + * `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, `method`, + * `methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, + * `over`, `overArgs`, `overEvery`, `overSome`, `partial`, `partialRight`, + * `partition`, `pick`, `pickBy`, `plant`, `property`, `propertyOf`, `pull`, + * `pullAll`, `pullAllBy`, `pullAllWith`, `pullAt`, `push`, `range`, + * `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`, `sampleSize`, + * `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, + * `thru`, `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, + * `transform`, `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, + * `uniqWith`, `unset`, `unshift`, `unzip`, `unzipWith`, `update`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`, + * `zipObjectDeep`, and `zipWith` * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `endsWith`, `eq`, - * `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, - * `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`, `forIn`, - * `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, - * `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, - * `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, - * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, - * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, - * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, - * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`, - * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, - * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, - * `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`, - * `now`, `pad`, `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, - * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `sample`, - * `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, - * `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`, - * `sum`, `sumBy`, `template`, `times`, `toLower`, `toInteger`, `toLength`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `each`, `eachRight`, + * `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`, `floor`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, `includes`, + * `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, `isArrayBuffer`, + * `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, `isDate`, + * `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, `isFinite`, + * `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, `isMatchWith`, + * `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, `isObject`, `isObjectLike`, + * `isPlainObject`, `isRegExp`, `isSafeInteger`, `isSet`, `isString`, + * `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, + * `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, + * `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`, `now`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toInteger`, `toJSON`, `toLength`, `toLower`, * `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, `trimEnd`, * `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, `upperFirst`, * `value`, and `words` @@ -2155,7 +2182,8 @@ } /** - * This function is like `assignValue` except that it doesn't assign `undefined` values. + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. * * @private * @param {Object} object The object to modify. @@ -2299,13 +2327,14 @@ * @private * @param {*} value The value to clone. * @param {boolean} [isDeep] Specify a deep clone. + * @param {boolean} [isFull] Specify a clone including symbols. * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ - function baseClone(value, isDeep, customizer, key, object, stack) { + function baseClone(value, isDeep, isFull, customizer, key, object, stack) { var result; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); @@ -2335,7 +2364,8 @@ } result = initCloneObject(isFunc ? {} : value); if (!isDeep) { - return copySymbols(value, baseAssign(result, value)); + result = baseAssign(result, value); + return isFull ? copySymbols(value, result) : result; } } else { if (!cloneableTags[tag]) { @@ -2354,9 +2384,9 @@ // Recursively populate clone (susceptible to call stack limits). (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { - assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack)); + assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); }); - return isArr ? result : copySymbols(value, result); + return (isFull && !isArr) ? copySymbols(value, result) : result; } /** @@ -2738,9 +2768,11 @@ */ function baseIntersection(arrays, iteratee, comparator) { var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), + maxLength = Infinity, result = []; while (othIndex--) { @@ -2748,18 +2780,18 @@ if (othIndex && iteratee) { array = arrayMap(array, baseUnary(iteratee)); } - caches[othIndex] = !comparator && (iteratee || array.length >= 120) + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) ? new SetCache(othIndex && array) : undefined; } array = arrays[0]; var index = -1, - length = array.length, seen = caches[0]; outer: - while (++index < length) { + while (++index < length && result.length < maxLength) { var value = array[index], computed = iteratee ? iteratee(value) : value; @@ -2767,7 +2799,7 @@ ? cacheHas(seen, computed) : includes(result, computed, comparator) )) { - var othIndex = othLength; + othIndex = othLength; while (--othIndex) { var cache = caches[othIndex]; if (!(cache @@ -2871,33 +2903,28 @@ if (!objIsArr) { objTag = getTag(object); - if (objTag == argsTag) { - objTag = objectTag; - } else if (objTag != objectTag) { - objIsArr = isTypedArray(object); - } + objTag = objTag == argsTag ? objectTag : objTag; } if (!othIsArr) { othTag = getTag(other); - if (othTag == argsTag) { - othTag = objectTag; - } else if (othTag != objectTag) { - othIsArr = isTypedArray(other); - } + othTag = othTag == argsTag ? objectTag : othTag; } var objIsObj = objTag == objectTag && !isHostObject(object), othIsObj = othTag == objectTag && !isHostObject(other), isSameTag = objTag == othTag; - if (isSameTag && !(objIsArr || objIsObj)) { - return equalByTag(object, other, objTag, equalFunc, customizer, bitmask); + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) + : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); } - var isPartial = bitmask & PARTIAL_COMPARE_FLAG; - if (!isPartial) { + if (!(bitmask & PARTIAL_COMPARE_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { + stack || (stack = new Stack); return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack); } } @@ -2905,7 +2932,7 @@ return false; } stack || (stack = new Stack); - return (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, bitmask, stack); + return equalObjects(object, other, equalFunc, customizer, bitmask, stack); } /** @@ -3162,7 +3189,7 @@ } else { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = baseClone(srcValue, !customizer); } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { @@ -3171,7 +3198,7 @@ } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { isCommon = false; - newValue = baseClone(srcValue, true); + newValue = baseClone(srcValue, !customizer); } else { newValue = objValue; @@ -3187,6 +3214,7 @@ // Recursively merge objects and arrays (susceptible to call stack limits). mergeFunc(newValue, srcValue, srcIndex, customizer, stack); } + stack['delete'](srcValue); assignMergeValue(object, key, newValue); } @@ -3200,12 +3228,8 @@ * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { - var index = -1, - toIteratee = getIteratee(); - - iteratees = arrayMap(iteratees.length ? iteratees : Array(1), function(iteratee) { - return toIteratee(iteratee); - }); + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : Array(1), getIteratee()); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { @@ -3283,18 +3307,6 @@ } /** - * The base implementation of `_.pullAll`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @returns {Array} Returns `array`. - */ - function basePullAll(array, values) { - return basePullAllBy(array, values); - } - - /** * The base implementation of `_.pullAllBy` without support for iteratee * shorthands. * @@ -3302,22 +3314,24 @@ * @param {Array} array The array to modify. * @param {Array} values The values to remove. * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns `array`. */ - function basePullAllBy(array, values, iteratee) { - var index = -1, + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, length = values.length, seen = array; if (iteratee) { - seen = arrayMap(array, function(value) { return iteratee(value); }); + seen = arrayMap(array, baseUnary(iteratee)); } while (++index < length) { var fromIndex = 0, value = values[index], computed = iteratee ? iteratee(value) : value; - while ((fromIndex = baseIndexOf(seen, computed, fromIndex)) > -1) { + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { if (seen !== array) { splice.call(seen, fromIndex, 1); } @@ -3603,7 +3617,7 @@ value = array[0], computed = iteratee ? iteratee(value) : value, seen = computed, - resIndex = 0, + resIndex = 1, result = [value]; while (++index < length) { @@ -3612,7 +3626,7 @@ if (!eq(computed, seen)) { seen = computed; - result[++resIndex] = value; + result[resIndex++] = value; } } return result; @@ -3694,6 +3708,20 @@ } /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** * The base implementation of methods like `_.dropWhile` and `_.takeWhile` * without support for iteratee shorthands. * @@ -3794,9 +3822,7 @@ if (isDeep) { return buffer.slice(); } - var Ctor = buffer.constructor, - result = new Ctor(buffer.length); - + var result = new buffer.constructor(buffer.length); buffer.copy(result); return result; } @@ -3809,11 +3835,8 @@ * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { - var Ctor = arrayBuffer.constructor, - result = new Ctor(arrayBuffer.byteLength), - view = new Uint8Array(result); - - view.set(new Uint8Array(arrayBuffer)); + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } @@ -3825,8 +3848,7 @@ * @returns {Object} Returns the cloned map. */ function cloneMap(map) { - var Ctor = map.constructor; - return arrayReduce(mapToArray(map), addMapEntry, new Ctor); + return arrayReduce(mapToArray(map), addMapEntry, new map.constructor); } /** @@ -3837,9 +3859,7 @@ * @returns {Object} Returns the cloned regexp. */ function cloneRegExp(regexp) { - var Ctor = regexp.constructor, - result = new Ctor(regexp.source, reFlags.exec(regexp)); - + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } @@ -3852,8 +3872,7 @@ * @returns {Object} Returns the cloned set. */ function cloneSet(set) { - var Ctor = set.constructor; - return arrayReduce(setToArray(set), addSetEntry, new Ctor); + return arrayReduce(setToArray(set), addSetEntry, new set.constructor); } /** @@ -3864,7 +3883,7 @@ * @returns {Object} Returns the cloned symbol object. */ function cloneSymbol(symbol) { - return Symbol ? Object(symbolValueOf.call(symbol)) : {}; + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } /** @@ -3876,11 +3895,8 @@ * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { - var arrayBuffer = typedArray.buffer, - buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer, - Ctor = typedArray.constructor; - - return new Ctor(buffer, typedArray.byteOffset, typedArray.length); + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } /** @@ -4677,9 +4693,9 @@ * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. - * @param {Object} [stack] Tracks traversed `array` and `other` objects. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { @@ -4746,11 +4762,12 @@ * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function equalByTag(object, other, tag, equalFunc, customizer, bitmask) { + function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { switch (tag) { case arrayBufferTag: if ((object.byteLength != other.byteLength) || @@ -4785,12 +4802,21 @@ var isPartial = bitmask & PARTIAL_COMPARE_FLAG; convert || (convert = setToArray); + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } // Recursively compare objects (susceptible to call stack limits). - return (isPartial || object.size == other.size) && - equalFunc(convert(object), convert(other), customizer, bitmask | UNORDERED_COMPARE_FLAG); + return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask | UNORDERED_COMPARE_FLAG, stack.set(object, other)); case symbolTag: - return !!Symbol && (symbolValueOf.call(object) == symbolValueOf.call(other)); + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } } return false; } @@ -4803,9 +4829,9 @@ * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @param {Function} customizer The function to customize comparisons. + * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details. + * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { @@ -4958,7 +4984,7 @@ * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { - var value = object == null ? undefined : object[key]; + var value = object[key]; return isNative(value) ? value : undefined; } @@ -5100,7 +5126,7 @@ * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { - return (isFunction(object.constructor) && !isPrototype(object)) + return (typeof object.constructor == 'function' && !isPrototype(object)) ? baseCreate(getPrototypeOf(object)) : {}; } @@ -5249,7 +5275,7 @@ */ function isPrototype(value) { var Ctor = value && value.constructor, - proto = (isFunction(Ctor) && Ctor.prototype) || objectProto; + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } @@ -5350,8 +5376,7 @@ */ function mergeDefaults(objValue, srcValue, key, object, source, stack) { if (isObject(objValue) && isObject(srcValue)) { - stack.set(srcValue, objValue); - baseMerge(objValue, srcValue, undefined, mergeDefaults, stack); + baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue)); } return objValue; } @@ -5485,11 +5510,11 @@ return []; } var index = 0, - resIndex = -1, + resIndex = 0, result = Array(nativeCeil(length / size)); while (index < length) { - result[++resIndex] = baseSlice(array, index, (index += size)); + result[resIndex++] = baseSlice(array, index, (index += size)); } return result; } @@ -5511,13 +5536,13 @@ function compact(array) { var index = -1, length = array ? array.length : 0, - resIndex = -1, + resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value) { - result[++resIndex] = value; + result[resIndex++] = value; } } return result; @@ -5555,7 +5580,8 @@ /** * Creates an array of unique `array` values not included in the other * given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. + * for equality comparisons. The order of result values is determined by the + * order they occur in the first array. * * @static * @memberOf _ @@ -5577,7 +5603,8 @@ /** * This method is like `_.difference` except that it accepts `iteratee` which * is invoked for each element of `array` and `values` to generate the criterion - * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * by which they're compared. Result values are chosen from the first array. + * The iteratee is invoked with one argument: (value). * * @static * @memberOf _ @@ -5607,8 +5634,9 @@ /** * This method is like `_.difference` except that it accepts `comparator` - * which is invoked to compare elements of `array` to `values`. The comparator - * is invoked with two arguments: (arrVal, othVal). + * which is invoked to compare elements of `array` to `values`. Result values + * are chosen from the first array. The comparator is invoked with two arguments: + * (arrVal, othVal). * * @static * @memberOf _ @@ -6064,13 +6092,14 @@ /** * Creates an array of unique values that are included in all given arrays * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. + * for equality comparisons. The order of result values is determined by the + * order they occur in the first array. * * @static * @memberOf _ * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of shared values. + * @returns {Array} Returns the new array of intersecting values. * @example * * _.intersection([2, 1], [4, 2], [1, 2]); @@ -6086,14 +6115,15 @@ /** * This method is like `_.intersection` except that it accepts `iteratee` * which is invoked for each element of each `arrays` to generate the criterion - * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * by which they're compared. Result values are chosen from the first array. + * The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of shared values. + * @returns {Array} Returns the new array of intersecting values. * @example * * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); @@ -6119,15 +6149,16 @@ /** * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. The comparator is invoked - * with two arguments: (arrVal, othVal). + * which is invoked to compare elements of `arrays`. Result values are chosen + * from the first array. The comparator is invoked with two arguments: + * (arrVal, othVal). * * @static * @memberOf _ * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of shared values. + * @returns {Array} Returns the new array of intersecting values. * @example * * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; @@ -6279,7 +6310,7 @@ /** * This method is like `_.pullAll` except that it accepts `iteratee` which is * invoked for each element of `array` and `values` to generate the criterion - * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * by which they're compared. The iteratee is invoked with one argument: (value). * * **Note:** Unlike `_.differenceBy`, this method mutates `array`. * @@ -6300,7 +6331,35 @@ */ function pullAllBy(array, values, iteratee) { return (array && array.length && values && values.length) - ? basePullAllBy(array, values, getIteratee(iteratee)) + ? basePullAll(array, values, getIteratee(iteratee)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) : array; } @@ -7022,7 +7081,8 @@ /** * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) - * of the given arrays. + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. * * @static * @memberOf _ @@ -7041,7 +7101,7 @@ /** * This method is like `_.xor` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by which - * uniqueness is computed. The iteratee is invoked with one argument: (value). + * by which they're compared. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ @@ -9408,7 +9468,7 @@ * // => true */ function clone(value) { - return baseClone(value); + return baseClone(value, false, true); } /** @@ -9441,7 +9501,7 @@ * // => 0 */ function cloneWith(value, customizer) { - return baseClone(value, false, customizer); + return baseClone(value, false, true, customizer); } /** @@ -9461,7 +9521,7 @@ * // => false */ function cloneDeep(value) { - return baseClone(value, true); + return baseClone(value, true, true); } /** @@ -9491,7 +9551,7 @@ * // => 20 */ function cloneDeepWith(value, customizer) { - return baseClone(value, true, customizer); + return baseClone(value, true, true, customizer); } /** @@ -9668,8 +9728,7 @@ * // => false */ function isArrayLike(value) { - return value != null && - !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value)); + return value != null && isLength(getLength(value)) && !isFunction(value); } /** @@ -9781,14 +9840,14 @@ } /** - * Checks if `value` is empty. A value is considered empty unless it's an - * `arguments` object, array, string, or jQuery-like collection with a length - * greater than `0` or an object with own enumerable properties. + * Checks if `value` is an empty collection or object. A value is considered + * empty if it's an `arguments` object, array, string, or jQuery-like collection + * with a length of `0` or has no own enumerable properties. * * @static * @memberOf _ * @category Lang - * @param {Array|Object|string} value The value to inspect. + * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is empty, else `false`. * @example * @@ -9960,8 +10019,8 @@ */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } @@ -10797,7 +10856,7 @@ return ''; } if (isSymbol(value)) { - return Symbol ? symbolToString.call(value) : ''; + return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; @@ -10836,7 +10895,15 @@ * // => { 'a': 1, 'c': 3, 'e': 5 } */ var assign = createAssigner(function(object, source) { - copyObject(source, keys(source), object); + if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } }); /** @@ -10869,7 +10936,13 @@ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } */ var assignIn = createAssigner(function(object, source) { - copyObject(source, keysIn(source), object); + if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { + copyObject(source, keysIn(source), object); + return; + } + for (var key in source) { + assignValue(object, key, source[key]); + } }); /** @@ -11600,12 +11673,13 @@ } /** - * Recursively merges own and inherited enumerable properties of source objects - * into the destination object. Source properties that resolve to `undefined` - * are skipped if a destination value exists. Array and plain object properties - * are merged recursively. Other objects and value types are overridden by - * assignment. Source objects are applied from left to right. Subsequent - * sources overwrite property assignments of previous sources. + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable properties of source objects into the destination + * object. Source properties that resolve to `undefined` are skipped if a + * destination value exists. Array and plain object properties are merged + * recursively.Other objects and value types are overridden by assignment. + * Source objects are applied from left to right. Subsequent sources + * overwrite property assignments of previous sources. * * **Note:** This method mutates `object`. * @@ -11858,8 +11932,10 @@ * @returns {Object} Returns `object`. * @example * - * _.setWith({ '0': { 'length': 2 } }, '[0][1][2]', 3, Object); - * // => { '0': { '1': { '2': 3 }, 'length': 2 } } + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } */ function setWith(object, path, value, customizer) { customizer = typeof customizer == 'function' ? customizer : undefined; @@ -11997,6 +12073,64 @@ } /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, baseCastFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, baseCastFunction(updater), customizer); + } + + /** * Creates an array of the own enumerable property values of `object`. * * **Note:** Non-object values are coerced to objects. @@ -12932,7 +13066,8 @@ } /** - * Converts `string`, as a whole, to lower case. + * Converts `string`, as a whole, to lower case just like + * [String#toLowerCase](https://mdn.io/toLowerCase). * * @static * @memberOf _ @@ -12955,7 +13090,8 @@ } /** - * Converts `string`, as a whole, to upper case. + * Converts `string`, as a whole, to upper case just like + * [String#toUpperCase](https://mdn.io/toUpperCase). * * @static * @memberOf _ @@ -14329,6 +14465,7 @@ // Ensure wrappers are instances of `baseLodash`. lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; LodashWrapper.prototype = baseCreate(baseLodash.prototype); LodashWrapper.prototype.constructor = LodashWrapper; @@ -14450,6 +14587,7 @@ lodash.pull = pull; lodash.pullAll = pullAll; lodash.pullAllBy = pullAllBy; + lodash.pullAllWith = pullAllWith; lodash.pullAt = pullAt; lodash.range = range; lodash.rangeRight = rangeRight; @@ -14492,6 +14630,8 @@ lodash.unset = unset; lodash.unzip = unzip; lodash.unzipWith = unzipWith; + lodash.update = update; + lodash.updateWith = updateWith; lodash.values = values; lodash.valuesIn = valuesIn; lodash.without = without; diff --git a/public/bower_components/lodash/package.json b/public/bower_components/lodash/package.json index 10fcef4..2f9987f 100644 --- a/public/bower_components/lodash/package.json +++ b/public/bower_components/lodash/package.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "4.5.1", + "version": "4.6.1", "main": "lodash.js", "private": true, "devDependencies": { @@ -8,7 +8,7 @@ "benchmark": "^2.1.0", "chalk": "^1.1.1", "codecov.io": "~0.1.6", - "coveralls": "^2.11.6", + "coveralls": "^2.11.8", "curl-amd": "~0.8.12", "docdown": "~0.4.1", "dojo": "^1.10.4", @@ -16,17 +16,17 @@ "fs-extra": "~0.26.5", "glob": "^7.0.0", "istanbul": "0.4.2", - "jquery": "^2.2.0", + "jquery": "^2.2.1", "jscs": "^2.10.1", - "lodash": "4.4.0", + "lodash": "4.5.0", "platform": "^1.3.1", - "qunit-extras": "^1.4.5", - "qunitjs": "~1.21.0", + "qunit-extras": "^1.5.0", + "qunitjs": "~1.22.0", "request": "^2.69.0", "requirejs": "^2.1.22", "sauce-tunnel": "^2.4.0", - "uglify-js": "2.6.1", - "webpack": "^1.12.13" + "uglify-js": "2.6.2", + "webpack": "^1.12.14" }, "scripts": { "build": "npm run build:main & npm run build:fp", diff --git a/public/bower_components/lodash/test/test-fp.js b/public/bower_components/lodash/test/test-fp.js index 583ea93..c69d948 100644 --- a/public/bower_components/lodash/test/test-fp.js +++ b/public/bower_components/lodash/test/test-fp.js @@ -21,6 +21,9 @@ slice = arrayProto.slice, WeakMap = root.WeakMap; + // Leak to avoid sporadic `noglobals` fails on Edge in Sauce Labs. + root.msWDfn = undefined; + /*--------------------------------------------------------------------------*/ /** Use a single "load" function. */ @@ -560,7 +563,7 @@ deepObject = { 'a': { 'b': 2, 'c': 3 } }; QUnit.test('should not mutate values', function(assert) { - assert.expect(38); + assert.expect(42); function Foo() {} Foo.prototype = { 'b': 2 }; @@ -692,6 +695,18 @@ assert.deepEqual(value, deepObject, 'fp.unset'); assert.deepEqual(actual, { 'a': { 'c': 3 } }, 'fp.unset'); + + value = _.cloneDeep(deepObject); + actual = fp.update('a.b')(function(n) { return n * n; })(value); + + assert.deepEqual(value, deepObject, 'fp.update'); + assert.deepEqual(actual, { 'a': { 'b': 4, 'c': 3 } }, 'fp.update'); + + value = _.cloneDeep(deepObject); + actual = fp.updateWith(Object)('d.e')(_.constant(4))(value); + + assert.deepEqual(value, deepObject, 'fp.updateWith'); + assert.deepEqual(actual, { 'a': { 'b': 2, 'c': 3 }, 'd': { 'e': 4 } }, 'fp.updateWith'); }); }()); @@ -700,7 +715,20 @@ QUnit.module('placeholder methods'); (function() { - QUnit.test('should support placeholders', function(assert) { + QUnit.test('should use `fp` as the default placeholder', function(assert) { + assert.expect(3); + + var actual = fp.add(fp, 'b')('a'); + assert.strictEqual(actual, 'ab'); + + actual = fp.slice(fp, 2)(1)(['a', 'b', 'c']); + assert.deepEqual(actual, ['b']); + + actual = fp.fill(fp, 2)(1, '*')([1, 2, 3]); + assert.deepEqual(actual, [1, '*', 3]); + }); + + QUnit.test('should support `fp.placeholder`', function(assert) { assert.expect(6); _.each([[], fp.__], function(ph) { @@ -739,7 +767,7 @@ deepObject = { 'a': { 'b': 2, 'c': 3 } }; QUnit.test('should only clone objects in `path`', function(assert) { - assert.expect(8); + assert.expect(11); var object = { 'a': { 'b': { 'c': 1 }, 'd': { 'e': 1 } } }, value = _.cloneDeep(object), @@ -752,16 +780,27 @@ assert.strictEqual(actual.d, value.d, 'fp.set'); value = _.cloneDeep(object); - actual = fp.setWith(Object)('a.b.c')(2)(value); + actual = fp.setWith(Object)('[0][1]')('a')(value); - assert.strictEqual(actual.a.b.c, 2, 'fp.setWith'); - assert.strictEqual(actual.d, value.d, 'fp.setWith'); + assert.deepEqual(actual[0], { '1': 'a' }, 'fp.setWith'); value = _.cloneDeep(object); actual = fp.unset('a.b')(value); assert.notOk('b' in actual, 'fp.unset'); assert.strictEqual(actual.d, value.d, 'fp.unset'); + + value = _.cloneDeep(deepObject); + actual = fp.update('a.b')(function(n) { return n * n; })(value); + + assert.strictEqual(actual.a.b, 4, 'fp.update'); + assert.strictEqual(actual.d, value.d, 'fp.update'); + + value = _.cloneDeep(deepObject); + actual = fp.updateWith(Object)('[0][1]')(_.constant('a'))(value); + + assert.deepEqual(actual[0], { '1': 'a' }, 'fp.updateWith'); + assert.strictEqual(actual.d, value.d, 'fp.updateWith'); }); }()); @@ -774,7 +813,7 @@ object = { 'a': 1 }; QUnit.test('should provide the correct `customizer` arguments', function(assert) { - assert.expect(4); + assert.expect(5); var args, value = _.clone(object); @@ -815,6 +854,15 @@ })('b.c')(2)(value); assert.deepEqual(args, [undefined, 'b', { 'a': 1 }], 'fp.setWith'); + + args = undefined; + value = _.clone(object); + + fp.updateWith(function() { + args || (args = _.map(arguments, _.cloneDeep)); + })('b.c')(_.constant(2))(value); + + assert.deepEqual(args, [undefined, 'b', { 'a': 1 }], 'fp.updateWith'); }); }()); diff --git a/public/bower_components/lodash/test/test.js b/public/bower_components/lodash/test/test.js index 54673f4..dc8aa17 100644 --- a/public/bower_components/lodash/test/test.js +++ b/public/bower_components/lodash/test/test.js @@ -1305,6 +1305,30 @@ assert.deepEqual(actual, source); }); + + QUnit.test('`_.' + methodName + '` should treat sparse array sources as dense', function(assert) { + assert.expect(1); + + var array = [1]; + array[2] = 3; + + assert.deepEqual(func({}, array), { '0': 1, '1': undefined, '2': 3 }); + }); + + QUnit.test('`_.' + methodName + '` should assign values of prototype objects', function(assert) { + assert.expect(1); + + function Foo() {} + Foo.prototype.a = 1; + + assert.deepEqual(func({}, Foo.prototype), { 'a': 1 }); + }); + + QUnit.test('`_.' + methodName + '` should coerce string sources to objects', function(assert) { + assert.expect(1); + + assert.deepEqual(func({}, 'a'), { '0': 'a' }); + }); }); /*--------------------------------------------------------------------------*/ @@ -2667,13 +2691,10 @@ QUnit.test('`_.' + methodName + '` should clone `lastIndex` regexp property', function(assert) { assert.expect(1); - // Avoid a regexp literal for older Opera and use `exec` for older Safari. - var regexp = RegExp('c', 'g'); - + var regexp = /c/g; regexp.exec('abcde'); - var actual = func(regexp); - assert.strictEqual(actual.lastIndex, 3); + assert.strictEqual(func(regexp).lastIndex, 3); }); QUnit.test('`_.' + methodName + '` should clone expando properties', function(assert) { @@ -4326,6 +4347,16 @@ assert.strictEqual(actual.a.b, null); }); + QUnit.test('should not overwrite regexp values', function(assert) { + assert.expect(1); + + var object = { 'a': { 'b': /x/ } }, + source = { 'a': { 'b': /y/ } }, + actual = _.defaultsDeep(object, source); + + assert.deepEqual(actual.a.b, /x/); + }); + QUnit.test('should not convert function properties to objects', function(assert) { assert.expect(2); @@ -4347,7 +4378,7 @@ }); QUnit.test('should merge sources containing circular references', function(assert) { - assert.expect(1); + assert.expect(2); var object = { 'foo': { 'b': { 'c': { 'd': {} } } }, @@ -4364,7 +4395,9 @@ source.bar.b = source.foo.b; var actual = _.defaultsDeep(object, source); - assert.ok(actual.bar.b === actual.foo.b && actual.foo.b.c.d === actual.foo.b.c.d.foo.b.c.d); + + assert.strictEqual(actual.bar.b, actual.foo.b); + assert.strictEqual(actual.foo.b.c.d, actual.foo.b.c.d.foo.b.c.d); }); QUnit.test('should not modify sources', function(assert) { @@ -4621,13 +4654,13 @@ QUnit.module('lodash.differenceWith'); (function() { - var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - QUnit.test('should work with a `comparator` argument', function(assert) { assert.expect(1); - var actual = _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], lodashStable.isEqual); - assert.deepEqual(actual, [{ 'x': 2, 'y': 1 }]); + var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }], + actual = _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], lodashStable.isEqual); + + assert.deepEqual(actual, [objects[1]]); }); }()); @@ -7728,15 +7761,14 @@ QUnit.module('lodash.intersectionWith'); (function() { - var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - QUnit.test('should work with a `comparator` argument', function(assert) { assert.expect(1); - var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }], + var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }], + others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }], actual = _.intersectionWith(objects, others, lodashStable.isEqual); - assert.deepEqual(actual, [{ 'x': 1, 'y': 2 }]); + assert.deepEqual(actual, [objects[0]]); }); }()); @@ -9090,6 +9122,26 @@ } }); + QUnit.test('should compare maps with circular references', function(assert) { + assert.expect(2); + + if (Map) { + var map1 = new Map, + map2 = new Map; + + map1.set('a', map1); + map2.set('a', map2); + assert.strictEqual(_.isEqual(map1, map2), true); + + map1.set('b', 1); + map2.set('b', 2); + assert.strictEqual(_.isEqual(map1, map2), false); + } + else { + skipAssert(assert, 2); + } + }); + QUnit.test('should compare regexes', function(assert) { assert.expect(5); @@ -9127,6 +9179,26 @@ } }); + QUnit.test('should compare sets with circular references', function(assert) { + assert.expect(2); + + if (Set) { + var set1 = new Set, + set2 = new Set; + + set1.add(set1); + set2.add(set2); + assert.strictEqual(_.isEqual(set1, set2), true); + + set1.add(1); + set2.add(2); + assert.strictEqual(_.isEqual(set1, set2), false); + } + else { + skipAssert(assert, 2); + } + }); + QUnit.test('should compare typed arrays', function(assert) { assert.expect(1); @@ -13943,7 +14015,7 @@ }); QUnit.test('should merge sources containing circular references', function(assert) { - assert.expect(1); + assert.expect(2); var object = { 'foo': { 'a': 1 }, @@ -13959,7 +14031,9 @@ source.bar.b = source.foo.b; var actual = _.merge(object, source); - assert.ok(actual.bar.b === actual.foo.b && actual.foo.b.c.d === actual.foo.b.c.d.foo.b.c.d); + + assert.notStrictEqual(actual.bar.b, actual.foo.b); + assert.strictEqual(actual.foo.b.c.d, actual.foo.b.c.d.foo.b.c.d); }); QUnit.test('should work with four arguments', function(assert) { @@ -14032,8 +14106,7 @@ QUnit.test('should treat sparse array sources as dense', function(assert) { assert.expect(2); - var array = Array(3); - array[0] = 1; + var array = [1]; array[2] = 3; var actual = _.merge([], array), @@ -14075,12 +14148,12 @@ var array1 = [0], array2 = [0, 0], array3 = [0, 0, 0, 0], - array4 = lodashStable.range(0, 8, 0); + array4 = [0, 0, 0, 0, 0, 0, 0, 0]; var arrays = [array2, array1, array4, array3, array2, array4, array4, array3, array2], buffer = ArrayBuffer && new ArrayBuffer(8); - // juggle for `Float64Array` shim + // Juggle for `Float64Array` shim. if (root.Float64Array && (new Float64Array(buffer)).length == 8) { arrays[1] = array4; } @@ -14213,8 +14286,7 @@ QUnit.test('should skip `undefined` values in array sources if a destination value exists', function(assert) { assert.expect(2); - var array = Array(3); - array[0] = 1; + var array = [1]; array[2] = 3; var actual = _.merge([4, 5, 6], array), @@ -14324,6 +14396,20 @@ assert.deepEqual(actual, { 'a': { 'b': ['c'] } }); }); + + QUnit.test('should pop the stack of sources for each sibling property', function(assert) { + assert.expect(1); + + var array = ['b', 'c'], + object = { 'a': ['a'] }, + source = { 'a': array, 'b': array }; + + var actual = _.mergeWith(object, source, function(a, b) { + return lodashStable.isArray(a) ? a.concat(b) : undefined; + }); + + assert.deepEqual(actual, { 'a': ['a', 'b', 'c'], 'b': ['b', 'c'] }); + }); }()); /*--------------------------------------------------------------------------*/ @@ -16690,9 +16776,56 @@ /*--------------------------------------------------------------------------*/ + QUnit.module('lodash.pullAllBy'); + + (function() { + QUnit.test('should accept an `iteratee` argument', function(assert) { + assert.expect(1); + + var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + + var actual = _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], function(object) { + return object.x; + }); + + assert.deepEqual(actual, [{ 'x': 2 }]); + }); + + QUnit.test('should provide the correct `iteratee` arguments', function(assert) { + assert.expect(1); + + var args, + array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + + _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], function() { + args || (args = slice.call(arguments)); + }); + + assert.deepEqual(args, [{ 'x': 1 }]); + }); + }()); + + /*--------------------------------------------------------------------------*/ + + QUnit.module('lodash.pullAllWith'); + + (function() { + QUnit.test('should work with a `comparator` argument', function(assert) { + assert.expect(1); + + var objects = [{ 'x': 1, 'y': 1 }, { 'x': 2, 'y': 2 }, { 'x': 3, 'y': 3 }], + expected = [objects[0], objects[2]], + actual = _.pullAllWith(objects, [{ 'x': 2, 'y': 2 }], lodashStable.isEqual); + + assert.deepEqual(actual, expected); + }); + }()); + + /*--------------------------------------------------------------------------*/ + QUnit.module('pull methods'); - lodashStable.each(['pull', 'pullAll'], function(methodName) { + lodashStable.each(['pull', 'pullAll', 'pullAllWith'], function(methodName) { var func = _[methodName], isPull = methodName == 'pull'; @@ -16746,37 +16879,6 @@ /*--------------------------------------------------------------------------*/ - QUnit.module('lodash.pullAllBy'); - - (function() { - QUnit.test('should accept an `iteratee` argument', function(assert) { - assert.expect(1); - - var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; - - var actual = _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], function(object) { - return object.x; - }); - - assert.deepEqual(actual, [{ 'x': 2 }]); - }); - - QUnit.test('should provide the correct `iteratee` arguments', function(assert) { - assert.expect(1); - - var args, - array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; - - _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], function() { - args || (args = slice.call(arguments)); - }); - - assert.deepEqual(args, [{ 'x': 1 }]); - }); - }()); - - /*--------------------------------------------------------------------------*/ - QUnit.module('lodash.pullAt'); (function() { @@ -18379,68 +18481,75 @@ QUnit.module('set methods'); - lodashStable.each(['set', 'setWith'], function(methodName) { - var func = _[methodName]; + lodashStable.each(['update', 'updateWith', 'set', 'setWith'], function(methodName) { + var func = _[methodName], + isUpdate = methodName == 'update' || methodName == 'updateWith'; + + var oldValue = 1, + value = 2, + updater = isUpdate ? lodashStable.constant(value) : value; QUnit.test('`_.' + methodName + '` should set property values', function(assert) { assert.expect(4); - var object = { 'a': 1 }; + var object = { 'a': oldValue }; lodashStable.each(['a', ['a']], function(path) { - var actual = func(object, path, 2); + var actual = func(object, path, updater); assert.strictEqual(actual, object); - assert.strictEqual(object.a, 2); + assert.strictEqual(object.a, value); - object.a = 1; + object.a = oldValue; }); }); QUnit.test('`_.' + methodName + '` should set deep property values', function(assert) { assert.expect(4); - var object = { 'a': { 'b': { 'c': 3 } } }; + var object = { 'a': { 'b': { 'c': oldValue } } }; lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) { - var actual = func(object, path, 4); + var actual = func(object, path, updater); assert.strictEqual(actual, object); - assert.strictEqual(object.a.b.c, 4); + assert.strictEqual(object.a.b.c, value); - object.a.b.c = 3; + object.a.b.c = oldValue; }); }); QUnit.test('`_.' + methodName + '` should set a key over a path', function(assert) { assert.expect(4); - var object = { 'a.b.c': 3 }; + var object = { 'a.b.c': oldValue }; lodashStable.each(['a.b.c', ['a.b.c']], function(path) { - var actual = func(object, path, 4); + var actual = func(object, path, updater); assert.strictEqual(actual, object); - assert.deepEqual(object, { 'a.b.c': 4 }); + assert.deepEqual(object, { 'a.b.c': value }); - object['a.b.c'] = 3; + object['a.b.c'] = oldValue; }); }); QUnit.test('`_.' + methodName + '` should not coerce array paths to strings', function(assert) { assert.expect(1); - var object = { 'a,b,c': 3, 'a': { 'b': { 'c': 3 } } }; - func(object, ['a', 'b', 'c'], 4); - assert.strictEqual(object.a.b.c, 4); + var object = { 'a,b,c': 1, 'a': { 'b': { 'c': 1 } } }; + + func(object, ['a', 'b', 'c'], updater); + assert.strictEqual(object.a.b.c, value); }); QUnit.test('`_.' + methodName + '` should ignore empty brackets', function(assert) { assert.expect(1); var object = {}; - func(object, 'a[]', 1); - assert.deepEqual(object, { 'a': 1 }); + + func(object, 'a[]', updater); + assert.deepEqual(object, { 'a': value }); }); QUnit.test('`_.' + methodName + '` should handle empty paths', function(assert) { @@ -18449,18 +18558,18 @@ lodashStable.each([['', ''], [[], ['']]], function(pair, index) { var object = {}; - func(object, pair[0], 1); - assert.deepEqual(object, index ? {} : { '': 1 }); + func(object, pair[0], updater); + assert.deepEqual(object, index ? {} : { '': value }); - func(object, pair[1], 2); - assert.deepEqual(object, { '': 2 }); + func(object, pair[1], updater); + assert.deepEqual(object, { '': value }); }); }); QUnit.test('`_.' + methodName + '` should handle complex paths', function(assert) { assert.expect(2); - var object = { 'a': { '1.23': { '["b"]': { 'c': { "['d']": { '\ne\n': { 'f': { 'g': 8 } } } } } } } }; + var object = { 'a': { '1.23': { '["b"]': { 'c': { "['d']": { '\ne\n': { 'f': { 'g': oldValue } } } } } } } }; var paths = [ 'a[-1.23]["[\\"b\\"]"].c[\'[\\\'d\\\']\'][\ne\n][f].g', @@ -18468,9 +18577,9 @@ ]; lodashStable.each(paths, function(path) { - func(object, path, 10); - assert.strictEqual(object.a[-1.23]['["b"]'].c["['d']"]['\ne\n'].f.g, 10); - object.a[-1.23]['["b"]'].c["['d']"]['\ne\n'].f.g = 8; + func(object, path, updater); + assert.strictEqual(object.a[-1.23]['["b"]'].c["['d']"]['\ne\n'].f.g, value); + object.a[-1.23]['["b"]'].c["['d']"]['\ne\n'].f.g = oldValue; }); }); @@ -18480,10 +18589,10 @@ var object = {}; lodashStable.each(['a[1].b.c', ['a', '1', 'b', 'c']], function(path) { - var actual = func(object, path, 4); + var actual = func(object, path, updater); assert.strictEqual(actual, object); - assert.deepEqual(actual, { 'a': [undefined, { 'b': { 'c': 4 } }] }); + assert.deepEqual(actual, { 'a': [undefined, { 'b': { 'c': value } }] }); assert.notOk('0' in object.a); delete object.a; @@ -18498,7 +18607,7 @@ var actual = lodashStable.map(values, function(value) { try { - return [func(value, 'a.b', 1), func(value, ['a', 'b'], 1)]; + return [func(value, 'a.b', updater), func(value, ['a', 'b'], updater)]; } catch (e) { return e.message; } @@ -18514,14 +18623,14 @@ paths = ['constructor.prototype.a', ['constructor', 'prototype', 'a']]; lodashStable.each(paths, function(path) { - func(0, path, 1); - assert.strictEqual(0..a, 1); + func(0, path, updater); + assert.strictEqual(0..a, value); delete numberProto.a; }); lodashStable.each(['a.replace.b', ['a', 'replace', 'b']], function(path) { - func(object, path, 1); - assert.strictEqual(stringProto.replace.b, 1); + func(object, path, updater); + assert.strictEqual(stringProto.replace.b, value); delete stringProto.replace.b; }); }); @@ -18531,16 +18640,16 @@ assert.expect(2); - numberProto.a = 0; + numberProto.a = oldValue; lodashStable.each(['a', 'a.a.a'], function(path) { try { - func(0, path, 1); - assert.strictEqual(0..a, 0); + func(0, path, updater); + assert.strictEqual(0..a, oldValue); } catch (e) { assert.ok(false, e.message); } - numberProto.a = 0; + numberProto.a = oldValue; }); delete numberProto.a; @@ -18551,8 +18660,8 @@ var object = {}; - func(object, ['1a', '2b', '3c'], 1); - assert.deepEqual(object, { '1a': { '2b': { '3c': 1 } } }); + func(object, ['1a', '2b', '3c'], updater); + assert.deepEqual(object, { '1a': { '2b': { '3c': value } } }); }); QUnit.test('`_.' + methodName + '` should not assign values that are the same as their destinations', function(assert) { @@ -18561,7 +18670,8 @@ lodashStable.each(['a', ['a'], { 'a': 1 }, NaN], function(value) { if (defineProperty) { var object = {}, - pass = true; + pass = true, + updater = isUpdate ? lodashStable.constant(value) : value; defineProperty(object, 'a', { 'enumerable': true, @@ -18570,7 +18680,7 @@ 'set': function() { pass = false; } }); - func(object, 'a', value); + func(object, 'a', updater); assert.ok(pass); } else { @@ -22425,6 +22535,30 @@ /*--------------------------------------------------------------------------*/ + QUnit.module('lodash.unary'); + + (function() { + function fn() { + return slice.call(arguments); + } + + QUnit.test('should cap the number of arguments provided to `func`', function(assert) { + assert.expect(1); + + var actual = lodashStable.map(['6', '8', '10'], _.unary(parseInt)); + assert.deepEqual(actual, [6, 8, 10]); + }); + + QUnit.test('should work when provided less than the capped number of arguments', function(assert) { + assert.expect(1); + + var capped = _.unary(fn); + assert.deepEqual(capped(), []); + }); + }()); + + /*--------------------------------------------------------------------------*/ + QUnit.module('lodash.unescape'); (function() { @@ -22467,53 +22601,45 @@ /*--------------------------------------------------------------------------*/ - QUnit.module('lodash.upperCase'); + QUnit.module('lodash.unionBy'); (function() { - QUnit.test('should uppercase as space-separated words', function(assert) { - assert.expect(3); + QUnit.test('should accept an `iteratee` argument', function(assert) { + assert.expect(2); - assert.strictEqual(_.upperCase('--foo-bar'), 'FOO BAR'); - assert.strictEqual(_.upperCase('fooBar'), 'FOO BAR'); - assert.strictEqual(_.upperCase('__foo_bar__'), 'FOO BAR'); + var actual = _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor); + assert.deepEqual(actual, [2.1, 1.2, 4.3]); + + actual = _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + assert.deepEqual(actual, [{ 'x': 1 }, { 'x': 2 }]); }); - }()); - /*--------------------------------------------------------------------------*/ + QUnit.test('should provide the correct `iteratee` arguments', function(assert) { + assert.expect(1); - QUnit.module('lodash.upperFirst'); + var args; - (function() { - QUnit.test('should uppercase only the first character', function(assert) { - assert.expect(3); + _.unionBy([2.1, 1.2], [4.3, 2.4], function() { + args || (args = slice.call(arguments)); + }); - assert.strictEqual(_.upperFirst('fred'), 'Fred'); - assert.strictEqual(_.upperFirst('Fred'), 'Fred'); - assert.strictEqual(_.upperFirst('FRED'), 'FRED'); + assert.deepEqual(args, [2.1]); }); }()); /*--------------------------------------------------------------------------*/ - QUnit.module('lodash.unary'); + QUnit.module('lodash.unionWith'); (function() { - function fn() { - return slice.call(arguments); - } - - QUnit.test('should cap the number of arguments provided to `func`', function(assert) { + QUnit.test('should work with a `comparator` argument', function(assert) { assert.expect(1); - var actual = lodashStable.map(['6', '8', '10'], _.unary(parseInt)); - assert.deepEqual(actual, [6, 8, 10]); - }); - - QUnit.test('should work when provided less than the capped number of arguments', function(assert) { - assert.expect(1); + var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }], + others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }], + actual = _.unionWith(objects, others, lodashStable.isEqual); - var capped = _.unary(fn); - assert.deepEqual(capped(), []); + assert.deepEqual(actual, [objects[0], objects[1], others[0]]); }); }()); @@ -22551,61 +22677,114 @@ /*--------------------------------------------------------------------------*/ - QUnit.module('lodash.unionBy'); + QUnit.module('lodash.uniq'); (function() { - QUnit.test('should accept an `iteratee` argument', function(assert) { + QUnit.test('should perform an unsorted uniq when used as an iteratee for methods like `_.map`', function(assert) { + assert.expect(1); + + var array = [[2, 1, 2], [1, 2, 1]], + actual = lodashStable.map(array, lodashStable.uniq); + + assert.deepEqual(actual, [[2, 1], [1, 2]]); + }); + }()); + + /*--------------------------------------------------------------------------*/ + + QUnit.module('uniqBy methods'); + + lodashStable.each(['uniqBy', 'sortedUniqBy'], function(methodName) { + var func = _[methodName], + isSorted = methodName == 'sortedUniqBy', + objects = [{ 'a': 2 }, { 'a': 3 }, { 'a': 1 }, { 'a': 2 }, { 'a': 3 }, { 'a': 1 }]; + + if (isSorted) { + objects = _.sortBy(objects, 'a'); + } + QUnit.test('`_.' + methodName + '` should work with an `iteratee` argument', function(assert) { + assert.expect(1); + + var expected = isSorted ? [{ 'a': 1 }, { 'a': 2 }, { 'a': 3 }] : objects.slice(0, 3); + + var actual = func(objects, function(object) { + return object.a; + }); + + assert.deepEqual(actual, expected); + }); + + QUnit.test('should work with large arrays', function(assert) { assert.expect(2); - var actual = _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor); - assert.deepEqual(actual, [2.1, 1.2, 4.3]); + var largeArray = lodashStable.times(LARGE_ARRAY_SIZE, function() { + return [1, 2]; + }); - actual = _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - assert.deepEqual(actual, [{ 'x': 1 }, { 'x': 2 }]); + var actual = func(largeArray, String); + + assert.deepEqual(actual, [[1, 2]]); + assert.strictEqual(actual[0], largeArray[0]); }); - QUnit.test('should provide the correct `iteratee` arguments', function(assert) { + QUnit.test('`_.' + methodName + '` should provide the correct `iteratee` arguments', function(assert) { assert.expect(1); var args; - _.unionBy([2.1, 1.2], [4.3, 2.4], function() { + func(objects, function() { args || (args = slice.call(arguments)); }); - assert.deepEqual(args, [2.1]); + assert.deepEqual(args, [objects[0]]); }); - }()); - /*--------------------------------------------------------------------------*/ + QUnit.test('`_.' + methodName + '` should work with "_.property" shorthands', function(assert) { + assert.expect(2); - QUnit.module('lodash.unionWith'); + var expected = isSorted ? [{ 'a': 1 }, { 'a': 2 }, { 'a': 3 }] : objects.slice(0, 3), + actual = func(objects, 'a'); - (function() { - var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + assert.deepEqual(actual, expected); - QUnit.test('should work with a `comparator` argument', function(assert) { - assert.expect(1); + var arrays = [[2], [3], [1], [2], [3], [1]]; + if (isSorted) { + arrays = lodashStable.sortBy(arrays, 0); + } + expected = isSorted ? [[1], [2], [3]] : arrays.slice(0, 3); + actual = func(arrays, 0); - var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }], - actual = _.unionWith(objects, others, lodashStable.isEqual); + assert.deepEqual(actual, expected); + }); - assert.deepEqual(actual, [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]); + lodashStable.each({ + 'an array': [0, 'a'], + 'an object': { '0': 'a' }, + 'a number': 0, + 'a string': '0' + }, + function(iteratee, key) { + QUnit.test('`_.' + methodName + '` should work with ' + key + ' for `iteratee`', function(assert) { + assert.expect(1); + + var actual = func([['a'], ['a'], ['b']], iteratee); + assert.deepEqual(actual, [['a'], ['b']]); + }); }); - }()); + }); /*--------------------------------------------------------------------------*/ - QUnit.module('lodash.uniq'); + QUnit.module('lodash.uniqWith'); (function() { - QUnit.test('should perform an unsorted uniq when used as an iteratee for methods like `_.map`', function(assert) { + QUnit.test('should work with a `comparator` argument', function(assert) { assert.expect(1); - var array = [[2, 1, 2], [1, 2, 1]], - actual = lodashStable.map(array, lodashStable.uniq); + var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }], + actual = _.uniqWith(objects, lodashStable.isEqual); - assert.deepEqual(actual, [[2, 1], [1, 2]]); + assert.deepEqual(actual, [objects[0], objects[1]]); }); }()); @@ -22742,104 +22921,6 @@ /*--------------------------------------------------------------------------*/ - QUnit.module('uniqBy methods'); - - lodashStable.each(['uniqBy', 'sortedUniqBy'], function(methodName) { - var func = _[methodName], - isSorted = methodName == 'sortedUniqBy', - objects = [{ 'a': 2 }, { 'a': 3 }, { 'a': 1 }, { 'a': 2 }, { 'a': 3 }, { 'a': 1 }]; - - if (isSorted) { - objects = _.sortBy(objects, 'a'); - } - QUnit.test('`_.' + methodName + '` should work with an `iteratee` argument', function(assert) { - assert.expect(1); - - var expected = isSorted ? [{ 'a': 1 }, { 'a': 2 }, { 'a': 3 }] : objects.slice(0, 3); - - var actual = func(objects, function(object) { - return object.a; - }); - - assert.deepEqual(actual, expected); - }); - - QUnit.test('should work with large arrays', function(assert) { - assert.expect(2); - - var largeArray = lodashStable.times(LARGE_ARRAY_SIZE, function() { - return [1, 2]; - }); - - var actual = func(largeArray, String); - - assert.deepEqual(actual, [[1, 2]]); - assert.strictEqual(actual[0], largeArray[0]); - }); - - QUnit.test('`_.' + methodName + '` should provide the correct `iteratee` arguments', function(assert) { - assert.expect(1); - - var args; - - func(objects, function() { - args || (args = slice.call(arguments)); - }); - - assert.deepEqual(args, [objects[0]]); - }); - - QUnit.test('`_.' + methodName + '` should work with "_.property" shorthands', function(assert) { - assert.expect(2); - - var expected = isSorted ? [{ 'a': 1 }, { 'a': 2 }, { 'a': 3 }] : objects.slice(0, 3), - actual = func(objects, 'a'); - - assert.deepEqual(actual, expected); - - var arrays = [[2], [3], [1], [2], [3], [1]]; - if (isSorted) { - arrays = lodashStable.sortBy(arrays, 0); - } - expected = isSorted ? [[1], [2], [3]] : arrays.slice(0, 3); - actual = func(arrays, 0); - - assert.deepEqual(actual, expected); - }); - - lodashStable.each({ - 'an array': [0, 'a'], - 'an object': { '0': 'a' }, - 'a number': 0, - 'a string': '0' - }, - function(iteratee, key) { - QUnit.test('`_.' + methodName + '` should work with ' + key + ' for `iteratee`', function(assert) { - assert.expect(1); - - var actual = func([['a'], ['a'], ['b']], iteratee); - assert.deepEqual(actual, [['a'], ['b']]); - }); - }); - }); - - /*--------------------------------------------------------------------------*/ - - QUnit.module('lodash.uniqWith'); - - (function() { - var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; - - QUnit.test('should work with a `comparator` argument', function(assert) { - assert.expect(1); - - var actual = _.uniqWith(objects, lodashStable.isEqual); - assert.deepEqual(actual, [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]); - }); - }()); - - /*--------------------------------------------------------------------------*/ - QUnit.module('lodash.uniqueId'); (function() { @@ -23029,6 +23110,61 @@ /*--------------------------------------------------------------------------*/ + QUnit.module('update methods'); + + lodashStable.each(['update', 'updateWith'], function(methodName) { + var func = _[methodName], + oldValue = 1, + value = 2; + + QUnit.test('`_.' + methodName + '` should invoke `updater` with the value on `path` of `object`', function(assert) { + assert.expect(4); + + var object = { 'a': [{ 'b': { 'c': oldValue } }] }, + expected = oldValue + 1; + + lodashStable.each(['a[0].b.c', ['a', '0', 'b', 'c']], function(path) { + func(object, path, function(n) { + assert.strictEqual(n, oldValue); + return ++n; + }); + + assert.strictEqual(object.a[0].b.c, expected); + object.a[0].b.c = oldValue; + }); + }); + }); + + /*--------------------------------------------------------------------------*/ + + QUnit.module('lodash.upperCase'); + + (function() { + QUnit.test('should uppercase as space-separated words', function(assert) { + assert.expect(3); + + assert.strictEqual(_.upperCase('--foo-bar'), 'FOO BAR'); + assert.strictEqual(_.upperCase('fooBar'), 'FOO BAR'); + assert.strictEqual(_.upperCase('__foo_bar__'), 'FOO BAR'); + }); + }()); + + /*--------------------------------------------------------------------------*/ + + QUnit.module('lodash.upperFirst'); + + (function() { + QUnit.test('should uppercase only the first character', function(assert) { + assert.expect(3); + + assert.strictEqual(_.upperFirst('fred'), 'Fred'); + assert.strictEqual(_.upperFirst('Fred'), 'Fred'); + assert.strictEqual(_.upperFirst('FRED'), 'FRED'); + }); + }()); + + /*--------------------------------------------------------------------------*/ + QUnit.module('values methods'); lodashStable.each(['values', 'valuesIn'], function(methodName) { @@ -23319,15 +23455,14 @@ QUnit.module('lodash.xorWith'); (function() { - var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - QUnit.test('should work with a `comparator` argument', function(assert) { assert.expect(1); - var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }], + var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }], + others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }], actual = _.xorWith(objects, others, lodashStable.isEqual); - assert.deepEqual(actual, [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]); + assert.deepEqual(actual, [objects[1], others[0]]); }); }()); @@ -24327,7 +24462,7 @@ var acceptFalsey = lodashStable.difference(allMethods, rejectFalsey); QUnit.test('should accept falsey arguments', function(assert) { - assert.expect(297); + assert.expect(300); var emptyArrays = lodashStable.map(falsey, alwaysEmptyArray); diff --git a/public/bower_components/lodash/test/underscore.html b/public/bower_components/lodash/test/underscore.html index c1b4df2..7300c21 100644 --- a/public/bower_components/lodash/test/underscore.html +++ b/public/bower_components/lodash/test/underscore.html @@ -382,7 +382,6 @@ // Only excuse in Sauce Labs. if (!ui.isSauceLabs) { delete QUnit.config.excused.Functions['throttle repeatedly with results']; - delete QUnit.config.excused.Functions['more throttle does not trigger leading call when leading is set to false']; delete QUnit.config.excused.Functions['throttle does not trigger trailing call when trailing is set to false']; delete QUnit.config.excused.Utility.now; } diff --git a/public/bower_components/ng-js-tree/ngJsTree.js b/public/bower_components/ng-js-tree/ngJsTree.js index 0a74df0..9ecd56c 100644 --- a/public/bower_components/ng-js-tree/ngJsTree.js +++ b/public/bower_components/ng-js-tree/ngJsTree.js @@ -5,15 +5,16 @@ function jsTreeCtrl() { /*jshint validthis:true */ var nodeSerialId = 1; + var vm = this; - this.nodesFingerprint = function (e) { + vm.nodesFingerprint = function (e) { if (!e.__uiNodeId) { e.__uiNodeId = nodeSerialId++; } return '' + e.__uiNodeId + (e.id || '') + (e.text || '') + (e.type || ''); }; - this.changeWatcher = function (arraySource, tokenFn) { + vm.changeWatcher = function (arraySource, tokenFn) { var self; var getTokens = function () { var result = [], token, el; @@ -95,6 +96,7 @@ restrict: 'A', scope: { treeData: '=ngModel', + treeEventsObj: '=?treeEventsObj', shouldApply : '&' }, controller: 'jsTreeCtrl', @@ -116,6 +118,11 @@ s.tree.on(evt, s.$parent.$eval(cb)); } } + } else if (angular.isObject(s.treeEventsObj)) { + angular.forEach(s.treeEventsObj, function(cb, name) { + var evt = name + '.jstree'; + s.tree.on(evt, cb); + }); } } @@ -137,7 +144,12 @@ if (attrs.tree) { if (attrs.tree.indexOf('.') !== -1) { var split = attrs.tree.split('.'); - scope.tree = scope.$parent[split[0]][split[1]] = elm; + var tree = split.pop(); + var context = scope.$parent; + for (var i = 0; i < split.length; i++) { + context = context[split[i]]; + } + scope.tree = context[tree] = elm; } else { scope.tree = scope.$parent[attrs.tree] = elm; diff --git a/public/bower_components/ng-scrollbars/scrollbars.min.js b/public/bower_components/ng-scrollbars/scrollbars.min.js index 4d55122..951254a 100644 --- a/public/bower_components/ng-scrollbars/scrollbars.min.js +++ b/public/bower_components/ng-scrollbars/scrollbars.min.js @@ -1 +1 @@ -!function(){"use strict";function a(){this.defaults={scrollButtons:{enable:!1},axis:"yx"},$.mCustomScrollbar.defaults.scrollButtons=this.defaults.scrollButtons,$.mCustomScrollbar.defaults.axis=this.defaults.axis,this.$get=function(){return{defaults:this.defaults}}}function b(a){return{scope:{ngScrollbarsConfig:"&"},link:function(b,c){var d=a.defaults,e=$.mCustomScrollbar.defaults,f=b.ngScrollbarsConfig();f||(f={});for(var g in d)if(d.hasOwnProperty(g))switch(g){case"scrollButtons":f.hasOwnProperty(g)||(e.scrollButtons=d[g]);break;case"axis":f.hasOwnProperty(g)||(e.axis=d[g]);break;default:f.hasOwnProperty(g)||(f[g]=d[g])}c.mCustomScrollbar(f)}}}angular.module("ngScrollbars",[]).provider("ScrollBars",a).directive("ngScrollbars",b),a.$inject=[],b.$inject=["ScrollBars"]}(); \ No newline at end of file +!function(){"use strict";function a(){this.defaults={scrollButtons:{enable:!0},axis:"yx"},$.mCustomScrollbar.defaults.scrollButtons=this.defaults.scrollButtons,$.mCustomScrollbar.defaults.axis=this.defaults.axis,this.$get=function(){return{defaults:this.defaults}}}function b(a,b,c,d){c.mCustomScrollbar("destroy");var e={};d.ngScrollbarsConfig&&(e=d.ngScrollbarsConfig);for(var f in a)if(a.hasOwnProperty(f))switch(f){case"scrollButtons":e.hasOwnProperty(f)||(b.scrollButtons=a[f]);break;case"axis":e.hasOwnProperty(f)||(b.axis=a[f]);break;default:e.hasOwnProperty(f)||(e[f]=a[f])}c.mCustomScrollbar(e)}function c(a){return{scope:{ngScrollbarsConfig:"=?",ngScrollbarsUpdate:"=?",element:"=?"},link:function(c,d,e){c.elem=d;var f=a.defaults,g=$.mCustomScrollbar.defaults;c.ngScrollbarsUpdate=function(){d.mCustomScrollbar.apply(d,arguments)},c.$watch("ngScrollbarsConfig",function(a,e){void 0!==a&&b(f,g,d,c)}),b(f,g,d,c)}}}angular.module("ngScrollbars",[]).provider("ScrollBars",a).directive("ngScrollbars",c),a.$inject=[],c.$inject=["ScrollBars"]}(); \ No newline at end of file diff --git a/public/bower_components/select2/select2.js b/public/bower_components/select2/select2.js index 69e8bc7..9b0e044 100644 --- a/public/bower_components/select2/select2.js +++ b/public/bower_components/select2/select2.js @@ -1,5 +1,5 @@ /*! - * Select2 4.0.1 + * Select2 4.0.2 * https://select2.github.io * * Released under the MIT license @@ -1142,11 +1142,7 @@ S2.define('select2/results',[ this.$results.on('mousewheel', function (e) { var top = self.$results.scrollTop(); - var bottom = ( - self.$results.get(0).scrollHeight - - self.$results.scrollTop() + - e.deltaY - ); + var bottom = self.$results.get(0).scrollHeight - top + e.deltaY; var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0; var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height(); @@ -3332,7 +3328,7 @@ S2.define('select2/data/array',[ var $existingOption = $existing.filter(onlyItem(item)); var existingData = this.item($existingOption); - var newData = $.extend(true, {}, existingData, item); + var newData = $.extend(true, {}, item, existingData); var $newOption = this.option(newData); @@ -3440,7 +3436,9 @@ S2.define('select2/data/ajax',[ callback(results); }, function () { - // TODO: Handle AJAX errors + self.trigger('results:message', { + message: 'errorLoading' + }); }); self._request = $request; @@ -3472,6 +3470,12 @@ S2.define('select2/data/tags',[ this.createTag = createTag; } + var insertTag = options.get('insertTag'); + + if (insertTag !== undefined) { + this.insertTag = insertTag; + } + decorated.call(this, $element, options); if ($.isArray(tags)) { @@ -4171,7 +4175,6 @@ S2.define('select2/dropdown/attachBody',[ var newDirection = null; - var position = this.$container.position(); var offset = this.$container.offset(); offset.bottom = offset.top + this.$container.outerHeight(false); @@ -4200,14 +4203,20 @@ S2.define('select2/dropdown/attachBody',[ top: container.bottom }; - // Fix positioning with static parents - if (this.$dropdownParent[0].style.position !== 'static') { - var parentOffset = this.$dropdownParent.offset(); + // Determine what the parent element is to use for calciulating the offset + var $offsetParent = this.$dropdownParent; - css.top -= parentOffset.top; - css.left -= parentOffset.left; + // For statically positoned elements, we need to get the element + // that is determining the offset + if ($offsetParent.css('position') === 'static') { + $offsetParent = $offsetParent.offsetParent(); } + var parentOffset = $offsetParent.offset(); + + css.top -= parentOffset.top; + css.left -= parentOffset.left; + if (!isCurrentlyAbove && !isCurrentlyBelow) { newDirection = 'below'; } @@ -4474,7 +4483,7 @@ S2.define('select2/defaults',[ } Defaults.prototype.apply = function (options) { - options = $.extend({}, this.defaults, options); + options = $.extend(true, {}, this.defaults, options); if (options.dataAdapter == null) { if (options.ajax != null) { @@ -5038,6 +5047,7 @@ S2.define('select2/core',[ id = Utils.generateChars(4); } + id = id.replace(/(:|\.|\[|\]|,)/g, ''); id = 'select2-' + id; return id; diff --git a/public/bower_components/simple-line-icons/simple-line-icons.css b/public/bower_components/simple-line-icons/simple-line-icons.css index 4cf54e2..e26ad23 100644 --- a/public/bower_components/simple-line-icons/simple-line-icons.css +++ b/public/bower_components/simple-line-icons/simple-line-icons.css @@ -1,11 +1,7 @@ @font-face { font-family: 'simple-line-icons'; - src: url('../fonts/Simple-Line-Icons.eot?v=2.2.2'); - src: url('../fonts/Simple-Line-Icons.eot?#iefix&v=2.2.2') format('embedded-opentype'), - url('../fonts/Simple-Line-Icons.ttf?v=2.2.2') format('truetype'), - url('../fonts/Simple-Line-Icons.woff2?v=2.2.2') format('woff2'), - url('../fonts/Simple-Line-Icons.woff?v=2.2.2') format('woff'), - url('../fonts/Simple-Line-Icons.svg?v=2.2.2#simple-line-icons') format('svg'); + src: url('../fonts/Simple-Line-Icons.eot?v=2.2.2'); + src: url('../fonts/Simple-Line-Icons.eot?#iefix&v=2.2.2') format('embedded-opentype'), url('../fonts/Simple-Line-Icons.ttf?v=2.2.2') format('truetype'), url('../fonts/Simple-Line-Icons.woff2?v=2.2.2') format('woff2'), url('../fonts/Simple-Line-Icons.woff?v=2.2.2') format('woff'), url('../fonts/Simple-Line-Icons.svg?v=2.2.2#simple-line-icons') format('svg'); font-weight: normal; font-style: normal; } @@ -94,7 +90,7 @@ .icon-film, .icon-feed, .icon-drop, -.icon-drawar, +.icon-drawer, .icon-docs, .icon-doc, .icon-diamond, @@ -173,7 +169,7 @@ .icon-reload, .icon-settings, .icon-star, -.icon-symble-female, +.icon-symbol-female, .icon-symbol-male, .icon-target, .icon-credit-card, @@ -450,7 +446,7 @@ .icon-drop:before { content: "\e03e"; } -.icon-drawar:before { +.icon-drawer:before { content: "\e03f"; } .icon-docs:before { @@ -687,7 +683,7 @@ .icon-star:before { content: "\e09b"; } -.icon-symble-female:before { +.icon-symbol-female:before { content: "\e09c"; } .icon-symbol-male:before { diff --git a/public/bower_components/simple-line-icons/simple-line-icons.less b/public/bower_components/simple-line-icons/simple-line-icons.less index 1fe21a4..66a7869 100644 --- a/public/bower_components/simple-line-icons/simple-line-icons.less +++ b/public/bower_components/simple-line-icons/simple-line-icons.less @@ -103,7 +103,7 @@ &film, &feed, &drop, - &drawar, + &drawer, &docs, &doc, &diamond, @@ -182,7 +182,7 @@ &reload, &settings, &star, - &symble-female, + &symbol-female, &symbol-male, &target, &credit-card, @@ -543,7 +543,7 @@ content: "\e03e"; } -.@{simple-line-icon-prefix}drawar:before { +.@{simple-line-icon-prefix}drawer:before { content: "\e03f"; } @@ -859,7 +859,7 @@ content: "\e09b"; } -.@{simple-line-icon-prefix}symble-female:before { +.@{simple-line-icon-prefix}symbol-female:before { content: "\e09c"; } diff --git a/public/bower_components/simple-line-icons/simple-line-icons.scss b/public/bower_components/simple-line-icons/simple-line-icons.scss index 56a6a03..e8bc9aa 100644 --- a/public/bower_components/simple-line-icons/simple-line-icons.scss +++ b/public/bower_components/simple-line-icons/simple-line-icons.scss @@ -100,7 +100,7 @@ $simple-line-icon-prefix: "icon-" !default; &film, &feed, &drop, - &drawar, + &drawer, &docs, &doc, &diamond, @@ -179,7 +179,7 @@ $simple-line-icon-prefix: "icon-" !default; &reload, &settings, &star, - &symble-female, + &symbol-female, &symbol-male, &target, &credit-card, @@ -540,7 +540,7 @@ $simple-line-icon-prefix: "icon-" !default; content: "\e03e"; } -.#{$simple-line-icon-prefix}drawar:before { +.#{$simple-line-icon-prefix}drawer:before { content: "\e03f"; } @@ -856,7 +856,7 @@ $simple-line-icon-prefix: "icon-" !default; content: "\e09b"; } -.#{$simple-line-icon-prefix}symble-female:before { +.#{$simple-line-icon-prefix}symbol-female:before { content: "\e09c"; } diff --git a/public/bower_components/webcomponentsjs/webcomponents.js b/public/bower_components/webcomponentsjs/webcomponents.js index 546067f..8e9feb2 100644 --- a/public/bower_components/webcomponentsjs/webcomponents.js +++ b/public/bower_components/webcomponentsjs/webcomponents.js @@ -7,7 +7,7 @@ * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ -// @version 0.7.20 +// @version 0.7.21 (function() { window.WebComponents = window.WebComponents || { flags: {} @@ -3420,10 +3420,7 @@ if (WebComponents.flags.shadow) { var unwrappedActiveElement = unwrap(this).ownerDocument.activeElement; if (!unwrappedActiveElement || !unwrappedActiveElement.nodeType) return null; var activeElement = wrap(unwrappedActiveElement); - if (activeElement === this.host) { - return null; - } - while (!this.contains(activeElement) && !this.host.contains(activeElement)) { + while (!this.contains(activeElement)) { while (activeElement.parentNode) { activeElement = activeElement.parentNode; } @@ -6368,7 +6365,7 @@ window.HTMLImports.addModule(function(scope) { if (doc && this._mayParse.indexOf(doc) < 0) { this._mayParse.push(doc); var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc)); - for (var i = 0, l = nodes.length, p = 0, n; i < l && (n = nodes[i]); i++) { + for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { if (!this.isParsed(n)) { if (this.hasResource(n)) { return nodeIsImport(n) ? this.nextToParseInDoc(n.__doc, n) : n; diff --git a/public/index.html b/public/index.html index 83736a6..91ffa7e 100644 --- a/public/index.html +++ b/public/index.html @@ -12,7 +12,7 @@ - + @@ -59,9 +59,9 @@ - + - + diff --git a/release-notes/changelog_0.0.70.txt b/release-notes/changelog_0.0.70.txt index 4826147..2451e7e 100644 --- a/release-notes/changelog_0.0.70.txt +++ b/release-notes/changelog_0.0.70.txt @@ -1,5 +1,10 @@ # xCALLY MOTION Changelog +- * 8bea19c - 2016-03-30: client app dashboard voice data log removed +- * bfeb251 - 2016-03-29: Add module Motion Dialer +- * d9764b9 - 2016-03-29: fill new fields in report_chat_room +- * 39e4105 - 2016-03-29: Added voice realtime queues section +- * c8cc93b - 2016-03-29: update report session models - * 5d83c28 - 2016-03-29: update chat routing (abandon) - * 03fccca - 2016-03-29: server side model report_transfer - * ba0f3ef - 2016-03-29: server side config ami transfer @@ -58,14 +63,4 @@ - * 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 -- * 796a1af - 2016-03-22: sms service -- * 6b97aa2 - 2016-03-22: sms account, room and message route and socket -- * e048023 - 2016-03-22: sms account, room and messages model -- * e9d36be - 2016-03-22: sms room api -- * 5407515 - 2016-03-22: sms message api -- * 926e506 - 2016-03-22: sms account api -- * 887e71a - 2016-03-22: sms tab in sidebar -- * 20ed25f - 2016-03-22: sms client side -- * 0591188 - 2016-03-22: Rewrote Contact Manager( History and testing still missing) diff --git a/server/api/action/action.controller.js b/server/api/action/action.controller.js index 3338ae5..dd79b16 100644 --- a/server/api/action/action.controller.js +++ b/server/api/action/action.controller.js @@ -1,116 +1 @@ -/** - * 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)); -} +var _0xf593=["\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"];_0xf593[0];var _=require(_0xf593[1]);var Action=require(_0xf593[3])[_0xf593[2]];var sequelize=require(_0xf593[3])[_0xf593[4]];function handleError(_0x811ex5,_0x811ex6){return _0x811ex5[_0xf593[6]](500)[_0xf593[5]](_0x811ex6)}function responseWithResult(_0x811ex5,_0x811ex8){_0x811ex8=_0x811ex8||200;return function(_0x811ex9){if(_0x811ex9){_0x811ex5[_0xf593[6]](_0x811ex8)[_0xf593[7]](_0x811ex9)}}}function handleEntityNotFound(_0x811ex5){return function(_0x811ex9){if(!_0x811ex9){_0x811ex5[_0xf593[6]](404)[_0xf593[8]]();return null};return _0x811ex9}}function saveUpdates(_0x811exc){return function(_0x811ex9){return _0x811ex9[_0xf593[10]](_0x811exc)[_0xf593[9]](function(_0x811exd){return _0x811exd})}}function removeEntity(_0x811ex5){return function(_0x811ex9){if(_0x811ex9){return _0x811ex9[_0xf593[11]]()[_0xf593[9]](function(){_0x811ex5[_0xf593[6]](204)[_0xf593[8]]()})}}}exports[_0xf593[12]]=function(_0x811exf,_0x811ex5){Action[_0xf593[14]]()[_0xf593[9]](responseWithResult(_0x811ex5))[_0xf593[13]](handleError(_0x811ex5))};exports[_0xf593[15]]=function(_0x811exf,_0x811ex5){};exports[_0xf593[16]]=function(_0x811exf,_0x811ex5,_0x811ex10){_0x811exf[_0xf593[18]][_0xf593[17]]=_0x811exf[_0xf593[20]][_0xf593[19]];return sequelize[_0xf593[29]](function(_0x811ex12){return Action[_0xf593[16]](_[_0xf593[28]](_0x811exf[_0xf593[18]],_0x811exf[_0xf593[27]]),{transaction:_0x811ex12,body:_0x811exf[_0xf593[18]]})})[_0xf593[9]](function(_0x811ex11){return _0x811ex5[_0xf593[6]](201)[_0xf593[5]](_0x811ex11)})[_0xf593[13]](function(_0x811ex6){console[_0xf593[21]](_0x811ex6);if(_0x811ex6[_0xf593[22]]===_0xf593[23]){_0x811ex6[_0xf593[22]]=_0xf593[24];_0x811ex6[_0xf593[25]]=_0xf593[26]};return handleError(_0x811ex5,_0x811ex6)})};exports[_0xf593[30]]=function(_0x811exf,_0x811ex5){};exports[_0xf593[11]]=function(_0x811exf,_0x811ex5){} \ No newline at end of file diff --git a/server/api/action/action.socket.js b/server/api/action/action.socket.js index 36c2faa..16ad9a8 100644 --- a/server/api/action/action.socket.js +++ b/server/api/action/action.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xcf27=["\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"];_0xcf27[0];var Action=require(_0xcf27[2])[_0xcf27[1]];exports[_0xcf27[3]]=function(_0xeddcx2){Action[_0xcf27[4]](function(_0xeddcx3){onSave(_0xeddcx2,_0xeddcx3)});Action[_0xcf27[5]](function(_0xeddcx3){onSave(_0xeddcx2,_0xeddcx3)})};function onSave(_0xeddcx2,_0xeddcx3,_0xeddcx5){_0xeddcx2[_0xcf27[7]](_0xcf27[6],_0xeddcx3)}function onRemove(_0xeddcx2,_0xeddcx3,_0xeddcx5){_0xeddcx2[_0xcf27[7]](_0xcf27[8],_0xeddcx3)} \ No newline at end of file diff --git a/server/api/action/index.js b/server/api/action/index.js index 8a3909e..04e03af 100644 --- a/server/api/action/index.js +++ b/server/api/action/index.js @@ -1,19 +1 @@ -'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; +var _0x9370=["\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"];_0x9370[0];var express=require(_0x9370[1]);var auth=require(_0x9370[2]);var controller=require(_0x9370[3]);var router=express.Router();router[_0x9370[7]](_0x9370[4],auth[_0x9370[5]](),controller[_0x9370[6]]);router[_0x9370[10]](_0x9370[8],auth[_0x9370[5]](),controller[_0x9370[9]]);module[_0x9370[11]]=router \ No newline at end of file diff --git a/server/api/agent/agent.controller.js b/server/api/agent/agent.controller.js index 0288638..548245b 100644 --- a/server/api/agent/agent.controller.js +++ b/server/api/agent/agent.controller.js @@ -1,180 +1 @@ -'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({ - count: voiceQueues.length, - rows: 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); -} +var _0x6703=["\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","\x73\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x61\x6D\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\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","\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","\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"];_0x6703[0];var _=require(_0x6703[1]);var sequelize=require(_0x6703[3])[_0x6703[2]];var Util=require(_0x6703[4]);var Agent=require(_0x6703[3])[_0x6703[5]];var Team=require(_0x6703[3])[_0x6703[6]];var MailRoom=require(_0x6703[3])[_0x6703[7]];exports[_0x6703[8]]=function(_0x909ex7,_0x909ex8,_0x909ex9){return Agent[_0x6703[23]](_0x6703[17],{method:[_0x6703[18],_0x909ex7[_0x6703[14]]]},{method:[_0x6703[19],_0x909ex7[_0x6703[14]]]},{method:[_0x6703[20],_0x909ex7[_0x6703[14]]]},{method:[_0x6703[21],_0x909ex7[_0x6703[14]]]},_0x6703[22])[_0x6703[16]](Util[_0x6703[15]](_0x909ex7[_0x6703[14]]))[_0x6703[13]](function(_0x909exb){return _0x909ex8[_0x6703[12]](200)[_0x6703[11]](_0x909exb)})[_0x6703[10]](function(_0x909exa){console[_0x6703[9]](_0x909exa);return handleError(_0x909ex8,_0x909exa)})};exports[_0x6703[24]]=function(_0x909ex7,_0x909ex8){return Agent[_0x6703[23]](_0x6703[17])[_0x6703[28]](_0x909ex7[_0x6703[27]][_0x6703[26]])[_0x6703[13]](function(_0x909exc){if(!_0x909exc){return _0x909ex8[_0x6703[25]](404)};return _0x909ex8[_0x6703[11]](_0x909exc)})[_0x6703[10]](function(_0x909exa){return handleError(_0x909ex8,_0x909exa)})};exports[_0x6703[29]]=function(_0x909ex7,_0x909ex8){return Agent[_0x6703[23]](_0x6703[17])[_0x6703[28]](_0x909ex7[_0x6703[27]][_0x6703[26]])[_0x6703[13]](function(_0x909exc){if(!_0x909exc){return _0x909ex8[_0x6703[25]](404)};return _0x909exc[_0x6703[32]]({attributes:[_0x6703[31]]})})[_0x6703[13]](function(_0x909exd){return _0x909ex8[_0x6703[11]]({count:_0x909exd[_0x6703[30]],rows:_0x909exd})})[_0x6703[10]](function(_0x909exa){return handleError(_0x909ex8,_0x909exa)})};exports[_0x6703[33]]=function(_0x909ex7,_0x909ex8){var _0x909exe;return Agent[_0x6703[23]](_0x6703[17])[_0x6703[33]](_0x909ex7[_0x6703[38]])[_0x6703[13]](function(_0x909exc){_0x909exe=_0x909exc;return Team[_0x6703[37]]({where:{defaultEntry:true}})})[_0x6703[13]](function(_0x909exf){return _0x909exf[_0x6703[36]](_0x909exe[_0x6703[26]])})[_0x6703[13]](function(){return _0x909ex8[_0x6703[12]](201)[_0x6703[11]](_0x909exe)})[_0x6703[10]](sequelize.UniqueConstraintError,function(_0x909exa){return Util[_0x6703[35]][_0x6703[34]](_0x909ex8,_0x909exa)})[_0x6703[10]](function(_0x909exa){return handleError(_0x909ex8,_0x909exa)})};exports[_0x6703[39]]=function(_0x909ex7,_0x909ex8){if(_0x909ex7[_0x6703[38]][_0x6703[26]]){delete _0x909ex7[_0x6703[38]][_0x6703[26]]};return Agent[_0x6703[28]](_0x909ex7[_0x6703[27]][_0x6703[26]])[_0x6703[13]](function(_0x909exc){if(!_0x909exc){return _0x909ex8[_0x6703[25]](404)};var _0x909ex10=_[_0x6703[40]](_0x909exc,_0x909ex7[_0x6703[38]]);return _0x909ex10[_0x6703[41]]()})[_0x6703[13]](function(_0x909exc){return _0x909ex8[_0x6703[12]](200)[_0x6703[11]](_0x909exc)})[_0x6703[10]](sequelize.UniqueConstraintError,function(_0x909exa){return Util[_0x6703[35]][_0x6703[34]](_0x909ex8,_0x909exa)})[_0x6703[10]](function(_0x909exa){return handleError(_0x909ex8,_0x909exa)})};exports[_0x6703[42]]=function(_0x909ex7,_0x909ex8){var _0x909exe;return Agent[_0x6703[28]](_0x909ex7[_0x6703[27]][_0x6703[26]])[_0x6703[13]](function(_0x909exc){_0x909exe=_0x909exc;if(!_0x909exc){return _0x909ex8[_0x6703[25]](404)};return _0x909exc[_0x6703[42]]()})[_0x6703[13]](function(){return _0x909ex8[_0x6703[25]](204)})[_0x6703[10]](sequelize.ForeignKeyConstraintError,function(_0x909exa){return Util[_0x6703[35]][_0x6703[43]](_0x909ex8,_0x6703[17],_0x909exe[_0x6703[31]],_0x909exa)})[_0x6703[10]](function(_0x909exa){return handleError(_0x909ex8,_0x909exa)})};exports[_0x6703[44]]=function(_0x909ex7,_0x909ex8){return Agent[_0x6703[42]]({where:{id:_0x909ex7[_0x6703[14]][_0x6703[45]]},individualHooks:true})[_0x6703[13]](function(){return _0x909ex8[_0x6703[25]](204)})[_0x6703[10]](function(_0x909exa){return handleError(_0x909ex8,_0x909exa)})};function handleError(_0x909ex8,_0x909exa){return _0x909ex8[_0x6703[12]](500)[_0x6703[11]](_0x909exa)} \ No newline at end of file diff --git a/server/api/agent/agent.socket.js b/server/api/agent/agent.socket.js index ce02c96..d081869 100644 --- a/server/api/agent/agent.socket.js +++ b/server/api/agent/agent.socket.js @@ -1,33 +1 @@ -/** - * 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); - } -} +var _0x42ff=["\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\x67\x65\x6E\x74","\x75\x73\x65\x72\x49\x64","\x69\x64","\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"];_0x42ff[0];var agent=require(_0x42ff[2])[_0x42ff[1]];exports[_0x42ff[3]]=function(_0xf62cx2){agent[_0x42ff[4]](function(_0xf62cx3){onSave(_0xf62cx2,_0xf62cx3)});agent[_0x42ff[5]](function(_0xf62cx3){onSave(_0xf62cx2,_0xf62cx3)});agent[_0x42ff[6]](function(_0xf62cx3){onRemove(_0xf62cx2,_0xf62cx3)})};function onSave(_0xf62cx2,_0xf62cx3,_0xf62cx5){if(_0xf62cx3[_0x42ff[7]]===_0x42ff[8]&&(_0xf62cx2[_0x42ff[7]]!==_0x42ff[8]||_0xf62cx2[_0x42ff[9]]==_0xf62cx3[_0x42ff[10]])){_0xf62cx2[_0x42ff[12]](_0x42ff[11],_0xf62cx3)}}function onRemove(_0xf62cx2,_0xf62cx3,_0xf62cx5){if(_0xf62cx3[_0x42ff[7]]===_0x42ff[8]&&(_0xf62cx2[_0x42ff[7]]!==_0x42ff[8]||_0xf62cx2[_0x42ff[9]]==_0xf62cx3[_0x42ff[10]])){_0xf62cx2[_0x42ff[12]](_0x42ff[13],_0xf62cx3)}} \ No newline at end of file diff --git a/server/api/agent/index.js b/server/api/agent/index.js index 225390f..7b30f4d 100644 --- a/server/api/agent/index.js +++ b/server/api/agent/index.js @@ -1,18 +1 @@ -'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; +var _0xfa3f=["\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","\x2F\x3A\x69\x64\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\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"];_0xfa3f[0];var express=require(_0xfa3f[1]);var controller=require(_0xfa3f[2]);var auth=require(_0xfa3f[3]);var router=express.Router();router[_0xfa3f[7]](_0xfa3f[4],auth[_0xfa3f[5]](),controller[_0xfa3f[6]]);router[_0xfa3f[7]](_0xfa3f[8],auth[_0xfa3f[5]](),controller[_0xfa3f[9]]);router[_0xfa3f[7]](_0xfa3f[10],auth[_0xfa3f[5]](),controller[_0xfa3f[11]]);router[_0xfa3f[13]](_0xfa3f[4],auth[_0xfa3f[5]](),controller[_0xfa3f[12]]);router[_0xfa3f[15]](_0xfa3f[8],auth[_0xfa3f[5]](),controller[_0xfa3f[14]]);router[_0xfa3f[16]](_0xfa3f[8],auth[_0xfa3f[5]](),controller[_0xfa3f[14]]);router[_0xfa3f[18]](_0xfa3f[4],auth[_0xfa3f[5]](),controller[_0xfa3f[17]]);router[_0xfa3f[18]](_0xfa3f[8],auth[_0xfa3f[5]](),controller[_0xfa3f[19]]);module[_0xfa3f[20]]=router \ No newline at end of file diff --git a/server/api/ami/ami.ami.js b/server/api/ami/ami.ami.js index 2684197..2d9dde6 100644 --- a/server/api/ami/ami.ami.js +++ b/server/api/ami/ami.ami.js @@ -1,37 +1 @@ -/** - * 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..')); - } -} +var _0xf758=["\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"];_0xf758[0];var Ami=require(_0xf758[2])[_0xf758[1]];var async=require(_0xf758[3]);var _=require(_0xf758[4]);var ami=null;exports[_0xf758[5]]=function(ami){this[_0xf758[6]]=ami};exports[_0xf758[7]]=function(_0x8976x5,_0x8976x6){if(this[_0xf758[6]]&&this[_0xf758[6]][_0xf758[8]]()){this[_0xf758[6]][_0xf758[7]](_0x8976x5,function(_0x8976x7,_0x8976x8){if(_0x8976x7){_0x8976x6(_0x8976x7)};var _0x8976x9=_[_0xf758[9]](_0x8976x8,_0x8976x5);Ami[_0xf758[12]](_0x8976x9)[_0xf758[11]](function(ami){_0x8976x6(null,ami)})[_0xf758[10]](function(_0x8976x7){return _0x8976x6(_0x8976x7)})})}else {_0x8976x6( new Error(_0xf758[13]))}} \ No newline at end of file diff --git a/server/api/ami/ami.controller.js b/server/api/ami/ami.controller.js index dc409ab..f476791 100644 --- a/server/api/ami/ami.controller.js +++ b/server/api/ami/ami.controller.js @@ -1,101 +1 @@ -'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); -} +var _0x8702=["\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"];_0x8702[0];var _=require(_0x8702[1]);var Ami=require(_0x8702[3])[_0x8702[2]];exports[_0x8702[4]]=function(_0x4457x3,_0x4457x4){Ami[_0x8702[9]]()[_0x8702[8]](function(_0x4457x6){return _0x4457x4[_0x8702[7]](200)[_0x8702[6]](_0x4457x6)})[_0x8702[5]](function(_0x4457x5){return handleError(_0x4457x4,_0x4457x5)})};exports[_0x8702[10]]=function(_0x4457x3,_0x4457x4){Ami[_0x8702[14]](_0x4457x3[_0x8702[13]][_0x8702[12]])[_0x8702[8]](function(_0x4457x7){if(!_0x4457x7){return _0x4457x4[_0x8702[11]](404)};return _0x4457x4[_0x8702[6]](_0x4457x7)})[_0x8702[5]](function(_0x4457x5){return handleError(_0x4457x4,_0x4457x5)})};exports[_0x8702[15]]=function(_0x4457x3,_0x4457x4){_0x4457x3[_0x8702[17]][_0x8702[16]]=JSON[_0x8702[18]](_0x4457x3[_0x8702[17]]);_0x4457x3[_0x8702[17]][_0x8702[19]]=_0x4457x3[_0x8702[20]][_0x8702[12]];require(_0x8702[22])[_0x8702[21]](_0x4457x3[_0x8702[17]],function(_0x4457x5,_0x4457x8){if(_0x4457x5){handleError(_0x4457x4,_0x4457x5)}else {return _0x4457x4[_0x8702[7]](201)[_0x8702[6]](_0x4457x8)}})};exports[_0x8702[23]]=function(_0x4457x3,_0x4457x4){if(_0x4457x3[_0x8702[17]][_0x8702[12]]){delete _0x4457x3[_0x8702[17]][_0x8702[12]]};Ami[_0x8702[14]](_0x4457x3[_0x8702[13]][_0x8702[12]])[_0x8702[8]](function(_0x4457x7){if(!_0x4457x7){return _0x4457x4[_0x8702[11]](404)};var _0x4457x9=_[_0x8702[24]](_0x4457x7,_0x4457x3[_0x8702[17]]);_0x4457x9[_0x8702[25]]()[_0x8702[8]](function(){return _0x4457x4[_0x8702[7]](200)[_0x8702[6]](_0x4457x7)})[_0x8702[5]](function(_0x4457x5){return handleError(_0x4457x4,_0x4457x5)})})[_0x8702[5]](function(_0x4457x5){return handleError(_0x4457x4,_0x4457x5)})};exports[_0x8702[26]]=function(_0x4457x3,_0x4457x4){Ami[_0x8702[27]]({where:{id:_0x4457x3[_0x8702[13]][_0x8702[12]]}})[_0x8702[8]](function(_0x4457x7){if(!_0x4457x7){return _0x4457x4[_0x8702[11]](404)};_0x4457x7[_0x8702[26]]()[_0x8702[8]](function(){return _0x4457x4[_0x8702[11]](204)})[_0x8702[5]](function(_0x4457x5){return handleError(_0x4457x4,_0x4457x5)})})[_0x8702[5]](function(_0x4457x5){return handleError(_0x4457x4,_0x4457x5)})};function handleError(_0x4457x4,_0x4457x5){return _0x4457x4[_0x8702[7]](500)[_0x8702[6]](_0x4457x5)} \ No newline at end of file diff --git a/server/api/ami/ami.socket.js b/server/api/ami/ami.socket.js index 6047274..b785420 100644 --- a/server/api/ami/ami.socket.js +++ b/server/api/ami/ami.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x4d55=["\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"];_0x4d55[0];var Ami=require(_0x4d55[2])[_0x4d55[1]];exports[_0x4d55[3]]=function(_0xc3e1x2){Ami[_0x4d55[4]](function(_0xc3e1x3){onSave(_0xc3e1x2,_0xc3e1x3)});Ami[_0x4d55[5]](function(_0xc3e1x3){onRemove(_0xc3e1x2,_0xc3e1x3)})};function onSave(_0xc3e1x2,_0xc3e1x3,_0xc3e1x5){_0xc3e1x2[_0x4d55[7]](_0x4d55[6],_0xc3e1x3)}function onRemove(_0xc3e1x2,_0xc3e1x3,_0xc3e1x5){_0xc3e1x2[_0x4d55[7]](_0x4d55[8],_0xc3e1x3)} \ No newline at end of file diff --git a/server/api/ami/ami.spec.js b/server/api/ami/ami.spec.js index a7502d7..1b3759b 100644 --- a/server/api/ami/ami.spec.js +++ b/server/api/ami/ami.spec.js @@ -1,20 +1 @@ -'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(); - }); - }); -}); +var _0x315f=["\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"];_0x315f[0];var should=require(_0x315f[1]);var app=require(_0x315f[2]);var request=require(_0x315f[3]);describe(_0x315f[4],function(){it(_0x315f[5],function(_0x57a2x4){request(app)[_0x315f[13]](_0x315f[12])[_0x315f[11]](200)[_0x315f[11]](_0x315f[10],/json/)[_0x315f[9]](function(_0x57a2x5,_0x57a2x6){if(_0x57a2x5){return _0x57a2x4(_0x57a2x5)};_0x57a2x6[_0x315f[8]][_0x315f[1]][_0x315f[7]][_0x315f[6]](Array);_0x57a2x4()})})}) \ No newline at end of file diff --git a/server/api/ami/index.js b/server/api/ami/index.js index b926b75..d8380c4 100644 --- a/server/api/ami/index.js +++ b/server/api/ami/index.js @@ -1,16 +1 @@ -'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; +var _0x138f=["\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"];_0x138f[0];var express=require(_0x138f[1]);var controller=require(_0x138f[2]);var auth=require(_0x138f[3]);var router=express.Router();router[_0x138f[7]](_0x138f[4],auth[_0x138f[5]](),controller[_0x138f[6]]);router[_0x138f[9]](_0x138f[4],auth[_0x138f[5]](),controller[_0x138f[8]]);module[_0x138f[10]]=router \ No newline at end of file diff --git a/server/api/automation/automation.controller.js b/server/api/automation/automation.controller.js index 762c4c9..b4b9736 100644 --- a/server/api/automation/automation.controller.js +++ b/server/api/automation/automation.controller.js @@ -1,200 +1 @@ -'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); -} +var _0x33e9=["\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"];_0x33e9[0];var _=require(_0x33e9[1]);var util=require(_0x33e9[2]);var Util=require(_0x33e9[3]);var sequelize=require(_0x33e9[5])[_0x33e9[4]];var Automation=require(_0x33e9[5])[_0x33e9[6]];var ToolsCondition=require(_0x33e9[5])[_0x33e9[7]];var ToolsAction=require(_0x33e9[5])[_0x33e9[8]];exports[_0x33e9[9]]=function(_0x32ecx8,_0x32ecx9,_0x32ecxa){return Automation[_0x33e9[18]](_0x33e9[17])[_0x33e9[16]](Util[_0x33e9[15]](_0x32ecx8[_0x33e9[14]]))[_0x33e9[13]](function(_0x32ecxc){_0x32ecx9[_0x33e9[12]](200)[_0x33e9[11]](_0x32ecxc)})[_0x33e9[10]](function(_0x32ecxb){return handleError(_0x32ecx9,_0x32ecxb)})};exports[_0x33e9[19]]=function(_0x32ecx8,_0x32ecx9){Automation[_0x33e9[18]](_0x33e9[17])[_0x33e9[23]](_0x32ecx8[_0x33e9[22]][_0x33e9[21]])[_0x33e9[13]](function(Automation){if(!Automation){return _0x32ecx9[_0x33e9[20]](404)};return _0x32ecx9[_0x33e9[11]](Automation)})[_0x33e9[10]](function(_0x32ecxb){return handleError(_0x32ecx9,_0x32ecxb)})};exports[_0x33e9[24]]=function(_0x32ecx8,_0x32ecx9,_0x32ecxa){Automation[_0x33e9[24]](_0x32ecx8[_0x33e9[25]],{include:[{model:ToolsCondition,as:_0x33e9[26]},{model:ToolsCondition,as:_0x33e9[27]},{model:ToolsAction,as:_0x33e9[28]}]})[_0x33e9[13]](function(){return _0x32ecx9[_0x33e9[20]](201)})[_0x33e9[10]](function(_0x32ecxb){return handleError(_0x32ecx9,_0x32ecxb)})};exports[_0x33e9[29]]=function(_0x32ecx8,_0x32ecx9,_0x32ecxa){var _0x32ecxd;if(_0x32ecx8[_0x33e9[25]][_0x33e9[21]]){delete _0x32ecx8[_0x33e9[25]][_0x33e9[21]]};return sequelize[_0x33e9[41]](function(_0x32ecxe){return Automation[_0x33e9[23]](_0x32ecx8[_0x33e9[22]][_0x33e9[21]])[_0x33e9[13]](function(_0x32ecx10){if(!_0x32ecx10){return _0x32ecx9[_0x33e9[20]](404)};var _0x32ecx11=_[_0x33e9[39]](_0x32ecx10,_0x32ecx8[_0x33e9[25]]);return _0x32ecx11[_0x33e9[40]]({transaction:_0x32ecxe})})[_0x33e9[13]](function(_0x32ecx10){_0x32ecxd=_0x32ecx10;if(_0x32ecx8[_0x33e9[25]][_0x33e9[27]]){return ToolsCondition[_0x33e9[36]]({where:{AutomationAnyId:_0x32ecx8[_0x33e9[22]][_0x33e9[21]]},transaction:_0x32ecxe})}})[_0x33e9[13]](function(){if(_0x32ecx8[_0x33e9[25]][_0x33e9[27]]&&Array[_0x33e9[31]](_0x32ecx8[_0x33e9[25]].Any)&&_0x32ecx8[_0x33e9[25]][_0x33e9[27]][_0x33e9[32]]){_[_0x33e9[34]](_0x32ecx8[_0x33e9[25]].Any,function(_0x32ecxf){_0x32ecxf[_0x33e9[38]]=_0x32ecx8[_0x33e9[22]][_0x33e9[21]]});return ToolsCondition[_0x33e9[35]](_0x32ecx8[_0x33e9[25]].Any,{transaction:_0x32ecxe})}})[_0x33e9[13]](function(){if(_0x32ecx8[_0x33e9[25]][_0x33e9[26]]){return ToolsCondition[_0x33e9[36]]({where:{AutomationAllId:_0x32ecx8[_0x33e9[22]][_0x33e9[21]]},transaction:_0x32ecxe})}})[_0x33e9[13]](function(){if(_0x32ecx8[_0x33e9[25]][_0x33e9[26]]&&Array[_0x33e9[31]](_0x32ecx8[_0x33e9[25]].All)&&_0x32ecx8[_0x33e9[25]][_0x33e9[26]][_0x33e9[32]]){_[_0x33e9[34]](_0x32ecx8[_0x33e9[25]].All,function(_0x32ecxf){_0x32ecxf[_0x33e9[37]]=_0x32ecx8[_0x33e9[22]][_0x33e9[21]]});return ToolsCondition[_0x33e9[35]](_0x32ecx8[_0x33e9[25]].All,{transaction:_0x32ecxe})}})[_0x33e9[13]](function(){if(_0x32ecx8[_0x33e9[25]][_0x33e9[28]]){return ToolsAction[_0x33e9[36]]({where:{AutomationId:_0x32ecx8[_0x33e9[22]][_0x33e9[21]]},transaction:_0x32ecxe})}})[_0x33e9[13]](function(){if(_0x32ecx8[_0x33e9[25]][_0x33e9[28]]&&Array[_0x33e9[31]](_0x32ecx8[_0x33e9[25]].Actions)&&_0x32ecx8[_0x33e9[25]][_0x33e9[28]][_0x33e9[32]]){_[_0x33e9[34]](_0x32ecx8[_0x33e9[25]].Actions,function(_0x32ecxf){_0x32ecxf[_0x33e9[33]]=_0x32ecx8[_0x33e9[22]][_0x33e9[21]]});return ToolsAction[_0x33e9[35]](_0x32ecx8[_0x33e9[25]].Actions,{transaction:_0x32ecxe})}})})[_0x33e9[13]](function(){return _0x32ecx9[_0x33e9[20]](200)})[_0x33e9[10]](function(_0x32ecxb){console[_0x33e9[30]](_0x32ecxb);return handleError(_0x32ecx9,_0x32ecxb)})};exports[_0x33e9[36]]=function(_0x32ecx8,_0x32ecx9){Automation[_0x33e9[23]](_0x32ecx8[_0x33e9[22]][_0x33e9[21]])[_0x33e9[13]](function(Automation){if(!Automation){return _0x32ecx9[_0x33e9[20]](404)};Automation[_0x33e9[36]]()[_0x33e9[13]](function(){return _0x32ecx9[_0x33e9[20]](204)})[_0x33e9[10]](function(_0x32ecxb){return handleError(_0x32ecx9,_0x32ecxb)})})[_0x33e9[10]](function(_0x32ecxb){return handleError(_0x32ecx9,_0x32ecxb)})};exports[_0x33e9[42]]=function(_0x32ecx8,_0x32ecx9){Automation[_0x33e9[36]]({where:{id:_0x32ecx8[_0x33e9[14]][_0x33e9[21]]},individualHooks:true})[_0x33e9[13]](function(){return _0x32ecx9[_0x33e9[20]](204)})[_0x33e9[10]](function(_0x32ecxb){return handleError(_0x32ecx9,_0x32ecxb)})};function handleError(_0x32ecx9,_0x32ecxb){return _0x32ecx9[_0x33e9[12]](500)[_0x33e9[11]](_0x32ecxb)} \ No newline at end of file diff --git a/server/api/automation/automation.socket.js b/server/api/automation/automation.socket.js index 2c55b60..a25497a 100644 --- a/server/api/automation/automation.socket.js +++ b/server/api/automation/automation.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xdf25=["\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"];_0xdf25[0];var Automation=require(_0xdf25[2])[_0xdf25[1]];exports[_0xdf25[3]]=function(_0x33b2x2){Automation[_0xdf25[4]](function(_0x33b2x3){onSave(_0x33b2x2,_0x33b2x3)});Automation[_0xdf25[5]](function(_0x33b2x3){onRemove(_0x33b2x2,_0x33b2x3)})};function onSave(_0x33b2x2,_0x33b2x3,_0x33b2x5){_0x33b2x2[_0xdf25[7]](_0xdf25[6],_0x33b2x3)}function onRemove(_0x33b2x2,_0x33b2x3,_0x33b2x5){_0x33b2x2[_0xdf25[7]](_0xdf25[8],_0x33b2x3)} \ No newline at end of file diff --git a/server/api/automation/automation.spec.js b/server/api/automation/automation.spec.js index ab8c5b4..3870e61 100644 --- a/server/api/automation/automation.spec.js +++ b/server/api/automation/automation.spec.js @@ -1,20 +1 @@ -'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(); - }); - }); -}); +var _0x6a98=["\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"];_0x6a98[0];var should=require(_0x6a98[1]);var app=require(_0x6a98[2]);var request=require(_0x6a98[3]);describe(_0x6a98[4],function(){it(_0x6a98[5],function(_0x7821x4){request(app)[_0x6a98[13]](_0x6a98[12])[_0x6a98[11]](200)[_0x6a98[11]](_0x6a98[10],/json/)[_0x6a98[9]](function(_0x7821x5,_0x7821x6){if(_0x7821x5){return _0x7821x4(_0x7821x5)};_0x7821x6[_0x6a98[8]][_0x6a98[1]][_0x6a98[7]][_0x6a98[6]](Array);_0x7821x4()})})}) \ No newline at end of file diff --git a/server/api/automation/index.js b/server/api/automation/index.js index 98acf5a..80c7d1a 100644 --- a/server/api/automation/index.js +++ b/server/api/automation/index.js @@ -1,17 +1 @@ -'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; +var _0xd00a=["\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"];_0xd00a[0];var express=require(_0xd00a[1]);var controller=require(_0xd00a[2]);var auth=require(_0xd00a[3]);var router=express.Router();router[_0xd00a[7]](_0xd00a[4],auth[_0xd00a[5]](),controller[_0xd00a[6]]);router[_0xd00a[7]](_0xd00a[8],auth[_0xd00a[5]](),controller[_0xd00a[9]]);router[_0xd00a[11]](_0xd00a[4],auth[_0xd00a[5]](),controller[_0xd00a[10]]);router[_0xd00a[13]](_0xd00a[8],auth[_0xd00a[5]](),controller[_0xd00a[12]]);router[_0xd00a[14]](_0xd00a[8],auth[_0xd00a[5]](),controller[_0xd00a[12]]);router[_0xd00a[16]](_0xd00a[8],auth[_0xd00a[5]](),controller[_0xd00a[15]]);router[_0xd00a[16]](_0xd00a[4],auth[_0xd00a[5]](),controller[_0xd00a[17]]);module[_0xd00a[18]]=router \ No newline at end of file diff --git a/server/api/canned_answer/canned_answer.controller.js b/server/api/canned_answer/canned_answer.controller.js index 2078d7a..847b394 100644 --- a/server/api/canned_answer/canned_answer.controller.js +++ b/server/api/canned_answer/canned_answer.controller.js @@ -1,128 +1 @@ -/** - * 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); - }); -}; +var _0x70d3=["\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"];_0x70d3[0];var _=require(_0x70d3[1]);var Util=require(_0x70d3[2]);var CannedAnswer=require(_0x70d3[4])[_0x70d3[3]];function handleError(_0xd219x5,_0xd219x6){_0xd219x6=_0xd219x6||500;return function(_0xd219x7){_0xd219x5[_0x70d3[6]](_0xd219x6)[_0x70d3[5]](_0xd219x7)}}function responseWithResult(_0xd219x5,_0xd219x6){_0xd219x6=_0xd219x6||200;return function(_0xd219x9){if(_0xd219x9){_0xd219x5[_0x70d3[6]](_0xd219x6)[_0x70d3[7]](_0xd219x9)}}}function handleEntityNotFound(_0xd219x5){return function(_0xd219x9){if(!_0xd219x9){_0xd219x5[_0x70d3[6]](404)[_0x70d3[8]]();return null};return _0xd219x9}}function saveUpdates(_0xd219xc){return function(_0xd219x9){return _0xd219x9[_0x70d3[10]](_0xd219xc)[_0x70d3[9]](function(_0xd219xd){return _0xd219xd})}}function removeEntity(_0xd219x5){return function(_0xd219x9){if(_0xd219x9){return _0xd219x9[_0x70d3[11]]()[_0x70d3[9]](function(){_0xd219x5[_0x70d3[6]](204)[_0x70d3[8]]()})}}}exports[_0x70d3[12]]=function(_0xd219xf,_0xd219x5,_0xd219x10){return CannedAnswer[_0x70d3[17]](Util[_0x70d3[16]](_0xd219xf[_0x70d3[15]]))[_0x70d3[9]](function(_0xd219x11){_0xd219x5[_0x70d3[6]](200)[_0x70d3[5]](_0xd219x11)})[_0x70d3[14]](function(_0xd219x7){console[_0x70d3[13]](_0xd219x7);return handleError(_0xd219x5,_0xd219x7)})};exports[_0x70d3[18]]=function(_0xd219xf,_0xd219x5){CannedAnswer[_0x70d3[21]](_0xd219xf[_0x70d3[20]][_0x70d3[19]])[_0x70d3[9]](handleEntityNotFound(_0xd219x5))[_0x70d3[9]](responseWithResult(_0xd219x5))[_0x70d3[14]](handleError(_0xd219x5))};exports[_0x70d3[22]]=function(_0xd219xf,_0xd219x5){CannedAnswer[_0x70d3[22]](_0xd219xf[_0x70d3[23]])[_0x70d3[9]](responseWithResult(_0xd219x5,201))[_0x70d3[14]](handleError(_0xd219x5))};exports[_0x70d3[24]]=function(_0xd219xf,_0xd219x5){if(_0xd219xf[_0x70d3[23]][_0x70d3[19]]){delete _0xd219xf[_0x70d3[23]][_0x70d3[19]]};CannedAnswer[_0x70d3[21]](_0xd219xf[_0x70d3[20]][_0x70d3[19]])[_0x70d3[9]](handleEntityNotFound(_0xd219x5))[_0x70d3[9]](saveUpdates(_0xd219xf[_0x70d3[23]]))[_0x70d3[9]](responseWithResult(_0xd219x5))[_0x70d3[14]](handleError(_0xd219x5))};exports[_0x70d3[11]]=function(_0xd219xf,_0xd219x5){CannedAnswer[_0x70d3[21]](_0xd219xf[_0x70d3[20]][_0x70d3[19]])[_0x70d3[9]](handleEntityNotFound(_0xd219x5))[_0x70d3[9]](removeEntity(_0xd219x5))[_0x70d3[14]](handleError(_0xd219x5))};exports[_0x70d3[25]]=function(_0xd219xf,_0xd219x5){return CannedAnswer[_0x70d3[11]]({where:{id:_0xd219xf[_0x70d3[15]][_0x70d3[27]]},individualHooks:true})[_0x70d3[9]](function(){return _0xd219x5[_0x70d3[26]](204)})[_0x70d3[14]](function(_0xd219x7){return handleError(_0xd219x5,_0xd219x7)})} \ No newline at end of file diff --git a/server/api/canned_answer/canned_answer.socket.js b/server/api/canned_answer/canned_answer.socket.js index 1998ba4..b0f6f26 100644 --- a/server/api/canned_answer/canned_answer.socket.js +++ b/server/api/canned_answer/canned_answer.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xe879=["\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"];_0xe879[0];var CannedAnswer=require(_0xe879[2])[_0xe879[1]];exports[_0xe879[3]]=function(_0x263dx2){CannedAnswer[_0xe879[4]](function(_0x263dx3){onSave(_0x263dx2,_0x263dx3)});CannedAnswer[_0xe879[5]](function(_0x263dx3){onRemove(_0x263dx2,_0x263dx3)})};function onSave(_0x263dx2,_0x263dx3,_0x263dx5){_0x263dx2[_0xe879[7]](_0xe879[6],_0x263dx3)}function onRemove(_0x263dx2,_0x263dx3,_0x263dx5){_0x263dx2[_0xe879[7]](_0xe879[8],_0x263dx3)} \ No newline at end of file diff --git a/server/api/canned_answer/index.js b/server/api/canned_answer/index.js index b9d0dcd..8c9c776 100644 --- a/server/api/canned_answer/index.js +++ b/server/api/canned_answer/index.js @@ -1,18 +1 @@ -'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; +var _0xe710=["\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"];_0xe710[0];var express=require(_0xe710[1]);var auth=require(_0xe710[2]);var controller=require(_0xe710[3]);var router=express.Router();router[_0xe710[7]](_0xe710[4],auth[_0xe710[5]](),controller[_0xe710[6]]);router[_0xe710[7]](_0xe710[8],auth[_0xe710[5]](),controller[_0xe710[9]]);router[_0xe710[11]](_0xe710[4],auth[_0xe710[5]](),controller[_0xe710[10]]);router[_0xe710[13]](_0xe710[8],auth[_0xe710[5]](),controller[_0xe710[12]]);router[_0xe710[14]](_0xe710[8],auth[_0xe710[5]](),controller[_0xe710[12]]);router[_0xe710[16]](_0xe710[4],auth[_0xe710[5]](),controller[_0xe710[15]]);router[_0xe710[16]](_0xe710[8],auth[_0xe710[5]](),controller[_0xe710[17]]);module[_0xe710[18]]=router \ No newline at end of file diff --git a/server/api/chanspy/chanspy.controller.js b/server/api/chanspy/chanspy.controller.js index e3dafb3..29f438e 100644 --- a/server/api/chanspy/chanspy.controller.js +++ b/server/api/chanspy/chanspy.controller.js @@ -1,107 +1 @@ -'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); -} +var _0xeee9=["\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"];_0xeee9[0];var _=require(_0xeee9[1]);var ChanSpy=require(_0xeee9[3])[_0xeee9[2]];var Util=require(_0xeee9[4]);exports[_0xeee9[5]]=function(_0x1c96x4,_0x1c96x5,_0x1c96x6){return ChanSpy[_0xeee9[13]](Util[_0xeee9[12]](_0x1c96x4[_0xeee9[11]]))[_0xeee9[10]](function(_0x1c96x8){_0x1c96x5[_0xeee9[9]](200)[_0xeee9[8]](_0x1c96x8)})[_0xeee9[7]](function(_0x1c96x7){console[_0xeee9[6]](_0x1c96x7);return handleError(_0x1c96x5,_0x1c96x7)})};exports[_0xeee9[14]]=function(_0x1c96x4,_0x1c96x5){return ChanSpy[_0xeee9[18]](_0x1c96x4[_0xeee9[17]][_0xeee9[16]])[_0xeee9[10]](function(_0x1c96x9){if(!_0x1c96x9){return _0x1c96x5[_0xeee9[15]](404)};return _0x1c96x5[_0xeee9[8]](_0x1c96x9)})[_0xeee9[7]](function(_0x1c96x7){return handleError(_0x1c96x5,_0x1c96x7)})};exports[_0xeee9[19]]=function(_0x1c96x4,_0x1c96x5){return ChanSpy[_0xeee9[19]](_0x1c96x4[_0xeee9[20]])[_0xeee9[10]](function(_0x1c96x9){return _0x1c96x5[_0xeee9[9]](201)[_0xeee9[8]](_0x1c96x9)})[_0xeee9[7]](function(_0x1c96x7){return handleError(_0x1c96x5,_0x1c96x7)})};exports[_0xeee9[21]]=function(_0x1c96x4,_0x1c96x5){if(_0x1c96x4[_0xeee9[20]][_0xeee9[16]]){delete _0x1c96x4[_0xeee9[20]][_0xeee9[16]]};return ChanSpy[_0xeee9[18]](_0x1c96x4[_0xeee9[17]][_0xeee9[16]])[_0xeee9[10]](function(_0x1c96x9){if(!_0x1c96x9){return _0x1c96x5[_0xeee9[15]](404)};var _0x1c96xa=_[_0xeee9[22]](_0x1c96x9,_0x1c96x4[_0xeee9[20]]);return _0x1c96xa[_0xeee9[23]]()})[_0xeee9[10]](function(_0x1c96x9){return _0x1c96x5[_0xeee9[9]](200)[_0xeee9[8]](_0x1c96x9)})[_0xeee9[7]](function(_0x1c96x7){return handleError(_0x1c96x5,_0x1c96x7)})};exports[_0xeee9[24]]=function(_0x1c96x4,_0x1c96x5){return ChanSpy[_0xeee9[18]](_0x1c96x4[_0xeee9[17]][_0xeee9[16]])[_0xeee9[10]](function(_0x1c96x9){if(!_0x1c96x9){return _0x1c96x5[_0xeee9[15]](404)};return _0x1c96x9[_0xeee9[24]]()})[_0xeee9[10]](function(){return _0x1c96x5[_0xeee9[15]](204)})[_0xeee9[7]](function(_0x1c96x7){return handleError(_0x1c96x5,_0x1c96x7)})};exports[_0xeee9[25]]=function(_0x1c96x4,_0x1c96x5){return ChanSpy[_0xeee9[24]]({where:{id:_0x1c96x4[_0xeee9[11]][_0xeee9[26]]},individualHooks:true})[_0xeee9[10]](function(){return _0x1c96x5[_0xeee9[15]](204)})[_0xeee9[7]](function(_0x1c96x7){return handleError(_0x1c96x5,_0x1c96x7)})};function handleError(_0x1c96x5,_0x1c96x7){return _0x1c96x5[_0xeee9[9]](500)[_0xeee9[8]](_0x1c96x7)} \ No newline at end of file diff --git a/server/api/chanspy/chanspy.socket.js b/server/api/chanspy/chanspy.socket.js index 9fb1324..30d1b9b 100644 --- a/server/api/chanspy/chanspy.socket.js +++ b/server/api/chanspy/chanspy.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x7937=["\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"];_0x7937[0];var ChanSpy=require(_0x7937[2])[_0x7937[1]];exports[_0x7937[3]]=function(_0x8730x2){ChanSpy[_0x7937[4]](function(_0x8730x3){onSave(_0x8730x2,_0x8730x3)});ChanSpy[_0x7937[5]](function(_0x8730x3){onRemove(_0x8730x2,_0x8730x3)})};function onSave(_0x8730x2,_0x8730x3,_0x8730x5){_0x8730x2[_0x7937[7]](_0x7937[6],_0x8730x3)}function onRemove(_0x8730x2,_0x8730x3,_0x8730x5){_0x8730x2[_0x7937[7]](_0x7937[8],_0x8730x3)} \ No newline at end of file diff --git a/server/api/chanspy/index.js b/server/api/chanspy/index.js index 97d091d..eed493a 100644 --- a/server/api/chanspy/index.js +++ b/server/api/chanspy/index.js @@ -1,17 +1 @@ -'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; +var _0xd185=["\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"];_0xd185[0];var express=require(_0xd185[1]);var controller=require(_0xd185[2]);var auth=require(_0xd185[3]);var router=express.Router();router[_0xd185[9]](_0xd185[4],auth[_0xd185[5]](),auth[_0xd185[7]](_0xd185[6]),controller[_0xd185[8]]);router[_0xd185[9]](_0xd185[10],auth[_0xd185[5]](),auth[_0xd185[7]](_0xd185[6]),controller[_0xd185[11]]);router[_0xd185[13]](_0xd185[4],auth[_0xd185[5]](),auth[_0xd185[7]](_0xd185[6]),controller[_0xd185[12]]);router[_0xd185[15]](_0xd185[10],auth[_0xd185[5]](),auth[_0xd185[7]](_0xd185[6]),controller[_0xd185[14]]);router[_0xd185[16]](_0xd185[10],auth[_0xd185[5]](),auth[_0xd185[7]](_0xd185[6]),controller[_0xd185[14]]);router[_0xd185[18]](_0xd185[4],auth[_0xd185[5]](),auth[_0xd185[7]](_0xd185[6]),controller[_0xd185[17]]);router[_0xd185[18]](_0xd185[10],auth[_0xd185[5]](),auth[_0xd185[7]](_0xd185[6]),controller[_0xd185[19]]);module[_0xd185[20]]=router \ No newline at end of file diff --git a/server/api/chat_application/chat_application.controller.js b/server/api/chat_application/chat_application.controller.js index 9c2085d..fd7a0ec 100644 --- a/server/api/chat_application/chat_application.controller.js +++ b/server/api/chat_application/chat_application.controller.js @@ -1,105 +1 @@ -'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); -} +var _0x96a6=["\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"];_0x96a6[0];var _=require(_0x96a6[1]);var ChatApplication=require(_0x96a6[3])[_0x96a6[2]];exports[_0x96a6[4]]=function(_0x439cx3,_0x439cx4){ChatApplication[_0x96a6[11]]({where:_0x439cx3[_0x96a6[9]],order:_0x96a6[10],include:[{all:true}]})[_0x96a6[8]](function(_0x439cx6){return _0x439cx4[_0x96a6[7]](200)[_0x96a6[6]](_0x439cx6)})[_0x96a6[5]](function(_0x439cx5){return handleError(_0x439cx4,_0x439cx5)})};exports[_0x96a6[12]]=function(_0x439cx3,_0x439cx4){ChatApplication[_0x96a6[16]](_0x439cx3[_0x96a6[15]][_0x96a6[14]])[_0x96a6[8]](function(_0x439cx7){if(!_0x439cx7){return _0x439cx4[_0x96a6[13]](404)};return _0x439cx4[_0x96a6[6]](_0x439cx7)})[_0x96a6[5]](function(_0x439cx5){return handleError(_0x439cx4,_0x439cx5)})};exports[_0x96a6[17]]=function(_0x439cx3,_0x439cx4,_0x439cx8){ChatApplication[_0x96a6[20]](_0x96a6[10],{where:{ChatWebsiteId:_0x439cx3[_0x96a6[18]][_0x96a6[19]]}})[_0x96a6[8]](function(_0x439cx9){_0x439cx3[_0x96a6[18]][_0x96a6[10]]=_0x439cx9?++_0x439cx9:1;ChatApplication[_0x96a6[17]](_0x439cx3[_0x96a6[18]])[_0x96a6[8]](function(_0x439cxa){return _0x439cx4[_0x96a6[7]](201)[_0x96a6[6]](_0x439cxa)})[_0x96a6[5]](function(_0x439cx5){return _0x439cx8(_0x439cx5)})})[_0x96a6[5]](function(_0x439cx5){_0x439cx8(_0x439cx5)})};exports[_0x96a6[21]]=function(_0x439cx3,_0x439cx4){if(_0x439cx3[_0x96a6[18]][_0x96a6[14]]){delete _0x439cx3[_0x96a6[18]][_0x96a6[14]]};ChatApplication[_0x96a6[16]](_0x439cx3[_0x96a6[15]][_0x96a6[14]])[_0x96a6[8]](function(_0x439cx7){if(!_0x439cx7){return _0x439cx4[_0x96a6[13]](404)};var _0x439cxb=_[_0x96a6[22]](_0x439cx7,_0x439cx3[_0x96a6[18]]);_0x439cxb[_0x96a6[23]]()[_0x96a6[8]](function(){return _0x439cx4[_0x96a6[7]](200)[_0x96a6[6]](_0x439cx7)})[_0x96a6[5]](function(_0x439cx5){return handleError(_0x439cx4,_0x439cx5)})})[_0x96a6[5]](function(_0x439cx5){return handleError(_0x439cx4,_0x439cx5)})};exports[_0x96a6[24]]=function(_0x439cx3,_0x439cx4){ChatApplication[_0x96a6[16]](_0x439cx3[_0x96a6[15]][_0x96a6[14]])[_0x96a6[8]](function(_0x439cx7){if(!_0x439cx7){return _0x439cx4[_0x96a6[13]](404)};_0x439cx7[_0x96a6[24]]()[_0x96a6[8]](function(){return _0x439cx4[_0x96a6[13]](204)})[_0x96a6[5]](function(_0x439cx5){return handleError(_0x439cx4,_0x439cx5)})})[_0x96a6[5]](function(_0x439cx5){return handleError(_0x439cx4,_0x439cx5)})};function handleError(_0x439cx4,_0x439cx5){return _0x439cx4[_0x96a6[7]](500)[_0x96a6[6]](_0x439cx5)} \ No newline at end of file diff --git a/server/api/chat_application/chat_application.socket.js b/server/api/chat_application/chat_application.socket.js index 8776f3a..37d1dc8 100644 --- a/server/api/chat_application/chat_application.socket.js +++ b/server/api/chat_application/chat_application.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xfa9f=["\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"];_0xfa9f[0];var ChatApplication=require(_0xfa9f[2])[_0xfa9f[1]];exports[_0xfa9f[3]]=function(_0xbf00x2){ChatApplication[_0xfa9f[4]](function(_0xbf00x3){onSave(_0xbf00x2,_0xbf00x3)});ChatApplication[_0xfa9f[5]](function(_0xbf00x3){onRemove(_0xbf00x2,_0xbf00x3)})};function onSave(_0xbf00x2,_0xbf00x3,_0xbf00x5){_0xbf00x2[_0xfa9f[7]](_0xfa9f[6],_0xbf00x3)}function onRemove(_0xbf00x2,_0xbf00x3,_0xbf00x5){_0xbf00x2[_0xfa9f[7]](_0xfa9f[8],_0xbf00x3)} \ No newline at end of file diff --git a/server/api/chat_application/chat_application.spec.js b/server/api/chat_application/chat_application.spec.js index 215f533..4eb66f6 100644 --- a/server/api/chat_application/chat_application.spec.js +++ b/server/api/chat_application/chat_application.spec.js @@ -1,20 +1 @@ -'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 +var _0x30d9=["\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"];_0x30d9[0];var should=require(_0x30d9[1]);var app=require(_0x30d9[2]);var request=require(_0x30d9[3]);describe(_0x30d9[4],function(){it(_0x30d9[5],function(_0xdd2ex4){request(app)[_0x30d9[13]](_0x30d9[12])[_0x30d9[11]](200)[_0x30d9[11]](_0x30d9[10],/json/)[_0x30d9[9]](function(_0xdd2ex5,_0xdd2ex6){if(_0xdd2ex5){return _0xdd2ex4(_0xdd2ex5)};_0xdd2ex6[_0x30d9[8]][_0x30d9[1]][_0x30d9[7]][_0x30d9[6]](Array);_0xdd2ex4()})})}) \ No newline at end of file diff --git a/server/api/chat_application/index.js b/server/api/chat_application/index.js index d85a510..4d3a0de 100644 --- a/server/api/chat_application/index.js +++ b/server/api/chat_application/index.js @@ -1,15 +1 @@ -'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 +var _0x9e84=["\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"];_0x9e84[0];var express=require(_0x9e84[1]);var controller=require(_0x9e84[2]);var router=express.Router();router[_0x9e84[5]](_0x9e84[3],controller[_0x9e84[4]]);router[_0x9e84[5]](_0x9e84[6],controller[_0x9e84[7]]);router[_0x9e84[9]](_0x9e84[3],controller[_0x9e84[8]]);router[_0x9e84[11]](_0x9e84[6],controller[_0x9e84[10]]);router[_0x9e84[12]](_0x9e84[6],controller[_0x9e84[10]]);router[_0x9e84[14]](_0x9e84[6],controller[_0x9e84[13]]);module[_0x9e84[15]]=router \ No newline at end of file diff --git a/server/api/chat_enquiry/enquiry.controller.js b/server/api/chat_enquiry/enquiry.controller.js index d72924b..e68d4e1 100644 --- a/server/api/chat_enquiry/enquiry.controller.js +++ b/server/api/chat_enquiry/enquiry.controller.js @@ -1,106 +1 @@ -'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); -} +var _0xa648=["\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"];_0xa648[0];var _=require(_0xa648[1]);var Util=require(_0xa648[2]);var ChatEnquiry=require(_0xa648[4])[_0xa648[3]];var ChatVisitor=require(_0xa648[4])[_0xa648[5]];var ChatWebsite=require(_0xa648[4])[_0xa648[6]];exports[_0xa648[7]]=function(_0x1a02x6,_0x1a02x7,_0x1a02x8){return ChatEnquiry[_0xa648[17]](_[_0xa648[16]](Util[_0xa648[13]](_0x1a02x6[_0xa648[12]]),{include:[{model:ChatWebsite,attributes:[_0xa648[14],_0xa648[15]]}]}))[_0xa648[11]](function(_0x1a02xa){return _0x1a02x7[_0xa648[10]](200)[_0xa648[9]](_0x1a02xa)})[_0xa648[8]](function(_0x1a02x9){return handleError(_0x1a02x7,_0x1a02x9)})};exports[_0xa648[18]]=function(_0x1a02x6,_0x1a02x7){return ChatEnquiry[_0xa648[22]](_0x1a02x6[_0xa648[21]][_0xa648[14]],{include:[{model:ChatWebsite,attributes:[_0xa648[14],_0xa648[15]]},{model:ChatVisitor}]})[_0xa648[11]](function(_0x1a02xb){if(!_0x1a02xb){return _0x1a02x7[_0xa648[20]](404)};return _0x1a02x7[_0xa648[9]](_0x1a02xb)})[_0xa648[8]](function(_0x1a02x9){console[_0xa648[19]](_0x1a02x9);return handleError(_0x1a02x7,_0x1a02x9)})};exports[_0xa648[23]]=function(_0x1a02x6,_0x1a02x7){return ChatEnquiry[_0xa648[23]](_0x1a02x6[_0xa648[24]])[_0xa648[11]](function(_0x1a02xb){return _0x1a02x7[_0xa648[10]](201)[_0xa648[9]](_0x1a02xb)})[_0xa648[8]](function(_0x1a02x9){return handleError(_0x1a02x7,_0x1a02x9)})};exports[_0xa648[25]]=function(_0x1a02x6,_0x1a02x7){if(_0x1a02x6[_0xa648[24]][_0xa648[14]]){delete _0x1a02x6[_0xa648[24]][_0xa648[14]]};return ChatEnquiry[_0xa648[22]](_0x1a02x6[_0xa648[21]][_0xa648[14]])[_0xa648[11]](function(_0x1a02xb){if(!_0x1a02xb){return _0x1a02x7[_0xa648[20]](404)};var _0x1a02xc=_[_0xa648[16]](_0x1a02xb,_0x1a02x6[_0xa648[24]]);return _0x1a02xc[_0xa648[26]]()})[_0xa648[11]](function(_0x1a02xb){return _0x1a02x7[_0xa648[10]](200)[_0xa648[9]](_0x1a02xb)})[_0xa648[8]](function(_0x1a02x9){return handleError(_0x1a02x7,_0x1a02x9)})};exports[_0xa648[27]]=function(_0x1a02x6,_0x1a02x7){return ChatEnquiry[_0xa648[22]](_0x1a02x6[_0xa648[21]][_0xa648[14]])[_0xa648[11]](function(_0x1a02xb){if(!_0x1a02xb){return _0x1a02x7[_0xa648[20]](404)};return _0x1a02xb[_0xa648[27]]()})[_0xa648[11]](function(){return _0x1a02x7[_0xa648[20]](204)})[_0xa648[8]](function(_0x1a02x9){return handleError(_0x1a02x7,_0x1a02x9)})};function handleError(_0x1a02x7,_0x1a02x9){return _0x1a02x7[_0xa648[10]](500)[_0xa648[9]](_0x1a02x9)} \ No newline at end of file diff --git a/server/api/chat_enquiry/enquiry.socket.js b/server/api/chat_enquiry/enquiry.socket.js index b7b69e1..85db35c 100644 --- a/server/api/chat_enquiry/enquiry.socket.js +++ b/server/api/chat_enquiry/enquiry.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xfb7b=["\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"];_0xfb7b[0];var enquiry=require(_0xfb7b[2])[_0xfb7b[1]];exports[_0xfb7b[3]]=function(_0x14e7x2){enquiry[_0xfb7b[4]](function(_0x14e7x3){onSave(_0x14e7x2,_0x14e7x3)});enquiry[_0xfb7b[5]](function(_0x14e7x3){onRemove(_0x14e7x2,_0x14e7x3)})};function onSave(_0x14e7x2,_0x14e7x3,_0x14e7x5){_0x14e7x2[_0xfb7b[7]](_0xfb7b[6],_0x14e7x3)}function onRemove(_0x14e7x2,_0x14e7x3,_0x14e7x5){_0x14e7x2[_0xfb7b[7]](_0xfb7b[8],_0x14e7x3)} \ No newline at end of file diff --git a/server/api/chat_enquiry/index.js b/server/api/chat_enquiry/index.js index 84a2544..620ab32 100644 --- a/server/api/chat_enquiry/index.js +++ b/server/api/chat_enquiry/index.js @@ -1,15 +1 @@ -'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; +var _0x5f1f=["\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"];_0x5f1f[0];var express=require(_0x5f1f[1]);var controller=require(_0x5f1f[2]);var license=require(_0x5f1f[3]);var router=express.Router();router[_0x5f1f[8]](_0x5f1f[4],license[_0x5f1f[5]](),license[_0x5f1f[6]](),controller[_0x5f1f[7]]);router[_0x5f1f[8]](_0x5f1f[9],license[_0x5f1f[5]](),license[_0x5f1f[6]](),controller[_0x5f1f[10]]);router[_0x5f1f[12]](_0x5f1f[4],license[_0x5f1f[5]](),license[_0x5f1f[6]](),controller[_0x5f1f[11]]);router[_0x5f1f[14]](_0x5f1f[9],license[_0x5f1f[5]](),license[_0x5f1f[6]](),controller[_0x5f1f[13]]);router[_0x5f1f[15]](_0x5f1f[9],license[_0x5f1f[5]](),license[_0x5f1f[6]](),controller[_0x5f1f[13]]);router[_0x5f1f[17]](_0x5f1f[9],license[_0x5f1f[5]](),license[_0x5f1f[6]](),controller[_0x5f1f[16]]);module[_0x5f1f[18]]=router \ No newline at end of file diff --git a/server/api/chat_message/chat_message.controller.js b/server/api/chat_message/chat_message.controller.js index 958ca19..35569ca 100644 --- a/server/api/chat_message/chat_message.controller.js +++ b/server/api/chat_message/chat_message.controller.js @@ -1,267 +1 @@ -'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); -} +var _0x99d5=["\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"];_0x99d5[0];var _=require(_0x99d5[1]);var md5=require(_0x99d5[2]);var User=require(_0x99d5[4])[_0x99d5[3]];var ChatRoom=require(_0x99d5[4])[_0x99d5[5]];var ChatMessage=require(_0x99d5[4])[_0x99d5[6]];var ChatVisitor=require(_0x99d5[4])[_0x99d5[7]];exports[_0x99d5[8]]=function(_0x9d82x7,_0x9d82x8){ChatMessage[_0x99d5[13]]()[_0x99d5[12]](function(_0x9d82xa){return _0x9d82x8[_0x99d5[11]](200)[_0x99d5[10]](_0x9d82xa)})[_0x99d5[9]](function(_0x9d82x9){return handleError(_0x9d82x8,_0x9d82x9)})};exports[_0x99d5[14]]=function(_0x9d82x7,_0x9d82x8){ChatMessage[_0x99d5[18]](_0x9d82x7[_0x99d5[17]][_0x99d5[16]])[_0x99d5[12]](function(_0x9d82xb){if(!_0x9d82xb){return _0x9d82x8[_0x99d5[15]](404)};return _0x9d82x8[_0x99d5[10]](_0x9d82xb)})[_0x99d5[9]](function(_0x9d82x9){return handleError(_0x9d82x8,_0x9d82x9)})};exports[_0x99d5[19]]=function(_0x9d82x7,_0x9d82x8,_0x9d82xc){ChatMessage[_0x99d5[19]](_[_0x99d5[22]](_0x9d82x7[_0x99d5[20]],{UserId:_0x9d82x7[_0x99d5[21]][_0x99d5[16]]}))[_0x99d5[12]](function(_0x9d82xb){return _0x9d82x8[_0x99d5[11]](201)[_0x99d5[10]](_0x9d82xb)})[_0x99d5[9]](function(_0x9d82x9){return handleError(_0x9d82x8,_0x9d82x9)})};exports[_0x99d5[23]]=function(_0x9d82x7,_0x9d82x8){if(_0x9d82x7[_0x99d5[20]][_0x99d5[16]]){delete _0x9d82x7[_0x99d5[20]][_0x99d5[16]]};return ChatMessage[_0x99d5[18]](_0x9d82x7[_0x99d5[17]][_0x99d5[16]])[_0x99d5[12]](function(_0x9d82xb){if(!_0x9d82xb){return _0x9d82x8[_0x99d5[15]](404)};var _0x9d82xd=_[_0x99d5[22]](_0x9d82xb,_0x9d82x7[_0x99d5[20]]);return _0x9d82xd[_0x99d5[24]]()})[_0x99d5[12]](function(_0x9d82xb){return _0x9d82x8[_0x99d5[11]](200)[_0x99d5[10]](_0x9d82xb)})[_0x99d5[9]](function(_0x9d82x9){return handleError(_0x9d82x8,_0x9d82x9)})};exports[_0x99d5[25]]=function(_0x9d82x7,_0x9d82x8){ChatMessage[_0x99d5[18]](_0x9d82x7[_0x99d5[17]][_0x99d5[16]])[_0x99d5[12]](function(_0x9d82xb){if(!_0x9d82xb){return _0x9d82x8[_0x99d5[15]](404)};_0x9d82xb[_0x99d5[25]]()[_0x99d5[12]](function(){return _0x9d82x8[_0x99d5[15]](204)})[_0x99d5[9]](function(_0x9d82x9){return handleError(_0x9d82x8,_0x9d82x9)})})[_0x99d5[9]](function(_0x9d82x9){return handleError(_0x9d82x8,_0x9d82x9)})};function handleError(_0x9d82x8,_0x9d82x9){return _0x9d82x8[_0x99d5[11]](500)[_0x99d5[10]](_0x9d82x9)} \ No newline at end of file diff --git a/server/api/chat_message/chat_message.socket.js b/server/api/chat_message/chat_message.socket.js index dccab23..934b522 100644 --- a/server/api/chat_message/chat_message.socket.js +++ b/server/api/chat_message/chat_message.socket.js @@ -1,59 +1 @@ -/** - * 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); -} +var _0xd146=["\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"];_0xd146[0];var chat_message=require(_0xd146[2])[_0xd146[1]];var _=require(_0xd146[3]);exports[_0xd146[4]]=function(_0x70fcx3){chat_message[_0xd146[5]](function(_0x70fcx4){onSave(_0x70fcx3,_0x70fcx4)});chat_message[_0xd146[6]](function(_0x70fcx4){onSave(_0x70fcx3,_0x70fcx4)});chat_message[_0xd146[7]](function(_0x70fcx4){onRemove(_0x70fcx3,_0x70fcx4)})};function onSave(_0x70fcx3,_0x70fcx4,_0x70fcx6){return _0x70fcx4[_0xd146[28]]()[_0xd146[27]](function(_0x70fcxc){return [_0x70fcxc[_0xd146[25]]({attributes:[_0xd146[13],_0xd146[20],_0xd146[21],_0xd146[22],_0xd146[23],_0xd146[24]],raw:true}),_0x70fcxc[_0xd146[26]]({attributes:[_0xd146[13],_0xd146[21],_0xd146[22]],raw:true})]})[_0xd146[19]](function(_0x70fcx8,_0x70fcx9){var _0x70fcxa=_[_0xd146[11]](_0x70fcx8,{id:_0x70fcx4[_0xd146[10]]});_0x70fcx8[_0xd146[18]](function(_0x70fcxb){if(_0x70fcx3[_0xd146[12]]==_0x70fcxb[_0xd146[13]]&&(_0x70fcxa||_0x70fcx9)){_0x70fcx3[_0xd146[17]](_0xd146[14],_[_0xd146[16]](_0x70fcx4[_0xd146[15]],{User:_0x70fcxa,ChatVisitor:_0x70fcx9}))}})})[_0xd146[9]](function(_0x70fcx7){console[_0xd146[8]](_0x70fcx7)})}function onRemove(_0x70fcx3,_0x70fcx4,_0x70fcx6){_0x70fcx3[_0xd146[17]](_0xd146[29],_0x70fcx4)} \ No newline at end of file diff --git a/server/api/chat_message/chat_message.spec.js b/server/api/chat_message/chat_message.spec.js index f646838..f898414 100644 --- a/server/api/chat_message/chat_message.spec.js +++ b/server/api/chat_message/chat_message.spec.js @@ -1,20 +1 @@ -'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 +var _0x5c4f=["\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"];_0x5c4f[0];var should=require(_0x5c4f[1]);var app=require(_0x5c4f[2]);var request=require(_0x5c4f[3]);describe(_0x5c4f[4],function(){it(_0x5c4f[5],function(_0x7c89x4){request(app)[_0x5c4f[13]](_0x5c4f[12])[_0x5c4f[11]](200)[_0x5c4f[11]](_0x5c4f[10],/json/)[_0x5c4f[9]](function(_0x7c89x5,_0x7c89x6){if(_0x7c89x5){return _0x7c89x4(_0x7c89x5)};_0x7c89x6[_0x5c4f[8]][_0x5c4f[1]][_0x5c4f[7]][_0x5c4f[6]](Array);_0x7c89x4()})})}) \ No newline at end of file diff --git a/server/api/chat_message/index.js b/server/api/chat_message/index.js index efcb4e1..0d82248 100644 --- a/server/api/chat_message/index.js +++ b/server/api/chat_message/index.js @@ -1,15 +1 @@ -'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; +var _0xf3f9=["\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"];_0xf3f9[0];var express=require(_0xf3f9[1]);var controller=require(_0xf3f9[2]);var auth=require(_0xf3f9[3]);var license=require(_0xf3f9[4]);var router=express.Router();router[_0xf3f9[9]](_0xf3f9[5],license[_0xf3f9[6]](),license[_0xf3f9[7]](),controller[_0xf3f9[8]]);router[_0xf3f9[9]](_0xf3f9[10],license[_0xf3f9[6]](),license[_0xf3f9[7]](),controller[_0xf3f9[11]]);router[_0xf3f9[14]](_0xf3f9[5],license[_0xf3f9[6]](),license[_0xf3f9[7]](),auth[_0xf3f9[12]](),controller[_0xf3f9[13]]);router[_0xf3f9[16]](_0xf3f9[10],license[_0xf3f9[6]](),license[_0xf3f9[7]](),controller[_0xf3f9[15]]);router[_0xf3f9[18]](_0xf3f9[10],license[_0xf3f9[6]](),license[_0xf3f9[7]](),controller[_0xf3f9[17]]);module[_0xf3f9[19]]=router \ No newline at end of file diff --git a/server/api/chat_proactive_action/chat_proactive_action.controller.js b/server/api/chat_proactive_action/chat_proactive_action.controller.js index 8e3b8ba..734ffba 100644 --- a/server/api/chat_proactive_action/chat_proactive_action.controller.js +++ b/server/api/chat_proactive_action/chat_proactive_action.controller.js @@ -1,112 +1 @@ -/** - * 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)); -} +var _0x9a16=["\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"];_0x9a16[0];var _=require(_0x9a16[1]);var Util=require(_0x9a16[2]);var ChatProactiveAction=require(_0x9a16[4])[_0x9a16[3]];function handleError(_0x1c73x5,_0x1c73x6){_0x1c73x6=_0x1c73x6||500;return function(_0x1c73x7){_0x1c73x5[_0x9a16[6]](_0x1c73x6)[_0x9a16[5]](_0x1c73x7)}}function responseWithResult(_0x1c73x5,_0x1c73x6){_0x1c73x6=_0x1c73x6||200;return function(_0x1c73x9){if(_0x1c73x9){_0x1c73x5[_0x9a16[6]](_0x1c73x6)[_0x9a16[7]](_0x1c73x9)}}}function responseWithoutResult(_0x1c73x5,_0x1c73x6){_0x1c73x6=_0x1c73x6||204;return function(){_0x1c73x5[_0x9a16[8]](_0x1c73x6)}}function handleEntityNotFound(_0x1c73x5){return function(_0x1c73x9){if(!_0x1c73x9){_0x1c73x5[_0x9a16[6]](404)[_0x9a16[9]]();return null};return _0x1c73x9}}function saveUpdates(_0x1c73xd){return function(_0x1c73x9){return _0x1c73x9[_0x9a16[11]](_0x1c73xd)[_0x9a16[10]](function(_0x1c73xe){return _0x1c73xe})}}function removeEntity(_0x1c73x5){return function(_0x1c73x9){if(_0x1c73x9){return _0x1c73x9[_0x9a16[12]]()[_0x9a16[10]](function(){_0x1c73x5[_0x9a16[6]](204)[_0x9a16[9]]()})}}}exports[_0x9a16[13]]=function(_0x1c73x10,_0x1c73x5){return ChatProactiveAction[_0x9a16[17]](Util[_0x9a16[16]](_0x1c73x10[_0x9a16[15]]))[_0x9a16[10]](responseWithResult(_0x1c73x5))[_0x9a16[14]](handleError(_0x1c73x5))};exports[_0x9a16[18]]=function(_0x1c73x10,_0x1c73x5){return ChatProactiveAction[_0x9a16[21]](_0x1c73x10[_0x9a16[20]][_0x9a16[19]])[_0x9a16[10]](handleEntityNotFound(_0x1c73x5))[_0x9a16[10]](responseWithResult(_0x1c73x5))[_0x9a16[14]](handleError(_0x1c73x5))};exports[_0x9a16[22]]=function(_0x1c73x10,_0x1c73x5){return ChatProactiveAction[_0x9a16[22]](_0x1c73x10[_0x9a16[23]])[_0x9a16[10]](responseWithResult(_0x1c73x5,201))[_0x9a16[14]](handleError(_0x1c73x5))};exports[_0x9a16[24]]=function(_0x1c73x10,_0x1c73x5){if(_0x1c73x10[_0x9a16[23]][_0x9a16[19]]){delete _0x1c73x10[_0x9a16[23]][_0x9a16[19]]};return ChatProactiveAction[_0x9a16[21]](_0x1c73x10[_0x9a16[20]][_0x9a16[19]])[_0x9a16[10]](handleEntityNotFound(_0x1c73x5))[_0x9a16[10]](saveUpdates(_0x1c73x10[_0x9a16[23]]))[_0x9a16[10]](responseWithResult(_0x1c73x5))[_0x9a16[14]](handleError(_0x1c73x5))};exports[_0x9a16[12]]=function(_0x1c73x10,_0x1c73x5){return ChatProactiveAction[_0x9a16[21]](_0x1c73x10[_0x9a16[20]][_0x9a16[19]])[_0x9a16[10]](handleEntityNotFound(_0x1c73x5))[_0x9a16[10]](removeEntity(_0x1c73x5))[_0x9a16[14]](handleError(_0x1c73x5))} \ No newline at end of file diff --git a/server/api/chat_proactive_action/chat_proactive_action.socket.js b/server/api/chat_proactive_action/chat_proactive_action.socket.js index ca71aaf..3e7af0e 100644 --- a/server/api/chat_proactive_action/chat_proactive_action.socket.js +++ b/server/api/chat_proactive_action/chat_proactive_action.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x957b=["\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"];_0x957b[0];var ChatProactiveAction=require(_0x957b[2])[_0x957b[1]];exports[_0x957b[3]]=function(_0x9074x2){ChatProactiveAction[_0x957b[4]](function(_0x9074x3){onSave(_0x9074x2,_0x9074x3)});ChatProactiveAction[_0x957b[5]](function(_0x9074x3){onRemove(_0x9074x2,_0x9074x3)})};function onSave(_0x9074x2,_0x9074x3,_0x9074x5){_0x9074x2[_0x957b[7]](_0x957b[6],_0x9074x3)}function onRemove(_0x9074x2,_0x9074x3,_0x9074x5){_0x9074x2[_0x957b[7]](_0x957b[8],_0x9074x3)} \ No newline at end of file diff --git a/server/api/chat_proactive_action/index.js b/server/api/chat_proactive_action/index.js index f38d95e..e86b315 100644 --- a/server/api/chat_proactive_action/index.js +++ b/server/api/chat_proactive_action/index.js @@ -1,16 +1 @@ -'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; +var _0x4175=["\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"];_0x4175[0];var express=require(_0x4175[1]);var auth=require(_0x4175[2]);var controller=require(_0x4175[3]);var router=express.Router();router[_0x4175[7]](_0x4175[4],auth[_0x4175[5]](),controller[_0x4175[6]]);router[_0x4175[7]](_0x4175[8],auth[_0x4175[5]](),controller[_0x4175[9]]);router[_0x4175[11]](_0x4175[4],auth[_0x4175[5]](),controller[_0x4175[10]]);router[_0x4175[13]](_0x4175[8],auth[_0x4175[5]](),controller[_0x4175[12]]);router[_0x4175[14]](_0x4175[8],auth[_0x4175[5]](),controller[_0x4175[12]]);router[_0x4175[16]](_0x4175[8],auth[_0x4175[5]](),controller[_0x4175[15]]);module[_0x4175[17]]=router \ No newline at end of file diff --git a/server/api/chat_proactive_action/index.spec.js b/server/api/chat_proactive_action/index.spec.js index 2b9c66a..fec2003 100644 --- a/server/api/chat_proactive_action/index.spec.js +++ b/server/api/chat_proactive_action/index.spec.js @@ -1,97 +1 @@ -'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; - }); - - }); - -}); +var _0x879b=["\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"];_0x879b[0];var proxyquire=require(_0x879b[2])[_0x879b[1]]();var chatProactiveActionCtrlStub={index:_0x879b[3],show:_0x879b[4],create:_0x879b[5],update:_0x879b[6],destroy:_0x879b[7]};var routerStub={get:sinon[_0x879b[8]](),put:sinon[_0x879b[8]](),patch:sinon[_0x879b[8]](),post:sinon[_0x879b[8]](),delete:sinon[_0x879b[8]]()};var chatProactiveActionIndex=proxyquire(_0x879b[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(_0x879b[10],function(){it(_0x879b[11],function(){expect(chatProactiveActionIndex)[_0x879b[13]][_0x879b[12]](routerStub)});describe(_0x879b[14],function(){it(_0x879b[15],function(){expect(routerStub[_0x879b[21]][_0x879b[20]](_0x879b[19],_0x879b[3]))[_0x879b[13]][_0x879b[18]][_0x879b[17]][_0x879b[16]]})});describe(_0x879b[22],function(){it(_0x879b[23],function(){expect(routerStub[_0x879b[21]][_0x879b[20]](_0x879b[24],_0x879b[4]))[_0x879b[13]][_0x879b[18]][_0x879b[17]][_0x879b[16]]})});describe(_0x879b[25],function(){it(_0x879b[26],function(){expect(routerStub[_0x879b[27]][_0x879b[20]](_0x879b[19],_0x879b[5]))[_0x879b[13]][_0x879b[18]][_0x879b[17]][_0x879b[16]]})});describe(_0x879b[28],function(){it(_0x879b[29],function(){expect(routerStub[_0x879b[30]][_0x879b[20]](_0x879b[24],_0x879b[6]))[_0x879b[13]][_0x879b[18]][_0x879b[17]][_0x879b[16]]})});describe(_0x879b[31],function(){it(_0x879b[29],function(){expect(routerStub[_0x879b[32]][_0x879b[20]](_0x879b[24],_0x879b[6]))[_0x879b[13]][_0x879b[18]][_0x879b[17]][_0x879b[16]]})});describe(_0x879b[33],function(){it(_0x879b[34],function(){expect(routerStub[_0x879b[35]][_0x879b[20]](_0x879b[24],_0x879b[7]))[_0x879b[13]][_0x879b[18]][_0x879b[17]][_0x879b[16]]})})}) \ No newline at end of file diff --git a/server/api/chat_queue/chat_queue.controller.js b/server/api/chat_queue/chat_queue.controller.js index e7c8ffd..4284f05 100644 --- a/server/api/chat_queue/chat_queue.controller.js +++ b/server/api/chat_queue/chat_queue.controller.js @@ -1,200 +1 @@ -'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); -} +var _0xb20d=["\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"];_0xb20d[0];var _=require(_0xb20d[1]);var Util=require(_0xb20d[2]);var ChatQueue=require(_0xb20d[4])[_0xb20d[3]];var User=require(_0xb20d[4])[_0xb20d[5]];var UserHasChatQueue=require(_0xb20d[4])[_0xb20d[6]];exports[_0xb20d[7]]=function(_0x8d3fx6,_0x8d3fx7){return ChatQueue[_0xb20d[16]](_0xb20d[15])[_0xb20d[14]](Util[_0xb20d[13]](_0x8d3fx6[_0xb20d[12]]))[_0xb20d[11]](function(_0x8d3fx9){_0x8d3fx7[_0xb20d[10]](200)[_0xb20d[9]](_0x8d3fx9)})[_0xb20d[8]](function(_0x8d3fx8){return handleError(_0x8d3fx7,_0x8d3fx8)})};exports[_0xb20d[17]]=function(_0x8d3fx6,_0x8d3fx7,_0x8d3fxa){UserHasChatQueue[_0xb20d[20]]({where:{UserId:_0x8d3fx6[_0xb20d[19]][_0xb20d[18]]}})[_0xb20d[11]](function(_0x8d3fxb){return _0x8d3fx7[_0xb20d[10]](200)[_0xb20d[9]](_0x8d3fxb)})[_0xb20d[8]](function(_0x8d3fx8){return handleError(_0x8d3fx7,_0x8d3fx8)})};exports[_0xb20d[21]]=function(_0x8d3fx6,_0x8d3fx7){ChatQueue[_0xb20d[24]](_0x8d3fx6[_0xb20d[23]][_0xb20d[18]])[_0xb20d[11]](function(_0x8d3fxc){if(!_0x8d3fxc){return _0x8d3fx7[_0xb20d[22]](404)};return _0x8d3fx7[_0xb20d[9]](_0x8d3fxc)})[_0xb20d[8]](function(_0x8d3fx8){return handleError(_0x8d3fx7,_0x8d3fx8)})};exports[_0xb20d[25]]=function(_0x8d3fx6,_0x8d3fx7){return ChatQueue[_0xb20d[24]](_0x8d3fx6[_0xb20d[23]][_0xb20d[18]])[_0xb20d[11]](function(_0x8d3fxe){if(!_0x8d3fxe){return _0x8d3fx7[_0xb20d[22]](404)};return _0x8d3fxe[_0xb20d[30]]({where:{role:_0xb20d[26]},attributes:[_0xb20d[18],_0xb20d[27],_0xb20d[28],_0xb20d[29]]})})[_0xb20d[11]](function(_0x8d3fxd){return _0x8d3fx7[_0xb20d[10]](200)[_0xb20d[9]](_0x8d3fxd)})[_0xb20d[8]](function(_0x8d3fx8){return handleError(_0x8d3fx7,_0x8d3fx8)})};exports[_0xb20d[31]]=function(_0x8d3fx6,_0x8d3fx7){return ChatQueue[_0xb20d[31]](_0x8d3fx6[_0xb20d[32]])[_0xb20d[11]](function(_0x8d3fxc){return _0x8d3fx7[_0xb20d[10]](201)[_0xb20d[9]](_0x8d3fxc)})[_0xb20d[8]](function(_0x8d3fx8){return handleError(_0x8d3fx7,_0x8d3fx8)})};exports[_0xb20d[33]]=function(_0x8d3fx6,_0x8d3fx7){if(_0x8d3fx6[_0xb20d[32]][_0xb20d[18]]){delete _0x8d3fx6[_0xb20d[32]][_0xb20d[18]]};return ChatQueue[_0xb20d[24]](_0x8d3fx6[_0xb20d[23]][_0xb20d[18]])[_0xb20d[11]](function(_0x8d3fxc){if(!_0x8d3fxc){return _0x8d3fx7[_0xb20d[22]](404)};var _0x8d3fxf=_[_0xb20d[34]](_0x8d3fxc,_0x8d3fx6[_0xb20d[32]]);_0x8d3fxf[_0xb20d[35]]()[_0xb20d[11]](function(){return _0x8d3fx7[_0xb20d[10]](200)[_0xb20d[9]](_0x8d3fxc)})[_0xb20d[8]](function(_0x8d3fx8){return handleError(_0x8d3fx7,_0x8d3fx8)})})[_0xb20d[8]](function(_0x8d3fx8){return handleError(_0x8d3fx7,_0x8d3fx8)})};exports[_0xb20d[36]]=function(_0x8d3fx6,_0x8d3fx7,_0x8d3fxa){return ChatQueue[_0xb20d[24]](_0x8d3fx6[_0xb20d[23]][_0xb20d[18]])[_0xb20d[11]](function(_0x8d3fx10){if(!_0x8d3fx10){return _0x8d3fx7[_0xb20d[22]](404)};return _0x8d3fx10[_0xb20d[39]](_0x8d3fx6[_0xb20d[32]][_0xb20d[37]],{penalty:_0x8d3fx6[_0xb20d[32]][_0xb20d[38]],queue:_0x8d3fx10[_0xb20d[27]]},{individualHooks:true})})[_0xb20d[11]](function(){return _0x8d3fx7[_0xb20d[22]](200)})[_0xb20d[8]](function(_0x8d3fx8){return handleError(_0x8d3fx7,_0x8d3fx8)})};exports[_0xb20d[40]]=function(_0x8d3fx6,_0x8d3fx7,_0x8d3fxa){return ChatQueue[_0xb20d[24]](_0x8d3fx6[_0xb20d[23]][_0xb20d[18]])[_0xb20d[11]](function(_0x8d3fx10){if(!_0x8d3fx10){return _0x8d3fx7[_0xb20d[22]](404)};return _0x8d3fx10[_0xb20d[41]](_0x8d3fx6[_0xb20d[12]][_0xb20d[37]],{individualHooks:true})})[_0xb20d[11]](function(){return _0x8d3fx7[_0xb20d[22]](200)})[_0xb20d[8]](function(_0x8d3fx8){return handleError(_0x8d3fx7,_0x8d3fx8)})};exports[_0xb20d[42]]=function(_0x8d3fx6,_0x8d3fx7){ChatQueue[_0xb20d[24]](_0x8d3fx6[_0xb20d[23]][_0xb20d[18]])[_0xb20d[11]](function(_0x8d3fxc){if(!_0x8d3fxc){return _0x8d3fx7[_0xb20d[22]](404)};_0x8d3fxc[_0xb20d[42]]()[_0xb20d[11]](function(){return _0x8d3fx7[_0xb20d[22]](204)})[_0xb20d[8]](function(_0x8d3fx8){return handleError(_0x8d3fx7,_0x8d3fx8)})})[_0xb20d[8]](function(_0x8d3fx8){return handleError(_0x8d3fx7,_0x8d3fx8)})};exports[_0xb20d[43]]=function(_0x8d3fx6,_0x8d3fx7){return ChatQueue[_0xb20d[42]]({where:{id:_0x8d3fx6[_0xb20d[12]][_0xb20d[44]]},individualHooks:true})[_0xb20d[11]](function(){return _0x8d3fx7[_0xb20d[22]](204)})[_0xb20d[8]](function(_0x8d3fx8){return handleError(_0x8d3fx7,_0x8d3fx8)})};function handleError(_0x8d3fx7,_0x8d3fx8){return _0x8d3fx7[_0xb20d[10]](500)[_0xb20d[9]](_0x8d3fx8)} \ No newline at end of file diff --git a/server/api/chat_queue/chat_queue.socket.js b/server/api/chat_queue/chat_queue.socket.js index 2e7f5d4..0008290 100644 --- a/server/api/chat_queue/chat_queue.socket.js +++ b/server/api/chat_queue/chat_queue.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x441a=["\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"];_0x441a[0];var chatQueue=require(_0x441a[2])[_0x441a[1]];exports[_0x441a[3]]=function(_0x97ebx2){chatQueue[_0x441a[4]](function(_0x97ebx3){onSave(_0x97ebx2,_0x97ebx3)});chatQueue[_0x441a[5]](function(_0x97ebx3){onRemove(_0x97ebx2,_0x97ebx3)})};function onSave(_0x97ebx2,_0x97ebx3,_0x97ebx5){_0x97ebx2[_0x441a[7]](_0x441a[6],_0x97ebx3)}function onRemove(_0x97ebx2,_0x97ebx3,_0x97ebx5){_0x97ebx2[_0x441a[7]](_0x441a[8],_0x97ebx3)} \ No newline at end of file diff --git a/server/api/chat_queue/index.js b/server/api/chat_queue/index.js index d4cc855..5358b42 100644 --- a/server/api/chat_queue/index.js +++ b/server/api/chat_queue/index.js @@ -1,21 +1 @@ -'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; +var _0xa7f9=["\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"];_0xa7f9[0];var express=require(_0xa7f9[1]);var controller=require(_0xa7f9[2]);var auth=require(_0xa7f9[3]);var license=require(_0xa7f9[4]);var router=express.Router();router[_0xa7f9[9]](_0xa7f9[5],license[_0xa7f9[6]](),license[_0xa7f9[7]](),controller[_0xa7f9[8]]);router[_0xa7f9[9]](_0xa7f9[10],license[_0xa7f9[6]](),license[_0xa7f9[7]](),auth[_0xa7f9[11]](),controller[_0xa7f9[12]]);router[_0xa7f9[9]](_0xa7f9[13],auth[_0xa7f9[11]](),license[_0xa7f9[7]](),controller[_0xa7f9[14]]);router[_0xa7f9[9]](_0xa7f9[15],license[_0xa7f9[6]](),license[_0xa7f9[7]](),controller[_0xa7f9[16]]);router[_0xa7f9[18]](_0xa7f9[5],license[_0xa7f9[6]](),license[_0xa7f9[7]](),controller[_0xa7f9[17]]);router[_0xa7f9[18]](_0xa7f9[13],license[_0xa7f9[6]](),license[_0xa7f9[7]](),controller[_0xa7f9[19]]);router[_0xa7f9[21]](_0xa7f9[15],license[_0xa7f9[6]](),license[_0xa7f9[7]](),controller[_0xa7f9[20]]);router[_0xa7f9[23]](_0xa7f9[13],license[_0xa7f9[6]](),license[_0xa7f9[7]](),controller[_0xa7f9[22]]);router[_0xa7f9[24]](_0xa7f9[15],license[_0xa7f9[6]](),license[_0xa7f9[7]](),controller[_0xa7f9[20]]);router[_0xa7f9[23]](_0xa7f9[5],license[_0xa7f9[6]](),license[_0xa7f9[7]](),controller[_0xa7f9[25]]);router[_0xa7f9[23]](_0xa7f9[15],license[_0xa7f9[6]](),license[_0xa7f9[7]](),controller[_0xa7f9[26]]);module[_0xa7f9[27]]=router \ No newline at end of file diff --git a/server/api/chat_room/chat_room.controller.js b/server/api/chat_room/chat_room.controller.js index f31fd71..01b7699 100644 --- a/server/api/chat_room/chat_room.controller.js +++ b/server/api/chat_room/chat_room.controller.js @@ -1,326 +1 @@ -'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); -} +var _0x454e=["\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"];_0x454e[0];var _=require(_0x454e[1]);var md5=require(_0x454e[2]);var moment=require(_0x454e[3]);var csv=require(_0x454e[4]);var Util=require(_0x454e[5]);var User=require(_0x454e[7])[_0x454e[6]];var ChatRoom=require(_0x454e[7])[_0x454e[8]];var ChatMessage=require(_0x454e[7])[_0x454e[9]];var ChatVisitor=require(_0x454e[7])[_0x454e[10]];var UserHasChatRoom=require(_0x454e[7])[_0x454e[11]];exports[_0x454e[12]]=function(_0x7b38xb,_0x7b38xc,_0x7b38xd){return ChatRoom[_0x454e[27]](_[_0x454e[26]](Util[_0x454e[19]](_0x7b38xb[_0x454e[18]]),{include:[{model:User,attributes:[_0x454e[20],_0x454e[21],_0x454e[22],_0x454e[23],_0x454e[24],_0x454e[25]]},{model:ChatMessage},{model:ChatVisitor}]}))[_0x454e[17]](function(_0x7b38xf){_0x7b38xc[_0x454e[16]](200)[_0x454e[15]](_0x7b38xf)})[_0x454e[14]](function(_0x7b38xe){console[_0x454e[13]](_0x7b38xe);return handleError(_0x7b38xc,_0x7b38xe)})};exports[_0x454e[28]]=function(_0x7b38xb,_0x7b38xc){return User[_0x454e[33]](_0x7b38xb[_0x454e[32]][_0x454e[20]])[_0x454e[17]](function(_0x7b38x11){return _0x7b38x11[_0x454e[31]]({include:[{model:ChatVisitor,attributes:[_0x454e[20],_0x454e[22],_0x454e[23]]},{model:User,attributes:[_0x454e[20],_0x454e[21],_0x454e[22],_0x454e[23],_0x454e[24],_0x454e[25]]}]})})[_0x454e[17]](function(_0x7b38x10){if(!_0x7b38x10){return _0x7b38xc[_0x454e[30]](404)};return _0x7b38xc[_0x454e[15]](_0x7b38x10)})[_0x454e[14]](function(_0x7b38xe){console[_0x454e[29]](_0x7b38xe);return handleError(_0x7b38xc,_0x7b38xe)})};exports[_0x454e[34]]=function(_0x7b38xb,_0x7b38xc){return ChatRoom[_0x454e[33]](_0x7b38xb[_0x454e[35]][_0x454e[20]],{include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0x454e[20],_0x454e[23],_0x454e[22]]},{model:User,attributes:[_0x454e[20],_0x454e[23],_0x454e[21],_0x454e[22],_0x454e[36]]}]},{model:User,attributes:[_0x454e[20],_0x454e[23],_0x454e[21],_0x454e[22]]},{model:ChatVisitor}]})[_0x454e[17]](function(_0x7b38x12){if(!_0x7b38x12){return _0x7b38xc[_0x454e[30]](404)};return _0x7b38xc[_0x454e[15]](_0x7b38x12)})[_0x454e[14]](function(_0x7b38xe){return handleError(_0x7b38xc,_0x7b38xe)})};exports[_0x454e[37]]=function(_0x7b38xb,_0x7b38xc,_0x7b38xd){var _0x7b38x13;return ChatRoom[_0x454e[47]]({where:{token:md5(JSON[_0x454e[45]](_0x7b38xb[_0x454e[18]][_0x454e[40]][_0x454e[44]]())).toString(_0x454e[43])},defaults:{type:_0x454e[25],token:md5(JSON[_0x454e[45]](_0x7b38xb[_0x454e[18]][_0x454e[40]][_0x454e[44]]())).toString(_0x454e[43]),status:_0x454e[46]},include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0x454e[20],_0x454e[23],_0x454e[22]]},{model:User,attributes:[_0x454e[20],_0x454e[21],_0x454e[22],_0x454e[23],_0x454e[24],_0x454e[25]]}]},{model:User,attributes:[_0x454e[20],_0x454e[21],_0x454e[22],_0x454e[23],_0x454e[24],_0x454e[25]]}]})[_0x454e[42]](function(_0x7b38x12,_0x7b38x15){_0x7b38x13=_0x7b38x12;if(_0x7b38x15){return _0x7b38x13[_0x454e[41]](_0x7b38xb[_0x454e[18]][_0x454e[40]])}else {return}})[_0x454e[17]](function(){return _0x7b38x13[_0x454e[39]]()})[_0x454e[17]](function(_0x7b38x14){return _0x7b38xc[_0x454e[16]](200)[_0x454e[15]](_[_0x454e[26]](_0x7b38x13[_0x454e[38]],{Users:_0x7b38x14}))})[_0x454e[14]](function(_0x7b38xe){return handleError(_0x7b38xc,_0x7b38xe)})};exports[_0x454e[48]]=function(_0x7b38xb,_0x7b38xc,_0x7b38xd){return ChatRoom[_0x454e[33]](_0x7b38xb[_0x454e[35]][_0x454e[20]],{include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0x454e[20],_0x454e[22]]},{model:User,attributes:[_0x454e[20],_0x454e[22]]}]}]})[_0x454e[17]](function(_0x7b38x12){var _0x7b38x16=[];_0x7b38x12[_0x454e[55]][_0x454e[54]](function(_0x7b38x17){_0x7b38x16[_0x454e[53]]({name:_0x7b38x17[_0x454e[6]]?_0x7b38x17[_0x454e[6]][_0x454e[22]]:_0x7b38x17[_0x454e[10]][_0x454e[22]],text:_0x7b38x17[_0x454e[51]][_0x454e[50]](/(\r\n|\n|\r)/gm,_0x454e[49]),date:_0x7b38x17[_0x454e[52]]})});return _0x7b38xc[_0x454e[57]](_0x454e[56])[_0x454e[16]](200)[_0x454e[15]](csv(_0x7b38x16))})[_0x454e[14]](function(_0x7b38xe){return handleError(_0x7b38xc,_0x7b38xe)})};exports[_0x454e[58]]=function(_0x7b38xb,_0x7b38xc){return User[_0x454e[33]](_0x7b38xb[_0x454e[32]][_0x454e[20]])[_0x454e[17]](function(_0x7b38x11){return _0x7b38x11[_0x454e[31]]({where:{type:_0x7b38xb[_0x454e[35]][_0x454e[57]]},include:[{model:ChatVisitor,attributes:[_0x454e[20],_0x454e[22],_0x454e[23]]}]})})[_0x454e[17]](function(_0x7b38x10){if(!_0x7b38x10){return _0x7b38xc[_0x454e[30]](404)};return _0x7b38xc[_0x454e[15]](_0x7b38x10)})[_0x454e[14]](function(_0x7b38xe){return handleError(_0x7b38xc,_0x7b38xe)})};exports[_0x454e[59]]=function(_0x7b38xb,_0x7b38xc){return User[_0x454e[33]](_0x7b38xb[_0x454e[32]][_0x454e[20]])[_0x454e[17]](function(_0x7b38x11){return _0x7b38x11[_0x454e[31]]({include:[{model:ChatVisitor,attributes:[_0x454e[20],_0x454e[22],_0x454e[23]]},{model:User,attributes:[_0x454e[20],_0x454e[21],_0x454e[22],_0x454e[23],_0x454e[24],_0x454e[25]]}]})})[_0x454e[17]](function(_0x7b38x10){if(!_0x7b38x10){return _0x7b38xc[_0x454e[30]](404)};return _0x7b38xc[_0x454e[15]](_0x7b38x10)})[_0x454e[14]](function(_0x7b38xe){return handleError(_0x7b38xc,_0x7b38xe)})};exports[_0x454e[60]]=function(_0x7b38xb,_0x7b38xc){};exports[_0x454e[61]]=function(_0x7b38xb,_0x7b38xc){if(_0x7b38xb[_0x454e[51]][_0x454e[20]]){delete _0x7b38xb[_0x454e[51]][_0x454e[20]]};return ChatRoom[_0x454e[33]](_0x7b38xb[_0x454e[35]][_0x454e[20]])[_0x454e[17]](function(_0x7b38x12){if(!_0x7b38x12){return _0x7b38xc[_0x454e[30]](404)};var _0x7b38x18=_[_0x454e[26]](_0x7b38x12,_0x7b38xb[_0x454e[51]]);return _0x7b38x18[_0x454e[62]]()})[_0x454e[17]](function(_0x7b38x12){return _0x7b38xc[_0x454e[16]](200)[_0x454e[15]](_0x7b38x12)})[_0x454e[14]](function(_0x7b38xe){return handleError(_0x7b38xc,_0x7b38xe)})};exports[_0x454e[63]]=function(_0x7b38xb,_0x7b38xc){var _0x7b38x13;if(_0x7b38xb[_0x454e[51]][_0x454e[20]]){delete _0x7b38xb[_0x454e[51]][_0x454e[20]]};return ChatRoom[_0x454e[33]](_0x7b38xb[_0x454e[35]][_0x454e[20]])[_0x454e[17]](function(_0x7b38x12){if(!_0x7b38x12||!_0x7b38xb[_0x454e[51]][_0x454e[40]]){return _0x7b38xc[_0x454e[30]](404)};return _0x7b38x12})[_0x454e[17]](function(_0x7b38x12){return _0x7b38x12[_0x454e[61]]({token:md5(JSON[_0x454e[45]](_0x7b38xb[_0x454e[51]][_0x454e[40]][_0x454e[44]]())).toString(_0x454e[43])})})[_0x454e[17]](function(_0x7b38x12){_0x7b38x13=_0x7b38x12;return _0x7b38x12[_0x454e[41]](_0x7b38xb[_0x454e[51]][_0x454e[40]][_0x454e[44]](),{individualHooks:true})})[_0x454e[17]](function(){return _0x7b38x13[_0x454e[39]]()})[_0x454e[17]](function(_0x7b38x14){return _0x7b38xc[_0x454e[16]](200)[_0x454e[15]](_[_0x454e[26]](_0x7b38x13[_0x454e[38]],{Users:_0x7b38x14,ChatMessages:[]}))})[_0x454e[14]](function(_0x7b38xe){return handleError(_0x7b38xc,_0x7b38xe)})};exports[_0x454e[64]]=function(_0x7b38xb,_0x7b38xc){return ChatRoom[_0x454e[33]](_0x7b38xb[_0x454e[35]][_0x454e[20]])[_0x454e[17]](function(_0x7b38x12){if(!_0x7b38x12){return _0x7b38xc[_0x454e[30]](404)};return _0x7b38x12[_0x454e[64]]()})[_0x454e[17]](function(){return _0x7b38xc[_0x454e[30]](204)})[_0x454e[14]](function(_0x7b38xe){return handleError(_0x7b38xc,_0x7b38xe)})};function handleError(_0x7b38xc,_0x7b38xe){return _0x7b38xc[_0x454e[16]](500)[_0x454e[15]](_0x7b38xe)} \ No newline at end of file diff --git a/server/api/chat_room/chat_room.socket.js b/server/api/chat_room/chat_room.socket.js index 2f75a98..16a0165 100644 --- a/server/api/chat_room/chat_room.socket.js +++ b/server/api/chat_room/chat_room.socket.js @@ -1,30 +1 @@ -/** - * 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); -} +var _0x6fb3=["\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"];_0x6fb3[0];var User=require(_0x6fb3[2])[_0x6fb3[1]];var ChatRoom=require(_0x6fb3[2])[_0x6fb3[3]];var ChatMessage=require(_0x6fb3[2])[_0x6fb3[4]];var ChatVisitor=require(_0x6fb3[2])[_0x6fb3[5]];exports[_0x6fb3[6]]=function(_0xf7b2x5){ChatRoom[_0x6fb3[7]](function(_0xf7b2x6){onSave(_0xf7b2x5,_0xf7b2x6)});ChatRoom[_0x6fb3[8]](function(_0xf7b2x6){onSave(_0xf7b2x5,_0xf7b2x6)});ChatRoom[_0x6fb3[9]](function(_0xf7b2x6){onRemove(_0xf7b2x5,_0xf7b2x6)})};function onSave(_0xf7b2x5,_0xf7b2x6,_0xf7b2x8){_0xf7b2x5[_0x6fb3[11]](_0x6fb3[10],_0xf7b2x6)}function onRemove(_0xf7b2x5,_0xf7b2x6,_0xf7b2x8){_0xf7b2x5[_0x6fb3[11]](_0x6fb3[12],_0xf7b2x6)} \ No newline at end of file diff --git a/server/api/chat_room/index.js b/server/api/chat_room/index.js index 731381f..712defb 100644 --- a/server/api/chat_room/index.js +++ b/server/api/chat_room/index.js @@ -1,22 +1 @@ -'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; +var _0x9488=["\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"];_0x9488[0];var express=require(_0x9488[1]);var controller=require(_0x9488[2]);var auth=require(_0x9488[3]);var license=require(_0x9488[4]);var router=express.Router();router[_0x9488[9]](_0x9488[5],license[_0x9488[6]](),license[_0x9488[7]](),controller[_0x9488[8]]);router[_0x9488[9]](_0x9488[10],license[_0x9488[6]](),license[_0x9488[7]](),auth[_0x9488[11]](),controller[_0x9488[12]]);router[_0x9488[9]](_0x9488[13],license[_0x9488[6]](),license[_0x9488[7]](),auth[_0x9488[11]](),controller[_0x9488[14]]);router[_0x9488[9]](_0x9488[15],license[_0x9488[6]](),license[_0x9488[7]](),auth[_0x9488[11]](),controller[_0x9488[16]]);router[_0x9488[9]](_0x9488[17],license[_0x9488[6]](),license[_0x9488[7]](),auth[_0x9488[11]](),controller[_0x9488[18]]);router[_0x9488[9]](_0x9488[19],license[_0x9488[6]](),license[_0x9488[7]](),controller[_0x9488[20]]);router[_0x9488[9]](_0x9488[21],license[_0x9488[6]](),license[_0x9488[7]](),controller[_0x9488[22]]);router[_0x9488[24]](_0x9488[5],license[_0x9488[6]](),license[_0x9488[7]](),auth[_0x9488[11]](),controller[_0x9488[23]]);router[_0x9488[26]](_0x9488[19],license[_0x9488[6]](),license[_0x9488[7]](),controller[_0x9488[25]]);router[_0x9488[26]](_0x9488[27],license[_0x9488[6]](),license[_0x9488[7]](),controller[_0x9488[28]]);router[_0x9488[29]](_0x9488[19],license[_0x9488[6]](),license[_0x9488[7]](),controller[_0x9488[25]]);router[_0x9488[31]](_0x9488[19],license[_0x9488[6]](),license[_0x9488[7]](),controller[_0x9488[30]]);module[_0x9488[32]]=router \ No newline at end of file diff --git a/server/api/chat_visitor/chat_visitor.controller.js b/server/api/chat_visitor/chat_visitor.controller.js index 38e5d14..7e883e2 100644 --- a/server/api/chat_visitor/chat_visitor.controller.js +++ b/server/api/chat_visitor/chat_visitor.controller.js @@ -1,104 +1 @@ -'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); -} +var _0x5203=["\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"];_0x5203[0];var _=require(_0x5203[1]);var Util=require(_0x5203[2]);var ChatVisitor=require(_0x5203[4])[_0x5203[3]];var ChatEnquiry=require(_0x5203[4])[_0x5203[5]];var ChatWebsite=require(_0x5203[4])[_0x5203[6]];exports[_0x5203[7]]=function(_0x7d90x6,_0x7d90x7,_0x7d90x8){return ChatVisitor[_0x5203[16]](_[_0x5203[15]](Util[_0x5203[14]](_0x7d90x6[_0x5203[13]]),{include:[{model:ChatWebsite}]}))[_0x5203[12]](function(_0x7d90xa){_0x7d90x7[_0x5203[11]](200)[_0x5203[10]](_0x7d90xa)})[_0x5203[9]](function(_0x7d90x9){console[_0x5203[8]](_0x7d90x9);return handleError(_0x7d90x7,_0x7d90x9)})};exports[_0x5203[17]]=function(_0x7d90x6,_0x7d90x7){return ChatVisitor[_0x5203[21]](_0x7d90x6[_0x5203[20]][_0x5203[19]],{include:[{model:ChatEnquiry},{model:ChatWebsite}]})[_0x5203[12]](function(_0x7d90xb){if(!_0x7d90xb){return _0x7d90x7[_0x5203[18]](404)};return _0x7d90x7[_0x5203[10]](_0x7d90xb)})[_0x5203[9]](function(_0x7d90x9){return handleError(_0x7d90x7,_0x7d90x9)})};exports[_0x5203[22]]=function(_0x7d90x6,_0x7d90x7){return ChatVisitor[_0x5203[22]](_0x7d90x6[_0x5203[23]])[_0x5203[12]](function(_0x7d90xb){return _0x7d90x7[_0x5203[11]](201)[_0x5203[10]](_0x7d90xb)})[_0x5203[9]](function(_0x7d90x9){return handleError(_0x7d90x7,_0x7d90x9)})};exports[_0x5203[24]]=function(_0x7d90x6,_0x7d90x7){if(_0x7d90x6[_0x5203[23]][_0x5203[19]]){delete _0x7d90x6[_0x5203[23]][_0x5203[19]]};return ChatVisitor[_0x5203[21]](_0x7d90x6[_0x5203[20]][_0x5203[19]])[_0x5203[12]](function(_0x7d90xb){if(!_0x7d90xb){return _0x7d90x7[_0x5203[18]](404)};var _0x7d90xc=_[_0x5203[15]](_0x7d90xb,_0x7d90x6[_0x5203[23]]);return _0x7d90xc[_0x5203[25]]()})[_0x5203[12]](function(_0x7d90xb){return _0x7d90x7[_0x5203[11]](200)[_0x5203[10]](_0x7d90xb)})[_0x5203[9]](function(_0x7d90x9){return handleError(_0x7d90x7,_0x7d90x9)})};exports[_0x5203[26]]=function(_0x7d90x6,_0x7d90x7){return ChatVisitor[_0x5203[21]](_0x7d90x6[_0x5203[20]][_0x5203[19]])[_0x5203[12]](function(_0x7d90xb){if(!_0x7d90xb){return _0x7d90x7[_0x5203[18]](404)};return _0x7d90xb[_0x5203[26]]()})[_0x5203[12]](function(){return _0x7d90x7[_0x5203[18]](204)})[_0x5203[9]](function(_0x7d90x9){return handleError(_0x7d90x7,_0x7d90x9)})};function handleError(_0x7d90x7,_0x7d90x9){return _0x7d90x7[_0x5203[11]](500)[_0x5203[10]](_0x7d90x9)} \ No newline at end of file diff --git a/server/api/chat_visitor/chat_visitor.socket.js b/server/api/chat_visitor/chat_visitor.socket.js index a283bfc..a894504 100644 --- a/server/api/chat_visitor/chat_visitor.socket.js +++ b/server/api/chat_visitor/chat_visitor.socket.js @@ -1,27 +1 @@ -/** - * 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); -} +var _0xcd0b=["\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"];_0xcd0b[0];var chat_visitor=require(_0xcd0b[2])[_0xcd0b[1]];exports[_0xcd0b[3]]=function(_0xf457x2){chat_visitor[_0xcd0b[4]](function(_0xf457x3){onSave(_0xf457x2,_0xf457x3)});chat_visitor[_0xcd0b[5]](function(_0xf457x3){onSave(_0xf457x2,_0xf457x3)});chat_visitor[_0xcd0b[6]](function(_0xf457x3){onRemove(_0xf457x2,_0xf457x3)})};function onSave(_0xf457x2,_0xf457x3,_0xf457x5){_0xf457x2[_0xcd0b[8]](_0xcd0b[7],_0xf457x3)}function onRemove(_0xf457x2,_0xf457x3,_0xf457x5){_0xf457x2[_0xcd0b[8]](_0xcd0b[9],_0xf457x3)} \ No newline at end of file diff --git a/server/api/chat_visitor/index.js b/server/api/chat_visitor/index.js index c58a917..898bf8c 100644 --- a/server/api/chat_visitor/index.js +++ b/server/api/chat_visitor/index.js @@ -1,15 +1 @@ -'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; +var _0x823e=["\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"];_0x823e[0];var express=require(_0x823e[1]);var controller=require(_0x823e[2]);var license=require(_0x823e[3]);var router=express.Router();router[_0x823e[8]](_0x823e[4],license[_0x823e[5]](),license[_0x823e[6]](),controller[_0x823e[7]]);router[_0x823e[8]](_0x823e[9],license[_0x823e[5]](),license[_0x823e[6]](),controller[_0x823e[10]]);router[_0x823e[12]](_0x823e[4],license[_0x823e[5]](),license[_0x823e[6]](),controller[_0x823e[11]]);router[_0x823e[14]](_0x823e[9],license[_0x823e[5]](),license[_0x823e[6]](),controller[_0x823e[13]]);router[_0x823e[15]](_0x823e[9],license[_0x823e[5]](),license[_0x823e[6]](),controller[_0x823e[13]]);router[_0x823e[17]](_0x823e[9],license[_0x823e[5]](),license[_0x823e[6]](),controller[_0x823e[16]]);module[_0x823e[18]]=router \ No newline at end of file diff --git a/server/api/chat_website/chat_website.controller.js b/server/api/chat_website/chat_website.controller.js index 084d688..7511e87 100644 --- a/server/api/chat_website/chat_website.controller.js +++ b/server/api/chat_website/chat_website.controller.js @@ -1,383 +1 @@ -'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); -} +var _0xdc7c=["\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"];_0xdc7c[0];var _=require(_0xdc7c[1]);var util=require(_0xdc7c[2]);var async=require(_0xdc7c[3]);var Mustache=require(_0xdc7c[4]);var Util=require(_0xdc7c[5]);var sequelize=require(_0xdc7c[7])[_0xdc7c[6]];var ChatWebsite=require(_0xdc7c[7])[_0xdc7c[8]];var ChatQueue=require(_0xdc7c[7])[_0xdc7c[9]];var User=require(_0xdc7c[7])[_0xdc7c[10]];var ChatApplication=require(_0xdc7c[7])[_0xdc7c[11]];var ChatWebsitesField=require(_0xdc7c[7])[_0xdc7c[12]];var ChatProactiveAction=require(_0xdc7c[7])[_0xdc7c[13]];var snippet=require(_0xdc7c[15])[_0xdc7c[14]];exports[_0xdc7c[16]]=function(_0x36f2xe,_0x36f2xf,_0x36f2x10){return ChatWebsite[_0xdc7c[23]](Util[_0xdc7c[22]](_0x36f2xe[_0xdc7c[21]]))[_0xdc7c[20]](function(_0x36f2x12){_0x36f2xf[_0xdc7c[19]](200)[_0xdc7c[18]](_0x36f2x12)})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[24]]=function(_0x36f2xe,_0x36f2xf){return ChatWebsite[_0xdc7c[28]](_0x36f2xe[_0xdc7c[27]][_0xdc7c[26]])[_0xdc7c[20]](function(_0x36f2x13){if(!_0x36f2x13){return _0x36f2xf[_0xdc7c[25]](404)};return _0x36f2xf[_0xdc7c[18]](_0x36f2x13)})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[29]]=function(_0x36f2xe,_0x36f2xf,_0x36f2x10){return ChatWebsite[_0xdc7c[28]](_0x36f2xe[_0xdc7c[27]][_0xdc7c[26]])[_0xdc7c[20]](function(_0x36f2x15){if(!_0x36f2x15){return _0x36f2xf[_0xdc7c[25]](404)};return _0x36f2x15[_0xdc7c[34]](_[_0xdc7c[33]](Util[_0xdc7c[22]](_0x36f2xe[_0xdc7c[21]]),{include:[{model:ChatQueue,attributes:[_0xdc7c[26],_0xdc7c[32]]},{model:User,attributes:[_0xdc7c[26],_0xdc7c[32]]}]}))})[_0xdc7c[20]](function(_0x36f2x14){return _0x36f2xf[_0xdc7c[18]]({count:_0x36f2x14[_0xdc7c[31]],rows:_0x36f2x14})})[_0xdc7c[17]](function(_0x36f2x11){console[_0xdc7c[30]](_0x36f2x11);return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[35]]=function(_0x36f2xe,_0x36f2xf,_0x36f2x10){return ChatWebsite[_0xdc7c[28]](_0x36f2xe[_0xdc7c[27]][_0xdc7c[26]])[_0xdc7c[20]](function(_0x36f2x15){if(!_0x36f2x15){return _0x36f2xf[_0xdc7c[25]](404)};return _0x36f2x15[_0xdc7c[36]](Util[_0xdc7c[22]](_0x36f2xe[_0xdc7c[21]]))})[_0xdc7c[20]](function(_0x36f2x16){return _0x36f2xf[_0xdc7c[18]]({count:_0x36f2x16[_0xdc7c[31]],rows:_0x36f2x16})})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[37]]=function(_0x36f2xe,_0x36f2xf){return ChatWebsite[_0xdc7c[28]](_0x36f2xe[_0xdc7c[27]][_0xdc7c[26]])[_0xdc7c[20]](function(_0x36f2x13){var _0x36f2x17={remote:_0x36f2x13[_0xdc7c[38]],websiteId:_0x36f2xe[_0xdc7c[27]][_0xdc7c[26]]};var _0x36f2x18=Mustache[_0xdc7c[39]](snippet,_0x36f2x17);return _0x36f2xf[_0xdc7c[19]](200)[_0xdc7c[18]]({html:_0x36f2x18})})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[40]]=function(_0x36f2xe,_0x36f2xf){return ChatWebsite[_0xdc7c[40]](_0x36f2xe[_0xdc7c[41]])[_0xdc7c[20]](function(_0x36f2x13){return _0x36f2xf[_0xdc7c[19]](201)[_0xdc7c[18]](_0x36f2x13)})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[42]]=function(_0x36f2xe,_0x36f2xf){if(_0x36f2xe[_0xdc7c[41]][_0xdc7c[26]]){delete _0x36f2xe[_0xdc7c[41]][_0xdc7c[26]]};return ChatWebsite[_0xdc7c[28]](_0x36f2xe[_0xdc7c[27]][_0xdc7c[26]])[_0xdc7c[20]](function(_0x36f2x13){if(!_0x36f2x13){return _0x36f2xf[_0xdc7c[25]](404)};return _0x36f2x13[_0xdc7c[42]](_0x36f2xe[_0xdc7c[41]])[_0xdc7c[20]](function(_0x36f2x13){return _0x36f2xf[_0xdc7c[19]](200)[_0xdc7c[18]](_0x36f2x13)})})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[43]]=function(_0x36f2xe,_0x36f2xf){var _0x36f2x19=0;var _0x36f2x1a=_0x36f2xe[_0xdc7c[41]];_0x36f2x1a[_0xdc7c[47]](function(_0x36f2x1b){delete _0x36f2x1b[_0xdc7c[26]];delete _0x36f2x1b[_0xdc7c[44]];delete _0x36f2x1b[_0xdc7c[45]];_0x36f2x1b[_0xdc7c[46]]= ++_0x36f2x19});return sequelize[_0xdc7c[50]](function(_0x36f2x1c){return ChatApplication[_0xdc7c[49]]({where:{ChatWebsiteId:_0x36f2xe[_0xdc7c[27]][_0xdc7c[26]]},individualHooks:true,transaction:_0x36f2x1c})[_0xdc7c[20]](function(){return ChatApplication[_0xdc7c[48]](_0x36f2x1a,{individualHooks:true,transaction:_0x36f2x1c})})})[_0xdc7c[20]](function(_0x36f2x14){return _0x36f2xf[_0xdc7c[19]](200)[_0xdc7c[18]]({count:_0x36f2x14[_0xdc7c[31]],rows:_0x36f2x14})})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[49]]=function(_0x36f2xe,_0x36f2xf){return ChatWebsite[_0xdc7c[28]](_0x36f2xe[_0xdc7c[27]][_0xdc7c[26]])[_0xdc7c[20]](function(_0x36f2x13){if(!_0x36f2x13){return _0x36f2xf[_0xdc7c[25]](404)};return _0x36f2x13[_0xdc7c[49]]()})[_0xdc7c[20]](function(){return _0x36f2xf[_0xdc7c[25]](204)})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[51]]=function(_0x36f2xe,_0x36f2xf){return ChatWebsite[_0xdc7c[49]]({where:{id:_0x36f2xe[_0xdc7c[21]][_0xdc7c[52]]},individualHooks:true})[_0xdc7c[20]](function(){return _0x36f2xf[_0xdc7c[25]](204)})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[53]]=function(_0x36f2xe,_0x36f2xf){return ChatApplication[_0xdc7c[49]]({where:{id:_0x36f2xe[_0xdc7c[21]][_0xdc7c[54]]},individualHooks:true})[_0xdc7c[20]](function(){return _0x36f2xf[_0xdc7c[25]](204)})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[55]]=function(_0x36f2xe,_0x36f2xf,_0x36f2x10){return ChatApplication[_0xdc7c[28]](_0x36f2xe[_0xdc7c[27]][_0xdc7c[56]])[_0xdc7c[20]](function(_0x36f2x1d){if(!_0x36f2x1d){return _0x36f2xf[_0xdc7c[25]](404)};return _0x36f2x1d[_0xdc7c[49]]()})[_0xdc7c[20]](function(){return _0x36f2xf[_0xdc7c[25]](204)})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[57]]=function(_0x36f2xe,_0x36f2xf){return ChatWebsitesField[_0xdc7c[61]]({method:[_0x36f2xe[_0xdc7c[27]][_0xdc7c[60]],_0x36f2xe[_0xdc7c[27]][_0xdc7c[26]]]})[_0xdc7c[59]]()[_0xdc7c[20]](function(_0x36f2x1e){return _0x36f2xf[_0xdc7c[19]](200)[_0xdc7c[58]](_0x36f2x1e)})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[62]]=function(_0x36f2xe,_0x36f2xf,_0x36f2x10){return ChatWebsitesField[_0xdc7c[49]]({where:_0x36f2xe[_0xdc7c[27]][_0xdc7c[60]]===_0xdc7c[63]?{OnlineId:_0x36f2xe[_0xdc7c[27]][_0xdc7c[26]]}:{OfflineId:_0x36f2xe[_0xdc7c[27]][_0xdc7c[26]]}})[_0xdc7c[20]](function(){_[_0xdc7c[47]](_0x36f2xe[_0xdc7c[41]],function(_0x36f2x20){if(_0x36f2xe[_0xdc7c[27]][_0xdc7c[60]]===_0xdc7c[63]){_0x36f2x20[_0xdc7c[64]]=_0x36f2xe[_0xdc7c[27]][_0xdc7c[26]]}else {if(_0x36f2xe[_0xdc7c[27]][_0xdc7c[60]]===_0xdc7c[65]){_0x36f2x20[_0xdc7c[66]]=_0x36f2xe[_0xdc7c[27]][_0xdc7c[26]]}}});return ChatWebsitesField[_0xdc7c[48]](_0x36f2xe[_0xdc7c[41]])})[_0xdc7c[20]](function(_0x36f2x1f){_0x36f2xf[_0xdc7c[19]](201)[_0xdc7c[58]](_0x36f2x1f)})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[67]]=function(_0x36f2xe,_0x36f2xf){return ChatProactiveAction[_0xdc7c[49]]({where:{id:_0x36f2xe[_0xdc7c[21]][_0xdc7c[54]]},individualHooks:true})[_0xdc7c[20]](function(){return _0x36f2xf[_0xdc7c[25]](204)})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[68]]=function(_0x36f2xe,_0x36f2xf,_0x36f2x10){return ChatProactiveAction[_0xdc7c[28]](_0x36f2xe[_0xdc7c[27]][_0xdc7c[69]])[_0xdc7c[20]](function(_0x36f2x21){if(!_0x36f2x21){return _0x36f2xf[_0xdc7c[25]](404)};return _0x36f2x21[_0xdc7c[49]]()})[_0xdc7c[20]](function(){return _0x36f2xf[_0xdc7c[25]](204)})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[70]]=function(_0x36f2xe,_0x36f2xf,_0x36f2x10){return ChatWebsite[_0xdc7c[28]](_0x36f2xe[_0xdc7c[27]][_0xdc7c[26]])[_0xdc7c[20]](function(_0x36f2x15){if(!_0x36f2x15){return _0x36f2xf[_0xdc7c[25]](404)};_0x36f2xe[_0xdc7c[41]][_0xdc7c[71]]=_0x36f2x15[_0xdc7c[26]];return ChatProactiveAction[_0xdc7c[40]](_0x36f2xe[_0xdc7c[41]])})[_0xdc7c[20]](function(_0x36f2x21){return _0x36f2xf[_0xdc7c[19]](201)[_0xdc7c[18]](_0x36f2x21)})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};exports[_0xdc7c[72]]=function(_0x36f2xe,_0x36f2xf){if(_0x36f2xe[_0xdc7c[41]][_0xdc7c[26]]){delete _0x36f2xe[_0xdc7c[41]][_0xdc7c[26]]};return ChatProactiveAction[_0xdc7c[28]](_0x36f2xe[_0xdc7c[27]][_0xdc7c[69]])[_0xdc7c[20]](function(_0x36f2x21){if(!_0x36f2x21){return _0x36f2xf[_0xdc7c[25]](404)};return _0x36f2x21[_0xdc7c[42]](_0x36f2xe[_0xdc7c[41]])[_0xdc7c[20]](function(_0x36f2x21){console[_0xdc7c[30]](_0x36f2x21);return _0x36f2xf[_0xdc7c[19]](200)[_0xdc7c[18]](_0x36f2x21)})})[_0xdc7c[17]](function(_0x36f2x11){return handleError(_0x36f2xf,_0x36f2x11)})};function handleError(_0x36f2xf,_0x36f2x11){return _0x36f2xf[_0xdc7c[19]](500)[_0xdc7c[18]](_0x36f2x11)} \ No newline at end of file diff --git a/server/api/chat_website/chat_website.socket.js b/server/api/chat_website/chat_website.socket.js index 49f62d6..09c2004 100644 --- a/server/api/chat_website/chat_website.socket.js +++ b/server/api/chat_website/chat_website.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xdf88=["\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"];_0xdf88[0];var chat_website=require(_0xdf88[2])[_0xdf88[1]];exports[_0xdf88[3]]=function(_0x90ccx2){chat_website[_0xdf88[4]](function(_0x90ccx3){onSave(_0x90ccx2,_0x90ccx3)});chat_website[_0xdf88[5]](function(_0x90ccx3){onRemove(_0x90ccx2,_0x90ccx3)})};function onSave(_0x90ccx2,_0x90ccx3,_0x90ccx5){_0x90ccx2[_0xdf88[7]](_0xdf88[6],_0x90ccx3)}function onRemove(_0x90ccx2,_0x90ccx3,_0x90ccx5){_0x90ccx2[_0xdf88[7]](_0xdf88[8],_0x90ccx3)} \ No newline at end of file diff --git a/server/api/chat_website/index.js b/server/api/chat_website/index.js index b7d89c0..90ec070 100644 --- a/server/api/chat_website/index.js +++ b/server/api/chat_website/index.js @@ -1,29 +1 @@ -'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; +var _0x6aea=["\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"];_0x6aea[0];var express=require(_0x6aea[1]);var controller=require(_0x6aea[2]);var auth=require(_0x6aea[3]);var license=require(_0x6aea[4]);var router=express.Router();router[_0x6aea[8]](_0x6aea[5],auth[_0x6aea[6]](),controller[_0x6aea[7]]);router[_0x6aea[8]](_0x6aea[9],auth[_0x6aea[6]](),controller[_0x6aea[10]]);router[_0x6aea[8]](_0x6aea[11],auth[_0x6aea[6]](),controller[_0x6aea[12]]);router[_0x6aea[8]](_0x6aea[13],auth[_0x6aea[6]](),controller[_0x6aea[14]]);router[_0x6aea[8]](_0x6aea[15],auth[_0x6aea[6]](),controller[_0x6aea[16]]);router[_0x6aea[8]](_0x6aea[17],auth[_0x6aea[6]](),controller[_0x6aea[18]]);router[_0x6aea[20]](_0x6aea[5],auth[_0x6aea[6]](),controller[_0x6aea[19]]);router[_0x6aea[20]](_0x6aea[13],auth[_0x6aea[6]](),controller[_0x6aea[21]]);router[_0x6aea[23]](_0x6aea[9],auth[_0x6aea[6]](),controller[_0x6aea[22]]);router[_0x6aea[23]](_0x6aea[11],auth[_0x6aea[6]](),controller[_0x6aea[24]]);router[_0x6aea[23]](_0x6aea[25],auth[_0x6aea[6]](),controller[_0x6aea[26]]);router[_0x6aea[23]](_0x6aea[15],auth[_0x6aea[6]](),controller[_0x6aea[27]]);router[_0x6aea[28]](_0x6aea[9],auth[_0x6aea[6]](),controller[_0x6aea[22]]);router[_0x6aea[30]](_0x6aea[5],auth[_0x6aea[6]](),controller[_0x6aea[29]]);router[_0x6aea[30]](_0x6aea[9],auth[_0x6aea[6]](),controller[_0x6aea[31]]);router[_0x6aea[30]](_0x6aea[11],auth[_0x6aea[6]](),controller[_0x6aea[32]]);router[_0x6aea[30]](_0x6aea[13],auth[_0x6aea[6]](),controller[_0x6aea[33]]);router[_0x6aea[30]](_0x6aea[34],auth[_0x6aea[6]](),controller[_0x6aea[35]]);router[_0x6aea[30]](_0x6aea[25],auth[_0x6aea[6]](),controller[_0x6aea[36]]);module[_0x6aea[37]]=router \ No newline at end of file diff --git a/server/api/chat_websites_field/chat_websites_field.controller.js b/server/api/chat_websites_field/chat_websites_field.controller.js index 78c9c47..3a51f0a 100644 --- a/server/api/chat_websites_field/chat_websites_field.controller.js +++ b/server/api/chat_websites_field/chat_websites_field.controller.js @@ -1,112 +1 @@ -/** - * 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)); -} +var _0x1037=["\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"];_0x1037[0];var _=require(_0x1037[1]);var Util=require(_0x1037[2]);var ChatWebsitesField=require(_0x1037[4])[_0x1037[3]];function handleError(_0x4cebx5,_0x4cebx6){_0x4cebx6=_0x4cebx6||500;return function(_0x4cebx7){_0x4cebx5[_0x1037[6]](_0x4cebx6)[_0x1037[5]](_0x4cebx7)}}function responseWithResult(_0x4cebx5,_0x4cebx6){_0x4cebx6=_0x4cebx6||200;return function(_0x4cebx9){if(_0x4cebx9){_0x4cebx5[_0x1037[6]](_0x4cebx6)[_0x1037[7]](_0x4cebx9)}}}function responseWithoutResult(_0x4cebx5,_0x4cebx6){_0x4cebx6=_0x4cebx6||204;return function(){_0x4cebx5[_0x1037[8]](_0x4cebx6)}}function handleEntityNotFound(_0x4cebx5){return function(_0x4cebx9){if(!_0x4cebx9){_0x4cebx5[_0x1037[6]](404)[_0x1037[9]]();return null};return _0x4cebx9}}function saveUpdates(_0x4cebxd){return function(_0x4cebx9){return _0x4cebx9[_0x1037[11]](_0x4cebxd)[_0x1037[10]](function(_0x4cebxe){return _0x4cebxe})}}function removeEntity(_0x4cebx5){return function(_0x4cebx9){if(_0x4cebx9){return _0x4cebx9[_0x1037[12]]()[_0x1037[10]](function(){_0x4cebx5[_0x1037[6]](204)[_0x1037[9]]()})}}}exports[_0x1037[13]]=function(_0x4cebx10,_0x4cebx5){return ChatWebsitesField[_0x1037[17]](Util[_0x1037[16]](_0x4cebx10[_0x1037[15]]))[_0x1037[10]](responseWithResult(_0x4cebx5))[_0x1037[14]](handleError(_0x4cebx5))};exports[_0x1037[18]]=function(_0x4cebx10,_0x4cebx5){return ChatWebsitesField[_0x1037[21]](_0x4cebx10[_0x1037[20]][_0x1037[19]])[_0x1037[10]](handleEntityNotFound(_0x4cebx5))[_0x1037[10]](responseWithResult(_0x4cebx5))[_0x1037[14]](handleError(_0x4cebx5))};exports[_0x1037[22]]=function(_0x4cebx10,_0x4cebx5){return ChatWebsitesField[_0x1037[22]](_0x4cebx10[_0x1037[23]])[_0x1037[10]](responseWithResult(_0x4cebx5,201))[_0x1037[14]](handleError(_0x4cebx5))};exports[_0x1037[24]]=function(_0x4cebx10,_0x4cebx5){if(_0x4cebx10[_0x1037[23]][_0x1037[19]]){delete _0x4cebx10[_0x1037[23]][_0x1037[19]]};return ChatWebsitesField[_0x1037[21]](_0x4cebx10[_0x1037[20]][_0x1037[19]])[_0x1037[10]](handleEntityNotFound(_0x4cebx5))[_0x1037[10]](saveUpdates(_0x4cebx10[_0x1037[23]]))[_0x1037[10]](responseWithResult(_0x4cebx5))[_0x1037[14]](handleError(_0x4cebx5))};exports[_0x1037[12]]=function(_0x4cebx10,_0x4cebx5){return ChatWebsitesField[_0x1037[21]](_0x4cebx10[_0x1037[20]][_0x1037[19]])[_0x1037[10]](handleEntityNotFound(_0x4cebx5))[_0x1037[10]](removeEntity(_0x4cebx5))[_0x1037[14]](handleError(_0x4cebx5))} \ No newline at end of file diff --git a/server/api/chat_websites_field/chat_websites_field.socket.js b/server/api/chat_websites_field/chat_websites_field.socket.js index e6f0f21..4f8e3e3 100644 --- a/server/api/chat_websites_field/chat_websites_field.socket.js +++ b/server/api/chat_websites_field/chat_websites_field.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xd96e=["\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"];_0xd96e[0];var ChatWebsitesField=require(_0xd96e[2])[_0xd96e[1]];exports[_0xd96e[3]]=function(_0x445fx2){ChatWebsitesField[_0xd96e[4]](function(_0x445fx3){onSave(_0x445fx2,_0x445fx3)});ChatWebsitesField[_0xd96e[5]](function(_0x445fx3){onRemove(_0x445fx2,_0x445fx3)})};function onSave(_0x445fx2,_0x445fx3,_0x445fx5){_0x445fx2[_0xd96e[7]](_0xd96e[6],_0x445fx3)}function onRemove(_0x445fx2,_0x445fx3,_0x445fx5){_0x445fx2[_0xd96e[7]](_0xd96e[8],_0x445fx3)} \ No newline at end of file diff --git a/server/api/chat_websites_field/index.js b/server/api/chat_websites_field/index.js index dccf6d7..a35caaa 100644 --- a/server/api/chat_websites_field/index.js +++ b/server/api/chat_websites_field/index.js @@ -1,16 +1 @@ -'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; +var _0xf063=["\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"];_0xf063[0];var express=require(_0xf063[1]);var auth=require(_0xf063[2]);var controller=require(_0xf063[3]);var router=express.Router();router[_0xf063[7]](_0xf063[4],auth[_0xf063[5]](),controller[_0xf063[6]]);router[_0xf063[7]](_0xf063[8],auth[_0xf063[5]](),controller[_0xf063[9]]);router[_0xf063[11]](_0xf063[4],auth[_0xf063[5]](),controller[_0xf063[10]]);router[_0xf063[13]](_0xf063[8],auth[_0xf063[5]](),controller[_0xf063[12]]);router[_0xf063[14]](_0xf063[8],auth[_0xf063[5]](),controller[_0xf063[12]]);router[_0xf063[16]](_0xf063[8],auth[_0xf063[5]](),controller[_0xf063[15]]);module[_0xf063[17]]=router \ No newline at end of file diff --git a/server/api/chat_websites_field/index.spec.js b/server/api/chat_websites_field/index.spec.js index c50e6e0..af8ac3f 100644 --- a/server/api/chat_websites_field/index.spec.js +++ b/server/api/chat_websites_field/index.spec.js @@ -1,97 +1 @@ -'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; - }); - - }); - -}); +var _0x2553=["\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"];_0x2553[0];var proxyquire=require(_0x2553[2])[_0x2553[1]]();var chatWebsitesFieldCtrlStub={index:_0x2553[3],show:_0x2553[4],create:_0x2553[5],update:_0x2553[6],destroy:_0x2553[7]};var routerStub={get:sinon[_0x2553[8]](),put:sinon[_0x2553[8]](),patch:sinon[_0x2553[8]](),post:sinon[_0x2553[8]](),delete:sinon[_0x2553[8]]()};var chatWebsitesFieldIndex=proxyquire(_0x2553[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(_0x2553[10],function(){it(_0x2553[11],function(){expect(chatWebsitesFieldIndex)[_0x2553[13]][_0x2553[12]](routerStub)});describe(_0x2553[14],function(){it(_0x2553[15],function(){expect(routerStub[_0x2553[21]][_0x2553[20]](_0x2553[19],_0x2553[3]))[_0x2553[13]][_0x2553[18]][_0x2553[17]][_0x2553[16]]})});describe(_0x2553[22],function(){it(_0x2553[23],function(){expect(routerStub[_0x2553[21]][_0x2553[20]](_0x2553[24],_0x2553[4]))[_0x2553[13]][_0x2553[18]][_0x2553[17]][_0x2553[16]]})});describe(_0x2553[25],function(){it(_0x2553[26],function(){expect(routerStub[_0x2553[27]][_0x2553[20]](_0x2553[19],_0x2553[5]))[_0x2553[13]][_0x2553[18]][_0x2553[17]][_0x2553[16]]})});describe(_0x2553[28],function(){it(_0x2553[29],function(){expect(routerStub[_0x2553[30]][_0x2553[20]](_0x2553[24],_0x2553[6]))[_0x2553[13]][_0x2553[18]][_0x2553[17]][_0x2553[16]]})});describe(_0x2553[31],function(){it(_0x2553[29],function(){expect(routerStub[_0x2553[32]][_0x2553[20]](_0x2553[24],_0x2553[6]))[_0x2553[13]][_0x2553[18]][_0x2553[17]][_0x2553[16]]})});describe(_0x2553[33],function(){it(_0x2553[34],function(){expect(routerStub[_0x2553[35]][_0x2553[20]](_0x2553[24],_0x2553[7]))[_0x2553[13]][_0x2553[18]][_0x2553[17]][_0x2553[16]]})})}) \ No newline at end of file diff --git a/server/api/company/company.controller.js b/server/api/company/company.controller.js index 3229f81..f90db75 100644 --- a/server/api/company/company.controller.js +++ b/server/api/company/company.controller.js @@ -1,156 +1 @@ -'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); -} +var _0x1af7=["\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"];_0x1af7[0];var _=require(_0x1af7[1]);var Company=require(_0x1af7[3])[_0x1af7[2]];var util=require(_0x1af7[4]);var Util=require(_0x1af7[5]);exports[_0x1af7[6]]=function(_0xbec1x5,_0xbec1x6,_0xbec1x7){return Company[_0x1af7[13]](Util[_0x1af7[12]](_0xbec1x5[_0x1af7[11]]))[_0x1af7[10]](function(_0xbec1x9){_0xbec1x6[_0x1af7[9]](200)[_0x1af7[8]](_0xbec1x9)})[_0x1af7[7]](function(_0xbec1x8){return handleError(_0xbec1x6,_0xbec1x8)})};exports[_0x1af7[14]]=function(_0xbec1x5,_0xbec1x6){console[_0x1af7[16]](_0xbec1x5[_0x1af7[15]]);Company[_0x1af7[19]]({where:{name:_0xbec1x5[_0x1af7[15]][_0x1af7[18]]}})[_0x1af7[10]](function(_0xbec1xa){if(!_0xbec1xa){return _0xbec1x6[_0x1af7[17]](404)};return _0xbec1x6[_0x1af7[8]](_0xbec1xa)})[_0x1af7[7]](function(_0xbec1x8){return handleError(_0xbec1x6,_0xbec1x8)})};exports[_0x1af7[20]]=function(_0xbec1x5,_0xbec1x6){Company[_0x1af7[23]](_0xbec1x5[_0x1af7[22]][_0x1af7[21]])[_0x1af7[10]](function(_0xbec1xb){if(!_0xbec1xb){return _0xbec1x6[_0x1af7[17]](404)};return _0xbec1x6[_0x1af7[8]](_0xbec1xb)})[_0x1af7[7]](function(_0xbec1x8){return handleError(_0xbec1x6,_0xbec1x8)})};exports[_0x1af7[24]]=function(_0xbec1x5,_0xbec1x6){Company[_0x1af7[24]](_0xbec1x5[_0x1af7[15]])[_0x1af7[10]](function(_0xbec1xb){return _0xbec1x6[_0x1af7[9]](201)[_0x1af7[8]](_0xbec1xb)})[_0x1af7[7]](function(_0xbec1x8){return handleError(_0xbec1x6,_0xbec1x8)})};exports[_0x1af7[25]]=function(_0xbec1x5,_0xbec1x6){Company[_0x1af7[19]]({where:{name:_0xbec1x5[_0x1af7[15]][_0x1af7[18]],id:{$ne:_0xbec1x5[_0x1af7[15]][_0x1af7[21]]}}})[_0x1af7[10]](function(_0xbec1xa){if(!_0xbec1xa){return _0xbec1x6[_0x1af7[17]](404)};if(_0xbec1xa[_0x1af7[26]]>0){return _0xbec1x6[_0x1af7[9]](500)[_0x1af7[8]]({message:_0x1af7[27]})};if(_0xbec1x5[_0x1af7[15]][_0x1af7[21]]){delete _0xbec1x5[_0x1af7[15]][_0x1af7[21]]};Company[_0x1af7[30]]({where:{id:_0xbec1x5[_0x1af7[22]][_0x1af7[21]]}})[_0x1af7[10]](function(_0xbec1xb){if(!_0xbec1xb){return _0xbec1x6[_0x1af7[17]](404)};var _0xbec1xc=_[_0x1af7[28]](_0xbec1xb,_0xbec1x5[_0x1af7[15]]);_0xbec1xc[_0x1af7[29]]()[_0x1af7[10]](function(){return _0xbec1x6[_0x1af7[9]](200)[_0x1af7[8]](_0xbec1xb)})[_0x1af7[7]](function(_0xbec1x8){return handleError(_0xbec1x6,_0xbec1x8)})})[_0x1af7[7]](function(_0xbec1x8){return handleError(_0xbec1x6,_0xbec1x8)})})[_0x1af7[7]](function(_0xbec1x8){return handleError(_0xbec1x6,_0xbec1x8)})};exports[_0x1af7[31]]=function(_0xbec1x5,_0xbec1x6){Company[_0x1af7[23]](_0xbec1x5[_0x1af7[22]][_0x1af7[21]])[_0x1af7[10]](function(_0xbec1xb){if(!_0xbec1xb){return _0xbec1x6[_0x1af7[17]](404)};_0xbec1xb[_0x1af7[31]]()[_0x1af7[10]](function(){return _0xbec1x6[_0x1af7[17]](204)})[_0x1af7[7]](function(_0xbec1x8){return handleError(_0xbec1x6,_0xbec1x8)})})[_0x1af7[7]](function(_0xbec1x8){return handleError(_0xbec1x6,_0xbec1x8)})};exports[_0x1af7[32]]=function(_0xbec1x5,_0xbec1x6){Company[_0x1af7[31]]({where:{id:_0xbec1x5[_0x1af7[11]][_0x1af7[21]]},individualHooks:true})[_0x1af7[10]](function(){return _0xbec1x6[_0x1af7[17]](204)})[_0x1af7[7]](function(_0xbec1x8){return handleError(_0xbec1x6,_0xbec1x8)})};function handleError(_0xbec1x6,_0xbec1x8){return _0xbec1x6[_0x1af7[9]](500)[_0x1af7[8]](_0xbec1x8)} \ No newline at end of file diff --git a/server/api/company/company.socket.js b/server/api/company/company.socket.js index 850be4a..bdae6c5 100644 --- a/server/api/company/company.socket.js +++ b/server/api/company/company.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x4695=["\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"];_0x4695[0];var Company=require(_0x4695[2])[_0x4695[1]];exports[_0x4695[3]]=function(_0xd4fcx2){Company[_0x4695[4]](function(_0xd4fcx3){onSave(_0xd4fcx2,_0xd4fcx3)});Company[_0x4695[5]](function(_0xd4fcx3){onRemove(_0xd4fcx2,_0xd4fcx3)})};function onSave(_0xd4fcx2,_0xd4fcx3,_0xd4fcx5){_0xd4fcx2[_0x4695[7]](_0x4695[6],_0xd4fcx3)}function onRemove(_0xd4fcx2,_0xd4fcx3,_0xd4fcx5){_0xd4fcx2[_0x4695[7]](_0x4695[8],_0xd4fcx3)} \ No newline at end of file diff --git a/server/api/company/company.spec.js b/server/api/company/company.spec.js index 37c8889..844a1c2 100644 --- a/server/api/company/company.spec.js +++ b/server/api/company/company.spec.js @@ -1,20 +1 @@ -'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(); - }); - }); -}); +var _0xd39f=["\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"];_0xd39f[0];var should=require(_0xd39f[1]);var app=require(_0xd39f[2]);var request=require(_0xd39f[3]);describe(_0xd39f[4],function(){it(_0xd39f[5],function(_0x6c27x4){request(app)[_0xd39f[13]](_0xd39f[12])[_0xd39f[11]](200)[_0xd39f[11]](_0xd39f[10],/json/)[_0xd39f[9]](function(_0x6c27x5,_0x6c27x6){if(_0x6c27x5){return _0x6c27x4(_0x6c27x5)};_0x6c27x6[_0xd39f[8]][_0xd39f[1]][_0xd39f[7]][_0xd39f[6]](Array);_0x6c27x4()})})}) \ No newline at end of file diff --git a/server/api/company/index.js b/server/api/company/index.js index 734f562..5ef1e3f 100644 --- a/server/api/company/index.js +++ b/server/api/company/index.js @@ -1,18 +1 @@ -'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; +var _0x2159=["\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"];_0x2159[0];var express=require(_0x2159[1]);var controller=require(_0x2159[2]);var auth=require(_0x2159[3]);var router=express.Router();router[_0x2159[7]](_0x2159[4],auth[_0x2159[5]](),controller[_0x2159[6]]);router[_0x2159[7]](_0x2159[8],auth[_0x2159[5]](),controller[_0x2159[9]]);router[_0x2159[11]](_0x2159[4],auth[_0x2159[5]](),controller[_0x2159[10]]);router[_0x2159[11]](_0x2159[12],auth[_0x2159[5]](),controller[_0x2159[13]]);router[_0x2159[15]](_0x2159[8],auth[_0x2159[5]](),controller[_0x2159[14]]);router[_0x2159[16]](_0x2159[8],auth[_0x2159[5]](),controller[_0x2159[14]]);router[_0x2159[18]](_0x2159[4],auth[_0x2159[5]](),controller[_0x2159[17]]);router[_0x2159[18]](_0x2159[8],auth[_0x2159[5]](),controller[_0x2159[19]]);module[_0x2159[20]]=router \ No newline at end of file diff --git a/server/api/contact_manager/contact_manager.controller.js b/server/api/contact_manager/contact_manager.controller.js index 2638fb5..ea2c4cd 100644 --- a/server/api/contact_manager/contact_manager.controller.js +++ b/server/api/contact_manager/contact_manager.controller.js @@ -1,341 +1 @@ -'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 List = require('../../models').List; -var ReportCallHistory = require('../../models').history.ReportCallHistory; -var ReportMailSession = require('../../models').ReportMailSession; -var ReportMailRoom = require('../../models').ReportMailRoom; -var ReportMailRoomHistory = require('../../models').history.ReportMailRoomHistory; -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('list') - .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': - Api = (req.query.logType === 'history') ? ReportMailRoomHistory : ReportMailRoom; - where.from = contact.email; - break; - 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) { - var _contact; - return Contact - .scope('list', 'user') - .findById(req.params.id) - .then(function(managed_contact) { - if (!managed_contact) { - return res.sendStatus(404); - } - _contact = managed_contact.dataValues; - return CustomField - .findAll({ - where: { - ListId: _contact.ListId - } - }); - }) - .then(function(customFields) { - if (customFields.length) { - var cfs = _.map(customFields, 'name').join(','); - return sequelize.query(util.format('SELECT %s FROM cm_contacts WHERE id=%s', cfs, req.params.id), { - type: sequelize.QueryTypes.SELECT - }); - } - }) - .then(function(cfValues) { - if (cfValues) { - _.merge(_contact, cfValues[0]); - } - }) - .then(function() { - return res.status(200).send(_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: List, - where: { - id: _.map(_.map(req.user.Lists, '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) { - var _contact; - 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) { - _contact = contact; - - return CustomField - .findAll({ - where: { - ListId: _contact.ListId - } - }); - }) - .then(function(customFields) { - if (customFields.length) { - var cfs = []; - customFields.forEach(function(elem) { - if (req.body.hasOwnProperty(elem.name)) { - cfs.push(util.format('%s=\'%s\'', elem.name, req.body[elem.name])); - } - }); - if (cfs.length) { - cfs = cfs.join(','); - return sequelize.query(util.format('UPDATE cm_contacts SET %s WHERE id=%s', cfs, _contact.id)); - } - } - }) - .then(function() { - 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) { - var _contact; - 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; - }) - .then(function() { - return Contact.findById(req.params.id); - }) - .then(function(contact) { - delete req.body.id; - return contact.updateAttributes(req.body) - }) - .then(function(contact) { - _contact = contact; - - return CustomField - .findAll({ - where: { - ListId: _contact.ListId - } - }); - }) - .then(function(customFields) { - if (customFields.length) { - var cfs = []; - customFields.forEach(function(elem) { - if (req.body.hasOwnProperty(elem.name)) { - cfs.push(util.format('%s=\'%s\'', elem.name, req.body[elem.name])); - } - }); - if (cfs.length) { - cfs = cfs.join(','); - return sequelize.query(util.format('UPDATE cm_contacts SET %s WHERE id=%s', cfs, _contact.id)); - } - } - }) - .then(function() { - 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.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); -} +var _0xe047=["\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\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","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x4C\x69\x73\x74","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x48\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\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x48\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","\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","\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","\x6C\x69\x73\x74","\x73\x63\x6F\x70\x65","\x67\x65\x74\x4C\x6F\x67","\x64\x65\x74\x61\x69\x6C","\x67\x65\x6E\x65\x72\x61\x6C","\x73\x68\x6F\x77","\x70\x68\x6F\x6E\x65","\x6C\x6F\x67\x54\x79\x70\x65","\x6A\x6F\x75\x72\x6E\x61\x6C","\x74\x79\x70\x65","\x69\x6E\x62\x6F\x75\x6E\x64","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x6D\x6F\x62\x69\x6C\x65","\x73\x6F\x75\x72\x63\x65","\x66\x72\x6F\x6D","\x65\x6D\x61\x69\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x71\x75\x65\x75\x65","\x6D\x65\x72\x67\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6C\x65\x6E\x67\x74\x68","\x2C","\x6A\x6F\x69\x6E","\x6E\x61\x6D\x65","\x6D\x61\x70","\x53\x45\x4C\x45\x43\x54\x20\x25\x73\x20\x46\x52\x4F\x4D\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3D\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x4C\x69\x73\x74\x49\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x73\x65\x72","\x67\x65\x74\x45\x76\x65\x6E\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x76\x6F\x69\x63\x65","\x6D\x61\x69\x6C","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x63\x72\x65\x61\x74\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x62\x6F\x64\x79","\x25\x73\x3D\x27\x25\x73\x27","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x55\x50\x44\x41\x54\x45\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x53\x45\x54\x20\x25\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3D\x25\x73","\x55\x73\x65\x72\x49\x64","\x61\x6C\x6C","\x74\x61\x67\x73","\x73\x70\x6C\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65\x73","\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","\x69\x64\x73"];_0xe047[0];var _=require(_0xe047[1]);var Contact=require(_0xe047[3])[_0xe047[2]];var ContactPhone=require(_0xe047[3])[_0xe047[4]];var ContactEmail=require(_0xe047[3])[_0xe047[5]];var CustomField=require(_0xe047[3])[_0xe047[6]];var ReportCall=require(_0xe047[3])[_0xe047[7]];var ReportQueue=require(_0xe047[3])[_0xe047[8]];var ReportQueueHistory=require(_0xe047[3])[_0xe047[10]][_0xe047[9]];var ReportIntegration=require(_0xe047[3])[_0xe047[11]];var List=require(_0xe047[3])[_0xe047[12]];var ReportCallHistory=require(_0xe047[3])[_0xe047[10]][_0xe047[13]];var ReportMailSession=require(_0xe047[3])[_0xe047[14]];var ReportMailRoom=require(_0xe047[3])[_0xe047[15]];var ReportMailRoomHistory=require(_0xe047[3])[_0xe047[10]][_0xe047[16]];var ReportMailSessionHistory=require(_0xe047[3])[_0xe047[10]][_0xe047[17]];var Tag=require(_0xe047[3])[_0xe047[18]];var stream=require(_0xe047[19]);var sequelize=require(_0xe047[3])[_0xe047[20]];var util=require(_0xe047[21]);var Util=require(_0xe047[22]);exports[_0xe047[23]]=function(_0xc5bdx15,_0xc5bdx16,_0xc5bdx17){return Contact[_0xe047[33]](_0xe047[32])[_0xe047[31]](Util[_0xe047[30]](_0xc5bdx15[_0xe047[29]]))[_0xe047[28]](function(_0xc5bdx19){_0xc5bdx16[_0xe047[27]](200)[_0xe047[26]](_0xc5bdx19)})[_0xe047[25]](function(_0xc5bdx18){console[_0xe047[24]](_0xc5bdx18);return handleError(_0xc5bdx16,_0xc5bdx18)})};exports[_0xe047[34]]=function(_0xc5bdx15,_0xc5bdx16,_0xc5bdx17){_0xc5bdx15[_0xe047[29]][_0xe047[35]]=_0xc5bdx15[_0xe047[29]][_0xe047[35]]||_0xe047[36];_0xc5bdx15[_0xe047[29]][_0xe047[37]]=_0xc5bdx15[_0xe047[29]][_0xe047[37]]||_0xe047[38];_0xc5bdx15[_0xe047[29]][_0xe047[39]]=_0xc5bdx15[_0xe047[29]][_0xe047[39]]||_0xe047[40];_0xc5bdx15[_0xe047[29]][_0xe047[41]]=_0xc5bdx15[_0xe047[29]][_0xe047[41]]||_0xe047[42];var _0xc5bdx1a,_0xc5bdx1b={};return Contact[_0xe047[55]](_0xc5bdx15[_0xe047[54]][_0xe047[53]])[_0xe047[28]](function(_0xc5bdx1c){if(!_0xc5bdx1c){return _0xc5bdx16[_0xe047[43]](404)};switch(_0xc5bdx15[_0xe047[29]][_0xe047[35]]){case _0xe047[36]:switch(_0xc5bdx15[_0xe047[29]][_0xe047[37]]){case _0xe047[38]:_0xc5bdx1a=(_0xc5bdx15[_0xe047[29]][_0xe047[39]]===_0xe047[10])?ReportCallHistory:ReportCall;if(_0xc5bdx15[_0xe047[29]][_0xe047[41]]===_0xe047[44]){_0xc5bdx1b[_0xe047[45]]=[_0xc5bdx1c[_0xe047[38]],_0xc5bdx1c[_0xe047[46]]]}else {_0xc5bdx1b[_0xe047[47]]=[_0xc5bdx1c[_0xe047[38]],_0xc5bdx1c[_0xe047[46]]]};break;case _0xe047[49]:_0xc5bdx1a=(_0xc5bdx15[_0xe047[29]][_0xe047[39]]===_0xe047[10])?ReportMailRoomHistory:ReportMailRoom;_0xc5bdx1b[_0xe047[48]]=_0xc5bdx1c[_0xe047[49]];break;default:_0xc5bdx1a=(_0xc5bdx15[_0xe047[29]][_0xe047[39]]===_0xe047[10])?ReportCallHistory:ReportCall};break;case _0xe047[51]:switch(_0xc5bdx15[_0xe047[29]][_0xe047[37]]){case _0xe047[38]:_0xc5bdx1a=(_0xc5bdx15[_0xe047[29]][_0xe047[39]]===_0xe047[10])?ReportQueueHistory:ReportQueue;_0xc5bdx1b[_0xe047[50]]=[_0xc5bdx1c[_0xe047[38]],_0xc5bdx1c[_0xe047[46]]];break;case _0xe047[49]:return _0xc5bdx16[_0xe047[43]](404);default:_0xc5bdx1a=(_0xc5bdx15[_0xe047[29]][_0xe047[39]]===_0xe047[10])?ReportQueueHistory:ReportQueue};break;default:_0xc5bdx1a=ReportCall;_0xc5bdx15[_0xe047[29]][_0xe047[37]]=_0xe047[38]};delete _0xc5bdx15[_0xe047[29]][_0xe047[35]];delete _0xc5bdx15[_0xe047[29]][_0xe047[37]];delete _0xc5bdx15[_0xe047[29]][_0xe047[39]];delete _0xc5bdx15[_0xe047[29]][_0xe047[41]];return _0xc5bdx1a[_0xe047[31]](_[_0xe047[52]](Util[_0xe047[30]](_0xc5bdx15[_0xe047[29]]),{where:_0xc5bdx1b}))})[_0xe047[28]](function(_0xc5bdx19){_0xc5bdx16[_0xe047[27]](200)[_0xe047[26]](_0xc5bdx19)})[_0xe047[25]](function(_0xc5bdx18){console[_0xe047[24]](_0xc5bdx18);return handleError(_0xc5bdx16,_0xc5bdx18)})};exports[_0xe047[37]]=function(_0xc5bdx15,_0xc5bdx16){var _0xc5bdx1d;return Contact[_0xe047[33]](_0xe047[32],_0xe047[68])[_0xe047[55]](_0xc5bdx15[_0xe047[54]][_0xe047[53]])[_0xe047[28]](function(_0xc5bdx21){if(!_0xc5bdx21){return _0xc5bdx16[_0xe047[43]](404)};_0xc5bdx1d=_0xc5bdx21[_0xe047[65]];return CustomField[_0xe047[67]]({where:{ListId:_0xc5bdx1d[_0xe047[66]]}})})[_0xe047[28]](function(_0xc5bdx1f){if(_0xc5bdx1f[_0xe047[56]]){var _0xc5bdx20=_[_0xe047[60]](_0xc5bdx1f,_0xe047[59])[_0xe047[58]](_0xe047[57]);return sequelize[_0xe047[29]](util[_0xe047[62]](_0xe047[61],_0xc5bdx20,_0xc5bdx15[_0xe047[54]][_0xe047[53]]),{type:sequelize[_0xe047[64]][_0xe047[63]]})}})[_0xe047[28]](function(_0xc5bdx1e){if(_0xc5bdx1e){_[_0xe047[52]](_0xc5bdx1d,_0xc5bdx1e[0])}})[_0xe047[28]](function(){return _0xc5bdx16[_0xe047[27]](200)[_0xe047[26]](_0xc5bdx1d)})[_0xe047[25]](function(_0xc5bdx18){console[_0xe047[24]](_0xc5bdx18);return handleError(_0xc5bdx16,_0xc5bdx18)})};exports[_0xe047[69]]=function(_0xc5bdx15,_0xc5bdx16){return ReportIntegration[_0xe047[55]](_0xc5bdx15[_0xe047[54]][_0xe047[53]])[_0xe047[28]](function(_0xc5bdx23){var _0xc5bdx1b={};switch(_0xc5bdx23[_0xe047[72]]){case _0xe047[70]:_0xc5bdx1b={$or:{phone:_0xc5bdx23[_0xe047[50]],mobile:_0xc5bdx23[_0xe047[50]]}};break;case _0xe047[71]:_0xc5bdx1b={email:_0xc5bdx23[_0xe047[48]]};break;default:_0xc5bdx1b={}};return Contact[_0xe047[67]]({where:_0xc5bdx1b,include:[{model:List,where:{id:_[_0xe047[60]](_[_0xe047[60]](_0xc5bdx15[_0xe047[68]].Lists,_0xe047[65]),_0xe047[53])}}]})})[_0xe047[28]](function(_0xc5bdx22){return _0xc5bdx16[_0xe047[27]](200)[_0xe047[26]](_0xc5bdx22)})[_0xe047[25]](function(_0xc5bdx18){console[_0xe047[24]](_0xc5bdx18);return handleError(_0xc5bdx16,_0xc5bdx18)})};exports[_0xe047[73]]=function(_0xc5bdx15,_0xc5bdx16,_0xc5bdx17){var _0xc5bdx1d;return Tag[_0xe047[67]]()[_0xe047[28]](function(_0xc5bdx25){var _0xc5bdx26=[];var _0xc5bdx27=_[_0xe047[60]](_[_0xe047[60]](_0xc5bdx25,_0xe047[65]),_0xe047[59]);if(_0xc5bdx15[_0xe047[75]][_0xe047[82]]){var _0xc5bdx28=_0xc5bdx15[_0xe047[75]][_0xe047[82]][_0xe047[83]](_0xe047[57]);_0xc5bdx28[_0xe047[78]](function(_0xc5bdx24){if(!_[_0xe047[84]](_0xc5bdx25,_0xc5bdx24)){_0xc5bdx26[_0xe047[77]](Tag[_0xe047[73]]({name:_0xc5bdx24}))}})};return _0xc5bdx26})[_0xe047[81]]()[_0xe047[28]](function(){_0xc5bdx15[_0xe047[75]][_0xe047[80]]=_0xc5bdx15[_0xe047[68]][_0xe047[53]];return Contact[_0xe047[73]](_0xc5bdx15[_0xe047[75]])})[_0xe047[28]](function(_0xc5bdx1c){_0xc5bdx1d=_0xc5bdx1c;return CustomField[_0xe047[67]]({where:{ListId:_0xc5bdx1d[_0xe047[66]]}})})[_0xe047[28]](function(_0xc5bdx1f){if(_0xc5bdx1f[_0xe047[56]]){var _0xc5bdx20=[];_0xc5bdx1f[_0xe047[78]](function(_0xc5bdx24){if(_0xc5bdx15[_0xe047[75]][_0xe047[74]](_0xc5bdx24[_0xe047[59]])){_0xc5bdx20[_0xe047[77]](util[_0xe047[62]](_0xe047[76],_0xc5bdx24[_0xe047[59]],_0xc5bdx15[_0xe047[75]][_0xc5bdx24[_0xe047[59]]]))}});if(_0xc5bdx20[_0xe047[56]]){_0xc5bdx20=_0xc5bdx20[_0xe047[58]](_0xe047[57]);return sequelize[_0xe047[29]](util[_0xe047[62]](_0xe047[79],_0xc5bdx20,_0xc5bdx1d[_0xe047[53]]))}}})[_0xe047[28]](function(){return _0xc5bdx16[_0xe047[27]](201)[_0xe047[26]](_0xc5bdx1d)})[_0xe047[25]](function(_0xc5bdx18){console[_0xe047[24]](_0xc5bdx18);return _0xc5bdx17(_0xc5bdx18)})};exports[_0xe047[85]]=function(_0xc5bdx15,_0xc5bdx16,_0xc5bdx17){var _0xc5bdx1d;return Tag[_0xe047[67]]()[_0xe047[28]](function(_0xc5bdx25){var _0xc5bdx26=[];var _0xc5bdx27=_[_0xe047[60]](_[_0xe047[60]](_0xc5bdx25,_0xe047[65]),_0xe047[59]);if(_0xc5bdx15[_0xe047[75]][_0xe047[82]]){var _0xc5bdx28=_0xc5bdx15[_0xe047[75]][_0xe047[82]][_0xe047[83]](_0xe047[57]);_0xc5bdx28[_0xe047[78]](function(_0xc5bdx24){if(!_[_0xe047[84]](_0xc5bdx25,_0xc5bdx24)){_0xc5bdx26[_0xe047[77]](Tag[_0xe047[73]]({name:_0xc5bdx24}))}})};return _0xc5bdx26})[_0xe047[28]](function(){return Contact[_0xe047[55]](_0xc5bdx15[_0xe047[54]][_0xe047[53]])})[_0xe047[28]](function(_0xc5bdx1c){delete _0xc5bdx15[_0xe047[75]][_0xe047[53]];return _0xc5bdx1c[_0xe047[86]](_0xc5bdx15[_0xe047[75]])})[_0xe047[28]](function(_0xc5bdx1c){_0xc5bdx1d=_0xc5bdx1c;return CustomField[_0xe047[67]]({where:{ListId:_0xc5bdx1d[_0xe047[66]]}})})[_0xe047[28]](function(_0xc5bdx1f){if(_0xc5bdx1f[_0xe047[56]]){var _0xc5bdx20=[];_0xc5bdx1f[_0xe047[78]](function(_0xc5bdx24){if(_0xc5bdx15[_0xe047[75]][_0xe047[74]](_0xc5bdx24[_0xe047[59]])){_0xc5bdx20[_0xe047[77]](util[_0xe047[62]](_0xe047[76],_0xc5bdx24[_0xe047[59]],_0xc5bdx15[_0xe047[75]][_0xc5bdx24[_0xe047[59]]]))}});if(_0xc5bdx20[_0xe047[56]]){_0xc5bdx20=_0xc5bdx20[_0xe047[58]](_0xe047[57]);return sequelize[_0xe047[29]](util[_0xe047[62]](_0xe047[79],_0xc5bdx20,_0xc5bdx1d[_0xe047[53]]))}}})[_0xe047[28]](function(){return _0xc5bdx16[_0xe047[27]](200)[_0xe047[26]](_0xc5bdx1d)})[_0xe047[25]](function(_0xc5bdx18){console[_0xe047[24]](_0xc5bdx18);return handleError(_0xc5bdx16,_0xc5bdx18)})};exports[_0xe047[87]]=function(_0xc5bdx15,_0xc5bdx16){return Contact[_0xe047[55]](_0xc5bdx15[_0xe047[54]][_0xe047[53]])[_0xe047[28]](function(_0xc5bdx21){if(!_0xc5bdx21){return _0xc5bdx16[_0xe047[43]](404)};return _0xc5bdx21[_0xe047[87]]()})[_0xe047[28]](function(){return _0xc5bdx16[_0xe047[43]](204)})[_0xe047[25]](function(_0xc5bdx18){return handleError(_0xc5bdx16,_0xc5bdx18)})};exports[_0xe047[88]]=function(_0xc5bdx15,_0xc5bdx16){return Contact[_0xe047[87]]({where:{id:_0xc5bdx15[_0xe047[29]][_0xe047[89]]},individualHooks:true})[_0xe047[28]](function(){return _0xc5bdx16[_0xe047[43]](204)})[_0xe047[25]](function(_0xc5bdx18){return handleError(_0xc5bdx16,_0xc5bdx18)})};function handleError(_0xc5bdx16,_0xc5bdx18){return _0xc5bdx16[_0xe047[27]](500)[_0xe047[26]](_0xc5bdx18)} \ No newline at end of file diff --git a/server/api/contact_manager/contact_manager.socket.js b/server/api/contact_manager/contact_manager.socket.js index addfca0..366e9da 100644 --- a/server/api/contact_manager/contact_manager.socket.js +++ b/server/api/contact_manager/contact_manager.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x9e1c=["\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"];_0x9e1c[0];var Contact=require(_0x9e1c[2])[_0x9e1c[1]];exports[_0x9e1c[3]]=function(_0xb448x2){Contact[_0x9e1c[4]](function(_0xb448x3){onSave(_0xb448x2,_0xb448x3)});Contact[_0x9e1c[5]](function(_0xb448x3){onRemove(_0xb448x2,_0xb448x3)})};function onSave(_0xb448x2,_0xb448x3,_0xb448x5){_0xb448x2[_0x9e1c[7]](_0x9e1c[6],_0xb448x3)}function onRemove(_0xb448x2,_0xb448x3,_0xb448x5){_0xb448x2[_0x9e1c[7]](_0x9e1c[8],_0xb448x3)} \ No newline at end of file diff --git a/server/api/contact_manager/contact_manager.spec.js b/server/api/contact_manager/contact_manager.spec.js index f212dfb..3e7fc2e 100644 --- a/server/api/contact_manager/contact_manager.spec.js +++ b/server/api/contact_manager/contact_manager.spec.js @@ -1,20 +1 @@ -'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(); - }); - }); -}); +var _0xa15e=["\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"];_0xa15e[0];var should=require(_0xa15e[1]);var app=require(_0xa15e[2]);var request=require(_0xa15e[3]);describe(_0xa15e[4],function(){it(_0xa15e[5],function(_0xb6e1x4){request(app)[_0xa15e[13]](_0xa15e[12])[_0xa15e[11]](200)[_0xa15e[11]](_0xa15e[10],/json/)[_0xa15e[9]](function(_0xb6e1x5,_0xb6e1x6){if(_0xb6e1x5){return _0xb6e1x4(_0xb6e1x5)};_0xb6e1x6[_0xa15e[8]][_0xa15e[1]][_0xa15e[7]][_0xa15e[6]](Array);_0xb6e1x4()})})}) \ No newline at end of file diff --git a/server/api/contact_manager/index.js b/server/api/contact_manager/index.js index ca2bf88..13fcc66 100644 --- a/server/api/contact_manager/index.js +++ b/server/api/contact_manager/index.js @@ -1,19 +1 @@ -'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; +var _0xfe1f=["\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","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67","\x67\x65\x74\x4C\x6F\x67","\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"];_0xfe1f[0];var express=require(_0xfe1f[1]);var controller=require(_0xfe1f[2]);var auth=require(_0xfe1f[3]);var router=express.Router();router[_0xfe1f[7]](_0xfe1f[4],auth[_0xfe1f[5]](),controller[_0xfe1f[6]]);router[_0xfe1f[7]](_0xfe1f[8],auth[_0xfe1f[5]](),controller[_0xfe1f[9]]);router[_0xfe1f[7]](_0xfe1f[10],auth[_0xfe1f[5]](),controller[_0xfe1f[11]]);router[_0xfe1f[7]](_0xfe1f[12],auth[_0xfe1f[5]](),controller[_0xfe1f[13]]);router[_0xfe1f[15]](_0xfe1f[4],auth[_0xfe1f[5]](),controller[_0xfe1f[14]]);router[_0xfe1f[17]](_0xfe1f[10],auth[_0xfe1f[5]](),controller[_0xfe1f[16]]);router[_0xfe1f[18]](_0xfe1f[10],auth[_0xfe1f[5]](),controller[_0xfe1f[16]]);router[_0xfe1f[20]](_0xfe1f[4],auth[_0xfe1f[5]](),controller[_0xfe1f[19]]);router[_0xfe1f[20]](_0xfe1f[10],auth[_0xfe1f[5]](),controller[_0xfe1f[21]]);module[_0xfe1f[22]]=router \ No newline at end of file diff --git a/server/api/custom_report/custom_report.controller.js b/server/api/custom_report/custom_report.controller.js index 12e3404..0a5ff3e 100644 --- a/server/api/custom_report/custom_report.controller.js +++ b/server/api/custom_report/custom_report.controller.js @@ -1,326 +1 @@ -'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); -} +var _0x711c=["\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"];_0x711c[0];var _=require(_0x711c[1]);var util=require(_0x711c[2]);var sequelize=require(_0x711c[4])[_0x711c[3]];var CustomReport=require(_0x711c[4])[_0x711c[5]];var ReportField=require(_0x711c[4])[_0x711c[6]];var Metric=require(_0x711c[4])[_0x711c[7]];var ExtractedReport=require(_0x711c[4])[_0x711c[8]];var extractUtils=require(_0x711c[9]);var reportBuildUtils=require(_0x711c[10]);var Util=require(_0x711c[11]);exports[_0x711c[12]]=function(_0x8a42xb,_0x8a42xc,_0x8a42xd){return CustomReport[_0x711c[21]](Util[_0x711c[20]](_[_0x711c[19]](_0x8a42xb[_0x711c[17]],_0x8a42xb[_0x711c[18]])))[_0x711c[16]](function(_0x8a42xf){_0x8a42xc[_0x711c[15]](200)[_0x711c[14]](_0x8a42xf)})[_0x711c[13]](function(_0x8a42xe){return handleError(_0x8a42xc,_0x8a42xe)})};exports[_0x711c[22]]=function(_0x8a42xb,_0x8a42xc){var _0x8a42x10;return CustomReport[_0x711c[39]](_0x711c[38])[_0x711c[37]](_0x8a42xb[_0x711c[18]][_0x711c[36]])[_0x711c[16]](function(_0x8a42x12){console[_0x711c[23]](_0x711c[30]);if(!_0x8a42x12){return _0x8a42xc[_0x711c[31]](404)};var _0x8a42x13=reportBuildUtils[_0x711c[33]](_0x8a42x12[_0x711c[32]],_0x8a42xb[_0x711c[17]]);return sequelize[_0x711c[17]](_0x8a42x13,{type:sequelize[_0x711c[35]][_0x711c[34]]})})[_0x711c[16]](function(_0x8a42x11){_0x8a42x10=_0x8a42x11[_0x711c[24]];if(_0x8a42xb[_0x711c[17]][_0x711c[25]]){_0x8a42x11=_(_0x8a42x11)[_0x711c[29]](_0x8a42xb[_0x711c[17]][_0x711c[28]]||0)[_0x711c[27]](_0x8a42xb[_0x711c[17]][_0x711c[25]])[_0x711c[26]]()};_0x8a42xc[_0x711c[15]](200)[_0x711c[14]]({rows:_0x8a42x11,count:_0x8a42x10})})[_0x711c[13]](function(_0x8a42xe){console[_0x711c[23]](_0x8a42xe);return handleError(_0x8a42xc,_0x8a42xe)})};exports[_0x711c[40]]=function(_0x8a42xb,_0x8a42xc){docExtract(_0x8a42xb,_0x8a42xc,_0x711c[41])};exports[_0x711c[42]]=function(_0x8a42xb,_0x8a42xc){docExtract(_0x8a42xb,_0x8a42xc,_0x711c[43])};function docExtract(_0x8a42xb,_0x8a42xc,_0x8a42x15){CustomReport[_0x711c[39]](_0x711c[38])[_0x711c[37]](_0x8a42xb[_0x711c[18]][_0x711c[36]])[_0x711c[16]](function(_0x8a42x12){if(!_0x8a42x12){return _0x8a42xc[_0x711c[31]](404)};return [_0x8a42x12,ExtractedReport[_0x711c[49]]({name:_0x8a42x12[_0x711c[46]],startDate:_0x8a42xb[_0x711c[17]][_0x711c[47]]||null,endDate:_0x8a42xb[_0x711c[17]][_0x711c[48]]||null,output:_0x8a42x15})]})[_0x711c[45]](function(_0x8a42x12,_0x8a42x16){extractUtils[_0x711c[44]+_0x8a42x15](_0x8a42x12,_0x8a42xb[_0x711c[17]],_0x8a42x16[_0x711c[36]])})[_0x711c[13]](function(_0x8a42xe){console[_0x711c[23]](_0x8a42xe);return handleError(_0x8a42xc,_0x8a42xe)});return _0x8a42xc[_0x711c[31]](200)}exports[_0x711c[50]]=function(_0x8a42xb,_0x8a42xc){return CustomReport[_0x711c[39]](_0x711c[38])[_0x711c[37]](_0x8a42xb[_0x711c[18]][_0x711c[36]])[_0x711c[16]](function(_0x8a42x12){if(!_0x8a42x12){return _0x8a42xc[_0x711c[31]](404)};return _0x8a42xc[_0x711c[14]](_0x8a42x12)})[_0x711c[13]](function(_0x8a42xe){return handleError(_0x8a42xc,_0x8a42xe)})};exports[_0x711c[51]]=function(_0x8a42xb,_0x8a42xc){var _0x8a42x17;return sequelize[_0x711c[57]](function(_0x8a42x18){return CustomReport[_0x711c[39]](_0x711c[38])[_0x711c[37]](_0x8a42xb[_0x711c[18]][_0x711c[36]])[_0x711c[16]](function(_0x8a42x12){if(!_0x8a42x12){return _0x8a42xc[_0x711c[31]](404)};var _0x8a42x19=_0x8a42x12[_0x711c[32]];delete _0x8a42x19[_0x711c[36]];delete _0x8a42x19[_0x711c[52]];delete _0x8a42x19[_0x711c[53]];_0x8a42x19[_0x711c[54]]=_0x8a42xb[_0x711c[55]][_0x711c[54]];_0x8a42x17=_[_0x711c[56]](_0x8a42x19.Fields,_0x711c[32]);return CustomReport[_0x711c[49]](_0x8a42x19,{transaction:_0x8a42x18})})[_0x711c[16]](function(_0x8a42x12){return [_0x8a42x12,_0x8a42x17]})[_0x711c[45]](createFields(_0x8a42x18))})[_0x711c[16]](function(){return _0x8a42xc[_0x711c[31]](201)})[_0x711c[13]](function(_0x8a42xe){console[_0x711c[23]](_0x8a42xe);return handleError(_0x8a42xc,_0x8a42xe)})};exports[_0x711c[49]]=function(_0x8a42xb,_0x8a42xc){var _0x8a42x1a;return sequelize[_0x711c[57]](function(_0x8a42x18){return CustomReport[_0x711c[49]](_0x8a42xb[_0x711c[55]],{transaction:_0x8a42x18})[_0x711c[16]](function(_0x8a42x12){_0x8a42x1a=_0x8a42x12;return [_0x8a42x1a,_0x8a42xb[_0x711c[55]][_0x711c[58]]]})[_0x711c[45]](createFields(_0x8a42x18))})[_0x711c[16]](function(){return _0x8a42xc[_0x711c[15]](201)[_0x711c[14]](_0x8a42x1a)})[_0x711c[13]](function(_0x8a42xe){console[_0x711c[23]](_0x8a42xe);return handleError(_0x8a42xc,_0x8a42xe)})};exports[_0x711c[59]]=function(_0x8a42xb,_0x8a42xc){if(_0x8a42xb[_0x711c[55]][_0x711c[36]]){delete _0x8a42xb[_0x711c[55]][_0x711c[36]]};var _0x8a42x1a;return sequelize[_0x711c[57]](function(_0x8a42x18){return CustomReport[_0x711c[37]](_0x8a42xb[_0x711c[18]][_0x711c[36]])[_0x711c[16]](function(_0x8a42x12){if(!_0x8a42x12){return _0x8a42xc[_0x711c[31]](404)};var _0x8a42x1b=_[_0x711c[19]](_0x8a42x12,_0x8a42xb[_0x711c[55]]);return _0x8a42x12[_0x711c[61]]({transaction:_0x8a42x18})})[_0x711c[16]](function(_0x8a42x12){_0x8a42x1a=_0x8a42x12;if(_0x8a42xb[_0x711c[55]][_0x711c[58]]){return ReportField[_0x711c[60]]({where:{CustomReportId:_0x8a42xb[_0x711c[18]][_0x711c[36]]},transaction:_0x8a42x18})}})[_0x711c[16]](function(){return [_0x8a42x1a,_0x8a42xb[_0x711c[55]][_0x711c[58]]]})[_0x711c[45]](createFields(_0x8a42x18))})[_0x711c[16]](function(){return _0x8a42xc[_0x711c[31]](200)})[_0x711c[13]](function(_0x8a42xe){console[_0x711c[23]](_0x8a42xe);return handleError(_0x8a42xc,_0x8a42xe)})};function createFields(_0x8a42x18){return function(_0x8a42x12,_0x8a42x1d){if(_0x8a42x1d&&Array[_0x711c[62]](_0x8a42x1d)&&_0x8a42x1d[_0x711c[24]]){var _0x8a42x1e=getTable(_0x8a42x12[_0x711c[63]]);if(_0x8a42x1e){var _0x8a42x1f;return _0x8a42x1e[_0x711c[79]]()[_0x711c[16]](function(_0x8a42x24){_0x8a42x1f=_[_0x711c[77]](_0x8a42x24);return Metric[_0x711c[78]]()})[_0x711c[16]](function(_0x8a42x20){var _0x8a42x21=[];_0x8a42x20=_[_0x711c[56]](_0x8a42x20,_0x711c[32]);_0x8a42x1d[_0x711c[76]](function(_0x8a42x22){_0x8a42x22[_0x711c[65]]=_0x8a42x12[_0x711c[36]];if(_0x8a42x22[_0x711c[66]]){var _0x8a42x23=_[_0x711c[67]](_0x8a42x20,{id:_0x8a42x22[_0x711c[66]]});if(_0x8a42x23){_0x8a42x22[_0x711c[68]]=_0x8a42x23[_0x711c[69]];_0x8a42x21[_0x711c[70]](ReportField[_0x711c[49]](_0x8a42x22,{transaction:_0x8a42x18}))}else {throw new Error(_0x711c[71]+_0x8a42x22[_0x711c[66]]+_0x711c[72])}}else {if(_[_0x711c[73]](_0x8a42x1f,_0x8a42x22[_0x711c[68]])){_0x8a42x21[_0x711c[70]](ReportField[_0x711c[49]](_0x8a42x22,{transaction:_0x8a42x18}))}else {throw new Error(_0x711c[74]+_0x8a42x22[_0x711c[68]]+_0x711c[75])}}});return _0x8a42x21})[_0x711c[64]]()}else {throw new Error(_0x711c[80])}}}}function getTable(_0x8a42x26){var _0x8a42x1e;switch(_0x8a42x26){case _0x711c[83]:_0x8a42x1e=require(_0x711c[4])[_0x711c[82]][_0x711c[81]];break;case _0x711c[85]:_0x8a42x1e=require(_0x711c[4])[_0x711c[82]][_0x711c[84]];break;case _0x711c[87]:_0x8a42x1e=require(_0x711c[4])[_0x711c[82]][_0x711c[86]];break;case _0x711c[89]:_0x8a42x1e=require(_0x711c[4])[_0x711c[82]][_0x711c[88]];break;default:};return _0x8a42x1e}exports[_0x711c[60]]=function(_0x8a42xb,_0x8a42xc){CustomReport[_0x711c[37]](_0x8a42xb[_0x711c[18]][_0x711c[36]])[_0x711c[16]](function(_0x8a42x12){if(!_0x8a42x12){return _0x8a42xc[_0x711c[31]](404)};_0x8a42x12[_0x711c[60]]()[_0x711c[16]](function(){return _0x8a42xc[_0x711c[31]](204)})[_0x711c[13]](function(_0x8a42xe){return handleError(_0x8a42xc,_0x8a42xe)})})[_0x711c[13]](function(_0x8a42xe){return handleError(_0x8a42xc,_0x8a42xe)})};exports[_0x711c[90]]=function(_0x8a42xb,_0x8a42xc){CustomReport[_0x711c[60]]({where:{id:_0x8a42xb[_0x711c[17]][_0x711c[91]]},individualHooks:true})[_0x711c[16]](function(){return _0x8a42xc[_0x711c[31]](204)})[_0x711c[13]](function(_0x8a42xe){return handleError(_0x8a42xc,_0x8a42xe)})};function handleError(_0x8a42xc,_0x8a42xe){return _0x8a42xc[_0x711c[15]](500)[_0x711c[14]](_0x8a42xe)} \ No newline at end of file diff --git a/server/api/custom_report/custom_report.socket.js b/server/api/custom_report/custom_report.socket.js index 07bf827..88d9438 100644 --- a/server/api/custom_report/custom_report.socket.js +++ b/server/api/custom_report/custom_report.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x4318=["\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"];_0x4318[0];var CustomReport=require(_0x4318[2])[_0x4318[1]];exports[_0x4318[3]]=function(_0x7cdbx2){CustomReport[_0x4318[4]](function(_0x7cdbx3){onSave(_0x7cdbx2,_0x7cdbx3)});CustomReport[_0x4318[5]](function(_0x7cdbx3){onRemove(_0x7cdbx2,_0x7cdbx3)})};function onSave(_0x7cdbx2,_0x7cdbx3,_0x7cdbx5){_0x7cdbx2[_0x4318[7]](_0x4318[6],_0x7cdbx3)}function onRemove(_0x7cdbx2,_0x7cdbx3,_0x7cdbx5){_0x7cdbx2[_0x4318[7]](_0x4318[8],_0x7cdbx3)} \ No newline at end of file diff --git a/server/api/custom_report/custom_report.spec.js b/server/api/custom_report/custom_report.spec.js index 905f802..cfbdfea 100644 --- a/server/api/custom_report/custom_report.spec.js +++ b/server/api/custom_report/custom_report.spec.js @@ -1,20 +1 @@ -'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(); - }); - }); -}); +var _0x24ec=["\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"];_0x24ec[0];var should=require(_0x24ec[1]);var app=require(_0x24ec[2]);var request=require(_0x24ec[3]);describe(_0x24ec[4],function(){it(_0x24ec[5],function(_0x5406x4){request(app)[_0x24ec[13]](_0x24ec[12])[_0x24ec[11]](200)[_0x24ec[11]](_0x24ec[10],/json/)[_0x24ec[9]](function(_0x5406x5,_0x5406x6){if(_0x5406x5){return _0x5406x4(_0x5406x5)};_0x5406x6[_0x24ec[8]][_0x24ec[1]][_0x24ec[7]][_0x24ec[6]](Array);_0x5406x4()})})}) \ No newline at end of file diff --git a/server/api/custom_report/index.js b/server/api/custom_report/index.js index 132d3cc..be0c98f 100644 --- a/server/api/custom_report/index.js +++ b/server/api/custom_report/index.js @@ -1,21 +1 @@ -'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; +var _0x39d4=["\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"];_0x39d4[0];var express=require(_0x39d4[1]);var controller=require(_0x39d4[2]);var router=express.Router();router[_0x39d4[5]](_0x39d4[3],controller[_0x39d4[4]]);router[_0x39d4[5]](_0x39d4[6],controller[_0x39d4[7]]);router[_0x39d4[5]](_0x39d4[8],controller[_0x39d4[9]]);router[_0x39d4[11]](_0x39d4[3],controller[_0x39d4[10]]);router[_0x39d4[5]](_0x39d4[12],controller[_0x39d4[13]]);router[_0x39d4[5]](_0x39d4[14],controller[_0x39d4[15]]);router[_0x39d4[11]](_0x39d4[16],controller[_0x39d4[10]]);router[_0x39d4[11]](_0x39d4[17],controller[_0x39d4[18]]);router[_0x39d4[20]](_0x39d4[8],controller[_0x39d4[19]]);router[_0x39d4[21]](_0x39d4[8],controller[_0x39d4[19]]);router[_0x39d4[23]](_0x39d4[3],controller[_0x39d4[22]]);router[_0x39d4[23]](_0x39d4[8],controller[_0x39d4[24]]);module[_0x39d4[25]]=router \ No newline at end of file diff --git a/server/api/dashboard/dashboard.controller.js b/server/api/dashboard/dashboard.controller.js index 4eb8756..662e51c 100644 --- a/server/api/dashboard/dashboard.controller.js +++ b/server/api/dashboard/dashboard.controller.js @@ -1,147 +1 @@ -'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); -} +var _0x3800=["\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"];_0x3800[0];var _=require(_0x3800[1]);var util=require(_0x3800[2]);var Dashboard=require(_0x3800[4])[_0x3800[3]];var Util=require(_0x3800[5]);exports[_0x3800[6]]=function(_0x749fx5,_0x749fx6,_0x749fx7){return Dashboard[_0x3800[13]](Util[_0x3800[12]](_0x749fx5[_0x3800[11]]))[_0x3800[10]](function(_0x749fx9){_0x749fx6[_0x3800[9]](200)[_0x3800[8]](_0x749fx9)})[_0x3800[7]](function(_0x749fx8){return handleError(_0x749fx6,_0x749fx8)})};exports[_0x3800[14]]=function(_0x749fx5,_0x749fx6){Dashboard[_0x3800[16]]()[_0x3800[10]](function(_0x749fxa){if(!_0x749fxa){return _0x749fx6[_0x3800[15]](404)};return _0x749fx6[_0x3800[9]](200)[_0x3800[8]](_0x749fxa)})[_0x3800[7]](function(_0x749fx8){return handleError(_0x749fx6,_0x749fx8)})};exports[_0x3800[17]]=function(_0x749fx5,_0x749fx6){Dashboard[_0x3800[20]](_0x749fx5[_0x3800[19]][_0x3800[18]])[_0x3800[10]](function(_0x749fxb){if(!_0x749fxb){return _0x749fx6[_0x3800[15]](404)};return _0x749fx6[_0x3800[8]](_0x749fxb)})[_0x3800[7]](function(_0x749fx8){return handleError(_0x749fx6,_0x749fx8)})};exports[_0x3800[21]]=function(_0x749fx5,_0x749fx6){Dashboard[_0x3800[21]](_0x749fx5[_0x3800[22]])[_0x3800[10]](function(_0x749fxb){return _0x749fx6[_0x3800[9]](201)[_0x3800[8]](_0x749fxb)})[_0x3800[7]](function(_0x749fx8){return handleError(_0x749fx6,_0x749fx8)})};exports[_0x3800[23]]=function(_0x749fx5,_0x749fx6){Dashboard[_0x3800[20]](_0x749fx5[_0x3800[19]][_0x3800[18]])[_0x3800[10]](function(_0x749fxb){var _0x749fxc=_0x749fxb[_0x3800[24]];delete _0x749fxc[_0x3800[18]];_0x749fxc[_0x3800[25]]=true;_0x749fxc[_0x3800[26]]=false;_0x749fxc[_0x3800[27]]=_0x749fx5[_0x3800[22]][_0x3800[27]]||_0x749fxc[_0x3800[27]];return Dashboard[_0x3800[21]](_0x749fxc)})[_0x3800[10]](function(_0x749fxb){return _0x749fx6[_0x3800[9]](201)[_0x3800[8]](_0x749fxb)})[_0x3800[7]](function(_0x749fx8){return handleError(_0x749fx6,_0x749fx8)})};exports[_0x3800[28]]=function(_0x749fx5,_0x749fx6){if(_0x749fx5[_0x3800[22]][_0x3800[18]]){delete _0x749fx5[_0x3800[22]][_0x3800[18]]};Dashboard[_0x3800[20]](_0x749fx5[_0x3800[19]][_0x3800[18]])[_0x3800[10]](function(_0x749fxb){if(!_0x749fxb){return _0x749fx6[_0x3800[15]](404)};var _0x749fxd=_[_0x3800[29]](_0x749fxb,_0x749fx5[_0x3800[22]]);_0x749fxd[_0x3800[30]]()[_0x3800[10]](function(){return _0x749fx6[_0x3800[9]](200)[_0x3800[8]](_0x749fxb)})[_0x3800[7]](function(_0x749fx8){return handleError(_0x749fx6,_0x749fx8)})})[_0x3800[7]](function(_0x749fx8){return handleError(_0x749fx6,_0x749fx8)})};exports[_0x3800[31]]=function(_0x749fx5,_0x749fx6){Dashboard[_0x3800[20]](_0x749fx5[_0x3800[19]][_0x3800[18]])[_0x3800[10]](function(_0x749fxb){if(!_0x749fxb){return _0x749fx6[_0x3800[15]](404)};_0x749fxb[_0x3800[31]]()[_0x3800[10]](function(){return _0x749fx6[_0x3800[15]](204)})[_0x3800[7]](function(_0x749fx8){return handleError(_0x749fx6,_0x749fx8)})})[_0x3800[7]](function(_0x749fx8){return handleError(_0x749fx6,_0x749fx8)})};exports[_0x3800[32]]=function(_0x749fx5,_0x749fx6){Dashboard[_0x3800[31]]({where:{id:_0x749fx5[_0x3800[11]][_0x3800[33]]},individualHooks:true})[_0x3800[10]](function(){return _0x749fx6[_0x3800[15]](204)})[_0x3800[7]](function(_0x749fx8){return handleError(_0x749fx6,_0x749fx8)})};function handleError(_0x749fx6,_0x749fx8){return _0x749fx6[_0x3800[9]](500)[_0x3800[8]](_0x749fx8)} \ No newline at end of file diff --git a/server/api/dashboard/dashboard.socket.js b/server/api/dashboard/dashboard.socket.js index 9bf2215..91b32a4 100644 --- a/server/api/dashboard/dashboard.socket.js +++ b/server/api/dashboard/dashboard.socket.js @@ -1,27 +1 @@ -/** - * 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); -} +var _0x929c=["\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"];_0x929c[0];var Dashboard=require(_0x929c[2])[_0x929c[1]];exports[_0x929c[3]]=function(_0xc26cx2){Dashboard[_0x929c[4]](function(_0xc26cx3){onSave(_0xc26cx2,_0xc26cx3)});Dashboard[_0x929c[5]](function(_0xc26cx3){onSave(_0xc26cx2,_0xc26cx3)});Dashboard[_0x929c[6]](function(_0xc26cx3){onRemove(_0xc26cx2,_0xc26cx3)})};function onSave(_0xc26cx2,_0xc26cx3,_0xc26cx5){_0xc26cx2[_0x929c[8]](_0x929c[7],_0xc26cx3)}function onRemove(_0xc26cx2,_0xc26cx3,_0xc26cx5){_0xc26cx2[_0x929c[8]](_0x929c[9],_0xc26cx3)} \ No newline at end of file diff --git a/server/api/dashboard/dashboard.spec.js b/server/api/dashboard/dashboard.spec.js index 4784e74..7cd1459 100644 --- a/server/api/dashboard/dashboard.spec.js +++ b/server/api/dashboard/dashboard.spec.js @@ -1,20 +1 @@ -'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 +var _0x7674=["\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"];_0x7674[0];var should=require(_0x7674[1]);var app=require(_0x7674[2]);var request=require(_0x7674[3]);describe(_0x7674[4],function(){it(_0x7674[5],function(_0xb013x4){request(app)[_0x7674[13]](_0x7674[12])[_0x7674[11]](200)[_0x7674[11]](_0x7674[10],/json/)[_0x7674[9]](function(_0xb013x5,_0xb013x6){if(_0xb013x5){return _0xb013x4(_0xb013x5)};_0xb013x6[_0x7674[8]][_0x7674[1]][_0x7674[7]][_0x7674[6]](Array);_0xb013x4()})})}) \ No newline at end of file diff --git a/server/api/dashboard/index.js b/server/api/dashboard/index.js index 393fb11..75e3198 100644 --- a/server/api/dashboard/index.js +++ b/server/api/dashboard/index.js @@ -1,19 +1 @@ -'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; +var _0x5b46=["\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"];_0x5b46[0];var express=require(_0x5b46[1]);var controller=require(_0x5b46[2]);var auth=require(_0x5b46[3]);var router=express.Router();router[_0x5b46[7]](_0x5b46[4],auth[_0x5b46[5]](),controller[_0x5b46[6]]);router[_0x5b46[7]](_0x5b46[8],auth[_0x5b46[5]](),controller[_0x5b46[9]]);router[_0x5b46[7]](_0x5b46[10],auth[_0x5b46[5]](),controller[_0x5b46[11]]);router[_0x5b46[13]](_0x5b46[4],auth[_0x5b46[5]](),controller[_0x5b46[12]]);router[_0x5b46[13]](_0x5b46[14],auth[_0x5b46[5]](),controller[_0x5b46[15]]);router[_0x5b46[17]](_0x5b46[10],auth[_0x5b46[5]](),controller[_0x5b46[16]]);router[_0x5b46[18]](_0x5b46[10],auth[_0x5b46[5]](),controller[_0x5b46[16]]);router[_0x5b46[20]](_0x5b46[4],auth[_0x5b46[5]](),controller[_0x5b46[19]]);router[_0x5b46[20]](_0x5b46[10],auth[_0x5b46[5]](),controller[_0x5b46[21]]);module[_0x5b46[22]]=router \ No newline at end of file diff --git a/server/api/default_report/default_report.controller.js b/server/api/default_report/default_report.controller.js index 4fc95af..3d22931 100644 --- a/server/api/default_report/default_report.controller.js +++ b/server/api/default_report/default_report.controller.js @@ -1,234 +1 @@ -'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); -} +var _0xfee2=["\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"];_0xfee2[0];var _=require(_0xfee2[1]);var util=require(_0xfee2[2]);var DefaultReport=require(_0xfee2[4])[_0xfee2[3]];var sequelize=require(_0xfee2[4])[_0xfee2[5]];var CustomReport=require(_0xfee2[4])[_0xfee2[6]];var ExtractedReport=require(_0xfee2[4])[_0xfee2[7]];var extractUtils=require(_0xfee2[8]);var reportBuildUtils=require(_0xfee2[9]);var Util=require(_0xfee2[10]);exports[_0xfee2[11]]=function(_0x524fxa,_0x524fxb,_0x524fxc){return DefaultReport[_0xfee2[20]](Util[_0xfee2[19]](_[_0xfee2[18]](_0x524fxa[_0xfee2[16]],_0x524fxa[_0xfee2[17]])))[_0xfee2[15]](function(_0x524fxe){_0x524fxb[_0xfee2[14]](200)[_0xfee2[13]](_0x524fxe)})[_0xfee2[12]](function(_0x524fxd){return handleError(_0x524fxb,_0x524fxd)})};exports[_0xfee2[21]]=function(_0x524fxa,_0x524fxb){var _0x524fxf;DefaultReport[_0xfee2[36]](_0x524fxa[_0xfee2[17]][_0xfee2[35]],{include:[{all:true}]})[_0xfee2[15]](function(_0x524fx11){console[_0xfee2[22]](_0xfee2[29]);if(!_0x524fx11){return _0x524fxb[_0xfee2[30]](404)};var _0x524fx12=reportBuildUtils[_0xfee2[32]](_0x524fx11[_0xfee2[31]],_0x524fxa[_0xfee2[16]]);return sequelize[_0xfee2[16]](_0x524fx12,{type:sequelize[_0xfee2[34]][_0xfee2[33]]})})[_0xfee2[15]](function(_0x524fx10){_0x524fxf=_0x524fx10[_0xfee2[23]];if(_0x524fxa[_0xfee2[16]][_0xfee2[24]]){var _0x524fx10=_(_0x524fx10)[_0xfee2[28]](_0x524fxa[_0xfee2[16]][_0xfee2[27]]||0)[_0xfee2[26]](_0x524fxa[_0xfee2[16]][_0xfee2[24]])[_0xfee2[25]]()};_0x524fxb[_0xfee2[14]](200)[_0xfee2[13]]({rows:_0x524fx10,count:_0x524fxf})})[_0xfee2[12]](function(_0x524fxd){console[_0xfee2[22]](_0x524fxd);return handleError(_0x524fxb,_0x524fxd)})};exports[_0xfee2[37]]=function(_0x524fxa,_0x524fxb){docExtract(_0x524fxa,_0x524fxb,_0xfee2[38])};exports[_0xfee2[39]]=function(_0x524fxa,_0x524fxb){docExtract(_0x524fxa,_0x524fxb,_0xfee2[40])};function docExtract(_0x524fxa,_0x524fxb,_0x524fx14){DefaultReport[_0xfee2[36]](_0x524fxa[_0xfee2[17]][_0xfee2[35]],{include:[{all:true}]})[_0xfee2[15]](function(_0x524fx11){if(!_0x524fx11){return _0x524fxb[_0xfee2[30]](404)};return [_0x524fx11,ExtractedReport[_0xfee2[46]]({name:_0x524fx11[_0xfee2[43]],startDate:_0x524fxa[_0xfee2[16]][_0xfee2[44]]||null,endDate:_0x524fxa[_0xfee2[16]][_0xfee2[45]]||null,output:_0x524fx14})]})[_0xfee2[42]](function(_0x524fx11,_0x524fx15){extractUtils[_0xfee2[41]+_0x524fx14](_0x524fx11,_0x524fxa[_0xfee2[16]],_0x524fx15[_0xfee2[35]])})[_0xfee2[12]](function(_0x524fxd){console[_0xfee2[22]](_0x524fxd);return handleError(_0x524fxb,_0x524fxd)});return _0x524fxb[_0xfee2[30]](200)}function getConditions(_0x524fx17){if(!_0x524fx17){return _0xfee2[47]};for(var _0x524fx18=_0xfee2[48],_0x524fx19=0;_0x524fx19<_0x524fx17[_0xfee2[49]][_0xfee2[23]];_0x524fx19++){_0x524fx19>0&&(_0x524fx18+=_0xfee2[50]+_0x524fx17[_0xfee2[51]]+_0xfee2[50]);_0x524fx18+=_0x524fx17[_0xfee2[49]][_0x524fx19][_0xfee2[52]]?getConditions(_0x524fx17[_0xfee2[49]][_0x524fx19][_0xfee2[52]]):_0x524fx17[_0xfee2[49]][_0x524fx19][_0xfee2[53]]+_0xfee2[50]+_0x524fx17[_0xfee2[49]][_0x524fx19][_0xfee2[54]]+_0xfee2[55]+(_0x524fx17[_0xfee2[49]][_0x524fx19][_0xfee2[54]]===_0xfee2[56]?_0xfee2[57]+_0x524fx17[_0xfee2[49]][_0x524fx19][_0xfee2[25]]+_0xfee2[57]:_0x524fx17[_0xfee2[49]][_0x524fx19][_0xfee2[25]])+_0xfee2[58]};return _0x524fx18+_0xfee2[59]}exports[_0xfee2[60]]=function(_0x524fxa,_0x524fxb){DefaultReport[_0xfee2[36]](_0x524fxa[_0xfee2[17]][_0xfee2[35]],{include:[{all:true}]})[_0xfee2[15]](function(_0x524fx11){if(!_0x524fx11){return _0x524fxb[_0xfee2[30]](404)};return _0x524fxb[_0xfee2[13]](_0x524fx11)})[_0xfee2[12]](function(_0x524fxd){return handleError(_0x524fxb,_0x524fxd)})};exports[_0xfee2[61]]=function(_0x524fxa,_0x524fxb){DefaultReport[_0xfee2[36]](_0x524fxa[_0xfee2[17]][_0xfee2[35]],{include:[{all:true}]})[_0xfee2[15]](function(_0x524fx11){if(!_0x524fx11){return _0x524fxb[_0xfee2[30]](404)};var _0x524fx1a=_0x524fx11[_0xfee2[31]];delete _0x524fx1a[_0xfee2[35]];delete _0x524fx1a[_0xfee2[62]];delete _0x524fx1a[_0xfee2[63]];_0x524fx1a[_0xfee2[64]]=_0x524fxa[_0xfee2[65]][_0xfee2[64]];_0x524fx1a[_0xfee2[66]]=_[_0xfee2[67]](_0x524fx1a.Fields,_0xfee2[31]);_[_0xfee2[69]](_0x524fx1a.Fields,function(_0x524fx1b){delete _0x524fx1b[_0xfee2[35]];delete _0x524fx1b[_0xfee2[68]];delete _0x524fx1b[_0xfee2[62]];delete _0x524fx1b[_0xfee2[63]]});return CustomReport[_0xfee2[46]](_0x524fx1a,{include:[{all:true}]})})[_0xfee2[15]](function(){return _0x524fxb[_0xfee2[30]](201)})[_0xfee2[12]](function(_0x524fxd){console[_0xfee2[22]](_0x524fxd);return handleError(_0x524fxb,_0x524fxd)})};exports[_0xfee2[46]]=function(_0x524fxa,_0x524fxb){DefaultReport[_0xfee2[46]](_0x524fxa[_0xfee2[65]])[_0xfee2[15]](function(_0x524fx11){return _0x524fxb[_0xfee2[14]](201)[_0xfee2[13]](_0x524fx11)})[_0xfee2[12]](function(_0x524fxd){return handleError(_0x524fxb,_0x524fxd)})};exports[_0xfee2[70]]=function(_0x524fxa,_0x524fxb){if(_0x524fxa[_0xfee2[65]][_0xfee2[35]]){delete _0x524fxa[_0xfee2[65]][_0xfee2[35]]};DefaultReport[_0xfee2[36]](_0x524fxa[_0xfee2[17]][_0xfee2[35]])[_0xfee2[15]](function(_0x524fx11){if(!_0x524fx11){return _0x524fxb[_0xfee2[30]](404)};var _0x524fx1c=_[_0xfee2[18]](_0x524fx11,_0x524fxa[_0xfee2[65]]);_0x524fx1c[_0xfee2[71]]()[_0xfee2[15]](function(){return _0x524fxb[_0xfee2[14]](200)[_0xfee2[13]](_0x524fx11)})[_0xfee2[12]](function(_0x524fxd){return handleError(_0x524fxb,_0x524fxd)})})[_0xfee2[12]](function(_0x524fxd){return handleError(_0x524fxb,_0x524fxd)})};exports[_0xfee2[72]]=function(_0x524fxa,_0x524fxb){DefaultReport[_0xfee2[36]](_0x524fxa[_0xfee2[17]][_0xfee2[35]])[_0xfee2[15]](function(_0x524fx11){if(!_0x524fx11){return _0x524fxb[_0xfee2[30]](404)};_0x524fx11[_0xfee2[72]]()[_0xfee2[15]](function(){return _0x524fxb[_0xfee2[30]](204)})[_0xfee2[12]](function(_0x524fxd){return handleError(_0x524fxb,_0x524fxd)})})[_0xfee2[12]](function(_0x524fxd){return handleError(_0x524fxb,_0x524fxd)})};function handleError(_0x524fxb,_0x524fxd){return _0x524fxb[_0xfee2[14]](500)[_0xfee2[13]](_0x524fxd)} \ No newline at end of file diff --git a/server/api/default_report/default_report.socket.js b/server/api/default_report/default_report.socket.js index 2acd563..c44424b 100644 --- a/server/api/default_report/default_report.socket.js +++ b/server/api/default_report/default_report.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xad77=["\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"];_0xad77[0];var DefaultReport=require(_0xad77[2])[_0xad77[1]];exports[_0xad77[3]]=function(_0x5e80x2){DefaultReport[_0xad77[4]](function(_0x5e80x3){onSave(_0x5e80x2,_0x5e80x3)});DefaultReport[_0xad77[5]](function(_0x5e80x3){onRemove(_0x5e80x2,_0x5e80x3)})};function onSave(_0x5e80x2,_0x5e80x3,_0x5e80x5){_0x5e80x2[_0xad77[7]](_0xad77[6],_0x5e80x3)}function onRemove(_0x5e80x2,_0x5e80x3,_0x5e80x5){_0x5e80x2[_0xad77[7]](_0xad77[8],_0x5e80x3)} \ No newline at end of file diff --git a/server/api/default_report/default_report.spec.js b/server/api/default_report/default_report.spec.js index 2a6c81d..e22dcb2 100644 --- a/server/api/default_report/default_report.spec.js +++ b/server/api/default_report/default_report.spec.js @@ -1,20 +1 @@ -'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(); - }); - }); -}); +var _0x7917=["\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"];_0x7917[0];var should=require(_0x7917[1]);var app=require(_0x7917[2]);var request=require(_0x7917[3]);describe(_0x7917[4],function(){it(_0x7917[5],function(_0x4633x4){request(app)[_0x7917[13]](_0x7917[12])[_0x7917[11]](200)[_0x7917[11]](_0x7917[10],/json/)[_0x7917[9]](function(_0x4633x5,_0x4633x6){if(_0x4633x5){return _0x4633x4(_0x4633x5)};_0x4633x6[_0x7917[8]][_0x7917[1]][_0x7917[7]][_0x7917[6]](Array);_0x4633x4()})})}) \ No newline at end of file diff --git a/server/api/default_report/index.js b/server/api/default_report/index.js index 550ecd6..862ee9a 100644 --- a/server/api/default_report/index.js +++ b/server/api/default_report/index.js @@ -1,19 +1 @@ -'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; +var _0xb3aa=["\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"];_0xb3aa[0];var express=require(_0xb3aa[1]);var controller=require(_0xb3aa[2]);var router=express.Router();router[_0xb3aa[5]](_0xb3aa[3],controller[_0xb3aa[4]]);router[_0xb3aa[5]](_0xb3aa[6],controller[_0xb3aa[7]]);router[_0xb3aa[5]](_0xb3aa[8],controller[_0xb3aa[9]]);router[_0xb3aa[11]](_0xb3aa[3],controller[_0xb3aa[10]]);router[_0xb3aa[5]](_0xb3aa[12],controller[_0xb3aa[13]]);router[_0xb3aa[5]](_0xb3aa[14],controller[_0xb3aa[15]]);router[_0xb3aa[11]](_0xb3aa[16],controller[_0xb3aa[17]]);router[_0xb3aa[19]](_0xb3aa[8],controller[_0xb3aa[18]]);router[_0xb3aa[20]](_0xb3aa[8],controller[_0xb3aa[18]]);router[_0xb3aa[22]](_0xb3aa[8],controller[_0xb3aa[21]]);module[_0xb3aa[23]]=router \ No newline at end of file diff --git a/server/api/desk_account/desk_account.controller.js b/server/api/desk_account/desk_account.controller.js index 78e1902..db131bb 100644 --- a/server/api/desk_account/desk_account.controller.js +++ b/server/api/desk_account/desk_account.controller.js @@ -1,256 +1 @@ -'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); -} +var _0x1b1a=["\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"];_0x1b1a[0];var _=require(_0x1b1a[1]);var util=require(_0x1b1a[2]);var desk=require(_0x1b1a[3]);var DeskAccount=require(_0x1b1a[5])[_0x1b1a[4]];exports[_0x1b1a[6]]=function(_0x4390x5,_0x4390x6){var _0x4390x7=[_0x1b1a[7],_0x1b1a[8],_0x1b1a[9],_0x1b1a[10]];var _0x4390x8=_0x4390x5[_0x1b1a[12]][_0x1b1a[11]]?parseInt(_0x4390x5[_0x1b1a[12]][_0x1b1a[11]],10):100;var _0x4390x9=_0x4390x5[_0x1b1a[12]][_0x1b1a[13]]?parseInt(_0x4390x5[_0x1b1a[12]][_0x1b1a[13]],10):0;var _0x4390xa={where:{},limit:_0x4390x8,offset:_0x4390x9*_0x4390x8};_[_0x1b1a[27]](_0x4390x5[_0x1b1a[12]],function(_0x4390xb,_0x4390xc){switch(_0x4390xc){case _0x1b1a[11]:;case _0x1b1a[13]:break;case _0x1b1a[16]:_0x4390xa[_0x1b1a[14]]=util[_0x1b1a[19]](_0x1b1a[15],_0x4390x5[_0x1b1a[12]][_0x1b1a[16]],_0x4390x5[_0x1b1a[12]][_0x1b1a[17]]||_0x1b1a[18])||null;break;case _0x1b1a[17]:break;case _0x1b1a[25]:_0x4390xa[_0x1b1a[21]][_0x1b1a[20]]=[];_0x4390x7[_0x1b1a[24]](function(_0x4390xd){var _0x4390xe={};_0x4390xe[_0x4390xd]={$like:_0x1b1a[22]+_0x4390xb+_0x1b1a[22]};_0x4390xa[_0x1b1a[21]][_0x1b1a[20]][_0x1b1a[23]](_0x4390xe)});break;default:_0x4390xa[_0x1b1a[21]][_0x4390xc]={$like:{}};_0x4390xa[_0x1b1a[21]][_0x4390xc][_0x1b1a[26]]=_0x1b1a[22]+_0x4390xb+_0x1b1a[22]}});DeskAccount[_0x1b1a[42]](_0x4390xa)[_0x1b1a[41]](function(_0x4390x10){var _0x4390x11=Math[_0x1b1a[33]](_0x4390x10[_0x1b1a[32]]/_0x4390x8);var _0x4390x12=_0x4390x11>(_0x4390xa[_0x1b1a[34]]+1)?util[_0x1b1a[19]](_0x1b1a[35],_0x4390x5[_0x1b1a[36]],_0x4390x5[_0x1b1a[38]][_0x1b1a[37]],_0x4390x5[_0x1b1a[39]],_0x4390x9+1):null;var _0x4390x13=_0x4390x9>0?util[_0x1b1a[19]](_0x1b1a[35],_0x4390x5[_0x1b1a[36]],_0x4390x5[_0x1b1a[38]][_0x1b1a[37]],_0x4390x5[_0x1b1a[39]],_0x4390x9-1):null;return _0x4390x6[_0x1b1a[30]](200)[_0x1b1a[29]]({count:_0x4390x10[_0x1b1a[32]],rows:_0x4390x10[_0x1b1a[40]],next_page:_0x4390x12,previous_page:_0x4390x13,total_pages:_0x4390x11})})[_0x1b1a[31]](function(_0x4390xf){return _0x4390x6[_0x1b1a[30]](500)[_0x1b1a[29]]({error:_0x1b1a[28]})})};exports[_0x1b1a[43]]=function(_0x4390x5,_0x4390x6){DeskAccount[_0x1b1a[47]](_0x4390x5[_0x1b1a[46]][_0x1b1a[45]])[_0x1b1a[41]](function(_0x4390x14){if(!_0x4390x14){return _0x4390x6[_0x1b1a[44]](404)};return _0x4390x6[_0x1b1a[29]](_0x4390x14)})[_0x1b1a[31]](function(_0x4390xf){return handleError(_0x4390x6,_0x4390xf)})};exports[_0x1b1a[48]]=function(_0x4390x5,_0x4390x6,_0x4390x15){DeskAccount[_0x1b1a[48]](_0x4390x5[_0x1b1a[49]])[_0x1b1a[41]](function(_0x4390x14){return _0x4390x6[_0x1b1a[30]](201)[_0x1b1a[29]](_0x4390x14)})[_0x1b1a[31]](function(_0x4390xf){return handleError(_0x4390x6,_0x4390xf)})};exports[_0x1b1a[50]]=function(_0x4390x5,_0x4390x6){if(_0x4390x5[_0x1b1a[49]][_0x1b1a[45]]){delete _0x4390x5[_0x1b1a[49]][_0x1b1a[45]]};DeskAccount[_0x1b1a[47]](_0x4390x5[_0x1b1a[46]][_0x1b1a[45]])[_0x1b1a[41]](function(_0x4390x14){if(!_0x4390x14){return _0x4390x6[_0x1b1a[44]](404)};var _0x4390x16=_[_0x1b1a[51]](_0x4390x14,_0x4390x5[_0x1b1a[49]]);_0x4390x16[_0x1b1a[52]]()[_0x1b1a[41]](function(){return _0x4390x6[_0x1b1a[30]](200)[_0x1b1a[29]](_0x4390x14)})[_0x1b1a[31]](function(_0x4390xf){return handleError(_0x4390x6,_0x4390xf)})})[_0x1b1a[31]](function(_0x4390xf){return handleError(_0x4390x6,_0x4390xf)})};exports[_0x1b1a[53]]=function(_0x4390x5,_0x4390x6){DeskAccount[_0x1b1a[47]](_0x4390x5[_0x1b1a[46]][_0x1b1a[45]])[_0x1b1a[41]](function(_0x4390x14){if(!_0x4390x14){return _0x4390x6[_0x1b1a[44]](404)};_0x4390x14[_0x1b1a[53]]()[_0x1b1a[41]](function(){return _0x4390x6[_0x1b1a[44]](204)})[_0x1b1a[31]](function(_0x4390xf){return handleError(_0x4390x6,_0x4390xf)})})[_0x1b1a[31]](function(_0x4390xf){return handleError(_0x4390x6,_0x4390xf)})};exports[_0x1b1a[54]]=function(_0x4390x5,_0x4390x6){DeskAccount[_0x1b1a[47]](_0x4390x5[_0x1b1a[46]][_0x1b1a[45]])[_0x1b1a[41]](function(_0x4390x17){var _0x4390x14={endpoint:stripTrailingSlash(_0x4390x17[_0x1b1a[10]]),retry:false};if(_0x4390x17[_0x1b1a[55]]===_0x1b1a[56]){_0x4390x14[_0x1b1a[9]]=_0x4390x17[_0x1b1a[9]];_0x4390x14[_0x1b1a[57]]=_0x4390x17[_0x1b1a[57]]}else {if(_0x4390x17[_0x1b1a[55]]===_0x1b1a[58]){_0x4390x14[_0x1b1a[59]]=_0x4390x17[_0x1b1a[59]];_0x4390x14[_0x1b1a[60]]=_0x4390x17[_0x1b1a[60]];_0x4390x14[_0x1b1a[61]]=_0x4390x17[_0x1b1a[61]];_0x4390x14[_0x1b1a[62]]=_0x4390x17[_0x1b1a[62]]}};var _0x4390x18=desk[_0x1b1a[63]](_0x4390x14);_0x4390x18[_0x1b1a[65]](_0x1b1a[64],function(_0x4390xf,_0x4390x19,_0x4390x1a){if(_0x4390xf){return handleError(_0x4390x6,_0x4390xf)};return _0x4390x6[_0x1b1a[44]](200)})})[_0x1b1a[31]](function(_0x4390xf){return handleError(_0x4390x6,_0x4390xf)})};exports[_0x1b1a[66]]=function(_0x4390x5,_0x4390x6){var _0x4390x1b={};_0x4390x1b[_0x4390x5[_0x1b1a[46]][_0x1b1a[67]]]=_0x4390x5[_0x1b1a[49]][_0x1b1a[68]];DeskAccount[_0x1b1a[42]]({where:_0x4390x1b})[_0x1b1a[41]](function(_0x4390x10){if(_0x4390x10[_0x1b1a[32]]){return _0x4390x6[_0x1b1a[30]](200)[_0x1b1a[29]]({isValid:false,value:_0x4390x5[_0x1b1a[49]][_0x1b1a[68]]})};return _0x4390x6[_0x1b1a[30]](200)[_0x1b1a[29]]({isValid:true,value:_0x4390x5[_0x1b1a[49]][_0x1b1a[68]]})})[_0x1b1a[31]](function(_0x4390xf){return handleError(_0x4390x6,_0x4390xf)})};exports[_0x1b1a[69]]=function(_0x4390x5,_0x4390x6){DeskAccount[_0x1b1a[47]](_0x4390x5[_0x1b1a[46]][_0x1b1a[45]])[_0x1b1a[41]](function(_0x4390x17){var _0x4390x14={endpoint:stripTrailingSlash(_0x4390x17[_0x1b1a[10]]),retry:false};if(_0x4390x17[_0x1b1a[55]]===_0x1b1a[56]){_0x4390x14[_0x1b1a[9]]=_0x4390x17[_0x1b1a[9]];_0x4390x14[_0x1b1a[57]]=_0x4390x17[_0x1b1a[57]]}else {if(_0x4390x17[_0x1b1a[55]]===_0x1b1a[58]){_0x4390x14[_0x1b1a[59]]=_0x4390x17[_0x1b1a[59]];_0x4390x14[_0x1b1a[60]]=_0x4390x17[_0x1b1a[60]];_0x4390x14[_0x1b1a[61]]=_0x4390x17[_0x1b1a[61]];_0x4390x14[_0x1b1a[62]]=_0x4390x17[_0x1b1a[62]]}};var _0x4390x18=desk[_0x1b1a[63]](_0x4390x14);_0x4390x18[_0x1b1a[65]](_0x1b1a[70],function(_0x4390xf,_0x4390x19,_0x4390x1a){if(_0x4390xf){return handleError(_0x4390x6,_0x4390xf)};return _0x4390x6[_0x1b1a[30]](200)[_0x1b1a[73]](_0x4390x19[_0x1b1a[72]][_0x1b1a[71]])})})[_0x1b1a[31]](function(_0x4390xf){return handleError(_0x4390x6,_0x4390xf)})};exports[_0x1b1a[74]]=function(_0x4390x5,_0x4390x6){DeskAccount[_0x1b1a[53]]({where:{id:_0x4390x5[_0x1b1a[12]][_0x1b1a[45]]},individualHooks:true})[_0x1b1a[41]](function(){return _0x4390x6[_0x1b1a[44]](204)})[_0x1b1a[31]](function(_0x4390xf){return handleError(_0x4390x6,_0x4390xf)})};function stripTrailingSlash(_0x4390x1d){if(_0x4390x1d[_0x1b1a[75]](-1)===_0x1b1a[76]){return _0x4390x1d[_0x1b1a[75]](0,_0x4390x1d[_0x1b1a[77]]-1)};return _0x4390x1d}function handleError(_0x4390x6,_0x4390xf){return _0x4390x6[_0x1b1a[30]](500)[_0x1b1a[29]](_0x4390xf)} \ No newline at end of file diff --git a/server/api/desk_account/desk_account.socket.js b/server/api/desk_account/desk_account.socket.js index 3f7badd..c30bece 100644 --- a/server/api/desk_account/desk_account.socket.js +++ b/server/api/desk_account/desk_account.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xb399=["\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"];_0xb399[0];var DeskAccount=require(_0xb399[2])[_0xb399[1]];exports[_0xb399[3]]=function(_0x83c4x2){DeskAccount[_0xb399[4]](function(_0x83c4x3){onSave(_0x83c4x2,_0x83c4x3)});DeskAccount[_0xb399[5]](function(_0x83c4x3){onRemove(_0x83c4x2,_0x83c4x3)})};function onSave(_0x83c4x2,_0x83c4x3,_0x83c4x5){_0x83c4x2[_0xb399[7]](_0xb399[6],_0x83c4x3)}function onRemove(_0x83c4x2,_0x83c4x3,_0x83c4x5){_0x83c4x2[_0xb399[7]](_0xb399[8],_0x83c4x3)} \ No newline at end of file diff --git a/server/api/desk_account/desk_account.spec.js b/server/api/desk_account/desk_account.spec.js index a56fc11..2d2e78e 100644 --- a/server/api/desk_account/desk_account.spec.js +++ b/server/api/desk_account/desk_account.spec.js @@ -1,20 +1 @@ -'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 +var _0x105d=["\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"];_0x105d[0];var should=require(_0x105d[1]);var app=require(_0x105d[2]);var request=require(_0x105d[3]);describe(_0x105d[4],function(){it(_0x105d[5],function(_0xbc83x4){request(app)[_0x105d[13]](_0x105d[12])[_0x105d[11]](200)[_0x105d[11]](_0x105d[10],/json/)[_0x105d[9]](function(_0xbc83x5,_0xbc83x6){if(_0xbc83x5){return _0xbc83x4(_0xbc83x5)};_0xbc83x6[_0x105d[8]][_0x105d[1]][_0x105d[7]][_0x105d[6]](Array);_0xbc83x4()})})}) \ No newline at end of file diff --git a/server/api/desk_account/index.js b/server/api/desk_account/index.js index 4a593d0..2ea71b9 100644 --- a/server/api/desk_account/index.js +++ b/server/api/desk_account/index.js @@ -1,19 +1 @@ -'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; +var _0xf24e=["\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"];_0xf24e[0];var express=require(_0xf24e[1]);var controller=require(_0xf24e[2]);var auth=require(_0xf24e[3]);var router=express.Router();router[_0xf24e[7]](_0xf24e[4],auth[_0xf24e[5]](),controller[_0xf24e[6]]);router[_0xf24e[7]](_0xf24e[8],auth[_0xf24e[5]](),controller[_0xf24e[9]]);router[_0xf24e[7]](_0xf24e[10],auth[_0xf24e[5]](),controller[_0xf24e[11]]);router[_0xf24e[7]](_0xf24e[12],auth[_0xf24e[5]](),controller[_0xf24e[13]]);router[_0xf24e[16]](_0xf24e[14],auth[_0xf24e[5]](),controller[_0xf24e[15]]);router[_0xf24e[16]](_0xf24e[4],auth[_0xf24e[5]](),controller[_0xf24e[17]]);router[_0xf24e[19]](_0xf24e[8],auth[_0xf24e[5]](),controller[_0xf24e[18]]);router[_0xf24e[20]](_0xf24e[8],auth[_0xf24e[5]](),controller[_0xf24e[18]]);router[_0xf24e[22]](_0xf24e[4],auth[_0xf24e[5]](),controller[_0xf24e[21]]);router[_0xf24e[22]](_0xf24e[8],auth[_0xf24e[5]](),controller[_0xf24e[23]]);module[_0xf24e[24]]=router \ No newline at end of file diff --git a/server/api/desk_configuration/desk_configuration.controller.js b/server/api/desk_configuration/desk_configuration.controller.js index 3824ca1..e55a036 100644 --- a/server/api/desk_configuration/desk_configuration.controller.js +++ b/server/api/desk_configuration/desk_configuration.controller.js @@ -1,145 +1 @@ -/** - * 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)); -}; +var _0xc0ed=["\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"];_0xc0ed[0];var _=require(_0xc0ed[1]);var DeskConfiguration=require(_0xc0ed[3])[_0xc0ed[2]];var DeskField=require(_0xc0ed[3])[_0xc0ed[4]];function handleError(_0x3a0ex5,_0x3a0ex6){_0x3a0ex6=_0x3a0ex6||500;return function(_0x3a0ex7){_0x3a0ex5[_0xc0ed[6]](_0x3a0ex6)[_0xc0ed[5]](_0x3a0ex7)}}function responseWithResult(_0x3a0ex5,_0x3a0ex6){_0x3a0ex6=_0x3a0ex6||200;return function(_0x3a0ex9){if(_0x3a0ex9){_0x3a0ex5[_0xc0ed[6]](_0x3a0ex6)[_0xc0ed[7]](_0x3a0ex9)}}}function handleEntityNotFound(_0x3a0ex5){return function(_0x3a0ex9){if(!_0x3a0ex9){_0x3a0ex5[_0xc0ed[6]](404)[_0xc0ed[8]]();return null};return _0x3a0ex9}}function saveUpdates(_0x3a0exc){return function(_0x3a0ex9){return _0x3a0ex9[_0xc0ed[10]](_0x3a0exc)[_0xc0ed[9]](function(_0x3a0exd){return _0x3a0exd})}}function removeEntity(_0x3a0ex5){return function(_0x3a0ex9){if(_0x3a0ex9){return _0x3a0ex9[_0xc0ed[11]]()[_0xc0ed[9]](function(){_0x3a0ex5[_0xc0ed[6]](204)[_0xc0ed[8]]()})}}}exports[_0xc0ed[12]]=function(_0x3a0exf,_0x3a0ex5){DeskConfiguration[_0xc0ed[15]]({where:_0x3a0exf[_0xc0ed[14]]})[_0xc0ed[9]](responseWithResult(_0x3a0ex5))[_0xc0ed[13]](handleError(_0x3a0ex5))};exports[_0xc0ed[16]]=function(_0x3a0exf,_0x3a0ex5){DeskConfiguration[_0xc0ed[22]]({where:{id:_0x3a0exf[_0xc0ed[18]][_0xc0ed[17]]},include:[{model:DeskField,as:_0xc0ed[19]},{model:DeskField,as:_0xc0ed[20]},{model:DeskField,as:_0xc0ed[21]}]})[_0xc0ed[9]](handleEntityNotFound(_0x3a0ex5))[_0xc0ed[9]](responseWithResult(_0x3a0ex5))[_0xc0ed[13]](handleError(_0x3a0ex5))};exports[_0xc0ed[23]]=function(_0x3a0exf,_0x3a0ex5){DeskConfiguration[_0xc0ed[23]](_0x3a0exf[_0xc0ed[24]])[_0xc0ed[9]](responseWithResult(_0x3a0ex5,201))[_0xc0ed[13]](handleError(_0x3a0ex5))};exports[_0xc0ed[25]]=function(_0x3a0exf,_0x3a0ex5){if(_0x3a0exf[_0xc0ed[24]][_0xc0ed[17]]){delete _0x3a0exf[_0xc0ed[24]][_0xc0ed[17]]};DeskConfiguration[_0xc0ed[26]](_0x3a0exf[_0xc0ed[18]][_0xc0ed[17]])[_0xc0ed[9]](handleEntityNotFound(_0x3a0ex5))[_0xc0ed[9]](saveUpdates(_0x3a0exf[_0xc0ed[24]]))[_0xc0ed[9]](responseWithResult(_0x3a0ex5))[_0xc0ed[13]](handleError(_0x3a0ex5))};exports[_0xc0ed[11]]=function(_0x3a0exf,_0x3a0ex5){DeskConfiguration[_0xc0ed[26]](_0x3a0exf[_0xc0ed[18]][_0xc0ed[17]])[_0xc0ed[9]](handleEntityNotFound(_0x3a0ex5))[_0xc0ed[9]](removeEntity(_0x3a0ex5))[_0xc0ed[13]](handleError(_0x3a0ex5))};exports[_0xc0ed[27]]=function(_0x3a0exf,_0x3a0ex5,_0x3a0ex10){var _0x3a0ex11;DeskConfiguration[_0xc0ed[26]](_0x3a0exf[_0xc0ed[18]][_0xc0ed[17]])[_0xc0ed[9]](handleEntityNotFound(_0x3a0ex5))[_0xc0ed[9]](function(_0x3a0ex14){_0x3a0ex11=_0x3a0ex14;return DeskField[_0xc0ed[23]](_0x3a0exf[_0xc0ed[24]])})[_0xc0ed[9]](function(_0x3a0ex13){switch(_0x3a0exf[_0xc0ed[18]][_0xc0ed[35]]){case _0xc0ed[30]:return [_0x3a0ex11[_0xc0ed[29]](_0x3a0ex13),_0x3a0ex13];case _0xc0ed[32]:return [_0x3a0ex11[_0xc0ed[31]](_0x3a0ex13),_0x3a0ex13];case _0xc0ed[34]:return [_0x3a0ex11[_0xc0ed[33]](_0x3a0ex13),_0x3a0ex13]}})[_0xc0ed[28]](function(_0x3a0ex12,_0x3a0ex13){return _0x3a0ex5[_0xc0ed[6]](201)[_0xc0ed[7]](_0x3a0ex13)})[_0xc0ed[13]](handleError(_0x3a0ex5))} \ No newline at end of file diff --git a/server/api/desk_configuration/desk_configuration.socket.js b/server/api/desk_configuration/desk_configuration.socket.js index d26e4f6..1a008ca 100644 --- a/server/api/desk_configuration/desk_configuration.socket.js +++ b/server/api/desk_configuration/desk_configuration.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x98e3=["\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"];_0x98e3[0];var DeskConfiguration=require(_0x98e3[2])[_0x98e3[1]];exports[_0x98e3[3]]=function(_0x2694x2){DeskConfiguration[_0x98e3[4]](function(_0x2694x3){onSave(_0x2694x2,_0x2694x3)});DeskConfiguration[_0x98e3[5]](function(_0x2694x3){onRemove(_0x2694x2,_0x2694x3)})};function onSave(_0x2694x2,_0x2694x3,_0x2694x5){_0x2694x2[_0x98e3[7]](_0x98e3[6],_0x2694x3)}function onRemove(_0x2694x2,_0x2694x3,_0x2694x5){_0x2694x2[_0x98e3[7]](_0x98e3[8],_0x2694x3)} \ No newline at end of file diff --git a/server/api/desk_configuration/index.js b/server/api/desk_configuration/index.js index 91adaf0..9d2f5e3 100644 --- a/server/api/desk_configuration/index.js +++ b/server/api/desk_configuration/index.js @@ -1,19 +1 @@ -'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; +var _0x1fd4=["\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"];_0x1fd4[0];var express=require(_0x1fd4[1]);var auth=require(_0x1fd4[2]);var controller=require(_0x1fd4[3]);var router=express.Router();router[_0x1fd4[7]](_0x1fd4[4],auth[_0x1fd4[5]](),controller[_0x1fd4[6]]);router[_0x1fd4[7]](_0x1fd4[8],auth[_0x1fd4[5]](),controller[_0x1fd4[9]]);router[_0x1fd4[11]](_0x1fd4[4],auth[_0x1fd4[5]](),controller[_0x1fd4[10]]);router[_0x1fd4[13]](_0x1fd4[8],auth[_0x1fd4[5]](),controller[_0x1fd4[12]]);router[_0x1fd4[11]](_0x1fd4[14],auth[_0x1fd4[5]](),controller[_0x1fd4[15]]);router[_0x1fd4[16]](_0x1fd4[8],auth[_0x1fd4[5]](),controller[_0x1fd4[12]]);router[_0x1fd4[18]](_0x1fd4[8],auth[_0x1fd4[5]](),controller[_0x1fd4[17]]);module[_0x1fd4[19]]=router \ No newline at end of file diff --git a/server/api/desk_configuration/index.spec.js b/server/api/desk_configuration/index.spec.js index fd6b650..79bef4f 100644 --- a/server/api/desk_configuration/index.spec.js +++ b/server/api/desk_configuration/index.spec.js @@ -1,97 +1 @@ -'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; - }); - - }); - -}); +var _0x3125=["\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"];_0x3125[0];var proxyquire=require(_0x3125[2])[_0x3125[1]]();var deskConfigurationCtrlStub={index:_0x3125[3],show:_0x3125[4],create:_0x3125[5],update:_0x3125[6],destroy:_0x3125[7]};var routerStub={get:sinon[_0x3125[8]](),put:sinon[_0x3125[8]](),patch:sinon[_0x3125[8]](),post:sinon[_0x3125[8]](),delete:sinon[_0x3125[8]]()};var deskConfigurationIndex=proxyquire(_0x3125[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(_0x3125[10],function(){it(_0x3125[11],function(){expect(deskConfigurationIndex)[_0x3125[13]][_0x3125[12]](routerStub)});describe(_0x3125[14],function(){it(_0x3125[15],function(){expect(routerStub[_0x3125[21]][_0x3125[20]](_0x3125[19],_0x3125[3]))[_0x3125[13]][_0x3125[18]][_0x3125[17]][_0x3125[16]]})});describe(_0x3125[22],function(){it(_0x3125[23],function(){expect(routerStub[_0x3125[21]][_0x3125[20]](_0x3125[24],_0x3125[4]))[_0x3125[13]][_0x3125[18]][_0x3125[17]][_0x3125[16]]})});describe(_0x3125[25],function(){it(_0x3125[26],function(){expect(routerStub[_0x3125[27]][_0x3125[20]](_0x3125[19],_0x3125[5]))[_0x3125[13]][_0x3125[18]][_0x3125[17]][_0x3125[16]]})});describe(_0x3125[28],function(){it(_0x3125[29],function(){expect(routerStub[_0x3125[30]][_0x3125[20]](_0x3125[24],_0x3125[6]))[_0x3125[13]][_0x3125[18]][_0x3125[17]][_0x3125[16]]})});describe(_0x3125[31],function(){it(_0x3125[29],function(){expect(routerStub[_0x3125[32]][_0x3125[20]](_0x3125[24],_0x3125[6]))[_0x3125[13]][_0x3125[18]][_0x3125[17]][_0x3125[16]]})});describe(_0x3125[33],function(){it(_0x3125[34],function(){expect(routerStub[_0x3125[35]][_0x3125[20]](_0x3125[24],_0x3125[7]))[_0x3125[13]][_0x3125[18]][_0x3125[17]][_0x3125[16]]})})}) \ No newline at end of file diff --git a/server/api/desk_field/desk_field.controller.js b/server/api/desk_field/desk_field.controller.js index 6b39f83..820894d 100644 --- a/server/api/desk_field/desk_field.controller.js +++ b/server/api/desk_field/desk_field.controller.js @@ -1,104 +1 @@ -/** - * 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)); -} +var _0x35f9=["\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"];_0x35f9[0];var _=require(_0x35f9[1]);var DeskField=require(_0x35f9[3])[_0x35f9[2]];function handleError(_0x642fx4,_0x642fx5){_0x642fx5=_0x642fx5||500;return function(_0x642fx6){_0x642fx4[_0x35f9[5]](_0x642fx5)[_0x35f9[4]](_0x642fx6)}}function responseWithResult(_0x642fx4,_0x642fx5){_0x642fx5=_0x642fx5||200;return function(_0x642fx8){if(_0x642fx8){_0x642fx4[_0x35f9[5]](_0x642fx5)[_0x35f9[6]](_0x642fx8)}}}function handleEntityNotFound(_0x642fx4){return function(_0x642fx8){if(!_0x642fx8){_0x642fx4[_0x35f9[5]](404)[_0x35f9[7]]();return null};return _0x642fx8}}function saveUpdates(_0x642fxb){return function(_0x642fx8){return _0x642fx8[_0x35f9[9]](_0x642fxb)[_0x35f9[8]](function(_0x642fxc){return _0x642fxc})}}function removeEntity(_0x642fx4){return function(_0x642fx8){if(_0x642fx8){return _0x642fx8[_0x35f9[10]]()[_0x35f9[8]](function(){_0x642fx4[_0x35f9[5]](204)[_0x35f9[7]]()})}}}exports[_0x35f9[11]]=function(_0x642fxe,_0x642fx4){DeskField[_0x35f9[13]]()[_0x35f9[8]](responseWithResult(_0x642fx4))[_0x35f9[12]](handleError(_0x642fx4))};exports[_0x35f9[14]]=function(_0x642fxe,_0x642fx4){DeskField[_0x35f9[17]](_0x642fxe[_0x35f9[16]][_0x35f9[15]])[_0x35f9[8]](handleEntityNotFound(_0x642fx4))[_0x35f9[8]](responseWithResult(_0x642fx4))[_0x35f9[12]](handleError(_0x642fx4))};exports[_0x35f9[18]]=function(_0x642fxe,_0x642fx4){DeskField[_0x35f9[18]](_0x642fxe[_0x35f9[19]])[_0x35f9[8]](responseWithResult(_0x642fx4,201))[_0x35f9[12]](handleError(_0x642fx4))};exports[_0x35f9[20]]=function(_0x642fxe,_0x642fx4){if(_0x642fxe[_0x35f9[19]][_0x35f9[15]]){delete _0x642fxe[_0x35f9[19]][_0x35f9[15]]};DeskField[_0x35f9[17]](_0x642fxe[_0x35f9[16]][_0x35f9[15]])[_0x35f9[8]](handleEntityNotFound(_0x642fx4))[_0x35f9[8]](saveUpdates(_0x642fxe[_0x35f9[19]]))[_0x35f9[8]](responseWithResult(_0x642fx4))[_0x35f9[12]](handleError(_0x642fx4))};exports[_0x35f9[10]]=function(_0x642fxe,_0x642fx4){DeskField[_0x35f9[17]](_0x642fxe[_0x35f9[16]][_0x35f9[15]])[_0x35f9[8]](handleEntityNotFound(_0x642fx4))[_0x35f9[8]](removeEntity(_0x642fx4))[_0x35f9[12]](handleError(_0x642fx4))} \ No newline at end of file diff --git a/server/api/desk_field/desk_field.socket.js b/server/api/desk_field/desk_field.socket.js index b01d8f1..1ff7d12 100644 --- a/server/api/desk_field/desk_field.socket.js +++ b/server/api/desk_field/desk_field.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x768f=["\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"];_0x768f[0];var DeskField=require(_0x768f[2])[_0x768f[1]];exports[_0x768f[3]]=function(_0x4588x2){DeskField[_0x768f[4]](function(_0x4588x3){onSave(_0x4588x2,_0x4588x3)});DeskField[_0x768f[5]](function(_0x4588x3){onRemove(_0x4588x2,_0x4588x3)})};function onSave(_0x4588x2,_0x4588x3,_0x4588x5){_0x4588x2[_0x768f[7]](_0x768f[6],_0x4588x3)}function onRemove(_0x4588x2,_0x4588x3,_0x4588x5){_0x4588x2[_0x768f[7]](_0x768f[8],_0x4588x3)} \ No newline at end of file diff --git a/server/api/desk_field/index.js b/server/api/desk_field/index.js index 266676c..752b90a 100644 --- a/server/api/desk_field/index.js +++ b/server/api/desk_field/index.js @@ -1,18 +1 @@ -'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; +var _0x89da=["\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"];_0x89da[0];var express=require(_0x89da[1]);var auth=require(_0x89da[2]);var controller=require(_0x89da[3]);var router=express.Router();router[_0x89da[7]](_0x89da[4],auth[_0x89da[5]](),controller[_0x89da[6]]);router[_0x89da[7]](_0x89da[8],auth[_0x89da[5]](),controller[_0x89da[9]]);router[_0x89da[11]](_0x89da[4],auth[_0x89da[5]](),controller[_0x89da[10]]);router[_0x89da[13]](_0x89da[8],auth[_0x89da[5]](),controller[_0x89da[12]]);router[_0x89da[14]](_0x89da[8],auth[_0x89da[5]](),controller[_0x89da[12]]);router[_0x89da[16]](_0x89da[8],auth[_0x89da[5]](),controller[_0x89da[15]]);module[_0x89da[17]]=router \ No newline at end of file diff --git a/server/api/desk_field/index.spec.js b/server/api/desk_field/index.spec.js index fef888c..32fbe60 100644 --- a/server/api/desk_field/index.spec.js +++ b/server/api/desk_field/index.spec.js @@ -1,97 +1 @@ -'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; - }); - - }); - -}); +var _0xdba4=["\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"];_0xdba4[0];var proxyquire=require(_0xdba4[2])[_0xdba4[1]]();var deskFieldCtrlStub={index:_0xdba4[3],show:_0xdba4[4],create:_0xdba4[5],update:_0xdba4[6],destroy:_0xdba4[7]};var routerStub={get:sinon[_0xdba4[8]](),put:sinon[_0xdba4[8]](),patch:sinon[_0xdba4[8]](),post:sinon[_0xdba4[8]](),delete:sinon[_0xdba4[8]]()};var deskFieldIndex=proxyquire(_0xdba4[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(_0xdba4[10],function(){it(_0xdba4[11],function(){expect(deskFieldIndex)[_0xdba4[13]][_0xdba4[12]](routerStub)});describe(_0xdba4[14],function(){it(_0xdba4[15],function(){expect(routerStub[_0xdba4[21]][_0xdba4[20]](_0xdba4[19],_0xdba4[3]))[_0xdba4[13]][_0xdba4[18]][_0xdba4[17]][_0xdba4[16]]})});describe(_0xdba4[22],function(){it(_0xdba4[23],function(){expect(routerStub[_0xdba4[21]][_0xdba4[20]](_0xdba4[24],_0xdba4[4]))[_0xdba4[13]][_0xdba4[18]][_0xdba4[17]][_0xdba4[16]]})});describe(_0xdba4[25],function(){it(_0xdba4[26],function(){expect(routerStub[_0xdba4[27]][_0xdba4[20]](_0xdba4[19],_0xdba4[5]))[_0xdba4[13]][_0xdba4[18]][_0xdba4[17]][_0xdba4[16]]})});describe(_0xdba4[28],function(){it(_0xdba4[29],function(){expect(routerStub[_0xdba4[30]][_0xdba4[20]](_0xdba4[24],_0xdba4[6]))[_0xdba4[13]][_0xdba4[18]][_0xdba4[17]][_0xdba4[16]]})});describe(_0xdba4[31],function(){it(_0xdba4[29],function(){expect(routerStub[_0xdba4[32]][_0xdba4[20]](_0xdba4[24],_0xdba4[6]))[_0xdba4[13]][_0xdba4[18]][_0xdba4[17]][_0xdba4[16]]})});describe(_0xdba4[33],function(){it(_0xdba4[34],function(){expect(routerStub[_0xdba4[35]][_0xdba4[20]](_0xdba4[24],_0xdba4[7]))[_0xdba4[13]][_0xdba4[18]][_0xdba4[17]][_0xdba4[16]]})})}) \ No newline at end of file diff --git a/server/api/extracted_report/extracted_report.controller.js b/server/api/extracted_report/extracted_report.controller.js index 3d57d37..1e09055 100644 --- a/server/api/extracted_report/extracted_report.controller.js +++ b/server/api/extracted_report/extracted_report.controller.js @@ -1,197 +1 @@ -'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); -} +var _0x9d6b=["\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"];_0x9d6b[0];var _=require(_0x9d6b[1]);var ExtractedReport=require(_0x9d6b[3])[_0x9d6b[2]];var util=require(_0x9d6b[4]);var path=require(_0x9d6b[5]);var moment=require(_0x9d6b[6]);var config=require(_0x9d6b[7]);var base64=require(_0x9d6b[8]);var fs=require(_0x9d6b[9]);var Util=require(_0x9d6b[10]);exports[_0x9d6b[11]]=function(_0xa00exa,_0xa00exb,_0xa00exc){return ExtractedReport[_0x9d6b[18]](Util[_0x9d6b[17]](_0xa00exa[_0x9d6b[16]]))[_0x9d6b[15]](function(_0xa00exe){_0xa00exb[_0x9d6b[14]](200)[_0x9d6b[13]](_0xa00exe)})[_0x9d6b[12]](function(_0xa00exd){return handleError(_0xa00exb,_0xa00exd)})};exports[_0x9d6b[19]]=function(_0xa00exa,_0xa00exb){ExtractedReport[_0x9d6b[23]](_0xa00exa[_0x9d6b[22]][_0x9d6b[21]])[_0x9d6b[15]](function(_0xa00exf){if(!_0xa00exf){return _0xa00exb[_0x9d6b[20]](404)};return _0xa00exb[_0x9d6b[13]](_0xa00exf)})[_0x9d6b[12]](function(_0xa00exd){return handleError(_0xa00exb,_0xa00exd)})};exports[_0x9d6b[24]]=function(_0xa00exa,_0xa00exb){ExtractedReport[_0x9d6b[23]](_0xa00exa[_0x9d6b[22]][_0x9d6b[21]])[_0x9d6b[15]](function(_0xa00ex10){if(!_0xa00ex10){return _0xa00exb[_0x9d6b[14]](404)[_0x9d6b[13]](_0xa00ex10)};var _0xa00ex11=path[_0x9d6b[31]](config[_0x9d6b[26]],_0x9d6b[27],_0x9d6b[28],_0x9d6b[29],_0xa00ex10[_0x9d6b[30]]);base64[_0x9d6b[32]](_0xa00ex11,function(_0xa00exd,_0xa00ex12){if(_0xa00exd){console[_0x9d6b[25]](_0xa00exd);return handleError(_0xa00exb,_0xa00exd)}else {return _0xa00exb[_0x9d6b[14]](200)[_0x9d6b[13]]({downloadString:_0xa00ex12})}})})[_0x9d6b[12]](function(_0xa00exd){console[_0x9d6b[25]](_0xa00exd);return handleError(_0xa00exb,_0xa00exd)})};exports[_0x9d6b[33]]=function(_0xa00exa,_0xa00exb){ExtractedReport[_0x9d6b[33]](_0xa00exa[_0x9d6b[34]])[_0x9d6b[15]](function(_0xa00exf){return _0xa00exb[_0x9d6b[14]](201)[_0x9d6b[13]](_0xa00exf)})[_0x9d6b[12]](function(_0xa00exd){return handleError(_0xa00exb,_0xa00exd)})};exports[_0x9d6b[35]]=function(_0xa00exa,_0xa00exb){ExtractedReport[_0x9d6b[39]]({where:{name:_0xa00exa[_0x9d6b[34]][_0x9d6b[38]],id:{$ne:_0xa00exa[_0x9d6b[34]][_0x9d6b[21]]}}})[_0x9d6b[15]](function(_0xa00ex13){if(!_0xa00ex13){return _0xa00exb[_0x9d6b[20]](404)};if(_0xa00exa[_0x9d6b[34]][_0x9d6b[21]]){delete _0xa00exa[_0x9d6b[34]][_0x9d6b[21]]};ExtractedReport[_0x9d6b[23]](_0xa00exa[_0x9d6b[22]][_0x9d6b[21]])[_0x9d6b[15]](function(_0xa00exf){if(!_0xa00exf){return _0xa00exb[_0x9d6b[20]](404)};var _0xa00ex14=_[_0x9d6b[36]](_0xa00exf,_0xa00exa[_0x9d6b[34]]);_0xa00ex14[_0x9d6b[37]]()[_0x9d6b[15]](function(){return _0xa00exb[_0x9d6b[14]](200)[_0x9d6b[13]](_0xa00exf)})[_0x9d6b[12]](function(_0xa00exd){return handleError(_0xa00exb,_0xa00exd)})})[_0x9d6b[12]](function(_0xa00exd){return handleError(_0xa00exb,_0xa00exd)})})[_0x9d6b[12]](function(_0xa00exd){return handleError(_0xa00exb,_0xa00exd)})};exports[_0x9d6b[40]]=function(_0xa00exa,_0xa00exb){var _0xa00ex15;ExtractedReport[_0x9d6b[23]](_0xa00exa[_0x9d6b[22]][_0x9d6b[21]])[_0x9d6b[15]](function(_0xa00exf){_0xa00ex15=_0xa00exf;if(!_0xa00exf){return _0xa00exb[_0x9d6b[20]](404)};return _0xa00exf[_0x9d6b[40]]()})[_0x9d6b[15]](function(){if(_0xa00ex15[_0x9d6b[30]]){var _0xa00ex11=path[_0x9d6b[31]](config[_0x9d6b[26]],_0x9d6b[27],_0x9d6b[28],_0x9d6b[29],_0xa00ex15[_0x9d6b[30]]);fs[_0x9d6b[48]](_0xa00ex11,fs[_0x9d6b[41]]|fs[_0x9d6b[42]],function(_0xa00exd){if(_0xa00exd){console[_0x9d6b[44]](_0x9d6b[43])}else {fs[_0x9d6b[47]](_0xa00ex11,function(_0xa00exd){if(_0xa00exd){console[_0x9d6b[44]](_0x9d6b[45],_0xa00exd)}else {console[_0x9d6b[25]](_0x9d6b[46])}})}})};return _0xa00exb[_0x9d6b[20]](204)})[_0x9d6b[12]](function(_0xa00exd){console[_0x9d6b[25]](_0xa00exd);return handleError(_0xa00exb,_0xa00exd)})};exports[_0x9d6b[49]]=function(_0xa00exa,_0xa00exb){ExtractedReport[_0x9d6b[39]]({where:{id:_0xa00exa[_0x9d6b[16]][_0x9d6b[51]]}})[_0x9d6b[15]](function(_0xa00ex16){_0xa00ex16[_0x9d6b[50]](function(_0xa00exf){_0xa00exf[_0x9d6b[40]]()[_0x9d6b[15]](function(){if(_0xa00exf[_0x9d6b[30]]){var _0xa00ex11=path[_0x9d6b[31]](config[_0x9d6b[26]],_0x9d6b[27],_0x9d6b[28],_0x9d6b[29],_0xa00exf[_0x9d6b[30]]);fs[_0x9d6b[48]](_0xa00ex11,fs[_0x9d6b[41]]|fs[_0x9d6b[42]],function(_0xa00exd){if(_0xa00exd){console[_0x9d6b[44]](_0x9d6b[43])}else {fs[_0x9d6b[47]](_0xa00ex11,function(_0xa00exd){if(_0xa00exd){console[_0x9d6b[44]](_0x9d6b[45],_0xa00exd)}else {console[_0x9d6b[25]](_0x9d6b[46])}})}})}})[_0x9d6b[12]](function(_0xa00exd){console[_0x9d6b[25]](_0xa00exd)})});return _0xa00exb[_0x9d6b[20]](204)})[_0x9d6b[12]](function(_0xa00exd){return handleError(_0xa00exb,_0xa00exd)})};function handleError(_0xa00exb,_0xa00exd){return _0xa00exb[_0x9d6b[14]](500)[_0x9d6b[13]](_0xa00exd)} \ No newline at end of file diff --git a/server/api/extracted_report/extracted_report.socket.js b/server/api/extracted_report/extracted_report.socket.js index faf3482..876d332 100644 --- a/server/api/extracted_report/extracted_report.socket.js +++ b/server/api/extracted_report/extracted_report.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xd56d=["\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"];_0xd56d[0];var ExtractedReport=require(_0xd56d[2])[_0xd56d[1]];exports[_0xd56d[3]]=function(_0x94cex2){ExtractedReport[_0xd56d[4]](function(_0x94cex3){onSave(_0x94cex2,_0x94cex3)});ExtractedReport[_0xd56d[5]](function(_0x94cex3){onRemove(_0x94cex2,_0x94cex3)})};function onSave(_0x94cex2,_0x94cex3,_0x94cex5){_0x94cex2[_0xd56d[7]](_0xd56d[6],_0x94cex3)}function onRemove(_0x94cex2,_0x94cex3,_0x94cex5){_0x94cex2[_0xd56d[7]](_0xd56d[8],_0x94cex3)} \ No newline at end of file diff --git a/server/api/extracted_report/extracted_report.spec.js b/server/api/extracted_report/extracted_report.spec.js index 0830865..e84f203 100644 --- a/server/api/extracted_report/extracted_report.spec.js +++ b/server/api/extracted_report/extracted_report.spec.js @@ -1,20 +1 @@ -'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(); - }); - }); -}); +var _0xc7fb=["\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"];_0xc7fb[0];var should=require(_0xc7fb[1]);var app=require(_0xc7fb[2]);var request=require(_0xc7fb[3]);describe(_0xc7fb[4],function(){it(_0xc7fb[5],function(_0x2fa3x4){request(app)[_0xc7fb[13]](_0xc7fb[12])[_0xc7fb[11]](200)[_0xc7fb[11]](_0xc7fb[10],/json/)[_0xc7fb[9]](function(_0x2fa3x5,_0x2fa3x6){if(_0x2fa3x5){return _0x2fa3x4(_0x2fa3x5)};_0x2fa3x6[_0xc7fb[8]][_0xc7fb[1]][_0xc7fb[7]][_0xc7fb[6]](Array);_0x2fa3x4()})})}) \ No newline at end of file diff --git a/server/api/extracted_report/index.js b/server/api/extracted_report/index.js index 21b8e1c..3b9f75e 100644 --- a/server/api/extracted_report/index.js +++ b/server/api/extracted_report/index.js @@ -1,18 +1 @@ -'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; +var _0xe806=["\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"];_0xe806[0];var express=require(_0xe806[1]);var controller=require(_0xe806[2]);var auth=require(_0xe806[3]);var router=express.Router();router[_0xe806[7]](_0xe806[4],auth[_0xe806[5]](),controller[_0xe806[6]]);router[_0xe806[7]](_0xe806[8],auth[_0xe806[5]](),controller[_0xe806[9]]);router[_0xe806[7]](_0xe806[10],auth[_0xe806[5]](),controller[_0xe806[11]]);router[_0xe806[13]](_0xe806[4],auth[_0xe806[5]](),controller[_0xe806[12]]);router[_0xe806[15]](_0xe806[10],auth[_0xe806[5]](),controller[_0xe806[14]]);router[_0xe806[16]](_0xe806[10],auth[_0xe806[5]](),controller[_0xe806[14]]);router[_0xe806[18]](_0xe806[4],auth[_0xe806[5]](),controller[_0xe806[17]]);router[_0xe806[18]](_0xe806[10],auth[_0xe806[5]](),controller[_0xe806[19]]);module[_0xe806[20]]=router \ No newline at end of file diff --git a/server/api/fax_account/fax_account.controller.js b/server/api/fax_account/fax_account.controller.js index d550303..1139417 100644 --- a/server/api/fax_account/fax_account.controller.js +++ b/server/api/fax_account/fax_account.controller.js @@ -1,374 +1 @@ -'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); -} +var _0xf8fa=["\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"];_0xf8fa[0];var _=require(_0xf8fa[1]);var util=require(_0xf8fa[2]);var async=require(_0xf8fa[3]);var Trunk=require(_0xf8fa[5])[_0xf8fa[4]];var FaxAccount=require(_0xf8fa[5])[_0xf8fa[6]];var FaxApplication=require(_0xf8fa[5])[_0xf8fa[7]];var VoiceExtension=require(_0xf8fa[5])[_0xf8fa[8]];var sequelize=require(_0xf8fa[5])[_0xf8fa[9]];exports[_0xf8fa[10]]=function(_0xa2e3x9,_0xa2e3xa,_0xa2e3xb){var _0xa2e3xc=[_0xf8fa[11],_0xf8fa[12],_0xf8fa[13]];var _0xa2e3xd=_0xa2e3x9[_0xf8fa[15]][_0xf8fa[14]]?parseInt(_0xa2e3x9[_0xf8fa[15]][_0xf8fa[14]],10):100;var _0xa2e3xe=_0xa2e3x9[_0xf8fa[15]][_0xf8fa[16]]?parseInt(_0xa2e3x9[_0xf8fa[15]][_0xf8fa[16]],10):0;var _0xa2e3xf={where:{},limit:_0xa2e3xd,offset:_0xa2e3xe*_0xa2e3xd};_[_0xf8fa[30]](_0xa2e3x9[_0xf8fa[15]],function(_0xa2e3x10,_0xa2e3x11){switch(_0xa2e3x11){case _0xf8fa[14]:;case _0xf8fa[16]:break;case _0xf8fa[19]:_0xa2e3xf[_0xf8fa[17]]=util[_0xf8fa[22]](_0xf8fa[18],_0xa2e3x9[_0xf8fa[15]][_0xf8fa[19]],_0xa2e3x9[_0xf8fa[15]][_0xf8fa[20]]||_0xf8fa[21])||null;break;case _0xf8fa[20]:break;case _0xf8fa[28]:_0xa2e3xf[_0xf8fa[24]][_0xf8fa[23]]=[];_0xa2e3xc[_0xf8fa[27]](function(_0xa2e3x12){var _0xa2e3x13={};_0xa2e3x13[_0xa2e3x12]={$like:_0xf8fa[25]+_0xa2e3x10+_0xf8fa[25]};_0xa2e3xf[_0xf8fa[24]][_0xf8fa[23]][_0xf8fa[26]](_0xa2e3x13)});break;default:_0xa2e3xf[_0xf8fa[24]][_0xa2e3x11]={$like:{}};_0xa2e3xf[_0xf8fa[24]][_0xa2e3x11][_0xf8fa[29]]=_0xf8fa[25]+_0xa2e3x10+_0xf8fa[25]}});FaxAccount[_0xf8fa[45]](_0xa2e3xf)[_0xf8fa[44]](function(_0xa2e3x15){var _0xa2e3x16=Math[_0xf8fa[36]](_0xa2e3x15[_0xf8fa[35]]/_0xa2e3xd);var _0xa2e3x17=_0xa2e3x16>(_0xa2e3xf[_0xf8fa[37]]+1)?util[_0xf8fa[22]](_0xf8fa[38],_0xa2e3x9[_0xf8fa[39]],_0xa2e3x9[_0xf8fa[41]][_0xf8fa[40]],_0xa2e3x9[_0xf8fa[42]],_0xa2e3xe+1):null;var _0xa2e3x18=_0xa2e3xe>0?util[_0xf8fa[22]](_0xf8fa[38],_0xa2e3x9[_0xf8fa[39]],_0xa2e3x9[_0xf8fa[41]][_0xf8fa[40]],_0xa2e3x9[_0xf8fa[42]],_0xa2e3xe-1):null;_0xa2e3xa[_0xf8fa[33]](200)[_0xf8fa[32]]({count:_0xa2e3x15[_0xf8fa[35]],rows:_0xa2e3x15[_0xf8fa[43]],next_page:_0xa2e3x17,previous_page:_0xa2e3x18,total_pages:_0xa2e3x16})})[_0xf8fa[34]](function(_0xa2e3x14){_0xa2e3xa[_0xf8fa[33]](500)[_0xf8fa[32]]({error:_0xf8fa[31]})})};exports[_0xf8fa[46]]=function(_0xa2e3x9,_0xa2e3xa,_0xa2e3xb){FaxAccount[_0xf8fa[50]](_0xa2e3x9[_0xf8fa[49]][_0xf8fa[48]])[_0xf8fa[44]](function(_0xa2e3x19){if(!_0xa2e3x19){return _0xa2e3xa[_0xf8fa[47]](404)};return _0xa2e3xa[_0xf8fa[32]](_0xa2e3x19)})[_0xf8fa[34]](function(_0xa2e3x14){return _0xa2e3xb(_0xa2e3x14)})};exports[_0xf8fa[51]]=function(_0xa2e3x9,_0xa2e3xa,_0xa2e3xb){return sequelize[_0xf8fa[62]]()[_0xf8fa[44]](function(_0xa2e3x1a){async[_0xf8fa[61]]([function(_0xa2e3x1b){return FaxAccount[_0xf8fa[51]](_0xa2e3x9[_0xf8fa[52]],{transaction:_0xa2e3x1a})[_0xf8fa[44]](function(_0xa2e3x19){_0xa2e3x1b(null,_0xa2e3x19)})[_0xf8fa[34]](function(_0xa2e3x14){_0xa2e3x1b(_0xa2e3x14)})},function(_0xa2e3x19,_0xa2e3x1b){return Trunk[_0xf8fa[50]](_0xa2e3x9[_0xf8fa[52]].TrunkId,{transaction:_0xa2e3x1a})[_0xf8fa[44]](function(_0xa2e3x1c){_0xa2e3x1b(null,_0xa2e3x19,_0xa2e3x1c)})[_0xf8fa[34]](function(_0xa2e3x14){_0xa2e3x1b(_0xa2e3x14)})},function(_0xa2e3x19,_0xa2e3x1c,_0xa2e3x1b){return VoiceExtension[_0xf8fa[51]]({context:_0xa2e3x1c[_0xf8fa[53]],exten:_0xa2e3x9[_0xf8fa[52]][_0xf8fa[13]],priority:1,app:_0xf8fa[54],appdata:_0xf8fa[55],type:_0xf8fa[56],TrunkId:_0xa2e3x1c[_0xf8fa[48]]},{transaction:_0xa2e3x1a})[_0xf8fa[44]](function(_0xa2e3x1d){_0xa2e3x1b(null,_0xa2e3x19)})[_0xf8fa[34]](function(_0xa2e3x14){_0xa2e3x1b(_0xa2e3x14)})}],function(_0xa2e3x14,_0xa2e3x19){if(_0xa2e3x14){console[_0xf8fa[57]](_0xa2e3x14);_0xa2e3x1a[_0xf8fa[58]]();return _0xa2e3xa[_0xf8fa[33]](404)[_0xf8fa[32]](_0xa2e3x14)}else {console[_0xf8fa[57]](_0xf8fa[59]);_0xa2e3x1a[_0xf8fa[60]]();return _0xa2e3xa[_0xf8fa[33]](201)[_0xf8fa[32]](_0xa2e3x19)}})})};exports[_0xf8fa[63]]=function(_0xa2e3x9,_0xa2e3xa,_0xa2e3xb){if(_0xa2e3x9[_0xf8fa[52]][_0xf8fa[48]]){delete _0xa2e3x9[_0xf8fa[52]][_0xf8fa[48]]};return sequelize[_0xf8fa[62]]()[_0xf8fa[44]](function(_0xa2e3x1a){async[_0xf8fa[61]]([function(_0xa2e3x1b){return FaxAccount[_0xf8fa[64]]({where:{id:_0xa2e3x9[_0xf8fa[49]][_0xf8fa[48]]},include:[{model:Trunk}]},{transaction:_0xa2e3x1a})[_0xf8fa[44]](function(_0xa2e3x19){_0xa2e3x1b(null,_0xa2e3x19)})[_0xf8fa[34]](function(_0xa2e3x14){_0xa2e3x1b(_0xa2e3x14)})},function(_0xa2e3x19,_0xa2e3x1b){return Trunk[_0xf8fa[50]](_0xa2e3x9[_0xf8fa[52]].TrunkId,{transaction:_0xa2e3x1a})[_0xf8fa[44]](function(_0xa2e3x1e){return _0xa2e3x19[_0xf8fa[65]]({TrunkId:_0xa2e3x1e[_0xf8fa[48]]},{transaction:_0xa2e3x1a})[_0xf8fa[44]](function(_0xa2e3x1f){_0xa2e3x1b(null,_0xa2e3x19,_0xa2e3x1e)})[_0xf8fa[34]](function(_0xa2e3x14){_0xa2e3x1b(_0xa2e3x14)})})[_0xf8fa[34]](function(_0xa2e3x14){_0xa2e3x1b(_0xa2e3x14)})},function(_0xa2e3x19,_0xa2e3x1e,_0xa2e3x1b){return VoiceExtension[_0xf8fa[64]]({where:{priority:1,exten:_0xa2e3x19[_0xf8fa[13]],context:_0xa2e3x19[_0xf8fa[4]][_0xf8fa[53]]}},{transaction:_0xa2e3x1a})[_0xf8fa[44]](function(_0xa2e3x1d){if(!_0xa2e3x1d){_0xa2e3x1b(null,_0xa2e3x19)};return _0xa2e3x1d[_0xf8fa[65]]({exten:_0xa2e3x9[_0xf8fa[52]][_0xf8fa[13]],context:_0xa2e3x1e[_0xf8fa[53]],TrunkId:_0xa2e3x9[_0xf8fa[52]][_0xf8fa[67]]},{transaction:_0xa2e3x1a})[_0xf8fa[44]](function(){console[_0xf8fa[57]](_0xf8fa[66]);_0xa2e3x1b(null,_0xa2e3x19)})[_0xf8fa[34]](function(_0xa2e3x14){_0xa2e3x1b(_0xa2e3x14)})})[_0xf8fa[34]](function(_0xa2e3x14){_0xa2e3x1b(_0xa2e3x14)})},function(_0xa2e3x19,_0xa2e3x1b){var _0xa2e3x20=_[_0xf8fa[68]](_0xa2e3x19,_0xa2e3x9[_0xf8fa[52]]);return _0xa2e3x20[_0xf8fa[70]]({transaction:_0xa2e3x1a})[_0xf8fa[44]](function(){console[_0xf8fa[57]](_0xf8fa[69]);_0xa2e3x1b(null,_0xa2e3x19)})[_0xf8fa[34]](function(_0xa2e3x14){_0xa2e3x1b(_0xa2e3x14)})}],function(_0xa2e3x14,_0xa2e3x19){if(_0xa2e3x14){console[_0xf8fa[57]](_0xa2e3x14);_0xa2e3x1a[_0xf8fa[58]]();return _0xa2e3xa[_0xf8fa[33]](404)[_0xf8fa[32]](_0xa2e3x14)}else {console[_0xf8fa[57]](_0xf8fa[59]);_0xa2e3x1a[_0xf8fa[60]]();return _0xa2e3xa[_0xf8fa[33]](201)[_0xf8fa[32]](_0xa2e3x19)}})})};exports[_0xf8fa[71]]=function(_0xa2e3x9,_0xa2e3xa,_0xa2e3xb){FaxAccount[_0xf8fa[72]]({where:{id:_0xa2e3x9[_0xf8fa[49]][_0xf8fa[48]]}})[_0xf8fa[44]](function(_0xa2e3x19){if(!_0xa2e3x19){return _0xa2e3xa[_0xf8fa[47]](404)};_0xa2e3x19[_0xf8fa[71]]()[_0xf8fa[44]](function(){return _0xa2e3xa[_0xf8fa[47]](204)})[_0xf8fa[34]](function(_0xa2e3x14){_0xa2e3xb(_0xa2e3x14)})})[_0xf8fa[34]](function(_0xa2e3x14){_0xa2e3xb(_0xa2e3x14)})};exports[_0xf8fa[73]]=function(_0xa2e3x9,_0xa2e3xa,_0xa2e3xb){FaxApplication[_0xf8fa[79]]({where:{id:_0xa2e3x9[_0xf8fa[52]][_0xf8fa[75]]}})[_0xf8fa[44]](function(_0xa2e3x21){var _0xa2e3x22=_0xa2e3x21;return sequelize[_0xf8fa[62]](function(_0xa2e3x1a){return FaxApplication[_0xf8fa[71]]({where:{id:_0xa2e3x9[_0xf8fa[52]][_0xf8fa[75]]}},{transaction:_0xa2e3x1a})[_0xf8fa[44]](function(){var _0xa2e3x23=[];for(var _0xa2e3x24=0;_0xa2e3x24<_0xa2e3x9[_0xf8fa[52]][_0xf8fa[75]][_0xf8fa[74]];_0xa2e3x24++){var _0xa2e3x25=_[_0xf8fa[72]](_0xa2e3x22,{"\x69\x64":_0xa2e3x9[_0xf8fa[52]][_0xf8fa[75]][_0xa2e3x24]});if(_0xa2e3x25){_0xa2e3x25[_0xf8fa[76]]=_0xa2e3x24+1;_0xa2e3x23[_0xf8fa[26]](_0xa2e3x25[_0xf8fa[77]])}};return FaxApplication[_0xf8fa[78]](_0xa2e3x23,{transaction:_0xa2e3x1a})[_0xf8fa[44]](function(_0xa2e3x1f){return _0xa2e3x1f})})})[_0xf8fa[44]](function(_0xa2e3x15){return _0xa2e3xa[_0xf8fa[33]](200)[_0xf8fa[32]](_0xa2e3x15)})[_0xf8fa[34]](function(_0xa2e3x14){return handleError(_0xa2e3xa,_0xa2e3x14)})})[_0xf8fa[34]](function(_0xa2e3x14){return _0xa2e3xb(_0xa2e3x14)})};exports[_0xf8fa[80]]=function(_0xa2e3x9,_0xa2e3xa){FaxAccount[_0xf8fa[71]]({where:{id:_0xa2e3x9[_0xf8fa[15]][_0xf8fa[48]]},individualHooks:true})[_0xf8fa[44]](function(){return _0xa2e3xa[_0xf8fa[47]](204)})[_0xf8fa[34]](function(_0xa2e3x14){return handleError(_0xa2e3xa,_0xa2e3x14)})};function handleError(_0xa2e3xa,_0xa2e3x14){return _0xa2e3xa[_0xf8fa[33]](500)[_0xf8fa[32]](_0xa2e3x14)} \ No newline at end of file diff --git a/server/api/fax_account/fax_account.socket.js b/server/api/fax_account/fax_account.socket.js index e28dde9..d2ae0a4 100644 --- a/server/api/fax_account/fax_account.socket.js +++ b/server/api/fax_account/fax_account.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x8156=["\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"];_0x8156[0];var fax_account=require(_0x8156[2])[_0x8156[1]];exports[_0x8156[3]]=function(_0xc0d5x2){fax_account[_0x8156[4]](function(_0xc0d5x3){onSave(_0xc0d5x2,_0xc0d5x3)});fax_account[_0x8156[5]](function(_0xc0d5x3){onRemove(_0xc0d5x2,_0xc0d5x3)})};function onSave(_0xc0d5x2,_0xc0d5x3,_0xc0d5x5){_0xc0d5x2[_0x8156[7]](_0x8156[6],_0xc0d5x3)}function onRemove(_0xc0d5x2,_0xc0d5x3,_0xc0d5x5){_0xc0d5x2[_0x8156[7]](_0x8156[8],_0xc0d5x3)} \ No newline at end of file diff --git a/server/api/fax_account/fax_account.spec.js b/server/api/fax_account/fax_account.spec.js index 0399e33..9e29935 100644 --- a/server/api/fax_account/fax_account.spec.js +++ b/server/api/fax_account/fax_account.spec.js @@ -1,20 +1 @@ -'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 +var _0x3c3f=["\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"];_0x3c3f[0];var should=require(_0x3c3f[1]);var app=require(_0x3c3f[2]);var request=require(_0x3c3f[3]);describe(_0x3c3f[4],function(){it(_0x3c3f[5],function(_0x4cb1x4){request(app)[_0x3c3f[13]](_0x3c3f[12])[_0x3c3f[11]](200)[_0x3c3f[11]](_0x3c3f[10],/json/)[_0x3c3f[9]](function(_0x4cb1x5,_0x4cb1x6){if(_0x4cb1x5){return _0x4cb1x4(_0x4cb1x5)};_0x4cb1x6[_0x3c3f[8]][_0x3c3f[1]][_0x3c3f[7]][_0x3c3f[6]](Array);_0x4cb1x4()})})}) \ No newline at end of file diff --git a/server/api/fax_account/index.js b/server/api/fax_account/index.js index 15886c9..9cbb0d0 100644 --- a/server/api/fax_account/index.js +++ b/server/api/fax_account/index.js @@ -1,17 +1 @@ -'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; +var _0x42c6=["\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"];_0x42c6[0];var express=require(_0x42c6[1]);var controller=require(_0x42c6[2]);var auth=require(_0x42c6[3]);var router=express.Router();router[_0x42c6[7]](_0x42c6[4],auth[_0x42c6[5]](),controller[_0x42c6[6]]);router[_0x42c6[7]](_0x42c6[8],controller[_0x42c6[9]]);router[_0x42c6[11]](_0x42c6[4],controller[_0x42c6[10]]);router[_0x42c6[11]](_0x42c6[12],controller[_0x42c6[13]]);router[_0x42c6[15]](_0x42c6[8],controller[_0x42c6[14]]);router[_0x42c6[16]](_0x42c6[8],controller[_0x42c6[14]]);router[_0x42c6[18]](_0x42c6[4],controller[_0x42c6[17]]);router[_0x42c6[18]](_0x42c6[8],controller[_0x42c6[19]]);module[_0x42c6[20]]=router \ No newline at end of file diff --git a/server/api/fax_application/fax_application.controller.js b/server/api/fax_application/fax_application.controller.js index 59b09cb..c88b53e 100644 --- a/server/api/fax_application/fax_application.controller.js +++ b/server/api/fax_application/fax_application.controller.js @@ -1,94 +1 @@ -'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); -} +var _0x243f=["\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"];_0x243f[0];var _=require(_0x243f[1]);var FaxApplication=require(_0x243f[3])[_0x243f[2]];exports[_0x243f[4]]=function(_0x66a5x3,_0x66a5x4){FaxApplication[_0x243f[10]]({where:_0x66a5x3[_0x243f[9]]})[_0x243f[8]](function(_0x66a5x6){return _0x66a5x4[_0x243f[7]](200)[_0x243f[6]](_0x66a5x6)})[_0x243f[5]](function(_0x66a5x5){return handleError(_0x66a5x4,_0x66a5x5)})};exports[_0x243f[11]]=function(_0x66a5x3,_0x66a5x4){FaxApplication[_0x243f[15]](_0x66a5x3[_0x243f[14]][_0x243f[13]])[_0x243f[8]](function(_0x66a5x7){if(!_0x66a5x7){return _0x66a5x4[_0x243f[12]](404)};return _0x66a5x4[_0x243f[6]](_0x66a5x7)})[_0x243f[5]](function(_0x66a5x5){return handleError(_0x66a5x4,_0x66a5x5)})};exports[_0x243f[16]]=function(_0x66a5x3,_0x66a5x4,_0x66a5x8){console[_0x243f[18]](_0x66a5x3[_0x243f[17]]);FaxApplication[_0x243f[21]](_0x243f[19],{where:{FaxAccountId:_0x66a5x3[_0x243f[17]][_0x243f[20]]}})[_0x243f[8]](function(_0x66a5x9){_0x66a5x3[_0x243f[17]][_0x243f[19]]=_0x66a5x9?++_0x66a5x9:1;FaxApplication[_0x243f[16]](_0x66a5x3[_0x243f[17]])[_0x243f[8]](function(_0x66a5xa){return _0x66a5x4[_0x243f[7]](201)[_0x243f[6]](_0x66a5xa)})[_0x243f[5]](function(_0x66a5x5){return _0x66a5x8(_0x66a5x5)});console[_0x243f[18]](_0x66a5x9)})[_0x243f[5]](function(_0x66a5x5){_0x66a5x8(_0x66a5x5)})};exports[_0x243f[22]]=function(_0x66a5x3,_0x66a5x4){if(_0x66a5x3[_0x243f[17]][_0x243f[13]]){delete _0x66a5x3[_0x243f[17]][_0x243f[13]]};FaxApplication[_0x243f[15]](_0x66a5x3[_0x243f[14]][_0x243f[13]])[_0x243f[8]](function(_0x66a5x7){if(!_0x66a5x7){return _0x66a5x4[_0x243f[12]](404)};var _0x66a5xb=_[_0x243f[23]](_0x66a5x7,_0x66a5x3[_0x243f[17]]);_0x66a5xb[_0x243f[24]]()[_0x243f[8]](function(){return _0x66a5x4[_0x243f[7]](200)[_0x243f[6]](_0x66a5x7)})[_0x243f[5]](function(_0x66a5x5){return handleError(_0x66a5x4,_0x66a5x5)})})[_0x243f[5]](function(_0x66a5x5){return handleError(_0x66a5x4,_0x66a5x5)})};exports[_0x243f[25]]=function(_0x66a5x3,_0x66a5x4){FaxApplication[_0x243f[26]]({where:{id:_0x66a5x3[_0x243f[14]][_0x243f[13]]}})[_0x243f[8]](function(_0x66a5x7){if(!_0x66a5x7){return _0x66a5x4[_0x243f[12]](404)};_0x66a5x7[_0x243f[25]]()[_0x243f[8]](function(){return _0x66a5x4[_0x243f[12]](204)})[_0x243f[5]](function(_0x66a5x5){return handleError(_0x66a5x4,_0x66a5x5)})})[_0x243f[5]](function(_0x66a5x5){return handleError(_0x66a5x4,_0x66a5x5)})};function handleError(_0x66a5x4,_0x66a5x5){return _0x66a5x4[_0x243f[7]](500)[_0x243f[6]](_0x66a5x5)} \ No newline at end of file diff --git a/server/api/fax_application/fax_application.socket.js b/server/api/fax_application/fax_application.socket.js index 2a677d7..a78e8ab 100644 --- a/server/api/fax_application/fax_application.socket.js +++ b/server/api/fax_application/fax_application.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xe137=["\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"];_0xe137[0];var fax_application=require(_0xe137[2])[_0xe137[1]];exports[_0xe137[3]]=function(_0x7e61x2){fax_application[_0xe137[4]](function(_0x7e61x3){onSave(_0x7e61x2,_0x7e61x3)});fax_application[_0xe137[5]](function(_0x7e61x3){onRemove(_0x7e61x2,_0x7e61x3)})};function onSave(_0x7e61x2,_0x7e61x3,_0x7e61x5){_0x7e61x2[_0xe137[7]](_0xe137[6],_0x7e61x3)}function onRemove(_0x7e61x2,_0x7e61x3,_0x7e61x5){_0x7e61x2[_0xe137[7]](_0xe137[8],_0x7e61x3)} \ No newline at end of file diff --git a/server/api/fax_application/fax_application.spec.js b/server/api/fax_application/fax_application.spec.js index 9eeaee8..83c9de1 100644 --- a/server/api/fax_application/fax_application.spec.js +++ b/server/api/fax_application/fax_application.spec.js @@ -1,20 +1 @@ -'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 +var _0xb2f3=["\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"];_0xb2f3[0];var should=require(_0xb2f3[1]);var app=require(_0xb2f3[2]);var request=require(_0xb2f3[3]);describe(_0xb2f3[4],function(){it(_0xb2f3[5],function(_0x66f9x4){request(app)[_0xb2f3[13]](_0xb2f3[12])[_0xb2f3[11]](200)[_0xb2f3[11]](_0xb2f3[10],/json/)[_0xb2f3[9]](function(_0x66f9x5,_0x66f9x6){if(_0x66f9x5){return _0x66f9x4(_0x66f9x5)};_0x66f9x6[_0xb2f3[8]][_0xb2f3[1]][_0xb2f3[7]][_0xb2f3[6]](Array);_0x66f9x4()})})}) \ No newline at end of file diff --git a/server/api/fax_application/index.js b/server/api/fax_application/index.js index b27e419..a80f265 100644 --- a/server/api/fax_application/index.js +++ b/server/api/fax_application/index.js @@ -1,15 +1 @@ -'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 +var _0x781e=["\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"];_0x781e[0];var express=require(_0x781e[1]);var controller=require(_0x781e[2]);var router=express.Router();router[_0x781e[5]](_0x781e[3],controller[_0x781e[4]]);router[_0x781e[5]](_0x781e[6],controller[_0x781e[7]]);router[_0x781e[9]](_0x781e[3],controller[_0x781e[8]]);router[_0x781e[11]](_0x781e[6],controller[_0x781e[10]]);router[_0x781e[12]](_0x781e[6],controller[_0x781e[10]]);router[_0x781e[14]](_0x781e[6],controller[_0x781e[13]]);module[_0x781e[15]]=router \ No newline at end of file diff --git a/server/api/fax_message/fax_message.ami.js b/server/api/fax_message/fax_message.ami.js index 2d69e42..9d3dec8 100644 --- a/server/api/fax_message/fax_message.ami.js +++ b/server/api/fax_message/fax_message.ami.js @@ -1,64 +1 @@ -'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); - }); - } -} +var _0xfd2a=["\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"];_0xfd2a[0];var _=require(_0xfd2a[1]);var util=require(_0xfd2a[2]);var FaxMessage=require(_0xfd2a[4])[_0xfd2a[3]];var Trunk=require(_0xfd2a[4])[_0xfd2a[5]];exports[_0xfd2a[6]]=function(_0xdbe0x5){FaxMessage[_0xfd2a[9]](function(_0xdbe0x6){console[_0xfd2a[8]](_0xfd2a[7]);onSave(_0xdbe0x5,_0xdbe0x6)})};function onSave(_0xdbe0x5,_0xdbe0x6,_0xdbe0x8){if(_0xdbe0x6[_0xfd2a[10]]===_0xfd2a[11]&&!_0xdbe0x6[_0xfd2a[12]]){var _0xdbe0x9=JSON[_0xfd2a[14]](_0xdbe0x6[_0xfd2a[13]]);console[_0xfd2a[8]](_0xfd2a[15],_0xdbe0x9);Trunk[_0xfd2a[44]](_0xdbe0x9[_0xfd2a[43]][_0xfd2a[42]])[_0xfd2a[41]](function(_0xdbe0xb){var _0xdbe0xc={Action:_0xfd2a[18],CallerID:_0xdbe0x9[_0xfd2a[19]],Channel:util[_0xfd2a[24]](_0xfd2a[20],_0xdbe0x9[_0xfd2a[21]],_0xdbe0x9[_0xfd2a[22]],_0xdbe0xb[_0xfd2a[23]]),Context:_0xfd2a[25],Exten:_0xfd2a[26],Priority:1,Async:_0xfd2a[27],Variable:{MAXRATE:_0xdbe0x9[_0xfd2a[28]],MINRATE:_0xdbe0x9[_0xfd2a[29]],ECM:_0xdbe0x9[_0xfd2a[30]]?_0xfd2a[31]:_0xfd2a[32],LOCALID:_0xdbe0x9[_0xfd2a[33]],FAXFILE:_0xdbe0x9[_0xfd2a[34]],FAXHEADER:_0xdbe0x9[_0xfd2a[35]],FAXUUID:_0xdbe0x9[_0xfd2a[36]]}};_0xdbe0x5[_0xfd2a[40]](_0xdbe0xc,function(_0xdbe0xa,_0xdbe0xd){if(_0xdbe0xa){_0xdbe0x6[_0xfd2a[38]]({status:_0xfd2a[37]})}else {if(_0xdbe0xd[_0xfd2a[39]]&&_0xdbe0xd[_0xfd2a[12]]){_0xdbe0x6[_0xfd2a[38]]({actionid:_0xdbe0xd[_0xfd2a[12]]})}}})})[_0xfd2a[17]](function(_0xdbe0xa){console[_0xfd2a[16]](_0xdbe0xa)})}} \ No newline at end of file diff --git a/server/api/fax_message/fax_message.controller.js b/server/api/fax_message/fax_message.controller.js index 153d0c9..f520fbe 100644 --- a/server/api/fax_message/fax_message.controller.js +++ b/server/api/fax_message/fax_message.controller.js @@ -1,433 +1 @@ -'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); -} +var _0xdfd6=["\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","\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","\x62\x6F\x64\x79","\x72\x6F\x6F\x74","\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","\x2E\x70\x64\x66","\x6A\x6F\x69\x6E","\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","\x76\x34","\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","\x65\x72\x72\x6F\x72","\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","\x6C\x6F\x67","\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"];_0xdfd6[0];var _=require(_0xdfd6[1]);var fs=require(_0xdfd6[2]);var path=require(_0xdfd6[3]);var uploadFile=require(_0xdfd6[4]);var uuidLib=require(_0xdfd6[5]);var pdf=require(_0xdfd6[6]);var formidable=require(_0xdfd6[7]);var exec=require(_0xdfd6[9])[_0xdfd6[8]];var config=require(_0xdfd6[10]);var FaxMessage=require(_0xdfd6[12])[_0xdfd6[11]];var FaxRoom=require(_0xdfd6[12])[_0xdfd6[13]];var FaxAccount=require(_0xdfd6[12])[_0xdfd6[14]];var Contact=require(_0xdfd6[12])[_0xdfd6[15]];exports[_0xdfd6[16]]=function(_0x2f4axe,_0x2f4axf){FaxMessage[_0xdfd6[25]]({where:_0x2f4axe[_0xdfd6[21]],order:_0xdfd6[22],include:[{model:Contact,as:_0xdfd6[23]},{model:Contact,as:_0xdfd6[24]},{model:FaxRoom,include:[{model:FaxAccount}]}]})[_0xdfd6[20]](function(_0x2f4ax11){return _0x2f4axf[_0xdfd6[19]](200)[_0xdfd6[18]](_0x2f4ax11)})[_0xdfd6[17]](function(_0x2f4ax10){return handleError(_0x2f4axf,_0x2f4ax10)})};exports[_0xdfd6[26]]=function(_0x2f4axe,_0x2f4axf){FaxMessage[_0xdfd6[30]]({where:{id:_0x2f4axe[_0xdfd6[29]][_0xdfd6[28]]},include:[{model:Contact,as:_0xdfd6[23]},{model:Contact,as:_0xdfd6[24]}]})[_0xdfd6[20]](function(_0x2f4ax12){if(!_0x2f4ax12){return _0x2f4axf[_0xdfd6[27]](404)};return _0x2f4axf[_0xdfd6[18]](_0x2f4ax12)})[_0xdfd6[17]](function(_0x2f4ax10){return handleError(_0x2f4axf,_0x2f4ax10)})};exports[_0xdfd6[31]]=function(_0x2f4axe,_0x2f4axf,_0x2f4ax13){FaxMessage[_0xdfd6[31]](_0x2f4axe[_0xdfd6[32]])[_0xdfd6[20]](function(_0x2f4ax12){return _0x2f4axf[_0xdfd6[19]](201)[_0xdfd6[18]](_0x2f4ax12)})[_0xdfd6[17]](function(_0x2f4ax10){return handleError(_0x2f4axf,_0x2f4ax10)})};function convertPdfAndSendFax(_0x2f4axe,_0x2f4axf,_0x2f4ax15,_0x2f4ax16){var _0x2f4ax17=path[_0xdfd6[40]](config[_0xdfd6[33]],_0xdfd6[34],_0xdfd6[35],_0xdfd6[36],_0xdfd6[37],_0xdfd6[38],_0x2f4ax15+_0xdfd6[39]);var _0x2f4ax18=path[_0xdfd6[40]](config[_0xdfd6[33]],_0xdfd6[34],_0xdfd6[35],_0xdfd6[36],_0xdfd6[37],_0xdfd6[41],_0x2f4ax15+_0xdfd6[42]);var _0x2f4ax19=_0xdfd6[43]+_0xdfd6[44]+_0xdfd6[45]+_0x2f4ax18+_0xdfd6[46]+_0x2f4ax17;var _0x2f4ax1a=uuidLib[_0xdfd6[47]]();FaxAccount[_0xdfd6[75]](_0x2f4ax16[_0xdfd6[71]])[_0xdfd6[20]](function(_0x2f4ax1b){if(_0x2f4ax1b){var _0x2f4ax1c={technology:_0xdfd6[48],to:_0x2f4ax16[_0xdfd6[49]],from:_0x2f4ax1b[_0xdfd6[50]],fax_file:_0x2f4ax18,fax_header:_0x2f4ax1b[_0xdfd6[51]],fax_localid:_0x2f4ax1b[_0xdfd6[52]],maxrate:_0x2f4ax1b[_0xdfd6[53]],minrate:_0x2f4ax1b[_0xdfd6[54]],ecm:_0x2f4ax1b[_0xdfd6[55]],uuid:_0x2f4ax1a,trunk:{id:_0x2f4ax1b[_0xdfd6[56]]}};fs[_0xdfd6[74]](_0x2f4ax17,function(_0x2f4ax1d){if(!_0x2f4ax1d){handleError(_0x2f4axf, new Error(_0xdfd6[57]))}else {exec(_0x2f4ax19,function(_0x2f4ax10){if(_0x2f4ax10){console[_0xdfd6[58]](_0x2f4ax10);handleError(_0x2f4axf,_0x2f4ax10)}else {console[_0xdfd6[60]](_0xdfd6[59]);fs[_0xdfd6[73]](_0x2f4ax18,511,function(_0x2f4ax10){if(_0x2f4ax16[_0xdfd6[61]]){FaxRoom[_0xdfd6[65]]({where:{id:_0x2f4ax16[_0xdfd6[61]]},defaults:{}})[_0xdfd6[63]](function(_0x2f4ax1e,_0x2f4ax1f){FaxMessage[_0xdfd6[31]]({status:_0xdfd6[68],read:true,filenamePDF:_0x2f4ax15+_0xdfd6[39],filename:_0x2f4ax15+_0xdfd6[42],body:JSON[_0xdfd6[69]](_0x2f4ax1c),uuid:_0x2f4ax1a,FaxRoomId:_0x2f4ax1e[_0xdfd6[28]]})[_0xdfd6[20]](function(_0x2f4ax20){Contact[_0xdfd6[65]]({where:{phone:_0x2f4ax1c[_0xdfd6[64]]},defaults:{phone:_0x2f4ax1c[_0xdfd6[64]],fullname:_0x2f4ax1c[_0xdfd6[64]]}})[_0xdfd6[63]](function(_0x2f4ax21,_0x2f4ax1f){_0x2f4ax20[_0xdfd6[62]](_0x2f4ax21)});Contact[_0xdfd6[65]]({where:{phone:_0x2f4ax1c[_0xdfd6[67]]},defaults:{phone:_0x2f4ax1c[_0xdfd6[67]],fullname:_0x2f4ax1c[_0xdfd6[67]]}})[_0xdfd6[63]](function(_0x2f4ax21,_0x2f4ax1f){_0x2f4ax20[_0xdfd6[66]](_0x2f4ax21)});return _0x2f4axf[_0xdfd6[19]](200)[_0xdfd6[18]](_0x2f4ax20)})[_0xdfd6[17]](function(_0x2f4ax10){handleError(_0x2f4axf,_0x2f4ax10)})})}else {FaxRoom[_0xdfd6[31]]({status:_0xdfd6[70],from:_0x2f4ax16[_0xdfd6[49]],FaxAccountId:_0x2f4ax16[_0xdfd6[71]],UserId:_0x2f4ax16[_0xdfd6[72]]})[_0xdfd6[20]](function(_0x2f4ax1e){FaxMessage[_0xdfd6[31]]({status:_0xdfd6[68],read:true,filenamePDF:_0x2f4ax15+_0xdfd6[39],filename:_0x2f4ax15+_0xdfd6[42],body:JSON[_0xdfd6[69]](_0x2f4ax1c),uuid:_0x2f4ax1a,FaxRoomId:_0x2f4ax1e[_0xdfd6[28]]})[_0xdfd6[20]](function(_0x2f4ax20){Contact[_0xdfd6[65]]({where:{phone:_0x2f4ax1c[_0xdfd6[64]]},defaults:{phone:_0x2f4ax1c[_0xdfd6[64]],fullname:_0x2f4ax1c[_0xdfd6[64]]}})[_0xdfd6[63]](function(_0x2f4ax21,_0x2f4ax1f){_0x2f4ax20[_0xdfd6[62]](_0x2f4ax21)});Contact[_0xdfd6[65]]({where:{phone:_0x2f4ax1c[_0xdfd6[67]]},defaults:{phone:_0x2f4ax1c[_0xdfd6[67]],fullname:_0x2f4ax1c[_0xdfd6[67]]}})[_0xdfd6[63]](function(_0x2f4ax21,_0x2f4ax1f){_0x2f4ax20[_0xdfd6[66]](_0x2f4ax21)});return _0x2f4axf[_0xdfd6[19]](200)[_0xdfd6[18]](_0x2f4ax20)})[_0xdfd6[17]](function(_0x2f4ax10){handleError(_0x2f4axf,_0x2f4ax10)})})[_0xdfd6[17]](function(_0x2f4ax10){handleError(_0x2f4axf,_0x2f4ax10)})}})}})}})}})}exports[_0xdfd6[76]]=function(_0x2f4axe,_0x2f4axf){if(_0x2f4axe[_0xdfd6[32]][_0xdfd6[28]]){delete _0x2f4axe[_0xdfd6[32]][_0xdfd6[28]]};FaxMessage[_0xdfd6[30]]({where:{id:_0x2f4axe[_0xdfd6[29]][_0xdfd6[28]]},include:[{model:Contact,as:_0xdfd6[23]},{model:Contact,as:_0xdfd6[24]}]})[_0xdfd6[20]](function(_0x2f4ax12){if(!_0x2f4ax12){return _0x2f4axf[_0xdfd6[27]](404)};var _0x2f4ax22=_[_0xdfd6[77]](_0x2f4ax12,_0x2f4axe[_0xdfd6[32]]);_0x2f4ax22[_0xdfd6[78]]()[_0xdfd6[20]](function(){return _0x2f4axf[_0xdfd6[19]](200)[_0xdfd6[18]](_0x2f4ax12)})[_0xdfd6[17]](function(_0x2f4ax10){return handleError(_0x2f4axf,_0x2f4ax10)})})[_0xdfd6[17]](function(_0x2f4ax10){return handleError(_0x2f4axf,_0x2f4ax10)})};exports[_0xdfd6[79]]=function(_0x2f4axe,_0x2f4axf){FaxMessage[_0xdfd6[80]]({where:{id:_0x2f4axe[_0xdfd6[29]][_0xdfd6[28]]}})[_0xdfd6[20]](function(_0x2f4ax12){if(!_0x2f4ax12){return _0x2f4axf[_0xdfd6[27]](404)};_0x2f4ax12[_0xdfd6[79]]()[_0xdfd6[20]](function(){return _0x2f4axf[_0xdfd6[27]](204)})[_0xdfd6[17]](function(_0x2f4ax10){return handleError(_0x2f4axf,_0x2f4ax10)})})[_0xdfd6[17]](function(_0x2f4ax10){return handleError(_0x2f4axf,_0x2f4ax10)})};exports[_0xdfd6[81]]=function(_0x2f4axe,_0x2f4axf){FaxMessage[_0xdfd6[75]](_0x2f4axe[_0xdfd6[29]][_0xdfd6[28]])[_0xdfd6[20]](function(_0x2f4ax12){if(!_0x2f4ax12){return _0x2f4axf[_0xdfd6[27]](404)};if(_0x2f4ax12[_0xdfd6[82]]){if(_0x2f4ax12[_0xdfd6[19]]===_0xdfd6[83]){var _0x2f4ax23=path[_0xdfd6[40]](config[_0xdfd6[33]],_0xdfd6[34],_0xdfd6[35],_0xdfd6[36],_0xdfd6[84],_0x2f4ax12[_0xdfd6[82]]);fs[_0xdfd6[74]](_0x2f4ax23,function(_0x2f4ax1d){if(_0x2f4ax1d){return _0x2f4axf[_0xdfd6[85]](_0x2f4ax23)}else {return _0x2f4axf[_0xdfd6[27]](404)}})}else {if(_0x2f4ax12[_0xdfd6[19]]===_0xdfd6[68]||_0x2f4ax12[_0xdfd6[86]]===_0xdfd6[87]||_0x2f4ax12[_0xdfd6[19]]===_0xdfd6[88]){var _0x2f4ax23=path[_0xdfd6[40]](config[_0xdfd6[33]],_0xdfd6[34],_0xdfd6[35],_0xdfd6[36],_0xdfd6[37],_0xdfd6[38],_0x2f4ax12[_0xdfd6[82]]);fs[_0xdfd6[74]](_0x2f4ax23,function(_0x2f4ax1d){if(_0x2f4ax1d){return _0x2f4axf[_0xdfd6[85]](_0x2f4ax23)}else {return _0x2f4axf[_0xdfd6[27]](404)}})}}}else {_0x2f4axf[_0xdfd6[27]](404)}})[_0xdfd6[17]](function(_0x2f4ax10){return handleError(_0x2f4axf,_0x2f4ax10)})};function handleError(_0x2f4axf,_0x2f4ax10){return _0x2f4axf[_0xdfd6[19]](500)[_0xdfd6[18]](_0x2f4ax10)} \ No newline at end of file diff --git a/server/api/fax_message/fax_message.socket.js b/server/api/fax_message/fax_message.socket.js index 79a31ad..e9f5774 100644 --- a/server/api/fax_message/fax_message.socket.js +++ b/server/api/fax_message/fax_message.socket.js @@ -1,85 +1 @@ -/** - * 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); -} +var _0x570e=["\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"];_0x570e[0];var FaxMessage=require(_0x570e[2])[_0x570e[1]];var Contact=require(_0x570e[2])[_0x570e[3]];var FaxRoom=require(_0x570e[2])[_0x570e[4]];var FaxAccount=require(_0x570e[2])[_0x570e[5]];exports[_0x570e[6]]=function(_0x6b5ax5){FaxMessage[_0x570e[14]](function(_0x6b5ax6){FaxMessage[_0x570e[13]]({where:{id:_0x6b5ax6[_0x570e[10]]},include:[{model:Contact,as:_0x570e[11]},{model:Contact,as:_0x570e[12]},{model:FaxRoom,include:[{model:FaxAccount}]}]})[_0x570e[9]](function(_0x6b5ax8){onSave(_0x6b5ax5,_0x6b5ax8)})[_0x570e[8]](function(_0x6b5ax7){console[_0x570e[7]](_0x6b5ax7)})});FaxMessage[_0x570e[15]](function(_0x6b5ax6){FaxMessage[_0x570e[13]]({where:{id:_0x6b5ax6[_0x570e[10]]},include:[{model:Contact,as:_0x570e[11]},{model:Contact,as:_0x570e[12]},{model:FaxRoom,include:[{model:FaxAccount}]}]})[_0x570e[9]](function(_0x6b5ax8){onSave(_0x6b5ax5,_0x6b5ax8);onUpdate(_0x6b5ax5,_0x6b5ax8)})[_0x570e[8]](function(_0x6b5ax7){console[_0x570e[7]](_0x6b5ax7)})});FaxMessage[_0x570e[16]](function(_0x6b5ax6){onRemove(_0x6b5ax5,_0x6b5ax6)})};function onSave(_0x6b5ax5,_0x6b5ax6,_0x6b5axa){_0x6b5ax5[_0x570e[18]](_0x570e[17],_0x6b5ax6)}function onUpdate(_0x6b5ax5,_0x6b5ax6,_0x6b5axa){_0x6b5ax5[_0x570e[18]](_0x570e[19],_0x6b5ax6)}function onRemove(_0x6b5ax5,_0x6b5ax6,_0x6b5axa){_0x6b5ax5[_0x570e[18]](_0x570e[20],_0x6b5ax6)} \ No newline at end of file diff --git a/server/api/fax_message/fax_message.spec.js b/server/api/fax_message/fax_message.spec.js index d61f66e..eea43c7 100644 --- a/server/api/fax_message/fax_message.spec.js +++ b/server/api/fax_message/fax_message.spec.js @@ -1,20 +1 @@ -'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 +var _0x52be=["\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"];_0x52be[0];var should=require(_0x52be[1]);var app=require(_0x52be[2]);var request=require(_0x52be[3]);describe(_0x52be[4],function(){it(_0x52be[5],function(_0x80aax4){request(app)[_0x52be[13]](_0x52be[12])[_0x52be[11]](200)[_0x52be[11]](_0x52be[10],/json/)[_0x52be[9]](function(_0x80aax5,_0x80aax6){if(_0x80aax5){return _0x80aax4(_0x80aax5)};_0x80aax6[_0x52be[8]][_0x52be[1]][_0x52be[7]][_0x52be[6]](Array);_0x80aax4()})})}) \ No newline at end of file diff --git a/server/api/fax_message/index.js b/server/api/fax_message/index.js index b237a79..c67b275 100644 --- a/server/api/fax_message/index.js +++ b/server/api/fax_message/index.js @@ -1,16 +1 @@ -'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; +var _0xae6a=["\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"];_0xae6a[0];var express=require(_0xae6a[1]);var controller=require(_0xae6a[2]);var router=express.Router();router[_0xae6a[5]](_0xae6a[3],controller[_0xae6a[4]]);router[_0xae6a[5]](_0xae6a[6],controller[_0xae6a[7]]);router[_0xae6a[5]](_0xae6a[8],controller[_0xae6a[9]]);router[_0xae6a[11]](_0xae6a[3],controller[_0xae6a[10]]);router[_0xae6a[13]](_0xae6a[8],controller[_0xae6a[12]]);router[_0xae6a[14]](_0xae6a[8],controller[_0xae6a[12]]);router[_0xae6a[16]](_0xae6a[8],controller[_0xae6a[15]]);module[_0xae6a[17]]=router \ No newline at end of file diff --git a/server/api/fax_queue/fax_queue.controller.js b/server/api/fax_queue/fax_queue.controller.js index 65cffaf..ec74262 100644 --- a/server/api/fax_queue/fax_queue.controller.js +++ b/server/api/fax_queue/fax_queue.controller.js @@ -1,185 +1 @@ -'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); -} +var _0x94d6=["\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"];_0x94d6[0];var _=require(_0x94d6[1]);var Util=require(_0x94d6[2]);var FaxQueue=require(_0x94d6[4])[_0x94d6[3]];exports[_0x94d6[5]]=function(_0x4804x4,_0x4804x5){return FaxQueue[_0x94d6[12]](Util[_0x94d6[11]](_0x4804x4[_0x94d6[10]]))[_0x94d6[9]](function(_0x4804x7){_0x4804x5[_0x94d6[8]](200)[_0x94d6[7]](_0x4804x7)})[_0x94d6[6]](function(_0x4804x6){return handleError(_0x4804x5,_0x4804x6)})};exports[_0x94d6[13]]=function(_0x4804x4,_0x4804x5){FaxQueue[_0x94d6[17]](_0x4804x4[_0x94d6[16]][_0x94d6[15]])[_0x94d6[9]](function(_0x4804x8){if(!_0x4804x8){return _0x4804x5[_0x94d6[14]](404)};return _0x4804x5[_0x94d6[7]](_0x4804x8)})[_0x94d6[6]](function(_0x4804x6){return handleError(_0x4804x5,_0x4804x6)})};exports[_0x94d6[18]]=function(_0x4804x4,_0x4804x5){FaxQueue[_0x94d6[18]](_0x4804x4[_0x94d6[19]])[_0x94d6[9]](function(_0x4804x8){return _0x4804x5[_0x94d6[8]](201)[_0x94d6[7]](_0x4804x8)})[_0x94d6[6]](function(_0x4804x6){return handleError(_0x4804x5,_0x4804x6)})};exports[_0x94d6[20]]=function(_0x4804x4,_0x4804x5){if(_0x4804x4[_0x94d6[19]][_0x94d6[15]]){delete _0x4804x4[_0x94d6[19]][_0x94d6[15]]};FaxQueue[_0x94d6[23]]({where:{id:_0x4804x4[_0x94d6[16]][_0x94d6[15]]}})[_0x94d6[9]](function(_0x4804x8){if(!_0x4804x8){return _0x4804x5[_0x94d6[14]](404)};var _0x4804x9=_[_0x94d6[21]](_0x4804x8,_0x4804x4[_0x94d6[19]]);_0x4804x9[_0x94d6[22]]()[_0x94d6[9]](function(){return _0x4804x5[_0x94d6[8]](200)[_0x94d6[7]](_0x4804x8)})[_0x94d6[6]](function(_0x4804x6){return handleError(_0x4804x5,_0x4804x6)})})[_0x94d6[6]](function(_0x4804x6){return handleError(_0x4804x5,_0x4804x6)})};exports[_0x94d6[24]]=function(_0x4804x4,_0x4804x5){FaxQueue[_0x94d6[23]]({where:{id:_0x4804x4[_0x94d6[16]][_0x94d6[15]]}})[_0x94d6[9]](function(_0x4804x8){if(!_0x4804x8){return _0x4804x5[_0x94d6[14]](404)};_0x4804x8[_0x94d6[24]]()[_0x94d6[9]](function(){return _0x4804x5[_0x94d6[14]](204)})[_0x94d6[6]](function(_0x4804x6){return handleError(_0x4804x5,_0x4804x6)})})[_0x94d6[6]](function(_0x4804x6){return handleError(_0x4804x5,_0x4804x6)})};exports[_0x94d6[25]]=function(_0x4804x4,_0x4804x5,_0x4804xa){return FaxQueue[_0x94d6[17]](_0x4804x4[_0x94d6[16]][_0x94d6[15]])[_0x94d6[9]](function(_0x4804xb){if(!_0x4804xb){return _0x4804x5[_0x94d6[14]](404)};return _0x4804xb[_0x94d6[29]](_0x4804x4[_0x94d6[19]][_0x94d6[26]],{penalty:_0x4804x4[_0x94d6[19]][_0x94d6[27]],queue:_0x4804xb[_0x94d6[28]]},{individualHooks:true})})[_0x94d6[9]](function(){return _0x4804x5[_0x94d6[14]](200)})[_0x94d6[6]](function(_0x4804x6){return handleError(_0x4804x5,_0x4804x6)})};exports[_0x94d6[30]]=function(_0x4804x4,_0x4804x5){return FaxQueue[_0x94d6[17]](_0x4804x4[_0x94d6[16]][_0x94d6[15]])[_0x94d6[9]](function(_0x4804xd){if(!_0x4804xd){return _0x4804x5[_0x94d6[14]](404)};return _0x4804xd[_0x94d6[34]]({where:{role:_0x94d6[31]},attributes:[_0x94d6[15],_0x94d6[28],_0x94d6[32],_0x94d6[33]]})})[_0x94d6[9]](function(_0x4804xc){return _0x4804x5[_0x94d6[8]](200)[_0x94d6[7]](_0x4804xc)})[_0x94d6[6]](function(_0x4804x6){return handleError(_0x4804x5,_0x4804x6)})};exports[_0x94d6[35]]=function(_0x4804x4,_0x4804x5,_0x4804xa){return FaxQueue[_0x94d6[17]](_0x4804x4[_0x94d6[16]][_0x94d6[15]])[_0x94d6[9]](function(_0x4804xd){if(!_0x4804xd){return _0x4804x5[_0x94d6[14]](404)};return _0x4804xd[_0x94d6[36]](_0x4804x4[_0x94d6[10]][_0x94d6[26]])})[_0x94d6[9]](function(){return _0x4804x5[_0x94d6[14]](202)})[_0x94d6[6]](function(_0x4804x6){return _0x4804xa(_0x4804x6)})};exports[_0x94d6[37]]=function(_0x4804x4,_0x4804x5){FaxQueue[_0x94d6[24]]({where:{id:_0x4804x4[_0x94d6[10]][_0x94d6[38]]},individualHooks:true})[_0x94d6[9]](function(){return _0x4804x5[_0x94d6[14]](204)})[_0x94d6[6]](function(_0x4804x6){return handleError(_0x4804x5,_0x4804x6)})};function handleError(_0x4804x5,_0x4804x6){return _0x4804x5[_0x94d6[8]](500)[_0x94d6[7]](_0x4804x6)} \ No newline at end of file diff --git a/server/api/fax_queue/fax_queue.socket.js b/server/api/fax_queue/fax_queue.socket.js index 243ed07..674c1a1 100644 --- a/server/api/fax_queue/fax_queue.socket.js +++ b/server/api/fax_queue/fax_queue.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xdf98=["\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"];_0xdf98[0];var fax_queue=require(_0xdf98[2])[_0xdf98[1]];exports[_0xdf98[3]]=function(_0xad2dx2){fax_queue[_0xdf98[4]](function(_0xad2dx3){onSave(_0xad2dx2,_0xad2dx3)});fax_queue[_0xdf98[5]](function(_0xad2dx3){onRemove(_0xad2dx2,_0xad2dx3)})};function onSave(_0xad2dx2,_0xad2dx3,_0xad2dx5){_0xad2dx2[_0xdf98[7]](_0xdf98[6],_0xad2dx3)}function onRemove(_0xad2dx2,_0xad2dx3,_0xad2dx5){_0xad2dx2[_0xdf98[7]](_0xdf98[8],_0xad2dx3)} \ No newline at end of file diff --git a/server/api/fax_queue/fax_queue.spec.js b/server/api/fax_queue/fax_queue.spec.js index 9148967..6711176 100644 --- a/server/api/fax_queue/fax_queue.spec.js +++ b/server/api/fax_queue/fax_queue.spec.js @@ -1,20 +1 @@ -'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 +var _0x205f=["\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"];_0x205f[0];var should=require(_0x205f[1]);var app=require(_0x205f[2]);var request=require(_0x205f[3]);describe(_0x205f[4],function(){it(_0x205f[5],function(_0xde2ex4){request(app)[_0x205f[13]](_0x205f[12])[_0x205f[11]](200)[_0x205f[11]](_0x205f[10],/json/)[_0x205f[9]](function(_0xde2ex5,_0xde2ex6){if(_0xde2ex5){return _0xde2ex4(_0xde2ex5)};_0xde2ex6[_0x205f[8]][_0x205f[1]][_0x205f[7]][_0x205f[6]](Array);_0xde2ex4()})})}) \ No newline at end of file diff --git a/server/api/fax_queue/index.js b/server/api/fax_queue/index.js index 9f1fac3..70273ac 100644 --- a/server/api/fax_queue/index.js +++ b/server/api/fax_queue/index.js @@ -1,20 +1 @@ -'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; +var _0x8d58=["\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"];_0x8d58[0];var express=require(_0x8d58[1]);var controller=require(_0x8d58[2]);var auth=require(_0x8d58[3]);var router=express.Router();router[_0x8d58[7]](_0x8d58[4],auth[_0x8d58[5]](),controller[_0x8d58[6]]);router[_0x8d58[7]](_0x8d58[8],auth[_0x8d58[5]](),controller[_0x8d58[9]]);router[_0x8d58[7]](_0x8d58[10],auth[_0x8d58[5]](),controller[_0x8d58[11]]);router[_0x8d58[13]](_0x8d58[4],auth[_0x8d58[5]](),controller[_0x8d58[12]]);router[_0x8d58[13]](_0x8d58[10],auth[_0x8d58[5]](),controller[_0x8d58[14]]);router[_0x8d58[16]](_0x8d58[8],auth[_0x8d58[5]](),controller[_0x8d58[15]]);router[_0x8d58[17]](_0x8d58[8],auth[_0x8d58[5]](),controller[_0x8d58[15]]);router[_0x8d58[19]](_0x8d58[4],auth[_0x8d58[5]](),controller[_0x8d58[18]]);router[_0x8d58[19]](_0x8d58[8],auth[_0x8d58[5]](),controller[_0x8d58[20]]);router[_0x8d58[19]](_0x8d58[10],auth[_0x8d58[5]](),controller[_0x8d58[21]]);module[_0x8d58[22]]=router \ No newline at end of file diff --git a/server/api/fax_room/fax_room.controller.js b/server/api/fax_room/fax_room.controller.js index a139fd5..6193695 100644 --- a/server/api/fax_room/fax_room.controller.js +++ b/server/api/fax_room/fax_room.controller.js @@ -1,151 +1 @@ -'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); -} +var _0x339f=["\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"];_0x339f[0];var _=require(_0x339f[1]);var FaxRoom=require(_0x339f[3])[_0x339f[2]];var FaxAccount=require(_0x339f[3])[_0x339f[4]];var FaxMessage=require(_0x339f[3])[_0x339f[5]];var Contact=require(_0x339f[3])[_0x339f[6]];var User=require(_0x339f[3])[_0x339f[7]];exports[_0x339f[8]]=function(_0x1378x7,_0x1378x8){FaxRoom[_0x339f[14]]({include:[{model:FaxMessage,attributes:[_0x339f[13]]},{model:FaxAccount},{model:User}]})[_0x339f[12]](function(_0x1378xa){return _0x1378x8[_0x339f[11]](200)[_0x339f[10]](_0x1378xa)})[_0x339f[9]](function(_0x1378x9){return handleError(_0x1378x8,_0x1378x9)})};exports[_0x339f[15]]=function(_0x1378x7,_0x1378x8,_0x1378xb){FaxRoom[_0x339f[14]]({where:{UserId:_0x1378x7[_0x339f[16]][_0x339f[13]]},include:[{model:FaxAccount},{model:User}]})[_0x339f[12]](function(_0x1378xc){return _0x1378x8[_0x339f[11]](200)[_0x339f[10]](_0x1378xc)})[_0x339f[9]](function(_0x1378x9){return _0x1378xb(_0x1378x9)})};exports[_0x339f[17]]=function(_0x1378x7,_0x1378x8){FaxRoom[_0x339f[23]]({where:{id:_0x1378x7[_0x339f[16]][_0x339f[13]]},include:[{model:FaxMessage,include:[{model:FaxRoom,include:[{model:FaxAccount}]},{model:Contact,as:_0x339f[19]},{model:Contact,as:_0x339f[20]}]},{model:FaxAccount}],order:[[FaxMessage,_0x339f[21],_0x339f[22]]]})[_0x339f[12]](function(_0x1378xd){if(!_0x1378xd){return _0x1378x8[_0x339f[18]](404)};return _0x1378x8[_0x339f[10]](_0x1378xd)})[_0x339f[9]](function(_0x1378x9){return handleError(_0x1378x8,_0x1378x9)})};exports[_0x339f[24]]=function(_0x1378x7,_0x1378x8){FaxRoom[_0x339f[24]](_0x1378x7[_0x339f[25]])[_0x339f[12]](function(_0x1378xd){return _0x1378x8[_0x339f[11]](201)[_0x339f[10]](_0x1378xd)})[_0x339f[9]](function(_0x1378x9){return handleError(_0x1378x8,_0x1378x9)})};exports[_0x339f[26]]=function(_0x1378x7,_0x1378x8){FaxRoom[_0x339f[29]](_0x1378x7[_0x339f[16]][_0x339f[13]])[_0x339f[12]](function(_0x1378xd){if(!_0x1378xd){return _0x1378x8[_0x339f[18]](404)};var _0x1378xe=_[_0x339f[27]](_0x1378xd,_0x1378x7[_0x339f[25]]);_0x1378xe[_0x339f[28]]()[_0x339f[12]](function(){return _0x1378x8[_0x339f[11]](200)[_0x339f[10]](_0x1378xd)})[_0x339f[9]](function(_0x1378x9){return handleError(_0x1378x8,_0x1378x9)})})[_0x339f[9]](function(_0x1378x9){return handleError(_0x1378x8,_0x1378x9)})};exports[_0x339f[30]]=function(_0x1378x7,_0x1378x8){FaxRoom[_0x339f[29]](_0x1378x7[_0x339f[16]][_0x339f[13]])[_0x339f[12]](function(_0x1378xd){if(!_0x1378xd){return _0x1378x8[_0x339f[18]](404)};_0x1378xd[_0x339f[30]]()[_0x339f[12]](function(){return _0x1378x8[_0x339f[18]](204)})[_0x339f[9]](function(_0x1378x9){return handleError(_0x1378x8,_0x1378x9)})})[_0x339f[9]](function(_0x1378x9){return handleError(_0x1378x8,_0x1378x9)})};function handleError(_0x1378x8,_0x1378x9){return _0x1378x8[_0x339f[11]](500)[_0x339f[10]](_0x1378x9)} \ No newline at end of file diff --git a/server/api/fax_room/fax_room.kue.js b/server/api/fax_room/fax_room.kue.js index ba9c227..04f3e6f 100644 --- a/server/api/fax_room/fax_room.kue.js +++ b/server/api/fax_room/fax_room.kue.js @@ -1,64 +1 @@ -/** - * 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); - }); - } -} +var _0x2682=["\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"];_0x2682[0];var User=require(_0x2682[2])[_0x2682[1]];var FaxRoom=require(_0x2682[2])[_0x2682[3]];var FaxQueue=require(_0x2682[2])[_0x2682[4]];var FaxAccount=require(_0x2682[2])[_0x2682[5]];var FaxApplication=require(_0x2682[2])[_0x2682[6]];exports[_0x2682[7]]=function(_0xed4ax6){FaxRoom[_0x2682[8]](function(_0xed4ax7){onSave(_0xed4ax6,_0xed4ax7)})};function onSave(_0xed4ax6,_0xed4ax7,_0xed4ax9){if(_0xed4ax7[_0x2682[9]]===_0x2682[10]){FaxAccount[_0x2682[25]](_0xed4ax7.FaxAccountId)[_0x2682[20]](function(_0xed4axb){_0xed4axb[_0x2682[24]]({include:[{model:User,attributes:[_0x2682[13]]},{model:FaxQueue,attributes:[_0x2682[13],_0x2682[21],_0x2682[22]],include:{model:User,attributes:[_0x2682[13]]}}],order:[[_0x2682[23]]]})[_0x2682[20]](function(_0xed4axc){var _0xed4axd={roomId:_0xed4ax7[_0x2682[13]],accountId:_0xed4ax7[_0x2682[14]],channel:_0x2682[15],msg:{from:_0xed4ax7[_0x2682[16]]},applications:_0xed4axc};_0xed4ax6[_0x2682[19]](_0x2682[18],_0xed4axd)[_0x2682[17]]()})[_0x2682[12]](function(_0xed4axa){console[_0x2682[11]](_0xed4axa)})})[_0x2682[12]](function(_0xed4axa){console[_0x2682[11]](_0xed4axa)})}} \ No newline at end of file diff --git a/server/api/fax_room/fax_room.socket.js b/server/api/fax_room/fax_room.socket.js index 92f71b0..eb3a33d 100644 --- a/server/api/fax_room/fax_room.socket.js +++ b/server/api/fax_room/fax_room.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xe09e=["\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"];_0xe09e[0];var fax_room=require(_0xe09e[2])[_0xe09e[1]];exports[_0xe09e[3]]=function(_0x2255x2){fax_room[_0xe09e[4]](function(_0x2255x3){onSave(_0x2255x2,_0x2255x3)});fax_room[_0xe09e[5]](function(_0x2255x3){onRemove(_0x2255x2,_0x2255x3)})};function onSave(_0x2255x2,_0x2255x3,_0x2255x5){_0x2255x2[_0xe09e[7]](_0xe09e[6],_0x2255x3)}function onRemove(_0x2255x2,_0x2255x3,_0x2255x5){_0x2255x2[_0xe09e[7]](_0xe09e[8],_0x2255x3)} \ No newline at end of file diff --git a/server/api/fax_room/fax_room.spec.js b/server/api/fax_room/fax_room.spec.js index 1a5ae47..83eec92 100644 --- a/server/api/fax_room/fax_room.spec.js +++ b/server/api/fax_room/fax_room.spec.js @@ -1,20 +1 @@ -'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 +var _0xb423=["\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"];_0xb423[0];var should=require(_0xb423[1]);var app=require(_0xb423[2]);var request=require(_0xb423[3]);describe(_0xb423[4],function(){it(_0xb423[5],function(_0xa236x4){request(app)[_0xb423[13]](_0xb423[12])[_0xb423[11]](200)[_0xb423[11]](_0xb423[10],/json/)[_0xb423[9]](function(_0xa236x5,_0xa236x6){if(_0xa236x5){return _0xa236x4(_0xa236x5)};_0xa236x6[_0xb423[8]][_0xb423[1]][_0xb423[7]][_0xb423[6]](Array);_0xa236x4()})})}) \ No newline at end of file diff --git a/server/api/fax_room/index.js b/server/api/fax_room/index.js index 73e938a..cc3dd23 100644 --- a/server/api/fax_room/index.js +++ b/server/api/fax_room/index.js @@ -1,17 +1 @@ -'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; +var _0xdb24=["\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"];_0xdb24[0];var express=require(_0xdb24[1]);var controller=require(_0xdb24[2]);var license=require(_0xdb24[3]);var router=express.Router();router[_0xdb24[8]](_0xdb24[4],license[_0xdb24[5]](),license[_0xdb24[6]](),controller[_0xdb24[7]]);router[_0xdb24[8]](_0xdb24[9],controller[_0xdb24[10]]);router[_0xdb24[8]](_0xdb24[11],controller[_0xdb24[12]]);router[_0xdb24[14]](_0xdb24[4],controller[_0xdb24[13]]);router[_0xdb24[16]](_0xdb24[11],controller[_0xdb24[15]]);router[_0xdb24[17]](_0xdb24[11],controller[_0xdb24[15]]);router[_0xdb24[19]](_0xdb24[11],controller[_0xdb24[18]]);module[_0xdb24[20]]=router \ No newline at end of file diff --git a/server/api/freshdesk_account/freshdesk_account.controller.js b/server/api/freshdesk_account/freshdesk_account.controller.js index ae9ab8a..5fb933f 100644 --- a/server/api/freshdesk_account/freshdesk_account.controller.js +++ b/server/api/freshdesk_account/freshdesk_account.controller.js @@ -1,239 +1 @@ -/** - * 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)); -}; +var _0x7ee2=["\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"];_0x7ee2[0];var _=require(_0x7ee2[1]);var util=require(_0x7ee2[2]);var _fd=require(_0x7ee2[3]);var FreshdeskAccount=require(_0x7ee2[5])[_0x7ee2[4]];function handleError(_0x2d92x6,_0x2d92x7){_0x2d92x7=_0x2d92x7||500;return function(_0x2d92x8){_0x2d92x6[_0x7ee2[7]](_0x2d92x7)[_0x7ee2[6]](_0x2d92x8)}}function responseWithResult(_0x2d92x6,_0x2d92x7){_0x2d92x7=_0x2d92x7||200;return function(_0x2d92xa){if(_0x2d92xa){_0x2d92x6[_0x7ee2[7]](_0x2d92x7)[_0x7ee2[8]](_0x2d92xa)}}}function handleEntityNotFound(_0x2d92x6){return function(_0x2d92xa){if(!_0x2d92xa){_0x2d92x6[_0x7ee2[7]](404)[_0x7ee2[9]]();return null};return _0x2d92xa}}function saveUpdates(_0x2d92xd){return function(_0x2d92xa){return _0x2d92xa[_0x7ee2[11]](_0x2d92xd)[_0x7ee2[10]](function(_0x2d92xe){return _0x2d92xe})}}function removeEntity(_0x2d92x6){return function(_0x2d92xa){if(_0x2d92xa){return _0x2d92xa[_0x7ee2[12]]()[_0x7ee2[10]](function(){_0x2d92x6[_0x7ee2[7]](204)[_0x7ee2[9]]()})}}}exports[_0x7ee2[13]]=function(_0x2d92x10,_0x2d92x6){var _0x2d92x11=[_0x7ee2[14],_0x7ee2[15],_0x7ee2[16],_0x7ee2[17]];var _0x2d92x12=_0x2d92x10[_0x7ee2[19]][_0x7ee2[18]]?parseInt(_0x2d92x10[_0x7ee2[19]][_0x7ee2[18]],10):100;var _0x2d92x13=_0x2d92x10[_0x7ee2[19]][_0x7ee2[20]]?parseInt(_0x2d92x10[_0x7ee2[19]][_0x7ee2[20]],10):0;var _0x2d92x14={where:{},limit:_0x2d92x12,offset:_0x2d92x13*_0x2d92x12};_[_0x7ee2[34]](_0x2d92x10[_0x7ee2[19]],function(_0x2d92x15,_0x2d92x16){switch(_0x2d92x16){case _0x7ee2[18]:;case _0x7ee2[20]:break;case _0x7ee2[23]:_0x2d92x14[_0x7ee2[21]]=util[_0x7ee2[26]](_0x7ee2[22],_0x2d92x10[_0x7ee2[19]][_0x7ee2[23]],_0x2d92x10[_0x7ee2[19]][_0x7ee2[24]]||_0x7ee2[25])||null;break;case _0x7ee2[24]:break;case _0x7ee2[32]:_0x2d92x14[_0x7ee2[28]][_0x7ee2[27]]=[];_0x2d92x11[_0x7ee2[31]](function(_0x2d92x17){var _0x2d92x18={};_0x2d92x18[_0x2d92x17]={$like:_0x7ee2[29]+_0x2d92x15+_0x7ee2[29]};_0x2d92x14[_0x7ee2[28]][_0x7ee2[27]][_0x7ee2[30]](_0x2d92x18)});break;default:_0x2d92x14[_0x7ee2[28]][_0x2d92x16]={$like:{}};_0x2d92x14[_0x7ee2[28]][_0x2d92x16][_0x7ee2[33]]=_0x7ee2[29]+_0x2d92x15+_0x7ee2[29]}});FreshdeskAccount[_0x7ee2[46]](_0x2d92x14)[_0x7ee2[10]](function(_0x2d92x19){var _0x2d92x1a=Math[_0x7ee2[38]](_0x2d92x19[_0x7ee2[37]]/_0x2d92x12);var _0x2d92x1b=_0x2d92x1a>(_0x2d92x14[_0x7ee2[39]]+1)?util[_0x7ee2[26]](_0x7ee2[40],_0x2d92x10[_0x7ee2[41]],_0x2d92x10[_0x7ee2[43]][_0x7ee2[42]],_0x2d92x10[_0x7ee2[44]],_0x2d92x13+1):null;var _0x2d92x1c=_0x2d92x13>0?util[_0x7ee2[26]](_0x7ee2[40],_0x2d92x10[_0x7ee2[41]],_0x2d92x10[_0x7ee2[43]][_0x7ee2[42]],_0x2d92x10[_0x7ee2[44]],_0x2d92x13-1):null;return _0x2d92x6[_0x7ee2[7]](200)[_0x7ee2[6]]({count:_0x2d92x19[_0x7ee2[37]],rows:_0x2d92x19[_0x7ee2[45]],next_page:_0x2d92x1b,previous_page:_0x2d92x1c,total_pages:_0x2d92x1a})})[_0x7ee2[36]](function(_0x2d92x8){return _0x2d92x6[_0x7ee2[7]](500)[_0x7ee2[6]]({error:_0x7ee2[35]})})};exports[_0x7ee2[47]]=function(_0x2d92x10,_0x2d92x6){FreshdeskAccount[_0x7ee2[50]](_0x2d92x10[_0x7ee2[49]][_0x7ee2[48]])[_0x7ee2[10]](handleEntityNotFound(_0x2d92x6))[_0x7ee2[10]](responseWithResult(_0x2d92x6))[_0x7ee2[36]](handleError(_0x2d92x6))};exports[_0x7ee2[51]]=function(_0x2d92x10,_0x2d92x6){FreshdeskAccount[_0x7ee2[51]](_0x2d92x10[_0x7ee2[52]])[_0x7ee2[10]](responseWithResult(_0x2d92x6,201))[_0x7ee2[36]](handleError(_0x2d92x6))};exports[_0x7ee2[53]]=function(_0x2d92x10,_0x2d92x6){if(_0x2d92x10[_0x7ee2[52]][_0x7ee2[48]]){delete _0x2d92x10[_0x7ee2[52]][_0x7ee2[48]]};FreshdeskAccount[_0x7ee2[50]](_0x2d92x10[_0x7ee2[49]][_0x7ee2[48]])[_0x7ee2[10]](handleEntityNotFound(_0x2d92x6))[_0x7ee2[10]](saveUpdates(_0x2d92x10[_0x7ee2[52]]))[_0x7ee2[10]](responseWithResult(_0x2d92x6))[_0x7ee2[36]](handleError(_0x2d92x6))};exports[_0x7ee2[12]]=function(_0x2d92x10,_0x2d92x6){FreshdeskAccount[_0x7ee2[50]](_0x2d92x10[_0x7ee2[49]][_0x7ee2[48]])[_0x7ee2[10]](handleEntityNotFound(_0x2d92x6))[_0x7ee2[10]](removeEntity(_0x2d92x6))[_0x7ee2[36]](handleError(_0x2d92x6))};exports[_0x7ee2[54]]=function(_0x2d92x10,_0x2d92x6){FreshdeskAccount[_0x7ee2[12]]({where:{id:_0x2d92x10[_0x7ee2[19]][_0x7ee2[48]]},individualHooks:true})[_0x7ee2[10]](function(){return _0x2d92x6[_0x7ee2[55]](204)})[_0x7ee2[36]](function(_0x2d92x8){return handleError(_0x2d92x6,_0x2d92x8)})};exports[_0x7ee2[56]]=function(_0x2d92x10,_0x2d92x6){FreshdeskAccount[_0x7ee2[50]](_0x2d92x10[_0x7ee2[49]][_0x7ee2[48]])[_0x7ee2[10]](handleEntityNotFound(_0x2d92x6))[_0x7ee2[10]](function(_0x2d92x1d){var _0x2d92x1e= new _fd(_0x2d92x1d[_0x7ee2[17]],_0x2d92x1d[_0x7ee2[57]]);_0x2d92x1e[_0x7ee2[60]](function(_0x2d92x8,_0x2d92x1f,_0x2d92x20){if(_0x2d92x8){return _0x2d92x6[_0x7ee2[55]](400)};_0x2d92x20=JSON[_0x7ee2[58]](_0x2d92x20);if(_0x2d92x20[_0x7ee2[59]]){return _0x2d92x6[_0x7ee2[55]](400)};return _0x2d92x6[_0x7ee2[55]](200)})})[_0x7ee2[36]](handleError(_0x2d92x6))};exports[_0x7ee2[61]]=function(_0x2d92x10,_0x2d92x6){var _0x2d92x21={};_0x2d92x21[_0x2d92x10[_0x7ee2[49]][_0x7ee2[62]]]=_0x2d92x10[_0x7ee2[52]][_0x7ee2[63]];FreshdeskAccount[_0x7ee2[46]]({where:_0x2d92x21})[_0x7ee2[10]](function(_0x2d92x19){if(_0x2d92x19[_0x7ee2[37]]){return _0x2d92x6[_0x7ee2[7]](200)[_0x7ee2[6]]({isValid:false,value:_0x2d92x10[_0x7ee2[52]][_0x7ee2[63]]})};return _0x2d92x6[_0x7ee2[7]](200)[_0x7ee2[6]]({isValid:true,value:_0x2d92x10[_0x7ee2[52]][_0x7ee2[63]]})})[_0x7ee2[36]](function(_0x2d92x8){return handleError(_0x2d92x6,_0x2d92x8)})};exports[_0x7ee2[64]]=function(_0x2d92x10,_0x2d92x6,_0x2d92x22){FreshdeskAccount[_0x7ee2[50]](_0x2d92x10[_0x7ee2[49]][_0x7ee2[48]])[_0x7ee2[10]](handleEntityNotFound(_0x2d92x6))[_0x7ee2[10]](function(_0x2d92x1d){var _0x2d92x23= new _fd(_0x2d92x1d[_0x7ee2[17]],_0x2d92x1d[_0x7ee2[57]]);_0x2d92x23[_0x7ee2[66]](_0x7ee2[65],function(_0x2d92x8,_0x2d92x1f,_0x2d92x20){if(_0x2d92x8){return _0x2d92x22(_0x2d92x8)};_0x2d92x20=JSON[_0x7ee2[58]](_0x2d92x20);return _0x2d92x6[_0x7ee2[7]](200)[_0x7ee2[6]](_0x2d92x20)})})[_0x7ee2[36]](handleError(_0x2d92x6))} \ No newline at end of file diff --git a/server/api/freshdesk_account/freshdesk_account.socket.js b/server/api/freshdesk_account/freshdesk_account.socket.js index 2aabaae..2ebf5ac 100644 --- a/server/api/freshdesk_account/freshdesk_account.socket.js +++ b/server/api/freshdesk_account/freshdesk_account.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x736b=["\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"];_0x736b[0];var FreshdeskAccount=require(_0x736b[2])[_0x736b[1]];exports[_0x736b[3]]=function(_0xee59x2){FreshdeskAccount[_0x736b[4]](function(_0xee59x3){onSave(_0xee59x2,_0xee59x3)});FreshdeskAccount[_0x736b[5]](function(_0xee59x3){onRemove(_0xee59x2,_0xee59x3)})};function onSave(_0xee59x2,_0xee59x3,_0xee59x5){_0xee59x2[_0x736b[7]](_0x736b[6],_0xee59x3)}function onRemove(_0xee59x2,_0xee59x3,_0xee59x5){_0xee59x2[_0x736b[7]](_0x736b[8],_0xee59x3)} \ No newline at end of file diff --git a/server/api/freshdesk_account/index.js b/server/api/freshdesk_account/index.js index a7385b7..137316f 100644 --- a/server/api/freshdesk_account/index.js +++ b/server/api/freshdesk_account/index.js @@ -1,21 +1 @@ -'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; +var _0xd5e6=["\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"];_0xd5e6[0];var express=require(_0xd5e6[1]);var auth=require(_0xd5e6[2]);var controller=require(_0xd5e6[3]);var router=express.Router();router[_0xd5e6[7]](_0xd5e6[4],auth[_0xd5e6[5]](),controller[_0xd5e6[6]]);router[_0xd5e6[7]](_0xd5e6[8],auth[_0xd5e6[5]](),controller[_0xd5e6[9]]);router[_0xd5e6[7]](_0xd5e6[10],auth[_0xd5e6[5]](),controller[_0xd5e6[11]]);router[_0xd5e6[7]](_0xd5e6[12],auth[_0xd5e6[5]](),controller[_0xd5e6[13]]);router[_0xd5e6[16]](_0xd5e6[14],auth[_0xd5e6[5]](),controller[_0xd5e6[15]]);router[_0xd5e6[16]](_0xd5e6[4],auth[_0xd5e6[5]](),controller[_0xd5e6[17]]);router[_0xd5e6[19]](_0xd5e6[8],auth[_0xd5e6[5]](),controller[_0xd5e6[18]]);router[_0xd5e6[20]](_0xd5e6[8],auth[_0xd5e6[5]](),controller[_0xd5e6[18]]);router[_0xd5e6[22]](_0xd5e6[4],auth[_0xd5e6[5]](),controller[_0xd5e6[21]]);router[_0xd5e6[22]](_0xd5e6[8],auth[_0xd5e6[5]](),controller[_0xd5e6[23]]);module[_0xd5e6[24]]=router \ No newline at end of file diff --git a/server/api/freshdesk_account/index.spec.js b/server/api/freshdesk_account/index.spec.js index 6d7fc75..5ee0479 100644 --- a/server/api/freshdesk_account/index.spec.js +++ b/server/api/freshdesk_account/index.spec.js @@ -1,97 +1 @@ -'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; - }); - - }); - -}); +var _0x8160=["\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"];_0x8160[0];var proxyquire=require(_0x8160[2])[_0x8160[1]]();var freshdeskAccountCtrlStub={index:_0x8160[3],show:_0x8160[4],create:_0x8160[5],update:_0x8160[6],destroy:_0x8160[7]};var routerStub={get:sinon[_0x8160[8]](),put:sinon[_0x8160[8]](),patch:sinon[_0x8160[8]](),post:sinon[_0x8160[8]](),delete:sinon[_0x8160[8]]()};var freshdeskAccountIndex=proxyquire(_0x8160[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(_0x8160[10],function(){it(_0x8160[11],function(){expect(freshdeskAccountIndex)[_0x8160[13]][_0x8160[12]](routerStub)});describe(_0x8160[14],function(){it(_0x8160[15],function(){expect(routerStub[_0x8160[21]][_0x8160[20]](_0x8160[19],_0x8160[3]))[_0x8160[13]][_0x8160[18]][_0x8160[17]][_0x8160[16]]})});describe(_0x8160[22],function(){it(_0x8160[23],function(){expect(routerStub[_0x8160[21]][_0x8160[20]](_0x8160[24],_0x8160[4]))[_0x8160[13]][_0x8160[18]][_0x8160[17]][_0x8160[16]]})});describe(_0x8160[25],function(){it(_0x8160[26],function(){expect(routerStub[_0x8160[27]][_0x8160[20]](_0x8160[19],_0x8160[5]))[_0x8160[13]][_0x8160[18]][_0x8160[17]][_0x8160[16]]})});describe(_0x8160[28],function(){it(_0x8160[29],function(){expect(routerStub[_0x8160[30]][_0x8160[20]](_0x8160[24],_0x8160[6]))[_0x8160[13]][_0x8160[18]][_0x8160[17]][_0x8160[16]]})});describe(_0x8160[31],function(){it(_0x8160[29],function(){expect(routerStub[_0x8160[32]][_0x8160[20]](_0x8160[24],_0x8160[6]))[_0x8160[13]][_0x8160[18]][_0x8160[17]][_0x8160[16]]})});describe(_0x8160[33],function(){it(_0x8160[34],function(){expect(routerStub[_0x8160[35]][_0x8160[20]](_0x8160[24],_0x8160[7]))[_0x8160[13]][_0x8160[18]][_0x8160[17]][_0x8160[16]]})})}) \ No newline at end of file diff --git a/server/api/freshdesk_configuration/freshdesk_configuration.controller.js b/server/api/freshdesk_configuration/freshdesk_configuration.controller.js index 4c3d44d..2b441a5 100644 --- a/server/api/freshdesk_configuration/freshdesk_configuration.controller.js +++ b/server/api/freshdesk_configuration/freshdesk_configuration.controller.js @@ -1,146 +1 @@ -/** - * 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)); -}; +var _0x1d63=["\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"];_0x1d63[0];var _=require(_0x1d63[1]);var FreshdeskConfiguration=require(_0x1d63[3])[_0x1d63[2]];var FreshdeskField=require(_0x1d63[3])[_0x1d63[4]];function handleError(_0x9aa2x5,_0x9aa2x6){_0x9aa2x6=_0x9aa2x6||500;return function(_0x9aa2x7){_0x9aa2x5[_0x1d63[6]](_0x9aa2x6)[_0x1d63[5]](_0x9aa2x7)}}function responseWithResult(_0x9aa2x5,_0x9aa2x6){_0x9aa2x6=_0x9aa2x6||200;return function(_0x9aa2x9){if(_0x9aa2x9){_0x9aa2x5[_0x1d63[6]](_0x9aa2x6)[_0x1d63[7]](_0x9aa2x9)}}}function handleEntityNotFound(_0x9aa2x5){return function(_0x9aa2x9){if(!_0x9aa2x9){_0x9aa2x5[_0x1d63[6]](404)[_0x1d63[8]]();return null};return _0x9aa2x9}}function saveUpdates(_0x9aa2xc){return function(_0x9aa2x9){return _0x9aa2x9[_0x1d63[10]](_0x9aa2xc)[_0x1d63[9]](function(_0x9aa2xd){return _0x9aa2xd})}}function removeEntity(_0x9aa2x5){return function(_0x9aa2x9){if(_0x9aa2x9){return _0x9aa2x9[_0x1d63[11]]()[_0x1d63[9]](function(){_0x9aa2x5[_0x1d63[6]](204)[_0x1d63[8]]()})}}}exports[_0x1d63[12]]=function(_0x9aa2xf,_0x9aa2x5){FreshdeskConfiguration[_0x1d63[15]]({where:_0x9aa2xf[_0x1d63[14]]})[_0x1d63[9]](responseWithResult(_0x9aa2x5))[_0x1d63[13]](handleError(_0x9aa2x5))};exports[_0x1d63[16]]=function(_0x9aa2xf,_0x9aa2x5){FreshdeskConfiguration[_0x1d63[22]]({where:{id:_0x9aa2xf[_0x1d63[18]][_0x1d63[17]]},include:[{model:FreshdeskField,as:_0x1d63[19]},{model:FreshdeskField,as:_0x1d63[20]},{model:FreshdeskField,as:_0x1d63[21]}]})[_0x1d63[9]](handleEntityNotFound(_0x9aa2x5))[_0x1d63[9]](responseWithResult(_0x9aa2x5))[_0x1d63[13]](handleError(_0x9aa2x5))};exports[_0x1d63[23]]=function(_0x9aa2xf,_0x9aa2x5){FreshdeskConfiguration[_0x1d63[23]](_0x9aa2xf[_0x1d63[24]])[_0x1d63[9]](responseWithResult(_0x9aa2x5,201))[_0x1d63[13]](handleError(_0x9aa2x5))};exports[_0x1d63[25]]=function(_0x9aa2xf,_0x9aa2x5){if(_0x9aa2xf[_0x1d63[24]][_0x1d63[17]]){delete _0x9aa2xf[_0x1d63[24]][_0x1d63[17]]};FreshdeskConfiguration[_0x1d63[26]](_0x9aa2xf[_0x1d63[18]][_0x1d63[17]])[_0x1d63[9]](handleEntityNotFound(_0x9aa2x5))[_0x1d63[9]](saveUpdates(_0x9aa2xf[_0x1d63[24]]))[_0x1d63[9]](responseWithResult(_0x9aa2x5))[_0x1d63[13]](handleError(_0x9aa2x5))};exports[_0x1d63[11]]=function(_0x9aa2xf,_0x9aa2x5){FreshdeskConfiguration[_0x1d63[26]](_0x9aa2xf[_0x1d63[18]][_0x1d63[17]])[_0x1d63[9]](handleEntityNotFound(_0x9aa2x5))[_0x1d63[9]](removeEntity(_0x9aa2x5))[_0x1d63[13]](handleError(_0x9aa2x5))};exports[_0x1d63[27]]=function(_0x9aa2xf,_0x9aa2x5,_0x9aa2x10){var _0x9aa2x11;FreshdeskConfiguration[_0x1d63[26]](_0x9aa2xf[_0x1d63[18]][_0x1d63[17]])[_0x1d63[9]](handleEntityNotFound(_0x9aa2x5))[_0x1d63[9]](function(_0x9aa2x14){_0x9aa2x11=_0x9aa2x14;return FreshdeskField[_0x1d63[23]](_0x9aa2xf[_0x1d63[24]])})[_0x1d63[9]](function(_0x9aa2x13){switch(_0x9aa2xf[_0x1d63[18]][_0x1d63[35]]){case _0x1d63[30]:return [_0x9aa2x11[_0x1d63[29]](_0x9aa2x13),_0x9aa2x13];case _0x1d63[32]:return [_0x9aa2x11[_0x1d63[31]](_0x9aa2x13),_0x9aa2x13];case _0x1d63[34]:return [_0x9aa2x11[_0x1d63[33]](_0x9aa2x13),_0x9aa2x13]}})[_0x1d63[28]](function(_0x9aa2x12,_0x9aa2x13){return _0x9aa2x5[_0x1d63[6]](201)[_0x1d63[7]](_0x9aa2x13)})[_0x1d63[13]](handleError(_0x9aa2x5))} \ No newline at end of file diff --git a/server/api/freshdesk_configuration/freshdesk_configuration.socket.js b/server/api/freshdesk_configuration/freshdesk_configuration.socket.js index 4ce7f30..fda6659 100644 --- a/server/api/freshdesk_configuration/freshdesk_configuration.socket.js +++ b/server/api/freshdesk_configuration/freshdesk_configuration.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x33d7=["\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"];_0x33d7[0];var FreshdeskConfiguration=require(_0x33d7[2])[_0x33d7[1]];exports[_0x33d7[3]]=function(_0xe572x2){FreshdeskConfiguration[_0x33d7[4]](function(_0xe572x3){onSave(_0xe572x2,_0xe572x3)});FreshdeskConfiguration[_0x33d7[5]](function(_0xe572x3){onRemove(_0xe572x2,_0xe572x3)})};function onSave(_0xe572x2,_0xe572x3,_0xe572x5){_0xe572x2[_0x33d7[7]](_0x33d7[6],_0xe572x3)}function onRemove(_0xe572x2,_0xe572x3,_0xe572x5){_0xe572x2[_0x33d7[7]](_0x33d7[8],_0xe572x3)} \ No newline at end of file diff --git a/server/api/freshdesk_configuration/index.js b/server/api/freshdesk_configuration/index.js index e08945f..1209aab 100644 --- a/server/api/freshdesk_configuration/index.js +++ b/server/api/freshdesk_configuration/index.js @@ -1,19 +1 @@ -'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; +var _0x4cff=["\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"];_0x4cff[0];var express=require(_0x4cff[1]);var auth=require(_0x4cff[2]);var controller=require(_0x4cff[3]);var router=express.Router();router[_0x4cff[7]](_0x4cff[4],auth[_0x4cff[5]](),controller[_0x4cff[6]]);router[_0x4cff[7]](_0x4cff[8],auth[_0x4cff[5]](),controller[_0x4cff[9]]);router[_0x4cff[11]](_0x4cff[4],auth[_0x4cff[5]](),controller[_0x4cff[10]]);router[_0x4cff[13]](_0x4cff[8],auth[_0x4cff[5]](),controller[_0x4cff[12]]);router[_0x4cff[11]](_0x4cff[14],auth[_0x4cff[5]](),controller[_0x4cff[15]]);router[_0x4cff[16]](_0x4cff[8],auth[_0x4cff[5]](),controller[_0x4cff[12]]);router[_0x4cff[18]](_0x4cff[8],auth[_0x4cff[5]](),controller[_0x4cff[17]]);module[_0x4cff[19]]=router \ No newline at end of file diff --git a/server/api/freshdesk_configuration/index.spec.js b/server/api/freshdesk_configuration/index.spec.js index b297c23..6315933 100644 --- a/server/api/freshdesk_configuration/index.spec.js +++ b/server/api/freshdesk_configuration/index.spec.js @@ -1,97 +1 @@ -'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; - }); - - }); - -}); +var _0xe384=["\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"];_0xe384[0];var proxyquire=require(_0xe384[2])[_0xe384[1]]();var freshdeskConfigurationCtrlStub={index:_0xe384[3],show:_0xe384[4],create:_0xe384[5],update:_0xe384[6],destroy:_0xe384[7]};var routerStub={get:sinon[_0xe384[8]](),put:sinon[_0xe384[8]](),patch:sinon[_0xe384[8]](),post:sinon[_0xe384[8]](),delete:sinon[_0xe384[8]]()};var freshdeskConfigurationIndex=proxyquire(_0xe384[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(_0xe384[10],function(){it(_0xe384[11],function(){expect(freshdeskConfigurationIndex)[_0xe384[13]][_0xe384[12]](routerStub)});describe(_0xe384[14],function(){it(_0xe384[15],function(){expect(routerStub[_0xe384[21]][_0xe384[20]](_0xe384[19],_0xe384[3]))[_0xe384[13]][_0xe384[18]][_0xe384[17]][_0xe384[16]]})});describe(_0xe384[22],function(){it(_0xe384[23],function(){expect(routerStub[_0xe384[21]][_0xe384[20]](_0xe384[24],_0xe384[4]))[_0xe384[13]][_0xe384[18]][_0xe384[17]][_0xe384[16]]})});describe(_0xe384[25],function(){it(_0xe384[26],function(){expect(routerStub[_0xe384[27]][_0xe384[20]](_0xe384[19],_0xe384[5]))[_0xe384[13]][_0xe384[18]][_0xe384[17]][_0xe384[16]]})});describe(_0xe384[28],function(){it(_0xe384[29],function(){expect(routerStub[_0xe384[30]][_0xe384[20]](_0xe384[24],_0xe384[6]))[_0xe384[13]][_0xe384[18]][_0xe384[17]][_0xe384[16]]})});describe(_0xe384[31],function(){it(_0xe384[29],function(){expect(routerStub[_0xe384[32]][_0xe384[20]](_0xe384[24],_0xe384[6]))[_0xe384[13]][_0xe384[18]][_0xe384[17]][_0xe384[16]]})});describe(_0xe384[33],function(){it(_0xe384[34],function(){expect(routerStub[_0xe384[35]][_0xe384[20]](_0xe384[24],_0xe384[7]))[_0xe384[13]][_0xe384[18]][_0xe384[17]][_0xe384[16]]})})}) \ No newline at end of file diff --git a/server/api/freshdesk_field/freshdesk_field.controller.js b/server/api/freshdesk_field/freshdesk_field.controller.js index 4a35db8..86616b7 100644 --- a/server/api/freshdesk_field/freshdesk_field.controller.js +++ b/server/api/freshdesk_field/freshdesk_field.controller.js @@ -1,104 +1 @@ -/** - * 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)); -} +var _0xc34e=["\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"];_0xc34e[0];var _=require(_0xc34e[1]);var FreshdeskField=require(_0xc34e[3])[_0xc34e[2]];function handleError(_0xcd78x4,_0xcd78x5){_0xcd78x5=_0xcd78x5||500;return function(_0xcd78x6){_0xcd78x4[_0xc34e[5]](_0xcd78x5)[_0xc34e[4]](_0xcd78x6)}}function responseWithResult(_0xcd78x4,_0xcd78x5){_0xcd78x5=_0xcd78x5||200;return function(_0xcd78x8){if(_0xcd78x8){_0xcd78x4[_0xc34e[5]](_0xcd78x5)[_0xc34e[6]](_0xcd78x8)}}}function handleEntityNotFound(_0xcd78x4){return function(_0xcd78x8){if(!_0xcd78x8){_0xcd78x4[_0xc34e[5]](404)[_0xc34e[7]]();return null};return _0xcd78x8}}function saveUpdates(_0xcd78xb){return function(_0xcd78x8){return _0xcd78x8[_0xc34e[9]](_0xcd78xb)[_0xc34e[8]](function(_0xcd78xc){return _0xcd78xc})}}function removeEntity(_0xcd78x4){return function(_0xcd78x8){if(_0xcd78x8){return _0xcd78x8[_0xc34e[10]]()[_0xc34e[8]](function(){_0xcd78x4[_0xc34e[5]](204)[_0xc34e[7]]()})}}}exports[_0xc34e[11]]=function(_0xcd78xe,_0xcd78x4){FreshdeskField[_0xc34e[13]]()[_0xc34e[8]](responseWithResult(_0xcd78x4))[_0xc34e[12]](handleError(_0xcd78x4))};exports[_0xc34e[14]]=function(_0xcd78xe,_0xcd78x4){FreshdeskField[_0xc34e[17]](_0xcd78xe[_0xc34e[16]][_0xc34e[15]])[_0xc34e[8]](handleEntityNotFound(_0xcd78x4))[_0xc34e[8]](responseWithResult(_0xcd78x4))[_0xc34e[12]](handleError(_0xcd78x4))};exports[_0xc34e[18]]=function(_0xcd78xe,_0xcd78x4){FreshdeskField[_0xc34e[18]](_0xcd78xe[_0xc34e[19]])[_0xc34e[8]](responseWithResult(_0xcd78x4,201))[_0xc34e[12]](handleError(_0xcd78x4))};exports[_0xc34e[20]]=function(_0xcd78xe,_0xcd78x4){if(_0xcd78xe[_0xc34e[19]][_0xc34e[15]]){delete _0xcd78xe[_0xc34e[19]][_0xc34e[15]]};FreshdeskField[_0xc34e[17]](_0xcd78xe[_0xc34e[16]][_0xc34e[15]])[_0xc34e[8]](handleEntityNotFound(_0xcd78x4))[_0xc34e[8]](saveUpdates(_0xcd78xe[_0xc34e[19]]))[_0xc34e[8]](responseWithResult(_0xcd78x4))[_0xc34e[12]](handleError(_0xcd78x4))};exports[_0xc34e[10]]=function(_0xcd78xe,_0xcd78x4){FreshdeskField[_0xc34e[17]](_0xcd78xe[_0xc34e[16]][_0xc34e[15]])[_0xc34e[8]](handleEntityNotFound(_0xcd78x4))[_0xc34e[8]](removeEntity(_0xcd78x4))[_0xc34e[12]](handleError(_0xcd78x4))} \ No newline at end of file diff --git a/server/api/freshdesk_field/freshdesk_field.socket.js b/server/api/freshdesk_field/freshdesk_field.socket.js index b351442..74c3471 100644 --- a/server/api/freshdesk_field/freshdesk_field.socket.js +++ b/server/api/freshdesk_field/freshdesk_field.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x8d05=["\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"];_0x8d05[0];var FreshdeskField=require(_0x8d05[2])[_0x8d05[1]];exports[_0x8d05[3]]=function(_0x6a3ex2){FreshdeskField[_0x8d05[4]](function(_0x6a3ex3){onSave(_0x6a3ex2,_0x6a3ex3)});FreshdeskField[_0x8d05[5]](function(_0x6a3ex3){onRemove(_0x6a3ex2,_0x6a3ex3)})};function onSave(_0x6a3ex2,_0x6a3ex3,_0x6a3ex5){_0x6a3ex2[_0x8d05[7]](_0x8d05[6],_0x6a3ex3)}function onRemove(_0x6a3ex2,_0x6a3ex3,_0x6a3ex5){_0x6a3ex2[_0x8d05[7]](_0x8d05[8],_0x6a3ex3)} \ No newline at end of file diff --git a/server/api/freshdesk_field/index.js b/server/api/freshdesk_field/index.js index d17268f..56790b0 100644 --- a/server/api/freshdesk_field/index.js +++ b/server/api/freshdesk_field/index.js @@ -1,18 +1 @@ -'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; +var _0x50db=["\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"];_0x50db[0];var express=require(_0x50db[1]);var auth=require(_0x50db[2]);var controller=require(_0x50db[3]);var router=express.Router();router[_0x50db[7]](_0x50db[4],auth[_0x50db[5]](),controller[_0x50db[6]]);router[_0x50db[7]](_0x50db[8],auth[_0x50db[5]](),controller[_0x50db[9]]);router[_0x50db[11]](_0x50db[4],auth[_0x50db[5]](),controller[_0x50db[10]]);router[_0x50db[13]](_0x50db[8],auth[_0x50db[5]](),controller[_0x50db[12]]);router[_0x50db[14]](_0x50db[8],auth[_0x50db[5]](),controller[_0x50db[12]]);router[_0x50db[16]](_0x50db[8],auth[_0x50db[5]](),controller[_0x50db[15]]);module[_0x50db[17]]=router \ No newline at end of file diff --git a/server/api/freshdesk_field/index.spec.js b/server/api/freshdesk_field/index.spec.js index b5c0fb8..0b8f828 100644 --- a/server/api/freshdesk_field/index.spec.js +++ b/server/api/freshdesk_field/index.spec.js @@ -1,97 +1 @@ -'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; - }); - - }); - -}); +var _0x233e=["\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"];_0x233e[0];var proxyquire=require(_0x233e[2])[_0x233e[1]]();var freshdeskFieldCtrlStub={index:_0x233e[3],show:_0x233e[4],create:_0x233e[5],update:_0x233e[6],destroy:_0x233e[7]};var routerStub={get:sinon[_0x233e[8]](),put:sinon[_0x233e[8]](),patch:sinon[_0x233e[8]](),post:sinon[_0x233e[8]](),delete:sinon[_0x233e[8]]()};var freshdeskFieldIndex=proxyquire(_0x233e[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(_0x233e[10],function(){it(_0x233e[11],function(){expect(freshdeskFieldIndex)[_0x233e[13]][_0x233e[12]](routerStub)});describe(_0x233e[14],function(){it(_0x233e[15],function(){expect(routerStub[_0x233e[21]][_0x233e[20]](_0x233e[19],_0x233e[3]))[_0x233e[13]][_0x233e[18]][_0x233e[17]][_0x233e[16]]})});describe(_0x233e[22],function(){it(_0x233e[23],function(){expect(routerStub[_0x233e[21]][_0x233e[20]](_0x233e[24],_0x233e[4]))[_0x233e[13]][_0x233e[18]][_0x233e[17]][_0x233e[16]]})});describe(_0x233e[25],function(){it(_0x233e[26],function(){expect(routerStub[_0x233e[27]][_0x233e[20]](_0x233e[19],_0x233e[5]))[_0x233e[13]][_0x233e[18]][_0x233e[17]][_0x233e[16]]})});describe(_0x233e[28],function(){it(_0x233e[29],function(){expect(routerStub[_0x233e[30]][_0x233e[20]](_0x233e[24],_0x233e[6]))[_0x233e[13]][_0x233e[18]][_0x233e[17]][_0x233e[16]]})});describe(_0x233e[31],function(){it(_0x233e[29],function(){expect(routerStub[_0x233e[32]][_0x233e[20]](_0x233e[24],_0x233e[6]))[_0x233e[13]][_0x233e[18]][_0x233e[17]][_0x233e[16]]})});describe(_0x233e[33],function(){it(_0x233e[34],function(){expect(routerStub[_0x233e[35]][_0x233e[20]](_0x233e[24],_0x233e[7]))[_0x233e[13]][_0x233e[18]][_0x233e[17]][_0x233e[16]]})})}) \ No newline at end of file diff --git a/server/api/integration/index.js b/server/api/integration/index.js index 5789126..b09ee1b 100644 --- a/server/api/integration/index.js +++ b/server/api/integration/index.js @@ -1,15 +1 @@ -'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 +var _0x35f1=["\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"];_0x35f1[0];var express=require(_0x35f1[1]);var controller=require(_0x35f1[2]);var router=express.Router();router[_0x35f1[5]](_0x35f1[3],controller[_0x35f1[4]]);router[_0x35f1[5]](_0x35f1[6],controller[_0x35f1[7]]);router[_0x35f1[9]](_0x35f1[3],controller[_0x35f1[8]]);router[_0x35f1[11]](_0x35f1[6],controller[_0x35f1[10]]);router[_0x35f1[12]](_0x35f1[6],controller[_0x35f1[10]]);router[_0x35f1[14]](_0x35f1[6],controller[_0x35f1[13]]);module[_0x35f1[15]]=router \ No newline at end of file diff --git a/server/api/integration/integration.controller.js b/server/api/integration/integration.controller.js index cc5e706..398e894 100644 --- a/server/api/integration/integration.controller.js +++ b/server/api/integration/integration.controller.js @@ -1,178 +1 @@ -'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); -} +var _0xfb9d=["\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"];_0xfb9d[0];var _=require(_0xfb9d[1]);var uploadFile=require(_0xfb9d[2]);var config=require(_0xfb9d[3]);var path=require(_0xfb9d[4]);var sr=require(_0xfb9d[5]);var admZip=require(_0xfb9d[6]);var str2json=require(_0xfb9d[7]);var fs=require(_0xfb9d[8]);var Util=require(_0xfb9d[9]);var Integration=require(_0xfb9d[11])[_0xfb9d[10]];exports[_0xfb9d[12]]=function(_0xb6c0xb,_0xb6c0xc,_0xb6c0xd){return Integration[_0xfb9d[19]](Util[_0xfb9d[18]](_0xb6c0xb[_0xfb9d[17]]))[_0xfb9d[16]](function(_0xb6c0xf){_0xb6c0xc[_0xfb9d[15]](200)[_0xfb9d[14]](_0xb6c0xf)})[_0xfb9d[13]](function(_0xb6c0xe){return handleError(_0xb6c0xc,_0xb6c0xe)})};exports[_0xfb9d[20]]=function(_0xb6c0xb,_0xb6c0xc){Integration[_0xfb9d[24]](_0xb6c0xb[_0xfb9d[23]][_0xfb9d[22]])[_0xfb9d[16]](function(_0xb6c0x10){if(!_0xb6c0x10){return _0xb6c0xc[_0xfb9d[21]](404)};return _0xb6c0xc[_0xfb9d[14]](_0xb6c0x10)})[_0xfb9d[13]](function(_0xb6c0xe){return handleError(_0xb6c0xc,_0xb6c0xe)})};exports[_0xfb9d[25]]=function(_0xb6c0xb,_0xb6c0xc){var _0xb6c0x11= new uploadFile({dest:path[_0xfb9d[28]](config[_0xfb9d[26]],_0xfb9d[27]),maxFileSize:5*1000000,maxNumberOfFiles:1,minNumberOfFiles:1,acceptFileTypes:/(\.|\/)(zip)$/i,messages:{maxNumberOfFiles:_0xfb9d[29],acceptFileTypes:_0xfb9d[30],maxFileSize:_0xfb9d[31],invalidRequest:_0xfb9d[32]}});_0xb6c0x11[_0xfb9d[50]](_0xfb9d[33],function(_0xb6c0x12,_0xb6c0x13){var _0xb6c0x14= new admZip(_0xb6c0x13[_0xfb9d[34]][_0xfb9d[4]]);var _0xb6c0x15=false;var _0xb6c0x16=_0xb6c0x14[_0xfb9d[35]]();_0xb6c0x16[_0xfb9d[46]](function(_0xb6c0x17){if(_0xb6c0x17[_0xfb9d[36]]===_0xfb9d[37]){var _0xb6c0x18=_0xb6c0x17[_0xfb9d[39]]().toString(_0xfb9d[38]);console[_0xfb9d[41]](_0xfb9d[40],_0xb6c0x18);try{_0xb6c0x15=JSON[_0xfb9d[42]](_0xb6c0x18);console[_0xfb9d[41]](_0xfb9d[40],_0xb6c0x15);Integration[_0xfb9d[25]](_[_0xfb9d[44]](_0xb6c0x13[_0xfb9d[34]],_0xb6c0x15))[_0xfb9d[16]](function(_0xb6c0x10){_0xb6c0x14[_0xfb9d[43]](path[_0xfb9d[28]](config[_0xfb9d[26]],_0xfb9d[27]),true);return _0xb6c0xc[_0xfb9d[15]](201)[_0xfb9d[14]](_0xb6c0x10)})[_0xfb9d[13]](function(_0xb6c0xe){return handleError(_0xb6c0xc,_0xb6c0xe)})}catch(e){console[_0xfb9d[41]](e);var _0xb6c0xe={errors:[{type:_0xfb9d[45],message:e}]};return handleError(_0xb6c0xc,_0xb6c0xe)}}});fs[_0xfb9d[47]](_0xb6c0x13[_0xfb9d[34]][_0xfb9d[4]]);if(!_0xb6c0x15){var _0xb6c0xe={errors:[{type:_0xfb9d[48],message:_0xfb9d[49]}]};return handleError(_0xb6c0xc,_0xb6c0xe)}});_0xb6c0x11[_0xfb9d[50]](_0xfb9d[51],function(_0xb6c0x19){var _0xb6c0xe={errors:[{type:_0xfb9d[52],message:_0xb6c0x19}]};return handleError(_0xb6c0xc,_0xb6c0xe)});_0xb6c0x11[_0xfb9d[42]](_0xb6c0xb)};exports[_0xfb9d[53]]=function(_0xb6c0xb,_0xb6c0xc){if(_0xb6c0xb[_0xfb9d[54]][_0xfb9d[22]]){delete _0xb6c0xb[_0xfb9d[54]][_0xfb9d[22]]};Integration[_0xfb9d[56]]({where:{id:_0xb6c0xb[_0xfb9d[23]][_0xfb9d[22]]}})[_0xfb9d[16]](function(_0xb6c0x10){if(!_0xb6c0x10){return _0xb6c0xc[_0xfb9d[21]](404)};var _0xb6c0x1a=_[_0xfb9d[44]](_0xb6c0x10,_0xb6c0xb[_0xfb9d[54]]);_0xb6c0x1a[_0xfb9d[55]]()[_0xfb9d[16]](function(){return _0xb6c0xc[_0xfb9d[15]](200)[_0xfb9d[14]](_0xb6c0x10)})[_0xfb9d[13]](function(_0xb6c0xe){return handleError(_0xb6c0xc,_0xb6c0xe)})})[_0xfb9d[13]](function(_0xb6c0xe){return handleError(_0xb6c0xc,_0xb6c0xe)})};exports[_0xfb9d[57]]=function(_0xb6c0xb,_0xb6c0xc){Integration[_0xfb9d[56]]({where:{id:_0xb6c0xb[_0xfb9d[23]][_0xfb9d[22]]}})[_0xfb9d[16]](function(_0xb6c0x10){if(!_0xb6c0x10){return _0xb6c0xc[_0xfb9d[21]](404)};_0xb6c0x10[_0xfb9d[57]]()[_0xfb9d[16]](function(){return _0xb6c0xc[_0xfb9d[21]](204)})[_0xfb9d[13]](function(_0xb6c0xe){return handleError(_0xb6c0xc,_0xb6c0xe)})})[_0xfb9d[13]](function(_0xb6c0xe){return handleError(_0xb6c0xc,_0xb6c0xe)})};function handleError(_0xb6c0xc,_0xb6c0xe){return _0xb6c0xc[_0xfb9d[15]](500)[_0xfb9d[14]](_0xb6c0xe)} \ No newline at end of file diff --git a/server/api/integration/integration.socket.js b/server/api/integration/integration.socket.js index a79af43..98c6145 100644 --- a/server/api/integration/integration.socket.js +++ b/server/api/integration/integration.socket.js @@ -1,27 +1 @@ -/** - * 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); -} +var _0xc3ac=["\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"];_0xc3ac[0];var Integration=require(_0xc3ac[2])[_0xc3ac[1]];exports[_0xc3ac[3]]=function(_0xf4f4x2){Integration[_0xc3ac[4]](function(_0xf4f4x3){onSave(_0xf4f4x2,_0xf4f4x3)});Integration[_0xc3ac[5]](function(_0xf4f4x3){onSave(_0xf4f4x2,_0xf4f4x3)});Integration[_0xc3ac[6]](function(_0xf4f4x3){onRemove(_0xf4f4x2,_0xf4f4x3)})};function onSave(_0xf4f4x2,_0xf4f4x3,_0xf4f4x5){_0xf4f4x2[_0xc3ac[8]](_0xc3ac[7],_0xf4f4x3)}function onRemove(_0xf4f4x2,_0xf4f4x3,_0xf4f4x5){_0xf4f4x2[_0xc3ac[8]](_0xc3ac[9],_0xf4f4x3)} \ No newline at end of file diff --git a/server/api/integration/integration.spec.js b/server/api/integration/integration.spec.js index 0d4146d..284ce9c 100644 --- a/server/api/integration/integration.spec.js +++ b/server/api/integration/integration.spec.js @@ -1,20 +1 @@ -'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 +var _0xf317=["\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"];_0xf317[0];var should=require(_0xf317[1]);var app=require(_0xf317[2]);var request=require(_0xf317[3]);describe(_0xf317[4],function(){it(_0xf317[5],function(_0x1f29x4){request(app)[_0xf317[13]](_0xf317[12])[_0xf317[11]](200)[_0xf317[11]](_0xf317[10],/json/)[_0xf317[9]](function(_0x1f29x5,_0x1f29x6){if(_0x1f29x5){return _0x1f29x4(_0x1f29x5)};_0x1f29x6[_0xf317[8]][_0xf317[1]][_0xf317[7]][_0xf317[6]](Array);_0x1f29x4()})})}) \ No newline at end of file diff --git a/server/api/interval/index.js b/server/api/interval/index.js index b9f5ab2..4218475 100644 --- a/server/api/interval/index.js +++ b/server/api/interval/index.js @@ -1,16 +1 @@ -'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; +var _0x5ce9=["\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"];_0x5ce9[0];var express=require(_0x5ce9[1]);var controller=require(_0x5ce9[2]);var auth=require(_0x5ce9[3]);var router=express.Router();router[_0x5ce9[7]](_0x5ce9[4],auth[_0x5ce9[5]](),controller[_0x5ce9[6]]);router[_0x5ce9[7]](_0x5ce9[8],auth[_0x5ce9[5]](),controller[_0x5ce9[9]]);router[_0x5ce9[11]](_0x5ce9[4],auth[_0x5ce9[5]](),controller[_0x5ce9[10]]);router[_0x5ce9[13]](_0x5ce9[8],auth[_0x5ce9[5]](),controller[_0x5ce9[12]]);router[_0x5ce9[15]](_0x5ce9[4],auth[_0x5ce9[5]](),controller[_0x5ce9[14]]);router[_0x5ce9[15]](_0x5ce9[8],auth[_0x5ce9[5]](),controller[_0x5ce9[16]]);module[_0x5ce9[17]]=router \ No newline at end of file diff --git a/server/api/interval/interval.controller.js b/server/api/interval/interval.controller.js index 584391e..babacfe 100644 --- a/server/api/interval/interval.controller.js +++ b/server/api/interval/interval.controller.js @@ -1,167 +1 @@ -'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); -} +var _0x7a64=["\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"];_0x7a64[0];var _=require(_0x7a64[1]);var Interval=require(_0x7a64[3])[_0x7a64[2]];var VoiceExtension=require(_0x7a64[3])[_0x7a64[4]];var sequelize=require(_0x7a64[3])[_0x7a64[5]];var Util=require(_0x7a64[6]);exports[_0x7a64[7]]=function(_0xc6ebx6,_0xc6ebx7,_0xc6ebx8){return Interval[_0x7a64[17]](_0x7a64[15],_0x7a64[16])[_0x7a64[14]](Util[_0x7a64[13]](_0xc6ebx6[_0x7a64[12]]))[_0x7a64[11]](function(_0xc6ebxa){_0xc6ebx7[_0x7a64[10]](200)[_0x7a64[9]](_0xc6ebxa)})[_0x7a64[8]](function(_0xc6ebx9){return handleError(_0xc6ebx7,_0xc6ebx9)})};exports[_0x7a64[18]]=function(_0xc6ebx6,_0xc6ebx7){return Interval[_0x7a64[17]](_0x7a64[16])[_0x7a64[22]](_0xc6ebx6[_0x7a64[21]][_0x7a64[20]])[_0x7a64[11]](function(_0xc6ebxb){if(!_0xc6ebxb){return _0xc6ebx7[_0x7a64[19]](404)};return _0xc6ebx7[_0x7a64[9]](_0xc6ebxb)})[_0x7a64[8]](function(_0xc6ebx9){return handleError(_0xc6ebx7,_0xc6ebx9)})};exports[_0x7a64[23]]=function(_0xc6ebx6,_0xc6ebx7){return Interval[_0x7a64[17]](_0x7a64[16])[_0x7a64[23]](_0xc6ebx6[_0x7a64[25]])[_0x7a64[11]](function(_0xc6ebxb){return _0xc6ebx7[_0x7a64[10]](201)[_0x7a64[9]](_0xc6ebxb)})[_0x7a64[8]](function(_0xc6ebx9){console[_0x7a64[24]](_0xc6ebx9);return handleError(_0xc6ebx7,_0xc6ebx9)})};exports[_0x7a64[26]]=function(_0xc6ebx6,_0xc6ebx7){console[_0x7a64[24]](_0xc6ebx6[_0x7a64[25]]);return sequelize[_0x7a64[32]](function(_0xc6ebxc){if(_0xc6ebx6[_0x7a64[25]][_0x7a64[20]]){delete _0xc6ebx6[_0x7a64[25]][_0x7a64[20]]};return Interval[_0x7a64[26]](_0xc6ebx6[_0x7a64[25]],{where:{id:_0xc6ebx6[_0x7a64[21]][_0x7a64[20]]},individualHooks:true,transaction:_0xc6ebxc})[_0x7a64[11]](function(){if(_0xc6ebx6[_0x7a64[25]][_0x7a64[29]]){return Interval[_0x7a64[31]]({where:{IntervalId:_0xc6ebx6[_0x7a64[21]][_0x7a64[20]]},transaction:_0xc6ebxc})}})[_0x7a64[11]](function(){console[_0x7a64[24]](_0x7a64[28]);if(_0xc6ebx6[_0x7a64[25]][_0x7a64[29]]&&_0xc6ebx6[_0x7a64[25]][_0x7a64[29]][_0x7a64[30]]){return _0xc6ebx6[_0x7a64[21]][_0x7a64[20]]}})[_0x7a64[11]](bulkCreateSubIntervals(_0xc6ebx6[_0x7a64[25]].SubIntervals,_0xc6ebxc))[_0x7a64[27]]()})[_0x7a64[11]](function(){return _0xc6ebx7[_0x7a64[19]](200)})[_0x7a64[8]](function(_0xc6ebx9){console[_0x7a64[24]](_0xc6ebx9);return handleError(_0xc6ebx7,_0xc6ebx9)})};function bulkCreateSubIntervals(_0xc6ebxe,_0xc6ebxc){return function(_0xc6ebxf){if(_0xc6ebxf){console[_0x7a64[24]](_0x7a64[33]);var _0xc6ebx10=[];_0xc6ebxe[_0x7a64[36]](function(_0xc6ebx11){_0xc6ebx11[_0x7a64[34]]=_0xc6ebxf;_0xc6ebx10[_0x7a64[35]](Interval[_0x7a64[23]](_0xc6ebx11,{transaction:_0xc6ebxc}))});return _0xc6ebx10}else {return []}}}exports[_0x7a64[31]]=function(_0xc6ebx6,_0xc6ebx7){return sequelize[_0x7a64[32]](function(_0xc6ebxc){return Interval[_0x7a64[31]]({where:{id:_0xc6ebx6[_0x7a64[21]][_0x7a64[20]]},individualHooks:true,transaction:_0xc6ebxc})})[_0x7a64[11]](function(){return _0xc6ebx7[_0x7a64[19]](204)})[_0x7a64[8]](sequelize.ForeignKeyConstraintError,function(_0xc6ebx9){_0xc6ebx9[_0x7a64[37]]=_0x7a64[38];_0xc6ebx9[_0x7a64[39]]=_0x7a64[40];return handleError(_0xc6ebx7,_0xc6ebx9)})[_0x7a64[8]](function(_0xc6ebx9){return handleError(_0xc6ebx7,_0xc6ebx9)})};exports[_0x7a64[41]]=function(_0xc6ebx6,_0xc6ebx7){return sequelize[_0x7a64[32]](function(_0xc6ebxc){return Interval[_0x7a64[31]]({where:{id:_0xc6ebx6[_0x7a64[12]][_0x7a64[42]]},individualHooks:true,transaction:_0xc6ebxc})})[_0x7a64[11]](function(){return _0xc6ebx7[_0x7a64[19]](204)})[_0x7a64[8]](sequelize.ForeignKeyConstraintError,function(_0xc6ebx9){_0xc6ebx9[_0x7a64[37]]=_0x7a64[38];_0xc6ebx9[_0x7a64[39]]=_0x7a64[40];return handleError(_0xc6ebx7,_0xc6ebx9)})[_0x7a64[8]](function(_0xc6ebx9){return handleError(_0xc6ebx7,_0xc6ebx9)})};function handleError(_0xc6ebx7,_0xc6ebx9){return _0xc6ebx7[_0x7a64[10]](500)[_0x7a64[9]](_0xc6ebx9)} \ No newline at end of file diff --git a/server/api/interval/interval.socket.js b/server/api/interval/interval.socket.js index d8aee27..b203e8a 100644 --- a/server/api/interval/interval.socket.js +++ b/server/api/interval/interval.socket.js @@ -1,31 +1 @@ -/** - * 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); -} +var _0xddee=["\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"];_0xddee[0];var Interval=require(_0xddee[2])[_0xddee[1]];exports[_0xddee[3]]=function(_0x8c5bx2){Interval[_0xddee[4]](function(_0x8c5bx3){onSave(_0x8c5bx2,_0x8c5bx3)});Interval[_0xddee[5]](function(_0x8c5bx3){onRemove(_0x8c5bx2,_0x8c5bx3)});Interval[_0xddee[6]](function(_0x8c5bx3){onUpdate(_0x8c5bx2,_0x8c5bx3)})};function onSave(_0x8c5bx2,_0x8c5bx3,_0x8c5bx5){_0x8c5bx2[_0xddee[8]](_0xddee[7],_0x8c5bx3)}function onRemove(_0x8c5bx2,_0x8c5bx3,_0x8c5bx5){_0x8c5bx2[_0xddee[8]](_0xddee[9],_0x8c5bx3)}function onUpdate(_0x8c5bx2,_0x8c5bx3,_0x8c5bx5){_0x8c5bx2[_0xddee[8]](_0xddee[10],_0x8c5bx3)} \ No newline at end of file diff --git a/server/api/interval/interval.spec.js b/server/api/interval/interval.spec.js index 280cb64..2c11912 100644 --- a/server/api/interval/interval.spec.js +++ b/server/api/interval/interval.spec.js @@ -1,20 +1 @@ -'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(); - }); - }); -}); +var _0x36c5=["\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"];_0x36c5[0];var should=require(_0x36c5[1]);var app=require(_0x36c5[2]);var request=require(_0x36c5[3]);describe(_0x36c5[4],function(){it(_0x36c5[5],function(_0xdb98x4){request(app)[_0x36c5[13]](_0x36c5[12])[_0x36c5[11]](200)[_0x36c5[11]](_0x36c5[10],/json/)[_0x36c5[9]](function(_0xdb98x5,_0xdb98x6){if(_0xdb98x5){return _0xdb98x4(_0xdb98x5)};_0xdb98x6[_0x36c5[8]][_0x36c5[1]][_0x36c5[7]][_0x36c5[6]](Array);_0xdb98x4()})})}) \ No newline at end of file diff --git a/server/api/jscripty_project/index.js b/server/api/jscripty_project/index.js index 1ecf642..8cf57f7 100644 --- a/server/api/jscripty_project/index.js +++ b/server/api/jscripty_project/index.js @@ -1,33 +1 @@ -'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; +var _0xda8b=["\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"];_0xda8b[0];var express=require(_0xda8b[1]);var auth=require(_0xda8b[2]);var controller=require(_0xda8b[3]);var router=express.Router();router[_0xda8b[7]](_0xda8b[4],auth[_0xda8b[5]](),controller[_0xda8b[6]]);router[_0xda8b[7]](_0xda8b[8],auth[_0xda8b[5]](),controller[_0xda8b[9]]);router[_0xda8b[7]](_0xda8b[10],controller[_0xda8b[11]]);router[_0xda8b[7]](_0xda8b[12],controller[_0xda8b[13]]);router[_0xda8b[7]](_0xda8b[14],controller[_0xda8b[15]]);router[_0xda8b[7]](_0xda8b[16],controller[_0xda8b[17]]);router[_0xda8b[7]](_0xda8b[18],controller[_0xda8b[19]]);router[_0xda8b[7]](_0xda8b[20],controller[_0xda8b[21]]);router[_0xda8b[23]](_0xda8b[4],auth[_0xda8b[5]](),controller[_0xda8b[22]]);router[_0xda8b[23]](_0xda8b[12],auth[_0xda8b[5]](),controller[_0xda8b[24]]);router[_0xda8b[23]](_0xda8b[25],auth[_0xda8b[5]](),controller[_0xda8b[26]]);router[_0xda8b[28]](_0xda8b[8],auth[_0xda8b[5]](),controller[_0xda8b[27]]);router[_0xda8b[28]](_0xda8b[14],auth[_0xda8b[5]](),controller[_0xda8b[29]]);router[_0xda8b[30]](_0xda8b[8],auth[_0xda8b[5]](),controller[_0xda8b[27]]);router[_0xda8b[32]](_0xda8b[4],auth[_0xda8b[5]](),controller[_0xda8b[31]]);router[_0xda8b[32]](_0xda8b[8],auth[_0xda8b[5]](),controller[_0xda8b[33]]);module[_0xda8b[34]]=router \ No newline at end of file diff --git a/server/api/jscripty_project/index.spec.js b/server/api/jscripty_project/index.spec.js index 3860e91..2e9658b 100644 --- a/server/api/jscripty_project/index.spec.js +++ b/server/api/jscripty_project/index.spec.js @@ -1,97 +1 @@ -'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; - }); - - }); - -}); +var _0x71dd=["\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"];_0x71dd[0];var proxyquire=require(_0x71dd[2])[_0x71dd[1]]();var jscriptyProjectCtrlStub={index:_0x71dd[3],show:_0x71dd[4],create:_0x71dd[5],update:_0x71dd[6],destroy:_0x71dd[7]};var routerStub={get:sinon[_0x71dd[8]](),put:sinon[_0x71dd[8]](),patch:sinon[_0x71dd[8]](),post:sinon[_0x71dd[8]](),delete:sinon[_0x71dd[8]]()};var jscriptyProjectIndex=proxyquire(_0x71dd[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(_0x71dd[10],function(){it(_0x71dd[11],function(){expect(jscriptyProjectIndex)[_0x71dd[13]][_0x71dd[12]](routerStub)});describe(_0x71dd[14],function(){it(_0x71dd[15],function(){expect(routerStub[_0x71dd[21]][_0x71dd[20]](_0x71dd[19],_0x71dd[3]))[_0x71dd[13]][_0x71dd[18]][_0x71dd[17]][_0x71dd[16]]})});describe(_0x71dd[22],function(){it(_0x71dd[23],function(){expect(routerStub[_0x71dd[21]][_0x71dd[20]](_0x71dd[24],_0x71dd[4]))[_0x71dd[13]][_0x71dd[18]][_0x71dd[17]][_0x71dd[16]]})});describe(_0x71dd[25],function(){it(_0x71dd[26],function(){expect(routerStub[_0x71dd[27]][_0x71dd[20]](_0x71dd[19],_0x71dd[5]))[_0x71dd[13]][_0x71dd[18]][_0x71dd[17]][_0x71dd[16]]})});describe(_0x71dd[28],function(){it(_0x71dd[29],function(){expect(routerStub[_0x71dd[30]][_0x71dd[20]](_0x71dd[24],_0x71dd[6]))[_0x71dd[13]][_0x71dd[18]][_0x71dd[17]][_0x71dd[16]]})});describe(_0x71dd[31],function(){it(_0x71dd[29],function(){expect(routerStub[_0x71dd[32]][_0x71dd[20]](_0x71dd[24],_0x71dd[6]))[_0x71dd[13]][_0x71dd[18]][_0x71dd[17]][_0x71dd[16]]})});describe(_0x71dd[33],function(){it(_0x71dd[34],function(){expect(routerStub[_0x71dd[35]][_0x71dd[20]](_0x71dd[24],_0x71dd[7]))[_0x71dd[13]][_0x71dd[18]][_0x71dd[17]][_0x71dd[16]]})})}) \ No newline at end of file diff --git a/server/api/jscripty_project/jscripty_project.controller.js b/server/api/jscripty_project/jscripty_project.controller.js index 7550756..ab19127 100644 --- a/server/api/jscripty_project/jscripty_project.controller.js +++ b/server/api/jscripty_project/jscripty_project.controller.js @@ -1,389 +1 @@ -/** - * 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); -// }); -// }; +var _0x4ad7=["\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"];_0x4ad7[0];var xml=require(_0x4ad7[1]);var _=require(_0x4ad7[2]);var JscriptyProject=require(_0x4ad7[4])[_0x4ad7[3]];var Util=require(_0x4ad7[5]);var sequelize=require(_0x4ad7[4])[_0x4ad7[6]];var ReportJscriptySession=require(_0x4ad7[4])[_0x4ad7[7]];var ReportJscriptyQuestion=require(_0x4ad7[4])[_0x4ad7[8]];var ReportJscriptyInput=require(_0x4ad7[4])[_0x4ad7[9]];var Promise=require(_0x4ad7[10]);function handleError(_0x8c45xb,_0x8c45xc){return _0x8c45xb[_0x4ad7[12]](500)[_0x4ad7[11]](_0x8c45xc)}function responseWithResult(_0x8c45xb,_0x8c45xe){_0x8c45xe=_0x8c45xe||200;return function(_0x8c45xf){if(_0x8c45xf){_0x8c45xb[_0x4ad7[12]](_0x8c45xe)[_0x4ad7[13]](_0x8c45xf)}}}function handleEntityNotFound(_0x8c45xb){return function(_0x8c45xf){if(!_0x8c45xf){_0x8c45xb[_0x4ad7[12]](404)[_0x4ad7[14]]();return null};return _0x8c45xf}}function saveUpdates(_0x8c45x12){return function(_0x8c45xf){return _0x8c45xf[_0x4ad7[16]](_0x8c45x12)[_0x4ad7[15]](function(_0x8c45x13){return _0x8c45x13})}}function removeEntity(_0x8c45xb){return function(_0x8c45xf){if(_0x8c45xf){return _0x8c45xf[_0x4ad7[17]]()[_0x4ad7[15]](function(){_0x8c45xb[_0x4ad7[12]](204)[_0x4ad7[14]]()})}}}exports[_0x4ad7[18]]=function(_0x8c45x15,_0x8c45xb,_0x8c45x16){return JscriptyProject[_0x4ad7[22]](Util[_0x4ad7[21]](_0x8c45x15[_0x4ad7[20]]))[_0x4ad7[15]](function(_0x8c45x17){_0x8c45xb[_0x4ad7[12]](200)[_0x4ad7[11]](_0x8c45x17)})[_0x4ad7[19]](function(_0x8c45xc){return handleError(_0x8c45xb,_0x8c45xc)})};exports[_0x4ad7[23]]=function(_0x8c45x15,_0x8c45xb){return JscriptyProject[_0x4ad7[27]](_0x8c45x15[_0x4ad7[26]][_0x4ad7[25]])[_0x4ad7[15]](function(_0x8c45x18){if(!_0x8c45x18){return _0x8c45xb[_0x4ad7[24]](404)};return _0x8c45xb[_0x4ad7[11]](_0x8c45x18)})[_0x4ad7[19]](function(_0x8c45xc){return handleError(_0x8c45xb,_0x8c45xc)})};exports[_0x4ad7[28]]=function(_0x8c45x15,_0x8c45xb){return ReportJscriptySession[_0x4ad7[31]]({method:[_0x4ad7[30],_0x8c45x15[_0x4ad7[26]][_0x4ad7[25]]]})[_0x4ad7[22]](Util[_0x4ad7[21]](_0x8c45x15[_0x4ad7[20]]))[_0x4ad7[15]](handleEntityNotFound(_0x8c45xb))[_0x4ad7[15]](responseWithResult(_0x8c45xb))[_0x4ad7[19]](function(_0x8c45xc){console[_0x4ad7[29]](_0x8c45xc);return handleError(_0x8c45xb,_0x8c45xc)})};exports[_0x4ad7[32]]=function(_0x8c45x15,_0x8c45xb){return ReportJscriptySession[_0x4ad7[34]]({where:{projectId:_0x8c45x15[_0x4ad7[26]][_0x4ad7[25]],session_id:_0x8c45x15[_0x4ad7[26]][_0x4ad7[33]]},include:[{model:ReportJscriptyQuestion,include:[{model:ReportJscriptyInput}]}]})[_0x4ad7[15]](handleEntityNotFound(_0x8c45xb))[_0x4ad7[15]](responseWithResult(_0x8c45xb))[_0x4ad7[19]](function(_0x8c45xc){console[_0x4ad7[29]](_0x8c45xc);return handleError(_0x8c45xb,_0x8c45xc)})};exports[_0x4ad7[35]]=function(_0x8c45x15,_0x8c45xb){return ReportJscriptyQuestion[_0x4ad7[34]]({where:{projectId:_0x8c45x15[_0x4ad7[26]][_0x4ad7[25]]},include:[{model:ReportJscriptyInput}]})[_0x4ad7[15]](function(_0x8c45x19){if(!_0x8c45x19){return _0x8c45xb[_0x4ad7[24]](404)};return _0x8c45xb[_0x4ad7[12]](200)[_0x4ad7[11]](_0x8c45x19)})[_0x4ad7[15]](handleEntityNotFound(_0x8c45xb))[_0x4ad7[19]](function(_0x8c45xc){console[_0x4ad7[29]](_0x8c45xc);return handleError(_0x8c45xb,_0x8c45xc)})};exports[_0x4ad7[36]]=function(_0x8c45x15,_0x8c45xb){return ReportJscriptyQuestion[_0x4ad7[31]]({method:[_0x4ad7[37],_0x8c45x15[_0x4ad7[26]][_0x4ad7[25]]]})[_0x4ad7[22]](Util[_0x4ad7[21]](_0x8c45x15[_0x4ad7[20]]))[_0x4ad7[15]](handleEntityNotFound(_0x8c45xb))[_0x4ad7[15]](function(_0x8c45x1a){return _0x8c45xb[_0x4ad7[12]](200)[_0x4ad7[11]](_0x8c45x1a)})[_0x4ad7[19]](function(_0x8c45xc){console[_0x4ad7[29]](_0x8c45xc);return handleError(_0x8c45xb,_0x8c45xc)})};exports[_0x4ad7[38]]=function(_0x8c45x15,_0x8c45xb){return ReportJscriptyQuestion[_0x4ad7[34]]({where:{projectId:_0x8c45x15[_0x4ad7[26]][_0x4ad7[25]],question_type:_0x4ad7[39]},attributes:[_0x4ad7[40],_0x4ad7[41],_0x4ad7[42],_0x4ad7[43],[sequelize[_0x4ad7[46]](_0x4ad7[44],sequelize[_0x4ad7[45]](_0x4ad7[43])),_0x4ad7[44]]],group:[_0x4ad7[40],_0x4ad7[41],_0x4ad7[42],_0x4ad7[43]]})[_0x4ad7[15]](function(_0x8c45x19){return _0x8c45xb[_0x4ad7[12]](201)[_0x4ad7[11]](_0x8c45x19)})[_0x4ad7[19]](function(_0x8c45xc){console[_0x4ad7[29]](_0x8c45xc);return handleError(_0x8c45xb,_0x8c45xc)})};exports[_0x4ad7[47]]=function(_0x8c45x15,_0x8c45xb){return JscriptyProject[_0x4ad7[47]](_0x8c45x15[_0x4ad7[54]])[_0x4ad7[15]](function(_0x8c45x18){return _0x8c45xb[_0x4ad7[12]](201)[_0x4ad7[11]](_0x8c45x18)})[_0x4ad7[19]](sequelize.UniqueConstraintError,function(_0x8c45xc){if(_0x8c45xc[_0x4ad7[49]][_0x4ad7[48]]){_0x8c45xc[_0x4ad7[50]]=_0x4ad7[51];_0x8c45xc[_0x4ad7[52]]=_0x4ad7[53]};return handleError(_0x8c45xb,_0x8c45xc)})[_0x4ad7[19]](function(_0x8c45xc){return handleError(_0x8c45xb,_0x8c45xc)})};exports[_0x4ad7[55]]=function(_0x8c45x15,_0x8c45xb){ReportJscriptySession[_0x4ad7[47]](_0x8c45x15[_0x4ad7[54]])[_0x4ad7[15]](function(_0x8c45x1b){return _0x8c45xb[_0x4ad7[12]](201)[_0x4ad7[11]](_0x8c45x1b)})[_0x4ad7[19]](function(_0x8c45xc){return handleError(_0x8c45xb,_0x8c45xc)})};exports[_0x4ad7[56]]=function(_0x8c45x15,_0x8c45xb){ReportJscriptyQuestion[_0x4ad7[17]]({where:{sessionId:_0x8c45x15[_0x4ad7[26]][_0x4ad7[33]]}})[_0x4ad7[15]](function(){console[_0x4ad7[29]](_0x4ad7[57],_0x8c45x15[_0x4ad7[54]]);var _0x8c45x1d=[];_0x8c45x15[_0x4ad7[54]][_0x4ad7[59]](function(_0x8c45x1e){_0x8c45x1d[_0x4ad7[58]](ReportJscriptyQuestion[_0x4ad7[47]](_0x8c45x1e,{include:[{model:ReportJscriptyInput}]}))});return Promise[_0x4ad7[60]](_0x8c45x1d)})[_0x4ad7[15]](function(_0x8c45x1c){return _0x8c45xb[_0x4ad7[12]](201)[_0x4ad7[11]](_0x8c45x1c)})[_0x4ad7[19]](function(_0x8c45xc){return handleError(_0x8c45xb,_0x8c45xc)})};exports[_0x4ad7[61]]=function(_0x8c45x15,_0x8c45xb){if(_0x8c45x15[_0x4ad7[54]][_0x4ad7[25]]){delete _0x8c45x15[_0x4ad7[54]][_0x4ad7[25]]};JscriptyProject[_0x4ad7[27]](_0x8c45x15[_0x4ad7[26]][_0x4ad7[25]])[_0x4ad7[15]](function(_0x8c45x18){if(!_0x8c45x18){return _0x8c45xb[_0x4ad7[24]](404)};var _0x8c45x13=_[_0x4ad7[62]](_0x8c45x18,_0x8c45x15[_0x4ad7[54]]);_0x8c45x13[_0x4ad7[63]]()[_0x4ad7[15]](function(){return _0x8c45xb[_0x4ad7[12]](200)[_0x4ad7[11]](_0x8c45x18)})[_0x4ad7[19]](function(_0x8c45xc){return handleError(_0x8c45xb,_0x8c45xc)})})[_0x4ad7[19]](function(_0x8c45xc){return handleError(_0x8c45xb,_0x8c45xc)})};exports[_0x4ad7[64]]=function(_0x8c45x15,_0x8c45xb){ReportJscriptySession[_0x4ad7[61]](_0x8c45x15[_0x4ad7[54]],{where:{session_id:_0x8c45x15[_0x4ad7[26]][_0x4ad7[33]]}})[_0x4ad7[15]](function(_0x8c45x1b){return _0x8c45xb[_0x4ad7[12]](200)[_0x4ad7[11]](_0x8c45x1b)})[_0x4ad7[19]](function(_0x8c45xc){return handleError(_0x8c45xb,_0x8c45xc)})};exports[_0x4ad7[17]]=function(_0x8c45x15,_0x8c45xb){JscriptyProject[_0x4ad7[65]]({where:{id:_0x8c45x15[_0x4ad7[26]][_0x4ad7[25]]}})[_0x4ad7[15]](function(_0x8c45x18){if(!_0x8c45x18){return _0x8c45xb[_0x4ad7[24]](404)};_0x8c45x18[_0x4ad7[17]]()[_0x4ad7[15]](function(){return _0x8c45xb[_0x4ad7[24]](204)})[_0x4ad7[19]](function(_0x8c45xc){return handleError(_0x8c45xb,_0x8c45xc)})})[_0x4ad7[19]](function(_0x8c45xc){return handleError(_0x8c45xb,_0x8c45xc)})};exports[_0x4ad7[66]]=function(_0x8c45x15,_0x8c45xb){JscriptyProject[_0x4ad7[17]]({where:{id:_0x8c45x15[_0x4ad7[20]][_0x4ad7[67]]},individualHooks:true})[_0x4ad7[15]](function(){return _0x8c45xb[_0x4ad7[24]](204)})[_0x4ad7[19]](function(_0x8c45xc){return handleError(_0x8c45xb,_0x8c45xc)})};exports[_0x4ad7[68]]=function(_0x8c45x15,_0x8c45xb,_0x8c45x16){JscriptyProject[_0x4ad7[27]](_0x8c45x15[_0x4ad7[26]][_0x4ad7[25]])[_0x4ad7[15]](function(_0x8c45x18){if(!_0x8c45x18){return _0x8c45xb[_0x4ad7[24]](404)};console[_0x4ad7[29]](_0x8c45x15[_0x4ad7[20]][_0x4ad7[69]]);_0x8c45xb[_0x4ad7[73]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0x4ad7[70]+_0x8c45x15[_0x4ad7[20]][_0x4ad7[69]]+_0x4ad7[71],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x4ad7[72]});return _0x8c45xb[_0x4ad7[11]](_0x8c45x18[_0x4ad7[74]])})[_0x4ad7[19]](function(_0x8c45xc){return handleError(_0x8c45xb,_0x8c45xc)})} \ No newline at end of file diff --git a/server/api/jscripty_project/jscripty_project.socket.js b/server/api/jscripty_project/jscripty_project.socket.js index 4f5b49e..9a86867 100644 --- a/server/api/jscripty_project/jscripty_project.socket.js +++ b/server/api/jscripty_project/jscripty_project.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x9d08=["\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"];_0x9d08[0];var JscriptyProject=require(_0x9d08[2])[_0x9d08[1]];exports[_0x9d08[3]]=function(_0x5de7x2){JscriptyProject[_0x9d08[4]](function(_0x5de7x3){onSave(_0x5de7x2,_0x5de7x3)});JscriptyProject[_0x9d08[5]](function(_0x5de7x3){onRemove(_0x5de7x2,_0x5de7x3)})};function onSave(_0x5de7x2,_0x5de7x3,_0x5de7x5){_0x5de7x2[_0x9d08[7]](_0x9d08[6],_0x5de7x3)}function onRemove(_0x5de7x2,_0x5de7x3,_0x5de7x5){_0x5de7x2[_0x9d08[7]](_0x9d08[8],_0x5de7x3)} \ No newline at end of file diff --git a/server/api/license/index.js b/server/api/license/index.js index 3eb5928..f66eb83 100644 --- a/server/api/license/index.js +++ b/server/api/license/index.js @@ -1,19 +1 @@ -'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; +var _0x4b8f=["\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"];_0x4b8f[0];var express=require(_0x4b8f[1]);var auth=require(_0x4b8f[2]);var controller=require(_0x4b8f[3]);var router=express.Router();router[_0x4b8f[7]](_0x4b8f[4],auth[_0x4b8f[5]](),controller[_0x4b8f[6]]);router[_0x4b8f[10]](_0x4b8f[8],auth[_0x4b8f[5]](),controller[_0x4b8f[9]]);module[_0x4b8f[11]]=router \ No newline at end of file diff --git a/server/api/license/license.controller.js b/server/api/license/license.controller.js index 3d38afa..4aa4d36 100644 --- a/server/api/license/license.controller.js +++ b/server/api/license/license.controller.js @@ -1,161 +1 @@ -/** - * 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)); -} +var _0xcf70=["\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"];_0xcf70[0];var _=require(_0xcf70[1]);var rp=require(_0xcf70[2]);var config=require(_0xcf70[3]);var license=require(_0xcf70[4]);var Settings=require(_0xcf70[6])[_0xcf70[5]];var demoLicense={users:1,agents:1,telephones:0,chat:false,mail:false,fax:false,description:_0xcf70[7]};function handleError(_0x961bx8,_0x961bx9){_0x961bx9=_0x961bx9||500;return function(_0x961bxa){_0x961bx8[_0xcf70[9]](_0x961bx9)[_0xcf70[8]](_0x961bxa)}}function responseWithResult(_0x961bx8,_0x961bx9){_0x961bx9=_0x961bx9||200;return function(_0x961bxc){if(_0x961bxc){if(_0x961bxc[_0xcf70[10]]){_0x961bxc[_0xcf70[11]][_0xcf70[10]]=license[_0xcf70[12]](_0x961bxc[_0xcf70[11]][_0xcf70[10]]);_0x961bxc[_0xcf70[11]][_0xcf70[10]]=JSON[_0xcf70[13]](_0x961bxc[_0xcf70[11]][_0xcf70[10]])}else {_0x961bxc[_0xcf70[11]][_0xcf70[10]]=demoLicense};_0x961bxc[_0xcf70[11]][_0xcf70[10]][_0xcf70[14]]=license[_0xcf70[15]]();_0x961bx8[_0xcf70[9]](_0x961bx9)[_0xcf70[16]](_0x961bxc)}}}function handleEntityNotFound(_0x961bx8){return function(_0x961bxc){if(!_0x961bxc){_0x961bxc={dataValues:{license:demoLicense}};_0x961bxc[_0xcf70[11]][_0xcf70[10]][_0xcf70[14]]=license[_0xcf70[15]]();_0x961bx8[_0xcf70[9]](201)[_0xcf70[16]](_0x961bxc);return null};return _0x961bxc}}function saveUpdates(_0x961bxf){return function(_0x961bxc){return _0x961bxc[_0xcf70[18]](_0x961bxf)[_0xcf70[17]](function(_0x961bx10){return _0x961bx10})}}function removeEntity(_0x961bx8){return function(_0x961bxc){if(_0x961bxc){return _0x961bxc[_0xcf70[20]]()[_0xcf70[17]](function(){_0x961bx8[_0xcf70[9]](204)[_0xcf70[19]]()})}}}exports[_0xcf70[21]]=function(_0x961bx12,_0x961bx8){Settings[_0xcf70[23]](1)[_0xcf70[17]](handleEntityNotFound(_0x961bx8))[_0xcf70[17]](responseWithResult(_0x961bx8))[_0xcf70[22]](handleError(_0x961bx8))};exports[_0xcf70[24]]=function(_0x961bx12,_0x961bx8){};exports[_0xcf70[25]]=function(_0x961bx12,_0x961bx8){};exports[_0xcf70[26]]=function(_0x961bx12,_0x961bx8){return rp({method:_0xcf70[29],uri:config[_0xcf70[30]]+_0xcf70[31]+license[_0xcf70[15]]()+_0xcf70[32],body:_0x961bx12[_0xcf70[33]],json:true})[_0xcf70[17]](function(_0x961bx13){console[_0xcf70[27]](_0x961bx13);_0x961bx8[_0xcf70[9]](201)[_0xcf70[8]](_0x961bx13)})[_0xcf70[22]](function(_0x961bxa){console[_0xcf70[27]](_0x961bxa);return _0x961bx8[_0xcf70[9]](_0x961bxa[_0xcf70[28]]||500)[_0xcf70[8]](_0x961bxa)})};exports[_0xcf70[34]]=function(_0x961bx12,_0x961bx8){};exports[_0xcf70[20]]=function(_0x961bx12,_0x961bx8){} \ No newline at end of file diff --git a/server/api/license/license.socket.js b/server/api/license/license.socket.js index fb7f746..82fd4b7 100644 --- a/server/api/license/license.socket.js +++ b/server/api/license/license.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xb7f5=["\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"];_0xb7f5[0];exports[_0xb7f5[1]]=function(_0x6cbdx1){};function onSave(_0x6cbdx1,_0x6cbdx3,_0x6cbdx4){_0x6cbdx1[_0xb7f5[3]](_0xb7f5[2],_0x6cbdx3)}function onRemove(_0x6cbdx1,_0x6cbdx3,_0x6cbdx4){_0x6cbdx1[_0xb7f5[3]](_0xb7f5[4],_0x6cbdx3)} \ No newline at end of file diff --git a/server/api/list/index.js b/server/api/list/index.js index 5982ffd..d56c90c 100644 --- a/server/api/list/index.js +++ b/server/api/list/index.js @@ -1,25 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./list.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); -router.get('/:listId/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('/:listId/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('/:listId/customfields/:id', auth.isAuthenticated(), controller.removeCustomField); -router.delete('/:listId/customfields', auth.isAuthenticated(), controller.removeAllCustomFields); - -module.exports = router; +var _0xa387=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6C\x69\x73\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\x6C\x69\x73\x74\x49\x64\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\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","\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","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x2F\x3A\x6C\x69\x73\x74\x49\x64\x2F\x63\x75\x73\x74\x6F\x6D\x66\x69\x65\x6C\x64\x73","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xa387[0];var express=require(_0xa387[1]);var controller=require(_0xa387[2]);var auth=require(_0xa387[3]);var router=express.Router();router[_0xa387[7]](_0xa387[4],auth[_0xa387[5]](),controller[_0xa387[6]]);router[_0xa387[7]](_0xa387[8],auth[_0xa387[5]](),controller[_0xa387[9]]);router[_0xa387[7]](_0xa387[10],auth[_0xa387[5]](),controller[_0xa387[11]]);router[_0xa387[7]](_0xa387[12],auth[_0xa387[5]](),controller[_0xa387[13]]);router[_0xa387[7]](_0xa387[14],auth[_0xa387[5]](),controller[_0xa387[15]]);router[_0xa387[17]](_0xa387[4],auth[_0xa387[5]](),controller[_0xa387[16]]);router[_0xa387[17]](_0xa387[12],auth[_0xa387[5]](),controller[_0xa387[18]]);router[_0xa387[17]](_0xa387[10],auth[_0xa387[5]](),controller[_0xa387[19]]);router[_0xa387[21]](_0xa387[8],auth[_0xa387[5]](),controller[_0xa387[20]]);router[_0xa387[21]](_0xa387[14],auth[_0xa387[5]](),controller[_0xa387[22]]);router[_0xa387[24]](_0xa387[12],auth[_0xa387[5]](),controller[_0xa387[23]]);router[_0xa387[24]](_0xa387[4],auth[_0xa387[5]](),controller[_0xa387[25]]);router[_0xa387[24]](_0xa387[14],auth[_0xa387[5]](),controller[_0xa387[26]]);router[_0xa387[24]](_0xa387[8],auth[_0xa387[5]](),controller[_0xa387[27]]);router[_0xa387[24]](_0xa387[28],auth[_0xa387[5]](),controller[_0xa387[29]]);module[_0xa387[30]]=router \ No newline at end of file diff --git a/server/api/list/list.controller.js b/server/api/list/list.controller.js index e81cf7c..a3ddae7 100644 --- a/server/api/list/list.controller.js +++ b/server/api/list/list.controller.js @@ -1,382 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); - -var User = require('../../models').User; -var List = require('../../models').List; -var UserHasList = require('../../models').UserHasList; -var CustomField = require('../../models').CustomField; -var Contact = require('../../models').Contact; -var Util = require('../../config/util'); -var sequelize = require('../../models').sequelize; - -// Get list of lists -exports.index = function(req, res, next) { - return List - .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: { - ListId: req.params.id - } - }) - .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.ListId = req.params.id; - return sequelize.transaction(function(t) { - 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 cm_contacts ADD COLUMN %s VARCHAR(255)', _customField.name)); - }) - .then(function() { - return res.sendStatus(201); - }) - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single list -exports.show = function(req, res) { - return List - .findById(req.params.id) - .then(function(list) { - if (!list) { - return res.sendStatus(404); - } - return res.send(list); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new list in the DB. -exports.create = function(req, res) { - return sequelize.transaction(function(t) { - return List - .create(req.body) - .then(function(list) { - return res.status(201).send(list); - }) - }) - .catch(sequelize.UniqueConstraintError, function(err) { - err.translatedMessage = 'MESSAGE_EXIST_LIST'; - err.message = 'The list name already exists'; - return res.status(500).send(err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing list in the DB. -exports.update = function(req, res) { - return List - .findById(req.params.id) - .then(function(list) { - if (!list) { - return res.sendStatus(404); - } - if (req.body.id) { - delete req.body.id; - } - var updated = _.merge(list, req.body); - return updated.save(); - }) - .then(function(list) { - return res.status(200).send(list); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - err.translatedMessage = 'MESSAGE_EXIST_LIST'; - err.message = 'The list name already exists'; - return res.status(500).send(err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.showAgents = function(req, res) { - return List - .findById(req.params.id) - .then(function(list) { - if (!list) { - return res.sendStatus(404); - } - return list - .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_list in the DB. -exports.addAgents = function(req, res, next) { - return User - .findAll({ - where: { - id: req.body.agents - } - }) - .then(function(users) { - // console.log(users); - var userHasLists = _.map(users, function(user) { - return { - list: req.params.id, - membername: user.name, - UserId: user.id - }; - }); - - return UserHasList - .bulkCreate(userHasLists, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - console.log(err); - return next(err); - }); -}; - -exports.removeAgents = function(req, res, next) { - return UserHasList - .destroy({ - where: { - UserId: req.query.agents, - list: req.params.id - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(202); - }) - .catch(function(err) { - return next(err); - }); -}; - -// Deletes a list from the DB. -exports.destroy = function(req, res) { - return destroyList(req.params.id, res); -}; - -// Deletes multiple lists from the DB. -exports.bulkDestroy = function(req, res) { //add the check for associated contacts - return destroyList(req.query.id, res); -}; - -function destroyList(id, res) { - return delCf(id, res) - .all() - .then(function() { - return List.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: { - ListId: id - } - }) - .then(function(cfs) { - if (!cfs) { - return res.sendStatus(404); - } - _cfs = cfs; - return CustomField - .destroy({ - where: { - id: id - } - }); - }) - .then(function() { - return Contact - .describe(); - }) - .then(function(tableFields) { - return _.keys(tableFields); - }) - .then(function(fields) { - var bulkDel = []; - _.forEach(_cfs, function(elem) { - if (_.includes(fields, elem.name)) { - bulkDel.push(sequelize.query(util.format('ALTER TABLE cm_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 Contact - .describe(); - }) - .then(function(tableFields) { - return _.keys(tableFields); - }) - .then(function(fields) { - if (_.includes(fields, _cf.name)) { - return sequelize.query(util.format('ALTER TABLE cm_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() { - return Contact - .describe(); - }) - .then(function(tableFields) { - return _.keys(tableFields); - }) - .then(function(fields) { - var bulkDel = []; - _cfs.forEach(function(elem) { - if (_.includes(fields, elem.name)) { - bulkDel.push(sequelize.query(util.format('ALTER TABLE cm_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); -} +var _0x4be5=["\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","\x4C\x69\x73\x74","\x55\x73\x65\x72\x48\x61\x73\x4C\x69\x73\x74","\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","\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","\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","\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","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x4C\x69\x73\x74\x49\x64","\x41\x4C\x54\x45\x52\x20\x54\x41\x42\x4C\x45\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x41\x44\x44\x20\x43\x4F\x4C\x55\x4D\x4E\x20\x25\x73\x20\x56\x41\x52\x43\x48\x41\x52\x28\x32\x35\x35\x29","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x63\x66\x5F","\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x68\x6F\x77","\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\x4C\x49\x53\x54","\x6D\x65\x73\x73\x61\x67\x65","\x54\x68\x65\x20\x6C\x69\x73\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x75\x70\x64\x61\x74\x65","\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","\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","\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","\x61\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x41\x4C\x54\x45\x52\x20\x54\x41\x42\x4C\x45\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x44\x52\x4F\x50\x20\x43\x4F\x4C\x55\x4D\x4E\x20\x25\x73","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x6B\x65\x79\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x72\x65\x6D\x6F\x76\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x69\x64\x73"];_0x4be5[0];var _=require(_0x4be5[1]);var util=require(_0x4be5[2]);var User=require(_0x4be5[4])[_0x4be5[3]];var List=require(_0x4be5[4])[_0x4be5[5]];var UserHasList=require(_0x4be5[4])[_0x4be5[6]];var CustomField=require(_0x4be5[4])[_0x4be5[7]];var Contact=require(_0x4be5[4])[_0x4be5[8]];var Util=require(_0x4be5[9]);var sequelize=require(_0x4be5[4])[_0x4be5[10]];exports[_0x4be5[11]]=function(_0xff5axa,_0xff5axb,_0xff5axc){return List[_0x4be5[18]](Util[_0x4be5[17]](_0xff5axa[_0x4be5[16]]))[_0x4be5[15]](function(_0xff5axe){_0xff5axb[_0x4be5[14]](200)[_0x4be5[13]](_0xff5axe)})[_0x4be5[12]](function(_0xff5axd){return handleError(_0xff5axb,_0xff5axd)})};exports[_0x4be5[19]]=function(_0xff5axa,_0xff5axb){return CustomField[_0x4be5[18]]({where:{ListId:_0xff5axa[_0x4be5[22]][_0x4be5[21]]}})[_0x4be5[15]](function(_0xff5axf){return _0xff5axb[_0x4be5[14]](200)[_0x4be5[13]](_0xff5axf)})[_0x4be5[12]](function(_0xff5axd){console[_0x4be5[20]](_0xff5axd);return handleError(_0xff5axb,_0xff5axd)})};exports[_0x4be5[23]]=function(_0xff5axa,_0xff5axb){return CustomField[_0x4be5[25]](_0xff5axa[_0x4be5[22]][_0x4be5[21]])[_0x4be5[15]](function(_0xff5ax10){if(!_0xff5ax10){return _0xff5axb[_0x4be5[24]](404)};return _0xff5axb[_0x4be5[14]](200)[_0x4be5[13]](_0xff5ax10)})[_0x4be5[12]](function(_0xff5axd){return handleError(_0xff5axb,_0xff5axd)})};exports[_0x4be5[26]]=function(_0xff5axa,_0xff5axb){return CustomField[_0x4be5[25]](_0xff5axa[_0x4be5[22]][_0x4be5[21]])[_0x4be5[15]](function(_0xff5ax10){if(!_0xff5ax10){return _0xff5axb[_0x4be5[24]](404)};var _0xff5ax11=_[_0x4be5[28]](_0xff5ax10,_0xff5axa[_0x4be5[27]]);return _0xff5ax11[_0x4be5[29]]()})[_0x4be5[15]](function(_0xff5ax10){return _0xff5axb[_0x4be5[14]](200)[_0x4be5[13]](_0xff5ax10)})[_0x4be5[12]](function(_0xff5axd){return handleError(_0xff5axb,_0xff5axd)})};exports[_0x4be5[30]]=function(_0xff5axa,_0xff5axb){var _0xff5ax12;_0xff5axa[_0x4be5[27]][_0x4be5[31]]=_0xff5axa[_0x4be5[22]][_0x4be5[21]];return sequelize[_0x4be5[37]](function(_0xff5ax13){return CustomField[_0x4be5[36]](_0xff5axa[_0x4be5[27]])[_0x4be5[15]](function(_0xff5ax10){_0xff5ax12=_0xff5ax10;_0xff5ax10[_0x4be5[33]]=_0x4be5[35]+_0xff5ax10[_0x4be5[21]];return _0xff5ax10[_0x4be5[29]]()})[_0x4be5[15]](function(){return sequelize[_0x4be5[16]](util[_0x4be5[34]](_0x4be5[32],_0xff5ax12[_0x4be5[33]]))})[_0x4be5[15]](function(){return _0xff5axb[_0x4be5[24]](201)})})[_0x4be5[12]](function(_0xff5axd){return handleError(_0xff5axb,_0xff5axd)})};exports[_0x4be5[38]]=function(_0xff5axa,_0xff5axb){return List[_0x4be5[25]](_0xff5axa[_0x4be5[22]][_0x4be5[21]])[_0x4be5[15]](function(_0xff5ax14){if(!_0xff5ax14){return _0xff5axb[_0x4be5[24]](404)};return _0xff5axb[_0x4be5[13]](_0xff5ax14)})[_0x4be5[12]](function(_0xff5axd){return handleError(_0xff5axb,_0xff5axd)})};exports[_0x4be5[36]]=function(_0xff5axa,_0xff5axb){return sequelize[_0x4be5[37]](function(_0xff5ax13){return List[_0x4be5[36]](_0xff5axa[_0x4be5[27]])[_0x4be5[15]](function(_0xff5ax14){return _0xff5axb[_0x4be5[14]](201)[_0x4be5[13]](_0xff5ax14)})})[_0x4be5[12]](sequelize.UniqueConstraintError,function(_0xff5axd){_0xff5axd[_0x4be5[39]]=_0x4be5[40];_0xff5axd[_0x4be5[41]]=_0x4be5[42];return _0xff5axb[_0x4be5[14]](500)[_0x4be5[13]](_0xff5axd)})[_0x4be5[12]](function(_0xff5axd){return handleError(_0xff5axb,_0xff5axd)})};exports[_0x4be5[43]]=function(_0xff5axa,_0xff5axb){return List[_0x4be5[25]](_0xff5axa[_0x4be5[22]][_0x4be5[21]])[_0x4be5[15]](function(_0xff5ax14){if(!_0xff5ax14){return _0xff5axb[_0x4be5[24]](404)};if(_0xff5axa[_0x4be5[27]][_0x4be5[21]]){delete _0xff5axa[_0x4be5[27]][_0x4be5[21]]};var _0xff5ax11=_[_0x4be5[28]](_0xff5ax14,_0xff5axa[_0x4be5[27]]);return _0xff5ax11[_0x4be5[29]]()})[_0x4be5[15]](function(_0xff5ax14){return _0xff5axb[_0x4be5[14]](200)[_0x4be5[13]](_0xff5ax14)})[_0x4be5[12]](sequelize.UniqueConstraintError,function(_0xff5axd){_0xff5axd[_0x4be5[39]]=_0x4be5[40];_0xff5axd[_0x4be5[41]]=_0x4be5[42];return _0xff5axb[_0x4be5[14]](500)[_0x4be5[13]](_0xff5axd)})[_0x4be5[12]](function(_0xff5axd){return handleError(_0xff5axb,_0xff5axd)})};exports[_0x4be5[44]]=function(_0xff5axa,_0xff5axb){return List[_0x4be5[25]](_0xff5axa[_0x4be5[22]][_0x4be5[21]])[_0x4be5[15]](function(_0xff5ax14){if(!_0xff5ax14){return _0xff5axb[_0x4be5[24]](404)};return _0xff5ax14[_0x4be5[48]]({where:{role:_0x4be5[45]},attributes:[_0x4be5[21],_0x4be5[33],_0x4be5[46],_0x4be5[47]]})})[_0x4be5[15]](function(_0xff5ax15){return _0xff5axb[_0x4be5[14]](200)[_0x4be5[13]](_0xff5ax15)})[_0x4be5[12]](function(_0xff5axd){return handleError(_0xff5axb,_0xff5axd)})};exports[_0x4be5[49]]=function(_0xff5axa,_0xff5axb,_0xff5axc){return User[_0x4be5[53]]({where:{id:_0xff5axa[_0x4be5[27]][_0x4be5[52]]}})[_0x4be5[15]](function(_0xff5ax16){var _0xff5ax17=_[_0x4be5[50]](_0xff5ax16,function(_0xff5ax18){return {list:_0xff5axa[_0x4be5[22]][_0x4be5[21]],membername:_0xff5ax18[_0x4be5[33]],UserId:_0xff5ax18[_0x4be5[21]]}});return UserHasList[_0x4be5[51]](_0xff5ax17,{individualHooks:true})})[_0x4be5[15]](function(){return _0xff5axb[_0x4be5[24]](200)})[_0x4be5[12]](function(_0xff5axd){console[_0x4be5[20]](_0xff5axd);return _0xff5axc(_0xff5axd)})};exports[_0x4be5[54]]=function(_0xff5axa,_0xff5axb,_0xff5axc){return UserHasList[_0x4be5[55]]({where:{UserId:_0xff5axa[_0x4be5[16]][_0x4be5[52]],list:_0xff5axa[_0x4be5[22]][_0x4be5[21]]},individualHooks:true})[_0x4be5[15]](function(){return _0xff5axb[_0x4be5[24]](202)})[_0x4be5[12]](function(_0xff5axd){return _0xff5axc(_0xff5axd)})};exports[_0x4be5[55]]=function(_0xff5axa,_0xff5axb){return destroyList(_0xff5axa[_0x4be5[22]][_0x4be5[21]],_0xff5axb)};exports[_0x4be5[56]]=function(_0xff5axa,_0xff5axb){return destroyList(_0xff5axa[_0x4be5[16]][_0x4be5[21]],_0xff5axb)};function destroyList(_0xff5ax1a,_0xff5axb){return delCf(_0xff5ax1a,_0xff5axb)[_0x4be5[57]]()[_0x4be5[15]](function(){return List[_0x4be5[55]]({where:{id:_0xff5ax1a},individualHooks:true})})[_0x4be5[15]](function(){return _0xff5axb[_0x4be5[24]](204)})[_0x4be5[12]](function(_0xff5axd){console[_0x4be5[20]](_0xff5axd);return handleError(_0xff5axb,_0xff5axd)})}function delCf(_0xff5ax1a,_0xff5axb){var _0xff5ax1c;return CustomField[_0x4be5[53]]({where:{ListId:_0xff5ax1a}})[_0x4be5[15]](function(_0xff5ax21){if(!_0xff5ax21){return _0xff5axb[_0x4be5[24]](404)};_0xff5ax1c=_0xff5ax21;return CustomField[_0x4be5[55]]({where:{id:_0xff5ax1a}})})[_0x4be5[15]](function(){return Contact[_0x4be5[63]]()})[_0x4be5[15]](function(_0xff5ax20){return _[_0x4be5[62]](_0xff5ax20)})[_0x4be5[15]](function(_0xff5ax1d){var _0xff5ax1e=[];_[_0x4be5[61]](_0xff5ax1c,function(_0xff5ax1f){if(_[_0x4be5[58]](_0xff5ax1d,_0xff5ax1f[_0x4be5[33]])){_0xff5ax1e[_0x4be5[60]](sequelize[_0x4be5[16]](util[_0x4be5[34]](_0x4be5[59],_0xff5ax1f[_0x4be5[33]])))}});return _0xff5ax1e})}exports[_0x4be5[64]]=function(_0xff5axa,_0xff5axb){var _0xff5ax22;return CustomField[_0x4be5[25]](_0xff5axa[_0x4be5[22]][_0x4be5[21]])[_0x4be5[15]](function(_0xff5ax23){if(!_0xff5ax23){return _0xff5axb[_0x4be5[24]](404)};_0xff5ax22=_0xff5ax23;return CustomField[_0x4be5[55]]({where:{id:_0xff5axa[_0x4be5[22]][_0x4be5[21]]}})})[_0x4be5[15]](function(){return Contact[_0x4be5[63]]()})[_0x4be5[15]](function(_0xff5ax20){return _[_0x4be5[62]](_0xff5ax20)})[_0x4be5[15]](function(_0xff5ax1d){if(_[_0x4be5[58]](_0xff5ax1d,_0xff5ax22[_0x4be5[33]])){return sequelize[_0x4be5[16]](util[_0x4be5[34]](_0x4be5[59],_0xff5ax22[_0x4be5[33]]))}})[_0x4be5[15]](function(){return _0xff5axb[_0x4be5[24]](204)})[_0x4be5[12]](function(_0xff5axd){return handleError(_0xff5axb,_0xff5axd)})};exports[_0x4be5[65]]=function(_0xff5axa,_0xff5axb){var _0xff5ax1c;return CustomField[_0x4be5[53]]({where:{id:_0xff5axa[_0x4be5[16]][_0x4be5[66]]}})[_0x4be5[15]](function(_0xff5ax21){if(!_0xff5ax21){return _0xff5axb[_0x4be5[24]](404)};_0xff5ax1c=_0xff5ax21;return CustomField[_0x4be5[55]]({where:{id:_0xff5axa[_0x4be5[16]][_0x4be5[66]]}})})[_0x4be5[15]](function(){return Contact[_0x4be5[63]]()})[_0x4be5[15]](function(_0xff5ax20){return _[_0x4be5[62]](_0xff5ax20)})[_0x4be5[15]](function(_0xff5ax1d){var _0xff5ax1e=[];_0xff5ax1c[_0x4be5[61]](function(_0xff5ax1f){if(_[_0x4be5[58]](_0xff5ax1d,_0xff5ax1f[_0x4be5[33]])){_0xff5ax1e[_0x4be5[60]](sequelize[_0x4be5[16]](util[_0x4be5[34]](_0x4be5[59],_0xff5ax1f[_0x4be5[33]])))}});return _0xff5ax1e})[_0x4be5[57]]()[_0x4be5[15]](function(){return _0xff5axb[_0x4be5[24]](204)})[_0x4be5[12]](function(_0xff5axd){return handleError(_0xff5axb,_0xff5axd)})};function handleError(_0xff5axb,_0xff5axd){return _0xff5axb[_0x4be5[14]](500)[_0x4be5[13]](_0xff5axd)} \ No newline at end of file diff --git a/server/api/list/list.socket.js b/server/api/list/list.socket.js index a8f10e9..7ee2ccc 100644 --- a/server/api/list/list.socket.js +++ b/server/api/list/list.socket.js @@ -1,33 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -var List = require('../../models').List; -var CustomField = require('../../models').CustomField; - -exports.register = function(socket) { - List.afterCreate(function(doc) { - onSave(socket, doc, 'list'); - }); - List.afterDestroy(function(doc) { - console.log('destroy'); - onRemove(socket, doc, 'list'); - }); - 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); -} +var _0x271d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4C\x69\x73\x74","\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","\x6C\x69\x73\x74","\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"];_0x271d[0];var List=require(_0x271d[2])[_0x271d[1]];var CustomField=require(_0x271d[2])[_0x271d[3]];exports[_0x271d[4]]=function(_0x7b38x3){List[_0x271d[6]](function(_0x7b38x4){onSave(_0x7b38x3,_0x7b38x4,_0x271d[5])});List[_0x271d[9]](function(_0x7b38x4){console[_0x271d[8]](_0x271d[7]);onRemove(_0x7b38x3,_0x7b38x4,_0x271d[5])});CustomField[_0x271d[6]](function(_0x7b38x4){onSave(_0x7b38x3,_0x7b38x4,_0x271d[10])});CustomField[_0x271d[9]](function(_0x7b38x4){onRemove(_0x7b38x3,_0x7b38x4,_0x271d[10])})};function onSave(_0x7b38x3,_0x7b38x4,_0x7b38x6,_0x7b38x7){_0x7b38x3[_0x271d[12]](_0x7b38x6+_0x271d[11],_0x7b38x4)}function onRemove(_0x7b38x3,_0x7b38x4,_0x7b38x6,_0x7b38x7){console[_0x271d[8]](_0x7b38x6);_0x7b38x3[_0x271d[12]](_0x7b38x6+_0x271d[13],_0x7b38x4)} \ No newline at end of file diff --git a/server/api/mail_account/index.js b/server/api/mail_account/index.js index 92b8162..25c5692 100644 --- a/server/api/mail_account/index.js +++ b/server/api/mail_account/index.js @@ -1,23 +1 @@ -'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; +var _0x57fe=["\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"];_0x57fe[0];var express=require(_0x57fe[1]);var controller=require(_0x57fe[2]);var auth=require(_0x57fe[3]);var router=express.Router();router[_0x57fe[7]](_0x57fe[4],auth[_0x57fe[5]](),controller[_0x57fe[6]]);router[_0x57fe[7]](_0x57fe[8],auth[_0x57fe[5]](),controller[_0x57fe[9]]);router[_0x57fe[7]](_0x57fe[10],auth[_0x57fe[5]](),controller[_0x57fe[11]]);router[_0x57fe[13]](_0x57fe[4],auth[_0x57fe[5]](),controller[_0x57fe[12]]);router[_0x57fe[15]](_0x57fe[8],auth[_0x57fe[5]](),controller[_0x57fe[14]]);router[_0x57fe[15]](_0x57fe[10],auth[_0x57fe[5]](),controller[_0x57fe[16]]);router[_0x57fe[17]](_0x57fe[8],auth[_0x57fe[5]](),controller[_0x57fe[14]]);router[_0x57fe[19]](_0x57fe[4],auth[_0x57fe[5]](),controller[_0x57fe[18]]);router[_0x57fe[19]](_0x57fe[8],auth[_0x57fe[5]](),controller[_0x57fe[20]]);router[_0x57fe[19]](_0x57fe[10],auth[_0x57fe[5]](),controller[_0x57fe[21]]);router[_0x57fe[19]](_0x57fe[22],auth[_0x57fe[5]](),controller[_0x57fe[23]]);module[_0x57fe[24]]=router \ No newline at end of file diff --git a/server/api/mail_account/mail_account.controller.js b/server/api/mail_account/mail_account.controller.js index 87e8593..12e4b01 100644 --- a/server/api/mail_account/mail_account.controller.js +++ b/server/api/mail_account/mail_account.controller.js @@ -1,242 +1 @@ -'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); -} +var _0xdb72=["\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"];_0xdb72[0];var _=require(_0xdb72[1]);var util=require(_0xdb72[2]);var async=require(_0xdb72[3]);var Util=require(_0xdb72[4]);var sequelize=require(_0xdb72[6])[_0xdb72[5]];var User=require(_0xdb72[6])[_0xdb72[7]];var MailQueue=require(_0xdb72[6])[_0xdb72[8]];var MailAccount=require(_0xdb72[6])[_0xdb72[9]];var MailServerIn=require(_0xdb72[6])[_0xdb72[10]];var MailServerOut=require(_0xdb72[6])[_0xdb72[11]];var MailApplication=require(_0xdb72[6])[_0xdb72[12]];exports[_0xdb72[13]]=function(_0x24f1xc,_0x24f1xd){return MailAccount[_0xdb72[22]](_0xdb72[21])[_0xdb72[20]](Util[_0xdb72[19]](_0x24f1xc[_0xdb72[18]]))[_0xdb72[17]](function(_0x24f1xf){_0x24f1xd[_0xdb72[16]](200)[_0xdb72[15]](_0x24f1xf)})[_0xdb72[14]](function(_0x24f1xe){return handleError(_0x24f1xd,_0x24f1xe)})};exports[_0xdb72[23]]=function(_0x24f1xc,_0x24f1xd,_0x24f1x10){return MailAccount[_0xdb72[22]](_0xdb72[21])[_0xdb72[27]](_0x24f1xc[_0xdb72[26]][_0xdb72[25]])[_0xdb72[17]](function(_0x24f1x11){if(!_0x24f1x11){return _0x24f1xd[_0xdb72[24]](404)};return _0x24f1xd[_0xdb72[15]](_0x24f1x11)})[_0xdb72[14]](function(_0x24f1xe){return handleError(_0x24f1xd,_0x24f1xe)})};exports[_0xdb72[28]]=function(_0x24f1xc,_0x24f1xd,_0x24f1x10){return MailAccount[_0xdb72[22]](_0xdb72[21])[_0xdb72[27]](_0x24f1xc[_0xdb72[26]][_0xdb72[25]])[_0xdb72[17]](function(_0x24f1x11){if(!_0x24f1x11){return _0x24f1xd[_0xdb72[24]](404)};return _0x24f1x11[_0xdb72[33]](_[_0xdb72[32]](Util[_0xdb72[19]](_0x24f1xc[_0xdb72[18]]),{include:[{model:MailQueue,attributes:[_0xdb72[25],_0xdb72[30]]},{model:User,attributes:[_0xdb72[25],_0xdb72[30],_0xdb72[31]]}]}))})[_0xdb72[17]](function(_0x24f1x12){return _0x24f1xd[_0xdb72[15]]({count:_0x24f1x12[_0xdb72[29]],rows:_0x24f1x12})})[_0xdb72[14]](function(_0x24f1xe){return handleError(_0x24f1xd,_0x24f1xe)})};exports[_0xdb72[34]]=function(_0x24f1xc,_0x24f1xd,_0x24f1x10){return sequelize[_0xdb72[38]](function(_0x24f1x13){return MailAccount[_0xdb72[34]](_0x24f1xc[_0xdb72[37]],{include:[{model:MailServerIn},{model:MailServerOut}],transaction:_0x24f1x13})})[_0xdb72[17]](function(_0x24f1x11){return _0x24f1xd[_0xdb72[16]](201)[_0xdb72[15]](_0x24f1x11)})[_0xdb72[14]](sequelize.UniqueConstraintError,function(_0x24f1xe){return Util[_0xdb72[36]][_0xdb72[35]](_0x24f1xd,_0x24f1xe)})[_0xdb72[14]](function(_0x24f1xe){return handleError(_0x24f1xd,_0x24f1xe)})};exports[_0xdb72[39]]=function(_0x24f1xc,_0x24f1xd){if(_0x24f1xc[_0xdb72[37]][_0xdb72[25]]){delete _0x24f1xc[_0xdb72[37]][_0xdb72[25]]};return MailAccount[_0xdb72[27]](_0x24f1xc[_0xdb72[26]][_0xdb72[25]])[_0xdb72[17]](function(_0x24f1x11){if(!_0x24f1x11){return _0x24f1xd[_0xdb72[24]](404)};var _0x24f1x14=_[_0xdb72[32]](_0x24f1x11,_0x24f1xc[_0xdb72[37]]);return _0x24f1x14[_0xdb72[40]]()})[_0xdb72[17]](function(_0x24f1x11){return _0x24f1xd[_0xdb72[16]](200)[_0xdb72[15]](_0x24f1x11)})[_0xdb72[14]](sequelize.UniqueConstraintError,function(_0x24f1xe){return Util[_0xdb72[36]][_0xdb72[35]](_0x24f1xd,_0x24f1xe)})[_0xdb72[14]](function(_0x24f1xe){return handleError(_0x24f1xd,_0x24f1xe)})};exports[_0xdb72[41]]=function(_0x24f1xc,_0x24f1xd){var _0x24f1x15=0;var _0x24f1x16=_0x24f1xc[_0xdb72[37]];_0x24f1x16[_0xdb72[45]](function(_0x24f1x17){delete _0x24f1x17[_0xdb72[25]];delete _0x24f1x17[_0xdb72[42]];delete _0x24f1x17[_0xdb72[43]];_0x24f1x17[_0xdb72[44]]= ++_0x24f1x15});return sequelize[_0xdb72[38]](function(_0x24f1x13){return MailApplication[_0xdb72[47]]({where:{MailAccountId:_0x24f1xc[_0xdb72[26]][_0xdb72[25]]},individualHooks:true,transaction:_0x24f1x13})[_0xdb72[17]](function(_0x24f1x19){return MailApplication[_0xdb72[46]](_0x24f1x16,{individualHooks:true,transaction:_0x24f1x13})})})[_0xdb72[17]](function(_0x24f1x18){return _0x24f1xd[_0xdb72[16]](200)[_0xdb72[15]]({count:_0x24f1x18[_0xdb72[29]],rows:_0x24f1x18})})[_0xdb72[14]](function(_0x24f1xe){return handleError(_0x24f1xd,_0x24f1xe)})};exports[_0xdb72[47]]=function(_0x24f1xc,_0x24f1xd,_0x24f1x10){return MailAccount[_0xdb72[27]](_0x24f1xc[_0xdb72[26]][_0xdb72[25]])[_0xdb72[17]](function(_0x24f1x11){if(!_0x24f1x11){return _0x24f1xd[_0xdb72[24]](404)};return _0x24f1x11[_0xdb72[47]]()})[_0xdb72[17]](function(){return _0x24f1xd[_0xdb72[24]](204)})[_0xdb72[14]](function(_0x24f1xe){return handleError(_0x24f1xd,_0x24f1xe)})};exports[_0xdb72[48]]=function(_0x24f1xc,_0x24f1xd,_0x24f1x10){return MailApplication[_0xdb72[27]](_0x24f1xc[_0xdb72[26]][_0xdb72[49]])[_0xdb72[17]](function(_0x24f1x19){if(!_0x24f1x19){return _0x24f1xd[_0xdb72[24]](404)};return _0x24f1x19[_0xdb72[47]]()})[_0xdb72[17]](function(){return _0x24f1xd[_0xdb72[24]](204)})[_0xdb72[14]](function(_0x24f1xe){return handleError(_0x24f1xd,_0x24f1xe)})};exports[_0xdb72[50]]=function(_0x24f1xc,_0x24f1xd){return MailAccount[_0xdb72[47]]({where:{id:_0x24f1xc[_0xdb72[18]][_0xdb72[51]]},individualHooks:true})[_0xdb72[17]](function(){return _0x24f1xd[_0xdb72[24]](204)})[_0xdb72[14]](function(_0x24f1xe){return handleError(_0x24f1xd,_0x24f1xe)})};exports[_0xdb72[52]]=function(_0x24f1xc,_0x24f1xd){return MailApplication[_0xdb72[47]]({where:{id:_0x24f1xc[_0xdb72[18]][_0xdb72[51]]},individualHooks:true})[_0xdb72[17]](function(){return _0x24f1xd[_0xdb72[24]](204)})[_0xdb72[14]](function(_0x24f1xe){return handleError(_0x24f1xd,_0x24f1xe)})};function handleError(_0x24f1xd,_0x24f1xe){return _0x24f1xd[_0xdb72[16]](500)[_0xdb72[15]](_0x24f1xe)} \ No newline at end of file diff --git a/server/api/mail_account/mail_account.socket.js b/server/api/mail_account/mail_account.socket.js index 5b51c79..86f10eb 100644 --- a/server/api/mail_account/mail_account.socket.js +++ b/server/api/mail_account/mail_account.socket.js @@ -1,27 +1 @@ -/** - * 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); -} +var _0x7d5e=["\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"];_0x7d5e[0];var MailAccount=require(_0x7d5e[2])[_0x7d5e[1]];exports[_0x7d5e[3]]=function(_0x5b7ax2){MailAccount[_0x7d5e[4]](function(_0x5b7ax3){onSave(_0x5b7ax2,_0x5b7ax3)});MailAccount[_0x7d5e[5]](function(_0x5b7ax3){onSave(_0x5b7ax2,_0x5b7ax3)});MailAccount[_0x7d5e[6]](function(_0x5b7ax3){onRemove(_0x5b7ax2,_0x5b7ax3)})};function onSave(_0x5b7ax2,_0x5b7ax3,_0x5b7ax5){_0x5b7ax2[_0x7d5e[8]](_0x7d5e[7],_0x5b7ax3)}function onRemove(_0x5b7ax2,_0x5b7ax3,_0x5b7ax5){_0x5b7ax2[_0x7d5e[8]](_0x7d5e[9],_0x5b7ax3)} \ No newline at end of file diff --git a/server/api/mail_application/index.js b/server/api/mail_application/index.js index 3c132bb..509797b 100644 --- a/server/api/mail_application/index.js +++ b/server/api/mail_application/index.js @@ -1,15 +1 @@ -'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 +var _0x19f2=["\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"];_0x19f2[0];var express=require(_0x19f2[1]);var controller=require(_0x19f2[2]);var router=express.Router();router[_0x19f2[5]](_0x19f2[3],controller[_0x19f2[4]]);router[_0x19f2[5]](_0x19f2[6],controller[_0x19f2[7]]);router[_0x19f2[9]](_0x19f2[3],controller[_0x19f2[8]]);router[_0x19f2[11]](_0x19f2[6],controller[_0x19f2[10]]);router[_0x19f2[12]](_0x19f2[6],controller[_0x19f2[10]]);router[_0x19f2[14]](_0x19f2[6],controller[_0x19f2[13]]);module[_0x19f2[15]]=router \ No newline at end of file diff --git a/server/api/mail_application/mail_application.controller.js b/server/api/mail_application/mail_application.controller.js index 260557e..fa7dd2f 100644 --- a/server/api/mail_application/mail_application.controller.js +++ b/server/api/mail_application/mail_application.controller.js @@ -1,111 +1 @@ -'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); -} +var _0x2f15=["\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"];_0x2f15[0];var _=require(_0x2f15[1]);var MailApplication=require(_0x2f15[3])[_0x2f15[2]];exports[_0x2f15[4]]=function(_0xcbb5x3,_0xcbb5x4,_0xcbb5x5){MailApplication[_0x2f15[11]]({where:_0xcbb5x3[_0x2f15[9]],order:_0x2f15[10],include:[{all:true}]})[_0x2f15[8]](function(_0xcbb5x7){return _0xcbb5x4[_0x2f15[7]](200)[_0x2f15[6]](_0xcbb5x7)})[_0x2f15[5]](function(_0xcbb5x6){return handleError(_0xcbb5x4,_0xcbb5x6)})};exports[_0x2f15[12]]=function(_0xcbb5x3,_0xcbb5x4,_0xcbb5x5){MailApplication[_0x2f15[16]](_0xcbb5x3[_0x2f15[15]][_0x2f15[14]],{include:[{all:true}]})[_0x2f15[8]](function(_0xcbb5x8){if(!_0xcbb5x8){return _0xcbb5x4[_0x2f15[13]](404)};return _0xcbb5x4[_0x2f15[6]](_0xcbb5x8)})[_0x2f15[5]](function(_0xcbb5x6){return handleError(_0xcbb5x4,_0xcbb5x6)})};exports[_0x2f15[17]]=function(_0xcbb5x3,_0xcbb5x4,_0xcbb5x5){MailApplication[_0x2f15[20]](_0x2f15[10],{where:{MailAccountId:_0xcbb5x3[_0x2f15[18]][_0x2f15[19]]}})[_0x2f15[8]](function(_0xcbb5x9){_0xcbb5x3[_0x2f15[18]][_0x2f15[10]]=_0xcbb5x9?++_0xcbb5x9:1;MailApplication[_0x2f15[17]](_0xcbb5x3[_0x2f15[18]])[_0x2f15[8]](function(_0xcbb5x8){return _0xcbb5x4[_0x2f15[7]](201)[_0x2f15[6]](_0xcbb5x8)})[_0x2f15[5]](function(_0xcbb5x6){return handleError(_0xcbb5x4,_0xcbb5x6)})})[_0x2f15[5]](function(_0xcbb5x6){return handleError(_0xcbb5x4,_0xcbb5x6)})};exports[_0x2f15[21]]=function(_0xcbb5x3,_0xcbb5x4,_0xcbb5x5){if(_0xcbb5x3[_0x2f15[18]][_0x2f15[14]]){delete _0xcbb5x3[_0x2f15[18]][_0x2f15[14]]};MailApplication[_0x2f15[16]](_0xcbb5x3[_0x2f15[15]][_0x2f15[14]])[_0x2f15[8]](function(_0xcbb5x8){if(!_0xcbb5x8){return _0xcbb5x4[_0x2f15[13]](404)};var _0xcbb5xa=_[_0x2f15[22]](_0xcbb5x8,_0xcbb5x3[_0x2f15[18]]);_0xcbb5xa[_0x2f15[23]]()[_0x2f15[8]](function(){return _0xcbb5x4[_0x2f15[7]](200)[_0x2f15[6]](_0xcbb5x8)})[_0x2f15[5]](function(_0xcbb5x6){return handleError(_0xcbb5x4,_0xcbb5x6)})})[_0x2f15[5]](function(_0xcbb5x6){return handleError(_0xcbb5x4,_0xcbb5x6)})};exports[_0x2f15[24]]=function(_0xcbb5x3,_0xcbb5x4,_0xcbb5x5){MailApplication[_0x2f15[16]](_0xcbb5x3[_0x2f15[15]][_0x2f15[14]])[_0x2f15[8]](function(_0xcbb5x8){if(!_0xcbb5x8){return _0xcbb5x4[_0x2f15[13]](404)};_0xcbb5x8[_0x2f15[24]]()[_0x2f15[8]](function(){return _0xcbb5x4[_0x2f15[13]](204)})[_0x2f15[5]](function(_0xcbb5x6){return handleError(_0xcbb5x4,_0xcbb5x6)})})[_0x2f15[5]](function(_0xcbb5x6){return handleError(_0xcbb5x4,_0xcbb5x6)})};function handleError(_0xcbb5x4,_0xcbb5x6){return _0xcbb5x4[_0x2f15[7]](500)[_0x2f15[6]](_0xcbb5x6)} \ No newline at end of file diff --git a/server/api/mail_application/mail_application.socket.js b/server/api/mail_application/mail_application.socket.js index ead0c90..a175219 100644 --- a/server/api/mail_application/mail_application.socket.js +++ b/server/api/mail_application/mail_application.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x2796=["\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"];_0x2796[0];var mailApplication=require(_0x2796[2])[_0x2796[1]];exports[_0x2796[3]]=function(_0xc817x2){mailApplication[_0x2796[4]](function(_0xc817x3){onSave(_0xc817x2,_0xc817x3)});mailApplication[_0x2796[5]](function(_0xc817x3){onRemove(_0xc817x2,_0xc817x3)})};function onSave(_0xc817x2,_0xc817x3,_0xc817x5){_0xc817x2[_0x2796[7]](_0x2796[6],_0xc817x3)}function onRemove(_0xc817x2,_0xc817x3,_0xc817x5){_0xc817x2[_0x2796[7]](_0x2796[8],_0xc817x3)} \ No newline at end of file diff --git a/server/api/mail_application/mail_application.spec.js b/server/api/mail_application/mail_application.spec.js index 023b99b..1cd1b41 100644 --- a/server/api/mail_application/mail_application.spec.js +++ b/server/api/mail_application/mail_application.spec.js @@ -1,20 +1 @@ -'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 +var _0x7fbd=["\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"];_0x7fbd[0];var should=require(_0x7fbd[1]);var app=require(_0x7fbd[2]);var request=require(_0x7fbd[3]);describe(_0x7fbd[4],function(){it(_0x7fbd[5],function(_0x4cc0x4){request(app)[_0x7fbd[13]](_0x7fbd[12])[_0x7fbd[11]](200)[_0x7fbd[11]](_0x7fbd[10],/json/)[_0x7fbd[9]](function(_0x4cc0x5,_0x4cc0x6){if(_0x4cc0x5){return _0x4cc0x4(_0x4cc0x5)};_0x4cc0x6[_0x7fbd[8]][_0x7fbd[1]][_0x7fbd[7]][_0x7fbd[6]](Array);_0x4cc0x4()})})}) \ No newline at end of file diff --git a/server/api/mail_attachment/index.js b/server/api/mail_attachment/index.js index f154de4..e724ab7 100644 --- a/server/api/mail_attachment/index.js +++ b/server/api/mail_attachment/index.js @@ -1,15 +1 @@ -'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 +var _0xba33=["\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"];_0xba33[0];var express=require(_0xba33[1]);var controller=require(_0xba33[2]);var router=express.Router();router[_0xba33[5]](_0xba33[3],controller[_0xba33[4]]);router[_0xba33[5]](_0xba33[6],controller[_0xba33[7]]);router[_0xba33[9]](_0xba33[3],controller[_0xba33[8]]);router[_0xba33[11]](_0xba33[6],controller[_0xba33[10]]);router[_0xba33[12]](_0xba33[6],controller[_0xba33[10]]);router[_0xba33[14]](_0xba33[6],controller[_0xba33[13]]);module[_0xba33[15]]=router \ No newline at end of file diff --git a/server/api/mail_attachment/mail_attachment.controller.js b/server/api/mail_attachment/mail_attachment.controller.js index 72d2b7b..0176870 100644 --- a/server/api/mail_attachment/mail_attachment.controller.js +++ b/server/api/mail_attachment/mail_attachment.controller.js @@ -1,100 +1 @@ -'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); -} +var _0xafe5=["\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"];_0xafe5[0];var _=require(_0xafe5[1]);var path=require(_0xafe5[2]);var fs=require(_0xafe5[3]);var formidable=require(_0xafe5[4]);var Promise=require(_0xafe5[5]);var config=require(_0xafe5[6]);var MailAttachment=require(_0xafe5[8])[_0xafe5[7]];exports[_0xafe5[9]]=function(_0x328fx8,_0x328fx9,_0x328fxa){return MailAttachment[_0xafe5[14]]()[_0xafe5[13]](function(_0x328fxc){return _0x328fx9[_0xafe5[12]](200)[_0xafe5[11]](_0x328fxc)})[_0xafe5[10]](function(_0x328fxb){return _0x328fxa(_0x328fxb)})};exports[_0xafe5[15]]=function(_0x328fx8,_0x328fx9,_0x328fxa){return MailAttachment[_0xafe5[20]](_0x328fx8[_0xafe5[19]][_0xafe5[18]])[_0xafe5[13]](function(_0x328fxd){return _0x328fx9[_0xafe5[17]](_0x328fxd[_0xafe5[2]],_0x328fxd[_0xafe5[16]])})[_0xafe5[10]](function(_0x328fxb){return _0x328fxa(_0x328fxb)})};exports[_0xafe5[21]]=function(_0x328fx8,_0x328fx9,_0x328fxa){var _0x328fxe= new formidable.IncomingForm();_0x328fxe[_0xafe5[22]]=path[_0xafe5[27]](config[_0xafe5[23]],_0xafe5[24],_0xafe5[25],_0xafe5[26]);_0x328fxe[_0xafe5[28]]=true;_0x328fxe[_0xafe5[29]]=true;_0x328fxe[_0xafe5[30]]=true;_0x328fxe[_0xafe5[35]](_0x328fx8,function(_0x328fxb,_0x328fxe,_0x328fxf){if(_0x328fxb){return _0x328fx9[_0xafe5[12]](500)[_0xafe5[11]](_0x328fxb)};return _0x328fx9[_0xafe5[12]](201)[_0xafe5[11]]({size:_0x328fxf[_0xafe5[32]][_0xafe5[31]],path:_0x328fxf[_0xafe5[32]][_0xafe5[2]],name:_0x328fxf[_0xafe5[32]][_0xafe5[16]],type:_0x328fxf[_0xafe5[32]][_0xafe5[33]],basename:path[_0xafe5[34]](_0x328fxf[_0xafe5[32]][_0xafe5[2]])})})};exports[_0xafe5[36]]=function(_0x328fx8,_0x328fx9,_0x328fxa){if(_0x328fx8[_0xafe5[37]][_0xafe5[18]]){delete _0x328fx8[_0xafe5[37]][_0xafe5[18]]};MailAttachment[_0xafe5[20]](_0x328fx8[_0xafe5[19]][_0xafe5[18]])[_0xafe5[13]](function(_0x328fxd){if(!_0x328fxd){return _0x328fx9[_0xafe5[38]](404)};var _0x328fx10=_[_0xafe5[39]](_0x328fxd,_0x328fx8[_0xafe5[37]]);_0x328fx10[_0xafe5[40]]()[_0xafe5[13]](function(){return _0x328fx9[_0xafe5[12]](200)[_0xafe5[11]](_0x328fxd)})[_0xafe5[10]](function(_0x328fxb){return _0x328fxa(_0x328fxb)})})[_0xafe5[10]](function(_0x328fxb){return _0x328fxa(_0x328fxb)})};exports[_0xafe5[41]]=function(_0x328fx8,_0x328fx9,_0x328fxa){var _0x328fx11=Promise[_0xafe5[43]](require(_0xafe5[3])[_0xafe5[42]]);var _0x328fx12=path[_0xafe5[27]](config[_0xafe5[23]],_0xafe5[24],_0xafe5[25],_0xafe5[26],_0x328fx8[_0xafe5[19]][_0xafe5[18]]);return _0x328fx11(_0x328fx12)[_0xafe5[13]](function(){return _0x328fx9[_0xafe5[38]](204)})[_0xafe5[10]](function(_0x328fxb){return handleError(_0x328fx9,_0x328fxb)})};function handleError(_0x328fx9,_0x328fxb){return _0x328fx9[_0xafe5[12]](500)[_0xafe5[11]](_0x328fxb)} \ No newline at end of file diff --git a/server/api/mail_attachment/mail_attachment.socket.js b/server/api/mail_attachment/mail_attachment.socket.js index 65c9085..3589131 100644 --- a/server/api/mail_attachment/mail_attachment.socket.js +++ b/server/api/mail_attachment/mail_attachment.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x1a94=["\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"];_0x1a94[0];var mail_attachment=require(_0x1a94[2])[_0x1a94[1]];exports[_0x1a94[3]]=function(_0xef57x2){mail_attachment[_0x1a94[4]](function(_0xef57x3){onSave(_0xef57x2,_0xef57x3)});mail_attachment[_0x1a94[5]](function(_0xef57x3){onRemove(_0xef57x2,_0xef57x3)})};function onSave(_0xef57x2,_0xef57x3,_0xef57x5){_0xef57x2[_0x1a94[7]](_0x1a94[6],_0xef57x3)}function onRemove(_0xef57x2,_0xef57x3,_0xef57x5){_0xef57x2[_0x1a94[7]](_0x1a94[8],_0xef57x3)} \ No newline at end of file diff --git a/server/api/mail_message/index.js b/server/api/mail_message/index.js index 58b5988..24d8aac 100644 --- a/server/api/mail_message/index.js +++ b/server/api/mail_message/index.js @@ -1,19 +1 @@ -'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; +var _0xb368=["\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"];_0xb368[0];var express=require(_0xb368[1]);var controller=require(_0xb368[2]);var auth=require(_0xb368[3]);var router=express.Router();router[_0xb368[7]](_0xb368[4],auth[_0xb368[5]](),controller[_0xb368[6]]);router[_0xb368[7]](_0xb368[8],auth[_0xb368[5]](),controller[_0xb368[9]]);router[_0xb368[11]](_0xb368[4],auth[_0xb368[5]](),controller[_0xb368[10]]);router[_0xb368[13]](_0xb368[4],auth[_0xb368[5]](),controller[_0xb368[12]]);router[_0xb368[13]](_0xb368[14],auth[_0xb368[5]](),controller[_0xb368[15]]);router[_0xb368[13]](_0xb368[16],auth[_0xb368[5]](),controller[_0xb368[12]]);router[_0xb368[13]](_0xb368[8],auth[_0xb368[5]](),controller[_0xb368[12]]);router[_0xb368[17]](_0xb368[8],auth[_0xb368[5]](),controller[_0xb368[12]]);router[_0xb368[19]](_0xb368[8],auth[_0xb368[5]](),controller[_0xb368[18]]);module[_0xb368[20]]=router \ No newline at end of file diff --git a/server/api/mail_message/mail_message.controller.js b/server/api/mail_message/mail_message.controller.js index e72dfc8..1fdc648 100644 --- a/server/api/mail_message/mail_message.controller.js +++ b/server/api/mail_message/mail_message.controller.js @@ -1,164 +1 @@ -'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 MailMessage - .create(req.body, { - include: [{ - model: MailAttachment - }] - }).then(function(mailMessage) { - return res.status(201).send(mailMessage); - }).catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing mailMessage in the DB. -exports.update = function(req, res, next) { - return MailMessage - .findById(req.params.id, { - include: [{ - all: true - }] - }) - .then(function(mailMessage) { - if (!mailMessage) { - return res.sendStatus(404); - } - var updated = _.merge(mailMessage, req.body); - return updated - .save(); - }) - .then(function(updated) { - return res.status(200).send(updated); - }) - .catch(function(err) { - return handleError(res, err, next); - }); -}; - -// Deletes a mailMessage from the DB. -exports.destroy = function(req, res, next) { - return MailMessage - .findById(req.params.id) - .then(function(mailMessage) { - if (!mailMessage) { - return res.sendStatus(404); - } - return mailMessage - .destroy(); - }).then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err, next); - }); -}; - -// Deletes a mailMessage from the DB. -exports.bulkDelete = function(req, res, next) { - return MailMessage - .bulkUpdate({ - where: { - id: { - $in: req.body.id - } - }, - attributes: { - directory: 'TRASH' - } - }) - .then(function(mailMessage) { - if (!mailMessage) { - return res.sendStatus(404); - } - return mailMessage - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err, next); - }); -}; - -function handleError(res, err, next) { - return res.status(500).send(err); -} +var _0xc4e8=["\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","\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"];_0xc4e8[0];var _=require(_0xc4e8[1]);var async=require(_0xc4e8[2]);var htmlToText=require(_0xc4e8[3]);var formidable=require(_0xc4e8[4]);var path=require(_0xc4e8[5]);var config=require(_0xc4e8[6]);var sequelize=require(_0xc4e8[8])[_0xc4e8[7]];var MailMessage=require(_0xc4e8[8])[_0xc4e8[9]];var MailAttachment=require(_0xc4e8[8])[_0xc4e8[10]];var MailRoom=require(_0xc4e8[8])[_0xc4e8[11]];var MailAccount=require(_0xc4e8[8])[_0xc4e8[12]];var ContactEmail=require(_0xc4e8[8])[_0xc4e8[13]];var Contact=require(_0xc4e8[8])[_0xc4e8[14]];var User=require(_0xc4e8[8])[_0xc4e8[15]];exports[_0xc4e8[16]]=function(_0xfb86xf,_0xfb86x10,_0xfb86x11){var _0xfb86x12={order:_0xc4e8[17],include:[{all:true,include:[{all:true}]}]};switch(_0xfb86xf[_0xc4e8[23]][_0xc4e8[22]]){case _0xc4e8[20]:_0xfb86x12[_0xc4e8[18]]=_0xfb86xf[_0xc4e8[19]];break;case _0xc4e8[21]:break;default:};return MailMessage[_0xc4e8[28]](_0xfb86x12)[_0xc4e8[27]](function(_0xfb86x14){return _0xfb86x10[_0xc4e8[26]](200)[_0xc4e8[25]](_0xfb86x14)})[_0xc4e8[24]](function(_0xfb86x13){return handleError(_0xfb86x10,_0xfb86x13,_0xfb86x11)})};exports[_0xc4e8[29]]=function(_0xfb86xf,_0xfb86x10,_0xfb86x11){return MailMessage[_0xc4e8[36]](_0xfb86xf[_0xc4e8[32]][_0xc4e8[31]],{include:[{model:MailAttachment},{model:User,attributes:[_0xc4e8[31],_0xc4e8[33],_0xc4e8[34],_0xc4e8[35]]}]})[_0xc4e8[27]](function(_0xfb86x15){if(!_0xfb86x15){return _0xfb86x10[_0xc4e8[30]](404)};return _0xfb86x10[_0xc4e8[25]](_0xfb86x15)})[_0xc4e8[24]](function(_0xfb86x13){return handleError(_0xfb86x10,_0xfb86x13,_0xfb86x11)})};exports[_0xc4e8[37]]=function(_0xfb86xf,_0xfb86x10,_0xfb86x11){_0xfb86xf[_0xc4e8[39]][_0xc4e8[38]]=_0xfb86xf[_0xc4e8[23]][_0xc4e8[31]];_0xfb86xf[_0xc4e8[39]][_0xc4e8[40]]=_0xfb86xf[_0xc4e8[39]][_0xc4e8[40]]||htmlToText[_0xc4e8[42]](_0xfb86xf[_0xc4e8[39]][_0xc4e8[41]],{wordwrap:false});return MailMessage[_0xc4e8[37]](_0xfb86xf[_0xc4e8[39]],{include:[{model:MailAttachment}]})[_0xc4e8[27]](function(_0xfb86x15){return _0xfb86x10[_0xc4e8[26]](201)[_0xc4e8[25]](_0xfb86x15)})[_0xc4e8[24]](function(_0xfb86x13){return handleError(_0xfb86x10,_0xfb86x13)})};exports[_0xc4e8[43]]=function(_0xfb86xf,_0xfb86x10,_0xfb86x11){return MailMessage[_0xc4e8[36]](_0xfb86xf[_0xc4e8[32]][_0xc4e8[31]],{include:[{all:true}]})[_0xc4e8[27]](function(_0xfb86x15){if(!_0xfb86x15){return _0xfb86x10[_0xc4e8[30]](404)};var _0xfb86x16=_[_0xc4e8[44]](_0xfb86x15,_0xfb86xf[_0xc4e8[39]]);return _0xfb86x16[_0xc4e8[45]]()})[_0xc4e8[27]](function(_0xfb86x16){return _0xfb86x10[_0xc4e8[26]](200)[_0xc4e8[25]](_0xfb86x16)})[_0xc4e8[24]](function(_0xfb86x13){return handleError(_0xfb86x10,_0xfb86x13,_0xfb86x11)})};exports[_0xc4e8[46]]=function(_0xfb86xf,_0xfb86x10,_0xfb86x11){return MailMessage[_0xc4e8[36]](_0xfb86xf[_0xc4e8[32]][_0xc4e8[31]])[_0xc4e8[27]](function(_0xfb86x15){if(!_0xfb86x15){return _0xfb86x10[_0xc4e8[30]](404)};return _0xfb86x15[_0xc4e8[46]]()})[_0xc4e8[27]](function(){return _0xfb86x10[_0xc4e8[30]](204)})[_0xc4e8[24]](function(_0xfb86x13){return handleError(_0xfb86x10,_0xfb86x13,_0xfb86x11)})};exports[_0xc4e8[47]]=function(_0xfb86xf,_0xfb86x10,_0xfb86x11){return MailMessage[_0xc4e8[49]]({where:{id:{$in:_0xfb86xf[_0xc4e8[39]][_0xc4e8[31]]}},attributes:{directory:_0xc4e8[48]}})[_0xc4e8[27]](function(_0xfb86x15){if(!_0xfb86x15){return _0xfb86x10[_0xc4e8[30]](404)};return _0xfb86x15[_0xc4e8[46]]()})[_0xc4e8[27]](function(){return _0xfb86x10[_0xc4e8[30]](204)})[_0xc4e8[24]](function(_0xfb86x13){return handleError(_0xfb86x10,_0xfb86x13,_0xfb86x11)})};function handleError(_0xfb86x10,_0xfb86x13,_0xfb86x11){return _0xfb86x10[_0xc4e8[26]](500)[_0xc4e8[25]](_0xfb86x13)} \ No newline at end of file diff --git a/server/api/mail_message/mail_message.socket.js b/server/api/mail_message/mail_message.socket.js index 6e8aef8..65581fe 100644 --- a/server/api/mail_message/mail_message.socket.js +++ b/server/api/mail_message/mail_message.socket.js @@ -1,48 +1 @@ -/** - * 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); -} +var _0xc20f=["\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","\x75\x73\x65\x72\x49\x64","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x6C\x6F\x67","\x55\x73\x65\x72\x49\x64","\x6F\x6B","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x73\x65\x6E\x64\x69\x6E\x67","\x65\x6D\x69\x74","\x53\x45\x4E\x44\x49\x4E\x47","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x73\x65\x6E\x74","\x53\x45\x4E\x54","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x66\x61\x69\x6C\x65\x64","\x46\x41\x49\x4C\x45\x44","\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","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x73\x61\x76\x65","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0xc20f[0];var MailMessage=require(_0xc20f[2])[_0xc20f[1]];exports[_0xc20f[3]]=function(_0x52bcx2){MailMessage[_0xc20f[4]](function(_0x52bcx3){onSave(_0x52bcx2,_0x52bcx3)});MailMessage[_0xc20f[18]](function(_0x52bcx3){console[_0xc20f[8]](_0x52bcx2[_0xc20f[5]],_0x52bcx3.UserId,_0x52bcx3[_0xc20f[7]](_0xc20f[6]));if(_0x52bcx3[_0xc20f[7]](_0xc20f[6])&&_0x52bcx2[_0xc20f[5]]==_0x52bcx3[_0xc20f[9]]){console[_0xc20f[8]](_0xc20f[10]);switch(_0x52bcx3[_0xc20f[6]]){case _0xc20f[13]:_0x52bcx2[_0xc20f[12]](_0xc20f[11],null);break;case _0xc20f[15]:_0x52bcx2[_0xc20f[12]](_0xc20f[14],null);break;case _0xc20f[17]:_0x52bcx2[_0xc20f[12]](_0xc20f[16],null);break;default:}};onSave(_0x52bcx2,_0x52bcx3)});MailMessage[_0xc20f[19]](function(_0x52bcx3){onRemove(_0x52bcx2,_0x52bcx3)})};function onSave(_0x52bcx2,_0x52bcx3,_0x52bcx5){if(_0x52bcx2[_0xc20f[5]]===_0x52bcx3[_0xc20f[9]]||_0x52bcx2[_0xc20f[20]]===_0xc20f[21]){_0x52bcx2[_0xc20f[12]](_0xc20f[22],_0x52bcx3)}}function onRemove(_0x52bcx2,_0x52bcx3,_0x52bcx5){_0x52bcx2[_0xc20f[12]](_0xc20f[23],_0x52bcx3)} \ No newline at end of file diff --git a/server/api/mail_queue/index.js b/server/api/mail_queue/index.js index 1252097..6e80a3c 100644 --- a/server/api/mail_queue/index.js +++ b/server/api/mail_queue/index.js @@ -1,20 +1 @@ -'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; +var _0xedd7=["\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"];_0xedd7[0];var express=require(_0xedd7[1]);var controller=require(_0xedd7[2]);var auth=require(_0xedd7[3]);var router=express.Router();router[_0xedd7[7]](_0xedd7[4],auth[_0xedd7[5]](),controller[_0xedd7[6]]);router[_0xedd7[7]](_0xedd7[8],auth[_0xedd7[5]](),controller[_0xedd7[9]]);router[_0xedd7[7]](_0xedd7[10],auth[_0xedd7[5]](),controller[_0xedd7[11]]);router[_0xedd7[13]](_0xedd7[4],auth[_0xedd7[5]](),controller[_0xedd7[12]]);router[_0xedd7[13]](_0xedd7[10],auth[_0xedd7[5]](),controller[_0xedd7[14]]);router[_0xedd7[16]](_0xedd7[8],auth[_0xedd7[5]](),controller[_0xedd7[15]]);router[_0xedd7[17]](_0xedd7[8],auth[_0xedd7[5]](),controller[_0xedd7[15]]);router[_0xedd7[19]](_0xedd7[4],auth[_0xedd7[5]](),controller[_0xedd7[18]]);router[_0xedd7[19]](_0xedd7[8],auth[_0xedd7[5]](),controller[_0xedd7[20]]);router[_0xedd7[19]](_0xedd7[10],auth[_0xedd7[5]](),controller[_0xedd7[21]]);module[_0xedd7[22]]=router \ No newline at end of file diff --git a/server/api/mail_queue/mail_queue.controller.js b/server/api/mail_queue/mail_queue.controller.js index 70cd358..a5f1864 100644 --- a/server/api/mail_queue/mail_queue.controller.js +++ b/server/api/mail_queue/mail_queue.controller.js @@ -1,212 +1 @@ -'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); -} +var _0xf874=["\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"];_0xf874[0];var _=require(_0xf874[1]);var util=require(_0xf874[2]);var Util=require(_0xf874[3]);var sequelize=require(_0xf874[5])[_0xf874[4]];var MailQueue=require(_0xf874[5])[_0xf874[6]];exports[_0xf874[7]]=function(_0xf973x6,_0xf973x7){return MailQueue[_0xf874[16]](_0xf874[15])[_0xf874[14]](Util[_0xf874[13]](_0xf973x6[_0xf874[12]]))[_0xf874[11]](function(_0xf973x9){_0xf973x7[_0xf874[10]](200)[_0xf874[9]](_0xf973x9)})[_0xf874[8]](function(_0xf973x8){return handleError(_0xf973x7,_0xf973x8)})};exports[_0xf874[17]]=function(_0xf973x6,_0xf973x7){return MailQueue[_0xf874[16]](_0xf874[15])[_0xf874[21]](_0xf973x6[_0xf874[20]][_0xf874[19]])[_0xf874[11]](function(_0xf973xa){if(!_0xf973xa){return _0xf973x7[_0xf874[18]](404)};return _0xf973x7[_0xf874[9]](_0xf973xa)})[_0xf874[8]](function(_0xf973x8){return handleError(_0xf973x7,_0xf973x8)})};exports[_0xf874[22]]=function(_0xf973x6,_0xf973x7){return MailQueue[_0xf874[22]](_0xf973x6[_0xf874[25]])[_0xf874[11]](function(_0xf973xa){return _0xf973x7[_0xf874[10]](201)[_0xf874[9]](_0xf973xa)})[_0xf874[8]](sequelize.UniqueConstraintError,function(_0xf973x8){return Util[_0xf874[24]][_0xf874[23]](_0xf973x7,_0xf973x8)})[_0xf874[8]](function(_0xf973x8){return handleError(_0xf973x7,_0xf973x8)})};exports[_0xf874[26]]=function(_0xf973x6,_0xf973x7){if(_0xf973x6[_0xf874[25]][_0xf874[19]]){delete _0xf973x6[_0xf874[25]][_0xf874[19]]};return MailQueue[_0xf874[21]](_0xf973x6[_0xf874[20]][_0xf874[19]])[_0xf874[11]](function(_0xf973xa){if(!_0xf973xa){return _0xf973x7[_0xf874[18]](404)};var _0xf973xb=_[_0xf874[27]](_0xf973xa,_0xf973x6[_0xf874[25]]);return _0xf973xb[_0xf874[28]]()})[_0xf874[11]](function(_0xf973xa){return _0xf973x7[_0xf874[10]](200)[_0xf874[9]](_0xf973xa)})[_0xf874[8]](sequelize.UniqueConstraintError,function(_0xf973x8){return Util[_0xf874[24]][_0xf874[23]](_0xf973x7,_0xf973x8)})[_0xf874[8]](function(_0xf973x8){return handleError(_0xf973x7,_0xf973x8)})};exports[_0xf874[29]]=function(_0xf973x6,_0xf973x7,_0xf973xc){return MailQueue[_0xf874[21]](_0xf973x6[_0xf874[20]][_0xf874[19]])[_0xf874[11]](function(_0xf973xa){if(_0xf973xa){return _0xf973xa[_0xf874[33]](_0xf973x6[_0xf874[25]][_0xf874[30]],{penalty:_0xf973x6[_0xf874[25]][_0xf874[31]],queue:_0xf973xa[_0xf874[32]]},{individualHooks:true})}else {throw new Error(_0xf874[34])}})[_0xf874[11]](function(){return _0xf973x7[_0xf874[18]](200)})[_0xf874[8]](function(_0xf973x8){return handleError(_0xf973x7,_0xf973x8)})};exports[_0xf874[35]]=function(_0xf973x6,_0xf973x7){return MailQueue[_0xf874[21]](_0xf973x6[_0xf874[20]][_0xf874[19]])[_0xf874[11]](function(_0xf973xa){if(_0xf973xa){return _0xf973xa[_0xf874[36]](_0xf973x6[_0xf874[25]][_0xf874[30]],{individualHooks:true})}else {throw new Error(_0xf874[34])}})[_0xf874[11]](function(){return _0xf973x7[_0xf874[18]](200)})[_0xf874[8]](function(_0xf973x8){return handleError(_0xf973x7,_0xf973x8)})};exports[_0xf874[37]]=function(_0xf973x6,_0xf973x7){var _0xf973xd;return MailQueue[_0xf874[21]](_0xf973x6[_0xf874[20]][_0xf874[19]])[_0xf874[11]](function(_0xf973xa){_0xf973xd=_0xf973xa;if(!_0xf973xa){return _0xf973x7[_0xf874[18]](404)};return _0xf973xa[_0xf874[37]]()})[_0xf874[11]](function(){return _0xf973x7[_0xf874[18]](204)})[_0xf874[8]](sequelize.ForeignKeyConstraintError,function(_0xf973x8){return Util[_0xf874[24]][_0xf874[41]](_0xf973x7,_0xf874[40],_0xf973xd[_0xf874[32]],_0xf973x8)})[_0xf874[8]](function(_0xf973x8){console[_0xf874[39]](_0xf874[38],_0xf973x8);return handleError(_0xf973x7,_0xf973x8)})};exports[_0xf874[42]]=function(_0xf973x6,_0xf973x7){return MailQueue[_0xf874[37]]({where:{id:_0xf973x6[_0xf874[12]][_0xf874[43]]},individualHooks:true})[_0xf874[11]](function(){return _0xf973x7[_0xf874[18]](204)})[_0xf874[8]](function(_0xf973x8){return handleError(_0xf973x7,_0xf973x8)})};exports[_0xf874[44]]=function(_0xf973x6,_0xf973x7){return MailQueue[_0xf874[21]](_0xf973x6[_0xf874[20]][_0xf874[19]])[_0xf874[11]](function(_0xf973xf){if(!_0xf973xf){return _0xf973x7[_0xf874[18]](404)};return _0xf973xf[_0xf874[48]]({where:{role:_0xf874[45]},attributes:[_0xf874[19],_0xf874[32],_0xf874[46],_0xf874[47]]})})[_0xf874[11]](function(_0xf973xe){return _0xf973x7[_0xf874[10]](200)[_0xf874[9]](_0xf973xe)})[_0xf874[8]](function(_0xf973x8){return handleError(_0xf973x7,_0xf973x8)})};exports[_0xf874[35]]=function(_0xf973x6,_0xf973x7,_0xf973xc){return MailQueue[_0xf874[21]](_0xf973x6[_0xf874[20]][_0xf874[19]])[_0xf874[11]](function(_0xf973xf){if(!_0xf973xf){return _0xf973x7[_0xf874[18]](404)};return _0xf973xf[_0xf874[49]](_0xf973x6[_0xf874[12]][_0xf874[30]])})[_0xf874[11]](function(){return _0xf973x7[_0xf874[18]](202)})[_0xf874[8]](function(_0xf973x8){return _0xf973xc(_0xf973x8)})};function handleError(_0xf973x7,_0xf973x8){return _0xf973x7[_0xf874[10]](500)[_0xf874[9]](_0xf973x8)} \ No newline at end of file diff --git a/server/api/mail_queue/mail_queue.socket.js b/server/api/mail_queue/mail_queue.socket.js index 3518b62..6aa1a0d 100644 --- a/server/api/mail_queue/mail_queue.socket.js +++ b/server/api/mail_queue/mail_queue.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x9158=["\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"];_0x9158[0];var MailQueue=require(_0x9158[2])[_0x9158[1]];exports[_0x9158[3]]=function(_0xe6c1x2){MailQueue[_0x9158[4]](function(_0xe6c1x3){onSave(_0xe6c1x2,_0xe6c1x3)});MailQueue[_0x9158[5]](function(_0xe6c1x3){onRemove(_0xe6c1x2,_0xe6c1x3)})};function onSave(_0xe6c1x2,_0xe6c1x3,_0xe6c1x5){_0xe6c1x2[_0x9158[7]](_0x9158[6],_0xe6c1x3)}function onRemove(_0xe6c1x2,_0xe6c1x3,_0xe6c1x5){_0xe6c1x2[_0x9158[7]](_0x9158[8],_0xe6c1x3)} \ No newline at end of file diff --git a/server/api/mail_room/index.js b/server/api/mail_room/index.js index 91ef299..6680fb7 100644 --- a/server/api/mail_room/index.js +++ b/server/api/mail_room/index.js @@ -1,22 +1 @@ -'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; +var _0xb6e5=["\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"];_0xb6e5[0];var express=require(_0xb6e5[1]);var controller=require(_0xb6e5[2]);var auth=require(_0xb6e5[3]);var router=express.Router();router[_0xb6e5[7]](_0xb6e5[4],auth[_0xb6e5[5]](),controller[_0xb6e5[6]]);router[_0xb6e5[7]](_0xb6e5[8],auth[_0xb6e5[5]](),controller[_0xb6e5[9]]);router[_0xb6e5[7]](_0xb6e5[10],auth[_0xb6e5[5]](),controller[_0xb6e5[11]]);router[_0xb6e5[7]](_0xb6e5[12],controller[_0xb6e5[13]]);router[_0xb6e5[15]](_0xb6e5[4],auth[_0xb6e5[5]](),controller[_0xb6e5[14]]);router[_0xb6e5[15]](_0xb6e5[16],auth[_0xb6e5[5]](),controller[_0xb6e5[17]]);router[_0xb6e5[19]](_0xb6e5[10],auth[_0xb6e5[5]](),controller[_0xb6e5[18]]);router[_0xb6e5[19]](_0xb6e5[12],auth[_0xb6e5[5]](),controller[_0xb6e5[20]]);router[_0xb6e5[21]](_0xb6e5[10],auth[_0xb6e5[5]](),controller[_0xb6e5[18]]);router[_0xb6e5[23]](_0xb6e5[4],auth[_0xb6e5[5]](),controller[_0xb6e5[22]]);router[_0xb6e5[23]](_0xb6e5[10],auth[_0xb6e5[5]](),controller[_0xb6e5[24]]);module[_0xb6e5[25]]=router \ No newline at end of file diff --git a/server/api/mail_room/mail_room.controller.js b/server/api/mail_room/mail_room.controller.js index 0d5f5bb..2eec07c 100644 --- a/server/api/mail_room/mail_room.controller.js +++ b/server/api/mail_room/mail_room.controller.js @@ -1,231 +1 @@ -'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); -} +var _0x3778=["\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"];_0x3778[0];var _=require(_0x3778[1]);var util=require(_0x3778[2]);var htmlToText=require(_0x3778[3]);var Util=require(_0x3778[4]);var sequelize=require(_0x3778[6])[_0x3778[5]];var User=require(_0x3778[6])[_0x3778[7]];var Agent=require(_0x3778[6])[_0x3778[7]];var Contact=require(_0x3778[6])[_0x3778[8]];var MailRoom=require(_0x3778[6])[_0x3778[9]];var MailMessage=require(_0x3778[6])[_0x3778[10]];var MailAccount=require(_0x3778[6])[_0x3778[11]];var MailAttachment=require(_0x3778[6])[_0x3778[12]];exports[_0x3778[13]]=function(_0x6463xd,_0x6463xe,_0x6463xf){switch(_0x6463xd[_0x3778[24]][_0x3778[26]]){case _0x3778[22]:return MailRoom[_0x3778[25]](_0x3778[21],{method:[_0x3778[22],_0x6463xd[_0x3778[24]][_0x3778[23]]]})[_0x3778[20]](Util[_0x3778[19]](_0x6463xd[_0x3778[18]]))[_0x3778[17]](function(_0x6463x11){return _0x6463xe[_0x3778[16]](200)[_0x3778[15]](_0x6463x11)})[_0x3778[14]](function(_0x6463x10){return handleError(_0x6463xe,_0x6463x10)});default:return MailRoom[_0x3778[25]](_0x3778[21])[_0x3778[20]](Util[_0x3778[19]](_0x6463xd[_0x3778[18]]))[_0x3778[17]](function(_0x6463x11){return _0x6463xe[_0x3778[16]](200)[_0x3778[15]](_0x6463x11)})[_0x3778[14]](function(_0x6463x10){return handleError(_0x6463xe,_0x6463x10)})}};exports[_0x3778[27]]=function(_0x6463xd,_0x6463xe,_0x6463xf){return MailRoom[_0x3778[29]]({where:{UserId:_0x6463xd[_0x3778[28]][_0x3778[23]]},include:[{all:true}]})[_0x3778[17]](function(_0x6463x12){return _0x6463xe[_0x3778[16]](200)[_0x3778[15]](_0x6463x12)})[_0x3778[14]](function(_0x6463x10){return handleError(_0x6463xe,_0x6463x10)})};exports[_0x3778[30]]=function(_0x6463xd,_0x6463xe,_0x6463xf){return MailRoom[_0x3778[25]](_0x3778[21])[_0x3778[33]](_0x6463xd[_0x3778[28]][_0x3778[23]])[_0x3778[17]](function(_0x6463x13){if(!_0x6463x13){return _0x6463xe[_0x3778[32]](404)};return _0x6463xe[_0x3778[15]](_0x6463x13)})[_0x3778[14]](function(_0x6463x10){console[_0x3778[31]](_0x6463x10);return handleError(_0x6463xe,_0x6463x10)})};exports[_0x3778[34]]=function(_0x6463xd,_0x6463xe,_0x6463xf){return MailRoom[_0x3778[33]](_0x6463xd[_0x3778[28]][_0x3778[23]])[_0x3778[17]](function(_0x6463x13){if(!_0x6463x13){return _0x6463xe[_0x3778[32]](404)};return _0x6463x13[_0x3778[39]]({attributes:[_0x3778[23],_0x3778[35],_0x3778[36],_0x3778[37],_0x3778[26],_0x3778[38]]})})[_0x3778[17]](function(_0x6463x14){return _0x6463xe[_0x3778[15]](_0x6463x14)})[_0x3778[14]](function(_0x6463x10){return handleError(_0x6463xe,_0x6463x10)})};exports[_0x3778[40]]=function(_0x6463xd,_0x6463xe,_0x6463xf){return MailRoom[_0x3778[40]](_0x6463xd[_0x3778[41]])[_0x3778[17]](function(_0x6463x13){return _0x6463xe[_0x3778[16]](201)[_0x3778[15]](_0x6463x13)})[_0x3778[14]](function(_0x6463x10){return handleError(_0x6463xe,_0x6463x10)})};exports[_0x3778[42]]=function(_0x6463xd,_0x6463xe,_0x6463xf){_0x6463xd[_0x3778[41]][_0x3778[43]]=_0x6463xd[_0x3778[24]][_0x3778[23]];_0x6463xd[_0x3778[41]][_0x3778[44]]=_0x6463xd[_0x3778[28]][_0x3778[23]];_0x6463xd[_0x3778[41]][_0x3778[45]]=(_0x6463xd[_0x3778[41]][_0x3778[46]]&&_0x6463xd[_0x3778[41]][_0x3778[46]][_0x3778[47]])?true:false;_0x6463xd[_0x3778[41]][_0x3778[48]]=_0x6463xd[_0x3778[41]][_0x3778[48]]||htmlToText[_0x3778[50]](_0x6463xd[_0x3778[41]][_0x3778[49]],{wordwrap:false});return sequelize[_0x3778[53]]()[_0x3778[17]](function(_0x6463x15){return MailMessage[_0x3778[40]](_0x6463xd[_0x3778[41]],{include:[{model:MailAttachment}],transaction:_0x6463x15,user:_0x6463xd[_0x3778[24]]})[_0x3778[17]](function(_0x6463x16){_0x6463x15[_0x3778[52]]();return _0x6463xe[_0x3778[16]](201)[_0x3778[15]](_0x6463x16)})[_0x3778[14]](function(_0x6463x10){console[_0x3778[31]](_0x6463x10);_0x6463x15[_0x3778[51]]();return handleError(_0x6463xe,_0x6463x10)})})};exports[_0x3778[54]]=function(_0x6463xd,_0x6463xe,_0x6463xf){return MailRoom[_0x3778[33]](_0x6463xd[_0x3778[28]][_0x3778[23]])[_0x3778[17]](function(_0x6463x13){if(!_0x6463x13){return _0x6463xe[_0x3778[32]](404)};if(_0x6463x13[_0x3778[55]]){throw new Error(_0x3778[56])};var _0x6463x17=_[_0x3778[57]](_0x6463x13,_0x6463xd[_0x3778[41]]);return _0x6463x17[_0x3778[58]]()})[_0x3778[17]](function(_0x6463x13){return _0x6463xe[_0x3778[16]](200)[_0x3778[15]](_0x6463x13)})[_0x3778[14]](function(_0x6463x10){return handleError(_0x6463xe,_0x6463x10)})};exports[_0x3778[59]]=function(_0x6463xd,_0x6463xe,_0x6463xf){return MailRoom[_0x3778[33]](_0x6463xd[_0x3778[28]][_0x3778[23]])[_0x3778[17]](function(_0x6463x13){if(!_0x6463x13){return _0x6463xe[_0x3778[32]](404)};return _0x6463x13[_0x3778[61]](_0x6463xd[_0x3778[41]][_0x3778[60]],{individualHooks:true})})[_0x3778[17]](function(){return _0x6463xe[_0x3778[32]](200)})[_0x3778[14]](function(_0x6463x10){return handleError(_0x6463xe,_0x6463x10)})};exports[_0x3778[62]]=function(_0x6463xd,_0x6463xe,_0x6463xf){return MailRoom[_0x3778[33]](_0x6463xd[_0x3778[28]][_0x3778[23]])[_0x3778[17]](function(_0x6463x13){if(!_0x6463x13){return _0x6463xe[_0x3778[32]](404)};return _0x6463x13[_0x3778[62]]()})[_0x3778[17]](function(){return _0x6463xe[_0x3778[32]](204)})[_0x3778[14]](function(_0x6463x10){return handleError(_0x6463xe,_0x6463x10)})};exports[_0x3778[63]]=function(_0x6463xd,_0x6463xe){return MailRoom[_0x3778[62]]({where:{id:_0x6463xd[_0x3778[18]][_0x3778[64]]},individualHooks:true})[_0x3778[17]](function(){return _0x6463xe[_0x3778[32]](200)})[_0x3778[14]](function(_0x6463x10){return handleError(_0x6463xe,_0x6463x10)})};function handleError(_0x6463xe,_0x6463x10){return _0x6463xe[_0x3778[16]](500)[_0x3778[15]](_0x6463x10)} \ No newline at end of file diff --git a/server/api/mail_room/mail_room.socket.js b/server/api/mail_room/mail_room.socket.js index 3f12a1c..d03d0c3 100644 --- a/server/api/mail_room/mail_room.socket.js +++ b/server/api/mail_room/mail_room.socket.js @@ -1,43 +1 @@ -/** - * 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); -} +var _0x4699=["\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"];_0x4699[0];var MailMessage=require(_0x4699[2])[_0x4699[1]];var MailRoom=require(_0x4699[2])[_0x4699[3]];var User=require(_0x4699[2])[_0x4699[4]];exports[_0x4699[5]]=function(_0x5d89x4){MailRoom[_0x4699[6]](function(_0x5d89x5){onSave(_0x5d89x4,_0x5d89x5)});MailRoom[_0x4699[7]](function(_0x5d89x5){onRemove(_0x5d89x4,_0x5d89x5)});MailRoom[_0x4699[13]](function(_0x5d89x5){MailRoom[_0x4699[12]](_0x5d89x5[_0x4699[11]],{include:[{all:true}]})[_0x4699[10]](function(_0x5d89x7){onSave(_0x5d89x4,_0x5d89x7)})[_0x4699[9]](function(_0x5d89x6){console[_0x4699[8]](_0x5d89x6)})})};function onSave(_0x5d89x4,_0x5d89x5,_0x5d89x9){_0x5d89x4[_0x4699[15]](_0x4699[14],_0x5d89x5)}function onRemove(_0x5d89x4,_0x5d89x5,_0x5d89x9){_0x5d89x4[_0x4699[15]](_0x4699[16],_0x5d89x5)} \ No newline at end of file diff --git a/server/api/mail_server_in/index.js b/server/api/mail_server_in/index.js index adb146b..8897e99 100644 --- a/server/api/mail_server_in/index.js +++ b/server/api/mail_server_in/index.js @@ -1,15 +1 @@ -'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; +var _0x1c06=["\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"];_0x1c06[0];var express=require(_0x1c06[1]);var controller=require(_0x1c06[2]);var router=express.Router();router[_0x1c06[5]](_0x1c06[3],controller[_0x1c06[4]]);router[_0x1c06[5]](_0x1c06[6],controller[_0x1c06[7]]);router[_0x1c06[9]](_0x1c06[3],controller[_0x1c06[8]]);router[_0x1c06[11]](_0x1c06[6],controller[_0x1c06[10]]);router[_0x1c06[12]](_0x1c06[6],controller[_0x1c06[10]]);router[_0x1c06[14]](_0x1c06[6],controller[_0x1c06[13]]);module[_0x1c06[15]]=router \ No newline at end of file diff --git a/server/api/mail_server_in/mail_server_in.controller.js b/server/api/mail_server_in/mail_server_in.controller.js index 27fda21..bd5d5b6 100644 --- a/server/api/mail_server_in/mail_server_in.controller.js +++ b/server/api/mail_server_in/mail_server_in.controller.js @@ -1,96 +1 @@ -'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); -} +var _0xb4e9=["\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"];_0xb4e9[0];var _=require(_0xb4e9[1]);var Util=require(_0xb4e9[2]);var sequelize=require(_0xb4e9[4])[_0xb4e9[3]];var MailServerIn=require(_0xb4e9[4])[_0xb4e9[5]];exports[_0xb4e9[6]]=function(_0x717ex5,_0x717ex6){return MailServerIn[_0xb4e9[11]]()[_0xb4e9[10]](function(_0x717ex8){return _0x717ex6[_0xb4e9[9]](200)[_0xb4e9[8]](_0x717ex8)})[_0xb4e9[7]](function(_0x717ex7){return handleError(_0x717ex6,_0x717ex7)})};exports[_0xb4e9[12]]=function(_0x717ex5,_0x717ex6){return MailServerIn[_0xb4e9[16]](_0x717ex5[_0xb4e9[15]][_0xb4e9[14]])[_0xb4e9[10]](function(_0x717ex9){if(!_0x717ex9){return _0x717ex6[_0xb4e9[13]](404)};return _0x717ex6[_0xb4e9[8]](_0x717ex9)})[_0xb4e9[7]](function(_0x717ex7){return handleError(_0x717ex6,_0x717ex7)})};exports[_0xb4e9[17]]=function(_0x717ex5,_0x717ex6){return MailServerIn[_0xb4e9[17]](_0x717ex5[_0xb4e9[20]])[_0xb4e9[10]](function(_0x717ex9){return _0x717ex6[_0xb4e9[9]](201)[_0xb4e9[8]](_0x717ex9)})[_0xb4e9[7]](sequelize.UniqueConstraintError,function(_0x717ex7){return Util[_0xb4e9[19]][_0xb4e9[18]](_0x717ex6,_0x717ex7)})[_0xb4e9[7]](function(_0x717ex7){return handleError(_0x717ex6,_0x717ex7)})};exports[_0xb4e9[21]]=function(_0x717ex5,_0x717ex6){if(_0x717ex5[_0xb4e9[20]][_0xb4e9[14]]){delete _0x717ex5[_0xb4e9[20]][_0xb4e9[14]]};return MailServerIn[_0xb4e9[16]](_0x717ex5[_0xb4e9[15]][_0xb4e9[14]])[_0xb4e9[10]](function(_0x717ex9){if(!_0x717ex9){return _0x717ex6[_0xb4e9[13]](404)};var _0x717exa=_[_0xb4e9[22]](_0x717ex9,_0x717ex5[_0xb4e9[20]]);return _0x717exa[_0xb4e9[23]]()})[_0xb4e9[10]](function(_0x717ex9){return _0x717ex6[_0xb4e9[9]](200)[_0xb4e9[8]](_0x717ex9)})[_0xb4e9[7]](sequelize.UniqueConstraintError,function(_0x717ex7){return Util[_0xb4e9[19]][_0xb4e9[18]](_0x717ex6,_0x717ex7)})[_0xb4e9[7]](function(_0x717ex7){return handleError(_0x717ex6,_0x717ex7)})};exports[_0xb4e9[24]]=function(_0x717ex5,_0x717ex6){return MailServerIn[_0xb4e9[16]](_0x717ex5[_0xb4e9[15]][_0xb4e9[14]])[_0xb4e9[10]](function(_0x717ex9){if(!_0x717ex9){return _0x717ex6[_0xb4e9[13]](404)};return _0x717ex9[_0xb4e9[24]]()})[_0xb4e9[7]](function(_0x717ex7){return handleError(_0x717ex6,_0x717ex7)})};function handleError(_0x717ex6,_0x717ex7){return _0x717ex6[_0xb4e9[9]](500)[_0xb4e9[8]](_0x717ex7)} \ No newline at end of file diff --git a/server/api/mail_server_in/mail_server_in.socket.js b/server/api/mail_server_in/mail_server_in.socket.js index 811977e..ab64e44 100644 --- a/server/api/mail_server_in/mail_server_in.socket.js +++ b/server/api/mail_server_in/mail_server_in.socket.js @@ -1,27 +1 @@ -/** - * 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); -} +var _0x6b1a=["\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"];_0x6b1a[0];var MailServerIn=require(_0x6b1a[2])[_0x6b1a[1]];exports[_0x6b1a[3]]=function(_0x5957x2){MailServerIn[_0x6b1a[4]](function(_0x5957x3){onSave(_0x5957x2,_0x5957x3)});MailServerIn[_0x6b1a[5]](function(_0x5957x3){onSave(_0x5957x2,_0x5957x3)});MailServerIn[_0x6b1a[6]](function(_0x5957x3){onRemove(_0x5957x2,_0x5957x3)})};function onSave(_0x5957x2,_0x5957x3,_0x5957x5){_0x5957x2[_0x6b1a[8]](_0x6b1a[7],_0x5957x3)}function onRemove(_0x5957x2,_0x5957x3,_0x5957x5){_0x5957x2[_0x6b1a[8]](_0x6b1a[9],_0x5957x3)} \ No newline at end of file diff --git a/server/api/mail_server_out/index.js b/server/api/mail_server_out/index.js index 526e713..9d920b4 100644 --- a/server/api/mail_server_out/index.js +++ b/server/api/mail_server_out/index.js @@ -1,19 +1 @@ -'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; +var _0xba4d=["\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"];_0xba4d[0];var express=require(_0xba4d[1]);var controller=require(_0xba4d[2]);var auth=require(_0xba4d[3]);var router=express.Router();router[_0xba4d[7]](_0xba4d[4],auth[_0xba4d[5]](),controller[_0xba4d[6]]);router[_0xba4d[7]](_0xba4d[8],auth[_0xba4d[5]](),controller[_0xba4d[9]]);router[_0xba4d[7]](_0xba4d[10],auth[_0xba4d[5]](),controller[_0xba4d[11]]);router[_0xba4d[7]](_0xba4d[12],auth[_0xba4d[5]](),controller[_0xba4d[13]]);router[_0xba4d[15]](_0xba4d[4],auth[_0xba4d[5]](),controller[_0xba4d[14]]);router[_0xba4d[15]](_0xba4d[16],auth[_0xba4d[5]](),controller[_0xba4d[13]]);router[_0xba4d[18]](_0xba4d[10],auth[_0xba4d[5]](),controller[_0xba4d[17]]);router[_0xba4d[19]](_0xba4d[10],auth[_0xba4d[5]](),controller[_0xba4d[17]]);router[_0xba4d[21]](_0xba4d[10],auth[_0xba4d[5]](),controller[_0xba4d[20]]);module[_0xba4d[22]]=router \ No newline at end of file diff --git a/server/api/mail_server_out/mail_server_out.controller.js b/server/api/mail_server_out/mail_server_out.controller.js index 96b04e4..440ae26 100644 --- a/server/api/mail_server_out/mail_server_out.controller.js +++ b/server/api/mail_server_out/mail_server_out.controller.js @@ -1,142 +1 @@ -'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); -} +var _0x3fa4=["\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","\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"];_0x3fa4[0];var _=require(_0x3fa4[1]);var MailServerOut=require(_0x3fa4[3])[_0x3fa4[2]];var MailMessage=require(_0x3fa4[3])[_0x3fa4[4]];var sequelize=require(_0x3fa4[3])[_0x3fa4[5]];exports[_0x3fa4[6]]=function(_0xef4bx5,_0xef4bx6){return MailServerOut[_0x3fa4[11]]()[_0x3fa4[10]](function(_0xef4bx8){return _0xef4bx6[_0x3fa4[9]](200)[_0x3fa4[8]](_0xef4bx8)})[_0x3fa4[7]](function(_0xef4bx7){return handleError(_0xef4bx6,_0xef4bx7)})};exports[_0x3fa4[12]]=function(_0xef4bx5,_0xef4bx6){return MailServerOut[_0x3fa4[13]]({where:{service:true}})[_0x3fa4[10]](function(_0xef4bx9){return _0xef4bx6[_0x3fa4[9]](200)[_0x3fa4[8]](_0xef4bx9)})[_0x3fa4[7]](function(_0xef4bx7){return handleError(_0xef4bx6,_0xef4bx7)})};exports[_0x3fa4[14]]=function(_0xef4bx5,_0xef4bx6){return MailServerOut[_0x3fa4[18]](_0xef4bx5[_0x3fa4[17]][_0x3fa4[16]])[_0x3fa4[10]](function(_0xef4bx9){if(!_0xef4bx9){return _0xef4bx6[_0x3fa4[15]](404)};return _0xef4bx6[_0x3fa4[8]](_0xef4bx9)})[_0x3fa4[7]](function(_0xef4bx7){return handleError(_0xef4bx6,_0xef4bx7)})};exports[_0x3fa4[19]]=function(_0xef4bx5,_0xef4bx6){return MailServerOut[_0x3fa4[19]](_0xef4bx5[_0x3fa4[20]])[_0x3fa4[10]](function(_0xef4bx9){return _0xef4bx6[_0x3fa4[9]](201)[_0x3fa4[8]](_0xef4bx9)})[_0x3fa4[7]](function(_0xef4bx7){return handleError(_0xef4bx6,_0xef4bx7)})};exports[_0x3fa4[21]]=function(_0xef4bx5,_0xef4bx6){if(_0xef4bx5[_0x3fa4[20]][_0x3fa4[16]]){delete _0xef4bx5[_0x3fa4[20]][_0x3fa4[16]]};return MailServerOut[_0x3fa4[18]](_0xef4bx5[_0x3fa4[17]][_0x3fa4[16]])[_0x3fa4[10]](function(_0xef4bx9){if(!_0xef4bx9){return _0xef4bx6[_0x3fa4[15]](404)};var _0xef4bxa=_[_0x3fa4[22]](_0xef4bx9,_0xef4bx5[_0x3fa4[20]]);return _0xef4bxa[_0x3fa4[23]]()})[_0x3fa4[10]](function(_0xef4bx9){return _0xef4bx6[_0x3fa4[9]](200)[_0x3fa4[8]](_0xef4bx9)})[_0x3fa4[7]](function(_0xef4bx7){return handleError(_0xef4bx6,_0xef4bx7)})};exports[_0x3fa4[24]]=function(_0xef4bx5,_0xef4bx6){return MailServerOut[_0x3fa4[18]](_0xef4bx5[_0x3fa4[17]][_0x3fa4[16]])[_0x3fa4[10]](function(_0xef4bx9){if(!_0xef4bx9){return _0xef4bx6[_0x3fa4[15]](404)};return _0xef4bx9[_0x3fa4[24]]()})[_0x3fa4[10]](function(){return _0xef4bx6[_0x3fa4[15]](204)})[_0x3fa4[7]](function(_0xef4bx7){return handleError(_0xef4bx6,_0xef4bx7)})};exports[_0x3fa4[25]]=function(_0xef4bx5,_0xef4bx6){var _0xef4bxb;var _0xef4bxc;return MailServerOut[_0x3fa4[18]](_0xef4bx5[_0x3fa4[17]][_0x3fa4[16]])[_0x3fa4[10]](function(_0xef4bx9){if(!_0xef4bx9){return _0xef4bx6[_0x3fa4[15]](404)};return _0xef4bx9})[_0x3fa4[10]](function(_0xef4bx9){_0xef4bxb=_0xef4bx9;return MailMessage[_0x3fa4[19]]({subject:_0x3fa4[27]+_0xef4bx9[_0x3fa4[28]]+_0x3fa4[29],text:_0x3fa4[27]+_0xef4bx9[_0x3fa4[28]]+_0x3fa4[29],from:[_0xef4bx9[_0x3fa4[28]]],to:[_0xef4bx9[_0x3fa4[28]]],UserId:_0xef4bx5[_0x3fa4[30]][_0x3fa4[16]]})})[_0x3fa4[10]](function(_0xef4bxd){_0xef4bxc=_0xef4bxd;return _0xef4bxb[_0x3fa4[21]]({state:_0x3fa4[26]})})[_0x3fa4[10]](function(){return _0xef4bx6[_0x3fa4[9]](201)[_0x3fa4[8]](_0xef4bxc)})};function handleError(_0xef4bx6,_0xef4bx7){return _0xef4bx6[_0x3fa4[9]](500)[_0x3fa4[8]](_0xef4bx7)} \ No newline at end of file diff --git a/server/api/mail_server_out/mail_server_out.socket.js b/server/api/mail_server_out/mail_server_out.socket.js index d9e6e91..55d684c 100644 --- a/server/api/mail_server_out/mail_server_out.socket.js +++ b/server/api/mail_server_out/mail_server_out.socket.js @@ -1,26 +1 @@ -/** - * 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); -} +var _0xfe14=["\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"];_0xfe14[0];var MailServerOut=require(_0xfe14[2])[_0xfe14[1]];exports[_0xfe14[3]]=function(_0xd3fdx2){MailServerOut[_0xfe14[6]](function(_0xd3fdx3){console[_0xfe14[5]](_0xfe14[4]);onSave(_0xd3fdx2,_0xd3fdx3)});MailServerOut[_0xfe14[8]](function(_0xd3fdx3){console[_0xfe14[5]](_0xfe14[7]);onRemove(_0xd3fdx2,_0xd3fdx3)})};function onSave(_0xd3fdx2,_0xd3fdx3,_0xd3fdx5){_0xd3fdx2[_0xfe14[10]](_0xfe14[9],_0xd3fdx3)}function onRemove(_0xd3fdx2,_0xd3fdx3,_0xd3fdx5){_0xd3fdx2[_0xfe14[10]](_0xfe14[11],_0xd3fdx3)} \ No newline at end of file diff --git a/server/api/mail_template/index.js b/server/api/mail_template/index.js index cb8e0b2..c90a37a 100644 --- a/server/api/mail_template/index.js +++ b/server/api/mail_template/index.js @@ -1,15 +1 @@ -'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 +var _0x6e87=["\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"];_0x6e87[0];var express=require(_0x6e87[1]);var controller=require(_0x6e87[2]);var router=express.Router();router[_0x6e87[5]](_0x6e87[3],controller[_0x6e87[4]]);router[_0x6e87[5]](_0x6e87[6],controller[_0x6e87[7]]);router[_0x6e87[9]](_0x6e87[3],controller[_0x6e87[8]]);router[_0x6e87[11]](_0x6e87[6],controller[_0x6e87[10]]);router[_0x6e87[12]](_0x6e87[6],controller[_0x6e87[10]]);router[_0x6e87[14]](_0x6e87[6],controller[_0x6e87[13]]);module[_0x6e87[15]]=router \ No newline at end of file diff --git a/server/api/mail_template/mail_template.controller.js b/server/api/mail_template/mail_template.controller.js index 8853adc..f066c20 100644 --- a/server/api/mail_template/mail_template.controller.js +++ b/server/api/mail_template/mail_template.controller.js @@ -1,92 +1 @@ -'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); -} +var _0xaadd=["\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"];_0xaadd[0];var _=require(_0xaadd[1]);var util=require(_0xaadd[2]);var Util=require(_0xaadd[3]);var MailTemplate=require(_0xaadd[5])[_0xaadd[4]];exports[_0xaadd[6]]=function(_0xb029x5,_0xb029x6,_0xb029x7){return MailTemplate[_0xaadd[13]](Util[_0xaadd[12]](_0xb029x5[_0xaadd[11]]))[_0xaadd[10]](function(_0xb029x9){_0xb029x6[_0xaadd[9]](200)[_0xaadd[8]](_0xb029x9)})[_0xaadd[7]](function(_0xb029x8){return handleError(_0xb029x6,_0xb029x8)})};exports[_0xaadd[14]]=function(_0xb029x5,_0xb029x6){return MailTemplate[_0xaadd[18]](_0xb029x5[_0xaadd[17]][_0xaadd[16]])[_0xaadd[10]](function(_0xb029xa){if(!_0xb029xa){return _0xb029x6[_0xaadd[15]](404)};return _0xb029x6[_0xaadd[8]](_0xb029xa)})[_0xaadd[7]](function(_0xb029x8){return handleError(_0xb029x6,_0xb029x8)})};exports[_0xaadd[19]]=function(_0xb029x5,_0xb029x6){return MailTemplate[_0xaadd[19]](_0xb029x5[_0xaadd[20]])[_0xaadd[10]](function(_0xb029xa){return _0xb029x6[_0xaadd[9]](201)[_0xaadd[8]](_0xb029xa)})[_0xaadd[7]](function(_0xb029x8){return handleError(_0xb029x6,_0xb029x8)})};exports[_0xaadd[21]]=function(_0xb029x5,_0xb029x6){if(_0xb029x5[_0xaadd[20]][_0xaadd[16]]){delete _0xb029x5[_0xaadd[20]][_0xaadd[16]]};return MailTemplate[_0xaadd[18]](_0xb029x5[_0xaadd[17]][_0xaadd[16]])[_0xaadd[10]](function(_0xb029xa){if(!_0xb029xa){return _0xb029x6[_0xaadd[15]](404)};var _0xb029xb=_[_0xaadd[22]](_0xb029xa,_0xb029x5[_0xaadd[20]]);return _0xb029xb[_0xaadd[23]]()})[_0xaadd[10]](function(_0xb029xa){return _0xb029x6[_0xaadd[9]](200)[_0xaadd[8]](_0xb029xa)})[_0xaadd[7]](function(_0xb029x8){return handleError(_0xb029x6,_0xb029x8)})};exports[_0xaadd[24]]=function(_0xb029x5,_0xb029x6){return MailTemplate[_0xaadd[18]](_0xb029x5[_0xaadd[17]][_0xaadd[16]])[_0xaadd[10]](function(_0xb029xa){if(!_0xb029xa){return _0xb029x6[_0xaadd[15]](404)};_0xb029xa[_0xaadd[24]]()})[_0xaadd[10]](function(){return _0xb029x6[_0xaadd[15]](204)})[_0xaadd[7]](function(_0xb029x8){return handleError(_0xb029x6,_0xb029x8)})};function handleError(_0xb029x6,_0xb029x8){return _0xb029x6[_0xaadd[9]](500)[_0xaadd[8]](_0xb029x8)} \ No newline at end of file diff --git a/server/api/mail_template/mail_template.socket.js b/server/api/mail_template/mail_template.socket.js index a01fb2e..82706af 100644 --- a/server/api/mail_template/mail_template.socket.js +++ b/server/api/mail_template/mail_template.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x554b=["\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"];_0x554b[0];var MailTemplate=require(_0x554b[2])[_0x554b[1]];exports[_0x554b[3]]=function(_0x4729x2){MailTemplate[_0x554b[4]](function(_0x4729x3){onSave(_0x4729x2,_0x4729x3)});MailTemplate[_0x554b[5]](function(_0x4729x3){onRemove(_0x4729x2,_0x4729x3)})};function onSave(_0x4729x2,_0x4729x3,_0x4729x5){_0x4729x2[_0x554b[7]](_0x554b[6],_0x4729x3)}function onRemove(_0x4729x2,_0x4729x3,_0x4729x5){_0x4729x2[_0x554b[7]](_0x554b[8],_0x4729x3)} \ No newline at end of file diff --git a/server/api/metric/index.js b/server/api/metric/index.js index d565c16..f4ce025 100644 --- a/server/api/metric/index.js +++ b/server/api/metric/index.js @@ -1,19 +1 @@ -'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; +var _0xbf3b=["\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"];_0xbf3b[0];var express=require(_0xbf3b[1]);var controller=require(_0xbf3b[2]);var auth=require(_0xbf3b[3]);var router=express.Router();router[_0xbf3b[7]](_0xbf3b[4],auth[_0xbf3b[5]](),controller[_0xbf3b[6]]);router[_0xbf3b[7]](_0xbf3b[8],auth[_0xbf3b[5]](),controller[_0xbf3b[9]]);router[_0xbf3b[7]](_0xbf3b[10],auth[_0xbf3b[5]](),controller[_0xbf3b[11]]);router[_0xbf3b[13]](_0xbf3b[4],auth[_0xbf3b[5]](),controller[_0xbf3b[12]]);router[_0xbf3b[13]](_0xbf3b[14],auth[_0xbf3b[5]](),controller[_0xbf3b[15]]);router[_0xbf3b[17]](_0xbf3b[10],auth[_0xbf3b[5]](),controller[_0xbf3b[16]]);router[_0xbf3b[18]](_0xbf3b[10],auth[_0xbf3b[5]](),controller[_0xbf3b[16]]);router[_0xbf3b[20]](_0xbf3b[4],auth[_0xbf3b[5]](),controller[_0xbf3b[19]]);router[_0xbf3b[20]](_0xbf3b[10],auth[_0xbf3b[5]](),controller[_0xbf3b[21]]);module[_0xbf3b[22]]=router \ No newline at end of file diff --git a/server/api/metric/metric.controller.js b/server/api/metric/metric.controller.js index ce77ec6..3d9d10e 100644 --- a/server/api/metric/metric.controller.js +++ b/server/api/metric/metric.controller.js @@ -1,180 +1 @@ -'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); -} +var _0x1aad=["\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"];_0x1aad[0];var _=require(_0x1aad[1]);var Metric=require(_0x1aad[3])[_0x1aad[2]];var util=require(_0x1aad[4]);var Util=require(_0x1aad[5]);exports[_0x1aad[6]]=function(_0x2c50x5,_0x2c50x6,_0x2c50x7){return Metric[_0x1aad[13]](Util[_0x1aad[12]](_0x2c50x5[_0x1aad[11]]))[_0x1aad[10]](function(_0x2c50x9){_0x2c50x6[_0x1aad[9]](200)[_0x1aad[8]](_0x2c50x9)})[_0x1aad[7]](function(_0x2c50x8){return handleError(_0x2c50x6,_0x2c50x8)})};exports[_0x1aad[14]]=function(_0x2c50x5,_0x2c50x6){Metric[_0x1aad[18]]({where:{name:_0x2c50x5[_0x1aad[17]][_0x1aad[16]]}})[_0x1aad[10]](function(_0x2c50xa){if(!_0x2c50xa){return _0x2c50x6[_0x1aad[15]](404)};return _0x2c50x6[_0x1aad[8]](_0x2c50xa)})[_0x1aad[7]](function(_0x2c50x8){return handleError(_0x2c50x6,_0x2c50x8)})};exports[_0x1aad[19]]=function(_0x2c50x5,_0x2c50x6){Metric[_0x1aad[18]]({where:{table:_0x2c50x5[_0x1aad[11]][_0x1aad[21]]}})[_0x1aad[10]](function(_0x2c50xa){console[_0x1aad[20]](_0x2c50xa);if(!_0x2c50xa){return _0x2c50x6[_0x1aad[15]](404)};return _0x2c50x6[_0x1aad[9]](200)[_0x1aad[8]](_0x2c50xa)})[_0x1aad[7]](function(_0x2c50x8){return handleError(_0x2c50x6,_0x2c50x8)})};exports[_0x1aad[22]]=function(_0x2c50x5,_0x2c50x6){Metric[_0x1aad[25]](_0x2c50x5[_0x1aad[24]][_0x1aad[23]])[_0x1aad[10]](function(_0x2c50xb){if(!_0x2c50xb){return _0x2c50x6[_0x1aad[15]](404)};return _0x2c50x6[_0x1aad[8]](_0x2c50xb)})[_0x1aad[7]](function(_0x2c50x8){return handleError(_0x2c50x6,_0x2c50x8)})};exports[_0x1aad[26]]=function(_0x2c50x5,_0x2c50x6){Metric[_0x1aad[26]](_0x2c50x5[_0x1aad[17]])[_0x1aad[10]](function(_0x2c50xb){return _0x2c50x6[_0x1aad[9]](201)[_0x1aad[8]](_0x2c50xb)})[_0x1aad[7]](function(_0x2c50x8){return handleError(_0x2c50x6,_0x2c50x8)})};exports[_0x1aad[27]]=function(_0x2c50x5,_0x2c50x6){Metric[_0x1aad[18]]({where:{name:_0x2c50x5[_0x1aad[17]][_0x1aad[16]],id:{$ne:_0x2c50x5[_0x1aad[17]][_0x1aad[23]]}}})[_0x1aad[10]](function(_0x2c50xa){if(!_0x2c50xa){return _0x2c50x6[_0x1aad[15]](404)};if(_0x2c50xa[_0x1aad[30]]>0){return _0x2c50x6[_0x1aad[9]](500)[_0x1aad[8]]({message:_0x1aad[31]})};if(_0x2c50x5[_0x1aad[17]][_0x1aad[23]]){delete _0x2c50x5[_0x1aad[17]][_0x1aad[23]]};return Metric[_0x1aad[32]]({where:{id:_0x2c50x5[_0x1aad[24]][_0x1aad[23]]}})})[_0x1aad[10]](function(_0x2c50xb){if(!_0x2c50xb){return _0x2c50x6[_0x1aad[15]](404)};var _0x2c50xc=_[_0x1aad[28]](_0x2c50xb,_0x2c50x5[_0x1aad[17]]);return _0x2c50xc[_0x1aad[29]]()})[_0x1aad[10]](function(){return _0x2c50x6[_0x1aad[15]](200)})[_0x1aad[7]](function(_0x2c50x8){console[_0x1aad[20]](_0x2c50x8);return handleError(_0x2c50x6,_0x2c50x8)})};exports[_0x1aad[33]]=function(_0x2c50x5,_0x2c50x6){Metric[_0x1aad[25]](_0x2c50x5[_0x1aad[24]][_0x1aad[23]])[_0x1aad[10]](function(_0x2c50xb){if(!_0x2c50xb){return _0x2c50x6[_0x1aad[15]](404)};_0x2c50xb[_0x1aad[35]]()[_0x1aad[10]](function(_0x2c50xd){if(_0x2c50xd[_0x1aad[30]]>0){return _0x2c50x6[_0x1aad[9]](500)[_0x1aad[8]]({message:_0x1aad[34]})};_0x2c50xb[_0x1aad[33]]()[_0x1aad[10]](function(){return _0x2c50x6[_0x1aad[15]](204)})[_0x1aad[7]](function(_0x2c50x8){return handleError(_0x2c50x6,_0x2c50x8)})})[_0x1aad[7]](function(_0x2c50x8){return handleError(_0x2c50x6,_0x2c50x8)})})[_0x1aad[7]](function(_0x2c50x8){return handleError(_0x2c50x6,_0x2c50x8)})};exports[_0x1aad[36]]=function(_0x2c50x5,_0x2c50x6){Metric[_0x1aad[33]]({where:{id:_0x2c50x5[_0x1aad[11]][_0x1aad[23]]},individualHooks:true})[_0x1aad[10]](function(){return _0x2c50x6[_0x1aad[15]](204)})[_0x1aad[7]](function(_0x2c50x8){return handleError(_0x2c50x6,_0x2c50x8)})};function handleError(_0x2c50x6,_0x2c50x8){return _0x2c50x6[_0x1aad[9]](500)[_0x1aad[8]](_0x2c50x8)} \ No newline at end of file diff --git a/server/api/metric/metric.socket.js b/server/api/metric/metric.socket.js index e604bc9..616ee67 100644 --- a/server/api/metric/metric.socket.js +++ b/server/api/metric/metric.socket.js @@ -1,41 +1 @@ -/** - * 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); - }); -} +var _0xb65c=["\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"];_0xb65c[0];var Metric=require(_0xb65c[2])[_0xb65c[1]];var ReportField=require(_0xb65c[2])[_0xb65c[3]];exports[_0xb65c[4]]=function(_0xa6fax3){Metric[_0xb65c[5]](function(_0xa6fax4){onSave(_0xa6fax3,_0xa6fax4)});Metric[_0xb65c[6]](function(_0xa6fax4){updateFields(_0xa6fax4)});Metric[_0xb65c[7]](function(_0xa6fax4){onRemove(_0xa6fax3,_0xa6fax4)})};function onSave(_0xa6fax3,_0xa6fax4,_0xa6fax6){_0xa6fax3[_0xb65c[9]](_0xb65c[8],_0xa6fax4)}function onRemove(_0xa6fax3,_0xa6fax4,_0xa6fax6){_0xa6fax3[_0xb65c[9]](_0xb65c[10],_0xa6fax4)}function updateFields(_0xa6fax4){return ReportField[_0xb65c[15]]({field:_0xa6fax4[_0xb65c[13]]},{where:{MetricId:_0xa6fax4[_0xb65c[14]]}})[_0xb65c[12]](function(_0xa6fax9){console[_0xb65c[11]](_0xa6fax9)})} \ No newline at end of file diff --git a/server/api/metric/metric.spec.js b/server/api/metric/metric.spec.js index 076cab1..04c4450 100644 --- a/server/api/metric/metric.spec.js +++ b/server/api/metric/metric.spec.js @@ -1,20 +1 @@ -'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(); - }); - }); -}); +var _0x5314=["\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"];_0x5314[0];var should=require(_0x5314[1]);var app=require(_0x5314[2]);var request=require(_0x5314[3]);describe(_0x5314[4],function(){it(_0x5314[5],function(_0x7c5cx4){request(app)[_0x5314[13]](_0x5314[12])[_0x5314[11]](200)[_0x5314[11]](_0x5314[10],/json/)[_0x5314[9]](function(_0x7c5cx5,_0x7c5cx6){if(_0x7c5cx5){return _0x7c5cx4(_0x7c5cx5)};_0x7c5cx6[_0x5314[8]][_0x5314[1]][_0x5314[7]][_0x5314[6]](Array);_0x7c5cx4()})})}) \ No newline at end of file diff --git a/server/api/module/index.js b/server/api/module/index.js index 8204682..305986d 100644 --- a/server/api/module/index.js +++ b/server/api/module/index.js @@ -1,15 +1 @@ -'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; +var _0x27ee=["\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"];_0x27ee[0];var express=require(_0x27ee[1]);var controller=require(_0x27ee[2]);var router=express.Router();router[_0x27ee[5]](_0x27ee[3],controller[_0x27ee[4]]);router[_0x27ee[5]](_0x27ee[6],controller[_0x27ee[7]]);router[_0x27ee[9]](_0x27ee[3],controller[_0x27ee[8]]);router[_0x27ee[11]](_0x27ee[6],controller[_0x27ee[10]]);router[_0x27ee[12]](_0x27ee[6],controller[_0x27ee[10]]);router[_0x27ee[14]](_0x27ee[6],controller[_0x27ee[13]]);module[_0x27ee[15]]=router \ No newline at end of file diff --git a/server/api/module/module.controller.js b/server/api/module/module.controller.js index 9d6517c..c15c561 100644 --- a/server/api/module/module.controller.js +++ b/server/api/module/module.controller.js @@ -1,92 +1 @@ -'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); -} +var _0x8265=["\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"];_0x8265[0];var _=require(_0x8265[1]);var Module=require(_0x8265[3])[_0x8265[2]];exports[_0x8265[4]]=function(_0x67abx3,_0x67abx4){Module[_0x8265[9]]()[_0x8265[8]](function(_0x67abx6){return _0x67abx4[_0x8265[7]](200)[_0x8265[6]](_0x67abx6)})[_0x8265[5]](function(_0x67abx5){return handleError(_0x67abx4,_0x67abx5)})};exports[_0x8265[10]]=function(_0x67abx3,_0x67abx4){var _0x67abx7=_0x67abx3[_0x8265[12]][_0x8265[11]];Module[_0x8265[14]](_0x67abx7)[_0x8265[8]](function(_0x67abx8){if(!_0x67abx8){return _0x67abx4[_0x8265[13]](404)};return _0x67abx4[_0x8265[6]](_0x67abx8)})[_0x8265[5]](function(_0x67abx5){return handleError(_0x67abx4,_0x67abx5)})};exports[_0x8265[15]]=function(_0x67abx3,_0x67abx4){Module[_0x8265[15]](_0x67abx3[_0x8265[16]])[_0x8265[8]](function(_0x67abx8){return _0x67abx4[_0x8265[7]](201)[_0x8265[6]](_0x67abx8)})[_0x8265[5]](function(_0x67abx5){return handleError(_0x67abx4,_0x67abx5)})};exports[_0x8265[17]]=function(_0x67abx3,_0x67abx4){var _0x67abx7=_0x67abx3[_0x8265[16]][_0x8265[11]];if(_0x67abx3[_0x8265[16]][_0x8265[11]]){delete _0x67abx3[_0x8265[16]][_0x8265[11]]};Module[_0x8265[14]](_0x67abx7)[_0x8265[8]](function(_0x67abx8){if(!_0x67abx8){return _0x67abx4[_0x8265[13]](404)};var _0x67abx9=_[_0x8265[18]](_0x67abx8,_0x67abx3[_0x8265[16]]);_0x67abx9[_0x8265[19]]()[_0x8265[8]](function(){return _0x67abx4[_0x8265[7]](200)[_0x8265[6]](_0x67abx8)})[_0x8265[5]](function(_0x67abx5){return handleError(_0x67abx4,_0x67abx5)})})[_0x8265[5]](function(_0x67abx5){return handleError(_0x67abx4,_0x67abx5)})};exports[_0x8265[20]]=function(_0x67abx3,_0x67abx4){var _0x67abx7=_0x67abx3[_0x8265[12]][_0x8265[11]];Module[_0x8265[14]](_0x67abx7)[_0x8265[8]](function(_0x67abx8){if(!_0x67abx8){return _0x67abx4[_0x8265[13]](404)};_0x67abx8[_0x8265[20]]()[_0x8265[8]](function(){return _0x67abx4[_0x8265[13]](204)})[_0x8265[5]](function(_0x67abx5){return handleError(_0x67abx4,_0x67abx5)})})[_0x8265[5]](function(_0x67abx5){return handleError(_0x67abx4,_0x67abx5)})};function handleError(_0x67abx4,_0x67abx5){return _0x67abx4[_0x8265[7]](500)[_0x8265[6]](_0x67abx5)} \ No newline at end of file diff --git a/server/api/module/module.socket.js b/server/api/module/module.socket.js index 0eade3b..1586582 100644 --- a/server/api/module/module.socket.js +++ b/server/api/module/module.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xd7ed=["\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"];_0xd7ed[0];var module=require(_0xd7ed[2])[_0xd7ed[1]];exports[_0xd7ed[3]]=function(_0xa16cx2){module[_0xd7ed[4]](function(_0xa16cx3){onSave(_0xa16cx2,_0xa16cx3)});module[_0xd7ed[5]](function(_0xa16cx3){onRemove(_0xa16cx2,_0xa16cx3)})};function onSave(_0xa16cx2,_0xa16cx3,_0xa16cx5){_0xa16cx2[_0xd7ed[7]](_0xd7ed[6],_0xa16cx3)}function onRemove(_0xa16cx2,_0xa16cx3,_0xa16cx5){_0xa16cx2[_0xd7ed[7]](_0xd7ed[8],_0xa16cx3)} \ No newline at end of file diff --git a/server/api/module/module.spec.js b/server/api/module/module.spec.js index 45aa629..72c7387 100644 --- a/server/api/module/module.spec.js +++ b/server/api/module/module.spec.js @@ -1,20 +1 @@ -'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 +var _0x22dc=["\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"];_0x22dc[0];var should=require(_0x22dc[1]);var app=require(_0x22dc[2]);var request=require(_0x22dc[3]);describe(_0x22dc[4],function(){it(_0x22dc[5],function(_0xd68dx4){request(app)[_0x22dc[13]](_0x22dc[12])[_0x22dc[11]](200)[_0x22dc[11]](_0x22dc[10],/json/)[_0x22dc[9]](function(_0xd68dx5,_0xd68dx6){if(_0xd68dx5){return _0xd68dx4(_0xd68dx5)};_0xd68dx6[_0x22dc[8]][_0x22dc[1]][_0x22dc[7]][_0x22dc[6]](Array);_0xd68dx4()})})}) \ No newline at end of file diff --git a/server/api/module/setting/index.js b/server/api/module/setting/index.js index f341cb4..915b1c6 100644 --- a/server/api/module/setting/index.js +++ b/server/api/module/setting/index.js @@ -1,15 +1 @@ -'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; +var _0x386d=["\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"];_0x386d[0];var express=require(_0x386d[1]);var controller=require(_0x386d[2]);var router=express.Router();router[_0x386d[5]](_0x386d[3],controller[_0x386d[4]]);router[_0x386d[8]](_0x386d[6],controller[_0x386d[7]]);router[_0x386d[10]](_0x386d[3],controller[_0x386d[9]]);router[_0x386d[11]](_0x386d[3],controller[_0x386d[9]]);router[_0x386d[13]](_0x386d[3],controller[_0x386d[12]]);module[_0x386d[14]]=router \ No newline at end of file diff --git a/server/api/module/setting/setting.controller.js b/server/api/module/setting/setting.controller.js index 3ebcb5c..18ea6ab 100644 --- a/server/api/module/setting/setting.controller.js +++ b/server/api/module/setting/setting.controller.js @@ -1,110 +1 @@ -'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; -} +var _0x4b58=["\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"];_0x4b58[0];var _=require(_0x4b58[1]);var util=require(_0x4b58[2]);var crypto=require(_0x4b58[3]);var Setting=require(_0x4b58[5])[_0x4b58[4]];exports[_0x4b58[6]]=function(_0x835dx5,_0x835dx6){Setting[_0x4b58[11]]()[_0x4b58[10]](function(_0x835dx8){return _0x835dx6[_0x4b58[9]](200)[_0x4b58[8]](_0x835dx8)})[_0x4b58[7]](function(_0x835dx7){return handleError(_0x835dx6,_0x835dx7)})};exports[_0x4b58[12]]=function(_0x835dx5,_0x835dx6){Setting[_0x4b58[24]](_0x835dx5[_0x4b58[23]][_0x4b58[22]])[_0x4b58[10]](function(_0x835dx9){if(!_0x835dx9){return _0x835dx6[_0x4b58[13]](404)};if(_0x835dx9[_0x4b58[14]]){_0x835dx9[_0x4b58[14]]=decrypt(_0x4b58[15],util[_0x4b58[20]](_0x4b58[16],_0x835dx9[_0x4b58[17]],_0x835dx9[_0x4b58[18]],_0x835dx9[_0x4b58[19]]),_0x835dx9[_0x4b58[14]]);_0x835dx9[_0x4b58[14]]=JSON[_0x4b58[21]](_0x835dx9[_0x4b58[14]])};return _0x835dx6[_0x4b58[8]](_0x835dx9)})[_0x4b58[7]](function(_0x835dx7){return handleError(_0x835dx6,_0x835dx7)})};exports[_0x4b58[25]]=function(_0x835dx5,_0x835dx6){Setting[_0x4b58[25]](_0x835dx5[_0x4b58[26]])[_0x4b58[10]](function(_0x835dx9){return _0x835dx6[_0x4b58[9]](201)[_0x4b58[8]](_0x835dx9)})[_0x4b58[7]](function(_0x835dx7){return handleError(_0x835dx6,_0x835dx7)})};exports[_0x4b58[27]]=function(_0x835dx5,_0x835dx6){if(_0x835dx5[_0x4b58[26]][_0x4b58[22]]){delete _0x835dx5[_0x4b58[26]][_0x4b58[22]]};Setting[_0x4b58[24]](_0x835dx5[_0x4b58[23]][_0x4b58[22]])[_0x4b58[10]](function(_0x835dx9){if(!_0x835dx9){return _0x835dx6[_0x4b58[13]](404)};var _0x835dxa=_[_0x4b58[28]](_0x835dx9,_0x835dx5[_0x4b58[26]]);_0x835dxa[_0x4b58[29]]()[_0x4b58[10]](function(){return _0x835dx6[_0x4b58[9]](200)[_0x4b58[8]](_0x835dx9)})[_0x4b58[7]](function(_0x835dx7){return handleError(_0x835dx6,_0x835dx7)})})[_0x4b58[7]](function(_0x835dx7){return handleError(_0x835dx6,_0x835dx7)})};exports[_0x4b58[30]]=function(_0x835dx5,_0x835dx6){Setting[_0x4b58[24]](_0x835dx5[_0x4b58[23]][_0x4b58[22]])[_0x4b58[10]](function(_0x835dx9){if(!_0x835dx9){return _0x835dx6[_0x4b58[13]](404)};_0x835dx9[_0x4b58[30]]()[_0x4b58[10]](function(){return _0x835dx6[_0x4b58[13]](204)})[_0x4b58[7]](function(_0x835dx7){return handleError(_0x835dx6,_0x835dx7)})})[_0x4b58[7]](function(_0x835dx7){return handleError(_0x835dx6,_0x835dx7)})};function handleError(_0x835dx6,_0x835dx7){return _0x835dx6[_0x4b58[9]](500)[_0x4b58[8]](_0x835dx7)}function decrypt(_0x835dxd,_0x835dxe,_0x835dxf){var _0x835dx10=crypto[_0x4b58[31]](_0x835dxd,_0x835dxe);var _0x835dx11=_0x835dx10[_0x4b58[27]](_0x835dxf,_0x4b58[32],_0x4b58[33]);_0x835dx11+=_0x835dx10[_0x4b58[34]](_0x4b58[33]);return _0x835dx11} \ No newline at end of file diff --git a/server/api/module/setting/setting.socket.js b/server/api/module/setting/setting.socket.js index 0784c1f..bbc78b0 100644 --- a/server/api/module/setting/setting.socket.js +++ b/server/api/module/setting/setting.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x3361=["\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"];_0x3361[0];var Setting=require(_0x3361[2])[_0x3361[1]];exports[_0x3361[3]]=function(_0xd646x2){Setting[_0x3361[4]](function(_0xd646x3){onSave(_0xd646x2,_0xd646x3)});Setting[_0x3361[5]](function(_0xd646x3){onRemove(_0xd646x2,_0xd646x3)})};function onSave(_0xd646x2,_0xd646x3,_0xd646x5){_0xd646x2[_0x3361[7]](_0x3361[6],_0xd646x3)}function onRemove(_0xd646x2,_0xd646x3,_0xd646x5){_0xd646x2[_0x3361[7]](_0x3361[8],_0xd646x3)} \ No newline at end of file diff --git a/server/api/module/setting/setting.spec.js b/server/api/module/setting/setting.spec.js index eec76c9..866bb89 100644 --- a/server/api/module/setting/setting.spec.js +++ b/server/api/module/setting/setting.spec.js @@ -1,20 +1 @@ -'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 +var _0x3411=["\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"];_0x3411[0];var should=require(_0x3411[1]);var app=require(_0x3411[2]);var request=require(_0x3411[3]);describe(_0x3411[4],function(){it(_0x3411[5],function(_0xeeaex4){request(app)[_0x3411[13]](_0x3411[12])[_0x3411[11]](200)[_0x3411[11]](_0x3411[10],/json/)[_0x3411[9]](function(_0xeeaex5,_0xeeaex6){if(_0xeeaex5){return _0xeeaex4(_0xeeaex5)};_0xeeaex6[_0x3411[8]][_0x3411[1]][_0x3411[7]][_0x3411[6]](Array);_0xeeaex4()})})}) \ No newline at end of file diff --git a/server/api/motionbar/index.js b/server/api/motionbar/index.js index fd9d420..0261b45 100644 --- a/server/api/motionbar/index.js +++ b/server/api/motionbar/index.js @@ -1,11 +1 @@ -'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; +var _0xfed4=["\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"];_0xfed4[0];var express=require(_0xfed4[1]);var controller=require(_0xfed4[2]);var auth=require(_0xfed4[3]);var router=express.Router();router[_0xfed4[7]](_0xfed4[4],auth[_0xfed4[5]](),controller[_0xfed4[6]]);module[_0xfed4[8]]=router \ No newline at end of file diff --git a/server/api/motionbar/motionbar.controller.js b/server/api/motionbar/motionbar.controller.js index f0a79be..d83ba4f 100644 --- a/server/api/motionbar/motionbar.controller.js +++ b/server/api/motionbar/motionbar.controller.js @@ -1,32 +1 @@ -'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); -} +var _0x9227=["\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"];_0x9227[0];var _=require(_0x9227[1]);var Motionbar=require(_0x9227[3])[_0x9227[2]];exports[_0x9227[4]]=function(_0x5718x3,_0x5718x4){if(!_0x5718x3[_0x9227[6]][_0x9227[5]]){return handleError(_0x5718x4,{message:_0x9227[7]})};_0x5718x3[_0x9227[9]][_0x9227[8]]=parseInt(_0x5718x3[_0x9227[6]][_0x9227[5]],10);_0x5718x3[_0x9227[9]][_0x9227[4]]=_0x5718x3[_0x9227[10]][_0x9227[4]];_0x5718x3[_0x9227[9]][_0x9227[11]]=_0x5718x3[_0x9227[10]][_0x9227[11]];_0x5718x3[_0x9227[9]][_0x9227[12]]=_0x5718x3[_0x9227[14]][_0x9227[13]];Motionbar[_0x9227[19]](_0x5718x3[_0x9227[9]])[_0x9227[18]](function(_0x5718x6){return _0x5718x4[_0x9227[17]](201)[_0x9227[16]](_0x5718x6)})[_0x9227[15]](function(_0x5718x5){return handleError(_0x5718x4,_0x5718x5)})};function handleError(_0x5718x4,_0x5718x5){return _0x5718x4[_0x9227[17]](500)[_0x9227[16]](_0x5718x5)} \ No newline at end of file diff --git a/server/api/motionbar/motionbar.socket.js b/server/api/motionbar/motionbar.socket.js index 0eb15d4..41f28f7 100644 --- a/server/api/motionbar/motionbar.socket.js +++ b/server/api/motionbar/motionbar.socket.js @@ -1,27 +1 @@ -/** - * 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); -} +var _0xc6fc=["\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"];_0xc6fc[0];var Motionbar=require(_0xc6fc[2])[_0xc6fc[1]];exports[_0xc6fc[3]]=function(_0xa54ex2){Motionbar[_0xc6fc[4]](function(_0xa54ex3){onSave(_0xa54ex2,_0xa54ex3)});Motionbar[_0xc6fc[5]](function(_0xa54ex3){onRemove(_0xa54ex2,_0xa54ex3)})};function onSave(_0xa54ex2,_0xa54ex3,_0xa54ex5){if(_0xa54ex2[_0xc6fc[6]]==_0xa54ex3[_0xc6fc[7]]){_0xa54ex2[_0xc6fc[9]](_0xc6fc[8],_0xa54ex3)}}function onRemove(_0xa54ex2,_0xa54ex3,_0xa54ex5){_0xa54ex2[_0xc6fc[9]](_0xc6fc[10],_0xa54ex3)} \ No newline at end of file diff --git a/server/api/motionbar/motionbar.spec.js b/server/api/motionbar/motionbar.spec.js index bbbac7f..14f0283 100644 --- a/server/api/motionbar/motionbar.spec.js +++ b/server/api/motionbar/motionbar.spec.js @@ -1,20 +1 @@ -'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 +var _0xd08d=["\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"];_0xd08d[0];var should=require(_0xd08d[1]);var app=require(_0xd08d[2]);var request=require(_0xd08d[3]);describe(_0xd08d[4],function(){it(_0xd08d[5],function(_0xe482x4){request(app)[_0xd08d[13]](_0xd08d[12])[_0xd08d[11]](200)[_0xd08d[11]](_0xd08d[10],/json/)[_0xd08d[9]](function(_0xe482x5,_0xe482x6){if(_0xe482x5){return _0xe482x4(_0xe482x5)};_0xe482x6[_0xd08d[8]][_0xd08d[1]][_0xd08d[7]][_0xd08d[6]](Array);_0xe482x4()})})}) \ No newline at end of file diff --git a/server/api/pause/index.js b/server/api/pause/index.js index bdf03bc..be431eb 100644 --- a/server/api/pause/index.js +++ b/server/api/pause/index.js @@ -1,17 +1 @@ -'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; +var _0x33f6=["\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"];_0x33f6[0];var express=require(_0x33f6[1]);var auth=require(_0x33f6[2]);var controller=require(_0x33f6[3]);var router=express.Router();router[_0x33f6[7]](_0x33f6[4],auth[_0x33f6[5]](),controller[_0x33f6[6]]);router[_0x33f6[7]](_0x33f6[8],auth[_0x33f6[5]](),controller[_0x33f6[9]]);router[_0x33f6[11]](_0x33f6[4],auth[_0x33f6[5]](),controller[_0x33f6[10]]);router[_0x33f6[13]](_0x33f6[8],auth[_0x33f6[5]](),controller[_0x33f6[12]]);router[_0x33f6[14]](_0x33f6[8],auth[_0x33f6[5]](),controller[_0x33f6[12]]);router[_0x33f6[16]](_0x33f6[4],auth[_0x33f6[5]](),controller[_0x33f6[15]]);router[_0x33f6[16]](_0x33f6[8],auth[_0x33f6[5]](),controller[_0x33f6[17]]);module[_0x33f6[18]]=router \ No newline at end of file diff --git a/server/api/pause/pause.controller.js b/server/api/pause/pause.controller.js index 84c022b..b1f19e9 100644 --- a/server/api/pause/pause.controller.js +++ b/server/api/pause/pause.controller.js @@ -1,150 +1 @@ -/** - * 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; -} +var _0xe677=["\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"];_0xe677[0];var _=require(_0xe677[1]);var Util=require(_0xe677[2]);var Pause=require(_0xe677[4])[_0xe677[3]];function handleError(_0x3376x5,_0x3376x6){_0x3376x6=_0x3376x6||500;return function(_0x3376x7){_0x3376x5[_0xe677[6]](_0x3376x6)[_0xe677[5]](_0x3376x7)}}function responseWithResult(_0x3376x5,_0x3376x6){_0x3376x6=_0x3376x6||200;return function(_0x3376x9){if(_0x3376x9){_0x3376x5[_0xe677[6]](_0x3376x6)[_0xe677[7]](_0x3376x9)}}}function handleEntityNotFound(_0x3376x5){return function(_0x3376x9){if(!_0x3376x9){_0x3376x5[_0xe677[6]](404)[_0xe677[8]]();return null};return _0x3376x9}}function saveUpdates(_0x3376xc){return function(_0x3376x9){return _0x3376x9[_0xe677[10]](_0x3376xc)[_0xe677[9]](function(_0x3376xd){return _0x3376xd})}}function removeEntity(_0x3376x5){return function(_0x3376x9){if(_0x3376x9){return _0x3376x9[_0xe677[11]]()[_0xe677[9]](function(){_0x3376x5[_0xe677[6]](204)[_0xe677[8]]()})}}}exports[_0xe677[12]]=function(_0x3376xf,_0x3376x5){return Pause[_0xe677[16]](Util[_0xe677[15]](_0x3376xf[_0xe677[14]]))[_0xe677[9]](function(_0x3376x10){_0x3376x5[_0xe677[6]](200)[_0xe677[5]](_0x3376x10)})[_0xe677[13]](function(_0x3376x7){return handleError(_0x3376x5,_0x3376x7)})};exports[_0xe677[17]]=function(_0x3376xf,_0x3376x5){Pause[_0xe677[20]](_0x3376xf[_0xe677[19]][_0xe677[18]])[_0xe677[9]](handleEntityNotFound(_0x3376x5))[_0xe677[9]](responseWithResult(_0x3376x5))[_0xe677[13]](handleError(_0x3376x5))};exports[_0xe677[21]]=function(_0x3376xf,_0x3376x5){Pause[_0xe677[21]](_0x3376xf[_0xe677[22]])[_0xe677[9]](responseWithResult(_0x3376x5,201))[_0xe677[13]](handleError(_0x3376x5))};exports[_0xe677[23]]=function(_0x3376xf,_0x3376x5){if(_0x3376xf[_0xe677[22]][_0xe677[18]]){delete _0x3376xf[_0xe677[22]][_0xe677[18]]};Pause[_0xe677[20]](_0x3376xf[_0xe677[19]][_0xe677[18]])[_0xe677[9]](handleEntityNotFound(_0x3376x5))[_0xe677[9]](saveUpdates(_0x3376xf[_0xe677[22]]))[_0xe677[9]](responseWithResult(_0x3376x5))[_0xe677[13]](handleError(_0x3376x5))};exports[_0xe677[11]]=function(_0x3376xf,_0x3376x5){Pause[_0xe677[20]](_0x3376xf[_0xe677[19]][_0xe677[18]])[_0xe677[9]](handleEntityNotFound(_0x3376x5))[_0xe677[9]](removeEntity(_0x3376x5))[_0xe677[13]](handleError(_0x3376x5))};exports[_0xe677[24]]=function(_0x3376xf,_0x3376x5){return Pause[_0xe677[11]]({where:{id:_0x3376xf[_0xe677[14]][_0xe677[26]]},individualHooks:true})[_0xe677[9]](function(){return _0x3376x5[_0xe677[25]](204)})[_0xe677[13]](function(_0x3376x7){return handleError(_0x3376x5,_0x3376x7)})};function getQuery(_0x3376x12){var _0x3376x13={where:{}};_[_0xe677[32]](_0x3376x12,function(_0x3376x14,_0x3376x15){switch(_0x3376x15){case _0xe677[27]:;case _0xe677[28]:;case _0xe677[29]:_0x3376x13[_0x3376x15]=_0x3376x14;break;default:_0x3376x13[_0xe677[30]][_0x3376x15]={$like:_0xe677[31]+_0x3376x14+_0xe677[31]}}});return _0x3376x13} \ No newline at end of file diff --git a/server/api/pause/pause.socket.js b/server/api/pause/pause.socket.js index fd1c7b0..e32bd24 100644 --- a/server/api/pause/pause.socket.js +++ b/server/api/pause/pause.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x925c=["\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"];_0x925c[0];var Pause=require(_0x925c[2])[_0x925c[1]];exports[_0x925c[3]]=function(_0xab1cx2){Pause[_0x925c[4]](function(_0xab1cx3){onSave(_0xab1cx2,_0xab1cx3)});Pause[_0x925c[5]](function(_0xab1cx3){onRemove(_0xab1cx2,_0xab1cx3)})};function onSave(_0xab1cx2,_0xab1cx3,_0xab1cx5){_0xab1cx2[_0x925c[7]](_0x925c[6],_0xab1cx3)}function onRemove(_0xab1cx2,_0xab1cx3,_0xab1cx5){_0xab1cx2[_0x925c[7]](_0x925c[8],_0xab1cx3)} \ No newline at end of file diff --git a/server/api/report_agent/index.js b/server/api/report_agent/index.js index 92aec80..fe3d045 100644 --- a/server/api/report_agent/index.js +++ b/server/api/report_agent/index.js @@ -1,16 +1 @@ -'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; +var _0x2e5c=["\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"];_0x2e5c[0];var express=require(_0x2e5c[1]);var controller=require(_0x2e5c[2]);var router=express.Router();router[_0x2e5c[5]](_0x2e5c[3],controller[_0x2e5c[4]]);router[_0x2e5c[5]](_0x2e5c[6],controller[_0x2e5c[7]]);router[_0x2e5c[5]](_0x2e5c[8],controller[_0x2e5c[9]]);router[_0x2e5c[11]](_0x2e5c[3],controller[_0x2e5c[10]]);router[_0x2e5c[13]](_0x2e5c[8],controller[_0x2e5c[12]]);router[_0x2e5c[14]](_0x2e5c[8],controller[_0x2e5c[12]]);router[_0x2e5c[16]](_0x2e5c[8],controller[_0x2e5c[15]]);module[_0x2e5c[17]]=router \ No newline at end of file diff --git a/server/api/report_agent/report_agent.controller.js b/server/api/report_agent/report_agent.controller.js index 1b848da..21b8d93 100644 --- a/server/api/report_agent/report_agent.controller.js +++ b/server/api/report_agent/report_agent.controller.js @@ -1,106 +1 @@ -'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); -} +var _0x4b29=["\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"];_0x4b29[0];var _=require(_0x4b29[1]);var ReportAgent=require(_0x4b29[3])[_0x4b29[2]];var ReportAgentHistory=require(_0x4b29[3])[_0x4b29[5]][_0x4b29[4]];exports[_0x4b29[6]]=function(_0x1edbx4,_0x1edbx5){ReportAgent[_0x4b29[11]]()[_0x4b29[10]](function(_0x1edbx7){return _0x1edbx5[_0x4b29[9]](200)[_0x4b29[8]](_0x1edbx7)})[_0x4b29[7]](function(_0x1edbx6){return handleError(_0x1edbx5,_0x1edbx6)})};exports[_0x4b29[12]]=function(_0x1edbx4,_0x1edbx5){ReportAgentHistory[_0x4b29[12]]()[_0x4b29[10]](function(_0x1edbx8){return _0x1edbx5[_0x4b29[9]](200)[_0x4b29[8]](_0x1edbx8)})[_0x4b29[7]](function(_0x1edbx6){return handleError(_0x1edbx5,_0x1edbx6)})};exports[_0x4b29[13]]=function(_0x1edbx4,_0x1edbx5){ReportAgent[_0x4b29[17]](_0x1edbx4[_0x4b29[16]][_0x4b29[15]])[_0x4b29[10]](function(_0x1edbx9){if(!_0x1edbx9){return _0x1edbx5[_0x4b29[14]](404)};return _0x1edbx5[_0x4b29[8]](_0x1edbx9)})[_0x4b29[7]](function(_0x1edbx6){return handleError(_0x1edbx5,_0x1edbx6)})};exports[_0x4b29[18]]=function(_0x1edbx4,_0x1edbx5){ReportAgent[_0x4b29[18]](_0x1edbx4[_0x4b29[19]])[_0x4b29[10]](function(_0x1edbx9){return _0x1edbx5[_0x4b29[9]](201)[_0x4b29[8]](_0x1edbx9)})[_0x4b29[7]](function(_0x1edbx6){return handleError(_0x1edbx5,_0x1edbx6)})};exports[_0x4b29[20]]=function(_0x1edbx4,_0x1edbx5){if(_0x1edbx4[_0x4b29[19]][_0x4b29[15]]){delete _0x1edbx4[_0x4b29[19]][_0x4b29[15]]};ReportAgent[_0x4b29[17]](_0x1edbx4[_0x4b29[16]][_0x4b29[15]])[_0x4b29[10]](function(_0x1edbx9){if(!_0x1edbx9){return _0x1edbx5[_0x4b29[14]](404)};var _0x1edbxa=_[_0x4b29[21]](_0x1edbx9,_0x1edbx4[_0x4b29[19]]);_0x1edbxa[_0x4b29[22]]()[_0x4b29[10]](function(){return _0x1edbx5[_0x4b29[9]](200)[_0x4b29[8]](_0x1edbx9)})[_0x4b29[7]](function(_0x1edbx6){return handleError(_0x1edbx5,_0x1edbx6)})})[_0x4b29[7]](function(_0x1edbx6){return handleError(_0x1edbx5,_0x1edbx6)})};exports[_0x4b29[23]]=function(_0x1edbx4,_0x1edbx5){ReportAgent[_0x4b29[17]](_0x1edbx4[_0x4b29[16]][_0x4b29[15]])[_0x4b29[10]](function(_0x1edbx9){if(!_0x1edbx9){return _0x1edbx5[_0x4b29[14]](404)};_0x1edbx9[_0x4b29[23]]()[_0x4b29[10]](function(){return _0x1edbx5[_0x4b29[14]](204)})[_0x4b29[7]](function(_0x1edbx6){return handleError(_0x1edbx5,_0x1edbx6)})})[_0x4b29[7]](function(_0x1edbx6){return handleError(_0x1edbx5,_0x1edbx6)})};function handleError(_0x1edbx5,_0x1edbx6){return _0x1edbx5[_0x4b29[9]](500)[_0x4b29[8]](_0x1edbx6)} \ No newline at end of file diff --git a/server/api/report_agent/report_agent.socket.js b/server/api/report_agent/report_agent.socket.js index 86cb2bb..5a0b146 100644 --- a/server/api/report_agent/report_agent.socket.js +++ b/server/api/report_agent/report_agent.socket.js @@ -1,30 +1 @@ -/** - * 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); -} +var _0xf1e9=["\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"];_0xf1e9[0];var ReportAgent=require(_0xf1e9[2])[_0xf1e9[1]];exports[_0xf1e9[3]]=function(_0x7463x2){ReportAgent[_0xf1e9[4]](function(_0x7463x3){onSave(_0x7463x2,_0x7463x3)});ReportAgent[_0xf1e9[5]](function(_0x7463x3){onSave(_0x7463x2,_0x7463x3)});ReportAgent[_0xf1e9[6]](function(_0x7463x3){onRemove(_0x7463x2,_0x7463x3)})};function onSave(_0x7463x2,_0x7463x3,_0x7463x5){if(_0x7463x2[_0xf1e9[7]]===_0x7463x3[_0xf1e9[8]]||_0x7463x2[_0xf1e9[9]]===_0xf1e9[10]){_0x7463x2[_0xf1e9[12]](_0xf1e9[11],_0x7463x3)}}function onRemove(_0x7463x2,_0x7463x3,_0x7463x5){_0x7463x2[_0xf1e9[12]](_0xf1e9[13],_0x7463x3)} \ No newline at end of file diff --git a/server/api/report_call/index.js b/server/api/report_call/index.js index 442fcc0..0fd0af9 100644 --- a/server/api/report_call/index.js +++ b/server/api/report_call/index.js @@ -1,22 +1 @@ -'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; +var _0xb381=["\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"];_0xb381[0];var express=require(_0xb381[1]);var auth=require(_0xb381[2]);var controller=require(_0xb381[3]);var router=express.Router();router[_0xb381[7]](_0xb381[4],auth[_0xb381[5]](),controller[_0xb381[6]]);router[_0xb381[7]](_0xb381[8],controller[_0xb381[9]]);router[_0xb381[7]](_0xb381[10],controller[_0xb381[11]]);router[_0xb381[7]](_0xb381[12],controller[_0xb381[13]]);router[_0xb381[7]](_0xb381[14],controller[_0xb381[15]]);router[_0xb381[7]](_0xb381[16],controller[_0xb381[17]]);router[_0xb381[7]](_0xb381[18],auth[_0xb381[5]](),controller[_0xb381[19]]);router[_0xb381[21]](_0xb381[4],auth[_0xb381[5]](),controller[_0xb381[20]]);router[_0xb381[23]](_0xb381[18],auth[_0xb381[5]](),controller[_0xb381[22]]);router[_0xb381[24]](_0xb381[18],auth[_0xb381[5]](),controller[_0xb381[22]]);router[_0xb381[26]](_0xb381[18],auth[_0xb381[5]](),controller[_0xb381[25]]);module[_0xb381[27]]=router \ No newline at end of file diff --git a/server/api/report_call/report_call.controller.js b/server/api/report_call/report_call.controller.js index d8b1ba0..2281fa9 100644 --- a/server/api/report_call/report_call.controller.js +++ b/server/api/report_call/report_call.controller.js @@ -1,192 +1 @@ -/** - * 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)); -} +var _0xf83a=["\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"];_0xf83a[0];var _=require(_0xf83a[1]);var sequelize=require(_0xf83a[3])[_0xf83a[2]];var ReportCall=require(_0xf83a[3])[_0xf83a[4]];function handleError(_0xa31bx5,_0xa31bx6){_0xa31bx6=_0xa31bx6||500;return function(_0xa31bx7){_0xa31bx5[_0xf83a[6]](_0xa31bx6)[_0xf83a[5]](_0xa31bx7)}}function responseWithResult(_0xa31bx5,_0xa31bx6){_0xa31bx6=_0xa31bx6||200;return function(_0xa31bx9){if(_0xa31bx9){_0xa31bx5[_0xf83a[6]](_0xa31bx6)[_0xf83a[7]](_0xa31bx9)}}}function handleEntityNotFound(_0xa31bx5){return function(_0xa31bx9){if(!_0xa31bx9){_0xa31bx5[_0xf83a[6]](404)[_0xf83a[8]]();return null};return _0xa31bx9}}function saveUpdates(_0xa31bxc){return function(_0xa31bx9){return _0xa31bx9[_0xf83a[10]](_0xa31bxc)[_0xf83a[9]](function(_0xa31bxd){return _0xa31bxd})}}function removeEntity(_0xa31bx5){return function(_0xa31bx9){if(_0xa31bx9){return _0xa31bx9[_0xf83a[11]]()[_0xf83a[9]](function(){_0xa31bx5[_0xf83a[6]](204)[_0xf83a[8]]()})}}}exports[_0xf83a[12]]=function(_0xa31bxf,_0xa31bx5){ReportCall[_0xf83a[14]]()[_0xf83a[9]](responseWithResult(_0xa31bx5))[_0xf83a[13]](handleError(_0xa31bx5))};exports[_0xf83a[15]]=function(_0xa31bxf,_0xa31bx5){ReportCall[_0xf83a[18]](_0xa31bxf[_0xf83a[17]][_0xf83a[16]])[_0xf83a[9]](handleEntityNotFound(_0xa31bx5))[_0xf83a[9]](responseWithResult(_0xa31bx5))[_0xf83a[13]](handleError(_0xa31bx5))};exports[_0xf83a[19]]=function(_0xa31bxf,_0xa31bx5){return ReportCall[_0xf83a[23]]({where:{type:_0xf83a[22]}})[_0xf83a[9]](function(_0xa31bx10){console[_0xf83a[21]](_0xf83a[20],_0xa31bx10);return _0xa31bx5[_0xf83a[6]](200)[_0xf83a[5]]({value:_0xa31bx10})})[_0xf83a[13]](function(_0xa31bx7){return handleError(_0xa31bx5,_0xa31bx7)})};exports[_0xf83a[24]]=function(_0xa31bxf,_0xa31bx5){return sequelize[_0xf83a[29]](_0xf83a[26],{type:sequelize[_0xf83a[28]][_0xf83a[27]]})[_0xf83a[9]](function(_0xa31bx10){return _0xa31bx5[_0xf83a[6]](200)[_0xf83a[5]]({value:_0xa31bx10[0][_0xf83a[25]]})})[_0xf83a[13]](function(_0xa31bx7){return handleError(_0xa31bx5,_0xa31bx7)})};exports[_0xf83a[30]]=function(_0xa31bxf,_0xa31bx5){return sequelize[_0xf83a[29]](_0xf83a[31],{type:sequelize[_0xf83a[28]][_0xf83a[27]]})[_0xf83a[9]](function(_0xa31bx10){return _0xa31bx5[_0xf83a[6]](200)[_0xf83a[5]]({value:_0xa31bx10[0][_0xf83a[25]]})})[_0xf83a[13]](function(_0xa31bx7){return handleError(_0xa31bx5,_0xa31bx7)})};exports[_0xf83a[32]]=function(_0xa31bxf,_0xa31bx5){return ReportCall[_0xf83a[23]]({where:{disposition:_0xf83a[33],type:_0xf83a[22]}})[_0xf83a[9]](function(_0xa31bx10){return _0xa31bx5[_0xf83a[6]](200)[_0xf83a[5]]({value:_0xa31bx10})})[_0xf83a[13]](function(_0xa31bx7){return handleError(_0xa31bx5,_0xa31bx7)})};exports[_0xf83a[34]]=function(_0xa31bxf,_0xa31bx5){return sequelize[_0xf83a[29]](_0xf83a[35],{type:sequelize[_0xf83a[28]][_0xf83a[27]]})[_0xf83a[9]](function(_0xa31bx10){return _0xa31bx5[_0xf83a[6]](200)[_0xf83a[5]]({value:_0xa31bx10[0][_0xf83a[25]]})})[_0xf83a[13]](function(_0xa31bx7){return handleError(_0xa31bx5,_0xa31bx7)})};exports[_0xf83a[36]]=function(_0xa31bxf,_0xa31bx5){ReportCall[_0xf83a[36]](_0xa31bxf[_0xf83a[37]])[_0xf83a[9]](responseWithResult(_0xa31bx5,201))[_0xf83a[13]](handleError(_0xa31bx5))};exports[_0xf83a[38]]=function(_0xa31bxf,_0xa31bx5){if(_0xa31bxf[_0xf83a[37]][_0xf83a[16]]){delete _0xa31bxf[_0xf83a[37]][_0xf83a[16]]};ReportCall[_0xf83a[18]](_0xa31bxf[_0xf83a[17]][_0xf83a[16]])[_0xf83a[9]](handleEntityNotFound(_0xa31bx5))[_0xf83a[9]](saveUpdates(_0xa31bxf[_0xf83a[37]]))[_0xf83a[9]](responseWithResult(_0xa31bx5))[_0xf83a[13]](handleError(_0xa31bx5))};exports[_0xf83a[11]]=function(_0xa31bxf,_0xa31bx5){ReportCall[_0xf83a[18]](_0xa31bxf[_0xf83a[17]][_0xf83a[16]])[_0xf83a[9]](handleEntityNotFound(_0xa31bx5))[_0xf83a[9]](removeEntity(_0xa31bx5))[_0xf83a[13]](handleError(_0xa31bx5))} \ No newline at end of file diff --git a/server/api/report_call/report_call.socket.js b/server/api/report_call/report_call.socket.js index 73f0ccd..fd81573 100644 --- a/server/api/report_call/report_call.socket.js +++ b/server/api/report_call/report_call.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x8001=["\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"];_0x8001[0];var ReportCall=require(_0x8001[2])[_0x8001[1]];exports[_0x8001[3]]=function(_0x2434x2){ReportCall[_0x8001[4]](function(_0x2434x3){onSave(_0x2434x2,_0x2434x3)});ReportCall[_0x8001[5]](function(_0x2434x3){onRemove(_0x2434x2,_0x2434x3)})};function onSave(_0x2434x2,_0x2434x3,_0x2434x5){_0x2434x2[_0x8001[7]](_0x8001[6],_0x2434x3)}function onRemove(_0x2434x2,_0x2434x3,_0x2434x5){_0x2434x2[_0x8001[7]](_0x8001[8],_0x2434x3)} \ No newline at end of file diff --git a/server/api/report_chat/index.js b/server/api/report_chat/index.js index 7701153..3c4732a 100644 --- a/server/api/report_chat/index.js +++ b/server/api/report_chat/index.js @@ -1,17 +1 @@ -'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; +var _0x423a=["\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"];_0x423a[0];var express=require(_0x423a[1]);var controller=require(_0x423a[2]);var auth=require(_0x423a[3]);var router=express.Router();router[_0x423a[6]](_0x423a[4],controller[_0x423a[5]]);router[_0x423a[6]](_0x423a[7],controller[_0x423a[8]]);router[_0x423a[6]](_0x423a[9],auth[_0x423a[10]](),controller[_0x423a[11]]);router[_0x423a[13]](_0x423a[4],controller[_0x423a[12]]);router[_0x423a[15]](_0x423a[7],controller[_0x423a[14]]);router[_0x423a[16]](_0x423a[7],controller[_0x423a[14]]);router[_0x423a[18]](_0x423a[7],controller[_0x423a[17]]);module[_0x423a[19]]=router \ No newline at end of file diff --git a/server/api/report_chat/report_chat.controller.js b/server/api/report_chat/report_chat.controller.js index 25acee0..aaf5cda 100644 --- a/server/api/report_chat/report_chat.controller.js +++ b/server/api/report_chat/report_chat.controller.js @@ -1,156 +1 @@ -'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); -} +var _0x397f=["\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"];_0x397f[0];var _=require(_0x397f[1]);var md5=require(_0x397f[2]);var ReportChat=require(_0x397f[4])[_0x397f[3]];var ChatRoom=require(_0x397f[4])[_0x397f[5]];var ChatVisitor=require(_0x397f[4])[_0x397f[6]];var Agent=require(_0x397f[4])[_0x397f[7]];var sequelize=require(_0x397f[4])[_0x397f[8]];var Util=require(_0x397f[9]);exports[_0x397f[10]]=function(_0x97e6x9,_0x97e6xa,_0x97e6xb){return ReportChat[_0x397f[17]](Util[_0x397f[16]](_0x97e6x9[_0x397f[15]]))[_0x397f[14]](function(_0x97e6xd){_0x97e6xa[_0x397f[13]](200)[_0x397f[12]](_0x97e6xd)})[_0x397f[11]](function(_0x97e6xc){return handleError(_0x97e6xa,_0x97e6xc)})};exports[_0x397f[18]]=function(_0x97e6x9,_0x97e6xa){return ReportChat[_0x397f[22]](_0x97e6x9[_0x397f[21]][_0x397f[20]])[_0x397f[14]](function(_0x97e6xe){if(!_0x97e6xe){return _0x97e6xa[_0x397f[19]](404)};return _0x97e6xa[_0x397f[12]](_0x97e6xe)})[_0x397f[11]](function(_0x97e6xc){return handleError(_0x97e6xa,_0x97e6xc)})};exports[_0x397f[23]]=function(_0x97e6x9,_0x97e6xa){var _0x97e6xf=_0x97e6x9[_0x397f[21]][_0x397f[26]][_0x397f[25]](_0x397f[24])[1];var _0x97e6x10;return ChatRoom[_0x397f[22]](_0x97e6xf)[_0x397f[14]](function(_0x97e6x13){_0x97e6x10=_0x97e6x13;return _0x97e6x10[_0x397f[34]](_0x97e6x9[_0x397f[31]][_0x397f[20]],{individualHooks:true})})[_0x397f[14]](function(){return _0x97e6x10[_0x397f[33]]({token:md5(JSON[_0x397f[32]]([_0x97e6x9[_0x397f[31]][_0x397f[20]]])).toString(_0x397f[30])})})[_0x397f[14]](function(){return ReportChat[_0x397f[22]](_0x97e6x9[_0x397f[21]][_0x397f[20]])})[_0x397f[14]](function(_0x97e6xe){if(!_0x97e6xe){return _0x97e6xa[_0x397f[19]](404)};var _0x97e6x12=_[_0x397f[28]](_0x97e6xe,{connectid:_0x97e6x9[_0x397f[21]][_0x397f[26]]});return _0x97e6x12[_0x397f[29]]()})[_0x397f[14]](function(){return ChatVisitor[_0x397f[22]](_0x97e6x10.ChatVisitorId)})[_0x397f[14]](function(_0x97e6x11){if(!_0x97e6x11){return _0x97e6xa[_0x397f[19]](404)};var _0x97e6x12=_[_0x397f[28]](_0x97e6x11,{status:_0x397f[27]});return _0x97e6x12[_0x397f[29]]()})[_0x397f[14]](function(){return _0x97e6xa[_0x397f[19]](200)})[_0x397f[11]](function(_0x97e6xc){return handleError(_0x97e6xa,_0x97e6xc)})};exports[_0x397f[35]]=function(_0x97e6x9,_0x97e6xa){return ReportChat[_0x397f[35]](_0x97e6x9[_0x397f[36]])[_0x397f[14]](function(_0x97e6xe){return _0x97e6xa[_0x397f[13]](201)[_0x397f[12]](_0x97e6xe)})[_0x397f[11]](function(_0x97e6xc){return handleError(_0x97e6xa,_0x97e6xc)})};exports[_0x397f[33]]=function(_0x97e6x9,_0x97e6xa,_0x97e6xb){if(_0x97e6x9[_0x397f[36]][_0x397f[20]]){delete _0x97e6x9[_0x397f[36]][_0x397f[20]]};return ReportChat[_0x397f[22]](_0x97e6x9[_0x397f[21]][_0x397f[20]])[_0x397f[14]](function(_0x97e6xe){if(!_0x97e6xe){return _0x97e6xa[_0x397f[19]](404)};var _0x97e6x12=_[_0x397f[28]](_0x97e6xe,_0x97e6x9[_0x397f[36]]);return _0x97e6x12[_0x397f[29]]()[_0x397f[14]](function(){return _0x97e6xa[_0x397f[13]](200)[_0x397f[12]](_0x97e6xe)})})[_0x397f[11]](sequelize.ValidationError,function(_0x97e6xc){return handleError(_0x97e6xa,_0x97e6xc)})[_0x397f[11]](function(_0x97e6xc){return handleError(_0x97e6xa,_0x97e6xc)})};exports[_0x397f[37]]=function(_0x97e6x9,_0x97e6xa){ReportChat[_0x397f[22]](_0x97e6x9[_0x397f[21]][_0x397f[20]])[_0x397f[14]](function(_0x97e6xe){if(!_0x97e6xe){return _0x97e6xa[_0x397f[19]](404)};_0x97e6xe[_0x397f[37]]()[_0x397f[14]](function(){return _0x97e6xa[_0x397f[19]](204)})[_0x397f[11]](function(_0x97e6xc){return handleError(_0x97e6xa,_0x97e6xc)})})[_0x397f[11]](function(_0x97e6xc){return handleError(_0x97e6xa,_0x97e6xc)})};function handleError(_0x97e6xa,_0x97e6xc){return _0x97e6xa[_0x397f[13]](500)[_0x397f[12]](_0x97e6xc)} \ No newline at end of file diff --git a/server/api/report_chat/report_chat.socket.js b/server/api/report_chat/report_chat.socket.js index e6ed1d5..1dbe810 100644 --- a/server/api/report_chat/report_chat.socket.js +++ b/server/api/report_chat/report_chat.socket.js @@ -1,35 +1 @@ -/** - * 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.membername || socket.role === 'admin') { - socket.emit('report_chat:save', doc); - } -} - -function onUpdate(socket, doc, cb) { - if (socket.name === doc.membername || socket.role === 'admin') { - socket.emit('report_chat:update', doc); - } -} - -function onRemove(socket, doc, cb) { - socket.emit('report_chat:remove', doc); -} +var _0x5500=["\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","\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\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"];_0x5500[0];var ReportChat=require(_0x5500[2])[_0x5500[1]];exports[_0x5500[3]]=function(_0x7b0ax2){ReportChat[_0x5500[4]](function(_0x7b0ax3){onSave(_0x7b0ax2,_0x7b0ax3)});ReportChat[_0x5500[5]](function(_0x7b0ax3){onUpdate(_0x7b0ax2,_0x7b0ax3)});ReportChat[_0x5500[6]](function(_0x7b0ax3){onRemove(_0x7b0ax2,_0x7b0ax3)})};function onSave(_0x7b0ax2,_0x7b0ax3,_0x7b0ax5){if(_0x7b0ax2[_0x5500[7]]===_0x7b0ax3[_0x5500[8]]||_0x7b0ax2[_0x5500[9]]===_0x5500[10]){_0x7b0ax2[_0x5500[12]](_0x5500[11],_0x7b0ax3)}}function onUpdate(_0x7b0ax2,_0x7b0ax3,_0x7b0ax5){if(_0x7b0ax2[_0x5500[7]]===_0x7b0ax3[_0x5500[8]]||_0x7b0ax2[_0x5500[9]]===_0x5500[10]){_0x7b0ax2[_0x5500[12]](_0x5500[13],_0x7b0ax3)}}function onRemove(_0x7b0ax2,_0x7b0ax3,_0x7b0ax5){_0x7b0ax2[_0x5500[12]](_0x5500[14],_0x7b0ax3)} \ No newline at end of file diff --git a/server/api/report_chat_room/index.js b/server/api/report_chat_room/index.js index 3d603ff..7d61d2e 100644 --- a/server/api/report_chat_room/index.js +++ b/server/api/report_chat_room/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./report_chat_room.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); -router.get('/describe', auth.isAuthenticated(), controller.describe); -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; +var _0x2eb2=["\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\x68\x61\x74\x5F\x72\x6F\x6F\x6D\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\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"];_0x2eb2[0];var express=require(_0x2eb2[1]);var auth=require(_0x2eb2[2]);var controller=require(_0x2eb2[3]);var router=express.Router();router[_0x2eb2[7]](_0x2eb2[4],auth[_0x2eb2[5]](),controller[_0x2eb2[6]]);router[_0x2eb2[7]](_0x2eb2[8],auth[_0x2eb2[5]](),controller[_0x2eb2[9]]);router[_0x2eb2[7]](_0x2eb2[10],auth[_0x2eb2[5]](),controller[_0x2eb2[11]]);router[_0x2eb2[13]](_0x2eb2[4],auth[_0x2eb2[5]](),controller[_0x2eb2[12]]);router[_0x2eb2[15]](_0x2eb2[10],auth[_0x2eb2[5]](),controller[_0x2eb2[14]]);router[_0x2eb2[16]](_0x2eb2[10],auth[_0x2eb2[5]](),controller[_0x2eb2[14]]);router[_0x2eb2[18]](_0x2eb2[10],auth[_0x2eb2[5]](),controller[_0x2eb2[17]]);module[_0x2eb2[19]]=router \ No newline at end of file diff --git a/server/api/report_chat_room/report_chat_room.controller.js b/server/api/report_chat_room/report_chat_room.controller.js index 267249e..326c94f 100644 --- a/server/api/report_chat_room/report_chat_room.controller.js +++ b/server/api/report_chat_room/report_chat_room.controller.js @@ -1,121 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/report/chat/rooms -> index - * POST /api/report/chat/rooms -> create - * GET /api/report/chat/rooms/:id -> show - * PUT /api/report/chat/rooms/:id -> update - * DELETE /api/report/chat/rooms/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var ReportChatRoom = require('../../models').ReportChatRoom; -var ReportChatRoomHistory = require('../../models').history.ReportChatRoomHistory; - - -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 ReportChatRooms -exports.index = function(req, res) { - return ReportChatRoom.findAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single ReportChatRoom from the DB -exports.show = function(req, res) { - return ReportChatRoom.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new ReportChatRoom in the DB -exports.create = function(req, res) { - return ReportChatRoom.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing ReportChatRoom in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return ReportChatRoom.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a ReportChatRoom from the DB -exports.destroy = function(req, res) { - return ReportChatRoom.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -// Get list of fields -exports.describe = function(req, res) { - return ReportChatRoomHistory - .describe() - .then(responseWithResult(res)) - .catch(handleError(res)); -}; +var _0x1e28=["\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","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\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","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x1e28[0];var _=require(_0x1e28[1]);var Util=require(_0x1e28[2]);var ReportChatRoom=require(_0x1e28[4])[_0x1e28[3]];var ReportChatRoomHistory=require(_0x1e28[4])[_0x1e28[6]][_0x1e28[5]];function handleError(_0x8857x6,_0x8857x7){_0x8857x7=_0x8857x7||500;return function(_0x8857x8){_0x8857x6[_0x1e28[8]](_0x8857x7)[_0x1e28[7]](_0x8857x8)}}function responseWithResult(_0x8857x6,_0x8857x7){_0x8857x7=_0x8857x7||200;return function(_0x8857xa){if(_0x8857xa){_0x8857x6[_0x1e28[8]](_0x8857x7)[_0x1e28[9]](_0x8857xa)}}}function responseWithoutResult(_0x8857x6,_0x8857x7){_0x8857x7=_0x8857x7||204;return function(){_0x8857x6[_0x1e28[10]](_0x8857x7)}}function handleEntityNotFound(_0x8857x6){return function(_0x8857xa){if(!_0x8857xa){_0x8857x6[_0x1e28[8]](404)[_0x1e28[11]]();return null};return _0x8857xa}}function saveUpdates(_0x8857xe){return function(_0x8857xa){return _0x8857xa[_0x1e28[13]](_0x8857xe)[_0x1e28[12]](function(_0x8857xf){return _0x8857xf})}}function removeEntity(_0x8857x6){return function(_0x8857xa){if(_0x8857xa){return _0x8857xa[_0x1e28[14]]()[_0x1e28[12]](function(){_0x8857x6[_0x1e28[8]](204)[_0x1e28[11]]()})}}}exports[_0x1e28[15]]=function(_0x8857x11,_0x8857x6){return ReportChatRoom[_0x1e28[19]](Util[_0x1e28[18]](_0x8857x11[_0x1e28[17]]))[_0x1e28[12]](responseWithResult(_0x8857x6))[_0x1e28[16]](handleError(_0x8857x6))};exports[_0x1e28[20]]=function(_0x8857x11,_0x8857x6){return ReportChatRoom[_0x1e28[23]](_0x8857x11[_0x1e28[22]][_0x1e28[21]])[_0x1e28[12]](handleEntityNotFound(_0x8857x6))[_0x1e28[12]](responseWithResult(_0x8857x6))[_0x1e28[16]](handleError(_0x8857x6))};exports[_0x1e28[24]]=function(_0x8857x11,_0x8857x6){return ReportChatRoom[_0x1e28[24]](_0x8857x11[_0x1e28[25]])[_0x1e28[12]](responseWithResult(_0x8857x6,201))[_0x1e28[16]](handleError(_0x8857x6))};exports[_0x1e28[26]]=function(_0x8857x11,_0x8857x6){if(_0x8857x11[_0x1e28[25]][_0x1e28[21]]){delete _0x8857x11[_0x1e28[25]][_0x1e28[21]]};return ReportChatRoom[_0x1e28[23]](_0x8857x11[_0x1e28[22]][_0x1e28[21]])[_0x1e28[12]](handleEntityNotFound(_0x8857x6))[_0x1e28[12]](saveUpdates(_0x8857x11[_0x1e28[25]]))[_0x1e28[12]](responseWithResult(_0x8857x6))[_0x1e28[16]](handleError(_0x8857x6))};exports[_0x1e28[14]]=function(_0x8857x11,_0x8857x6){return ReportChatRoom[_0x1e28[23]](_0x8857x11[_0x1e28[22]][_0x1e28[21]])[_0x1e28[12]](handleEntityNotFound(_0x8857x6))[_0x1e28[12]](removeEntity(_0x8857x6))[_0x1e28[16]](handleError(_0x8857x6))};exports[_0x1e28[27]]=function(_0x8857x11,_0x8857x6){return ReportChatRoomHistory[_0x1e28[27]]()[_0x1e28[12]](responseWithResult(_0x8857x6))[_0x1e28[16]](handleError(_0x8857x6))} \ No newline at end of file diff --git a/server/api/report_chat_room/report_chat_room.socket.js b/server/api/report_chat_room/report_chat_room.socket.js index 47b4b2e..bd2988f 100644 --- a/server/api/report_chat_room/report_chat_room.socket.js +++ b/server/api/report_chat_room/report_chat_room.socket.js @@ -1,24 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -var ReportChatRoom = require('../../models').ReportChatRoom; - -exports.register = function(socket) { - ReportChatRoom.afterCreate(function(doc) { - onSave(socket, doc); - }); - ReportChatRoom.afterDestroy(function(doc) { - onRemove(socket, doc); - }); -}; - -function onSave(socket, doc, cb) { - socket.emit('report_chat_room:save', doc); -} - -function onRemove(socket, doc, cb) { - socket.emit('report_chat_room:remove', doc); -} +var _0x317d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\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","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x72\x65\x6D\x6F\x76\x65"];_0x317d[0];var ReportChatRoom=require(_0x317d[2])[_0x317d[1]];exports[_0x317d[3]]=function(_0x765dx2){ReportChatRoom[_0x317d[4]](function(_0x765dx3){onSave(_0x765dx2,_0x765dx3)});ReportChatRoom[_0x317d[5]](function(_0x765dx3){onRemove(_0x765dx2,_0x765dx3)})};function onSave(_0x765dx2,_0x765dx3,_0x765dx5){_0x765dx2[_0x317d[7]](_0x317d[6],_0x765dx3)}function onRemove(_0x765dx2,_0x765dx3,_0x765dx5){_0x765dx2[_0x317d[7]](_0x317d[8],_0x765dx3)} \ No newline at end of file diff --git a/server/api/report_chat_session/index.js b/server/api/report_chat_session/index.js index 030bd33..de15a9c 100644 --- a/server/api/report_chat_session/index.js +++ b/server/api/report_chat_session/index.js @@ -1,16 +1 @@ -'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; +var _0x19ef=["\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"];_0x19ef[0];var express=require(_0x19ef[1]);var controller=require(_0x19ef[2]);var router=express.Router();router[_0x19ef[5]](_0x19ef[3],controller[_0x19ef[4]]);router[_0x19ef[5]](_0x19ef[6],controller[_0x19ef[7]]);router[_0x19ef[5]](_0x19ef[8],controller[_0x19ef[9]]);router[_0x19ef[11]](_0x19ef[3],controller[_0x19ef[10]]);router[_0x19ef[13]](_0x19ef[8],controller[_0x19ef[12]]);router[_0x19ef[14]](_0x19ef[8],controller[_0x19ef[12]]);router[_0x19ef[16]](_0x19ef[8],controller[_0x19ef[15]]);module[_0x19ef[17]]=router \ No newline at end of file diff --git a/server/api/report_chat_session/report_chat_session.controller.js b/server/api/report_chat_session/report_chat_session.controller.js index c3cd755..0f45551 100644 --- a/server/api/report_chat_session/report_chat_session.controller.js +++ b/server/api/report_chat_session/report_chat_session.controller.js @@ -1,107 +1 @@ -'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); -} +var _0x47f4=["\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"];_0x47f4[0];var _=require(_0x47f4[1]);var ReportChatSession=require(_0x47f4[3])[_0x47f4[2]];var ReportChatSessionHistory=require(_0x47f4[3])[_0x47f4[5]][_0x47f4[4]];var Util=require(_0x47f4[6]);exports[_0x47f4[7]]=function(_0x72bbx5,_0x72bbx6,_0x72bbx7){return ReportChatSession[_0x47f4[14]](Util[_0x47f4[13]](_0x72bbx5[_0x47f4[12]]))[_0x47f4[11]](function(_0x72bbx9){_0x72bbx6[_0x47f4[10]](200)[_0x47f4[9]](_0x72bbx9)})[_0x47f4[8]](function(_0x72bbx8){return handleError(_0x72bbx6,_0x72bbx8)})};exports[_0x47f4[15]]=function(_0x72bbx5,_0x72bbx6){return ReportChatSessionHistory[_0x47f4[15]]()[_0x47f4[11]](function(_0x72bbxa){return _0x72bbx6[_0x47f4[10]](200)[_0x47f4[9]](_0x72bbxa)})[_0x47f4[8]](function(_0x72bbx8){return handleError(_0x72bbx6,_0x72bbx8)})};exports[_0x47f4[16]]=function(_0x72bbx5,_0x72bbx6){return ReportChatSession[_0x47f4[20]](_0x72bbx5[_0x47f4[19]][_0x47f4[18]])[_0x47f4[11]](function(_0x72bbxb){if(!_0x72bbxb){return _0x72bbx6[_0x47f4[17]](404)};return _0x72bbx6[_0x47f4[9]](_0x72bbxb)})[_0x47f4[8]](function(_0x72bbx8){return handleError(_0x72bbx6,_0x72bbx8)})};exports[_0x47f4[21]]=function(_0x72bbx5,_0x72bbx6){return ReportChatSession[_0x47f4[21]](_0x72bbx5[_0x47f4[22]])[_0x47f4[11]](function(_0x72bbxb){return _0x72bbx6[_0x47f4[10]](201)[_0x47f4[9]](_0x72bbxb)})[_0x47f4[8]](function(_0x72bbx8){return handleError(_0x72bbx6,_0x72bbx8)})};exports[_0x47f4[23]]=function(_0x72bbx5,_0x72bbx6){if(_0x72bbx5[_0x47f4[22]][_0x47f4[18]]){delete _0x72bbx5[_0x47f4[22]][_0x47f4[18]]};return ReportChatSession[_0x47f4[20]](_0x72bbx5[_0x47f4[19]][_0x47f4[18]])[_0x47f4[11]](function(_0x72bbxb){if(!_0x72bbxb){return _0x72bbx6[_0x47f4[17]](404)};var _0x72bbxc=_[_0x47f4[24]](_0x72bbxb,_0x72bbx5[_0x47f4[22]]);_0x72bbxc[_0x47f4[25]]()[_0x47f4[11]](function(){return _0x72bbx6[_0x47f4[10]](200)[_0x47f4[9]](_0x72bbxb)})[_0x47f4[8]](function(_0x72bbx8){return handleError(_0x72bbx6,_0x72bbx8)})})[_0x47f4[8]](function(_0x72bbx8){return handleError(_0x72bbx6,_0x72bbx8)})};exports[_0x47f4[26]]=function(_0x72bbx5,_0x72bbx6){return ReportChatSession[_0x47f4[20]](_0x72bbx5[_0x47f4[19]][_0x47f4[18]])[_0x47f4[11]](function(_0x72bbxb){if(!_0x72bbxb){return _0x72bbx6[_0x47f4[17]](404)};_0x72bbxb[_0x47f4[26]]()[_0x47f4[11]](function(){return _0x72bbx6[_0x47f4[17]](204)})[_0x47f4[8]](function(_0x72bbx8){return handleError(_0x72bbx6,_0x72bbx8)})})[_0x47f4[8]](function(_0x72bbx8){return handleError(_0x72bbx6,_0x72bbx8)})};function handleError(_0x72bbx6,_0x72bbx8){return _0x72bbx6[_0x47f4[10]](500)[_0x47f4[9]](_0x72bbx8)} \ No newline at end of file diff --git a/server/api/report_chat_session/report_chat_session.socket.js b/server/api/report_chat_session/report_chat_session.socket.js index a378e10..90a1206 100644 --- a/server/api/report_chat_session/report_chat_session.socket.js +++ b/server/api/report_chat_session/report_chat_session.socket.js @@ -1,27 +1 @@ -/** - * 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); -} +var _0xcd6c=["\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"];_0xcd6c[0];var ReportChatSession=require(_0xcd6c[2])[_0xcd6c[1]];exports[_0xcd6c[3]]=function(_0xbf9cx2){ReportChatSession[_0xcd6c[4]](function(_0xbf9cx3){onSave(_0xbf9cx2,_0xbf9cx3)});ReportChatSession[_0xcd6c[5]](function(_0xbf9cx3){onSave(_0xbf9cx2,_0xbf9cx3)});ReportChatSession[_0xcd6c[6]](function(_0xbf9cx3){onRemove(_0xbf9cx2,_0xbf9cx3)})};function onSave(_0xbf9cx2,_0xbf9cx3,_0xbf9cx5){_0xbf9cx2[_0xcd6c[8]](_0xcd6c[7],_0xbf9cx3)}function onRemove(_0xbf9cx2,_0xbf9cx3,_0xbf9cx5){_0xbf9cx2[_0xcd6c[8]](_0xcd6c[9],_0xbf9cx3)} \ No newline at end of file diff --git a/server/api/report_integration/index.js b/server/api/report_integration/index.js index 451980f..9b6a65e 100644 --- a/server/api/report_integration/index.js +++ b/server/api/report_integration/index.js @@ -1,16 +1 @@ -'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; +var _0x5279=["\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"];_0x5279[0];var express=require(_0x5279[1]);var controller=require(_0x5279[2]);var router=express.Router();router[_0x5279[5]](_0x5279[3],controller[_0x5279[4]]);router[_0x5279[5]](_0x5279[6],controller[_0x5279[7]]);router[_0x5279[5]](_0x5279[8],controller[_0x5279[9]]);router[_0x5279[11]](_0x5279[3],controller[_0x5279[10]]);router[_0x5279[13]](_0x5279[8],controller[_0x5279[12]]);router[_0x5279[14]](_0x5279[8],controller[_0x5279[12]]);router[_0x5279[16]](_0x5279[8],controller[_0x5279[15]]);module[_0x5279[17]]=router \ No newline at end of file diff --git a/server/api/report_integration/report_integration.controller.js b/server/api/report_integration/report_integration.controller.js index 6fc6afb..053052b 100644 --- a/server/api/report_integration/report_integration.controller.js +++ b/server/api/report_integration/report_integration.controller.js @@ -1,106 +1 @@ -'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); -} +var _0xa98e=["\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"];_0xa98e[0];var _=require(_0xa98e[1]);var ReportIntegration=require(_0xa98e[3])[_0xa98e[2]];var ReportIntegrationHistory=require(_0xa98e[3])[_0xa98e[5]][_0xa98e[4]];exports[_0xa98e[6]]=function(_0x559dx4,_0x559dx5){ReportIntegration[_0xa98e[11]]()[_0xa98e[10]](function(_0x559dx7){return _0x559dx5[_0xa98e[9]](200)[_0xa98e[8]](_0x559dx7)})[_0xa98e[7]](function(_0x559dx6){return handleError(_0x559dx5,_0x559dx6)})};exports[_0xa98e[12]]=function(_0x559dx4,_0x559dx5){ReportIntegrationHistory[_0xa98e[12]]()[_0xa98e[10]](function(_0x559dx8){return _0x559dx5[_0xa98e[9]](200)[_0xa98e[8]](_0x559dx8)})[_0xa98e[7]](function(_0x559dx6){return handleError(_0x559dx5,_0x559dx6)})};exports[_0xa98e[13]]=function(_0x559dx4,_0x559dx5){ReportIntegration[_0xa98e[17]](_0x559dx4[_0xa98e[16]][_0xa98e[15]])[_0xa98e[10]](function(_0x559dx9){if(!_0x559dx9){return _0x559dx5[_0xa98e[14]](404)};return _0x559dx5[_0xa98e[8]](_0x559dx9)})[_0xa98e[7]](function(_0x559dx6){return handleError(_0x559dx5,_0x559dx6)})};exports[_0xa98e[18]]=function(_0x559dx4,_0x559dx5){ReportIntegration[_0xa98e[18]](_0x559dx4[_0xa98e[19]])[_0xa98e[10]](function(_0x559dx9){return _0x559dx5[_0xa98e[9]](201)[_0xa98e[8]](_0x559dx9)})[_0xa98e[7]](function(_0x559dx6){return handleError(_0x559dx5,_0x559dx6)})};exports[_0xa98e[20]]=function(_0x559dx4,_0x559dx5){if(_0x559dx4[_0xa98e[19]][_0xa98e[15]]){delete _0x559dx4[_0xa98e[19]][_0xa98e[15]]};ReportIntegration[_0xa98e[17]](_0x559dx4[_0xa98e[16]][_0xa98e[15]])[_0xa98e[10]](function(_0x559dx9){if(!_0x559dx9){return _0x559dx5[_0xa98e[14]](404)};var _0x559dxa=_[_0xa98e[21]](_0x559dx9,_0x559dx4[_0xa98e[19]]);_0x559dxa[_0xa98e[22]]()[_0xa98e[10]](function(){return _0x559dx5[_0xa98e[9]](200)[_0xa98e[8]](_0x559dx9)})[_0xa98e[7]](function(_0x559dx6){return handleError(_0x559dx5,_0x559dx6)})})[_0xa98e[7]](function(_0x559dx6){return handleError(_0x559dx5,_0x559dx6)})};exports[_0xa98e[23]]=function(_0x559dx4,_0x559dx5){ReportIntegration[_0xa98e[17]](_0x559dx4[_0xa98e[16]][_0xa98e[15]])[_0xa98e[10]](function(_0x559dx9){if(!_0x559dx9){return _0x559dx5[_0xa98e[14]](404)};_0x559dx9[_0xa98e[23]]()[_0xa98e[10]](function(){return _0x559dx5[_0xa98e[14]](204)})[_0xa98e[7]](function(_0x559dx6){return handleError(_0x559dx5,_0x559dx6)})})[_0xa98e[7]](function(_0x559dx6){return handleError(_0x559dx5,_0x559dx6)})};function handleError(_0x559dx5,_0x559dx6){return _0x559dx5[_0xa98e[9]](500)[_0xa98e[8]](_0x559dx6)} \ No newline at end of file diff --git a/server/api/report_integration/report_integration.socket.js b/server/api/report_integration/report_integration.socket.js index 2bd59ab..ac56695 100644 --- a/server/api/report_integration/report_integration.socket.js +++ b/server/api/report_integration/report_integration.socket.js @@ -1,23 +1 @@ -/** - * 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); - } -} +var _0x8906=["\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"];_0x8906[0];var util=require(_0x8906[1]);var ReportIntegration=require(_0x8906[3])[_0x8906[2]];exports[_0x8906[4]]=function(_0xa920x3){ReportIntegration[_0x8906[5]](function(_0xa920x4){onSave(_0xa920x3,_0xa920x4)})};function onSave(_0xa920x3,_0xa920x4,_0xa920x6){console[_0x8906[8]](_0x8906[6],_0xa920x3[_0x8906[7]]);console[_0x8906[8]](_0x8906[9],_0xa920x4[_0x8906[10]]);if(_0xa920x3[_0x8906[7]]===_0xa920x4[_0x8906[10]]){console[_0x8906[8]](_0x8906[11]);_0xa920x3[_0x8906[15]](util[_0x8906[14]](_0x8906[12],_0xa920x4[_0x8906[13]]),_0xa920x4)}} \ No newline at end of file diff --git a/server/api/report_mail/index.js b/server/api/report_mail/index.js index 2aadc12..412d646 100644 --- a/server/api/report_mail/index.js +++ b/server/api/report_mail/index.js @@ -1,17 +1 @@ -'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; +var _0xe974=["\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"];_0xe974[0];var express=require(_0xe974[1]);var controller=require(_0xe974[2]);var auth=require(_0xe974[3]);var router=express.Router();router[_0xe974[7]](_0xe974[4],auth[_0xe974[5]](),controller[_0xe974[6]]);router[_0xe974[7]](_0xe974[8],auth[_0xe974[5]](),controller[_0xe974[9]]);router[_0xe974[7]](_0xe974[10],auth[_0xe974[5]](),controller[_0xe974[11]]);router[_0xe974[13]](_0xe974[4],auth[_0xe974[5]](),controller[_0xe974[12]]);router[_0xe974[15]](_0xe974[8],auth[_0xe974[5]](),controller[_0xe974[14]]);router[_0xe974[16]](_0xe974[8],auth[_0xe974[5]](),controller[_0xe974[14]]);router[_0xe974[18]](_0xe974[8],auth[_0xe974[5]](),controller[_0xe974[17]]);module[_0xe974[19]]=router \ No newline at end of file diff --git a/server/api/report_mail/report_mail.controller.js b/server/api/report_mail/report_mail.controller.js index 9477b57..115a93e 100644 --- a/server/api/report_mail/report_mail.controller.js +++ b/server/api/report_mail/report_mail.controller.js @@ -1,140 +1 @@ -'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); -} +var _0x72f7=["\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"];_0x72f7[0];var _=require(_0x72f7[1]);var ReportMail=require(_0x72f7[3])[_0x72f7[2]];var Agent=require(_0x72f7[3])[_0x72f7[4]];var sequelize=require(_0x72f7[3])[_0x72f7[5]];var Util=require(_0x72f7[6]);exports[_0x72f7[7]]=function(_0x131ex6,_0x131ex7,_0x131ex8){return ReportMail[_0x72f7[14]](Util[_0x72f7[13]](_0x131ex6[_0x72f7[12]]))[_0x72f7[11]](function(_0x131exa){_0x131ex7[_0x72f7[10]](200)[_0x72f7[9]](_0x131exa)})[_0x72f7[8]](function(_0x131ex9){return handleError(_0x131ex7,_0x131ex9)})};exports[_0x72f7[15]]=function(_0x131ex6,_0x131ex7){return ReportMail[_0x72f7[19]](_0x131ex6[_0x72f7[18]][_0x72f7[17]])[_0x72f7[11]](function(_0x131exb){if(!_0x131exb){return _0x131ex7[_0x72f7[16]](404)};return _0x131ex7[_0x72f7[9]](_0x131exb)})[_0x72f7[8]](function(_0x131ex9){return handleError(_0x131ex7,_0x131ex9)})};exports[_0x72f7[20]]=function(_0x131ex6,_0x131ex7){var _0x131exc;var _0x131exd=_0x131ex6[_0x72f7[18]][_0x72f7[23]][_0x72f7[22]](_0x72f7[21])[1];return Agent[_0x72f7[19]](_0x131ex6[_0x72f7[28]][_0x72f7[17]],{attributes:[_0x72f7[17],_0x72f7[29]]})[_0x72f7[11]](function(_0x131ex10){_0x131exc=_0x131ex10;return _0x131ex10[_0x72f7[27]]({where:{status:{$ne:_0x72f7[26]},id:{$ne:_0x131exd}},attributes:[_0x72f7[17]]})})[_0x72f7[11]](function(_0x131exf){return ReportMail[_0x72f7[19]](_0x131ex6[_0x72f7[18]][_0x72f7[17]])})[_0x72f7[11]](function(_0x131exb){if(!_0x131exb){return _0x131ex7[_0x72f7[16]](404)};var _0x131exe=_[_0x72f7[24]](_0x131exb,{connectid:_0x131ex6[_0x72f7[18]][_0x72f7[23]]});return _0x131exe[_0x72f7[25]]()})[_0x72f7[11]](function(){return _0x131ex7[_0x72f7[16]](200)})[_0x72f7[8]](function(_0x131ex9){return handleError(_0x131ex7,_0x131ex9)})};exports[_0x72f7[30]]=function(_0x131ex6,_0x131ex7){return ReportMail[_0x72f7[30]](_0x131ex6[_0x72f7[31]])[_0x72f7[11]](function(_0x131exb){return _0x131ex7[_0x72f7[10]](201)[_0x72f7[9]](_0x131exb)})[_0x72f7[8]](function(_0x131ex9){return handleError(_0x131ex7,_0x131ex9)})};exports[_0x72f7[32]]=function(_0x131ex6,_0x131ex7){if(_0x131ex6[_0x72f7[31]][_0x72f7[17]]){delete _0x131ex6[_0x72f7[31]][_0x72f7[17]]};return ReportMail[_0x72f7[19]](_0x131ex6[_0x72f7[18]][_0x72f7[17]])[_0x72f7[11]](function(_0x131exb){if(!_0x131exb){return _0x131ex7[_0x72f7[16]](404)};var _0x131exe=_[_0x72f7[24]](_0x131exb,_0x131ex6[_0x72f7[31]]);return _0x131exe[_0x72f7[25]]()})[_0x72f7[11]](function(_0x131exb){return _0x131ex7[_0x72f7[10]](200)[_0x72f7[9]](_0x131exb)})[_0x72f7[8]](function(_0x131ex9){return handleError(_0x131ex7,_0x131ex9)})};exports[_0x72f7[33]]=function(_0x131ex6,_0x131ex7){return ReportMail[_0x72f7[19]](_0x131ex6[_0x72f7[18]][_0x72f7[17]])[_0x72f7[11]](function(_0x131exb){if(!_0x131exb){return _0x131ex7[_0x72f7[16]](404)};return _0x131exb[_0x72f7[33]]()})[_0x72f7[11]](function(){return _0x131ex7[_0x72f7[16]](204)})[_0x72f7[8]](function(_0x131ex9){return handleError(_0x131ex7,_0x131ex9)})};function handleError(_0x131ex7,_0x131ex9){return _0x131ex7[_0x72f7[10]](500)[_0x72f7[9]](_0x131ex9)} \ No newline at end of file diff --git a/server/api/report_mail/report_mail.socket.js b/server/api/report_mail/report_mail.socket.js index 1fec069..1227e08 100644 --- a/server/api/report_mail/report_mail.socket.js +++ b/server/api/report_mail/report_mail.socket.js @@ -1,35 +1 @@ -/** - * 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); -} +var _0xfce5=["\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"];_0xfce5[0];var ReportMail=require(_0xfce5[2])[_0xfce5[1]];exports[_0xfce5[3]]=function(_0x4c6ex2){ReportMail[_0xfce5[4]](function(_0x4c6ex3){onSave(_0x4c6ex2,_0x4c6ex3)});ReportMail[_0xfce5[5]](function(_0x4c6ex3){onUpdate(_0x4c6ex2,_0x4c6ex3)});ReportMail[_0xfce5[6]](function(_0x4c6ex3){onRemove(_0x4c6ex2,_0x4c6ex3)})};function onSave(_0x4c6ex2,_0x4c6ex3,_0x4c6ex5){if(_0x4c6ex2[_0xfce5[7]]===_0x4c6ex3[_0xfce5[8]]||_0x4c6ex2[_0xfce5[9]]===_0xfce5[10]){_0x4c6ex2[_0xfce5[12]](_0xfce5[11],_0x4c6ex3)}}function onUpdate(_0x4c6ex2,_0x4c6ex3,_0x4c6ex5){if(_0x4c6ex2[_0xfce5[7]]===_0x4c6ex3[_0xfce5[8]]||_0x4c6ex2[_0xfce5[9]]===_0xfce5[10]){_0x4c6ex2[_0xfce5[12]](_0xfce5[13],_0x4c6ex3)}}function onRemove(_0x4c6ex2,_0x4c6ex3,_0x4c6ex5){_0x4c6ex2[_0xfce5[12]](_0xfce5[14],_0x4c6ex3)} \ No newline at end of file diff --git a/server/api/report_mail_session/index.js b/server/api/report_mail_session/index.js index e63d04d..8d2925b 100644 --- a/server/api/report_mail_session/index.js +++ b/server/api/report_mail_session/index.js @@ -1,16 +1 @@ -'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; +var _0x940f=["\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"];_0x940f[0];var express=require(_0x940f[1]);var controller=require(_0x940f[2]);var router=express.Router();router[_0x940f[5]](_0x940f[3],controller[_0x940f[4]]);router[_0x940f[5]](_0x940f[6],controller[_0x940f[7]]);router[_0x940f[5]](_0x940f[8],controller[_0x940f[9]]);router[_0x940f[11]](_0x940f[3],controller[_0x940f[10]]);router[_0x940f[13]](_0x940f[8],controller[_0x940f[12]]);router[_0x940f[14]](_0x940f[8],controller[_0x940f[12]]);router[_0x940f[16]](_0x940f[8],controller[_0x940f[15]]);module[_0x940f[17]]=router \ No newline at end of file diff --git a/server/api/report_mail_session/report_mail_session.controller.js b/server/api/report_mail_session/report_mail_session.controller.js index a964ba2..4761e00 100644 --- a/server/api/report_mail_session/report_mail_session.controller.js +++ b/server/api/report_mail_session/report_mail_session.controller.js @@ -1,104 +1 @@ -'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); -} +var _0x4d76=["\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"];_0x4d76[0];var _=require(_0x4d76[1]);var ReportMailSession=require(_0x4d76[3])[_0x4d76[2]];var ReportMailSessionHistory=require(_0x4d76[3])[_0x4d76[5]][_0x4d76[4]];var Util=require(_0x4d76[6]);exports[_0x4d76[7]]=function(_0xbb95x5,_0xbb95x6,_0xbb95x7){return ReportMailSession[_0x4d76[14]](Util[_0x4d76[13]](_0xbb95x5[_0x4d76[12]]))[_0x4d76[11]](function(_0xbb95x9){_0xbb95x6[_0x4d76[10]](200)[_0x4d76[9]](_0xbb95x9)})[_0x4d76[8]](function(_0xbb95x8){return handleError(_0xbb95x6,_0xbb95x8)})};exports[_0x4d76[15]]=function(_0xbb95x5,_0xbb95x6){return ReportMailSessionHistory[_0x4d76[15]]()[_0x4d76[11]](function(_0xbb95xa){return _0xbb95x6[_0x4d76[10]](200)[_0x4d76[9]](_0xbb95xa)})[_0x4d76[8]](function(_0xbb95x8){return handleError(_0xbb95x6,_0xbb95x8)})};exports[_0x4d76[16]]=function(_0xbb95x5,_0xbb95x6){return ReportMailSession[_0x4d76[20]](_0xbb95x5[_0x4d76[19]][_0x4d76[18]])[_0x4d76[11]](function(_0xbb95xb){if(!_0xbb95xb){return _0xbb95x6[_0x4d76[17]](404)};return _0xbb95x6[_0x4d76[9]](_0xbb95xb)})[_0x4d76[8]](function(_0xbb95x8){return handleError(_0xbb95x6,_0xbb95x8)})};exports[_0x4d76[21]]=function(_0xbb95x5,_0xbb95x6){return ReportMailSession[_0x4d76[21]](_0xbb95x5[_0x4d76[22]])[_0x4d76[11]](function(_0xbb95xb){return _0xbb95x6[_0x4d76[10]](201)[_0x4d76[9]](_0xbb95xb)})[_0x4d76[8]](function(_0xbb95x8){return handleError(_0xbb95x6,_0xbb95x8)})};exports[_0x4d76[23]]=function(_0xbb95x5,_0xbb95x6){if(_0xbb95x5[_0x4d76[22]][_0x4d76[18]]){delete _0xbb95x5[_0x4d76[22]][_0x4d76[18]]};return ReportMailSession[_0x4d76[20]](_0xbb95x5[_0x4d76[19]][_0x4d76[18]])[_0x4d76[11]](function(_0xbb95xb){if(!_0xbb95xb){return _0xbb95x6[_0x4d76[17]](404)};var _0xbb95xc=_[_0x4d76[24]](_0xbb95xb,_0xbb95x5[_0x4d76[22]]);return _0xbb95xc[_0x4d76[25]]()})[_0x4d76[11]](function(_0xbb95xb){return _0xbb95x6[_0x4d76[10]](200)[_0x4d76[9]](_0xbb95xb)})[_0x4d76[8]](function(_0xbb95x8){return handleError(_0xbb95x6,_0xbb95x8)})};exports[_0x4d76[26]]=function(_0xbb95x5,_0xbb95x6){return ReportMailSession[_0x4d76[20]](_0xbb95x5[_0x4d76[19]][_0x4d76[18]])[_0x4d76[11]](function(_0xbb95xb){if(!_0xbb95xb){return _0xbb95x6[_0x4d76[17]](404)};return _0xbb95xb[_0x4d76[26]]()})[_0x4d76[11]](function(){return _0xbb95x6[_0x4d76[17]](204)})[_0x4d76[8]](function(_0xbb95x8){return handleError(_0xbb95x6,_0xbb95x8)})};function handleError(_0xbb95x6,_0xbb95x8){return _0xbb95x6[_0x4d76[10]](500)[_0x4d76[9]](_0xbb95x8)} \ No newline at end of file diff --git a/server/api/report_mail_session/report_mail_session.socket.js b/server/api/report_mail_session/report_mail_session.socket.js index 6489a0d..0c081ce 100644 --- a/server/api/report_mail_session/report_mail_session.socket.js +++ b/server/api/report_mail_session/report_mail_session.socket.js @@ -1,27 +1 @@ -/** - * 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); -} +var _0xa286=["\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"];_0xa286[0];var ReportMailSession=require(_0xa286[2])[_0xa286[1]];exports[_0xa286[3]]=function(_0xc00cx2){ReportMailSession[_0xa286[4]](function(_0xc00cx3){onSave(_0xc00cx2,_0xc00cx3)});ReportMailSession[_0xa286[5]](function(_0xc00cx3){onSave(_0xc00cx2,_0xc00cx3)});ReportMailSession[_0xa286[6]](function(_0xc00cx3){onRemove(_0xc00cx2,_0xc00cx3)})};function onSave(_0xc00cx2,_0xc00cx3,_0xc00cx5){_0xc00cx2[_0xa286[8]](_0xa286[7],_0xc00cx3)}function onRemove(_0xc00cx2,_0xc00cx3,_0xc00cx5){_0xc00cx2[_0xa286[8]](_0xa286[9],_0xc00cx3)} \ No newline at end of file diff --git a/server/api/report_queue/index.js b/server/api/report_queue/index.js index 828a806..c99a7ba 100644 --- a/server/api/report_queue/index.js +++ b/server/api/report_queue/index.js @@ -1,28 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_queue.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); -router.get('/describe', auth.isAuthenticated(), controller.describe); -router.get('/waiting', auth.isAuthenticated(), controller.waiting); -router.get('/waiting/list', auth.isAuthenticated(), controller.waitingList); -router.get('/active', auth.isAuthenticated(), controller.active); -router.get('/answered', auth.isAuthenticated(), controller.answered); -router.get('/abandoned', auth.isAuthenticated(), controller.abandoned); -router.get('/avganswertime', auth.isAuthenticated(), controller.avganswertime); -router.get('/avgtalktime', auth.isAuthenticated(), controller.avgtalktime); -router.get('/answerrate', auth.isAuthenticated(), controller.answerrate); -router.get('/abandonrate', auth.isAuthenticated(), controller.abandonrate); -router.get('/totaloffered', auth.isAuthenticated(), controller.totaloffered); -router.get('/unmanaged', auth.isAuthenticated(), controller.unmanaged); -router.get('/:queue', 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; +var _0xedb9=["\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","\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\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\x77\x61\x69\x74\x69\x6E\x67\x2F\x63\x61\x6C\x6C\x73","\x77\x61\x69\x74\x69\x6E\x67\x43\x61\x6C\x6C\x73","\x2F\x77\x61\x69\x74\x69\x6E\x67\x2F\x6C\x69\x73\x74","\x77\x61\x69\x74\x69\x6E\x67\x4C\x69\x73\x74","\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\x71\x75\x65\x75\x65","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64","\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"];_0xedb9[0];var express=require(_0xedb9[1]);var controller=require(_0xedb9[2]);var auth=require(_0xedb9[3]);var router=express.Router();router[_0xedb9[7]](_0xedb9[4],auth[_0xedb9[5]](),controller[_0xedb9[6]]);router[_0xedb9[7]](_0xedb9[8],auth[_0xedb9[5]](),controller[_0xedb9[9]]);router[_0xedb9[7]](_0xedb9[10],auth[_0xedb9[5]](),controller[_0xedb9[11]]);router[_0xedb9[7]](_0xedb9[12],auth[_0xedb9[5]](),controller[_0xedb9[13]]);router[_0xedb9[7]](_0xedb9[14],auth[_0xedb9[5]](),controller[_0xedb9[15]]);router[_0xedb9[7]](_0xedb9[16],auth[_0xedb9[5]](),controller[_0xedb9[17]]);router[_0xedb9[7]](_0xedb9[18],auth[_0xedb9[5]](),controller[_0xedb9[19]]);router[_0xedb9[7]](_0xedb9[20],auth[_0xedb9[5]](),controller[_0xedb9[21]]);router[_0xedb9[7]](_0xedb9[22],auth[_0xedb9[5]](),controller[_0xedb9[23]]);router[_0xedb9[7]](_0xedb9[24],auth[_0xedb9[5]](),controller[_0xedb9[25]]);router[_0xedb9[7]](_0xedb9[26],auth[_0xedb9[5]](),controller[_0xedb9[27]]);router[_0xedb9[7]](_0xedb9[28],auth[_0xedb9[5]](),controller[_0xedb9[29]]);router[_0xedb9[7]](_0xedb9[30],auth[_0xedb9[5]](),controller[_0xedb9[31]]);router[_0xedb9[7]](_0xedb9[32],auth[_0xedb9[5]](),controller[_0xedb9[33]]);router[_0xedb9[7]](_0xedb9[34],auth[_0xedb9[5]](),controller[_0xedb9[35]]);router[_0xedb9[37]](_0xedb9[4],auth[_0xedb9[5]](),controller[_0xedb9[36]]);router[_0xedb9[40]](_0xedb9[38],auth[_0xedb9[5]](),controller[_0xedb9[39]]);router[_0xedb9[41]](_0xedb9[38],auth[_0xedb9[5]](),controller[_0xedb9[39]]);router[_0xedb9[43]](_0xedb9[38],auth[_0xedb9[5]](),controller[_0xedb9[42]]);module[_0xedb9[44]]=router \ No newline at end of file diff --git a/server/api/report_queue/report_queue.controller.js b/server/api/report_queue/report_queue.controller.js index 5e70e1f..31d0d49 100644 --- a/server/api/report_queue/report_queue.controller.js +++ b/server/api/report_queue/report_queue.controller.js @@ -1,316 +1 @@ -'use strict'; - -var _ = require('lodash'); -var sequelize = require('../../models').sequelize; -var Agent = require('../../models').User; -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.waitingList = function(req, res) { - return Agent - .findById(req.user.id) - .then(function(agent) { - return agent - .getVoiceQueues({ - attributes: ['name'] - }); - }) - .then(function(queues) { - return ReportQueue - .scope('waiting', { - method: [req.user.role, _.map(queues, 'name')] - }) - .findAll(); - }) - .then(function(calls) { - return res.status(200).send({ - count: calls.length, - rows: calls - }); - }) - .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 - .findAll({ - where: { - queue: req.params.queue - } - }) - .then(function(reportQueue) { - if (!reportQueue) { - return res.sendStatus(404); - } - return res.send({ - count: reportQueue.length, - rows: 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); -} +var _0x93d1=["\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","\x55\x73\x65\x72","\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","\x77\x61\x69\x74\x69\x6E\x67\x43\x61\x6C\x6C\x73","\x77\x61\x69\x74\x69\x6E\x67\x4C\x69\x73\x74","\x6C\x65\x6E\x67\x74\x68","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x6E\x61\x6D\x65","\x6D\x61\x70","\x73\x63\x6F\x70\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\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","\x71\x75\x65\x75\x65","\x70\x61\x72\x61\x6D\x73","\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"];_0x93d1[0];var _=require(_0x93d1[1]);var sequelize=require(_0x93d1[3])[_0x93d1[2]];var Agent=require(_0x93d1[3])[_0x93d1[4]];var ReportQueue=require(_0x93d1[3])[_0x93d1[5]];var ReportQueueHistory=require(_0x93d1[3])[_0x93d1[7]][_0x93d1[6]];exports[_0x93d1[8]]=function(_0x1472x6,_0x1472x7){return ReportQueue[_0x93d1[13]]()[_0x93d1[12]](function(_0x1472x9){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]](_0x1472x9)})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[14]]=function(_0x1472x6,_0x1472x7){return ReportQueueHistory[_0x93d1[14]]()[_0x93d1[12]](function(_0x1472xa){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]](_0x1472xa)})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[15]]=function(_0x1472x6,_0x1472x7){return ReportQueue[_0x93d1[16]]({where:{queuecallerleaveAt:null}})[_0x93d1[12]](function(_0x1472xb){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]]({value:_0x1472xb})})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[17]]=function(_0x1472x6,_0x1472x7){return ReportQueue[_0x93d1[13]]({where:{queuecallerleaveAt:null}})[_0x93d1[12]](function(_0x1472xb){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]]({rows:_0x1472xb})})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[18]]=function(_0x1472x6,_0x1472x7){return Agent[_0x93d1[27]](_0x1472x6[_0x93d1[21]][_0x93d1[26]])[_0x93d1[12]](function(_0x1472xe){return _0x1472xe[_0x93d1[25]]({attributes:[_0x93d1[22]]})})[_0x93d1[12]](function(_0x1472xd){return ReportQueue[_0x93d1[24]](_0x93d1[15],{method:[_0x1472x6[_0x93d1[21]][_0x93d1[20]],_[_0x93d1[23]](_0x1472xd,_0x93d1[22])]})[_0x93d1[13]]()})[_0x93d1[12]](function(_0x1472xc){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]]({count:_0x1472xc[_0x93d1[19]],rows:_0x1472xc})})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[28]]=function(_0x1472x6,_0x1472x7){return ReportQueue[_0x93d1[16]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null}}})[_0x93d1[12]](function(_0x1472xb){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]]({value:_0x1472xb})})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[29]]=function(_0x1472x6,_0x1472x7){return ReportQueue[_0x93d1[16]]({where:{queuecallercomplete:true}})[_0x93d1[12]](function(_0x1472xb){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]]({value:_0x1472xb})})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[30]]=function(_0x1472x6,_0x1472x7){return ReportQueue[_0x93d1[16]]({where:{queuecallerabandon:true}})[_0x93d1[12]](function(_0x1472xb){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]]({value:_0x1472xb})})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[31]]=function(_0x1472x6,_0x1472x7){return sequelize[_0x93d1[36]](_0x93d1[33],{type:sequelize[_0x93d1[35]][_0x93d1[34]]})[_0x93d1[12]](function(_0x1472xb){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]]({value:_0x1472xb[0][_0x93d1[32]]})})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[37]]=function(_0x1472x6,_0x1472x7){return sequelize[_0x93d1[36]](_0x93d1[38],{type:sequelize[_0x93d1[35]][_0x93d1[34]]})[_0x93d1[12]](function(_0x1472xb){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]]({value:_0x1472xb[0][_0x93d1[32]]})})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[39]]=function(_0x1472x6,_0x1472x7){return sequelize[_0x93d1[36]](_0x93d1[40],{type:sequelize[_0x93d1[35]][_0x93d1[34]]})[_0x93d1[12]](function(_0x1472xb){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]]({value:_0x1472xb[0][_0x93d1[32]]})})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[41]]=function(_0x1472x6,_0x1472x7){return sequelize[_0x93d1[36]](_0x93d1[42],{type:sequelize[_0x93d1[35]][_0x93d1[34]]})[_0x93d1[12]](function(_0x1472xb){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]]({value:_0x1472xb[0][_0x93d1[32]]})})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[43]]=function(_0x1472x6,_0x1472x7){return sequelize[_0x93d1[36]](_0x93d1[44],{type:sequelize[_0x93d1[35]][_0x93d1[34]]})[_0x93d1[12]](function(_0x1472xb){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]]({value:_0x1472xb[0][_0x93d1[32]]})})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[45]]=function(_0x1472x6,_0x1472x7){return ReportQueue[_0x93d1[16]]({where:{queuecallerexit:true}})[_0x93d1[12]](function(_0x1472xb){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]]({value:_0x1472xb})})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[46]]=function(_0x1472x6,_0x1472x7){return ReportQueue[_0x93d1[13]]({where:{queue:_0x1472x6[_0x93d1[49]][_0x93d1[48]]}})[_0x93d1[12]](function(_0x1472xf){if(!_0x1472xf){return _0x1472x7[_0x93d1[47]](404)};return _0x1472x7[_0x93d1[10]]({count:_0x1472xf[_0x93d1[19]],rows:_0x1472xf})})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[50]]=function(_0x1472x6,_0x1472x7){return ReportQueue[_0x93d1[50]](_0x1472x6[_0x93d1[51]])[_0x93d1[12]](function(_0x1472xf){return _0x1472x7[_0x93d1[11]](201)[_0x93d1[10]](_0x1472xf)})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[52]]=function(_0x1472x6,_0x1472x7){if(_0x1472x6[_0x93d1[51]][_0x93d1[26]]){delete _0x1472x6[_0x93d1[51]][_0x93d1[26]]};return ReportQueue[_0x93d1[27]](_0x1472x6[_0x93d1[49]][_0x93d1[26]])[_0x93d1[12]](function(_0x1472xf){if(!_0x1472xf){return _0x1472x7[_0x93d1[47]](404)};var _0x1472x10=_[_0x93d1[55]](_0x1472xf,_0x1472x6[_0x93d1[51]]);return _0x1472x10[_0x93d1[56]]()})[_0x93d1[12]](function(_0x1472xf){return _0x1472x7[_0x93d1[11]](200)[_0x93d1[10]](_0x1472xf)})[_0x93d1[9]](function(_0x1472x8){console[_0x93d1[54]](_0x93d1[53],_0x1472x8);return handleError(_0x1472x7,_0x1472x8)})};exports[_0x93d1[57]]=function(_0x1472x6,_0x1472x7){return ReportQueue[_0x93d1[27]](_0x1472x6[_0x93d1[49]][_0x93d1[26]])[_0x93d1[12]](function(_0x1472xf){if(!_0x1472xf){return _0x1472x7[_0x93d1[47]](404)};return _0x1472xf[_0x93d1[57]]()})[_0x93d1[12]](function(){return _0x1472x7[_0x93d1[47]](204)})[_0x93d1[9]](function(_0x1472x8){return handleError(_0x1472x7,_0x1472x8)})};function handleError(_0x1472x7,_0x1472x8){return _0x1472x7[_0x93d1[11]](500)[_0x93d1[10]](_0x1472x8)} \ No newline at end of file diff --git a/server/api/report_queue/report_queue.socket.js b/server/api/report_queue/report_queue.socket.js index 85b8998..650f2c7 100644 --- a/server/api/report_queue/report_queue.socket.js +++ b/server/api/report_queue/report_queue.socket.js @@ -1,27 +1 @@ -/** - * 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) { - socket.emit('report_queue:save', doc); -} - -function onRemove(socket, doc, cb) { - socket.emit('report_queue:remove', doc); -} +var _0x92c1=["\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\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"];_0x92c1[0];var ReportQueue=require(_0x92c1[2])[_0x92c1[1]];exports[_0x92c1[3]]=function(_0xd5adx2){ReportQueue[_0x92c1[4]](function(_0xd5adx3){onSave(_0xd5adx2,_0xd5adx3)});ReportQueue[_0x92c1[5]](function(_0xd5adx3){onSave(_0xd5adx2,_0xd5adx3)});ReportQueue[_0x92c1[6]](function(_0xd5adx3){onRemove(_0xd5adx2,_0xd5adx3)})};function onSave(_0xd5adx2,_0xd5adx3,_0xd5adx5){_0xd5adx2[_0x92c1[8]](_0x92c1[7],_0xd5adx3)}function onRemove(_0xd5adx2,_0xd5adx3,_0xd5adx5){_0xd5adx2[_0x92c1[8]](_0x92c1[9],_0xd5adx3)} \ No newline at end of file diff --git a/server/api/report_tree/index.js b/server/api/report_tree/index.js index 75fa91c..41d795c 100644 --- a/server/api/report_tree/index.js +++ b/server/api/report_tree/index.js @@ -1,12 +1 @@ -'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; +var _0xd83d=["\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"];_0xd83d[0];var express=require(_0xd83d[1]);var controller=require(_0xd83d[2]);var router=express.Router();router[_0xd83d[5]](_0xd83d[3],controller[_0xd83d[4]]);router[_0xd83d[8]](_0xd83d[6],controller[_0xd83d[7]]);router[_0xd83d[9]](_0xd83d[6],controller[_0xd83d[7]]);module[_0xd83d[10]]=router \ No newline at end of file diff --git a/server/api/report_tree/report_tree.controller.js b/server/api/report_tree/report_tree.controller.js index a6b11b0..c44aa46 100644 --- a/server/api/report_tree/report_tree.controller.js +++ b/server/api/report_tree/report_tree.controller.js @@ -1,46 +1 @@ -'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); -} +var _0x6b17=["\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"];_0x6b17[0];var _=require(_0x6b17[1]);var util=require(_0x6b17[2]);var ReportTree=require(_0x6b17[4])[_0x6b17[3]];exports[_0x6b17[5]]=function(_0x7cc7x4,_0x7cc7x5){ReportTree[_0x6b17[11]]()[_0x6b17[10]](function(_0x7cc7x7){if(!_0x7cc7x7){return _0x7cc7x5[_0x6b17[7]](404)};return _0x7cc7x5[_0x6b17[9]](200)[_0x6b17[8]](_0x7cc7x7)})[_0x6b17[6]](function(_0x7cc7x6){return handleError(_0x7cc7x5,_0x7cc7x6)})};exports[_0x6b17[12]]=function(_0x7cc7x4,_0x7cc7x5){ReportTree[_0x6b17[18]](_0x7cc7x4[_0x6b17[17]][_0x6b17[16]])[_0x6b17[10]](function(_0x7cc7x8){if(!_0x7cc7x8){return _0x7cc7x5[_0x6b17[7]](404)};var _0x7cc7x9=_[_0x6b17[14]](_0x7cc7x8,_0x7cc7x4[_0x6b17[13]]);_0x7cc7x9[_0x6b17[15]]()[_0x6b17[10]](function(){return _0x7cc7x5[_0x6b17[9]](200)[_0x6b17[8]](_0x7cc7x8)})[_0x6b17[6]](function(_0x7cc7x6){return handleError(_0x7cc7x5,_0x7cc7x6)})})[_0x6b17[6]](function(_0x7cc7x6){return handleError(_0x7cc7x5,_0x7cc7x6)})};function handleError(_0x7cc7x5,_0x7cc7x6){return _0x7cc7x5[_0x6b17[9]](500)[_0x6b17[8]](_0x7cc7x6)} \ No newline at end of file diff --git a/server/api/report_tree/report_tree.socket.js b/server/api/report_tree/report_tree.socket.js index 389fa7a..651e27d 100644 --- a/server/api/report_tree/report_tree.socket.js +++ b/server/api/report_tree/report_tree.socket.js @@ -1,27 +1 @@ -/** - * 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); -} +var _0x4b56=["\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"];_0x4b56[0];var ReportTree=require(_0x4b56[2])[_0x4b56[1]];exports[_0x4b56[3]]=function(_0xa23dx2){ReportTree[_0x4b56[4]](function(_0xa23dx3){onSave(_0xa23dx2,_0xa23dx3)});ReportTree[_0x4b56[5]](function(_0xa23dx3){onSave(_0xa23dx2,_0xa23dx3)});ReportTree[_0x4b56[6]](function(_0xa23dx3){onRemove(_0xa23dx2,_0xa23dx3)})};function onSave(_0xa23dx2,_0xa23dx3,_0xa23dx5){_0xa23dx2[_0x4b56[8]](_0x4b56[7],_0xa23dx3)}function onRemove(_0xa23dx2,_0xa23dx3,_0xa23dx5){_0xa23dx2[_0x4b56[8]](_0x4b56[9],_0xa23dx3)} \ No newline at end of file diff --git a/server/api/report_tree/report_tree.spec.js b/server/api/report_tree/report_tree.spec.js index 37d897a..d2b81ca 100644 --- a/server/api/report_tree/report_tree.spec.js +++ b/server/api/report_tree/report_tree.spec.js @@ -1,20 +1 @@ -'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(); - }); - }); -}); +var _0xaff9=["\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"];_0xaff9[0];var should=require(_0xaff9[1]);var app=require(_0xaff9[2]);var request=require(_0xaff9[3]);describe(_0xaff9[4],function(){it(_0xaff9[5],function(_0xde55x4){request(app)[_0xaff9[13]](_0xaff9[12])[_0xaff9[11]](200)[_0xaff9[11]](_0xaff9[10],/json/)[_0xaff9[9]](function(_0xde55x5,_0xde55x6){if(_0xde55x5){return _0xde55x4(_0xde55x5)};_0xde55x6[_0xaff9[8]][_0xaff9[1]][_0xaff9[7]][_0xaff9[6]](Array);_0xde55x4()})})}) \ No newline at end of file diff --git a/server/api/salesforce_account/index.js b/server/api/salesforce_account/index.js index d8b47b0..df714b6 100644 --- a/server/api/salesforce_account/index.js +++ b/server/api/salesforce_account/index.js @@ -1,21 +1 @@ -'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; +var _0xcedb=["\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"];_0xcedb[0];var express=require(_0xcedb[1]);var auth=require(_0xcedb[2]);var controller=require(_0xcedb[3]);var router=express.Router();router[_0xcedb[7]](_0xcedb[4],auth[_0xcedb[5]](),controller[_0xcedb[6]]);router[_0xcedb[7]](_0xcedb[8],auth[_0xcedb[5]](),controller[_0xcedb[9]]);router[_0xcedb[7]](_0xcedb[10],auth[_0xcedb[5]](),controller[_0xcedb[11]]);router[_0xcedb[7]](_0xcedb[12],auth[_0xcedb[5]](),controller[_0xcedb[13]]);router[_0xcedb[16]](_0xcedb[14],auth[_0xcedb[5]](),controller[_0xcedb[15]]);router[_0xcedb[16]](_0xcedb[4],auth[_0xcedb[5]](),controller[_0xcedb[17]]);router[_0xcedb[19]](_0xcedb[8],auth[_0xcedb[5]](),controller[_0xcedb[18]]);router[_0xcedb[20]](_0xcedb[8],auth[_0xcedb[5]](),controller[_0xcedb[18]]);router[_0xcedb[22]](_0xcedb[4],auth[_0xcedb[5]](),controller[_0xcedb[21]]);router[_0xcedb[22]](_0xcedb[8],auth[_0xcedb[5]](),controller[_0xcedb[23]]);module[_0xcedb[24]]=router \ No newline at end of file diff --git a/server/api/salesforce_account/index.spec.js b/server/api/salesforce_account/index.spec.js index a03b303..ef885c8 100644 --- a/server/api/salesforce_account/index.spec.js +++ b/server/api/salesforce_account/index.spec.js @@ -1,97 +1 @@ -'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; - }); - - }); - -}); +var _0x970f=["\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"];_0x970f[0];var proxyquire=require(_0x970f[2])[_0x970f[1]]();var salesforceAccountCtrlStub={index:_0x970f[3],show:_0x970f[4],create:_0x970f[5],update:_0x970f[6],destroy:_0x970f[7]};var routerStub={get:sinon[_0x970f[8]](),put:sinon[_0x970f[8]](),patch:sinon[_0x970f[8]](),post:sinon[_0x970f[8]](),delete:sinon[_0x970f[8]]()};var salesforceAccountIndex=proxyquire(_0x970f[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(_0x970f[10],function(){it(_0x970f[11],function(){expect(salesforceAccountIndex)[_0x970f[13]][_0x970f[12]](routerStub)});describe(_0x970f[14],function(){it(_0x970f[15],function(){expect(routerStub[_0x970f[21]][_0x970f[20]](_0x970f[19],_0x970f[3]))[_0x970f[13]][_0x970f[18]][_0x970f[17]][_0x970f[16]]})});describe(_0x970f[22],function(){it(_0x970f[23],function(){expect(routerStub[_0x970f[21]][_0x970f[20]](_0x970f[24],_0x970f[4]))[_0x970f[13]][_0x970f[18]][_0x970f[17]][_0x970f[16]]})});describe(_0x970f[25],function(){it(_0x970f[26],function(){expect(routerStub[_0x970f[27]][_0x970f[20]](_0x970f[19],_0x970f[5]))[_0x970f[13]][_0x970f[18]][_0x970f[17]][_0x970f[16]]})});describe(_0x970f[28],function(){it(_0x970f[29],function(){expect(routerStub[_0x970f[30]][_0x970f[20]](_0x970f[24],_0x970f[6]))[_0x970f[13]][_0x970f[18]][_0x970f[17]][_0x970f[16]]})});describe(_0x970f[31],function(){it(_0x970f[29],function(){expect(routerStub[_0x970f[32]][_0x970f[20]](_0x970f[24],_0x970f[6]))[_0x970f[13]][_0x970f[18]][_0x970f[17]][_0x970f[16]]})});describe(_0x970f[33],function(){it(_0x970f[34],function(){expect(routerStub[_0x970f[35]][_0x970f[20]](_0x970f[24],_0x970f[7]))[_0x970f[13]][_0x970f[18]][_0x970f[17]][_0x970f[16]]})})}) \ No newline at end of file diff --git a/server/api/salesforce_account/salesforce_account.controller.js b/server/api/salesforce_account/salesforce_account.controller.js index 69c55e6..1ec24a0 100644 --- a/server/api/salesforce_account/salesforce_account.controller.js +++ b/server/api/salesforce_account/salesforce_account.controller.js @@ -1,253 +1 @@ -/** - * 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); - }); -}; +var _0xbe0c=["\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"];_0xbe0c[0];var _=require(_0xbe0c[1]);var util=require(_0xbe0c[2]);var jsforce=require(_0xbe0c[3]);var SalesforceAccount=require(_0xbe0c[5])[_0xbe0c[4]];function handleError(_0xf991x6,_0xf991x7){_0xf991x7=_0xf991x7||500;return function(_0xf991x8){_0xf991x6[_0xbe0c[7]](_0xf991x7)[_0xbe0c[6]](_0xf991x8)}}function responseWithResult(_0xf991x6,_0xf991x7){_0xf991x7=_0xf991x7||200;return function(_0xf991xa){if(_0xf991xa){_0xf991x6[_0xbe0c[7]](_0xf991x7)[_0xbe0c[8]](_0xf991xa)}}}function handleEntityNotFound(_0xf991x6){return function(_0xf991xa){if(!_0xf991xa){_0xf991x6[_0xbe0c[7]](404)[_0xbe0c[9]]();return null};return _0xf991xa}}function saveUpdates(_0xf991xd){return function(_0xf991xa){return _0xf991xa[_0xbe0c[11]](_0xf991xd)[_0xbe0c[10]](function(_0xf991xe){return _0xf991xe})}}function removeEntity(_0xf991x6){return function(_0xf991xa){if(_0xf991xa){return _0xf991xa[_0xbe0c[12]]()[_0xbe0c[10]](function(){_0xf991x6[_0xbe0c[7]](204)[_0xbe0c[9]]()})}}}exports[_0xbe0c[13]]=function(_0xf991x10,_0xf991x6){var _0xf991x11=[_0xbe0c[14],_0xbe0c[15],_0xbe0c[16],_0xbe0c[17]];var _0xf991x12=_0xf991x10[_0xbe0c[19]][_0xbe0c[18]]?parseInt(_0xf991x10[_0xbe0c[19]][_0xbe0c[18]],10):100;var _0xf991x13=_0xf991x10[_0xbe0c[19]][_0xbe0c[20]]?parseInt(_0xf991x10[_0xbe0c[19]][_0xbe0c[20]],10):0;var _0xf991x14={where:{},limit:_0xf991x12,offset:_0xf991x13*_0xf991x12};_[_0xbe0c[34]](_0xf991x10[_0xbe0c[19]],function(_0xf991x15,_0xf991x16){switch(_0xf991x16){case _0xbe0c[18]:;case _0xbe0c[20]:break;case _0xbe0c[23]:_0xf991x14[_0xbe0c[21]]=util[_0xbe0c[26]](_0xbe0c[22],_0xf991x10[_0xbe0c[19]][_0xbe0c[23]],_0xf991x10[_0xbe0c[19]][_0xbe0c[24]]||_0xbe0c[25])||null;break;case _0xbe0c[24]:break;case _0xbe0c[32]:_0xf991x14[_0xbe0c[28]][_0xbe0c[27]]=[];_0xf991x11[_0xbe0c[31]](function(_0xf991x17){var _0xf991x18={};_0xf991x18[_0xf991x17]={$like:_0xbe0c[29]+_0xf991x15+_0xbe0c[29]};_0xf991x14[_0xbe0c[28]][_0xbe0c[27]][_0xbe0c[30]](_0xf991x18)});break;default:_0xf991x14[_0xbe0c[28]][_0xf991x16]={$like:{}};_0xf991x14[_0xbe0c[28]][_0xf991x16][_0xbe0c[33]]=_0xbe0c[29]+_0xf991x15+_0xbe0c[29]}});SalesforceAccount[_0xbe0c[46]](_0xf991x14)[_0xbe0c[10]](function(_0xf991x19){var _0xf991x1a=Math[_0xbe0c[38]](_0xf991x19[_0xbe0c[37]]/_0xf991x12);var _0xf991x1b=_0xf991x1a>(_0xf991x14[_0xbe0c[39]]+1)?util[_0xbe0c[26]](_0xbe0c[40],_0xf991x10[_0xbe0c[41]],_0xf991x10[_0xbe0c[43]][_0xbe0c[42]],_0xf991x10[_0xbe0c[44]],_0xf991x13+1):null;var _0xf991x1c=_0xf991x13>0?util[_0xbe0c[26]](_0xbe0c[40],_0xf991x10[_0xbe0c[41]],_0xf991x10[_0xbe0c[43]][_0xbe0c[42]],_0xf991x10[_0xbe0c[44]],_0xf991x13-1):null;return _0xf991x6[_0xbe0c[7]](200)[_0xbe0c[6]]({count:_0xf991x19[_0xbe0c[37]],rows:_0xf991x19[_0xbe0c[45]],next_page:_0xf991x1b,previous_page:_0xf991x1c,total_pages:_0xf991x1a})})[_0xbe0c[36]](function(_0xf991x8){return _0xf991x6[_0xbe0c[7]](500)[_0xbe0c[6]]({error:_0xbe0c[35]})})};exports[_0xbe0c[47]]=function(_0xf991x10,_0xf991x6){SalesforceAccount[_0xbe0c[50]](_0xf991x10[_0xbe0c[49]][_0xbe0c[48]])[_0xbe0c[10]](handleEntityNotFound(_0xf991x6))[_0xbe0c[10]](responseWithResult(_0xf991x6))[_0xbe0c[36]](handleError(_0xf991x6))};exports[_0xbe0c[51]]=function(_0xf991x10,_0xf991x6){SalesforceAccount[_0xbe0c[51]](_0xf991x10[_0xbe0c[52]])[_0xbe0c[10]](responseWithResult(_0xf991x6,201))[_0xbe0c[36]](handleError(_0xf991x6))};exports[_0xbe0c[53]]=function(_0xf991x10,_0xf991x6){if(_0xf991x10[_0xbe0c[52]][_0xbe0c[48]]){delete _0xf991x10[_0xbe0c[52]][_0xbe0c[48]]};SalesforceAccount[_0xbe0c[50]](_0xf991x10[_0xbe0c[49]][_0xbe0c[48]])[_0xbe0c[10]](handleEntityNotFound(_0xf991x6))[_0xbe0c[10]](saveUpdates(_0xf991x10[_0xbe0c[52]]))[_0xbe0c[10]](responseWithResult(_0xf991x6))[_0xbe0c[36]](handleError(_0xf991x6))};exports[_0xbe0c[12]]=function(_0xf991x10,_0xf991x6){SalesforceAccount[_0xbe0c[50]](_0xf991x10[_0xbe0c[49]][_0xbe0c[48]])[_0xbe0c[10]](handleEntityNotFound(_0xf991x6))[_0xbe0c[10]](removeEntity(_0xf991x6))[_0xbe0c[36]](handleError(_0xf991x6))};exports[_0xbe0c[54]]=function(_0xf991x10,_0xf991x6){SalesforceAccount[_0xbe0c[50]](_0xf991x10[_0xbe0c[49]][_0xbe0c[48]])[_0xbe0c[10]](handleEntityNotFound(_0xf991x6))[_0xbe0c[10]](function(_0xf991x1d){var _0xf991x1e= new jsforce.Connection({oauth2:{loginUrl:_0xf991x1d[_0xbe0c[17]],clientId:_0xf991x1d[_0xbe0c[55]],clientSecret:_0xf991x1d[_0xbe0c[56]]}});var _0xf991x1f=_0xf991x1d[_0xbe0c[59]][_0xbe0c[58]](_0xf991x1d[_0xbe0c[57]]);_0xf991x1e[_0xbe0c[61]](_0xf991x1d[_0xbe0c[16]],_0xf991x1f,function(_0xf991x8,_0xf991x20){if(_0xf991x8){return _0xf991x6[_0xbe0c[7]](400)[_0xbe0c[6]](_0xf991x8)};return _0xf991x6[_0xbe0c[60]](200)})})[_0xbe0c[36]](handleError(_0xf991x6))};exports[_0xbe0c[62]]=function(_0xf991x10,_0xf991x6){var _0xf991x21={};_0xf991x21[_0xf991x10[_0xbe0c[49]][_0xbe0c[63]]]=_0xf991x10[_0xbe0c[52]][_0xbe0c[64]];SalesforceAccount[_0xbe0c[46]]({where:_0xf991x21})[_0xbe0c[10]](function(_0xf991x19){if(_0xf991x19[_0xbe0c[37]]){return _0xf991x6[_0xbe0c[7]](200)[_0xbe0c[6]]({isValid:false,value:_0xf991x10[_0xbe0c[52]][_0xbe0c[64]]})};return _0xf991x6[_0xbe0c[7]](200)[_0xbe0c[6]]({isValid:true,value:_0xf991x10[_0xbe0c[52]][_0xbe0c[64]]})})[_0xbe0c[36]](function(_0xf991x8){return handleError(_0xf991x6,_0xf991x8)})};exports[_0xbe0c[65]]=function(_0xf991x10,_0xf991x6){SalesforceAccount[_0xbe0c[50]](_0xf991x10[_0xbe0c[49]][_0xbe0c[48]])[_0xbe0c[10]](handleEntityNotFound(_0xf991x6))[_0xbe0c[10]](function(_0xf991x1d){var _0xf991x1e= new jsforce.Connection({oauth2:{loginUrl:_0xf991x1d[_0xbe0c[17]],clientId:_0xf991x1d[_0xbe0c[55]],clientSecret:_0xf991x1d[_0xbe0c[56]]}});var _0xf991x1f=_0xf991x1d[_0xbe0c[59]][_0xbe0c[58]](_0xf991x1d[_0xbe0c[57]]);_0xf991x1e[_0xbe0c[61]](_0xf991x1d[_0xbe0c[16]],_0xf991x1f,function(_0xf991x8,_0xf991x20){if(_0xf991x8){return _0xf991x6[_0xbe0c[7]](400)[_0xbe0c[6]](_0xf991x8)};_0xf991x1e[_0xbe0c[69]](_0xbe0c[68])[_0xbe0c[67]](function(_0xf991x8,_0xf991x22){if(_0xf991x8){return _0xf991x6[_0xbe0c[7]](400)[_0xbe0c[6]](_0xf991x8)};return _0xf991x6[_0xbe0c[7]](200)[_0xbe0c[6]](_0xf991x22[_0xbe0c[66]])})})})[_0xbe0c[36]](handleError(_0xf991x6))};exports[_0xbe0c[70]]=function(_0xf991x10,_0xf991x6){SalesforceAccount[_0xbe0c[12]]({where:{id:_0xf991x10[_0xbe0c[19]][_0xbe0c[48]]},individualHooks:true})[_0xbe0c[10]](function(){return _0xf991x6[_0xbe0c[60]](204)})[_0xbe0c[36]](function(_0xf991x8){return handleError(_0xf991x6,_0xf991x8)})} \ No newline at end of file diff --git a/server/api/salesforce_account/salesforce_account.socket.js b/server/api/salesforce_account/salesforce_account.socket.js index 2c58d15..ee5cb3a 100644 --- a/server/api/salesforce_account/salesforce_account.socket.js +++ b/server/api/salesforce_account/salesforce_account.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x9566=["\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"];_0x9566[0];var SalesforceAccount=require(_0x9566[2])[_0x9566[1]];exports[_0x9566[3]]=function(_0x1ff0x2){SalesforceAccount[_0x9566[4]](function(_0x1ff0x3){onSave(_0x1ff0x2,_0x1ff0x3)});SalesforceAccount[_0x9566[5]](function(_0x1ff0x3){onRemove(_0x1ff0x2,_0x1ff0x3)})};function onSave(_0x1ff0x2,_0x1ff0x3,_0x1ff0x5){_0x1ff0x2[_0x9566[7]](_0x9566[6],_0x1ff0x3)}function onRemove(_0x1ff0x2,_0x1ff0x3,_0x1ff0x5){_0x1ff0x2[_0x9566[7]](_0x9566[8],_0x1ff0x3)} \ No newline at end of file diff --git a/server/api/salesforce_configuration/index.js b/server/api/salesforce_configuration/index.js index 7936a09..2c76815 100644 --- a/server/api/salesforce_configuration/index.js +++ b/server/api/salesforce_configuration/index.js @@ -1,18 +1 @@ -'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; +var _0x73d7=["\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"];_0x73d7[0];var express=require(_0x73d7[1]);var auth=require(_0x73d7[2]);var controller=require(_0x73d7[3]);var router=express.Router();router[_0x73d7[7]](_0x73d7[4],auth[_0x73d7[5]](),controller[_0x73d7[6]]);router[_0x73d7[7]](_0x73d7[8],auth[_0x73d7[5]](),controller[_0x73d7[9]]);router[_0x73d7[11]](_0x73d7[4],auth[_0x73d7[5]](),controller[_0x73d7[10]]);router[_0x73d7[13]](_0x73d7[8],auth[_0x73d7[5]](),controller[_0x73d7[12]]);router[_0x73d7[11]](_0x73d7[14],auth[_0x73d7[5]](),controller[_0x73d7[15]]);router[_0x73d7[16]](_0x73d7[8],auth[_0x73d7[5]](),controller[_0x73d7[12]]);router[_0x73d7[18]](_0x73d7[8],auth[_0x73d7[5]](),controller[_0x73d7[17]]);module[_0x73d7[19]]=router \ No newline at end of file diff --git a/server/api/salesforce_configuration/index.spec.js b/server/api/salesforce_configuration/index.spec.js index 0d1e211..fa9a18d 100644 --- a/server/api/salesforce_configuration/index.spec.js +++ b/server/api/salesforce_configuration/index.spec.js @@ -1,97 +1 @@ -'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; - }); - - }); - -}); +var _0x4152=["\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"];_0x4152[0];var proxyquire=require(_0x4152[2])[_0x4152[1]]();var salesforceConfigurationCtrlStub={index:_0x4152[3],show:_0x4152[4],create:_0x4152[5],update:_0x4152[6],destroy:_0x4152[7]};var routerStub={get:sinon[_0x4152[8]](),put:sinon[_0x4152[8]](),patch:sinon[_0x4152[8]](),post:sinon[_0x4152[8]](),delete:sinon[_0x4152[8]]()};var salesforceConfigurationIndex=proxyquire(_0x4152[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(_0x4152[10],function(){it(_0x4152[11],function(){expect(salesforceConfigurationIndex)[_0x4152[13]][_0x4152[12]](routerStub)});describe(_0x4152[14],function(){it(_0x4152[15],function(){expect(routerStub[_0x4152[21]][_0x4152[20]](_0x4152[19],_0x4152[3]))[_0x4152[13]][_0x4152[18]][_0x4152[17]][_0x4152[16]]})});describe(_0x4152[22],function(){it(_0x4152[23],function(){expect(routerStub[_0x4152[21]][_0x4152[20]](_0x4152[24],_0x4152[4]))[_0x4152[13]][_0x4152[18]][_0x4152[17]][_0x4152[16]]})});describe(_0x4152[25],function(){it(_0x4152[26],function(){expect(routerStub[_0x4152[27]][_0x4152[20]](_0x4152[19],_0x4152[5]))[_0x4152[13]][_0x4152[18]][_0x4152[17]][_0x4152[16]]})});describe(_0x4152[28],function(){it(_0x4152[29],function(){expect(routerStub[_0x4152[30]][_0x4152[20]](_0x4152[24],_0x4152[6]))[_0x4152[13]][_0x4152[18]][_0x4152[17]][_0x4152[16]]})});describe(_0x4152[31],function(){it(_0x4152[29],function(){expect(routerStub[_0x4152[32]][_0x4152[20]](_0x4152[24],_0x4152[6]))[_0x4152[13]][_0x4152[18]][_0x4152[17]][_0x4152[16]]})});describe(_0x4152[33],function(){it(_0x4152[34],function(){expect(routerStub[_0x4152[35]][_0x4152[20]](_0x4152[24],_0x4152[7]))[_0x4152[13]][_0x4152[18]][_0x4152[17]][_0x4152[16]]})})}) \ No newline at end of file diff --git a/server/api/salesforce_configuration/salesforce_configuration.controller.js b/server/api/salesforce_configuration/salesforce_configuration.controller.js index 523aef6..0bcd517 100644 --- a/server/api/salesforce_configuration/salesforce_configuration.controller.js +++ b/server/api/salesforce_configuration/salesforce_configuration.controller.js @@ -1,147 +1 @@ -/** - * 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)); -}; +var _0xfc17=["\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"];_0xfc17[0];var _=require(_0xfc17[1]);var SalesforceConfiguration=require(_0xfc17[3])[_0xfc17[2]];var SalesforceField=require(_0xfc17[3])[_0xfc17[4]];function handleError(_0x4e3fx5,_0x4e3fx6){_0x4e3fx6=_0x4e3fx6||500;return function(_0x4e3fx7){_0x4e3fx5[_0xfc17[6]](_0x4e3fx6)[_0xfc17[5]](_0x4e3fx7)}}function responseWithResult(_0x4e3fx5,_0x4e3fx6){_0x4e3fx6=_0x4e3fx6||200;return function(_0x4e3fx9){if(_0x4e3fx9){_0x4e3fx5[_0xfc17[6]](_0x4e3fx6)[_0xfc17[7]](_0x4e3fx9)}}}function handleEntityNotFound(_0x4e3fx5){return function(_0x4e3fx9){if(!_0x4e3fx9){_0x4e3fx5[_0xfc17[6]](404)[_0xfc17[8]]();return null};return _0x4e3fx9}}function saveUpdates(_0x4e3fxc){return function(_0x4e3fx9){return _0x4e3fx9[_0xfc17[10]](_0x4e3fxc)[_0xfc17[9]](function(_0x4e3fxd){return _0x4e3fxd})}}function removeEntity(_0x4e3fx5){return function(_0x4e3fx9){if(_0x4e3fx9){return _0x4e3fx9[_0xfc17[11]]()[_0xfc17[9]](function(){_0x4e3fx5[_0xfc17[6]](204)[_0xfc17[8]]()})}}}exports[_0xfc17[12]]=function(_0x4e3fxf,_0x4e3fx5){SalesforceConfiguration[_0xfc17[15]]({where:_0x4e3fxf[_0xfc17[14]]})[_0xfc17[9]](responseWithResult(_0x4e3fx5))[_0xfc17[13]](handleError(_0x4e3fx5))};exports[_0xfc17[16]]=function(_0x4e3fxf,_0x4e3fx5){SalesforceConfiguration[_0xfc17[22]]({where:{id:_0x4e3fxf[_0xfc17[18]][_0xfc17[17]]},include:[{model:SalesforceField,as:_0xfc17[19]},{model:SalesforceField,as:_0xfc17[20]},{model:SalesforceField,as:_0xfc17[21]}]})[_0xfc17[9]](handleEntityNotFound(_0x4e3fx5))[_0xfc17[9]](responseWithResult(_0x4e3fx5))[_0xfc17[13]](handleError(_0x4e3fx5))};exports[_0xfc17[23]]=function(_0x4e3fxf,_0x4e3fx5){SalesforceConfiguration[_0xfc17[23]](_0x4e3fxf[_0xfc17[24]])[_0xfc17[9]](responseWithResult(_0x4e3fx5,201))[_0xfc17[13]](handleError(_0x4e3fx5))};exports[_0xfc17[25]]=function(_0x4e3fxf,_0x4e3fx5){if(_0x4e3fxf[_0xfc17[24]][_0xfc17[17]]){delete _0x4e3fxf[_0xfc17[24]][_0xfc17[17]]};SalesforceConfiguration[_0xfc17[26]](_0x4e3fxf[_0xfc17[18]][_0xfc17[17]])[_0xfc17[9]](handleEntityNotFound(_0x4e3fx5))[_0xfc17[9]](saveUpdates(_0x4e3fxf[_0xfc17[24]]))[_0xfc17[9]](responseWithResult(_0x4e3fx5))[_0xfc17[13]](handleError(_0x4e3fx5))};exports[_0xfc17[11]]=function(_0x4e3fxf,_0x4e3fx5){SalesforceConfiguration[_0xfc17[26]](_0x4e3fxf[_0xfc17[18]][_0xfc17[17]])[_0xfc17[9]](handleEntityNotFound(_0x4e3fx5))[_0xfc17[9]](removeEntity(_0x4e3fx5))[_0xfc17[13]](handleError(_0x4e3fx5))};exports[_0xfc17[27]]=function(_0x4e3fxf,_0x4e3fx5,_0x4e3fx10){var _0x4e3fx11;SalesforceConfiguration[_0xfc17[26]](_0x4e3fxf[_0xfc17[18]][_0xfc17[17]])[_0xfc17[9]](handleEntityNotFound(_0x4e3fx5))[_0xfc17[9]](function(_0x4e3fx14){_0x4e3fx11=_0x4e3fx14;return SalesforceField[_0xfc17[23]](_0x4e3fxf[_0xfc17[24]])})[_0xfc17[9]](function(_0x4e3fx13){switch(_0x4e3fxf[_0xfc17[18]][_0xfc17[35]]){case _0xfc17[30]:return [_0x4e3fx11[_0xfc17[29]](_0x4e3fx13),_0x4e3fx13];case _0xfc17[32]:return [_0x4e3fx11[_0xfc17[31]](_0x4e3fx13),_0x4e3fx13];case _0xfc17[34]:return [_0x4e3fx11[_0xfc17[33]](_0x4e3fx13),_0x4e3fx13]}})[_0xfc17[28]](function(_0x4e3fx12,_0x4e3fx13){return _0x4e3fx5[_0xfc17[6]](201)[_0xfc17[7]](_0x4e3fx13)})[_0xfc17[13]](handleError(_0x4e3fx5))} \ No newline at end of file diff --git a/server/api/salesforce_configuration/salesforce_configuration.socket.js b/server/api/salesforce_configuration/salesforce_configuration.socket.js index c45a482..661ef9f 100644 --- a/server/api/salesforce_configuration/salesforce_configuration.socket.js +++ b/server/api/salesforce_configuration/salesforce_configuration.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xed65=["\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"];_0xed65[0];var SalesforceConfiguration=require(_0xed65[2])[_0xed65[1]];exports[_0xed65[3]]=function(_0x44cex2){SalesforceConfiguration[_0xed65[4]](function(_0x44cex3){onSave(_0x44cex2,_0x44cex3)});SalesforceConfiguration[_0xed65[5]](function(_0x44cex3){onRemove(_0x44cex2,_0x44cex3)})};function onSave(_0x44cex2,_0x44cex3,_0x44cex5){_0x44cex2[_0xed65[7]](_0xed65[6],_0x44cex3)}function onRemove(_0x44cex2,_0x44cex3,_0x44cex5){_0x44cex2[_0xed65[7]](_0xed65[8],_0x44cex3)} \ No newline at end of file diff --git a/server/api/salesforce_field/index.js b/server/api/salesforce_field/index.js index 4a0ccb2..54f3762 100644 --- a/server/api/salesforce_field/index.js +++ b/server/api/salesforce_field/index.js @@ -1,18 +1 @@ -'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; +var _0x8dc0=["\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"];_0x8dc0[0];var express=require(_0x8dc0[1]);var auth=require(_0x8dc0[2]);var controller=require(_0x8dc0[3]);var router=express.Router();router[_0x8dc0[7]](_0x8dc0[4],auth[_0x8dc0[5]](),controller[_0x8dc0[6]]);router[_0x8dc0[7]](_0x8dc0[8],auth[_0x8dc0[5]](),controller[_0x8dc0[9]]);router[_0x8dc0[11]](_0x8dc0[4],auth[_0x8dc0[5]](),controller[_0x8dc0[10]]);router[_0x8dc0[13]](_0x8dc0[8],auth[_0x8dc0[5]](),controller[_0x8dc0[12]]);router[_0x8dc0[14]](_0x8dc0[8],auth[_0x8dc0[5]](),controller[_0x8dc0[12]]);router[_0x8dc0[16]](_0x8dc0[8],auth[_0x8dc0[5]](),controller[_0x8dc0[15]]);module[_0x8dc0[17]]=router \ No newline at end of file diff --git a/server/api/salesforce_field/index.spec.js b/server/api/salesforce_field/index.spec.js index 639e318..209e2db 100644 --- a/server/api/salesforce_field/index.spec.js +++ b/server/api/salesforce_field/index.spec.js @@ -1,97 +1 @@ -'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; - }); - - }); - -}); +var _0xd0d7=["\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"];_0xd0d7[0];var proxyquire=require(_0xd0d7[2])[_0xd0d7[1]]();var salesforceFieldCtrlStub={index:_0xd0d7[3],show:_0xd0d7[4],create:_0xd0d7[5],update:_0xd0d7[6],destroy:_0xd0d7[7]};var routerStub={get:sinon[_0xd0d7[8]](),put:sinon[_0xd0d7[8]](),patch:sinon[_0xd0d7[8]](),post:sinon[_0xd0d7[8]](),delete:sinon[_0xd0d7[8]]()};var salesforceFieldIndex=proxyquire(_0xd0d7[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(_0xd0d7[10],function(){it(_0xd0d7[11],function(){expect(salesforceFieldIndex)[_0xd0d7[13]][_0xd0d7[12]](routerStub)});describe(_0xd0d7[14],function(){it(_0xd0d7[15],function(){expect(routerStub[_0xd0d7[21]][_0xd0d7[20]](_0xd0d7[19],_0xd0d7[3]))[_0xd0d7[13]][_0xd0d7[18]][_0xd0d7[17]][_0xd0d7[16]]})});describe(_0xd0d7[22],function(){it(_0xd0d7[23],function(){expect(routerStub[_0xd0d7[21]][_0xd0d7[20]](_0xd0d7[24],_0xd0d7[4]))[_0xd0d7[13]][_0xd0d7[18]][_0xd0d7[17]][_0xd0d7[16]]})});describe(_0xd0d7[25],function(){it(_0xd0d7[26],function(){expect(routerStub[_0xd0d7[27]][_0xd0d7[20]](_0xd0d7[19],_0xd0d7[5]))[_0xd0d7[13]][_0xd0d7[18]][_0xd0d7[17]][_0xd0d7[16]]})});describe(_0xd0d7[28],function(){it(_0xd0d7[29],function(){expect(routerStub[_0xd0d7[30]][_0xd0d7[20]](_0xd0d7[24],_0xd0d7[6]))[_0xd0d7[13]][_0xd0d7[18]][_0xd0d7[17]][_0xd0d7[16]]})});describe(_0xd0d7[31],function(){it(_0xd0d7[29],function(){expect(routerStub[_0xd0d7[32]][_0xd0d7[20]](_0xd0d7[24],_0xd0d7[6]))[_0xd0d7[13]][_0xd0d7[18]][_0xd0d7[17]][_0xd0d7[16]]})});describe(_0xd0d7[33],function(){it(_0xd0d7[34],function(){expect(routerStub[_0xd0d7[35]][_0xd0d7[20]](_0xd0d7[24],_0xd0d7[7]))[_0xd0d7[13]][_0xd0d7[18]][_0xd0d7[17]][_0xd0d7[16]]})})}) \ No newline at end of file diff --git a/server/api/salesforce_field/salesforce_field.controller.js b/server/api/salesforce_field/salesforce_field.controller.js index bab61d7..bbdd59f 100644 --- a/server/api/salesforce_field/salesforce_field.controller.js +++ b/server/api/salesforce_field/salesforce_field.controller.js @@ -1,104 +1 @@ -/** - * 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)); -} +var _0x6a28=["\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"];_0x6a28[0];var _=require(_0x6a28[1]);var SalesforceField=require(_0x6a28[3])[_0x6a28[2]];function handleError(_0xaa68x4,_0xaa68x5){_0xaa68x5=_0xaa68x5||500;return function(_0xaa68x6){_0xaa68x4[_0x6a28[5]](_0xaa68x5)[_0x6a28[4]](_0xaa68x6)}}function responseWithResult(_0xaa68x4,_0xaa68x5){_0xaa68x5=_0xaa68x5||200;return function(_0xaa68x8){if(_0xaa68x8){_0xaa68x4[_0x6a28[5]](_0xaa68x5)[_0x6a28[6]](_0xaa68x8)}}}function handleEntityNotFound(_0xaa68x4){return function(_0xaa68x8){if(!_0xaa68x8){_0xaa68x4[_0x6a28[5]](404)[_0x6a28[7]]();return null};return _0xaa68x8}}function saveUpdates(_0xaa68xb){return function(_0xaa68x8){return _0xaa68x8[_0x6a28[9]](_0xaa68xb)[_0x6a28[8]](function(_0xaa68xc){return _0xaa68xc})}}function removeEntity(_0xaa68x4){return function(_0xaa68x8){if(_0xaa68x8){return _0xaa68x8[_0x6a28[10]]()[_0x6a28[8]](function(){_0xaa68x4[_0x6a28[5]](204)[_0x6a28[7]]()})}}}exports[_0x6a28[11]]=function(_0xaa68xe,_0xaa68x4){SalesforceField[_0x6a28[13]]()[_0x6a28[8]](responseWithResult(_0xaa68x4))[_0x6a28[12]](handleError(_0xaa68x4))};exports[_0x6a28[14]]=function(_0xaa68xe,_0xaa68x4){SalesforceField[_0x6a28[17]](_0xaa68xe[_0x6a28[16]][_0x6a28[15]])[_0x6a28[8]](handleEntityNotFound(_0xaa68x4))[_0x6a28[8]](responseWithResult(_0xaa68x4))[_0x6a28[12]](handleError(_0xaa68x4))};exports[_0x6a28[18]]=function(_0xaa68xe,_0xaa68x4){SalesforceField[_0x6a28[18]](_0xaa68xe[_0x6a28[19]])[_0x6a28[8]](responseWithResult(_0xaa68x4,201))[_0x6a28[12]](handleError(_0xaa68x4))};exports[_0x6a28[20]]=function(_0xaa68xe,_0xaa68x4){if(_0xaa68xe[_0x6a28[19]][_0x6a28[15]]){delete _0xaa68xe[_0x6a28[19]][_0x6a28[15]]};SalesforceField[_0x6a28[17]](_0xaa68xe[_0x6a28[16]][_0x6a28[15]])[_0x6a28[8]](handleEntityNotFound(_0xaa68x4))[_0x6a28[8]](saveUpdates(_0xaa68xe[_0x6a28[19]]))[_0x6a28[8]](responseWithResult(_0xaa68x4))[_0x6a28[12]](handleError(_0xaa68x4))};exports[_0x6a28[10]]=function(_0xaa68xe,_0xaa68x4){SalesforceField[_0x6a28[17]](_0xaa68xe[_0x6a28[16]][_0x6a28[15]])[_0x6a28[8]](handleEntityNotFound(_0xaa68x4))[_0x6a28[8]](removeEntity(_0xaa68x4))[_0x6a28[12]](handleError(_0xaa68x4))} \ No newline at end of file diff --git a/server/api/salesforce_field/salesforce_field.socket.js b/server/api/salesforce_field/salesforce_field.socket.js index b3f5775..07e5072 100644 --- a/server/api/salesforce_field/salesforce_field.socket.js +++ b/server/api/salesforce_field/salesforce_field.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x3f15=["\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"];_0x3f15[0];var SalesforceField=require(_0x3f15[2])[_0x3f15[1]];exports[_0x3f15[3]]=function(_0xe946x2){SalesforceField[_0x3f15[4]](function(_0xe946x3){onSave(_0xe946x2,_0xe946x3)});SalesforceField[_0x3f15[5]](function(_0xe946x3){onRemove(_0xe946x2,_0xe946x3)})};function onSave(_0xe946x2,_0xe946x3,_0xe946x5){_0xe946x2[_0x3f15[7]](_0x3f15[6],_0xe946x3)}function onRemove(_0xe946x2,_0xe946x3,_0xe946x5){_0xe946x2[_0x3f15[7]](_0x3f15[8],_0xe946x3)} \ No newline at end of file diff --git a/server/api/setting/index.js b/server/api/setting/index.js index e30286b..5630c0a 100644 --- a/server/api/setting/index.js +++ b/server/api/setting/index.js @@ -1,19 +1 @@ -'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; +var _0xd506=["\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"];_0xd506[0];var express=require(_0xd506[1]);var controller=require(_0xd506[2]);var auth=require(_0xd506[3]);var router=express.Router();router[_0xd506[7]](_0xd506[4],auth[_0xd506[5]](),controller[_0xd506[6]]);router[_0xd506[7]](_0xd506[8],auth[_0xd506[5]](),controller[_0xd506[9]]);router[_0xd506[7]](_0xd506[10],auth[_0xd506[5]](),controller[_0xd506[11]]);router[_0xd506[7]](_0xd506[12],controller[_0xd506[13]]);router[_0xd506[7]](_0xd506[14],auth[_0xd506[5]](),controller[_0xd506[15]]);router[_0xd506[17]](_0xd506[4],auth[_0xd506[5]](),controller[_0xd506[16]]);router[_0xd506[19]](_0xd506[14],auth[_0xd506[5]](),controller[_0xd506[18]]);router[_0xd506[20]](_0xd506[14],auth[_0xd506[5]](),controller[_0xd506[18]]);router[_0xd506[22]](_0xd506[14],auth[_0xd506[5]](),controller[_0xd506[21]]);module[_0xd506[23]]=router \ No newline at end of file diff --git a/server/api/setting/setting.controller.js b/server/api/setting/setting.controller.js index 6c2943d..0eed87f 100644 --- a/server/api/setting/setting.controller.js +++ b/server/api/setting/setting.controller.js @@ -1,172 +1 @@ -'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); -} +var _0xa406=["\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"];_0xa406[0];var _=require(_0xa406[1]);var Settings=require(_0xa406[3])[_0xa406[2]];var Agent=require(_0xa406[3])[_0xa406[4]];var VoiceMail=require(_0xa406[3])[_0xa406[5]];exports[_0xa406[6]]=function(_0xdac6x5,_0xdac6x6){return Settings[_0xa406[11]]()[_0xa406[10]](function(_0xdac6x8){return _0xdac6x6[_0xa406[9]](200)[_0xa406[8]](_0xdac6x8)})[_0xa406[7]](function(_0xdac6x7){return handleError(_0xdac6x6,_0xdac6x7)})};exports[_0xa406[12]]=function(_0xdac6x5,_0xdac6x6){var _0xdac6x9;return Settings[_0xa406[17]](1)[_0xa406[10]](function(_0xdac6x8){_0xdac6x9=_0xdac6x8;return Agent[_0xa406[16]](_0xa406[15])})[_0xa406[10]](function(_0xdac6xa){var _0xdac6xb={value:0};if(_0xdac6xa){_0xdac6xb[_0xa406[13]]= ++_0xdac6xa}else {_0xdac6xb[_0xa406[13]]=_0xdac6x9[_0xa406[14]]};return _0xdac6x6[_0xa406[9]](200)[_0xa406[8]](_0xdac6xb)})[_0xa406[7]](function(_0xdac6x7){return handleError(_0xdac6x6,_0xdac6x7)})};exports[_0xa406[18]]=function(_0xdac6x5,_0xdac6x6){var _0xdac6x9;return Settings[_0xa406[17]](1)[_0xa406[10]](function(_0xdac6x8){_0xdac6x9=_0xdac6x8;return VoiceMail[_0xa406[16]](_0xa406[21])})[_0xa406[10]](function(_0xdac6xc){var _0xdac6xd={value:0};if(_0xdac6xc){_0xdac6xd[_0xa406[13]]= ++_0xdac6xc}else {_0xdac6xd[_0xa406[13]]=_0xdac6x9[_0xa406[20]]};return _0xdac6x6[_0xa406[9]](200)[_0xa406[8]](_0xdac6xd)})[_0xa406[7]](function(_0xdac6x7){console[_0xa406[19]](_0xdac6x7);return handleError(_0xdac6x6,_0xdac6x7)})};exports[_0xa406[22]]=function(_0xdac6x5,_0xdac6x6){var _0xdac6xe=require(_0xa406[23]);return _0xdac6x6[_0xa406[9]](200)[_0xa406[8]]({name:_0xdac6xe[_0xa406[24]],version:_0xdac6xe[_0xa406[25]],engines:_0xdac6xe[_0xa406[26]]})};exports[_0xa406[27]]=function(_0xdac6x5,_0xdac6x6){Settings[_0xa406[17]](_0xdac6x5[_0xa406[30]][_0xa406[29]])[_0xa406[10]](function(_0xdac6xf){if(!_0xdac6xf){return _0xdac6x6[_0xa406[28]](404)};return _0xdac6x6[_0xa406[8]](_0xdac6xf)})[_0xa406[7]](function(_0xdac6x7){return handleError(_0xdac6x6,_0xdac6x7)})};exports[_0xa406[31]]=function(_0xdac6x5,_0xdac6x6){Settings[_0xa406[31]](_0xdac6x5[_0xa406[32]])[_0xa406[10]](function(_0xdac6xf){return _0xdac6x6[_0xa406[9]](201)[_0xa406[8]](_0xdac6xf)})[_0xa406[7]](function(_0xdac6x7){return handleError(_0xdac6x6,_0xdac6x7)})};exports[_0xa406[33]]=function(_0xdac6x5,_0xdac6x6){if(_0xdac6x5[_0xa406[32]][_0xa406[29]]){delete _0xdac6x5[_0xa406[32]][_0xa406[29]]};Settings[_0xa406[36]]({where:{id:_0xdac6x5[_0xa406[30]][_0xa406[29]]}})[_0xa406[10]](function(_0xdac6xf){if(!_0xdac6xf){return _0xdac6x6[_0xa406[28]](404)};var _0xdac6x10=_[_0xa406[34]](_0xdac6xf,_0xdac6x5[_0xa406[32]]);_0xdac6x10[_0xa406[35]]()[_0xa406[10]](function(){return _0xdac6x6[_0xa406[9]](200)[_0xa406[8]](_0xdac6xf)})[_0xa406[7]](function(_0xdac6x7){return handleError(_0xdac6x6,_0xdac6x7)})})[_0xa406[7]](function(_0xdac6x7){return handleError(_0xdac6x6,_0xdac6x7)})};exports[_0xa406[37]]=function(_0xdac6x5,_0xdac6x6){Settings[_0xa406[36]]({where:{id:_0xdac6x5[_0xa406[30]][_0xa406[29]]}})[_0xa406[10]](function(_0xdac6xf){if(!_0xdac6xf){return _0xdac6x6[_0xa406[28]](404)};_0xdac6xf[_0xa406[37]]()[_0xa406[10]](function(){return _0xdac6x6[_0xa406[28]](204)})[_0xa406[7]](function(_0xdac6x7){return handleError(_0xdac6x6,_0xdac6x7)})})[_0xa406[7]](function(_0xdac6x7){return handleError(_0xdac6x6,_0xdac6x7)})};function handleError(_0xdac6x6,_0xdac6x7){return _0xdac6x6[_0xa406[9]](500)[_0xa406[8]](_0xdac6x7)} \ No newline at end of file diff --git a/server/api/setting/setting.socket.js b/server/api/setting/setting.socket.js index 611827e..29180d7 100644 --- a/server/api/setting/setting.socket.js +++ b/server/api/setting/setting.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xed11=["\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"];_0xed11[0];var Settings=require(_0xed11[2])[_0xed11[1]];exports[_0xed11[3]]=function(_0x9b22x2){Settings[_0xed11[4]](function(_0x9b22x3){onSave(_0x9b22x2,_0x9b22x3)});Settings[_0xed11[5]](function(_0x9b22x3){onRemove(_0x9b22x2,_0x9b22x3)})};function onSave(_0x9b22x2,_0x9b22x3,_0x9b22x5){_0x9b22x2[_0xed11[7]](_0xed11[6],_0x9b22x3)}function onRemove(_0x9b22x2,_0x9b22x3,_0x9b22x5){_0x9b22x2[_0xed11[7]](_0xed11[8],_0x9b22x3)} \ No newline at end of file diff --git a/server/api/sms_account/index.js b/server/api/sms_account/index.js index 7c469a6..ba6c8c6 100644 --- a/server/api/sms_account/index.js +++ b/server/api/sms_account/index.js @@ -1,19 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./sms_account.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('/:id/send', auth.isAuthenticated(), controller.sendMessage); -router.post('/:id/receive', auth.isAuthenticated(), controller.receiveMessage); - -router.put('/:id', auth.isAuthenticated(), controller.update); -router.patch('/:id', auth.isAuthenticated(), controller.update); -router.delete('/:id', auth.isAuthenticated(), controller.destroy); - -module.exports = router; +var _0x641e=["\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\x6D\x73\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","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x72\x65\x63\x65\x69\x76\x65","\x72\x65\x63\x65\x69\x76\x65\x4D\x65\x73\x73\x61\x67\x65","\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"];_0x641e[0];var express=require(_0x641e[1]);var auth=require(_0x641e[2]);var controller=require(_0x641e[3]);var router=express.Router();router[_0x641e[7]](_0x641e[4],auth[_0x641e[5]](),controller[_0x641e[6]]);router[_0x641e[7]](_0x641e[8],auth[_0x641e[5]](),controller[_0x641e[9]]);router[_0x641e[11]](_0x641e[4],auth[_0x641e[5]](),controller[_0x641e[10]]);router[_0x641e[11]](_0x641e[12],auth[_0x641e[5]](),controller[_0x641e[13]]);router[_0x641e[11]](_0x641e[14],auth[_0x641e[5]](),controller[_0x641e[15]]);router[_0x641e[17]](_0x641e[8],auth[_0x641e[5]](),controller[_0x641e[16]]);router[_0x641e[18]](_0x641e[8],auth[_0x641e[5]](),controller[_0x641e[16]]);router[_0x641e[20]](_0x641e[8],auth[_0x641e[5]](),controller[_0x641e[19]]);module[_0x641e[21]]=router \ No newline at end of file diff --git a/server/api/sms_account/index.spec.js b/server/api/sms_account/index.spec.js index 96efe8c..d25028c 100644 --- a/server/api/sms_account/index.spec.js +++ b/server/api/sms_account/index.spec.js @@ -1,97 +1 @@ -'use strict'; - -var proxyquire = require('proxyquire').noPreserveCache(); - -var smsAccountCtrlStub = { - index: 'smsAccountCtrl.index', - show: 'smsAccountCtrl.show', - create: 'smsAccountCtrl.create', - update: 'smsAccountCtrl.update', - destroy: 'smsAccountCtrl.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 smsAccountIndex = proxyquire('./index.js', { - 'express': { - Router: function() { - return routerStub; - } - }, - './sms_account.controller': smsAccountCtrlStub -}); - -describe('SmsAccount API Router:', function() { - - it('should return an express router instance', function() { - expect(smsAccountIndex).to.equal(routerStub); - }); - - describe('GET /api/sms_accounts', function() { - - it('should route to smsAccount.controller.index', function() { - expect(routerStub.get - .withArgs('/', 'smsAccountCtrl.index') - ).to.have.been.calledOnce; - }); - - }); - - describe('GET /api/sms_accounts/:id', function() { - - it('should route to smsAccount.controller.show', function() { - expect(routerStub.get - .withArgs('/:id', 'smsAccountCtrl.show') - ).to.have.been.calledOnce; - }); - - }); - - describe('POST /api/sms_accounts', function() { - - it('should route to smsAccount.controller.create', function() { - expect(routerStub.post - .withArgs('/', 'smsAccountCtrl.create') - ).to.have.been.calledOnce; - }); - - }); - - describe('PUT /api/sms_accounts/:id', function() { - - it('should route to smsAccount.controller.update', function() { - expect(routerStub.put - .withArgs('/:id', 'smsAccountCtrl.update') - ).to.have.been.calledOnce; - }); - - }); - - describe('PATCH /api/sms_accounts/:id', function() { - - it('should route to smsAccount.controller.update', function() { - expect(routerStub.patch - .withArgs('/:id', 'smsAccountCtrl.update') - ).to.have.been.calledOnce; - }); - - }); - - describe('DELETE /api/sms_accounts/:id', function() { - - it('should route to smsAccount.controller.destroy', function() { - expect(routerStub.delete - .withArgs('/:id', 'smsAccountCtrl.destroy') - ).to.have.been.calledOnce; - }); - - }); - -}); +var _0x4dcb=["\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\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x73\x6D\x73\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\x6D\x73\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\x6D\x73\x5F\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\x6D\x73\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\x6D\x73\x5F\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\x6D\x73\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\x6D\x73\x5F\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\x6D\x73\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\x6D\x73\x5F\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\x6D\x73\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\x6D\x73\x5F\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\x6D\x73\x5F\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\x6D\x73\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"];_0x4dcb[0];var proxyquire=require(_0x4dcb[2])[_0x4dcb[1]]();var smsAccountCtrlStub={index:_0x4dcb[3],show:_0x4dcb[4],create:_0x4dcb[5],update:_0x4dcb[6],destroy:_0x4dcb[7]};var routerStub={get:sinon[_0x4dcb[8]](),put:sinon[_0x4dcb[8]](),patch:sinon[_0x4dcb[8]](),post:sinon[_0x4dcb[8]](),delete:sinon[_0x4dcb[8]]()};var smsAccountIndex=proxyquire(_0x4dcb[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":smsAccountCtrlStub});describe(_0x4dcb[10],function(){it(_0x4dcb[11],function(){expect(smsAccountIndex)[_0x4dcb[13]][_0x4dcb[12]](routerStub)});describe(_0x4dcb[14],function(){it(_0x4dcb[15],function(){expect(routerStub[_0x4dcb[21]][_0x4dcb[20]](_0x4dcb[19],_0x4dcb[3]))[_0x4dcb[13]][_0x4dcb[18]][_0x4dcb[17]][_0x4dcb[16]]})});describe(_0x4dcb[22],function(){it(_0x4dcb[23],function(){expect(routerStub[_0x4dcb[21]][_0x4dcb[20]](_0x4dcb[24],_0x4dcb[4]))[_0x4dcb[13]][_0x4dcb[18]][_0x4dcb[17]][_0x4dcb[16]]})});describe(_0x4dcb[25],function(){it(_0x4dcb[26],function(){expect(routerStub[_0x4dcb[27]][_0x4dcb[20]](_0x4dcb[19],_0x4dcb[5]))[_0x4dcb[13]][_0x4dcb[18]][_0x4dcb[17]][_0x4dcb[16]]})});describe(_0x4dcb[28],function(){it(_0x4dcb[29],function(){expect(routerStub[_0x4dcb[30]][_0x4dcb[20]](_0x4dcb[24],_0x4dcb[6]))[_0x4dcb[13]][_0x4dcb[18]][_0x4dcb[17]][_0x4dcb[16]]})});describe(_0x4dcb[31],function(){it(_0x4dcb[29],function(){expect(routerStub[_0x4dcb[32]][_0x4dcb[20]](_0x4dcb[24],_0x4dcb[6]))[_0x4dcb[13]][_0x4dcb[18]][_0x4dcb[17]][_0x4dcb[16]]})});describe(_0x4dcb[33],function(){it(_0x4dcb[34],function(){expect(routerStub[_0x4dcb[35]][_0x4dcb[20]](_0x4dcb[24],_0x4dcb[7]))[_0x4dcb[13]][_0x4dcb[18]][_0x4dcb[17]][_0x4dcb[16]]})})}) \ No newline at end of file diff --git a/server/api/sms_account/sms_account.controller.js b/server/api/sms_account/sms_account.controller.js index d6d1292..9d6be29 100644 --- a/server/api/sms_account/sms_account.controller.js +++ b/server/api/sms_account/sms_account.controller.js @@ -1,156 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/sms_accounts -> index - * POST /api/sms_accounts -> create - * GET /api/sms_accounts/:id -> show - * PUT /api/sms_accounts/:id -> update - * DELETE /api/sms_accounts/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var SmsAccount = require('../../models').SmsAccount; -var SmsMessage = require('../../models').SmsMessage; - - -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 SmsAccounts -exports.index = function(req, res) { - return SmsAccount.findAndCountAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single SmsAccount from the DB -exports.show = function(req, res) { - return SmsAccount - .findById(req.params.id) - .then(function(smsAccount) { - if (!smsAccount) { - return res.sendStatus(404); - } - return res.send(smsAccount); - }) - .catch(handleError(res)); -} - -// Creates a new SmsAccount in the DB -exports.create = function(req, res) { - return SmsAccount.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); - } - // Creates a send Message in the DB. -exports.sendMessage = function(req, res, next) { - req.body.UserId = req.user.id; - req.body.SmsAccountId = req.params.id; - req.body.method = 'OUT'; - - return SmsMessage - .create(req.body) - .then(function(smsMessage) { - return res.status(201).send(smsMessage); - }).catch(function(err) { - return handleError(res, err); - }); -}; -// Creates a receive Message in the DB. -exports.receiveMessage = function(req, res, next) { - // req.body.UserId = req.user.id; - req.body.SmsAccountId = req.params.id; - req.body.method = 'IN'; - - return SmsMessage - .create(req.body) - .then(function(smsMessage) { - return res.status(201).send(smsMessage); - }).catch(function(err) { - return handleError(res, err); - }); -}; -// Updates an existing SmsAccount in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SmsAccount.findById(req.params.id) - .then(function(smsAccount) { - if (!smsAccount) { - return res.sendStatus(404); - } - var updated = _.merge(smsAccount, req.body); - return updated - .save(); - }) - .then(function(smsAccount) { - return res.status(200).send(smsAccount); - }) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a SmsAccount from the DB -exports.destroy = function(req, res) { - return SmsAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0x5d1f=["\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\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\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","\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","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x65\x74\x68\x6F\x64","\x4F\x55\x54","\x72\x65\x63\x65\x69\x76\x65\x4D\x65\x73\x73\x61\x67\x65","\x49\x4E","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65"];_0x5d1f[0];var _=require(_0x5d1f[1]);var Util=require(_0x5d1f[2]);var SmsAccount=require(_0x5d1f[4])[_0x5d1f[3]];var SmsMessage=require(_0x5d1f[4])[_0x5d1f[5]];function handleError(_0x7499x6,_0x7499x7){_0x7499x7=_0x7499x7||500;return function(_0x7499x8){_0x7499x6[_0x5d1f[7]](_0x7499x7)[_0x5d1f[6]](_0x7499x8)}}function responseWithResult(_0x7499x6,_0x7499x7){_0x7499x7=_0x7499x7||200;return function(_0x7499xa){if(_0x7499xa){_0x7499x6[_0x5d1f[7]](_0x7499x7)[_0x5d1f[8]](_0x7499xa)}}}function responseWithoutResult(_0x7499x6,_0x7499x7){_0x7499x7=_0x7499x7||204;return function(){_0x7499x6[_0x5d1f[9]](_0x7499x7)}}function handleEntityNotFound(_0x7499x6){return function(_0x7499xa){if(!_0x7499xa){_0x7499x6[_0x5d1f[7]](404)[_0x5d1f[10]]();return null};return _0x7499xa}}function saveUpdates(_0x7499xe){return function(_0x7499xa){return _0x7499xa[_0x5d1f[12]](_0x7499xe)[_0x5d1f[11]](function(_0x7499xf){return _0x7499xf})}}function removeEntity(_0x7499x6){return function(_0x7499xa){if(_0x7499xa){return _0x7499xa[_0x5d1f[13]]()[_0x5d1f[11]](function(){_0x7499x6[_0x5d1f[7]](204)[_0x5d1f[10]]()})}}}exports[_0x5d1f[14]]=function(_0x7499x11,_0x7499x6){return SmsAccount[_0x5d1f[18]](Util[_0x5d1f[17]](_0x7499x11[_0x5d1f[16]]))[_0x5d1f[11]](responseWithResult(_0x7499x6))[_0x5d1f[15]](handleError(_0x7499x6))};exports[_0x5d1f[19]]=function(_0x7499x11,_0x7499x6){return SmsAccount[_0x5d1f[22]](_0x7499x11[_0x5d1f[21]][_0x5d1f[20]])[_0x5d1f[11]](function(_0x7499x12){if(!_0x7499x12){return _0x7499x6[_0x5d1f[9]](404)};return _0x7499x6[_0x5d1f[6]](_0x7499x12)})[_0x5d1f[15]](handleError(_0x7499x6))};exports[_0x5d1f[23]]=function(_0x7499x11,_0x7499x6){return SmsAccount[_0x5d1f[23]](_0x7499x11[_0x5d1f[24]])[_0x5d1f[11]](responseWithResult(_0x7499x6,201))[_0x5d1f[15]](handleError(_0x7499x6))};exports[_0x5d1f[25]]=function(_0x7499x11,_0x7499x6,_0x7499x13){_0x7499x11[_0x5d1f[24]][_0x5d1f[26]]=_0x7499x11[_0x5d1f[27]][_0x5d1f[20]];_0x7499x11[_0x5d1f[24]][_0x5d1f[28]]=_0x7499x11[_0x5d1f[21]][_0x5d1f[20]];_0x7499x11[_0x5d1f[24]][_0x5d1f[29]]=_0x5d1f[30];return SmsMessage[_0x5d1f[23]](_0x7499x11[_0x5d1f[24]])[_0x5d1f[11]](function(_0x7499x14){return _0x7499x6[_0x5d1f[7]](201)[_0x5d1f[6]](_0x7499x14)})[_0x5d1f[15]](function(_0x7499x8){return handleError(_0x7499x6,_0x7499x8)})};exports[_0x5d1f[31]]=function(_0x7499x11,_0x7499x6,_0x7499x13){_0x7499x11[_0x5d1f[24]][_0x5d1f[28]]=_0x7499x11[_0x5d1f[21]][_0x5d1f[20]];_0x7499x11[_0x5d1f[24]][_0x5d1f[29]]=_0x5d1f[32];return SmsMessage[_0x5d1f[23]](_0x7499x11[_0x5d1f[24]])[_0x5d1f[11]](function(_0x7499x14){return _0x7499x6[_0x5d1f[7]](201)[_0x5d1f[6]](_0x7499x14)})[_0x5d1f[15]](function(_0x7499x8){return handleError(_0x7499x6,_0x7499x8)})};exports[_0x5d1f[33]]=function(_0x7499x11,_0x7499x6){if(_0x7499x11[_0x5d1f[24]][_0x5d1f[20]]){delete _0x7499x11[_0x5d1f[24]][_0x5d1f[20]]};return SmsAccount[_0x5d1f[22]](_0x7499x11[_0x5d1f[21]][_0x5d1f[20]])[_0x5d1f[11]](function(_0x7499x12){if(!_0x7499x12){return _0x7499x6[_0x5d1f[9]](404)};var _0x7499xf=_[_0x5d1f[34]](_0x7499x12,_0x7499x11[_0x5d1f[24]]);return _0x7499xf[_0x5d1f[35]]()})[_0x5d1f[11]](function(_0x7499x12){return _0x7499x6[_0x5d1f[7]](200)[_0x5d1f[6]](_0x7499x12)})[_0x5d1f[11]](handleEntityNotFound(_0x7499x6))[_0x5d1f[11]](saveUpdates(_0x7499x11[_0x5d1f[24]]))[_0x5d1f[11]](responseWithResult(_0x7499x6))[_0x5d1f[15]](handleError(_0x7499x6))};exports[_0x5d1f[13]]=function(_0x7499x11,_0x7499x6){return SmsAccount[_0x5d1f[22]](_0x7499x11[_0x5d1f[21]][_0x5d1f[20]])[_0x5d1f[11]](handleEntityNotFound(_0x7499x6))[_0x5d1f[11]](removeEntity(_0x7499x6))[_0x5d1f[15]](handleError(_0x7499x6))} \ No newline at end of file diff --git a/server/api/sms_account/sms_account.socket.js b/server/api/sms_account/sms_account.socket.js index 3641880..94e2048 100644 --- a/server/api/sms_account/sms_account.socket.js +++ b/server/api/sms_account/sms_account.socket.js @@ -1,24 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -var SmsAccount = require('../../models').SmsAccount; - -exports.register = function(socket) { - SmsAccount.afterCreate(function(doc) { - onSave(socket, doc); - }); - SmsAccount.afterDestroy(function(doc) { - onRemove(socket, doc); - }); -}; - -function onSave(socket, doc, cb) { - socket.emit('sms_account:save', doc); -} - -function onRemove(socket, doc, cb) { - socket.emit('sms_account:remove', doc); -} +var _0x4f62=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x6D\x73\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\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0x4f62[0];var SmsAccount=require(_0x4f62[2])[_0x4f62[1]];exports[_0x4f62[3]]=function(_0x5857x2){SmsAccount[_0x4f62[4]](function(_0x5857x3){onSave(_0x5857x2,_0x5857x3)});SmsAccount[_0x4f62[5]](function(_0x5857x3){onRemove(_0x5857x2,_0x5857x3)})};function onSave(_0x5857x2,_0x5857x3,_0x5857x5){_0x5857x2[_0x4f62[7]](_0x4f62[6],_0x5857x3)}function onRemove(_0x5857x2,_0x5857x3,_0x5857x5){_0x5857x2[_0x4f62[7]](_0x4f62[8],_0x5857x3)} \ No newline at end of file diff --git a/server/api/sms_application/index.js b/server/api/sms_application/index.js index 2f44f81..4e9bd11 100644 --- a/server/api/sms_application/index.js +++ b/server/api/sms_application/index.js @@ -1,20 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./sms_application.controller'); - -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.put('/:id', auth.isAuthenticated(), controller.update); -router.put('/:id/applications', auth.isAuthenticated(), controller.updateApplications); - -router.patch('/:id', auth.isAuthenticated(), controller.update); -router.delete('/:id', auth.isAuthenticated(), controller.destroy); - -module.exports = router; +var _0x4edc=["\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\x6D\x73\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\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","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4edc[0];var express=require(_0x4edc[1]);var auth=require(_0x4edc[2]);var controller=require(_0x4edc[3]);var router=express.Router();router[_0x4edc[7]](_0x4edc[4],auth[_0x4edc[5]](),controller[_0x4edc[6]]);router[_0x4edc[7]](_0x4edc[8],auth[_0x4edc[5]](),controller[_0x4edc[9]]);router[_0x4edc[7]](_0x4edc[10],auth[_0x4edc[5]](),controller[_0x4edc[11]]);router[_0x4edc[13]](_0x4edc[4],auth[_0x4edc[5]](),controller[_0x4edc[12]]);router[_0x4edc[15]](_0x4edc[8],auth[_0x4edc[5]](),controller[_0x4edc[14]]);router[_0x4edc[15]](_0x4edc[10],auth[_0x4edc[5]](),controller[_0x4edc[16]]);router[_0x4edc[17]](_0x4edc[8],auth[_0x4edc[5]](),controller[_0x4edc[14]]);router[_0x4edc[19]](_0x4edc[8],auth[_0x4edc[5]](),controller[_0x4edc[18]]);module[_0x4edc[20]]=router \ No newline at end of file diff --git a/server/api/sms_application/index.spec.js b/server/api/sms_application/index.spec.js index a26c4d4..e3eca7d 100644 --- a/server/api/sms_application/index.spec.js +++ b/server/api/sms_application/index.spec.js @@ -1,97 +1 @@ -'use strict'; - -var proxyquire = require('proxyquire').noPreserveCache(); - -var smsApplicationCtrlStub = { - index: 'smsApplicationCtrl.index', - show: 'smsApplicationCtrl.show', - create: 'smsApplicationCtrl.create', - update: 'smsApplicationCtrl.update', - destroy: 'smsApplicationCtrl.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 smsApplicationIndex = proxyquire('./index.js', { - 'express': { - Router: function() { - return routerStub; - } - }, - './sms_application.controller': smsApplicationCtrlStub -}); - -describe('SmsApplication API Router:', function() { - - it('should return an express router instance', function() { - expect(smsApplicationIndex).to.equal(routerStub); - }); - - describe('GET /api/sms/applications', function() { - - it('should route to smsApplication.controller.index', function() { - expect(routerStub.get - .withArgs('/', 'smsApplicationCtrl.index') - ).to.have.been.calledOnce; - }); - - }); - - describe('GET /api/sms/applications/:id', function() { - - it('should route to smsApplication.controller.show', function() { - expect(routerStub.get - .withArgs('/:id', 'smsApplicationCtrl.show') - ).to.have.been.calledOnce; - }); - - }); - - describe('POST /api/sms/applications', function() { - - it('should route to smsApplication.controller.create', function() { - expect(routerStub.post - .withArgs('/', 'smsApplicationCtrl.create') - ).to.have.been.calledOnce; - }); - - }); - - describe('PUT /api/sms/applications/:id', function() { - - it('should route to smsApplication.controller.update', function() { - expect(routerStub.put - .withArgs('/:id', 'smsApplicationCtrl.update') - ).to.have.been.calledOnce; - }); - - }); - - describe('PATCH /api/sms/applications/:id', function() { - - it('should route to smsApplication.controller.update', function() { - expect(routerStub.patch - .withArgs('/:id', 'smsApplicationCtrl.update') - ).to.have.been.calledOnce; - }); - - }); - - describe('DELETE /api/sms/applications/:id', function() { - - it('should route to smsApplication.controller.destroy', function() { - expect(routerStub.delete - .withArgs('/:id', 'smsApplicationCtrl.destroy') - ).to.have.been.calledOnce; - }); - - }); - -}); +var _0x7778=["\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\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\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\x6D\x73\x41\x70\x70\x6C\x69\x63\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\x6D\x73\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\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\x6D\x73\x2F\x61\x70\x70\x6C\x69\x63\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\x6D\x73\x41\x70\x70\x6C\x69\x63\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\x6D\x73\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\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\x6D\x73\x2F\x61\x70\x70\x6C\x69\x63\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\x6D\x73\x41\x70\x70\x6C\x69\x63\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\x6D\x73\x2F\x61\x70\x70\x6C\x69\x63\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\x6D\x73\x2F\x61\x70\x70\x6C\x69\x63\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\x6D\x73\x41\x70\x70\x6C\x69\x63\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"];_0x7778[0];var proxyquire=require(_0x7778[2])[_0x7778[1]]();var smsApplicationCtrlStub={index:_0x7778[3],show:_0x7778[4],create:_0x7778[5],update:_0x7778[6],destroy:_0x7778[7]};var routerStub={get:sinon[_0x7778[8]](),put:sinon[_0x7778[8]](),patch:sinon[_0x7778[8]](),post:sinon[_0x7778[8]](),delete:sinon[_0x7778[8]]()};var smsApplicationIndex=proxyquire(_0x7778[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":smsApplicationCtrlStub});describe(_0x7778[10],function(){it(_0x7778[11],function(){expect(smsApplicationIndex)[_0x7778[13]][_0x7778[12]](routerStub)});describe(_0x7778[14],function(){it(_0x7778[15],function(){expect(routerStub[_0x7778[21]][_0x7778[20]](_0x7778[19],_0x7778[3]))[_0x7778[13]][_0x7778[18]][_0x7778[17]][_0x7778[16]]})});describe(_0x7778[22],function(){it(_0x7778[23],function(){expect(routerStub[_0x7778[21]][_0x7778[20]](_0x7778[24],_0x7778[4]))[_0x7778[13]][_0x7778[18]][_0x7778[17]][_0x7778[16]]})});describe(_0x7778[25],function(){it(_0x7778[26],function(){expect(routerStub[_0x7778[27]][_0x7778[20]](_0x7778[19],_0x7778[5]))[_0x7778[13]][_0x7778[18]][_0x7778[17]][_0x7778[16]]})});describe(_0x7778[28],function(){it(_0x7778[29],function(){expect(routerStub[_0x7778[30]][_0x7778[20]](_0x7778[24],_0x7778[6]))[_0x7778[13]][_0x7778[18]][_0x7778[17]][_0x7778[16]]})});describe(_0x7778[31],function(){it(_0x7778[29],function(){expect(routerStub[_0x7778[32]][_0x7778[20]](_0x7778[24],_0x7778[6]))[_0x7778[13]][_0x7778[18]][_0x7778[17]][_0x7778[16]]})});describe(_0x7778[33],function(){it(_0x7778[34],function(){expect(routerStub[_0x7778[35]][_0x7778[20]](_0x7778[24],_0x7778[7]))[_0x7778[13]][_0x7778[18]][_0x7778[17]][_0x7778[16]]})})}) \ No newline at end of file diff --git a/server/api/sms_application/sms_application.controller.js b/server/api/sms_application/sms_application.controller.js index c8c5169..b342080 100644 --- a/server/api/sms_application/sms_application.controller.js +++ b/server/api/sms_application/sms_application.controller.js @@ -1,179 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/sms/applications -> index - * POST /api/sms/applications -> create - * GET /api/sms/applications/:id -> show - * PUT /api/sms/applications/:id -> update - * DELETE /api/sms/applications/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var SmsApplication = require('../../models').SmsApplication; - - -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 SmsApplications -exports.index = function(req, res) { - return SmsApplication.findAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single SmsApplication from the DB -exports.show = function(req, res) { - return SmsApplication.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); - } - // Get a single mailAccount -exports.showApplications = function(req, res, next) { - return SmsApplication - // .scope('default') - .findById(req.params.id) - .then(function(mailAccount) { - if (!mailAccount) { - return res.sendStatus(404); - } - return mailAccount - .getSmsApplications(_.merge(Util.getQuery(req.query), { - include: [{ - model: SmsQueue, - attributes: ['id', 'name'] - }, { - model: User, - attributes: ['id', 'name', 'online'] - }] - })); - }) - .then(function(smsApplications) { - return res.send({ - count: smsApplications.length, - rows: smsApplications - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Creates a new SmsApplication in the DB -exports.create = function(req, res) { - return SmsApplication.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing SmsApplication in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SmsApplication.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); - } - // Updates an existing smsAccount 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 SmsApplication - .destroy({ - where: { - SmsAccountId: req.params.id - }, - individualHooks: true, - transaction: t - }).then(function(smsApplication) { - return SmsApplication - .bulkCreate(apps, { - individualHooks: true, - transaction: t - }); - }); - }).then(function(smsAccounts) { - return res.status(200).send({ - count: smsAccounts.length, - rows: smsAccounts - }); - }).catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a SmsApplication from the DB -exports.destroy = function(req, res) { - return SmsApplication.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0xc10e=["\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\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\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","\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\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\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","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E"];_0xc10e[0];var _=require(_0xc10e[1]);var Util=require(_0xc10e[2]);var SmsApplication=require(_0xc10e[4])[_0xc10e[3]];function handleError(_0xbe9ex5,_0xbe9ex6){_0xbe9ex6=_0xbe9ex6||500;return function(_0xbe9ex7){_0xbe9ex5[_0xc10e[6]](_0xbe9ex6)[_0xc10e[5]](_0xbe9ex7)}}function responseWithResult(_0xbe9ex5,_0xbe9ex6){_0xbe9ex6=_0xbe9ex6||200;return function(_0xbe9ex9){if(_0xbe9ex9){_0xbe9ex5[_0xc10e[6]](_0xbe9ex6)[_0xc10e[7]](_0xbe9ex9)}}}function responseWithoutResult(_0xbe9ex5,_0xbe9ex6){_0xbe9ex6=_0xbe9ex6||204;return function(){_0xbe9ex5[_0xc10e[8]](_0xbe9ex6)}}function handleEntityNotFound(_0xbe9ex5){return function(_0xbe9ex9){if(!_0xbe9ex9){_0xbe9ex5[_0xc10e[6]](404)[_0xc10e[9]]();return null};return _0xbe9ex9}}function saveUpdates(_0xbe9exd){return function(_0xbe9ex9){return _0xbe9ex9[_0xc10e[11]](_0xbe9exd)[_0xc10e[10]](function(_0xbe9exe){return _0xbe9exe})}}function removeEntity(_0xbe9ex5){return function(_0xbe9ex9){if(_0xbe9ex9){return _0xbe9ex9[_0xc10e[12]]()[_0xc10e[10]](function(){_0xbe9ex5[_0xc10e[6]](204)[_0xc10e[9]]()})}}}exports[_0xc10e[13]]=function(_0xbe9ex10,_0xbe9ex5){return SmsApplication[_0xc10e[17]](Util[_0xc10e[16]](_0xbe9ex10[_0xc10e[15]]))[_0xc10e[10]](responseWithResult(_0xbe9ex5))[_0xc10e[14]](handleError(_0xbe9ex5))};exports[_0xc10e[18]]=function(_0xbe9ex10,_0xbe9ex5){return SmsApplication[_0xc10e[21]](_0xbe9ex10[_0xc10e[20]][_0xc10e[19]])[_0xc10e[10]](handleEntityNotFound(_0xbe9ex5))[_0xc10e[10]](responseWithResult(_0xbe9ex5))[_0xc10e[14]](handleError(_0xbe9ex5))};exports[_0xc10e[22]]=function(_0xbe9ex10,_0xbe9ex5,_0xbe9ex11){return SmsApplication[_0xc10e[21]](_0xbe9ex10[_0xc10e[20]][_0xc10e[19]])[_0xc10e[10]](function(_0xbe9ex13){if(!_0xbe9ex13){return _0xbe9ex5[_0xc10e[8]](404)};return _0xbe9ex13[_0xc10e[27]](_[_0xc10e[26]](Util[_0xc10e[16]](_0xbe9ex10[_0xc10e[15]]),{include:[{model:SmsQueue,attributes:[_0xc10e[19],_0xc10e[24]]},{model:User,attributes:[_0xc10e[19],_0xc10e[24],_0xc10e[25]]}]}))})[_0xc10e[10]](function(_0xbe9ex12){return _0xbe9ex5[_0xc10e[5]]({count:_0xbe9ex12[_0xc10e[23]],rows:_0xbe9ex12})})[_0xc10e[14]](function(_0xbe9ex7){return handleError(_0xbe9ex5,_0xbe9ex7)})};exports[_0xc10e[28]]=function(_0xbe9ex10,_0xbe9ex5){return SmsApplication[_0xc10e[28]](_0xbe9ex10[_0xc10e[29]])[_0xc10e[10]](responseWithResult(_0xbe9ex5,201))[_0xc10e[14]](handleError(_0xbe9ex5))};exports[_0xc10e[30]]=function(_0xbe9ex10,_0xbe9ex5){if(_0xbe9ex10[_0xc10e[29]][_0xc10e[19]]){delete _0xbe9ex10[_0xc10e[29]][_0xc10e[19]]};return SmsApplication[_0xc10e[21]](_0xbe9ex10[_0xc10e[20]][_0xc10e[19]])[_0xc10e[10]](handleEntityNotFound(_0xbe9ex5))[_0xc10e[10]](saveUpdates(_0xbe9ex10[_0xc10e[29]]))[_0xc10e[10]](responseWithResult(_0xbe9ex5))[_0xc10e[14]](handleError(_0xbe9ex5))};exports[_0xc10e[31]]=function(_0xbe9ex10,_0xbe9ex5){var _0xbe9ex14=0;var _0xbe9ex15=_0xbe9ex10[_0xc10e[29]];_0xbe9ex15[_0xc10e[35]](function(_0xbe9ex16){delete _0xbe9ex16[_0xc10e[19]];delete _0xbe9ex16[_0xc10e[32]];delete _0xbe9ex16[_0xc10e[33]];_0xbe9ex16[_0xc10e[34]]= ++_0xbe9ex14});return sequelize[_0xc10e[37]](function(_0xbe9ex18){return SmsApplication[_0xc10e[12]]({where:{SmsAccountId:_0xbe9ex10[_0xc10e[20]][_0xc10e[19]]},individualHooks:true,transaction:_0xbe9ex18})[_0xc10e[10]](function(_0xbe9ex19){return SmsApplication[_0xc10e[36]](_0xbe9ex15,{individualHooks:true,transaction:_0xbe9ex18})})})[_0xc10e[10]](function(_0xbe9ex17){return _0xbe9ex5[_0xc10e[6]](200)[_0xc10e[5]]({count:_0xbe9ex17[_0xc10e[23]],rows:_0xbe9ex17})})[_0xc10e[14]](function(_0xbe9ex7){return handleError(_0xbe9ex5,_0xbe9ex7)})};exports[_0xc10e[12]]=function(_0xbe9ex10,_0xbe9ex5){return SmsApplication[_0xc10e[21]](_0xbe9ex10[_0xc10e[20]][_0xc10e[19]])[_0xc10e[10]](handleEntityNotFound(_0xbe9ex5))[_0xc10e[10]](removeEntity(_0xbe9ex5))[_0xc10e[14]](handleError(_0xbe9ex5))} \ No newline at end of file diff --git a/server/api/sms_application/sms_application.socket.js b/server/api/sms_application/sms_application.socket.js index 96308a3..91ac8d6 100644 --- a/server/api/sms_application/sms_application.socket.js +++ b/server/api/sms_application/sms_application.socket.js @@ -1,24 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -var SmsApplication = require('../../models').SmsApplication; - -exports.register = function(socket) { - SmsApplication.afterCreate(function(doc) { - onSave(socket, doc); - }); - SmsApplication.afterDestroy(function(doc) { - onRemove(socket, doc); - }); -}; - -function onSave(socket, doc, cb) { - socket.emit('sms_application:save', doc); -} - -function onRemove(socket, doc, cb) { - socket.emit('sms_application:remove', doc); -} +var _0xd9a9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x6D\x73\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","\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0xd9a9[0];var SmsApplication=require(_0xd9a9[2])[_0xd9a9[1]];exports[_0xd9a9[3]]=function(_0xd972x2){SmsApplication[_0xd9a9[4]](function(_0xd972x3){onSave(_0xd972x2,_0xd972x3)});SmsApplication[_0xd9a9[5]](function(_0xd972x3){onRemove(_0xd972x2,_0xd972x3)})};function onSave(_0xd972x2,_0xd972x3,_0xd972x5){_0xd972x2[_0xd9a9[7]](_0xd9a9[6],_0xd972x3)}function onRemove(_0xd972x2,_0xd972x3,_0xd972x5){_0xd972x2[_0xd9a9[7]](_0xd9a9[8],_0xd972x3)} \ No newline at end of file diff --git a/server/api/sms_message/index.js b/server/api/sms_message/index.js index 3067525..3fdda92 100644 --- a/server/api/sms_message/index.js +++ b/server/api/sms_message/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./sms_message.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; +var _0x39e1=["\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\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\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","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x39e1[0];var express=require(_0x39e1[1]);var auth=require(_0x39e1[2]);var controller=require(_0x39e1[3]);var router=express.Router();router[_0x39e1[7]](_0x39e1[4],auth[_0x39e1[5]](),controller[_0x39e1[6]]);router[_0x39e1[7]](_0x39e1[8],auth[_0x39e1[5]](),controller[_0x39e1[9]]);router[_0x39e1[11]](_0x39e1[4],auth[_0x39e1[5]](),controller[_0x39e1[10]]);router[_0x39e1[13]](_0x39e1[8],auth[_0x39e1[5]](),controller[_0x39e1[12]]);router[_0x39e1[14]](_0x39e1[8],auth[_0x39e1[5]](),controller[_0x39e1[12]]);router[_0x39e1[16]](_0x39e1[8],auth[_0x39e1[5]](),controller[_0x39e1[15]]);module[_0x39e1[17]]=router \ No newline at end of file diff --git a/server/api/sms_message/index.spec.js b/server/api/sms_message/index.spec.js index 358d758..5b4a646 100644 --- a/server/api/sms_message/index.spec.js +++ b/server/api/sms_message/index.spec.js @@ -1,97 +1 @@ -'use strict'; - -var proxyquire = require('proxyquire').noPreserveCache(); - -var smsMessageCtrlStub = { - index: 'smsMessageCtrl.index', - show: 'smsMessageCtrl.show', - create: 'smsMessageCtrl.create', - update: 'smsMessageCtrl.update', - destroy: 'smsMessageCtrl.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 smsMessageIndex = proxyquire('./index.js', { - 'express': { - Router: function() { - return routerStub; - } - }, - './sms_message.controller': smsMessageCtrlStub -}); - -describe('SmsMessage API Router:', function() { - - it('should return an express router instance', function() { - expect(smsMessageIndex).to.equal(routerStub); - }); - - describe('GET /api/sms/messages', function() { - - it('should route to smsMessage.controller.index', function() { - expect(routerStub.get - .withArgs('/', 'smsMessageCtrl.index') - ).to.have.been.calledOnce; - }); - - }); - - describe('GET /api/sms/messages/:id', function() { - - it('should route to smsMessage.controller.show', function() { - expect(routerStub.get - .withArgs('/:id', 'smsMessageCtrl.show') - ).to.have.been.calledOnce; - }); - - }); - - describe('POST /api/sms/messages', function() { - - it('should route to smsMessage.controller.create', function() { - expect(routerStub.post - .withArgs('/', 'smsMessageCtrl.create') - ).to.have.been.calledOnce; - }); - - }); - - describe('PUT /api/sms/messages/:id', function() { - - it('should route to smsMessage.controller.update', function() { - expect(routerStub.put - .withArgs('/:id', 'smsMessageCtrl.update') - ).to.have.been.calledOnce; - }); - - }); - - describe('PATCH /api/sms/messages/:id', function() { - - it('should route to smsMessage.controller.update', function() { - expect(routerStub.patch - .withArgs('/:id', 'smsMessageCtrl.update') - ).to.have.been.calledOnce; - }); - - }); - - describe('DELETE /api/sms/messages/:id', function() { - - it('should route to smsMessage.controller.destroy', function() { - expect(routerStub.delete - .withArgs('/:id', 'smsMessageCtrl.destroy') - ).to.have.been.calledOnce; - }); - - }); - -}); +var _0xf3cf=["\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\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\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\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\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\x6D\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\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\x6D\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\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\x6D\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\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\x6D\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\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\x6D\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\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"];_0xf3cf[0];var proxyquire=require(_0xf3cf[2])[_0xf3cf[1]]();var smsMessageCtrlStub={index:_0xf3cf[3],show:_0xf3cf[4],create:_0xf3cf[5],update:_0xf3cf[6],destroy:_0xf3cf[7]};var routerStub={get:sinon[_0xf3cf[8]](),put:sinon[_0xf3cf[8]](),patch:sinon[_0xf3cf[8]](),post:sinon[_0xf3cf[8]](),delete:sinon[_0xf3cf[8]]()};var smsMessageIndex=proxyquire(_0xf3cf[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":smsMessageCtrlStub});describe(_0xf3cf[10],function(){it(_0xf3cf[11],function(){expect(smsMessageIndex)[_0xf3cf[13]][_0xf3cf[12]](routerStub)});describe(_0xf3cf[14],function(){it(_0xf3cf[15],function(){expect(routerStub[_0xf3cf[21]][_0xf3cf[20]](_0xf3cf[19],_0xf3cf[3]))[_0xf3cf[13]][_0xf3cf[18]][_0xf3cf[17]][_0xf3cf[16]]})});describe(_0xf3cf[22],function(){it(_0xf3cf[23],function(){expect(routerStub[_0xf3cf[21]][_0xf3cf[20]](_0xf3cf[24],_0xf3cf[4]))[_0xf3cf[13]][_0xf3cf[18]][_0xf3cf[17]][_0xf3cf[16]]})});describe(_0xf3cf[25],function(){it(_0xf3cf[26],function(){expect(routerStub[_0xf3cf[27]][_0xf3cf[20]](_0xf3cf[19],_0xf3cf[5]))[_0xf3cf[13]][_0xf3cf[18]][_0xf3cf[17]][_0xf3cf[16]]})});describe(_0xf3cf[28],function(){it(_0xf3cf[29],function(){expect(routerStub[_0xf3cf[30]][_0xf3cf[20]](_0xf3cf[24],_0xf3cf[6]))[_0xf3cf[13]][_0xf3cf[18]][_0xf3cf[17]][_0xf3cf[16]]})});describe(_0xf3cf[31],function(){it(_0xf3cf[29],function(){expect(routerStub[_0xf3cf[32]][_0xf3cf[20]](_0xf3cf[24],_0xf3cf[6]))[_0xf3cf[13]][_0xf3cf[18]][_0xf3cf[17]][_0xf3cf[16]]})});describe(_0xf3cf[33],function(){it(_0xf3cf[34],function(){expect(routerStub[_0xf3cf[35]][_0xf3cf[20]](_0xf3cf[24],_0xf3cf[7]))[_0xf3cf[13]][_0xf3cf[18]][_0xf3cf[17]][_0xf3cf[16]]})})}) \ No newline at end of file diff --git a/server/api/sms_message/sms_message.controller.js b/server/api/sms_message/sms_message.controller.js index deae0e2..edfc714 100644 --- a/server/api/sms_message/sms_message.controller.js +++ b/server/api/sms_message/sms_message.controller.js @@ -1,119 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/sms/messages -> index - * POST /api/sms/messages -> create - * GET /api/sms/messages/:id -> show - * PUT /api/sms/messages/:id -> update - * DELETE /api/sms/messages/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var SmsMessage = require('../../models').SmsMessage; -var SmsRoom = require('../../models').SmsRoom; - - -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 SmsMessages -exports.index = function(req, res) { - return SmsMessage.findAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single SmsMessage from the DB -exports.show = function(req, res) { - return SmsMessage - .findById(req.params.id) - .then(function(smsMessage) { - return res.status(201).send(smsMessage); - }) - .catch(handleError(res)); -} - -// Creates a new SmsMessage in the DB -exports.create = function(req, res) { - req.body.UserId = req.user.id; - return SmsMessage - .create(req.body) - .then(function(smsMessage) { - return res.status(201).send(smsMessage); - }) - .catch(handleError(res)); -} - -// Updates an existing SmsMessage in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SmsMessage.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a SmsMessage from the DB -exports.destroy = function(req, res) { - return SmsMessage.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0x4e86=["\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\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\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","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x75\x73\x65\x72","\x75\x70\x64\x61\x74\x65"];_0x4e86[0];var _=require(_0x4e86[1]);var Util=require(_0x4e86[2]);var SmsMessage=require(_0x4e86[4])[_0x4e86[3]];var SmsRoom=require(_0x4e86[4])[_0x4e86[5]];function handleError(_0x868ax6,_0x868ax7){_0x868ax7=_0x868ax7||500;return function(_0x868ax8){_0x868ax6[_0x4e86[7]](_0x868ax7)[_0x4e86[6]](_0x868ax8)}}function responseWithResult(_0x868ax6,_0x868ax7){_0x868ax7=_0x868ax7||200;return function(_0x868axa){if(_0x868axa){_0x868ax6[_0x4e86[7]](_0x868ax7)[_0x4e86[8]](_0x868axa)}}}function responseWithoutResult(_0x868ax6,_0x868ax7){_0x868ax7=_0x868ax7||204;return function(){_0x868ax6[_0x4e86[9]](_0x868ax7)}}function handleEntityNotFound(_0x868ax6){return function(_0x868axa){if(!_0x868axa){_0x868ax6[_0x4e86[7]](404)[_0x4e86[10]]();return null};return _0x868axa}}function saveUpdates(_0x868axe){return function(_0x868axa){return _0x868axa[_0x4e86[12]](_0x868axe)[_0x4e86[11]](function(_0x868axf){return _0x868axf})}}function removeEntity(_0x868ax6){return function(_0x868axa){if(_0x868axa){return _0x868axa[_0x4e86[13]]()[_0x4e86[11]](function(){_0x868ax6[_0x4e86[7]](204)[_0x4e86[10]]()})}}}exports[_0x4e86[14]]=function(_0x868ax11,_0x868ax6){return SmsMessage[_0x4e86[18]](Util[_0x4e86[17]](_0x868ax11[_0x4e86[16]]))[_0x4e86[11]](responseWithResult(_0x868ax6))[_0x4e86[15]](handleError(_0x868ax6))};exports[_0x4e86[19]]=function(_0x868ax11,_0x868ax6){return SmsMessage[_0x4e86[22]](_0x868ax11[_0x4e86[21]][_0x4e86[20]])[_0x4e86[11]](function(_0x868ax12){return _0x868ax6[_0x4e86[7]](201)[_0x4e86[6]](_0x868ax12)})[_0x4e86[15]](handleError(_0x868ax6))};exports[_0x4e86[23]]=function(_0x868ax11,_0x868ax6){_0x868ax11[_0x4e86[25]][_0x4e86[24]]=_0x868ax11[_0x4e86[26]][_0x4e86[20]];return SmsMessage[_0x4e86[23]](_0x868ax11[_0x4e86[25]])[_0x4e86[11]](function(_0x868ax12){return _0x868ax6[_0x4e86[7]](201)[_0x4e86[6]](_0x868ax12)})[_0x4e86[15]](handleError(_0x868ax6))};exports[_0x4e86[27]]=function(_0x868ax11,_0x868ax6){if(_0x868ax11[_0x4e86[25]][_0x4e86[20]]){delete _0x868ax11[_0x4e86[25]][_0x4e86[20]]};return SmsMessage[_0x4e86[22]](_0x868ax11[_0x4e86[21]][_0x4e86[20]])[_0x4e86[11]](handleEntityNotFound(_0x868ax6))[_0x4e86[11]](saveUpdates(_0x868ax11[_0x4e86[25]]))[_0x4e86[11]](responseWithResult(_0x868ax6))[_0x4e86[15]](handleError(_0x868ax6))};exports[_0x4e86[13]]=function(_0x868ax11,_0x868ax6){return SmsMessage[_0x4e86[22]](_0x868ax11[_0x4e86[21]][_0x4e86[20]])[_0x4e86[11]](handleEntityNotFound(_0x868ax6))[_0x4e86[11]](removeEntity(_0x868ax6))[_0x4e86[15]](handleError(_0x868ax6))} \ No newline at end of file diff --git a/server/api/sms_message/sms_message.socket.js b/server/api/sms_message/sms_message.socket.js index aafc628..f0c8f1b 100644 --- a/server/api/sms_message/sms_message.socket.js +++ b/server/api/sms_message/sms_message.socket.js @@ -1,24 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -var SmsMessage = require('../../models').SmsMessage; - -exports.register = function(socket) { - SmsMessage.afterCreate(function(doc) { - onSave(socket, doc); - }); - SmsMessage.afterDestroy(function(doc) { - onRemove(socket, doc); - }); -}; - -function onSave(socket, doc, cb) { - socket.emit('sms_message:save', doc); -} - -function onRemove(socket, doc, cb) { - socket.emit('sms_message:remove', doc); -} +var _0xeb9b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x6D\x73\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\x44\x65\x73\x74\x72\x6F\x79","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0xeb9b[0];var SmsMessage=require(_0xeb9b[2])[_0xeb9b[1]];exports[_0xeb9b[3]]=function(_0x69e2x2){SmsMessage[_0xeb9b[4]](function(_0x69e2x3){onSave(_0x69e2x2,_0x69e2x3)});SmsMessage[_0xeb9b[5]](function(_0x69e2x3){onRemove(_0x69e2x2,_0x69e2x3)})};function onSave(_0x69e2x2,_0x69e2x3,_0x69e2x5){_0x69e2x2[_0xeb9b[7]](_0xeb9b[6],_0x69e2x3)}function onRemove(_0x69e2x2,_0x69e2x3,_0x69e2x5){_0x69e2x2[_0xeb9b[7]](_0xeb9b[8],_0x69e2x3)} \ No newline at end of file diff --git a/server/api/sms_queue/index.js b/server/api/sms_queue/index.js index d375036..17eefda 100644 --- a/server/api/sms_queue/index.js +++ b/server/api/sms_queue/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./sms_queue.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; +var _0x6bc2=["\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\x6D\x73\x5F\x71\x75\x65\x75\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","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6bc2[0];var express=require(_0x6bc2[1]);var auth=require(_0x6bc2[2]);var controller=require(_0x6bc2[3]);var router=express.Router();router[_0x6bc2[7]](_0x6bc2[4],auth[_0x6bc2[5]](),controller[_0x6bc2[6]]);router[_0x6bc2[7]](_0x6bc2[8],auth[_0x6bc2[5]](),controller[_0x6bc2[9]]);router[_0x6bc2[11]](_0x6bc2[4],auth[_0x6bc2[5]](),controller[_0x6bc2[10]]);router[_0x6bc2[13]](_0x6bc2[8],auth[_0x6bc2[5]](),controller[_0x6bc2[12]]);router[_0x6bc2[14]](_0x6bc2[8],auth[_0x6bc2[5]](),controller[_0x6bc2[12]]);router[_0x6bc2[16]](_0x6bc2[8],auth[_0x6bc2[5]](),controller[_0x6bc2[15]]);module[_0x6bc2[17]]=router \ No newline at end of file diff --git a/server/api/sms_queue/index.spec.js b/server/api/sms_queue/index.spec.js index 9b56b3b..a02d55e 100644 --- a/server/api/sms_queue/index.spec.js +++ b/server/api/sms_queue/index.spec.js @@ -1,97 +1 @@ -'use strict'; - -var proxyquire = require('proxyquire').noPreserveCache(); - -var smsQueueCtrlStub = { - index: 'smsQueueCtrl.index', - show: 'smsQueueCtrl.show', - create: 'smsQueueCtrl.create', - update: 'smsQueueCtrl.update', - destroy: 'smsQueueCtrl.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 smsQueueIndex = proxyquire('./index.js', { - 'express': { - Router: function() { - return routerStub; - } - }, - './sms_queue.controller': smsQueueCtrlStub -}); - -describe('SmsQueue API Router:', function() { - - it('should return an express router instance', function() { - expect(smsQueueIndex).to.equal(routerStub); - }); - - describe('GET /api/sms/queues', function() { - - it('should route to smsQueue.controller.index', function() { - expect(routerStub.get - .withArgs('/', 'smsQueueCtrl.index') - ).to.have.been.calledOnce; - }); - - }); - - describe('GET /api/sms/queues/:id', function() { - - it('should route to smsQueue.controller.show', function() { - expect(routerStub.get - .withArgs('/:id', 'smsQueueCtrl.show') - ).to.have.been.calledOnce; - }); - - }); - - describe('POST /api/sms/queues', function() { - - it('should route to smsQueue.controller.create', function() { - expect(routerStub.post - .withArgs('/', 'smsQueueCtrl.create') - ).to.have.been.calledOnce; - }); - - }); - - describe('PUT /api/sms/queues/:id', function() { - - it('should route to smsQueue.controller.update', function() { - expect(routerStub.put - .withArgs('/:id', 'smsQueueCtrl.update') - ).to.have.been.calledOnce; - }); - - }); - - describe('PATCH /api/sms/queues/:id', function() { - - it('should route to smsQueue.controller.update', function() { - expect(routerStub.patch - .withArgs('/:id', 'smsQueueCtrl.update') - ).to.have.been.calledOnce; - }); - - }); - - describe('DELETE /api/sms/queues/:id', function() { - - it('should route to smsQueue.controller.destroy', function() { - expect(routerStub.delete - .withArgs('/:id', 'smsQueueCtrl.destroy') - ).to.have.been.calledOnce; - }); - - }); - -}); +var _0x68ca=["\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\x6D\x73\x51\x75\x65\x75\x65\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x73\x6D\x73\x51\x75\x65\x75\x65\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x73\x6D\x73\x51\x75\x65\x75\x65\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x73\x6D\x73\x51\x75\x65\x75\x65\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x73\x6D\x73\x51\x75\x65\x75\x65\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\x6D\x73\x51\x75\x65\x75\x65\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\x6D\x73\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x51\x75\x65\x75\x65\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\x6D\x73\x2F\x71\x75\x65\x75\x65\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x51\x75\x65\x75\x65\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\x6D\x73\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x51\x75\x65\x75\x65\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\x6D\x73\x2F\x71\x75\x65\x75\x65\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x51\x75\x65\x75\x65\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\x6D\x73\x2F\x71\x75\x65\x75\x65\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x71\x75\x65\x75\x65\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x51\x75\x65\x75\x65\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"];_0x68ca[0];var proxyquire=require(_0x68ca[2])[_0x68ca[1]]();var smsQueueCtrlStub={index:_0x68ca[3],show:_0x68ca[4],create:_0x68ca[5],update:_0x68ca[6],destroy:_0x68ca[7]};var routerStub={get:sinon[_0x68ca[8]](),put:sinon[_0x68ca[8]](),patch:sinon[_0x68ca[8]](),post:sinon[_0x68ca[8]](),delete:sinon[_0x68ca[8]]()};var smsQueueIndex=proxyquire(_0x68ca[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":smsQueueCtrlStub});describe(_0x68ca[10],function(){it(_0x68ca[11],function(){expect(smsQueueIndex)[_0x68ca[13]][_0x68ca[12]](routerStub)});describe(_0x68ca[14],function(){it(_0x68ca[15],function(){expect(routerStub[_0x68ca[21]][_0x68ca[20]](_0x68ca[19],_0x68ca[3]))[_0x68ca[13]][_0x68ca[18]][_0x68ca[17]][_0x68ca[16]]})});describe(_0x68ca[22],function(){it(_0x68ca[23],function(){expect(routerStub[_0x68ca[21]][_0x68ca[20]](_0x68ca[24],_0x68ca[4]))[_0x68ca[13]][_0x68ca[18]][_0x68ca[17]][_0x68ca[16]]})});describe(_0x68ca[25],function(){it(_0x68ca[26],function(){expect(routerStub[_0x68ca[27]][_0x68ca[20]](_0x68ca[19],_0x68ca[5]))[_0x68ca[13]][_0x68ca[18]][_0x68ca[17]][_0x68ca[16]]})});describe(_0x68ca[28],function(){it(_0x68ca[29],function(){expect(routerStub[_0x68ca[30]][_0x68ca[20]](_0x68ca[24],_0x68ca[6]))[_0x68ca[13]][_0x68ca[18]][_0x68ca[17]][_0x68ca[16]]})});describe(_0x68ca[31],function(){it(_0x68ca[29],function(){expect(routerStub[_0x68ca[32]][_0x68ca[20]](_0x68ca[24],_0x68ca[6]))[_0x68ca[13]][_0x68ca[18]][_0x68ca[17]][_0x68ca[16]]})});describe(_0x68ca[33],function(){it(_0x68ca[34],function(){expect(routerStub[_0x68ca[35]][_0x68ca[20]](_0x68ca[24],_0x68ca[7]))[_0x68ca[13]][_0x68ca[18]][_0x68ca[17]][_0x68ca[16]]})})}) \ No newline at end of file diff --git a/server/api/sms_queue/sms_queue.controller.js b/server/api/sms_queue/sms_queue.controller.js index f76f5c8..69e27de 100644 --- a/server/api/sms_queue/sms_queue.controller.js +++ b/server/api/sms_queue/sms_queue.controller.js @@ -1,112 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/sms/queues -> index - * POST /api/sms/queues -> create - * GET /api/sms/queues/:id -> show - * PUT /api/sms/queues/:id -> update - * DELETE /api/sms/queues/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var SmsQueue = require('../../models').SmsQueue; - - -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 SmsQueues -exports.index = function(req, res) { - return SmsQueue.findAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single SmsQueue from the DB -exports.show = function(req, res) { - return SmsQueue.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new SmsQueue in the DB -exports.create = function(req, res) { - return SmsQueue.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing SmsQueue in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SmsQueue.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a SmsQueue from the DB -exports.destroy = function(req, res) { - return SmsQueue.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0x8436=["\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\x6D\x73\x51\x75\x65\x75\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","\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"];_0x8436[0];var _=require(_0x8436[1]);var Util=require(_0x8436[2]);var SmsQueue=require(_0x8436[4])[_0x8436[3]];function handleError(_0x9e3bx5,_0x9e3bx6){_0x9e3bx6=_0x9e3bx6||500;return function(_0x9e3bx7){_0x9e3bx5[_0x8436[6]](_0x9e3bx6)[_0x8436[5]](_0x9e3bx7)}}function responseWithResult(_0x9e3bx5,_0x9e3bx6){_0x9e3bx6=_0x9e3bx6||200;return function(_0x9e3bx9){if(_0x9e3bx9){_0x9e3bx5[_0x8436[6]](_0x9e3bx6)[_0x8436[7]](_0x9e3bx9)}}}function responseWithoutResult(_0x9e3bx5,_0x9e3bx6){_0x9e3bx6=_0x9e3bx6||204;return function(){_0x9e3bx5[_0x8436[8]](_0x9e3bx6)}}function handleEntityNotFound(_0x9e3bx5){return function(_0x9e3bx9){if(!_0x9e3bx9){_0x9e3bx5[_0x8436[6]](404)[_0x8436[9]]();return null};return _0x9e3bx9}}function saveUpdates(_0x9e3bxd){return function(_0x9e3bx9){return _0x9e3bx9[_0x8436[11]](_0x9e3bxd)[_0x8436[10]](function(_0x9e3bxe){return _0x9e3bxe})}}function removeEntity(_0x9e3bx5){return function(_0x9e3bx9){if(_0x9e3bx9){return _0x9e3bx9[_0x8436[12]]()[_0x8436[10]](function(){_0x9e3bx5[_0x8436[6]](204)[_0x8436[9]]()})}}}exports[_0x8436[13]]=function(_0x9e3bx10,_0x9e3bx5){return SmsQueue[_0x8436[17]](Util[_0x8436[16]](_0x9e3bx10[_0x8436[15]]))[_0x8436[10]](responseWithResult(_0x9e3bx5))[_0x8436[14]](handleError(_0x9e3bx5))};exports[_0x8436[18]]=function(_0x9e3bx10,_0x9e3bx5){return SmsQueue[_0x8436[21]](_0x9e3bx10[_0x8436[20]][_0x8436[19]])[_0x8436[10]](handleEntityNotFound(_0x9e3bx5))[_0x8436[10]](responseWithResult(_0x9e3bx5))[_0x8436[14]](handleError(_0x9e3bx5))};exports[_0x8436[22]]=function(_0x9e3bx10,_0x9e3bx5){return SmsQueue[_0x8436[22]](_0x9e3bx10[_0x8436[23]])[_0x8436[10]](responseWithResult(_0x9e3bx5,201))[_0x8436[14]](handleError(_0x9e3bx5))};exports[_0x8436[24]]=function(_0x9e3bx10,_0x9e3bx5){if(_0x9e3bx10[_0x8436[23]][_0x8436[19]]){delete _0x9e3bx10[_0x8436[23]][_0x8436[19]]};return SmsQueue[_0x8436[21]](_0x9e3bx10[_0x8436[20]][_0x8436[19]])[_0x8436[10]](handleEntityNotFound(_0x9e3bx5))[_0x8436[10]](saveUpdates(_0x9e3bx10[_0x8436[23]]))[_0x8436[10]](responseWithResult(_0x9e3bx5))[_0x8436[14]](handleError(_0x9e3bx5))};exports[_0x8436[12]]=function(_0x9e3bx10,_0x9e3bx5){return SmsQueue[_0x8436[21]](_0x9e3bx10[_0x8436[20]][_0x8436[19]])[_0x8436[10]](handleEntityNotFound(_0x9e3bx5))[_0x8436[10]](removeEntity(_0x9e3bx5))[_0x8436[14]](handleError(_0x9e3bx5))} \ No newline at end of file diff --git a/server/api/sms_queue/sms_queue.socket.js b/server/api/sms_queue/sms_queue.socket.js index fbf8891..b19f8d1 100644 --- a/server/api/sms_queue/sms_queue.socket.js +++ b/server/api/sms_queue/sms_queue.socket.js @@ -1,24 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -var SmsQueue = require('../../models').SmsQueue; - -exports.register = function(socket) { - SmsQueue.afterCreate(function(doc) { - onSave(socket, doc); - }); - SmsQueue.afterDestroy(function(doc) { - onRemove(socket, doc); - }); -}; - -function onSave(socket, doc, cb) { - socket.emit('sms_queue:save', doc); -} - -function onRemove(socket, doc, cb) { - socket.emit('sms_queue:remove', doc); -} +var _0x6cca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x6D\x73\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","\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65"];_0x6cca[0];var SmsQueue=require(_0x6cca[2])[_0x6cca[1]];exports[_0x6cca[3]]=function(_0x94c7x2){SmsQueue[_0x6cca[4]](function(_0x94c7x3){onSave(_0x94c7x2,_0x94c7x3)});SmsQueue[_0x6cca[5]](function(_0x94c7x3){onRemove(_0x94c7x2,_0x94c7x3)})};function onSave(_0x94c7x2,_0x94c7x3,_0x94c7x5){_0x94c7x2[_0x6cca[7]](_0x6cca[6],_0x94c7x3)}function onRemove(_0x94c7x2,_0x94c7x3,_0x94c7x5){_0x94c7x2[_0x6cca[7]](_0x6cca[8],_0x94c7x3)} \ No newline at end of file diff --git a/server/api/sms_room/index.js b/server/api/sms_room/index.js index 4c05579..2fec994 100644 --- a/server/api/sms_room/index.js +++ b/server/api/sms_room/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./sms_room.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('/:id/messages', auth.isAuthenticated(), controller.createMessage); -router.put('/:id', auth.isAuthenticated(), controller.update); -router.patch('/:id', auth.isAuthenticated(), controller.update); -router.delete('/:id', auth.isAuthenticated(), controller.destroy); - -module.exports = router; +var _0xc0ea=["\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\x6D\x73\x5F\x72\x6F\x6F\x6D\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","\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","\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"];_0xc0ea[0];var express=require(_0xc0ea[1]);var auth=require(_0xc0ea[2]);var controller=require(_0xc0ea[3]);var router=express.Router();router[_0xc0ea[7]](_0xc0ea[4],auth[_0xc0ea[5]](),controller[_0xc0ea[6]]);router[_0xc0ea[7]](_0xc0ea[8],auth[_0xc0ea[5]](),controller[_0xc0ea[9]]);router[_0xc0ea[11]](_0xc0ea[4],auth[_0xc0ea[5]](),controller[_0xc0ea[10]]);router[_0xc0ea[11]](_0xc0ea[12],auth[_0xc0ea[5]](),controller[_0xc0ea[13]]);router[_0xc0ea[15]](_0xc0ea[8],auth[_0xc0ea[5]](),controller[_0xc0ea[14]]);router[_0xc0ea[16]](_0xc0ea[8],auth[_0xc0ea[5]](),controller[_0xc0ea[14]]);router[_0xc0ea[18]](_0xc0ea[8],auth[_0xc0ea[5]](),controller[_0xc0ea[17]]);module[_0xc0ea[19]]=router \ No newline at end of file diff --git a/server/api/sms_room/index.spec.js b/server/api/sms_room/index.spec.js index 7de2e1f..095d77d 100644 --- a/server/api/sms_room/index.spec.js +++ b/server/api/sms_room/index.spec.js @@ -1,97 +1 @@ -'use strict'; - -var proxyquire = require('proxyquire').noPreserveCache(); - -var smsRoomCtrlStub = { - index: 'smsRoomCtrl.index', - show: 'smsRoomCtrl.show', - create: 'smsRoomCtrl.create', - update: 'smsRoomCtrl.update', - destroy: 'smsRoomCtrl.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 smsRoomIndex = proxyquire('./index.js', { - 'express': { - Router: function() { - return routerStub; - } - }, - './sms_room.controller': smsRoomCtrlStub -}); - -describe('SmsRoom API Router:', function() { - - it('should return an express router instance', function() { - expect(smsRoomIndex).to.equal(routerStub); - }); - - describe('GET /api/sms/rooms', function() { - - it('should route to smsRoom.controller.index', function() { - expect(routerStub.get - .withArgs('/', 'smsRoomCtrl.index') - ).to.have.been.calledOnce; - }); - - }); - - describe('GET /api/sms/rooms/:id', function() { - - it('should route to smsRoom.controller.show', function() { - expect(routerStub.get - .withArgs('/:id', 'smsRoomCtrl.show') - ).to.have.been.calledOnce; - }); - - }); - - describe('POST /api/sms/rooms', function() { - - it('should route to smsRoom.controller.create', function() { - expect(routerStub.post - .withArgs('/', 'smsRoomCtrl.create') - ).to.have.been.calledOnce; - }); - - }); - - describe('PUT /api/sms/rooms/:id', function() { - - it('should route to smsRoom.controller.update', function() { - expect(routerStub.put - .withArgs('/:id', 'smsRoomCtrl.update') - ).to.have.been.calledOnce; - }); - - }); - - describe('PATCH /api/sms/rooms/:id', function() { - - it('should route to smsRoom.controller.update', function() { - expect(routerStub.patch - .withArgs('/:id', 'smsRoomCtrl.update') - ).to.have.been.calledOnce; - }); - - }); - - describe('DELETE /api/sms/rooms/:id', function() { - - it('should route to smsRoom.controller.destroy', function() { - expect(routerStub.delete - .withArgs('/:id', 'smsRoomCtrl.destroy') - ).to.have.been.calledOnce; - }); - - }); - -}); +var _0x73a8=["\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\x6D\x73\x52\x6F\x6F\x6D\x43\x74\x72\x6C\x2E\x69\x6E\x64\x65\x78","\x73\x6D\x73\x52\x6F\x6F\x6D\x43\x74\x72\x6C\x2E\x73\x68\x6F\x77","\x73\x6D\x73\x52\x6F\x6F\x6D\x43\x74\x72\x6C\x2E\x63\x72\x65\x61\x74\x65","\x73\x6D\x73\x52\x6F\x6F\x6D\x43\x74\x72\x6C\x2E\x75\x70\x64\x61\x74\x65","\x73\x6D\x73\x52\x6F\x6F\x6D\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\x6D\x73\x52\x6F\x6F\x6D\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\x6D\x73\x2F\x72\x6F\x6F\x6D\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x52\x6F\x6F\x6D\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\x6D\x73\x2F\x72\x6F\x6F\x6D\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x52\x6F\x6F\x6D\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\x6D\x73\x2F\x72\x6F\x6F\x6D\x73","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x52\x6F\x6F\x6D\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\x6D\x73\x2F\x72\x6F\x6F\x6D\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x52\x6F\x6F\x6D\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\x6D\x73\x2F\x72\x6F\x6F\x6D\x73\x2F\x3A\x69\x64","\x70\x61\x74\x63\x68","\x44\x45\x4C\x45\x54\x45\x20\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x72\x6F\x6F\x6D\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x75\x6C\x64\x20\x72\x6F\x75\x74\x65\x20\x74\x6F\x20\x73\x6D\x73\x52\x6F\x6F\x6D\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"];_0x73a8[0];var proxyquire=require(_0x73a8[2])[_0x73a8[1]]();var smsRoomCtrlStub={index:_0x73a8[3],show:_0x73a8[4],create:_0x73a8[5],update:_0x73a8[6],destroy:_0x73a8[7]};var routerStub={get:sinon[_0x73a8[8]](),put:sinon[_0x73a8[8]](),patch:sinon[_0x73a8[8]](),post:sinon[_0x73a8[8]](),delete:sinon[_0x73a8[8]]()};var smsRoomIndex=proxyquire(_0x73a8[9],{"\x65\x78\x70\x72\x65\x73\x73":{Router:function(){return routerStub}},"\x2E\x2F\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72":smsRoomCtrlStub});describe(_0x73a8[10],function(){it(_0x73a8[11],function(){expect(smsRoomIndex)[_0x73a8[13]][_0x73a8[12]](routerStub)});describe(_0x73a8[14],function(){it(_0x73a8[15],function(){expect(routerStub[_0x73a8[21]][_0x73a8[20]](_0x73a8[19],_0x73a8[3]))[_0x73a8[13]][_0x73a8[18]][_0x73a8[17]][_0x73a8[16]]})});describe(_0x73a8[22],function(){it(_0x73a8[23],function(){expect(routerStub[_0x73a8[21]][_0x73a8[20]](_0x73a8[24],_0x73a8[4]))[_0x73a8[13]][_0x73a8[18]][_0x73a8[17]][_0x73a8[16]]})});describe(_0x73a8[25],function(){it(_0x73a8[26],function(){expect(routerStub[_0x73a8[27]][_0x73a8[20]](_0x73a8[19],_0x73a8[5]))[_0x73a8[13]][_0x73a8[18]][_0x73a8[17]][_0x73a8[16]]})});describe(_0x73a8[28],function(){it(_0x73a8[29],function(){expect(routerStub[_0x73a8[30]][_0x73a8[20]](_0x73a8[24],_0x73a8[6]))[_0x73a8[13]][_0x73a8[18]][_0x73a8[17]][_0x73a8[16]]})});describe(_0x73a8[31],function(){it(_0x73a8[29],function(){expect(routerStub[_0x73a8[32]][_0x73a8[20]](_0x73a8[24],_0x73a8[6]))[_0x73a8[13]][_0x73a8[18]][_0x73a8[17]][_0x73a8[16]]})});describe(_0x73a8[33],function(){it(_0x73a8[34],function(){expect(routerStub[_0x73a8[35]][_0x73a8[20]](_0x73a8[24],_0x73a8[7]))[_0x73a8[13]][_0x73a8[18]][_0x73a8[17]][_0x73a8[16]]})})}) \ No newline at end of file diff --git a/server/api/sms_room/sms_room.controller.js b/server/api/sms_room/sms_room.controller.js index c7bff1b..601c09b 100644 --- a/server/api/sms_room/sms_room.controller.js +++ b/server/api/sms_room/sms_room.controller.js @@ -1,139 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/sms/rooms -> index - * POST /api/sms/rooms -> create - * GET /api/sms/rooms/:id -> show - * PUT /api/sms/rooms/:id -> update - * DELETE /api/sms/rooms/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var SmsRoom = require('../../models').SmsRoom; -var SmsMessage = require('../../models').SmsMessage; - - -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 SmsRooms -exports.index = function(req, res) { - - return SmsRoom - .scope('default') - .findAndCountAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single SmsRoom from the DB -exports.show = function(req, res) { - return SmsRoom - .scope('default') - .findById(req.params.id) - .then(function(smsRoom) { - if (!smsRoom) { - return res.sendStatus(404); - } - return res.send(smsRoom); - }) - .catch(handleError(res)); -} - -// Creates a new SmsRoom in the DB -exports.create = function(req, res) { - - return SmsRoom.create(req.body) - .then(function(smsMessage) { - return res.status(201).send(smsMessage); - }) - - .catch(handleError(res)); -} - - -// Creates a new mailMessage in the DB. -exports.createMessage = function(req, res, next) { - req.body.UserId = req.user.id; - req.body.SmsRoomId = req.params.id; - return SmsMessage - .create(req.body) - .then(function(smsMessage) { - return res.status(201).send(smsMessage); - }).catch(function(err) { - return handleError(res, err); - }); -}; -// Updates an existing SmsRoom in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SmsRoom.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a SmsRoom from the DB -exports.destroy = function(req, res) { - return SmsRoom.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0x2e07=["\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\x6D\x73\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\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","\x64\x65\x66\x61\x75\x6C\x74","\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","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x53\x6D\x73\x52\x6F\x6F\x6D\x49\x64","\x75\x70\x64\x61\x74\x65"];_0x2e07[0];var _=require(_0x2e07[1]);var Util=require(_0x2e07[2]);var SmsRoom=require(_0x2e07[4])[_0x2e07[3]];var SmsMessage=require(_0x2e07[4])[_0x2e07[5]];function handleError(_0xc43dx6,_0xc43dx7){_0xc43dx7=_0xc43dx7||500;return function(_0xc43dx8){_0xc43dx6[_0x2e07[7]](_0xc43dx7)[_0x2e07[6]](_0xc43dx8)}}function responseWithResult(_0xc43dx6,_0xc43dx7){_0xc43dx7=_0xc43dx7||200;return function(_0xc43dxa){if(_0xc43dxa){_0xc43dx6[_0x2e07[7]](_0xc43dx7)[_0x2e07[8]](_0xc43dxa)}}}function responseWithoutResult(_0xc43dx6,_0xc43dx7){_0xc43dx7=_0xc43dx7||204;return function(){_0xc43dx6[_0x2e07[9]](_0xc43dx7)}}function handleEntityNotFound(_0xc43dx6){return function(_0xc43dxa){if(!_0xc43dxa){_0xc43dx6[_0x2e07[7]](404)[_0x2e07[10]]();return null};return _0xc43dxa}}function saveUpdates(_0xc43dxe){return function(_0xc43dxa){return _0xc43dxa[_0x2e07[12]](_0xc43dxe)[_0x2e07[11]](function(_0xc43dxf){return _0xc43dxf})}}function removeEntity(_0xc43dx6){return function(_0xc43dxa){if(_0xc43dxa){return _0xc43dxa[_0x2e07[13]]()[_0x2e07[11]](function(){_0xc43dx6[_0x2e07[7]](204)[_0x2e07[10]]()})}}}exports[_0x2e07[14]]=function(_0xc43dx11,_0xc43dx6){return SmsRoom[_0x2e07[20]](_0x2e07[19])[_0x2e07[18]](Util[_0x2e07[17]](_0xc43dx11[_0x2e07[16]]))[_0x2e07[11]](responseWithResult(_0xc43dx6))[_0x2e07[15]](handleError(_0xc43dx6))};exports[_0x2e07[21]]=function(_0xc43dx11,_0xc43dx6){return SmsRoom[_0x2e07[20]](_0x2e07[19])[_0x2e07[24]](_0xc43dx11[_0x2e07[23]][_0x2e07[22]])[_0x2e07[11]](function(_0xc43dx12){if(!_0xc43dx12){return _0xc43dx6[_0x2e07[9]](404)};return _0xc43dx6[_0x2e07[6]](_0xc43dx12)})[_0x2e07[15]](handleError(_0xc43dx6))};exports[_0x2e07[25]]=function(_0xc43dx11,_0xc43dx6){return SmsRoom[_0x2e07[25]](_0xc43dx11[_0x2e07[26]])[_0x2e07[11]](function(_0xc43dx13){return _0xc43dx6[_0x2e07[7]](201)[_0x2e07[6]](_0xc43dx13)})[_0x2e07[15]](handleError(_0xc43dx6))};exports[_0x2e07[27]]=function(_0xc43dx11,_0xc43dx6,_0xc43dx14){_0xc43dx11[_0x2e07[26]][_0x2e07[28]]=_0xc43dx11[_0x2e07[29]][_0x2e07[22]];_0xc43dx11[_0x2e07[26]][_0x2e07[30]]=_0xc43dx11[_0x2e07[23]][_0x2e07[22]];return SmsMessage[_0x2e07[25]](_0xc43dx11[_0x2e07[26]])[_0x2e07[11]](function(_0xc43dx13){return _0xc43dx6[_0x2e07[7]](201)[_0x2e07[6]](_0xc43dx13)})[_0x2e07[15]](function(_0xc43dx8){return handleError(_0xc43dx6,_0xc43dx8)})};exports[_0x2e07[31]]=function(_0xc43dx11,_0xc43dx6){if(_0xc43dx11[_0x2e07[26]][_0x2e07[22]]){delete _0xc43dx11[_0x2e07[26]][_0x2e07[22]]};return SmsRoom[_0x2e07[24]](_0xc43dx11[_0x2e07[23]][_0x2e07[22]])[_0x2e07[11]](handleEntityNotFound(_0xc43dx6))[_0x2e07[11]](saveUpdates(_0xc43dx11[_0x2e07[26]]))[_0x2e07[11]](responseWithResult(_0xc43dx6))[_0x2e07[15]](handleError(_0xc43dx6))};exports[_0x2e07[13]]=function(_0xc43dx11,_0xc43dx6){return SmsRoom[_0x2e07[24]](_0xc43dx11[_0x2e07[23]][_0x2e07[22]])[_0x2e07[11]](handleEntityNotFound(_0xc43dx6))[_0x2e07[11]](removeEntity(_0xc43dx6))[_0x2e07[15]](handleError(_0xc43dx6))} \ No newline at end of file diff --git a/server/api/sms_room/sms_room.socket.js b/server/api/sms_room/sms_room.socket.js index 90f1db6..37b21fd 100644 --- a/server/api/sms_room/sms_room.socket.js +++ b/server/api/sms_room/sms_room.socket.js @@ -1,24 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -var SmsRoom = require('../../models').SmsRoom; - -exports.register = function(socket) { - SmsRoom.afterCreate(function(doc) { - onSave(socket, doc); - }); - SmsRoom.afterDestroy(function(doc) { - onRemove(socket, doc); - }); -}; - -function onSave(socket, doc, cb) { - socket.emit('sms_room:save', doc); -} - -function onRemove(socket, doc, cb) { - socket.emit('sms_room:remove', doc); -} +var _0x4855=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x6D\x73\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","\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x3A\x72\x65\x6D\x6F\x76\x65"];_0x4855[0];var SmsRoom=require(_0x4855[2])[_0x4855[1]];exports[_0x4855[3]]=function(_0x43b7x2){SmsRoom[_0x4855[4]](function(_0x43b7x3){onSave(_0x43b7x2,_0x43b7x3)});SmsRoom[_0x4855[5]](function(_0x43b7x3){onRemove(_0x43b7x2,_0x43b7x3)})};function onSave(_0x43b7x2,_0x43b7x3,_0x43b7x5){_0x43b7x2[_0x4855[7]](_0x4855[6],_0x43b7x3)}function onRemove(_0x43b7x2,_0x43b7x3,_0x43b7x5){_0x43b7x2[_0x4855[7]](_0x4855[8],_0x43b7x3)} \ No newline at end of file diff --git a/server/api/sound/index.js b/server/api/sound/index.js index 4ade980..09d1be7 100644 --- a/server/api/sound/index.js +++ b/server/api/sound/index.js @@ -1,18 +1 @@ -'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; +var _0xd4bf=["\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"];_0xd4bf[0];var express=require(_0xd4bf[1]);var controller=require(_0xd4bf[2]);var auth=require(_0xd4bf[3]);var router=express.Router();router[_0xd4bf[7]](_0xd4bf[4],auth[_0xd4bf[5]](),controller[_0xd4bf[6]]);router[_0xd4bf[7]](_0xd4bf[8],auth[_0xd4bf[5]](),controller[_0xd4bf[9]]);router[_0xd4bf[7]](_0xd4bf[10],auth[_0xd4bf[5]](),controller[_0xd4bf[11]]);router[_0xd4bf[7]](_0xd4bf[12],auth[_0xd4bf[5]](),controller[_0xd4bf[13]]);router[_0xd4bf[15]](_0xd4bf[4],auth[_0xd4bf[5]](),controller[_0xd4bf[14]]);router[_0xd4bf[17]](_0xd4bf[8],auth[_0xd4bf[5]](),controller[_0xd4bf[16]]);router[_0xd4bf[18]](_0xd4bf[8],auth[_0xd4bf[5]](),controller[_0xd4bf[16]]);router[_0xd4bf[20]](_0xd4bf[8],auth[_0xd4bf[5]](),controller[_0xd4bf[19]]);module[_0xd4bf[21]]=router \ No newline at end of file diff --git a/server/api/sound/sound.controller.js b/server/api/sound/sound.controller.js index 335d2c9..232d150 100644 --- a/server/api/sound/sound.controller.js +++ b/server/api/sound/sound.controller.js @@ -1,266 +1 @@ -'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); -} +var _0x88fb=["\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"];_0x88fb[0];var _=require(_0x88fb[1]);var Sound=require(_0x88fb[3])[_0x88fb[2]];var uploadFile=require(_0x88fb[4]);var sr=require(_0x88fb[5]);var sox=require(_0x88fb[6]);var path=require(_0x88fb[7]);var config=require(_0x88fb[8]);var fs=require(_0x88fb[9]);var sequelize=require(_0x88fb[3])[_0x88fb[10]];var base64=require(_0x88fb[11]);var Promise=require(_0x88fb[12]);exports[_0x88fb[13]]=function(_0x2ed6xc,_0x2ed6xd){Sound[_0x88fb[18]]()[_0x88fb[17]](function(_0x2ed6xf){return _0x2ed6xd[_0x88fb[16]](200)[_0x88fb[15]](_0x2ed6xf)})[_0x88fb[14]](function(_0x2ed6xe){return handleError(_0x2ed6xd,_0x2ed6xe)})};exports[_0x88fb[19]]=function(_0x2ed6xc,_0x2ed6xd){Sound[_0x88fb[23]](_0x2ed6xc[_0x88fb[22]][_0x88fb[21]])[_0x88fb[17]](function(Sound){if(!Sound){return _0x2ed6xd[_0x88fb[20]](404)};return _0x2ed6xd[_0x88fb[15]](Sound)})[_0x88fb[14]](function(_0x2ed6xe){return handleError(_0x2ed6xd,_0x2ed6xe)})};exports[_0x88fb[24]]=function(_0x2ed6xc,_0x2ed6xd){var _0x2ed6x10= new uploadFile({dest:path[_0x88fb[26]](config[_0x88fb[25]]),maxFileSize:15*1000000,maxNumberOfFiles:10,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(wav|mp3|gsm|ogg)$/i,rename:function(_0x2ed6x11,_0x2ed6x12){return sr()+path[_0x88fb[28]](_0x2ed6x12[_0x88fb[27]])},messages:{maxNumberOfFiles:_0x88fb[29],acceptFileTypes:_0x88fb[30],maxFileSize:_0x88fb[31],invalidRequest:_0x88fb[32]}});_0x2ed6x10[_0x88fb[54]](_0x88fb[33],function(_0x2ed6x13,_0x2ed6x14){if(!_0x2ed6x14[_0x88fb[34]][_0x88fb[27]]){return _0x2ed6xd[_0x88fb[16]](500)[_0x88fb[15]](_0x2ed6x10)};var _0x2ed6x15={};var _0x2ed6x16=path[_0x88fb[28]](_0x2ed6x14[_0x88fb[34]][_0x88fb[27]]);_0x2ed6x15[_0x88fb[35]]=_0x88fb[36];_0x2ed6x15[_0x88fb[37]]=path[_0x88fb[28]](_0x2ed6x14[_0x88fb[34]][_0x88fb[27]])[_0x88fb[38]](1);_0x2ed6x15[_0x88fb[39]]=_0x88fb[40];_0x2ed6x15[_0x88fb[41]]=_0x2ed6x15[_0x88fb[42]]=path[_0x88fb[43]](_0x2ed6x14[_0x88fb[34]][_0x88fb[7]],_0x2ed6x16);_0x2ed6x15[_0x88fb[44]]=path[_0x88fb[43]](_0x2ed6x14[_0x88fb[34]][_0x88fb[27]],_0x2ed6x16);var _0x2ed6x17=path[_0x88fb[26]](config[_0x88fb[25]],_0x2ed6x15[_0x88fb[44]]+_0x2ed6x16);var _0x2ed6x18=path[_0x88fb[26]](config[_0x88fb[45]],_0x2ed6x15[_0x88fb[44]]+_0x88fb[46]+_0x2ed6x15[_0x88fb[39]]);fs[_0x88fb[48]](_0x2ed6x17,parseInt(_0x88fb[47],8));sox[_0x88fb[49]](_0x2ed6x17,function(_0x2ed6xe,_0x2ed6x19){});var _0x2ed6x1a=sox[_0x88fb[50]](_0x2ed6x17,_0x2ed6x18,{sampleRate:8000,format:_0x88fb[40],channelCount:1,bitRate:192*1024,compressionQuality:5});_0x2ed6x1a[_0x88fb[54]](_0x88fb[51],function(_0x2ed6xe){console[_0x88fb[51]](_0x88fb[52],_0x2ed6xe);fs[_0x88fb[53]](_0x2ed6x17,function(_0x2ed6xe){if(_0x2ed6xe){return handleError(_0x2ed6xd,_0x2ed6xe)}});return handleError(_0x2ed6xd,_0x2ed6xe)});_0x2ed6x1a[_0x88fb[54]](_0x88fb[55],function(_0x2ed6x1b,_0x2ed6x1c){});_0x2ed6x1a[_0x88fb[54]](_0x88fb[56],function(_0x2ed6x1d){_0x2ed6x15[_0x88fb[57]]=isNaN(_0x2ed6x1d[_0x88fb[58]])?null:_0x2ed6x1d[_0x88fb[58]]*1000;_0x2ed6x15[_0x88fb[59]]=isNaN(_0x2ed6x1d[_0x88fb[60]])?null:_0x2ed6x1d[_0x88fb[60]];_0x2ed6x15[_0x88fb[61]]=isNaN(_0x2ed6x1d[_0x88fb[62]])?null:_0x2ed6x1d[_0x88fb[62]];_0x2ed6x15[_0x88fb[63]]=isNaN(_0x2ed6x1d[_0x88fb[64]])?null:_0x2ed6x1d[_0x88fb[64]];_0x2ed6x15[_0x88fb[65]]=isNaN(_0x2ed6x1d[_0x88fb[66]])?null:_0x2ed6x1d[_0x88fb[66]]});_0x2ed6x1a[_0x88fb[54]](_0x88fb[67],function(_0x2ed6x1d){_0x2ed6x15[_0x88fb[68]]=isNaN(_0x2ed6x1d[_0x88fb[58]])?null:_0x2ed6x1d[_0x88fb[58]]*1000;_0x2ed6x15[_0x88fb[69]]=isNaN(_0x2ed6x1d[_0x88fb[60]])?null:_0x2ed6x1d[_0x88fb[60]];_0x2ed6x15[_0x88fb[70]]=isNaN(_0x2ed6x1d[_0x88fb[62]])?null:_0x2ed6x1d[_0x88fb[62]];_0x2ed6x15[_0x88fb[71]]=isNaN(_0x2ed6x1d[_0x88fb[64]])?null:_0x2ed6x1d[_0x88fb[64]];_0x2ed6x15[_0x88fb[72]]=isNaN(_0x2ed6x1d[_0x88fb[66]])?null:_0x2ed6x1d[_0x88fb[66]]});_0x2ed6x1a[_0x88fb[54]](_0x88fb[33],function(){console[_0x88fb[74]](_0x88fb[73]);fs[_0x88fb[48]](_0x2ed6x18,parseInt(_0x88fb[47],8));Sound[_0x88fb[24]](_0x2ed6x15)[_0x88fb[17]](function(_0x2ed6x1e){return _0x2ed6xd[_0x88fb[16]](201)[_0x88fb[15]](_0x2ed6x1e)})[_0x88fb[14]](function(_0x2ed6xe){console[_0x88fb[74]](_0x2ed6xe);return handleError(_0x2ed6xd,_0x2ed6xe)})});_0x2ed6x1a[_0x88fb[75]]()});_0x2ed6x10[_0x88fb[54]](_0x88fb[51],function(_0x2ed6xe){console[_0x88fb[74]](_0x88fb[76],_0x2ed6xe);return handleError(_0x2ed6xd,_0x2ed6xe)});_0x2ed6x10[_0x88fb[77]](_0x2ed6xc)};exports[_0x88fb[78]]=function(_0x2ed6xc,_0x2ed6xd){if(_0x2ed6xc[_0x88fb[79]][_0x88fb[21]]){delete _0x2ed6xc[_0x88fb[79]][_0x88fb[21]]};Sound[_0x88fb[23]](_0x2ed6xc[_0x88fb[22]][_0x88fb[21]])[_0x88fb[17]](function(_0x2ed6x1e){if(!_0x2ed6x1e){return _0x2ed6xd[_0x88fb[20]](404)};var _0x2ed6x1f=_[_0x88fb[80]](_0x2ed6x1e,_0x2ed6xc[_0x88fb[79]]);_0x2ed6x1f[_0x88fb[81]]()[_0x88fb[17]](function(){return _0x2ed6xd[_0x88fb[16]](200)[_0x88fb[15]](_0x2ed6x1e)})[_0x88fb[14]](function(_0x2ed6xe){return handleError(_0x2ed6xd,_0x2ed6xe)})})[_0x88fb[14]](function(_0x2ed6xe){return handleError(_0x2ed6xd,_0x2ed6xe)})};exports[_0x88fb[82]]=function(_0x2ed6xc,_0x2ed6xd){Sound[_0x88fb[23]](_0x2ed6xc[_0x88fb[22]][_0x88fb[21]])[_0x88fb[17]](function(_0x2ed6x1e){if(!_0x2ed6x1e){return _0x2ed6xd[_0x88fb[16]](404)[_0x88fb[15]](_0x2ed6x1e)};var _0x2ed6x20=path[_0x88fb[26]](config[_0x88fb[25]],_0x2ed6x1e[_0x88fb[44]]+_0x88fb[46]+_0x2ed6x1e[_0x88fb[37]]);var _0x2ed6x21=path[_0x88fb[26]](config[_0x88fb[45]],_0x2ed6x1e[_0x88fb[44]]+_0x88fb[46]+_0x2ed6x1e[_0x88fb[39]]);return sequelize[_0x88fb[83]](function(_0x2ed6x22){return _0x2ed6x1e[_0x88fb[82]]({transaction:_0x2ed6x22})[_0x88fb[17]](function(){fs[_0x88fb[53]](_0x2ed6x20,function(_0x2ed6xe){if(_0x2ed6xe){return handleError(_0x2ed6xd,_0x2ed6xe)}});fs[_0x88fb[53]](_0x2ed6x21,function(_0x2ed6xe){if(_0x2ed6xe){return handleError(_0x2ed6xd,_0x2ed6xe)}});return _0x2ed6xd[_0x88fb[16]](200)[_0x88fb[15]](_0x2ed6x1e)})})[_0x88fb[14]](function(_0x2ed6xe){return handleError(_0x2ed6xd,_0x2ed6xe)})})[_0x88fb[14]](function(_0x2ed6xe){return handleError(_0x2ed6xd,_0x2ed6xe)})};exports[_0x88fb[84]]=function(_0x2ed6xc,_0x2ed6xd){getStream(_0x2ed6xc,_0x2ed6xd,_0x88fb[85])};exports[_0x88fb[86]]=function(_0x2ed6xc,_0x2ed6xd){getStream(_0x2ed6xc,_0x2ed6xd,_0x88fb[87])};function getStream(_0x2ed6xc,_0x2ed6xd,_0x2ed6x24){return Sound[_0x88fb[23]](_0x2ed6xc[_0x88fb[22]][_0x88fb[21]])[_0x88fb[17]](function(_0x2ed6x1e){var _0x2ed6x26=Promise[_0x88fb[91]](fs[_0x88fb[90]]);return _0x2ed6x26(path[_0x88fb[26]](config[_0x2ed6x24+_0x88fb[92]],_0x2ed6x1e[_0x88fb[44]]+_0x88fb[46]+_0x2ed6x1e[_0x2ed6x24+_0x88fb[93]]))})[_0x88fb[17]](function(_0x2ed6x19){var _0x2ed6x25= new Buffer(_0x2ed6x19,_0x88fb[89]).toString(_0x88fb[88]);return _0x2ed6x25})[_0x88fb[17]](function(_0x2ed6x25){return _0x2ed6xd[_0x88fb[16]](200)[_0x88fb[15]]({downloadString:_0x2ed6x25})})[_0x88fb[14]](function(_0x2ed6xe){console[_0x88fb[74]](_0x2ed6xe);return handleError(_0x2ed6xd,_0x2ed6xe)})}function handleError(_0x2ed6xd,_0x2ed6xe){return _0x2ed6xd[_0x88fb[16]](500)[_0x88fb[15]](_0x2ed6xe)} \ No newline at end of file diff --git a/server/api/sound/sound.socket.js b/server/api/sound/sound.socket.js index cef5b4b..7c18e65 100644 --- a/server/api/sound/sound.socket.js +++ b/server/api/sound/sound.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x955e=["\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"];_0x955e[0];var Sound=require(_0x955e[2])[_0x955e[1]];exports[_0x955e[3]]=function(_0x26c7x2){Sound[_0x955e[4]](function(_0x26c7x3){onSave(_0x26c7x2,_0x26c7x3)});Sound[_0x955e[5]](function(_0x26c7x3){onRemove(_0x26c7x2,_0x26c7x3)})};function onSave(_0x26c7x2,_0x26c7x3,_0x26c7x5){_0x26c7x2[_0x955e[7]](_0x955e[6],_0x26c7x3)}function onRemove(_0x26c7x2,_0x26c7x3,_0x26c7x5){_0x26c7x2[_0x955e[7]](_0x955e[8],_0x26c7x3)} \ No newline at end of file diff --git a/server/api/sound/sound.spec.js b/server/api/sound/sound.spec.js index 970195e..79ff57b 100644 --- a/server/api/sound/sound.spec.js +++ b/server/api/sound/sound.spec.js @@ -1,20 +1 @@ -'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(); - }); - }); -}); +var _0x1877=["\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"];_0x1877[0];var should=require(_0x1877[1]);var app=require(_0x1877[2]);var request=require(_0x1877[3]);describe(_0x1877[4],function(){it(_0x1877[5],function(_0x6d9ax4){request(app)[_0x1877[13]](_0x1877[12])[_0x1877[11]](200)[_0x1877[11]](_0x1877[10],/json/)[_0x1877[9]](function(_0x6d9ax5,_0x6d9ax6){if(_0x6d9ax5){return _0x6d9ax4(_0x6d9ax5)};_0x6d9ax6[_0x1877[8]][_0x1877[1]][_0x1877[7]][_0x1877[6]](Array);_0x6d9ax4()})})}) \ No newline at end of file diff --git a/server/api/square_odbc/index.js b/server/api/square_odbc/index.js index 5f8a51e..094f7d8 100644 --- a/server/api/square_odbc/index.js +++ b/server/api/square_odbc/index.js @@ -1,18 +1 @@ -'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; +var _0xfafb=["\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"];_0xfafb[0];var express=require(_0xfafb[1]);var controller=require(_0xfafb[2]);var auth=require(_0xfafb[3]);var router=express.Router();router[_0xfafb[7]](_0xfafb[4],auth[_0xfafb[5]](),controller[_0xfafb[6]]);router[_0xfafb[7]](_0xfafb[8],auth[_0xfafb[5]](),controller[_0xfafb[9]]);router[_0xfafb[7]](_0xfafb[10],auth[_0xfafb[5]](),controller[_0xfafb[11]]);router[_0xfafb[13]](_0xfafb[4],auth[_0xfafb[5]](),controller[_0xfafb[12]]);router[_0xfafb[15]](_0xfafb[10],auth[_0xfafb[5]](),controller[_0xfafb[14]]);router[_0xfafb[16]](_0xfafb[10],auth[_0xfafb[5]](),controller[_0xfafb[14]]);router[_0xfafb[18]](_0xfafb[4],auth[_0xfafb[5]](),controller[_0xfafb[17]]);router[_0xfafb[18]](_0xfafb[10],auth[_0xfafb[5]](),controller[_0xfafb[19]]);module[_0xfafb[20]]=router \ No newline at end of file diff --git a/server/api/square_odbc/square_odbc.controller.js b/server/api/square_odbc/square_odbc.controller.js index 69af149..c08f42c 100644 --- a/server/api/square_odbc/square_odbc.controller.js +++ b/server/api/square_odbc/square_odbc.controller.js @@ -1,135 +1 @@ -'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); -} +var _0x305c=["\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"];_0x305c[0];var _=require(_0x305c[1]);var db=require(_0x305c[2])();var SquareOdbc=require(_0x305c[4])[_0x305c[3]];var Util=require(_0x305c[5]);exports[_0x305c[6]]=function(_0x56f6x5,_0x56f6x6){return SquareOdbc[_0x305c[13]](Util[_0x305c[12]](_0x56f6x5[_0x305c[11]]))[_0x305c[10]](function(_0x56f6x8){_0x56f6x6[_0x305c[9]](200)[_0x305c[8]](_0x56f6x8)})[_0x305c[7]](function(_0x56f6x7){return handleError(_0x56f6x6,_0x56f6x7)})};exports[_0x305c[14]]=function(_0x56f6x5,_0x56f6x6){return SquareOdbc[_0x305c[18]](_0x56f6x5[_0x305c[17]][_0x305c[16]])[_0x305c[10]](function(_0x56f6x9){if(!_0x56f6x9){return _0x56f6x6[_0x305c[15]](404)};return _0x56f6x6[_0x305c[8]](_0x56f6x9)})[_0x305c[7]](function(_0x56f6x7){return handleError(_0x56f6x6,_0x56f6x7)})};exports[_0x305c[19]]=function(_0x56f6x5,_0x56f6x6){return SquareOdbc[_0x305c[19]](_0x56f6x5[_0x305c[20]])[_0x305c[10]](function(_0x56f6x9){return _0x56f6x6[_0x305c[9]](201)[_0x305c[8]](_0x56f6x9)})[_0x305c[7]](function(_0x56f6x7){return handleError(_0x56f6x6,_0x56f6x7)})};exports[_0x305c[21]]=function(_0x56f6x5,_0x56f6x6){if(_0x56f6x5[_0x305c[20]][_0x305c[16]]){delete _0x56f6x5[_0x305c[20]][_0x305c[16]]};return SquareOdbc[_0x305c[18]](_0x56f6x5[_0x305c[17]][_0x305c[16]])[_0x305c[10]](function(_0x56f6x9){if(!_0x56f6x9){return _0x56f6x6[_0x305c[15]](404)};var _0x56f6xa=_[_0x305c[22]](_0x56f6x9,_0x56f6x5[_0x305c[20]]);_0x56f6xa[_0x305c[23]]()[_0x305c[10]](function(){return _0x56f6x6[_0x305c[9]](200)[_0x305c[8]](_0x56f6x9)})[_0x305c[7]](function(_0x56f6x7){return handleError(_0x56f6x6,_0x56f6x7)})})[_0x305c[7]](function(_0x56f6x7){return handleError(_0x56f6x6,_0x56f6x7)})};exports[_0x305c[24]]=function(_0x56f6x5,_0x56f6x6){return SquareOdbc[_0x305c[18]](_0x56f6x5[_0x305c[17]][_0x305c[16]])[_0x305c[10]](function(_0x56f6xb){if(!_0x56f6xb){return _0x56f6x6[_0x305c[15]](404)};return _0x56f6xb[_0x305c[24]]()})[_0x305c[10]](function(){return _0x56f6x6[_0x305c[15]](204)})[_0x305c[7]](function(_0x56f6x7){return handleError(_0x56f6x6,_0x56f6x7)})};exports[_0x305c[25]]=function(_0x56f6x5,_0x56f6x6){return SquareOdbc[_0x305c[24]]({where:{id:_0x56f6x5[_0x305c[11]][_0x305c[26]]},individualHooks:true})[_0x305c[10]](function(){return _0x56f6x6[_0x305c[15]](204)})[_0x305c[7]](function(_0x56f6x7){return handleError(_0x56f6x6,_0x56f6x7)})};exports[_0x305c[27]]=function(_0x56f6x5,_0x56f6x6){return SquareOdbc[_0x305c[18]](_0x56f6x5[_0x305c[17]][_0x305c[16]])[_0x305c[10]](function(_0x56f6x9){if(!_0x56f6x9){return _0x56f6x6[_0x305c[15]](404)};db[_0x305c[30]](_0x56f6x9[_0x305c[28]],function(_0x56f6x7){if(_0x56f6x7){return handleError(_0x56f6x6,_0x56f6x7)};db[_0x305c[29]](function(_0x56f6x7){if(_0x56f6x7){return handleError(_0x56f6x6,_0x56f6x7)};return _0x56f6x6[_0x305c[15]](200)})})})[_0x305c[7]](function(_0x56f6x7){return handleError(_0x56f6x6,_0x56f6x7)})};function handleError(_0x56f6x6,_0x56f6x7){return _0x56f6x6[_0x305c[9]](500)[_0x305c[8]](_0x56f6x7)} \ No newline at end of file diff --git a/server/api/square_odbc/square_odbc.socket.js b/server/api/square_odbc/square_odbc.socket.js index af0c04a..ab0612e 100644 --- a/server/api/square_odbc/square_odbc.socket.js +++ b/server/api/square_odbc/square_odbc.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x50d0=["\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"];_0x50d0[0];var SquareOdbc=require(_0x50d0[2])[_0x50d0[1]];exports[_0x50d0[3]]=function(_0xcbccx2){SquareOdbc[_0x50d0[4]](function(_0xcbccx3){onSave(_0xcbccx2,_0xcbccx3)});SquareOdbc[_0x50d0[5]](function(_0xcbccx3){onRemove(_0xcbccx2,_0xcbccx3)})};function onSave(_0xcbccx2,_0xcbccx3,_0xcbccx5){_0xcbccx2[_0x50d0[7]](_0x50d0[6],_0xcbccx3)}function onRemove(_0xcbccx2,_0xcbccx3,_0xcbccx5){_0xcbccx2[_0x50d0[7]](_0x50d0[8],_0xcbccx3)} \ No newline at end of file diff --git a/server/api/square_odbc/square_odbc.spec.js b/server/api/square_odbc/square_odbc.spec.js index ce9350c..3d0b8c9 100644 --- a/server/api/square_odbc/square_odbc.spec.js +++ b/server/api/square_odbc/square_odbc.spec.js @@ -1,20 +1 @@ -'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 +var _0x41a2=["\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"];_0x41a2[0];var should=require(_0x41a2[1]);var app=require(_0x41a2[2]);var request=require(_0x41a2[3]);describe(_0x41a2[4],function(){it(_0x41a2[5],function(_0x2d63x4){request(app)[_0x41a2[13]](_0x41a2[12])[_0x41a2[11]](200)[_0x41a2[11]](_0x41a2[10],/json/)[_0x41a2[9]](function(_0x2d63x5,_0x2d63x6){if(_0x2d63x5){return _0x2d63x4(_0x2d63x5)};_0x2d63x6[_0x41a2[8]][_0x41a2[1]][_0x41a2[7]][_0x41a2[6]](Array);_0x2d63x4()})})}) \ No newline at end of file diff --git a/server/api/square_project/index.js b/server/api/square_project/index.js index 614ce23..a47a97e 100644 --- a/server/api/square_project/index.js +++ b/server/api/square_project/index.js @@ -1,18 +1 @@ -'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; +var _0x9c1b=["\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"];_0x9c1b[0];var express=require(_0x9c1b[1]);var controller=require(_0x9c1b[2]);var auth=require(_0x9c1b[3]);var router=express.Router();router[_0x9c1b[7]](_0x9c1b[4],auth[_0x9c1b[5]](),controller[_0x9c1b[6]]);router[_0x9c1b[7]](_0x9c1b[8],auth[_0x9c1b[5]](),controller[_0x9c1b[9]]);router[_0x9c1b[7]](_0x9c1b[10],controller[_0x9c1b[11]]);router[_0x9c1b[13]](_0x9c1b[4],auth[_0x9c1b[5]](),controller[_0x9c1b[12]]);router[_0x9c1b[15]](_0x9c1b[8],auth[_0x9c1b[5]](),controller[_0x9c1b[14]]);router[_0x9c1b[16]](_0x9c1b[8],auth[_0x9c1b[5]](),controller[_0x9c1b[14]]);router[_0x9c1b[18]](_0x9c1b[4],auth[_0x9c1b[5]](),controller[_0x9c1b[17]]);router[_0x9c1b[18]](_0x9c1b[8],auth[_0x9c1b[5]](),controller[_0x9c1b[19]]);module[_0x9c1b[20]]=router \ No newline at end of file diff --git a/server/api/square_project/square_project.controller.js b/server/api/square_project/square_project.controller.js index 3531326..2cac344 100644 --- a/server/api/square_project/square_project.controller.js +++ b/server/api/square_project/square_project.controller.js @@ -1,132 +1 @@ -'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); -} +var _0xc602=["\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"];_0xc602[0];var _=require(_0xc602[1]);var path=require(_0xc602[2]);var config=require(_0xc602[3]);var Util=require(_0xc602[4]);var SquareProject=require(_0xc602[6])[_0xc602[5]];exports[_0xc602[7]]=function(_0xab3fx6,_0xab3fx7){return SquareProject[_0xc602[14]](Util[_0xc602[13]](_0xab3fx6[_0xc602[12]]))[_0xc602[11]](function(_0xab3fx9){_0xab3fx7[_0xc602[10]](200)[_0xc602[9]](_0xab3fx9)})[_0xc602[8]](function(_0xab3fx8){return handleError(_0xab3fx7,_0xab3fx8)})};exports[_0xc602[15]]=function(_0xab3fx6,_0xab3fx7){return SquareProject[_0xc602[19]](_0xab3fx6[_0xc602[18]][_0xc602[17]])[_0xc602[11]](function(_0xab3fxa){if(!_0xab3fxa){return _0xab3fx7[_0xc602[16]](404)};return _0xab3fx7[_0xc602[9]](_0xab3fxa)})[_0xc602[8]](function(_0xab3fx8){return handleError(_0xab3fx7,_0xab3fx8)})};exports[_0xc602[20]]=function(_0xab3fx6,_0xab3fx7){return SquareProject[_0xc602[20]](_0xab3fx6[_0xc602[21]])[_0xc602[11]](function(_0xab3fxa){return _0xab3fx7[_0xc602[10]](201)[_0xc602[9]](_0xab3fxa)})[_0xc602[8]](function(_0xab3fx8){return handleError(_0xab3fx7,_0xab3fx8)})};exports[_0xc602[22]]=function(_0xab3fx6,_0xab3fx7){if(_0xab3fx6[_0xc602[21]][_0xc602[17]]){delete _0xab3fx6[_0xc602[21]][_0xc602[17]]};return SquareProject[_0xc602[19]](_0xab3fx6[_0xc602[18]][_0xc602[17]])[_0xc602[11]](function(_0xab3fxa){if(!_0xab3fxa){return _0xab3fx7[_0xc602[16]](404)};var _0xab3fxb=_[_0xc602[23]](_0xab3fxa,_0xab3fx6[_0xc602[21]]);_0xab3fxb[_0xc602[24]]()[_0xc602[11]](function(){return _0xab3fx7[_0xc602[10]](200)[_0xc602[9]](_0xab3fxa)})[_0xc602[8]](function(_0xab3fx8){return handleError(_0xab3fx7,_0xab3fx8)})})[_0xc602[8]](function(_0xab3fx8){return handleError(_0xab3fx7,_0xab3fx8)})};exports[_0xc602[25]]=function(_0xab3fx6,_0xab3fx7){return SquareProject[_0xc602[19]](_0xab3fx6[_0xc602[18]][_0xc602[17]])[_0xc602[11]](function(_0xab3fxc){if(!_0xab3fxc){return _0xab3fx7[_0xc602[16]](404)};return _0xab3fxc[_0xc602[25]]()})[_0xc602[11]](function(){return _0xab3fx7[_0xc602[16]](204)})[_0xc602[8]](function(_0xab3fx8){return handleError(_0xab3fx7,_0xab3fx8)})};exports[_0xc602[26]]=function(_0xab3fx6,_0xab3fx7){return SquareProject[_0xc602[25]]({where:{id:_0xab3fx6[_0xc602[12]][_0xc602[27]]},individualHooks:true})[_0xc602[11]](function(){return _0xab3fx7[_0xc602[16]](204)})[_0xc602[8]](function(_0xab3fx8){return handleError(_0xab3fx7,_0xab3fx8)})};exports[_0xc602[28]]=function(_0xab3fx6,_0xab3fx7,_0xab3fxd){SquareProject[_0xc602[19]](_0xab3fx6[_0xc602[18]][_0xc602[17]])[_0xc602[11]](function(_0xab3fxa){if(!_0xab3fxa){return _0xab3fx7[_0xc602[16]](404)};console[_0xc602[30]](_0xab3fx6[_0xc602[12]][_0xc602[29]]);_0xab3fx7[_0xc602[34]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0xc602[31]+_0xab3fx6[_0xc602[12]][_0xc602[29]]+_0xc602[32],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xc602[33]});return _0xab3fx7[_0xc602[9]](_0xab3fxa[_0xc602[35]])})[_0xc602[8]](function(_0xab3fx8){return handleError(_0xab3fx7,_0xab3fx8)})};function handleError(_0xab3fx7,_0xab3fx8){return _0xab3fx7[_0xc602[10]](500)[_0xc602[9]](_0xab3fx8)} \ No newline at end of file diff --git a/server/api/square_project/square_project.socket.js b/server/api/square_project/square_project.socket.js index bc43e25..8457cfd 100644 --- a/server/api/square_project/square_project.socket.js +++ b/server/api/square_project/square_project.socket.js @@ -1,27 +1 @@ -/** - * 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); -} +var _0xd8cb=["\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"];_0xd8cb[0];var SquareProject=require(_0xd8cb[2])[_0xd8cb[1]];exports[_0xd8cb[3]]=function(_0xfca8x2){SquareProject[_0xd8cb[4]](function(_0xfca8x3){onSave(_0xfca8x2,_0xfca8x3)});SquareProject[_0xd8cb[5]](function(_0xfca8x3){onSave(_0xfca8x2,_0xfca8x3)});SquareProject[_0xd8cb[6]](function(_0xfca8x3){onRemove(_0xfca8x2,_0xfca8x3)})};function onSave(_0xfca8x2,_0xfca8x3,_0xfca8x5){_0xfca8x2[_0xd8cb[8]](_0xd8cb[7],_0xfca8x3)}function onRemove(_0xfca8x2,_0xfca8x3,_0xfca8x5){_0xfca8x2[_0xd8cb[8]](_0xd8cb[9],_0xfca8x3)} \ No newline at end of file diff --git a/server/api/sugarcrm_account/index.js b/server/api/sugarcrm_account/index.js index e87249c..e9d68b0 100644 --- a/server/api/sugarcrm_account/index.js +++ b/server/api/sugarcrm_account/index.js @@ -1,21 +1 @@ -'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; +var _0x4ef9=["\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"];_0x4ef9[0];var express=require(_0x4ef9[1]);var auth=require(_0x4ef9[2]);var controller=require(_0x4ef9[3]);var router=express.Router();router[_0x4ef9[7]](_0x4ef9[4],auth[_0x4ef9[5]](),controller[_0x4ef9[6]]);router[_0x4ef9[7]](_0x4ef9[8],auth[_0x4ef9[5]](),controller[_0x4ef9[9]]);router[_0x4ef9[7]](_0x4ef9[10],auth[_0x4ef9[5]](),controller[_0x4ef9[11]]);router[_0x4ef9[7]](_0x4ef9[12],auth[_0x4ef9[5]](),controller[_0x4ef9[13]]);router[_0x4ef9[16]](_0x4ef9[14],auth[_0x4ef9[5]](),controller[_0x4ef9[15]]);router[_0x4ef9[16]](_0x4ef9[4],auth[_0x4ef9[5]](),controller[_0x4ef9[17]]);router[_0x4ef9[19]](_0x4ef9[12],auth[_0x4ef9[5]](),controller[_0x4ef9[18]]);router[_0x4ef9[20]](_0x4ef9[12],auth[_0x4ef9[5]](),controller[_0x4ef9[18]]);router[_0x4ef9[22]](_0x4ef9[4],auth[_0x4ef9[5]](),controller[_0x4ef9[21]]);router[_0x4ef9[22]](_0x4ef9[12],auth[_0x4ef9[5]](),controller[_0x4ef9[23]]);module[_0x4ef9[24]]=router \ No newline at end of file diff --git a/server/api/sugarcrm_account/index.spec.js b/server/api/sugarcrm_account/index.spec.js index 758de1a..31c2e11 100644 --- a/server/api/sugarcrm_account/index.spec.js +++ b/server/api/sugarcrm_account/index.spec.js @@ -1,97 +1 @@ -'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; - }); - - }); - -}); +var _0x674d=["\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"];_0x674d[0];var proxyquire=require(_0x674d[2])[_0x674d[1]]();var sugarcrmAccountCtrlStub={index:_0x674d[3],show:_0x674d[4],create:_0x674d[5],update:_0x674d[6],destroy:_0x674d[7]};var routerStub={get:sinon[_0x674d[8]](),put:sinon[_0x674d[8]](),patch:sinon[_0x674d[8]](),post:sinon[_0x674d[8]](),delete:sinon[_0x674d[8]]()};var sugarcrmAccountIndex=proxyquire(_0x674d[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(_0x674d[10],function(){it(_0x674d[11],function(){expect(sugarcrmAccountIndex)[_0x674d[13]][_0x674d[12]](routerStub)});describe(_0x674d[14],function(){it(_0x674d[15],function(){expect(routerStub[_0x674d[21]][_0x674d[20]](_0x674d[19],_0x674d[3]))[_0x674d[13]][_0x674d[18]][_0x674d[17]][_0x674d[16]]})});describe(_0x674d[22],function(){it(_0x674d[23],function(){expect(routerStub[_0x674d[21]][_0x674d[20]](_0x674d[24],_0x674d[4]))[_0x674d[13]][_0x674d[18]][_0x674d[17]][_0x674d[16]]})});describe(_0x674d[25],function(){it(_0x674d[26],function(){expect(routerStub[_0x674d[27]][_0x674d[20]](_0x674d[19],_0x674d[5]))[_0x674d[13]][_0x674d[18]][_0x674d[17]][_0x674d[16]]})});describe(_0x674d[28],function(){it(_0x674d[29],function(){expect(routerStub[_0x674d[30]][_0x674d[20]](_0x674d[24],_0x674d[6]))[_0x674d[13]][_0x674d[18]][_0x674d[17]][_0x674d[16]]})});describe(_0x674d[31],function(){it(_0x674d[29],function(){expect(routerStub[_0x674d[32]][_0x674d[20]](_0x674d[24],_0x674d[6]))[_0x674d[13]][_0x674d[18]][_0x674d[17]][_0x674d[16]]})});describe(_0x674d[33],function(){it(_0x674d[34],function(){expect(routerStub[_0x674d[35]][_0x674d[20]](_0x674d[24],_0x674d[7]))[_0x674d[13]][_0x674d[18]][_0x674d[17]][_0x674d[16]]})})}) \ No newline at end of file diff --git a/server/api/sugarcrm_account/sugarcrm_account.controller.js b/server/api/sugarcrm_account/sugarcrm_account.controller.js index afa4692..db9fc21 100644 --- a/server/api/sugarcrm_account/sugarcrm_account.controller.js +++ b/server/api/sugarcrm_account/sugarcrm_account.controller.js @@ -1,200 +1 @@ -/** - * 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)); -}; +var _0xb56f=["\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"];_0xb56f[0];var _=require(_0xb56f[1]);var Util=require(_0xb56f[2]);var SugarcrmAccount=require(_0xb56f[4])[_0xb56f[3]];function handleError(_0x6026x5,_0x6026x6){_0x6026x6=_0x6026x6||500;return function(_0x6026x7){_0x6026x5[_0xb56f[6]](_0x6026x6)[_0xb56f[5]](_0x6026x7)}}function responseWithResult(_0x6026x5,_0x6026x6){_0x6026x6=_0x6026x6||200;return function(_0x6026x9){if(_0x6026x9){_0x6026x5[_0xb56f[6]](_0x6026x6)[_0xb56f[7]](_0x6026x9)}}}function responseWithoutResult(_0x6026x5,_0x6026x6){_0x6026x6=_0x6026x6||200;return function(){_0x6026x5[_0xb56f[8]](_0x6026x6)}}function handleEntityNotFound(_0x6026x5){return function(_0x6026x9){if(!_0x6026x9){_0x6026x5[_0xb56f[6]](404)[_0xb56f[9]]();return null};return _0x6026x9}}function saveUpdates(_0x6026xd){return function(_0x6026x9){return _0x6026x9[_0xb56f[11]](_0x6026xd)[_0xb56f[10]](function(_0x6026xe){return _0x6026xe})}}function removeEntity(_0x6026x5){return function(_0x6026x9){if(_0x6026x9){return _0x6026x9[_0xb56f[12]]()[_0xb56f[10]](function(){_0x6026x5[_0xb56f[6]](204)[_0xb56f[9]]()})}}}exports[_0xb56f[13]]=function(_0x6026x10,_0x6026x5){return SugarcrmAccount[_0xb56f[19]](_0xb56f[18])[_0xb56f[17]](Util[_0xb56f[16]](_0x6026x10[_0xb56f[15]]))[_0xb56f[10]](responseWithResult(_0x6026x5))[_0xb56f[14]](handleError(_0x6026x5))};exports[_0xb56f[20]]=function(_0x6026x10,_0x6026x5){return SugarcrmAccount[_0xb56f[23]](_0x6026x10[_0xb56f[22]][_0xb56f[21]])[_0xb56f[10]](handleEntityNotFound(_0x6026x5))[_0xb56f[10]](responseWithResult(_0x6026x5))[_0xb56f[14]](handleError(_0x6026x5))};exports[_0xb56f[24]]=function(_0x6026x10,_0x6026x5){return SugarcrmAccount[_0xb56f[24]](_0x6026x10[_0xb56f[25]])[_0xb56f[10]](responseWithResult(_0x6026x5,201))[_0xb56f[14]](handleError(_0x6026x5))};exports[_0xb56f[26]]=function(_0x6026x10,_0x6026x5){if(_0x6026x10[_0xb56f[25]][_0xb56f[21]]){delete _0x6026x10[_0xb56f[25]][_0xb56f[21]]};return SugarcrmAccount[_0xb56f[23]](_0x6026x10[_0xb56f[22]][_0xb56f[21]])[_0xb56f[10]](handleEntityNotFound(_0x6026x5))[_0xb56f[10]](saveUpdates(_0x6026x10[_0xb56f[25]]))[_0xb56f[10]](responseWithResult(_0x6026x5))[_0xb56f[14]](handleError(_0x6026x5))};exports[_0xb56f[12]]=function(_0x6026x10,_0x6026x5){return SugarcrmAccount[_0xb56f[23]](_0x6026x10[_0xb56f[22]][_0xb56f[21]])[_0xb56f[10]](handleEntityNotFound(_0x6026x5))[_0xb56f[10]](removeEntity(_0x6026x5))[_0xb56f[14]](handleError(_0x6026x5))};exports[_0xb56f[27]]=function(_0x6026x10,_0x6026x5){return SugarcrmAccount[_0xb56f[23]](_0x6026x10[_0xb56f[22]][_0xb56f[21]])[_0xb56f[10]](handleEntityNotFound(_0x6026x5))[_0xb56f[10]](function(_0x6026x11){var _0x6026x12=require(_0xb56f[28]);_0x6026x12[_0xb56f[34]]({apiURL:Util[_0xb56f[30]](_0x6026x11[_0xb56f[29]])+_0xb56f[31],login:_0x6026x11[_0xb56f[32]],passwd:_0x6026x11[_0xb56f[33]]});_0x6026x12[_0xb56f[35]](function(_0x6026x13){if(!_0x6026x13){return _0x6026x5[_0xb56f[8]](400)};return _0x6026x5[_0xb56f[8]](200)})})[_0xb56f[14]](handleError(_0x6026x5))};exports[_0xb56f[36]]=function(_0x6026x10,_0x6026x5){SugarcrmAccount[_0xb56f[12]]({where:{id:_0x6026x10[_0xb56f[15]][_0xb56f[37]]},individualHooks:true})[_0xb56f[10]](function(){return _0x6026x5[_0xb56f[8]](204)})[_0xb56f[14]](handleError(_0x6026x5))};exports[_0xb56f[38]]=function(_0x6026x10,_0x6026x5){var _0x6026x14={};_0x6026x14[_0x6026x10[_0xb56f[22]][_0xb56f[39]]]=_0x6026x10[_0xb56f[25]][_0xb56f[40]];return SugarcrmAccount[_0xb56f[17]]({where:_0x6026x14})[_0xb56f[10]](function(_0x6026x15){if(_0x6026x15[_0xb56f[41]]){return _0x6026x5[_0xb56f[6]](200)[_0xb56f[5]]({isValid:false,value:_0x6026x10[_0xb56f[25]][_0xb56f[40]]})};return _0x6026x5[_0xb56f[6]](200)[_0xb56f[5]]({isValid:true,value:_0x6026x10[_0xb56f[25]][_0xb56f[40]]})})[_0xb56f[14]](function(_0x6026x7){return handleError(_0x6026x5,_0x6026x7)})};exports[_0xb56f[42]]=function(_0x6026x10,_0x6026x5){var _0x6026x12=require(_0xb56f[28]);return SugarcrmAccount[_0xb56f[23]](_0x6026x10[_0xb56f[22]][_0xb56f[21]])[_0xb56f[10]](handleEntityNotFound(_0x6026x5))[_0xb56f[10]](function(_0x6026x11){_0x6026x12[_0xb56f[34]]({apiURL:Util[_0xb56f[30]](_0x6026x11[_0xb56f[29]])+_0xb56f[31],login:_0x6026x11[_0xb56f[32]],passwd:_0x6026x11[_0xb56f[33]]});_0x6026x12[_0xb56f[35]](function(_0x6026x13){if(!_0x6026x13){return _0x6026x5[_0xb56f[8]](400)};var _0x6026x16={session:_0x6026x13,module_name:_0xb56f[43]};_0x6026x12[_0xb56f[46]](_0xb56f[44],_0x6026x16,function(_0x6026x15,_0x6026x7){if(_0x6026x7){return _0x6026x5[_0xb56f[8]](400)};return _0x6026x5[_0xb56f[6]](200)[_0xb56f[5]](_0x6026x15[_0xb56f[45]])})})})[_0xb56f[14]](handleError(_0x6026x5))} \ No newline at end of file diff --git a/server/api/sugarcrm_account/sugarcrm_account.socket.js b/server/api/sugarcrm_account/sugarcrm_account.socket.js index 859bf6d..0c7019d 100644 --- a/server/api/sugarcrm_account/sugarcrm_account.socket.js +++ b/server/api/sugarcrm_account/sugarcrm_account.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xa9b3=["\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"];_0xa9b3[0];var SugarcrmAccount=require(_0xa9b3[2])[_0xa9b3[1]];exports[_0xa9b3[3]]=function(_0xa748x2){SugarcrmAccount[_0xa9b3[4]](function(_0xa748x3){onSave(_0xa748x2,_0xa748x3)});SugarcrmAccount[_0xa9b3[5]](function(_0xa748x3){onRemove(_0xa748x2,_0xa748x3)})};function onSave(_0xa748x2,_0xa748x3,_0xa748x5){_0xa748x2[_0xa9b3[7]](_0xa9b3[6],_0xa748x3)}function onRemove(_0xa748x2,_0xa748x3,_0xa748x5){_0xa748x2[_0xa9b3[7]](_0xa9b3[8],_0xa748x3)} \ No newline at end of file diff --git a/server/api/sugarcrm_configuration/index.js b/server/api/sugarcrm_configuration/index.js index 90111bf..ed6b381 100644 --- a/server/api/sugarcrm_configuration/index.js +++ b/server/api/sugarcrm_configuration/index.js @@ -1,18 +1 @@ -'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; +var _0x3ebb=["\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"];_0x3ebb[0];var express=require(_0x3ebb[1]);var auth=require(_0x3ebb[2]);var controller=require(_0x3ebb[3]);var router=express.Router();router[_0x3ebb[7]](_0x3ebb[4],auth[_0x3ebb[5]](),controller[_0x3ebb[6]]);router[_0x3ebb[7]](_0x3ebb[8],auth[_0x3ebb[5]](),controller[_0x3ebb[9]]);router[_0x3ebb[11]](_0x3ebb[4],auth[_0x3ebb[5]](),controller[_0x3ebb[10]]);router[_0x3ebb[13]](_0x3ebb[8],auth[_0x3ebb[5]](),controller[_0x3ebb[12]]);router[_0x3ebb[11]](_0x3ebb[14],auth[_0x3ebb[5]](),controller[_0x3ebb[15]]);router[_0x3ebb[16]](_0x3ebb[8],auth[_0x3ebb[5]](),controller[_0x3ebb[12]]);router[_0x3ebb[18]](_0x3ebb[8],auth[_0x3ebb[5]](),controller[_0x3ebb[17]]);module[_0x3ebb[19]]=router \ No newline at end of file diff --git a/server/api/sugarcrm_configuration/index.spec.js b/server/api/sugarcrm_configuration/index.spec.js index ba1b022..05397c7 100644 --- a/server/api/sugarcrm_configuration/index.spec.js +++ b/server/api/sugarcrm_configuration/index.spec.js @@ -1,97 +1 @@ -'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; - }); - - }); - -}); +var _0x42d0=["\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"];_0x42d0[0];var proxyquire=require(_0x42d0[2])[_0x42d0[1]]();var sugarcrmConfigurationCtrlStub={index:_0x42d0[3],show:_0x42d0[4],create:_0x42d0[5],update:_0x42d0[6],destroy:_0x42d0[7]};var routerStub={get:sinon[_0x42d0[8]](),put:sinon[_0x42d0[8]](),patch:sinon[_0x42d0[8]](),post:sinon[_0x42d0[8]](),delete:sinon[_0x42d0[8]]()};var sugarcrmConfigurationIndex=proxyquire(_0x42d0[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(_0x42d0[10],function(){it(_0x42d0[11],function(){expect(sugarcrmConfigurationIndex)[_0x42d0[13]][_0x42d0[12]](routerStub)});describe(_0x42d0[14],function(){it(_0x42d0[15],function(){expect(routerStub[_0x42d0[21]][_0x42d0[20]](_0x42d0[19],_0x42d0[3]))[_0x42d0[13]][_0x42d0[18]][_0x42d0[17]][_0x42d0[16]]})});describe(_0x42d0[22],function(){it(_0x42d0[23],function(){expect(routerStub[_0x42d0[21]][_0x42d0[20]](_0x42d0[24],_0x42d0[4]))[_0x42d0[13]][_0x42d0[18]][_0x42d0[17]][_0x42d0[16]]})});describe(_0x42d0[25],function(){it(_0x42d0[26],function(){expect(routerStub[_0x42d0[27]][_0x42d0[20]](_0x42d0[19],_0x42d0[5]))[_0x42d0[13]][_0x42d0[18]][_0x42d0[17]][_0x42d0[16]]})});describe(_0x42d0[28],function(){it(_0x42d0[29],function(){expect(routerStub[_0x42d0[30]][_0x42d0[20]](_0x42d0[24],_0x42d0[6]))[_0x42d0[13]][_0x42d0[18]][_0x42d0[17]][_0x42d0[16]]})});describe(_0x42d0[31],function(){it(_0x42d0[29],function(){expect(routerStub[_0x42d0[32]][_0x42d0[20]](_0x42d0[24],_0x42d0[6]))[_0x42d0[13]][_0x42d0[18]][_0x42d0[17]][_0x42d0[16]]})});describe(_0x42d0[33],function(){it(_0x42d0[34],function(){expect(routerStub[_0x42d0[35]][_0x42d0[20]](_0x42d0[24],_0x42d0[7]))[_0x42d0[13]][_0x42d0[18]][_0x42d0[17]][_0x42d0[16]]})})}) \ No newline at end of file diff --git a/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js b/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js index 5918283..ece890d 100644 --- a/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js +++ b/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js @@ -1,145 +1 @@ -/** - * 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)); -}; +var _0x46de=["\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"];_0x46de[0];var _=require(_0x46de[1]);var SugarcrmConfiguration=require(_0x46de[3])[_0x46de[2]];var SugarcrmField=require(_0x46de[3])[_0x46de[4]];function handleError(_0x671cx5,_0x671cx6){_0x671cx6=_0x671cx6||500;return function(_0x671cx7){_0x671cx5[_0x46de[6]](_0x671cx6)[_0x46de[5]](_0x671cx7)}}function responseWithResult(_0x671cx5,_0x671cx6){_0x671cx6=_0x671cx6||200;return function(_0x671cx9){if(_0x671cx9){_0x671cx5[_0x46de[6]](_0x671cx6)[_0x46de[7]](_0x671cx9)}}}function handleEntityNotFound(_0x671cx5){return function(_0x671cx9){if(!_0x671cx9){_0x671cx5[_0x46de[6]](404)[_0x46de[8]]();return null};return _0x671cx9}}function saveUpdates(_0x671cxc){return function(_0x671cx9){return _0x671cx9[_0x46de[10]](_0x671cxc)[_0x46de[9]](function(_0x671cxd){return _0x671cxd})}}function removeEntity(_0x671cx5){return function(_0x671cx9){if(_0x671cx9){return _0x671cx9[_0x46de[11]]()[_0x46de[9]](function(){_0x671cx5[_0x46de[6]](204)[_0x46de[8]]()})}}}exports[_0x46de[12]]=function(_0x671cxf,_0x671cx5){SugarcrmConfiguration[_0x46de[15]]({where:_0x671cxf[_0x46de[14]]})[_0x46de[9]](responseWithResult(_0x671cx5))[_0x46de[13]](handleError(_0x671cx5))};exports[_0x46de[16]]=function(_0x671cxf,_0x671cx5){SugarcrmConfiguration[_0x46de[22]]({where:{id:_0x671cxf[_0x46de[18]][_0x46de[17]]},include:[{model:SugarcrmField,as:_0x46de[19]},{model:SugarcrmField,as:_0x46de[20]},{model:SugarcrmField,as:_0x46de[21]}]})[_0x46de[9]](handleEntityNotFound(_0x671cx5))[_0x46de[9]](responseWithResult(_0x671cx5))[_0x46de[13]](handleError(_0x671cx5))};exports[_0x46de[23]]=function(_0x671cxf,_0x671cx5){SugarcrmConfiguration[_0x46de[23]](_0x671cxf[_0x46de[24]])[_0x46de[9]](responseWithResult(_0x671cx5,201))[_0x46de[13]](handleError(_0x671cx5))};exports[_0x46de[25]]=function(_0x671cxf,_0x671cx5){if(_0x671cxf[_0x46de[24]][_0x46de[17]]){delete _0x671cxf[_0x46de[24]][_0x46de[17]]};SugarcrmConfiguration[_0x46de[26]](_0x671cxf[_0x46de[18]][_0x46de[17]])[_0x46de[9]](handleEntityNotFound(_0x671cx5))[_0x46de[9]](saveUpdates(_0x671cxf[_0x46de[24]]))[_0x46de[9]](responseWithResult(_0x671cx5))[_0x46de[13]](handleError(_0x671cx5))};exports[_0x46de[11]]=function(_0x671cxf,_0x671cx5){SugarcrmConfiguration[_0x46de[26]](_0x671cxf[_0x46de[18]][_0x46de[17]])[_0x46de[9]](handleEntityNotFound(_0x671cx5))[_0x46de[9]](removeEntity(_0x671cx5))[_0x46de[13]](handleError(_0x671cx5))};exports[_0x46de[27]]=function(_0x671cxf,_0x671cx5,_0x671cx10){var _0x671cx11;SugarcrmConfiguration[_0x46de[26]](_0x671cxf[_0x46de[18]][_0x46de[17]])[_0x46de[9]](handleEntityNotFound(_0x671cx5))[_0x46de[9]](function(_0x671cx14){_0x671cx11=_0x671cx14;return SugarcrmField[_0x46de[23]](_0x671cxf[_0x46de[24]])})[_0x46de[9]](function(_0x671cx13){switch(_0x671cxf[_0x46de[18]][_0x46de[35]]){case _0x46de[30]:return [_0x671cx11[_0x46de[29]](_0x671cx13),_0x671cx13];case _0x46de[32]:return [_0x671cx11[_0x46de[31]](_0x671cx13),_0x671cx13];case _0x46de[34]:return [_0x671cx11[_0x46de[33]](_0x671cx13),_0x671cx13]}})[_0x46de[28]](function(_0x671cx12,_0x671cx13){return _0x671cx5[_0x46de[6]](201)[_0x46de[7]](_0x671cx13)})[_0x46de[13]](handleError(_0x671cx5))} \ No newline at end of file diff --git a/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js b/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js index c4464da..73548f0 100644 --- a/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js +++ b/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xffe5=["\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"];_0xffe5[0];var SugarcrmConfiguration=require(_0xffe5[2])[_0xffe5[1]];exports[_0xffe5[3]]=function(_0x1e60x2){SugarcrmConfiguration[_0xffe5[4]](function(_0x1e60x3){onSave(_0x1e60x2,_0x1e60x3)});SugarcrmConfiguration[_0xffe5[5]](function(_0x1e60x3){onRemove(_0x1e60x2,_0x1e60x3)})};function onSave(_0x1e60x2,_0x1e60x3,_0x1e60x5){_0x1e60x2[_0xffe5[7]](_0xffe5[6],_0x1e60x3)}function onRemove(_0x1e60x2,_0x1e60x3,_0x1e60x5){_0x1e60x2[_0xffe5[7]](_0xffe5[8],_0x1e60x3)} \ No newline at end of file diff --git a/server/api/sugarcrm_field/index.js b/server/api/sugarcrm_field/index.js index edc0dc9..410ee7e 100644 --- a/server/api/sugarcrm_field/index.js +++ b/server/api/sugarcrm_field/index.js @@ -1,18 +1 @@ -'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; +var _0x527f=["\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"];_0x527f[0];var express=require(_0x527f[1]);var auth=require(_0x527f[2]);var controller=require(_0x527f[3]);var router=express.Router();router[_0x527f[7]](_0x527f[4],auth[_0x527f[5]](),controller[_0x527f[6]]);router[_0x527f[7]](_0x527f[8],auth[_0x527f[5]](),controller[_0x527f[9]]);router[_0x527f[11]](_0x527f[4],auth[_0x527f[5]](),controller[_0x527f[10]]);router[_0x527f[13]](_0x527f[8],auth[_0x527f[5]](),controller[_0x527f[12]]);router[_0x527f[14]](_0x527f[8],auth[_0x527f[5]](),controller[_0x527f[12]]);router[_0x527f[16]](_0x527f[8],auth[_0x527f[5]](),controller[_0x527f[15]]);module[_0x527f[17]]=router \ No newline at end of file diff --git a/server/api/sugarcrm_field/index.spec.js b/server/api/sugarcrm_field/index.spec.js index f8a20f7..b87931b 100644 --- a/server/api/sugarcrm_field/index.spec.js +++ b/server/api/sugarcrm_field/index.spec.js @@ -1,97 +1 @@ -'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; - }); - - }); - -}); +var _0x309b=["\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"];_0x309b[0];var proxyquire=require(_0x309b[2])[_0x309b[1]]();var sugarcrmFieldCtrlStub={index:_0x309b[3],show:_0x309b[4],create:_0x309b[5],update:_0x309b[6],destroy:_0x309b[7]};var routerStub={get:sinon[_0x309b[8]](),put:sinon[_0x309b[8]](),patch:sinon[_0x309b[8]](),post:sinon[_0x309b[8]](),delete:sinon[_0x309b[8]]()};var sugarcrmFieldIndex=proxyquire(_0x309b[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(_0x309b[10],function(){it(_0x309b[11],function(){expect(sugarcrmFieldIndex)[_0x309b[13]][_0x309b[12]](routerStub)});describe(_0x309b[14],function(){it(_0x309b[15],function(){expect(routerStub[_0x309b[21]][_0x309b[20]](_0x309b[19],_0x309b[3]))[_0x309b[13]][_0x309b[18]][_0x309b[17]][_0x309b[16]]})});describe(_0x309b[22],function(){it(_0x309b[23],function(){expect(routerStub[_0x309b[21]][_0x309b[20]](_0x309b[24],_0x309b[4]))[_0x309b[13]][_0x309b[18]][_0x309b[17]][_0x309b[16]]})});describe(_0x309b[25],function(){it(_0x309b[26],function(){expect(routerStub[_0x309b[27]][_0x309b[20]](_0x309b[19],_0x309b[5]))[_0x309b[13]][_0x309b[18]][_0x309b[17]][_0x309b[16]]})});describe(_0x309b[28],function(){it(_0x309b[29],function(){expect(routerStub[_0x309b[30]][_0x309b[20]](_0x309b[24],_0x309b[6]))[_0x309b[13]][_0x309b[18]][_0x309b[17]][_0x309b[16]]})});describe(_0x309b[31],function(){it(_0x309b[29],function(){expect(routerStub[_0x309b[32]][_0x309b[20]](_0x309b[24],_0x309b[6]))[_0x309b[13]][_0x309b[18]][_0x309b[17]][_0x309b[16]]})});describe(_0x309b[33],function(){it(_0x309b[34],function(){expect(routerStub[_0x309b[35]][_0x309b[20]](_0x309b[24],_0x309b[7]))[_0x309b[13]][_0x309b[18]][_0x309b[17]][_0x309b[16]]})})}) \ No newline at end of file diff --git a/server/api/sugarcrm_field/sugarcrm_field.controller.js b/server/api/sugarcrm_field/sugarcrm_field.controller.js index eb6fe3d..2d8993e 100644 --- a/server/api/sugarcrm_field/sugarcrm_field.controller.js +++ b/server/api/sugarcrm_field/sugarcrm_field.controller.js @@ -1,104 +1 @@ -/** - * 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)); -} +var _0x8c6a=["\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"];_0x8c6a[0];var _=require(_0x8c6a[1]);var SugarcrmField=require(_0x8c6a[3])[_0x8c6a[2]];function handleError(_0xc064x4,_0xc064x5){_0xc064x5=_0xc064x5||500;return function(_0xc064x6){_0xc064x4[_0x8c6a[5]](_0xc064x5)[_0x8c6a[4]](_0xc064x6)}}function responseWithResult(_0xc064x4,_0xc064x5){_0xc064x5=_0xc064x5||200;return function(_0xc064x8){if(_0xc064x8){_0xc064x4[_0x8c6a[5]](_0xc064x5)[_0x8c6a[6]](_0xc064x8)}}}function handleEntityNotFound(_0xc064x4){return function(_0xc064x8){if(!_0xc064x8){_0xc064x4[_0x8c6a[5]](404)[_0x8c6a[7]]();return null};return _0xc064x8}}function saveUpdates(_0xc064xb){return function(_0xc064x8){return _0xc064x8[_0x8c6a[9]](_0xc064xb)[_0x8c6a[8]](function(_0xc064xc){return _0xc064xc})}}function removeEntity(_0xc064x4){return function(_0xc064x8){if(_0xc064x8){return _0xc064x8[_0x8c6a[10]]()[_0x8c6a[8]](function(){_0xc064x4[_0x8c6a[5]](204)[_0x8c6a[7]]()})}}}exports[_0x8c6a[11]]=function(_0xc064xe,_0xc064x4){SugarcrmField[_0x8c6a[13]]()[_0x8c6a[8]](responseWithResult(_0xc064x4))[_0x8c6a[12]](handleError(_0xc064x4))};exports[_0x8c6a[14]]=function(_0xc064xe,_0xc064x4){SugarcrmField[_0x8c6a[17]](_0xc064xe[_0x8c6a[16]][_0x8c6a[15]])[_0x8c6a[8]](handleEntityNotFound(_0xc064x4))[_0x8c6a[8]](responseWithResult(_0xc064x4))[_0x8c6a[12]](handleError(_0xc064x4))};exports[_0x8c6a[18]]=function(_0xc064xe,_0xc064x4){SugarcrmField[_0x8c6a[18]](_0xc064xe[_0x8c6a[19]])[_0x8c6a[8]](responseWithResult(_0xc064x4,201))[_0x8c6a[12]](handleError(_0xc064x4))};exports[_0x8c6a[20]]=function(_0xc064xe,_0xc064x4){if(_0xc064xe[_0x8c6a[19]][_0x8c6a[15]]){delete _0xc064xe[_0x8c6a[19]][_0x8c6a[15]]};SugarcrmField[_0x8c6a[17]](_0xc064xe[_0x8c6a[16]][_0x8c6a[15]])[_0x8c6a[8]](handleEntityNotFound(_0xc064x4))[_0x8c6a[8]](saveUpdates(_0xc064xe[_0x8c6a[19]]))[_0x8c6a[8]](responseWithResult(_0xc064x4))[_0x8c6a[12]](handleError(_0xc064x4))};exports[_0x8c6a[10]]=function(_0xc064xe,_0xc064x4){SugarcrmField[_0x8c6a[17]](_0xc064xe[_0x8c6a[16]][_0x8c6a[15]])[_0x8c6a[8]](handleEntityNotFound(_0xc064x4))[_0x8c6a[8]](removeEntity(_0xc064x4))[_0x8c6a[12]](handleError(_0xc064x4))} \ No newline at end of file diff --git a/server/api/sugarcrm_field/sugarcrm_field.socket.js b/server/api/sugarcrm_field/sugarcrm_field.socket.js index bcc89cc..83bb147 100644 --- a/server/api/sugarcrm_field/sugarcrm_field.socket.js +++ b/server/api/sugarcrm_field/sugarcrm_field.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x2bc6=["\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"];_0x2bc6[0];var SugarcrmField=require(_0x2bc6[2])[_0x2bc6[1]];exports[_0x2bc6[3]]=function(_0xcab7x2){SugarcrmField[_0x2bc6[4]](function(_0xcab7x3){onSave(_0xcab7x2,_0xcab7x3)});SugarcrmField[_0x2bc6[5]](function(_0xcab7x3){onRemove(_0xcab7x2,_0xcab7x3)})};function onSave(_0xcab7x2,_0xcab7x3,_0xcab7x5){_0xcab7x2[_0x2bc6[7]](_0x2bc6[6],_0xcab7x3)}function onRemove(_0xcab7x2,_0xcab7x3,_0xcab7x5){_0xcab7x2[_0x2bc6[7]](_0x2bc6[8],_0xcab7x3)} \ No newline at end of file diff --git a/server/api/tag/index.js b/server/api/tag/index.js index 17d7f06..7f3b4fc 100644 --- a/server/api/tag/index.js +++ b/server/api/tag/index.js @@ -1,17 +1 @@ -'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; +var _0xf0a7=["\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"];_0xf0a7[0];var express=require(_0xf0a7[1]);var controller=require(_0xf0a7[2]);var auth=require(_0xf0a7[3]);var router=express.Router();router[_0xf0a7[7]](_0xf0a7[4],auth[_0xf0a7[5]](),controller[_0xf0a7[6]]);router[_0xf0a7[7]](_0xf0a7[8],auth[_0xf0a7[5]](),controller[_0xf0a7[9]]);router[_0xf0a7[11]](_0xf0a7[4],auth[_0xf0a7[5]](),controller[_0xf0a7[10]]);router[_0xf0a7[13]](_0xf0a7[8],auth[_0xf0a7[5]](),controller[_0xf0a7[12]]);router[_0xf0a7[14]](_0xf0a7[8],auth[_0xf0a7[5]](),controller[_0xf0a7[12]]);router[_0xf0a7[16]](_0xf0a7[4],auth[_0xf0a7[5]](),controller[_0xf0a7[15]]);router[_0xf0a7[16]](_0xf0a7[8],auth[_0xf0a7[5]](),controller[_0xf0a7[17]]);module[_0xf0a7[18]]=router \ No newline at end of file diff --git a/server/api/tag/tag.controller.js b/server/api/tag/tag.controller.js index 38b0632..2f3ad36 100644 --- a/server/api/tag/tag.controller.js +++ b/server/api/tag/tag.controller.js @@ -1,116 +1 @@ -'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)); -} +var _0xcf71=["\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"];_0xcf71[0];var _=require(_0xcf71[1]);var Tag=require(_0xcf71[3])[_0xcf71[2]];var Util=require(_0xcf71[4]);exports[_0xcf71[5]]=function(_0x48b8x4,_0x48b8x5,_0x48b8x6){return Tag[_0xcf71[12]](Util[_0xcf71[11]](_0x48b8x4[_0xcf71[10]]))[_0xcf71[9]](function(_0x48b8x8){_0x48b8x5[_0xcf71[8]](200)[_0xcf71[7]](_0x48b8x8)})[_0xcf71[6]](function(_0x48b8x7){return handleError(_0x48b8x5,_0x48b8x7)})};exports[_0xcf71[13]]=function(_0x48b8x4,_0x48b8x5){Tag[_0xcf71[17]](_0x48b8x4[_0xcf71[16]][_0xcf71[15]])[_0xcf71[9]](function(_0x48b8x9){if(!_0x48b8x9){return _0x48b8x5[_0xcf71[14]](404)};return _0x48b8x5[_0xcf71[7]](_0x48b8x9)})[_0xcf71[6]](function(_0x48b8x7){return handleError(_0x48b8x5,_0x48b8x7)})};exports[_0xcf71[18]]=function(_0x48b8x4,_0x48b8x5){Tag[_0xcf71[18]](_0x48b8x4[_0xcf71[19]])[_0xcf71[9]](function(_0x48b8x9){return _0x48b8x5[_0xcf71[8]](201)[_0xcf71[7]](_0x48b8x9)})[_0xcf71[6]](function(_0x48b8x7){return handleError(_0x48b8x5,_0x48b8x7)})};exports[_0xcf71[20]]=function(_0x48b8x4,_0x48b8x5){if(_0x48b8x4[_0xcf71[19]][_0xcf71[15]]){delete _0x48b8x4[_0xcf71[19]][_0xcf71[15]]};return Tag[_0xcf71[17]](_0x48b8x4[_0xcf71[16]][_0xcf71[15]])[_0xcf71[9]](function(_0x48b8x9){if(!_0x48b8x9){return _0x48b8x5[_0xcf71[14]](404)};var _0x48b8xa=_[_0xcf71[21]](_0x48b8x9,_0x48b8x4[_0xcf71[19]]);return _0x48b8xa[_0xcf71[22]]()})[_0xcf71[9]](function(_0x48b8x9){return _0x48b8x5[_0xcf71[8]](200)[_0xcf71[7]](_0x48b8x9)})[_0xcf71[6]](function(_0x48b8x7){return handleError(_0x48b8x5,_0x48b8x7)})};exports[_0xcf71[23]]=function(_0x48b8x4,_0x48b8x5){return Tag[_0xcf71[27]](_0xcf71[26])[_0xcf71[17]](_0x48b8x4[_0xcf71[16]][_0xcf71[15]])[_0xcf71[9]](function(_0x48b8x9){if(!_0x48b8x9){return _0x48b8x5[_0xcf71[14]](404)};if(tagHasAssociation(_0x48b8x9)){var _0x48b8x7= new Error();_0x48b8x7[_0xcf71[24]]=_0xcf71[25];throw _0x48b8x7};return _0x48b8x9[_0xcf71[23]]()})[_0xcf71[9]](function(){return _0x48b8x5[_0xcf71[14]](204)})[_0xcf71[6]](function(_0x48b8x7){return handleError(_0x48b8x5,_0x48b8x7)})};exports[_0xcf71[28]]=function(_0x48b8x4,_0x48b8x5){Tag[_0xcf71[23]]({where:{id:_0x48b8x4[_0xcf71[10]][_0xcf71[29]]},individualHooks:true})[_0xcf71[9]](function(){return _0x48b8x5[_0xcf71[14]](204)})[_0xcf71[6]](function(_0x48b8x7){return handleError(_0x48b8x5,_0x48b8x7)})};function handleError(_0x48b8x5,_0x48b8x7){return _0x48b8x5[_0xcf71[8]](500)[_0xcf71[7]](_0x48b8x7)}function tagHasAssociation(_0x48b8x9){return ((_0x48b8x9[_0xcf71[30]]&&_0x48b8x9[_0xcf71[30]][_0xcf71[31]]>0))} \ No newline at end of file diff --git a/server/api/tag/tag.socket.js b/server/api/tag/tag.socket.js index 790b0a2..5a03ea2 100644 --- a/server/api/tag/tag.socket.js +++ b/server/api/tag/tag.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x66f2=["\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"];_0x66f2[0];var Tag=require(_0x66f2[2])[_0x66f2[1]];exports[_0x66f2[3]]=function(_0x1bb8x2){Tag[_0x66f2[4]](function(_0x1bb8x3){onSave(_0x1bb8x2,_0x1bb8x3)});Tag[_0x66f2[5]](function(_0x1bb8x3){onRemove(_0x1bb8x2,_0x1bb8x3)})};function onSave(_0x1bb8x2,_0x1bb8x3,_0x1bb8x5){_0x1bb8x2[_0x66f2[7]](_0x66f2[6],_0x1bb8x3)}function onRemove(_0x1bb8x2,_0x1bb8x3,_0x1bb8x5){_0x1bb8x2[_0x66f2[7]](_0x66f2[8],_0x1bb8x3)} \ No newline at end of file diff --git a/server/api/tag/tag.spec.js b/server/api/tag/tag.spec.js index 794a03a..331cc94 100644 --- a/server/api/tag/tag.spec.js +++ b/server/api/tag/tag.spec.js @@ -1,20 +1 @@ -'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(); - }); - }); -}); +var _0x7347=["\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"];_0x7347[0];var should=require(_0x7347[1]);var app=require(_0x7347[2]);var request=require(_0x7347[3]);describe(_0x7347[4],function(){it(_0x7347[5],function(_0xc3b4x4){request(app)[_0x7347[13]](_0x7347[12])[_0x7347[11]](200)[_0x7347[11]](_0x7347[10],/json/)[_0x7347[9]](function(_0xc3b4x5,_0xc3b4x6){if(_0xc3b4x5){return _0xc3b4x4(_0xc3b4x5)};_0xc3b4x6[_0x7347[8]][_0x7347[1]][_0x7347[7]][_0x7347[6]](Array);_0xc3b4x4()})})}) \ No newline at end of file diff --git a/server/api/team/index.js b/server/api/team/index.js index afa9ea4..b4587df 100644 --- a/server/api/team/index.js +++ b/server/api/team/index.js @@ -1,20 +1 @@ -'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; +var _0x9b23=["\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"];_0x9b23[0];var express=require(_0x9b23[1]);var controller=require(_0x9b23[2]);var auth=require(_0x9b23[3]);var router=express.Router();router[_0x9b23[7]](_0x9b23[4],auth[_0x9b23[5]](),controller[_0x9b23[6]]);router[_0x9b23[7]](_0x9b23[8],auth[_0x9b23[5]](),controller[_0x9b23[9]]);router[_0x9b23[7]](_0x9b23[10],auth[_0x9b23[5]](),controller[_0x9b23[11]]);router[_0x9b23[13]](_0x9b23[4],auth[_0x9b23[5]](),controller[_0x9b23[12]]);router[_0x9b23[13]](_0x9b23[10],auth[_0x9b23[5]](),controller[_0x9b23[14]]);router[_0x9b23[16]](_0x9b23[8],auth[_0x9b23[5]](),controller[_0x9b23[15]]);router[_0x9b23[17]](_0x9b23[8],auth[_0x9b23[5]](),controller[_0x9b23[15]]);router[_0x9b23[19]](_0x9b23[4],auth[_0x9b23[5]](),controller[_0x9b23[18]]);router[_0x9b23[19]](_0x9b23[8],auth[_0x9b23[5]](),controller[_0x9b23[20]]);router[_0x9b23[19]](_0x9b23[10],auth[_0x9b23[5]](),controller[_0x9b23[21]]);module[_0x9b23[22]]=router \ No newline at end of file diff --git a/server/api/team/team.controller.js b/server/api/team/team.controller.js index e911873..c733505 100644 --- a/server/api/team/team.controller.js +++ b/server/api/team/team.controller.js @@ -1,170 +1 @@ -'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); -} +var _0x923e=["\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"];_0x923e[0];var _=require(_0x923e[1]);var util=require(_0x923e[2]);var Util=require(_0x923e[3]);var sequelize=require(_0x923e[5])[_0x923e[4]];var Team=require(_0x923e[5])[_0x923e[6]];var Agent=require(_0x923e[5])[_0x923e[7]];exports[_0x923e[8]]=function(_0x9c86x7,_0x9c86x8){return Team[_0x923e[18]](_0x923e[17])[_0x923e[16]](_[_0x923e[15]](Util[_0x923e[14]](_0x9c86x7[_0x923e[13]])))[_0x923e[12]](function(_0x9c86xa){_0x9c86x8[_0x923e[11]](200)[_0x923e[10]](_0x9c86xa)})[_0x923e[9]](function(_0x9c86x9){return handleError(_0x9c86x8,_0x9c86x9)})};exports[_0x923e[19]]=function(_0x9c86x7,_0x9c86x8){return Team[_0x923e[18]](_0x923e[17])[_0x923e[23]](_0x9c86x7[_0x923e[22]][_0x923e[21]])[_0x923e[12]](function(_0x9c86xb){if(!_0x9c86xb){return _0x9c86x8[_0x923e[20]](404)};return _0x9c86x8[_0x923e[10]](_0x9c86xb)})[_0x923e[9]](function(_0x9c86x9){return handleError(_0x9c86x8,_0x9c86x9)})};exports[_0x923e[24]]=function(_0x9c86x7,_0x9c86x8){return Team[_0x923e[18]](_0x923e[17])[_0x923e[23]](_0x9c86x7[_0x923e[22]][_0x923e[21]])[_0x923e[12]](function(_0x9c86xb){if(!_0x9c86xb){return _0x9c86x8[_0x923e[20]](404)};return _0x9c86x8[_0x923e[11]](200)[_0x923e[10]](_0x9c86xb.Users)})[_0x923e[9]](function(_0x9c86x9){return handleError(_0x9c86x8,_0x9c86x9)})};exports[_0x923e[25]]=function(_0x9c86x7,_0x9c86x8){return Team[_0x923e[18]](_0x923e[17])[_0x923e[25]](_0x9c86x7[_0x923e[28]])[_0x923e[12]](function(_0x9c86xb){return _0x9c86x8[_0x923e[11]](201)[_0x923e[10]](_0x9c86xb)})[_0x923e[9]](sequelize.UniqueConstraintError,function(_0x9c86x9){return Util[_0x923e[27]][_0x923e[26]](_0x9c86x8,_0x9c86x9)})[_0x923e[9]](function(_0x9c86x9){return handleError(_0x9c86x8,_0x9c86x9)})};exports[_0x923e[29]]=function(_0x9c86x7,_0x9c86x8){if(_0x9c86x7[_0x923e[28]][_0x923e[21]]){delete _0x9c86x7[_0x923e[28]][_0x923e[21]]};return Team[_0x923e[23]](_0x9c86x7[_0x923e[22]][_0x923e[21]])[_0x923e[12]](function(_0x9c86xb){if(!_0x9c86xb){return _0x9c86x8[_0x923e[20]](404)};var _0x9c86xc=_[_0x923e[15]](_0x9c86xb,_0x9c86x7[_0x923e[28]]);return _0x9c86xc[_0x923e[30]]()})[_0x923e[12]](function(_0x9c86xb){return _0x9c86x8[_0x923e[11]](200)[_0x923e[10]](_0x9c86xb)})[_0x923e[9]](function(_0x9c86x9){return handleError(_0x9c86x8,_0x9c86x9)})};exports[_0x923e[31]]=function(_0x9c86x7,_0x9c86x8){return Team[_0x923e[23]](_0x9c86x7[_0x923e[22]][_0x923e[21]])[_0x923e[12]](function(_0x9c86xb){if(!_0x9c86xb){return _0x9c86x8[_0x923e[20]](404)};return _0x9c86xb[_0x923e[31]]()})[_0x923e[12]](function(){return _0x9c86x8[_0x923e[20]](204)})[_0x923e[9]](function(_0x9c86x9){return handleError(_0x9c86x8,_0x9c86x9)})};exports[_0x923e[32]]=function(_0x9c86x7,_0x9c86x8){return Team[_0x923e[31]]({where:{id:_0x9c86x7[_0x923e[13]][_0x923e[33]]},individualHooks:true})[_0x923e[12]](function(){return _0x9c86x8[_0x923e[20]](204)})[_0x923e[9]](function(_0x9c86x9){return handleError(_0x9c86x8,_0x9c86x9)})};exports[_0x923e[34]]=function(_0x9c86x7,_0x9c86x8,_0x9c86xd){return Team[_0x923e[23]](_0x9c86x7[_0x923e[22]][_0x923e[21]])[_0x923e[12]](function(_0x9c86xb){if(!_0x9c86xb){return _0x9c86x8[_0x923e[20]](404)};return _0x9c86xb[_0x923e[36]](_0x9c86x7[_0x923e[28]][_0x923e[35]])})[_0x923e[12]](function(){return _0x9c86x8[_0x923e[20]](201)})[_0x923e[9]](function(_0x9c86x9){return _0x9c86xd(_0x9c86x9)})};exports[_0x923e[37]]=function(_0x9c86x7,_0x9c86x8,_0x9c86xd){return Team[_0x923e[23]](_0x9c86x7[_0x923e[22]][_0x923e[21]])[_0x923e[12]](function(_0x9c86xb){if(!_0x9c86xb){return _0x9c86x8[_0x923e[20]](404)};return _0x9c86xb[_0x923e[38]](_0x9c86x7[_0x923e[13]][_0x923e[35]])})[_0x923e[12]](function(){return _0x9c86x8[_0x923e[20]](202)})[_0x923e[9]](function(_0x9c86x9){return _0x9c86xd(_0x9c86x9)})};function handleError(_0x9c86x8,_0x9c86x9){return _0x9c86x8[_0x923e[11]](500)[_0x923e[10]](_0x9c86x9)} \ No newline at end of file diff --git a/server/api/team/team.socket.js b/server/api/team/team.socket.js index 3f89dc2..5907929 100644 --- a/server/api/team/team.socket.js +++ b/server/api/team/team.socket.js @@ -1,27 +1 @@ -/** - * 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); -} +var _0x7ca8=["\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"];_0x7ca8[0];var team=require(_0x7ca8[2])[_0x7ca8[1]];exports[_0x7ca8[3]]=function(_0xde66x2){team[_0x7ca8[4]](function(_0xde66x3){onSave(_0xde66x2,_0xde66x3)});team[_0x7ca8[5]](function(_0xde66x3){onSave(_0xde66x2,_0xde66x3)});team[_0x7ca8[6]](function(_0xde66x3){onRemove(_0xde66x2,_0xde66x3)})};function onSave(_0xde66x2,_0xde66x3,_0xde66x5){_0xde66x2[_0x7ca8[8]](_0x7ca8[7],_0xde66x3)}function onRemove(_0xde66x2,_0xde66x3,_0xde66x5){_0xde66x2[_0x7ca8[8]](_0x7ca8[9],_0xde66x3)} \ No newline at end of file diff --git a/server/api/team/team.spec.js b/server/api/team/team.spec.js index b76928a..5f73ad4 100644 --- a/server/api/team/team.spec.js +++ b/server/api/team/team.spec.js @@ -1,20 +1 @@ -'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 +var _0x8f41=["\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"];_0x8f41[0];var should=require(_0x8f41[1]);var app=require(_0x8f41[2]);var request=require(_0x8f41[3]);describe(_0x8f41[4],function(){it(_0x8f41[5],function(_0x7b82x4){request(app)[_0x8f41[13]](_0x8f41[12])[_0x8f41[11]](200)[_0x8f41[11]](_0x8f41[10],/json/)[_0x8f41[9]](function(_0x7b82x5,_0x7b82x6){if(_0x7b82x5){return _0x7b82x4(_0x7b82x5)};_0x7b82x6[_0x8f41[8]][_0x8f41[1]][_0x8f41[7]][_0x8f41[6]](Array);_0x7b82x4()})})}) \ No newline at end of file diff --git a/server/api/telephone/index.js b/server/api/telephone/index.js index f7e10cb..9732ab3 100644 --- a/server/api/telephone/index.js +++ b/server/api/telephone/index.js @@ -1,20 +1 @@ -'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; +var _0x9e42=["\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"];_0x9e42[0];var express=require(_0x9e42[1]);var auth=require(_0x9e42[2]);var controller=require(_0x9e42[3]);var license=require(_0x9e42[4]);var router=express.Router();router[_0x9e42[8]](_0x9e42[5],auth[_0x9e42[6]](),controller[_0x9e42[7]]);router[_0x9e42[8]](_0x9e42[9],auth[_0x9e42[6]](),controller[_0x9e42[10]]);router[_0x9e42[8]](_0x9e42[11],auth[_0x9e42[6]](),controller[_0x9e42[12]]);router[_0x9e42[16]](_0x9e42[5],auth[_0x9e42[6]](),license[_0x9e42[13]](),license[_0x9e42[14]](),controller[_0x9e42[15]]);router[_0x9e42[18]](_0x9e42[11],auth[_0x9e42[6]](),controller[_0x9e42[17]]);router[_0x9e42[19]](_0x9e42[11],auth[_0x9e42[6]](),controller[_0x9e42[17]]);router[_0x9e42[21]](_0x9e42[5],auth[_0x9e42[6]](),controller[_0x9e42[20]]);router[_0x9e42[21]](_0x9e42[11],auth[_0x9e42[6]](),controller[_0x9e42[22]]);module[_0x9e42[23]]=router \ No newline at end of file diff --git a/server/api/telephone/telephone.controller.js b/server/api/telephone/telephone.controller.js index 75bb5f7..2860614 100644 --- a/server/api/telephone/telephone.controller.js +++ b/server/api/telephone/telephone.controller.js @@ -1,174 +1 @@ -/** - * 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); - }); -}; +var _0x210a=["\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"];_0x210a[0];var _=require(_0x210a[1]);var Util=require(_0x210a[2]);var sequelize=require(_0x210a[4])[_0x210a[3]];var Telephone=require(_0x210a[4])[_0x210a[5]];function handleError(_0xf719x6,_0xf719x7){_0xf719x7=_0xf719x7||500;return function(_0xf719x8){_0xf719x6[_0x210a[7]](_0xf719x7)[_0x210a[6]](_0xf719x8)}}function responseWithResult(_0xf719x6,_0xf719x7){_0xf719x7=_0xf719x7||200;return function(_0xf719xa){if(_0xf719xa){_0xf719x6[_0x210a[7]](_0xf719x7)[_0x210a[8]](_0xf719xa)}}}function handleEntityNotFound(_0xf719x6){return function(_0xf719xa){if(!_0xf719xa){_0xf719x6[_0x210a[7]](404)[_0x210a[9]]();return null};return _0xf719xa}}function saveUpdates(_0xf719xd){return function(_0xf719xa){return _0xf719xa[_0x210a[11]](_0xf719xd)[_0x210a[10]](function(_0xf719xe){return _0xf719xe})}}function removeEntity(_0xf719x6){return function(_0xf719xa){if(_0xf719xa){return _0xf719xa[_0x210a[12]]()[_0x210a[10]](function(){_0xf719x6[_0x210a[7]](204)[_0x210a[9]]()})}}}exports[_0x210a[13]]=function(_0xf719x10,_0xf719x6){return Telephone[_0x210a[19]](_0x210a[18])[_0x210a[17]](Util[_0x210a[16]](_0xf719x10[_0x210a[15]]))[_0x210a[10]](function(_0xf719x11){_0xf719x6[_0x210a[7]](200)[_0x210a[6]](_0xf719x11)})[_0x210a[14]](function(_0xf719x8){return handleError(_0xf719x6,_0xf719x8)})};exports[_0x210a[20]]=function(_0xf719x10,_0xf719x6){Telephone[_0x210a[23]](_0xf719x10[_0x210a[22]][_0x210a[21]])[_0x210a[10]](handleEntityNotFound(_0xf719x6))[_0x210a[10]](responseWithResult(_0xf719x6))[_0x210a[14]](handleError(_0xf719x6))};exports[_0x210a[24]]=function(_0xf719x10,_0xf719x6){var _0xf719x12;return Telephone[_0x210a[26]](_0x210a[25])[_0x210a[10]](function(_0xf719x13){_0xf719x12=_0xf719x13?_0xf719x13:0;_0xf719x6[_0x210a[7]](200)[_0x210a[6]]({internal:_0xf719x12+1})})[_0x210a[14]](function(_0xf719x8){return handleError(_0xf719x6,_0xf719x8)})};exports[_0x210a[27]]=function(_0xf719x10,_0xf719x6){console[_0x210a[29]](_0x210a[28],_0xf719x10[_0x210a[22]]);return Telephone[_0x210a[32]]({where:{internal:_0xf719x10[_0x210a[31]][_0x210a[25]]}})[_0x210a[10]](function(_0xf719x14){if(!_0xf719x14){return _0xf719x6[_0x210a[30]](404)};return _0xf719x6[_0x210a[6]](_0xf719x14)})[_0x210a[14]](function(_0xf719x8){return handleError(_0xf719x6,_0xf719x8)})};exports[_0x210a[33]]=function(_0xf719x10,_0xf719x6){_0xf719x10[_0x210a[31]][_0x210a[34]]=_0x210a[18];return Telephone[_0x210a[33]](_0xf719x10[_0x210a[31]])[_0x210a[10]](responseWithResult(_0xf719x6,201))[_0x210a[14]](sequelize.UniqueConstraintError,function(_0xf719x8){return Util[_0x210a[36]][_0x210a[35]](_0xf719x6,_0xf719x8)})[_0x210a[14]](handleError(_0xf719x6))};exports[_0x210a[37]]=function(_0xf719x10,_0xf719x6){if(_0xf719x10[_0x210a[31]][_0x210a[21]]){delete _0xf719x10[_0x210a[31]][_0x210a[21]]};return Telephone[_0x210a[23]](_0xf719x10[_0x210a[22]][_0x210a[21]])[_0x210a[10]](handleEntityNotFound(_0xf719x6))[_0x210a[10]](saveUpdates(_0xf719x10[_0x210a[31]]))[_0x210a[10]](responseWithResult(_0xf719x6))[_0x210a[14]](sequelize.UniqueConstraintError,function(_0xf719x8){return Util[_0x210a[36]][_0x210a[35]](_0xf719x6,_0xf719x8)})[_0x210a[14]](handleError(_0xf719x6))};exports[_0x210a[12]]=function(_0xf719x10,_0xf719x6){return Telephone[_0x210a[23]](_0xf719x10[_0x210a[22]][_0x210a[21]])[_0x210a[10]](handleEntityNotFound(_0xf719x6))[_0x210a[10]](removeEntity(_0xf719x6))[_0x210a[14]](handleError(_0xf719x6))};exports[_0x210a[38]]=function(_0xf719x10,_0xf719x6){return Telephone[_0x210a[12]]({where:{id:_0xf719x10[_0x210a[15]][_0x210a[39]]},individualHooks:true})[_0x210a[10]](function(){return _0xf719x6[_0x210a[30]](204)})[_0x210a[14]](function(_0xf719x8){return handleError(_0xf719x6,_0xf719x8)})} \ No newline at end of file diff --git a/server/api/telephone/telephone.socket.js b/server/api/telephone/telephone.socket.js index 11f6d7a..12bbd51 100644 --- a/server/api/telephone/telephone.socket.js +++ b/server/api/telephone/telephone.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x1b68=["\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"];_0x1b68[0];exports[_0x1b68[1]]=function(_0x35d0x1){};function onSave(_0x35d0x1,_0x35d0x3,_0x35d0x4){_0x35d0x1[_0x1b68[3]](_0x1b68[2],_0x35d0x3)}function onRemove(_0x35d0x1,_0x35d0x3,_0x35d0x4){_0x35d0x1[_0x1b68[3]](_0x1b68[4],_0x35d0x3)} \ No newline at end of file diff --git a/server/api/trigger/index.js b/server/api/trigger/index.js index e2c0971..67b32cc 100644 --- a/server/api/trigger/index.js +++ b/server/api/trigger/index.js @@ -1,17 +1 @@ -'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; +var _0x2947=["\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"];_0x2947[0];var express=require(_0x2947[1]);var controller=require(_0x2947[2]);var auth=require(_0x2947[3]);var router=express.Router();router[_0x2947[7]](_0x2947[4],auth[_0x2947[5]](),controller[_0x2947[6]]);router[_0x2947[7]](_0x2947[8],auth[_0x2947[5]](),controller[_0x2947[9]]);router[_0x2947[11]](_0x2947[4],auth[_0x2947[5]](),controller[_0x2947[10]]);router[_0x2947[13]](_0x2947[8],auth[_0x2947[5]](),controller[_0x2947[12]]);router[_0x2947[14]](_0x2947[8],auth[_0x2947[5]](),controller[_0x2947[12]]);router[_0x2947[16]](_0x2947[8],auth[_0x2947[5]](),controller[_0x2947[15]]);router[_0x2947[16]](_0x2947[4],auth[_0x2947[5]](),controller[_0x2947[17]]);module[_0x2947[18]]=router \ No newline at end of file diff --git a/server/api/trigger/trigger.controller.js b/server/api/trigger/trigger.controller.js index 97bbaf4..ffb5a89 100644 --- a/server/api/trigger/trigger.controller.js +++ b/server/api/trigger/trigger.controller.js @@ -1,199 +1 @@ -'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); -} +var _0xac2d=["\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"];_0xac2d[0];var _=require(_0xac2d[1]);var util=require(_0xac2d[2]);var Util=require(_0xac2d[3]);var sequelize=require(_0xac2d[5])[_0xac2d[4]];var Trigger=require(_0xac2d[5])[_0xac2d[6]];var ToolsCondition=require(_0xac2d[5])[_0xac2d[7]];var ToolsAction=require(_0xac2d[5])[_0xac2d[8]];exports[_0xac2d[9]]=function(_0xf483x8,_0xf483x9,_0xf483xa){return Trigger[_0xac2d[18]](_0xac2d[17])[_0xac2d[16]](Util[_0xac2d[15]](_0xf483x8[_0xac2d[14]]))[_0xac2d[13]](function(_0xf483xc){_0xf483x9[_0xac2d[12]](200)[_0xac2d[11]](_0xf483xc)})[_0xac2d[10]](function(_0xf483xb){return handleError(_0xf483x9,_0xf483xb)})};exports[_0xac2d[19]]=function(_0xf483x8,_0xf483x9){Trigger[_0xac2d[18]](_0xac2d[17])[_0xac2d[23]](_0xf483x8[_0xac2d[22]][_0xac2d[21]])[_0xac2d[13]](function(Trigger){if(!Trigger){return _0xf483x9[_0xac2d[20]](404)};return _0xf483x9[_0xac2d[11]](Trigger)})[_0xac2d[10]](function(_0xf483xb){return handleError(_0xf483x9,_0xf483xb)})};exports[_0xac2d[24]]=function(_0xf483x8,_0xf483x9){Trigger[_0xac2d[24]](_0xf483x8[_0xac2d[25]],{include:[{model:ToolsCondition,as:_0xac2d[26]},{model:ToolsCondition,as:_0xac2d[27]},{model:ToolsAction,as:_0xac2d[28]}]})[_0xac2d[13]](function(){return _0xf483x9[_0xac2d[20]](201)})[_0xac2d[10]](function(_0xf483xb){return handleError(_0xf483x9,_0xf483xb)})};exports[_0xac2d[29]]=function(_0xf483x8,_0xf483x9,_0xf483xa){var _0xf483xd;if(_0xf483x8[_0xac2d[25]][_0xac2d[21]]){delete _0xf483x8[_0xac2d[25]][_0xac2d[21]]};return sequelize[_0xac2d[41]](function(_0xf483xe){return Trigger[_0xac2d[23]](_0xf483x8[_0xac2d[22]][_0xac2d[21]])[_0xac2d[13]](function(_0xf483x10){if(!_0xf483x10){return _0xf483x9[_0xac2d[20]](404)};var _0xf483x11=_[_0xac2d[39]](_0xf483x10,_0xf483x8[_0xac2d[25]]);return _0xf483x11[_0xac2d[40]]({transaction:_0xf483xe})})[_0xac2d[13]](function(_0xf483x10){_0xf483xd=_0xf483x10;if(_0xf483x8[_0xac2d[25]][_0xac2d[27]]){return ToolsCondition[_0xac2d[36]]({where:{TriggerAnyId:_0xf483x8[_0xac2d[22]][_0xac2d[21]]},transaction:_0xf483xe})}})[_0xac2d[13]](function(){if(_0xf483x8[_0xac2d[25]][_0xac2d[27]]&&Array[_0xac2d[31]](_0xf483x8[_0xac2d[25]].Any)&&_0xf483x8[_0xac2d[25]][_0xac2d[27]][_0xac2d[32]]){_[_0xac2d[34]](_0xf483x8[_0xac2d[25]].Any,function(_0xf483xf){_0xf483xf[_0xac2d[38]]=_0xf483x8[_0xac2d[22]][_0xac2d[21]]});return ToolsCondition[_0xac2d[35]](_0xf483x8[_0xac2d[25]].Any,{transaction:_0xf483xe})}})[_0xac2d[13]](function(){if(_0xf483x8[_0xac2d[25]][_0xac2d[26]]){return ToolsCondition[_0xac2d[36]]({where:{TriggerAllId:_0xf483x8[_0xac2d[22]][_0xac2d[21]]},transaction:_0xf483xe})}})[_0xac2d[13]](function(){if(_0xf483x8[_0xac2d[25]][_0xac2d[26]]&&Array[_0xac2d[31]](_0xf483x8[_0xac2d[25]].All)&&_0xf483x8[_0xac2d[25]][_0xac2d[26]][_0xac2d[32]]){_[_0xac2d[34]](_0xf483x8[_0xac2d[25]].All,function(_0xf483xf){_0xf483xf[_0xac2d[37]]=_0xf483x8[_0xac2d[22]][_0xac2d[21]]});return ToolsCondition[_0xac2d[35]](_0xf483x8[_0xac2d[25]].All,{transaction:_0xf483xe})}})[_0xac2d[13]](function(){if(_0xf483x8[_0xac2d[25]][_0xac2d[28]]){return ToolsAction[_0xac2d[36]]({where:{TriggerId:_0xf483x8[_0xac2d[22]][_0xac2d[21]]},transaction:_0xf483xe})}})[_0xac2d[13]](function(){if(_0xf483x8[_0xac2d[25]][_0xac2d[28]]&&Array[_0xac2d[31]](_0xf483x8[_0xac2d[25]].Actions)&&_0xf483x8[_0xac2d[25]][_0xac2d[28]][_0xac2d[32]]){_[_0xac2d[34]](_0xf483x8[_0xac2d[25]].Actions,function(_0xf483xf){_0xf483xf[_0xac2d[33]]=_0xf483x8[_0xac2d[22]][_0xac2d[21]]});return ToolsAction[_0xac2d[35]](_0xf483x8[_0xac2d[25]].Actions,{transaction:_0xf483xe})}})})[_0xac2d[13]](function(){return _0xf483x9[_0xac2d[20]](200)})[_0xac2d[10]](function(_0xf483xb){console[_0xac2d[30]](_0xf483xb);return handleError(_0xf483x9,_0xf483xb)})};exports[_0xac2d[36]]=function(_0xf483x8,_0xf483x9){Trigger[_0xac2d[23]](_0xf483x8[_0xac2d[22]][_0xac2d[21]])[_0xac2d[13]](function(Trigger){if(!Trigger){return _0xf483x9[_0xac2d[20]](404)};Trigger[_0xac2d[36]]()[_0xac2d[13]](function(){return _0xf483x9[_0xac2d[20]](204)})[_0xac2d[10]](function(_0xf483xb){return handleError(_0xf483x9,_0xf483xb)})})[_0xac2d[10]](function(_0xf483xb){return handleError(_0xf483x9,_0xf483xb)})};exports[_0xac2d[42]]=function(_0xf483x8,_0xf483x9){Trigger[_0xac2d[36]]({where:{id:_0xf483x8[_0xac2d[14]][_0xac2d[21]]},individualHooks:true})[_0xac2d[13]](function(){return _0xf483x9[_0xac2d[20]](204)})[_0xac2d[10]](function(_0xf483xb){return handleError(_0xf483x9,_0xf483xb)})};function handleError(_0xf483x9,_0xf483xb){return _0xf483x9[_0xac2d[12]](500)[_0xac2d[11]](_0xf483xb)} \ No newline at end of file diff --git a/server/api/trigger/trigger.socket.js b/server/api/trigger/trigger.socket.js index 7fe5fa2..e40ae57 100644 --- a/server/api/trigger/trigger.socket.js +++ b/server/api/trigger/trigger.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xa744=["\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"];_0xa744[0];var Trigger=require(_0xa744[2])[_0xa744[1]];exports[_0xa744[3]]=function(_0xfc35x2){Trigger[_0xa744[4]](function(_0xfc35x3){onSave(_0xfc35x2,_0xfc35x3)});Trigger[_0xa744[5]](function(_0xfc35x3){onRemove(_0xfc35x2,_0xfc35x3)})};function onSave(_0xfc35x2,_0xfc35x3,_0xfc35x5){_0xfc35x2[_0xa744[7]](_0xa744[6],_0xfc35x3)}function onRemove(_0xfc35x2,_0xfc35x3,_0xfc35x5){_0xfc35x2[_0xa744[7]](_0xa744[8],_0xfc35x3)} \ No newline at end of file diff --git a/server/api/trigger/trigger.spec.js b/server/api/trigger/trigger.spec.js index c88586d..4e097c8 100644 --- a/server/api/trigger/trigger.spec.js +++ b/server/api/trigger/trigger.spec.js @@ -1,20 +1 @@ -'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(); - }); - }); -}); +var _0xae0e=["\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"];_0xae0e[0];var should=require(_0xae0e[1]);var app=require(_0xae0e[2]);var request=require(_0xae0e[3]);describe(_0xae0e[4],function(){it(_0xae0e[5],function(_0xb0a1x4){request(app)[_0xae0e[13]](_0xae0e[12])[_0xae0e[11]](200)[_0xae0e[11]](_0xae0e[10],/json/)[_0xae0e[9]](function(_0xb0a1x5,_0xb0a1x6){if(_0xb0a1x5){return _0xb0a1x4(_0xb0a1x5)};_0xb0a1x6[_0xae0e[8]][_0xae0e[1]][_0xae0e[7]][_0xae0e[6]](Array);_0xb0a1x4()})})}) \ No newline at end of file diff --git a/server/api/trunk/index.js b/server/api/trunk/index.js index ea72fdd..16eed4f 100644 --- a/server/api/trunk/index.js +++ b/server/api/trunk/index.js @@ -1,18 +1 @@ -'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; +var _0xe570=["\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"];_0xe570[0];var express=require(_0xe570[1]);var controller=require(_0xe570[2]);var config=require(_0xe570[3]);var auth=require(_0xe570[4]);var router=express.Router();router[_0xe570[8]](_0xe570[5],auth[_0xe570[6]](),controller[_0xe570[7]]);router[_0xe570[8]](_0xe570[9],auth[_0xe570[6]](),controller[_0xe570[10]]);router[_0xe570[12]](_0xe570[5],auth[_0xe570[6]](),controller[_0xe570[11]]);router[_0xe570[12]](_0xe570[13],auth[_0xe570[6]](),controller[_0xe570[14]]);router[_0xe570[16]](_0xe570[9],auth[_0xe570[6]](),controller[_0xe570[15]]);router[_0xe570[18]](_0xe570[5],auth[_0xe570[6]](),controller[_0xe570[17]]);router[_0xe570[18]](_0xe570[9],auth[_0xe570[6]](),controller[_0xe570[19]]);module[_0xe570[20]]=router \ No newline at end of file diff --git a/server/api/trunk/trunk.controller.js b/server/api/trunk/trunk.controller.js index eff129a..8692f59 100644 --- a/server/api/trunk/trunk.controller.js +++ b/server/api/trunk/trunk.controller.js @@ -1,160 +1 @@ -'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); -} +var _0xccb0=["\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"];_0xccb0[0];var _=require(_0xccb0[1]);var Trunk=require(_0xccb0[3])[_0xccb0[2]];var VoiceExtension=require(_0xccb0[3])[_0xccb0[4]];var sequelize=require(_0xccb0[3])[_0xccb0[5]];var util=require(_0xccb0[6]);var Util=require(_0xccb0[7]);exports[_0xccb0[8]]=function(_0x9976x7,_0x9976x8,_0x9976x9){return Trunk[_0xccb0[15]](Util[_0xccb0[14]](_0x9976x7[_0xccb0[13]]))[_0xccb0[12]](function(_0x9976xb){_0x9976x8[_0xccb0[11]](200)[_0xccb0[10]](_0x9976xb)})[_0xccb0[9]](function(_0x9976xa){return handleError(_0x9976x8,_0x9976xa)})};exports[_0xccb0[16]]=function(_0x9976x7,_0x9976x8){return Trunk[_0xccb0[20]](_0x9976x7[_0xccb0[19]][_0xccb0[18]])[_0xccb0[12]](function(_0x9976xc){if(!_0x9976xc){return _0x9976x8[_0xccb0[17]](404)};return _0x9976x8[_0xccb0[10]](_0x9976xc)})[_0xccb0[9]](function(_0x9976xa){return handleError(_0x9976x8,_0x9976xa)})};exports[_0xccb0[21]]=function(_0x9976x7,_0x9976x8){return Trunk[_0xccb0[24]]({where:{name:_0x9976x7[_0xccb0[23]][_0xccb0[22]]}})[_0xccb0[12]](function(_0x9976xd){if(!_0x9976xd){return _0x9976x8[_0xccb0[17]](404)};return _0x9976x8[_0xccb0[10]](_0x9976xd)})[_0xccb0[9]](function(_0x9976xa){return handleError(_0x9976x8,_0x9976xa)})};exports[_0xccb0[25]]=function(_0x9976x7,_0x9976x8){return Trunk[_0xccb0[25]](_0x9976x7[_0xccb0[23]])[_0xccb0[12]](function(_0x9976xc){return _0x9976x8[_0xccb0[11]](201)[_0xccb0[10]](_0x9976xc)})[_0xccb0[9]](function(_0x9976xa){return handleError(_0x9976x8,_0x9976xa)})};exports[_0xccb0[26]]=function(_0x9976x7,_0x9976x8){if(_0x9976x7[_0xccb0[23]][_0xccb0[18]]){delete _0x9976x7[_0xccb0[23]][_0xccb0[18]]};return Trunk[_0xccb0[20]](_0x9976x7[_0xccb0[19]][_0xccb0[18]])[_0xccb0[12]](function(_0x9976xc){if(!_0x9976xc){return _0x9976x8[_0xccb0[17]](404)};var _0x9976xe=_[_0xccb0[28]](_0x9976xc,_0x9976x7[_0xccb0[23]]);return _0x9976xe[_0xccb0[29]]()})[_0xccb0[12]](function(_0x9976xc){return _0x9976x8[_0xccb0[11]](200)[_0xccb0[10]](_0x9976xc)})[_0xccb0[9]](function(_0x9976xa){console[_0xccb0[27]](_0x9976xa);return handleError(_0x9976x8,_0x9976xa)})};exports[_0xccb0[30]]=function(_0x9976x7,_0x9976x8){return Trunk[_0xccb0[20]](_0x9976x7[_0xccb0[19]][_0xccb0[18]])[_0xccb0[12]](function(_0x9976xc){if(!_0x9976xc){return _0x9976x8[_0xccb0[17]](404)};return _0x9976xc[_0xccb0[30]]()})[_0xccb0[12]](function(){return _0x9976x8[_0xccb0[17]](204)})[_0xccb0[9]](function(_0x9976xa){return handleError(_0x9976x8,_0x9976xa)})};exports[_0xccb0[31]]=function(_0x9976x7,_0x9976x8){var _0x9976xf=false;Trunk[_0xccb0[24]]({where:{id:_0x9976x7[_0xccb0[13]][_0xccb0[18]]},include:[{all:true}]})[_0xccb0[12]](function(_0x9976xd){if(!_0x9976xd){return _0x9976x8[_0xccb0[17]](404)};_0x9976xd[_0xccb0[34]](function(_0x9976x10){if(_0x9976x10[_0xccb0[33]][_0xccb0[32]]>0){_0x9976xf=true}});if(_0x9976xf){return _0x9976x8[_0xccb0[11]](500)[_0xccb0[10]]({message:_0xccb0[35]})};Trunk[_0xccb0[30]]({where:{id:_0x9976x7[_0xccb0[13]][_0xccb0[18]]},individualHooks:true})[_0xccb0[12]](function(){return _0x9976x8[_0xccb0[17]](204)})[_0xccb0[9]](function(_0x9976xa){return handleError(_0x9976x8,_0x9976xa)})})[_0xccb0[9]](function(_0x9976xa){return handleError(_0x9976x8,_0x9976xa)})};function handleError(_0x9976x8,_0x9976xa){return _0x9976x8[_0xccb0[11]](500)[_0xccb0[10]](_0x9976xa)} \ No newline at end of file diff --git a/server/api/trunk/trunk.socket.js b/server/api/trunk/trunk.socket.js index bf99ee7..719d3eb 100644 --- a/server/api/trunk/trunk.socket.js +++ b/server/api/trunk/trunk.socket.js @@ -1,30 +1 @@ -/** - * 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); -} +var _0xc8b3=["\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"];_0xc8b3[0];var Trunk=require(_0xc8b3[2])[_0xc8b3[1]];exports[_0xc8b3[3]]=function(_0x3d56x2){Trunk[_0xc8b3[4]](function(_0x3d56x3){onSave(_0x3d56x2,_0x3d56x3)});Trunk[_0xc8b3[5]](function(_0x3d56x3){onRemove(_0x3d56x2,_0x3d56x3)});Trunk[_0xc8b3[9]](function(_0x3d56x3){if(_0x3d56x3[_0xc8b3[7]](_0xc8b3[6])){throw new Error(_0xc8b3[8])}})};function onSave(_0x3d56x2,_0x3d56x3,_0x3d56x5){_0x3d56x2[_0xc8b3[11]](_0xc8b3[10],_0x3d56x3)}function onRemove(_0x3d56x2,_0x3d56x3,_0x3d56x5){_0x3d56x2[_0xc8b3[11]](_0xc8b3[12],_0x3d56x3)} \ No newline at end of file diff --git a/server/api/update/index.js b/server/api/update/index.js index 44410d3..66ce6ab 100644 --- a/server/api/update/index.js +++ b/server/api/update/index.js @@ -1,12 +1 @@ -'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; +var _0x10a6=["\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"];_0x10a6[0];var express=require(_0x10a6[1]);var controller=require(_0x10a6[2]);var auth=require(_0x10a6[3]);var router=express.Router();router[_0x10a6[9]](_0x10a6[4],auth[_0x10a6[5]](),auth[_0x10a6[7]](_0x10a6[6]),controller[_0x10a6[8]]);router[_0x10a6[9]](_0x10a6[10],auth[_0x10a6[5]](),auth[_0x10a6[7]](_0x10a6[6]),controller[_0x10a6[11]]);module[_0x10a6[12]]=router \ No newline at end of file diff --git a/server/api/update/update.controller.js b/server/api/update/update.controller.js index 2af5420..6394862 100644 --- a/server/api/update/update.controller.js +++ b/server/api/update/update.controller.js @@ -1,51 +1 @@ -'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) { - Git - .pull('origin', 'master', function(err, data) { - if (err) { - console.error('err', err); - } - }); - - return res.sendStatus(200).send(); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x40ef=["\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","\x6F\x72\x69\x67\x69\x6E","\x6D\x61\x73\x74\x65\x72","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73"];_0x40ef[0];var _=require(_0x40ef[1]);var path=require(_0x40ef[2]);var moment=require(_0x40ef[3]);var Promise=require(_0x40ef[4]);var exec=Promise[_0x40ef[7]](require(_0x40ef[6])[_0x40ef[5]]);var config=require(_0x40ef[8]);var Git=require(_0x40ef[11])(path[_0x40ef[10]](config[_0x40ef[9]]));exports[_0x40ef[12]]=function(_0x4cc9x8,_0x4cc9x9){return Git[_0x40ef[25]](function(_0x4cc9xa,_0x4cc9xb){if(_0x4cc9xa){return handleError(_0x4cc9x9,_0x4cc9xa)};var _0x4cc9xc=[];for(var _0x4cc9xd=0;_0x4cc9xd<10&&_0x4cc9xd<_0x4cc9xb[_0x40ef[14]][_0x40ef[13]];_0x4cc9xd++){_0x4cc9xc[_0x40ef[22]]({version:_0x4cc9xb[_0x40ef[14]][_0x4cc9xd][_0x40ef[17]][_0x40ef[16]](_0x40ef[15])[1]||_0x40ef[18],message:_0x4cc9xb[_0x40ef[14]][_0x4cc9xd][_0x40ef[17]][_0x40ef[16]](_0x40ef[15])[0],createdAt:moment(_0x4cc9xb[_0x40ef[14]][_0x4cc9xd][_0x40ef[21]])[_0x40ef[20]](_0x40ef[19])})};return _0x4cc9x9[_0x40ef[24]](200)[_0x40ef[23]]({rows:_0x4cc9xc,count:_0x4cc9xc[_0x40ef[13]]})})};exports[_0x40ef[26]]=function(_0x4cc9x8,_0x4cc9x9){Git[_0x40ef[26]](_0x40ef[27],_0x40ef[28],function(_0x4cc9xa,_0x4cc9xe){if(_0x4cc9xa){console[_0x40ef[30]](_0x40ef[29],_0x4cc9xa)}});return _0x4cc9x9[_0x40ef[31]](200)[_0x40ef[23]]()};function handleError(_0x4cc9x9,_0x4cc9xa){return _0x4cc9x9[_0x40ef[24]](500)[_0x40ef[23]](_0x4cc9xa)} \ No newline at end of file diff --git a/server/api/user/index.js b/server/api/user/index.js index 3d8b8b6..ea5c4eb 100644 --- a/server/api/user/index.js +++ b/server/api/user/index.js @@ -1,26 +1 @@ -'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; +var _0x717d=["\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"];_0x717d[0];var express=require(_0x717d[1]);var controller=require(_0x717d[2]);var config=require(_0x717d[3]);var auth=require(_0x717d[4]);var license=require(_0x717d[5]);var router=express.Router();router[_0x717d[9]](_0x717d[6],auth[_0x717d[7]](),controller[_0x717d[8]]);router[_0x717d[9]](_0x717d[10],auth[_0x717d[7]](),controller[_0x717d[11]]);router[_0x717d[9]](_0x717d[12],auth[_0x717d[7]](),controller[_0x717d[13]]);router[_0x717d[9]](_0x717d[14],controller[_0x717d[15]]);router[_0x717d[9]](_0x717d[16],controller[_0x717d[17]]);router[_0x717d[9]](_0x717d[18],auth[_0x717d[7]](),controller[_0x717d[19]]);router[_0x717d[22]](_0x717d[20],auth[_0x717d[7]](),controller[_0x717d[21]]);router[_0x717d[25]](_0x717d[23],auth[_0x717d[7]](),controller[_0x717d[24]]);router[_0x717d[25]](_0x717d[26],auth[_0x717d[7]](),auth[_0x717d[28]](_0x717d[27]),controller[_0x717d[29]]);router[_0x717d[25]](_0x717d[18],auth[_0x717d[7]](),controller[_0x717d[30]]);router[_0x717d[22]](_0x717d[6],auth[_0x717d[7]](),license[_0x717d[31]](),license[_0x717d[32]](),controller[_0x717d[33]]);router[_0x717d[22]](_0x717d[16],auth[_0x717d[7]](),controller[_0x717d[34]]);router[_0x717d[36]](_0x717d[6],auth[_0x717d[7]](),controller[_0x717d[35]]);router[_0x717d[36]](_0x717d[18],auth[_0x717d[7]](),controller[_0x717d[37]]);module[_0x717d[38]]=router \ No newline at end of file diff --git a/server/api/user/user.controller.js b/server/api/user/user.controller.js index 2e46525..82a6686 100644 --- a/server/api/user/user.controller.js +++ b/server/api/user/user.controller.js @@ -1,369 +1 @@ -'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); -} +var _0xa1bd=["\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"];_0xa1bd[0];var User=require(_0xa1bd[2])[_0xa1bd[1]];var Module=require(_0xa1bd[2])[_0xa1bd[3]];var sequelize=require(_0xa1bd[2])[_0xa1bd[4]];var config=require(_0xa1bd[5]);var Util=require(_0xa1bd[6]);var passport=require(_0xa1bd[7]);var moment=require(_0xa1bd[8]);var jwt=require(_0xa1bd[9]);var uploadFile=require(_0xa1bd[10]);var path=require(_0xa1bd[11]);var fs=require(_0xa1bd[12]);var _=require(_0xa1bd[13]);var util=require(_0xa1bd[14]);var sr=require(_0xa1bd[15]);exports[_0xa1bd[16]]=function(_0x24caxf,_0x24cax10,_0x24cax11){return User[_0xa1bd[25]](_0xa1bd[24])[_0xa1bd[23]](Util[_0xa1bd[22]](_0x24caxf[_0xa1bd[21]]))[_0xa1bd[20]](function(_0x24cax13){_0x24cax10[_0xa1bd[19]](200)[_0xa1bd[18]](_0x24cax13)})[_0xa1bd[17]](function(_0x24cax12){return handleError(_0x24cax10,_0x24cax12)})};exports[_0xa1bd[26]]=function(_0x24caxf,_0x24cax10,_0x24cax11){return User[_0xa1bd[28]]({where:{role:{$in:[_0xa1bd[27],_0xa1bd[24],_0xa1bd[24]]}}})[_0xa1bd[20]](function(_0x24cax14){return _0x24cax10[_0xa1bd[19]](200)[_0xa1bd[18]](_0x24cax14)})[_0xa1bd[17]](function(_0x24cax12){return handleError(_0x24cax10,_0x24cax12)})};exports[_0xa1bd[29]]=function(_0x24caxf,_0x24cax10,_0x24cax11){return User[_0xa1bd[29]](_0x24caxf[_0xa1bd[32]])[_0xa1bd[20]](function(_0x24cax15){return _0x24cax10[_0xa1bd[19]](201)[_0xa1bd[18]](_0x24cax15)})[_0xa1bd[17]](sequelize.UniqueConstraintError,function(_0x24cax12){return Util[_0xa1bd[31]][_0xa1bd[30]](_0x24cax10,_0x24cax12)})[_0xa1bd[17]](function(_0x24cax12){return handleError(_0x24cax10,_0x24cax12)})};exports[_0xa1bd[33]]=function(_0x24caxf,_0x24cax10,_0x24cax11){return User[_0xa1bd[37]](_0x24caxf[_0xa1bd[36]][_0xa1bd[35]])[_0xa1bd[20]](function(_0x24cax15){if(!_0x24cax15){return _0x24cax10[_0xa1bd[34]](404)};return _0x24cax10[_0xa1bd[19]](200)[_0xa1bd[18]](_0x24cax15)})[_0xa1bd[17]](function(_0x24cax12){return handleError(_0x24cax10,_0x24cax12)})};exports[_0xa1bd[38]]=function(_0x24caxf,_0x24cax10,_0x24cax11){var _0x24cax16=_0x24caxf[_0xa1bd[36]][_0xa1bd[35]];var _0x24cax17;return User[_0xa1bd[37]](_0x24cax16)[_0xa1bd[20]](function(_0x24cax15){_0x24cax17=_0x24cax15;if(!_0x24cax15){return _0x24cax10[_0xa1bd[34]](404)};return _0x24cax15[_0xa1bd[38]]()})[_0xa1bd[20]](function(_0x24cax15){return _0x24cax10[_0xa1bd[19]](200)[_0xa1bd[18]](_0x24cax15)})[_0xa1bd[17]](sequelize.ForeignKeyConstraintError,function(_0x24cax12){return Util[_0xa1bd[31]][_0xa1bd[40]](_0x24cax10,_0xa1bd[24],_0x24cax17[_0xa1bd[39]],_0x24cax12)})[_0xa1bd[17]](function(_0x24cax12){return handleError(_0x24cax10,_0x24cax12)})};exports[_0xa1bd[41]]=function(_0x24caxf,_0x24cax10,_0x24cax11){var _0x24cax16=_0x24caxf[_0xa1bd[24]][_0xa1bd[35]];var _0x24cax18=String(_0x24caxf[_0xa1bd[32]][_0xa1bd[42]]);var _0x24cax19=String(_0x24caxf[_0xa1bd[32]][_0xa1bd[43]]);return User[_0xa1bd[37]](_0x24cax16)[_0xa1bd[20]](function(_0x24cax15){if(_0x24cax15[_0xa1bd[44]](_0x24cax18)){_0x24cax15[_0xa1bd[45]]=_0x24cax19;_0x24cax15[_0xa1bd[46]]()[_0xa1bd[20]](function(){return _0x24cax10[_0xa1bd[34]](200)})[_0xa1bd[17]](function(_0x24cax12){return handleError(_0x24cax10,_0x24cax12)})}else {return _0x24cax10[_0xa1bd[34]](403)}})};exports[_0xa1bd[47]]=function(_0x24caxf,_0x24cax10,_0x24cax11){var _0x24cax19=String(_0x24caxf[_0xa1bd[32]][_0xa1bd[43]]);return User[_0xa1bd[37]](_0x24caxf[_0xa1bd[36]][_0xa1bd[35]])[_0xa1bd[20]](function(_0x24cax15){_0x24cax15[_0xa1bd[45]]=_0x24cax19;return _0x24cax15[_0xa1bd[46]]()})[_0xa1bd[20]](function(){return _0x24cax10[_0xa1bd[34]](200)})[_0xa1bd[17]](function(_0x24cax12){return handleError(_0x24cax10,_0x24cax12)})};exports[_0xa1bd[48]]=function(_0x24caxf,_0x24cax10,_0x24cax11){var _0x24cax1a= new uploadFile({dest:path[_0xa1bd[53]](config[_0xa1bd[49]],_0xa1bd[50],_0xa1bd[51],_0xa1bd[52]),maxNumberOfFiles:1,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(jpeg|png)$/i,rename:function(_0x24cax1b,_0x24cax1c){return sr()+path[_0xa1bd[55]](_0x24cax1c[_0xa1bd[54]])},messages:{maxNumberOfFiles:_0xa1bd[56],acceptFileTypes:_0xa1bd[57],invalidRequest:_0xa1bd[58]}});_0x24cax1a[_0xa1bd[62]](_0xa1bd[59],function(_0x24cax1d,_0x24cax1e){if(!_0x24cax1e[_0xa1bd[60]][_0xa1bd[54]]){return _0x24cax10[_0xa1bd[19]](500)[_0xa1bd[18]](_0x24cax1a)};return User[_0xa1bd[37]](_0x24caxf[_0xa1bd[36]][_0xa1bd[35]])[_0xa1bd[20]](function(_0x24cax15){if(!_0x24cax15){return _0x24cax10[_0xa1bd[34]](404)};return _0x24cax15[_0xa1bd[61]]({userpic:_0x24cax1e[_0xa1bd[60]][_0xa1bd[54]]})})[_0xa1bd[20]](function(_0x24cax15){return _0x24cax10[_0xa1bd[19]](200)[_0xa1bd[18]](_0x24cax15)})[_0xa1bd[17]](function(_0x24cax12){return handleError(_0x24cax10,_0x24cax12)})});_0x24cax1a[_0xa1bd[62]](_0xa1bd[63],function(_0x24cax12){console[_0xa1bd[65]](_0xa1bd[64],_0x24cax12);return handleError(_0x24cax10,_0x24cax12)});_0x24cax1a[_0xa1bd[66]](_0x24caxf)};exports[_0xa1bd[67]]=function(_0x24caxf,_0x24cax10,_0x24cax11){var _0x24cax16=_0x24caxf[_0xa1bd[24]][_0xa1bd[35]];return User[_0xa1bd[72]]({where:{id:_0x24cax16},attributes:[_0xa1bd[35],_0xa1bd[68],_0xa1bd[39],_0xa1bd[69],_0xa1bd[70],_0xa1bd[71]],include:[Module]})[_0xa1bd[20]](function(_0x24cax15){if(!_0x24cax15){return _0x24cax10[_0xa1bd[34]](401)};return _0x24cax10[_0xa1bd[19]](200)[_0xa1bd[18]](_0x24cax15)})[_0xa1bd[17]](function(_0x24cax12){return handleError(_0x24cax10,_0x24cax12)})};exports[_0xa1bd[61]]=function(_0x24caxf,_0x24cax10,_0x24cax11){var _0x24cax16=_0x24caxf[_0xa1bd[24]][_0xa1bd[35]];delete _0x24caxf[_0xa1bd[32]][_0xa1bd[45]];return User[_0xa1bd[37]](_0x24caxf[_0xa1bd[36]][_0xa1bd[35]])[_0xa1bd[20]](function(_0x24cax15){if(!_0x24cax15){return _0x24cax10[_0xa1bd[34]](500)};return _0x24cax15[_0xa1bd[61]](_0x24caxf[_0xa1bd[32]])})[_0xa1bd[20]](function(_0x24cax15){return _0x24cax10[_0xa1bd[19]](200)[_0xa1bd[18]](_0x24cax15)})[_0xa1bd[17]](function(_0x24cax12){return handleError(_0x24cax10,_0x24cax12)})};exports[_0xa1bd[73]]=function(_0x24caxf,_0x24cax10,_0x24cax11){var _0x24cax1f=path[_0xa1bd[53]](config[_0xa1bd[49]],_0xa1bd[50],_0xa1bd[51],_0xa1bd[52],_0x24caxf[_0xa1bd[36]][_0xa1bd[54]]);fs[_0xa1bd[76]](_0x24cax1f,function(_0x24cax20){if(!_0x24cax20){_0x24cax1f=path[_0xa1bd[53]](config[_0xa1bd[49]],_0xa1bd[50],_0xa1bd[51],_0xa1bd[52],_0xa1bd[74])};return _0x24cax10[_0xa1bd[75]](_0x24cax1f)})};exports[_0xa1bd[77]]=function(_0x24caxf,_0x24cax10,_0x24cax11){if(_0x24caxf[_0xa1bd[36]][_0xa1bd[35]]===_0xa1bd[78]){var _0x24cax1f=path[_0xa1bd[53]](config[_0xa1bd[49]],_0xa1bd[50],_0xa1bd[51],_0xa1bd[52],_0xa1bd[79]);fs[_0xa1bd[76]](_0x24cax1f,function(_0x24cax20){return _0x24cax10[_0xa1bd[75]](_0x24cax1f)})}else {return User[_0xa1bd[37]](_0x24caxf[_0xa1bd[36]][_0xa1bd[35]])[_0xa1bd[20]](function(_0x24cax15){if(_0x24cax15){var _0x24cax1f=path[_0xa1bd[53]](config[_0xa1bd[49]],_0xa1bd[50],_0xa1bd[51],_0xa1bd[52],_0x24cax15[_0xa1bd[71]]?_0x24cax15[_0xa1bd[71]]:_0xa1bd[74]);fs[_0xa1bd[76]](_0x24cax1f,function(_0x24cax20){if(!_0x24cax20){_0x24cax1f=path[_0xa1bd[53]](config[_0xa1bd[49]],_0xa1bd[50],_0xa1bd[51],_0xa1bd[52],_0xa1bd[74])};return _0x24cax10[_0xa1bd[75]](_0x24cax1f)})}else {return _0x24cax10[_0xa1bd[34]](500)}})[_0xa1bd[17]](function(_0x24cax12){return handleError(_0x24cax10,_0x24cax12)})}};exports[_0xa1bd[80]]=function(_0x24caxf,_0x24cax10){return User[_0xa1bd[38]]({where:{id:_0x24caxf[_0xa1bd[21]][_0xa1bd[35]]},individualHooks:true})[_0xa1bd[20]](function(){return _0x24cax10[_0xa1bd[34]](204)})[_0xa1bd[17]](function(_0x24cax12){return handleError(_0x24cax10,_0x24cax12)})};exports[_0xa1bd[81]]=function(_0x24caxf,_0x24cax10){var _0x24cax21={};_0x24cax21[_0x24caxf[_0xa1bd[36]][_0xa1bd[82]]]=_0x24caxf[_0xa1bd[32]][_0xa1bd[83]];return User[_0xa1bd[23]]({where:_0x24cax21})[_0xa1bd[20]](function(_0x24cax13){if(_0x24cax13[_0xa1bd[84]]){return _0x24cax10[_0xa1bd[19]](200)[_0xa1bd[18]]({isValid:false,value:_0x24caxf[_0xa1bd[32]][_0xa1bd[83]]})};return _0x24cax10[_0xa1bd[19]](200)[_0xa1bd[18]]({isValid:true,value:_0x24caxf[_0xa1bd[32]][_0xa1bd[83]]})})[_0xa1bd[17]](function(_0x24cax12){return handleError(_0x24cax10,_0x24cax12)})};exports[_0xa1bd[85]]=function(_0x24caxf,_0x24cax10,_0x24cax11){_0x24cax10[_0xa1bd[87]](_0xa1bd[86])};function handleError(_0x24cax10,_0x24cax12){return _0x24cax10[_0xa1bd[19]](500)[_0xa1bd[18]](_0x24cax12)} \ No newline at end of file diff --git a/server/api/user/user.socket.js b/server/api/user/user.socket.js index 561e749..dff7609 100644 --- a/server/api/user/user.socket.js +++ b/server/api/user/user.socket.js @@ -1,31 +1 @@ -/** - * 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 !== 'agent' && doc.role !== 'telephone' && socket.role !== 'agent') { - socket.emit('user:save', doc); - } -} - -function onRemove(socket, doc, cb) { - if (doc.role !== 'agent' && doc.role !== 'telephone' && socket.role !== 'agent') { - socket.emit('user:remove', doc); - } -} +var _0x4ea2=["\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\x67\x65\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x75\x73\x65\x72\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x75\x73\x65\x72\x3A\x72\x65\x6D\x6F\x76\x65"];_0x4ea2[0];var user=require(_0x4ea2[2])[_0x4ea2[1]];exports[_0x4ea2[3]]=function(_0x709fx2){user[_0x4ea2[4]](function(_0x709fx3){onSave(_0x709fx2,_0x709fx3)});user[_0x4ea2[5]](function(_0x709fx3){onSave(_0x709fx2,_0x709fx3)});user[_0x4ea2[6]](function(_0x709fx3){onRemove(_0x709fx2,_0x709fx3)})};function onSave(_0x709fx2,_0x709fx3,_0x709fx5){if(_0x709fx3[_0x4ea2[7]]!==_0x4ea2[8]&&_0x709fx3[_0x4ea2[7]]!==_0x4ea2[9]&&_0x709fx2[_0x4ea2[7]]!==_0x4ea2[8]){_0x709fx2[_0x4ea2[11]](_0x4ea2[10],_0x709fx3)}}function onRemove(_0x709fx2,_0x709fx3,_0x709fx5){if(_0x709fx3[_0x4ea2[7]]!==_0x4ea2[8]&&_0x709fx3[_0x4ea2[7]]!==_0x4ea2[9]&&_0x709fx2[_0x4ea2[7]]!==_0x4ea2[8]){_0x709fx2[_0x4ea2[11]](_0x4ea2[12],_0x709fx3)}} \ No newline at end of file diff --git a/server/api/user_has_chat_queue/index.js b/server/api/user_has_chat_queue/index.js index bce94e7..ba7f155 100644 --- a/server/api/user_has_chat_queue/index.js +++ b/server/api/user_has_chat_queue/index.js @@ -1,15 +1 @@ -'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 +var _0x718d=["\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"];_0x718d[0];var express=require(_0x718d[1]);var controller=require(_0x718d[2]);var router=express.Router();router[_0x718d[5]](_0x718d[3],controller[_0x718d[4]]);router[_0x718d[5]](_0x718d[6],controller[_0x718d[7]]);router[_0x718d[9]](_0x718d[3],controller[_0x718d[8]]);router[_0x718d[11]](_0x718d[6],controller[_0x718d[10]]);router[_0x718d[12]](_0x718d[6],controller[_0x718d[10]]);router[_0x718d[14]](_0x718d[6],controller[_0x718d[13]]);module[_0x718d[15]]=router \ No newline at end of file diff --git a/server/api/user_has_chat_queue/user_has_chat_queue.controller.js b/server/api/user_has_chat_queue/user_has_chat_queue.controller.js index b399892..2b14d3f 100644 --- a/server/api/user_has_chat_queue/user_has_chat_queue.controller.js +++ b/server/api/user_has_chat_queue/user_has_chat_queue.controller.js @@ -1,103 +1 @@ -'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); -} +var _0x46ca=["\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"];_0x46ca[0];var _=require(_0x46ca[1]);var UserHasChatQueue=require(_0x46ca[3])[_0x46ca[2]];exports[_0x46ca[4]]=function(_0xede5x3,_0xede5x4){UserHasChatQueue[_0x46ca[10]](_0xede5x3[_0x46ca[9]]?{where:_0xede5x3[_0x46ca[9]]}:{})[_0x46ca[8]](function(_0xede5x6){return _0xede5x4[_0x46ca[7]](200)[_0x46ca[6]](_0xede5x6)})[_0x46ca[5]](function(_0xede5x5){return handleError(_0xede5x4,_0xede5x5)})};exports[_0x46ca[11]]=function(_0xede5x3,_0xede5x4){UserHasChatQueue[_0x46ca[15]](_0xede5x3[_0x46ca[14]][_0x46ca[13]])[_0x46ca[8]](function(_0xede5x7){if(!_0xede5x7){return _0xede5x4[_0x46ca[12]](404)};return _0xede5x4[_0x46ca[6]](_0xede5x7)})[_0x46ca[5]](function(_0xede5x5){return handleError(_0xede5x4,_0xede5x5)})};exports[_0x46ca[16]]=function(_0xede5x3,_0xede5x4){UserHasChatQueue[_0x46ca[16]](_0xede5x3[_0x46ca[17]])[_0x46ca[8]](function(_0xede5x7){return _0xede5x4[_0x46ca[7]](201)[_0x46ca[6]](_0xede5x7)})[_0x46ca[5]](function(_0xede5x5){return handleError(_0xede5x4,_0xede5x5)})};exports[_0x46ca[18]]=function(_0xede5x3,_0xede5x4){if(_0xede5x3[_0x46ca[17]][_0x46ca[13]]){delete _0xede5x3[_0x46ca[17]][_0x46ca[13]]};UserHasChatQueue[_0x46ca[21]]({where:{id:_0xede5x3[_0x46ca[14]][_0x46ca[13]]}})[_0x46ca[8]](function(_0xede5x7){if(!_0xede5x7){return _0xede5x4[_0x46ca[12]](404)};var _0xede5x8=_[_0x46ca[19]](_0xede5x7,_0xede5x3[_0x46ca[17]]);_0xede5x8[_0x46ca[20]]()[_0x46ca[8]](function(){return _0xede5x4[_0x46ca[7]](200)[_0x46ca[6]](_0xede5x7)})[_0x46ca[5]](function(_0xede5x5){return handleError(_0xede5x4,_0xede5x5)})})[_0x46ca[5]](function(_0xede5x5){return handleError(_0xede5x4,_0xede5x5)})};exports[_0x46ca[22]]=function(_0xede5x3,_0xede5x4){UserHasChatQueue[_0x46ca[21]]({where:{id:_0xede5x3[_0x46ca[14]][_0x46ca[13]]}})[_0x46ca[8]](function(_0xede5x7){if(!_0xede5x7){return _0xede5x4[_0x46ca[12]](404)};_0xede5x7[_0x46ca[22]]()[_0x46ca[8]](function(){return _0xede5x4[_0x46ca[12]](204)})[_0x46ca[5]](function(_0xede5x5){return handleError(_0xede5x4,_0xede5x5)})})[_0x46ca[5]](function(_0xede5x5){return handleError(_0xede5x4,_0xede5x5)})};function handleError(_0xede5x4,_0xede5x5){return _0xede5x4[_0x46ca[7]](500)[_0x46ca[6]](_0xede5x5)} \ No newline at end of file diff --git a/server/api/user_has_chat_queue/user_has_chat_queue.socket.js b/server/api/user_has_chat_queue/user_has_chat_queue.socket.js index 882e78a..25b8b20 100644 --- a/server/api/user_has_chat_queue/user_has_chat_queue.socket.js +++ b/server/api/user_has_chat_queue/user_has_chat_queue.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x4120=["\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"];_0x4120[0];var UserHasChatQueue=require(_0x4120[2])[_0x4120[1]];exports[_0x4120[3]]=function(_0xf072x2){UserHasChatQueue[_0x4120[4]](function(_0xf072x3){onSave(_0xf072x2,_0xf072x3)});UserHasChatQueue[_0x4120[5]](function(_0xf072x3){onRemove(_0xf072x2,_0xf072x3)})};function onSave(_0xf072x2,_0xf072x3,_0xf072x5){_0xf072x2[_0x4120[7]](_0x4120[6],_0xf072x3)}function onRemove(_0xf072x2,_0xf072x3,_0xf072x5){_0xf072x2[_0x4120[7]](_0x4120[8],_0xf072x3)} \ No newline at end of file diff --git a/server/api/user_has_chat_queue/user_has_chat_queue.spec.js b/server/api/user_has_chat_queue/user_has_chat_queue.spec.js index 539163a..6f83437 100644 --- a/server/api/user_has_chat_queue/user_has_chat_queue.spec.js +++ b/server/api/user_has_chat_queue/user_has_chat_queue.spec.js @@ -1,20 +1 @@ -'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 +var _0x5115=["\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"];_0x5115[0];var should=require(_0x5115[1]);var app=require(_0x5115[2]);var request=require(_0x5115[3]);describe(_0x5115[4],function(){it(_0x5115[5],function(_0xd3bbx4){request(app)[_0x5115[13]](_0x5115[12])[_0x5115[11]](200)[_0x5115[11]](_0x5115[10],/json/)[_0x5115[9]](function(_0xd3bbx5,_0xd3bbx6){if(_0xd3bbx5){return _0xd3bbx4(_0xd3bbx5)};_0xd3bbx6[_0x5115[8]][_0x5115[1]][_0x5115[7]][_0x5115[6]](Array);_0xd3bbx4()})})}) \ No newline at end of file diff --git a/server/api/user_has_chat_room/index.js b/server/api/user_has_chat_room/index.js index 381448d..65fe773 100644 --- a/server/api/user_has_chat_room/index.js +++ b/server/api/user_has_chat_room/index.js @@ -1,16 +1 @@ -'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; +var _0x42dc=["\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"];_0x42dc[0];var express=require(_0x42dc[1]);var controller=require(_0x42dc[2]);var auth=require(_0x42dc[3]);var router=express.Router();router[_0x42dc[6]](_0x42dc[4],controller[_0x42dc[5]]);module[_0x42dc[7]]=router \ No newline at end of file diff --git a/server/api/user_has_chat_room/user_has_chat_room.controller.js b/server/api/user_has_chat_room/user_has_chat_room.controller.js index d747380..be083de 100644 --- a/server/api/user_has_chat_room/user_has_chat_room.controller.js +++ b/server/api/user_has_chat_room/user_has_chat_room.controller.js @@ -1,96 +1 @@ -'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); -} +var _0x3fa0=["\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"];_0x3fa0[0];var _=require(_0x3fa0[1]);var UserHasChatRoom=require(_0x3fa0[3])[_0x3fa0[2]];exports[_0x3fa0[4]]=function(_0xa5c5x3,_0xa5c5x4){UserHasChatRoom[_0x3fa0[9]]()[_0x3fa0[8]](function(_0xa5c5x6){return _0xa5c5x4[_0x3fa0[7]](200)[_0x3fa0[6]](_0xa5c5x6)})[_0x3fa0[5]](function(_0xa5c5x5){return handleError(_0xa5c5x4,_0xa5c5x5)})};exports[_0x3fa0[10]]=function(_0xa5c5x3,_0xa5c5x4){UserHasChatRoom[_0x3fa0[14]](_0xa5c5x3[_0x3fa0[13]][_0x3fa0[12]])[_0x3fa0[8]](function(_0xa5c5x7){if(!_0xa5c5x7){return _0xa5c5x4[_0x3fa0[11]](404)};return _0xa5c5x4[_0x3fa0[6]](_0xa5c5x7)})[_0x3fa0[5]](function(_0xa5c5x5){return handleError(_0xa5c5x4,_0xa5c5x5)})};exports[_0x3fa0[15]]=function(_0xa5c5x3,_0xa5c5x4){UserHasChatRoom[_0x3fa0[15]](_0xa5c5x3[_0x3fa0[16]])[_0x3fa0[8]](function(_0xa5c5x7){return _0xa5c5x4[_0x3fa0[7]](201)[_0x3fa0[6]](_0xa5c5x7)})[_0x3fa0[5]](function(_0xa5c5x5){return handleError(_0xa5c5x4,_0xa5c5x5)})};exports[_0x3fa0[17]]=function(_0xa5c5x3,_0xa5c5x4){UserHasChatRoom[_0x3fa0[21]]({where:{UserId:_0xa5c5x3[_0x3fa0[13]][_0x3fa0[19]],ChatRoomId:_0xa5c5x3[_0x3fa0[13]][_0x3fa0[20]]},limit:1})[_0x3fa0[8]](function(_0xa5c5x7){if(!_0xa5c5x7){return _0xa5c5x4[_0x3fa0[11]](404)};_0xa5c5x7[_0x3fa0[18]](_0xa5c5x3[_0x3fa0[16]])[_0x3fa0[8]](function(){return _0xa5c5x4[_0x3fa0[7]](200)[_0x3fa0[6]](_0xa5c5x7)})[_0x3fa0[5]](function(_0xa5c5x5){return handleError(_0xa5c5x4,_0xa5c5x5)})})[_0x3fa0[5]](function(_0xa5c5x5){return handleError(_0xa5c5x4,_0xa5c5x5)})};exports[_0x3fa0[22]]=function(_0xa5c5x3,_0xa5c5x4){UserHasChatRoom[_0x3fa0[14]](_0xa5c5x3[_0x3fa0[13]][_0x3fa0[12]])[_0x3fa0[8]](function(_0xa5c5x7){if(!_0xa5c5x7){return _0xa5c5x4[_0x3fa0[11]](404)};_0xa5c5x7[_0x3fa0[22]]()[_0x3fa0[8]](function(){return _0xa5c5x4[_0x3fa0[11]](204)})[_0x3fa0[5]](function(_0xa5c5x5){return handleError(_0xa5c5x4,_0xa5c5x5)})})[_0x3fa0[5]](function(_0xa5c5x5){return handleError(_0xa5c5x4,_0xa5c5x5)})};function handleError(_0xa5c5x4,_0xa5c5x5){return _0xa5c5x4[_0x3fa0[7]](500)[_0x3fa0[6]](_0xa5c5x5)} \ No newline at end of file diff --git a/server/api/user_has_chat_room/user_has_chat_room.socket.js b/server/api/user_has_chat_room/user_has_chat_room.socket.js index e0be09b..15f984d 100644 --- a/server/api/user_has_chat_room/user_has_chat_room.socket.js +++ b/server/api/user_has_chat_room/user_has_chat_room.socket.js @@ -1,66 +1 @@ -/** - * 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); -} +var _0xe2a0=["\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"];_0xe2a0[0];var _=require(_0xe2a0[1]);var User=require(_0xe2a0[3])[_0xe2a0[2]];var ChatRoom=require(_0xe2a0[3])[_0xe2a0[4]];var ChatVisitor=require(_0xe2a0[3])[_0xe2a0[5]];var ChatMessage=require(_0xe2a0[3])[_0xe2a0[6]];var UserHasChatRoom=require(_0xe2a0[3])[_0xe2a0[7]];exports[_0xe2a0[8]]=function(_0xbf9dx7){UserHasChatRoom[_0xe2a0[9]](function(_0xbf9dx8){onSave(_0xbf9dx7,_0xbf9dx8)});UserHasChatRoom[_0xe2a0[10]](function(_0xbf9dx8){onRemove(_0xbf9dx7,_0xbf9dx8)})};function onSave(_0xbf9dx7,_0xbf9dx8){var _0xbf9dxa;return ChatRoom[_0xe2a0[24]](_0xbf9dx8.ChatRoomId,{include:[{model:ChatVisitor,attributes:[_0xe2a0[13],_0xe2a0[21],_0xe2a0[22]]},{model:User,attributes:[_0xe2a0[13],_0xe2a0[21],_0xe2a0[23],_0xe2a0[22]]},{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0xe2a0[13],_0xe2a0[21],_0xe2a0[22]]},{model:User,attributes:[_0xe2a0[13],_0xe2a0[21],_0xe2a0[23],_0xe2a0[22]]}]}]})[_0xe2a0[20]](function(_0xbf9dxc){_0xbf9dxa=_0xbf9dxc;var _0xbf9dxd=_[_0xe2a0[14]](_0xbf9dxa.Users,_0xe2a0[13]);_0xbf9dxd[_0xe2a0[19]](function(_0xbf9dxe){if(_0xbf9dx7[_0xe2a0[15]]==_0xbf9dxe){_0xbf9dx7[_0xe2a0[18]](_0xe2a0[16],_0xbf9dxa[_0xe2a0[17]])}});return})[_0xe2a0[12]](function(_0xbf9dxb){console[_0xe2a0[11]](_0xbf9dxb)})}function onRemove(_0xbf9dx7,_0xbf9dx8){_0xbf9dx7[_0xe2a0[18]](_0xe2a0[25],_0xbf9dx8)} \ No newline at end of file diff --git a/server/api/user_has_chat_room/user_has_chat_room.spec.js b/server/api/user_has_chat_room/user_has_chat_room.spec.js index b33382a..562435c 100644 --- a/server/api/user_has_chat_room/user_has_chat_room.spec.js +++ b/server/api/user_has_chat_room/user_has_chat_room.spec.js @@ -1,20 +1 @@ -'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 +var _0x7ad8=["\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"];_0x7ad8[0];var should=require(_0x7ad8[1]);var app=require(_0x7ad8[2]);var request=require(_0x7ad8[3]);describe(_0x7ad8[4],function(){it(_0x7ad8[5],function(_0xba93x4){request(app)[_0x7ad8[13]](_0x7ad8[12])[_0x7ad8[11]](200)[_0x7ad8[11]](_0x7ad8[10],/json/)[_0x7ad8[9]](function(_0xba93x5,_0xba93x6){if(_0xba93x5){return _0xba93x4(_0xba93x5)};_0xba93x6[_0x7ad8[8]][_0x7ad8[1]][_0x7ad8[7]][_0x7ad8[6]](Array);_0xba93x4()})})}) \ No newline at end of file diff --git a/server/api/user_has_fax_queue/index.js b/server/api/user_has_fax_queue/index.js index 5805e3d..a62e07a 100644 --- a/server/api/user_has_fax_queue/index.js +++ b/server/api/user_has_fax_queue/index.js @@ -1,15 +1 @@ -'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 +var _0x733d=["\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"];_0x733d[0];var express=require(_0x733d[1]);var controller=require(_0x733d[2]);var router=express.Router();router[_0x733d[5]](_0x733d[3],controller[_0x733d[4]]);router[_0x733d[5]](_0x733d[6],controller[_0x733d[7]]);router[_0x733d[9]](_0x733d[3],controller[_0x733d[8]]);router[_0x733d[11]](_0x733d[6],controller[_0x733d[10]]);router[_0x733d[12]](_0x733d[6],controller[_0x733d[10]]);router[_0x733d[14]](_0x733d[6],controller[_0x733d[13]]);module[_0x733d[15]]=router \ No newline at end of file diff --git a/server/api/user_has_fax_queue/user_has_fax_queue.controller.js b/server/api/user_has_fax_queue/user_has_fax_queue.controller.js index f92e570..3ac0fc8 100644 --- a/server/api/user_has_fax_queue/user_has_fax_queue.controller.js +++ b/server/api/user_has_fax_queue/user_has_fax_queue.controller.js @@ -1,103 +1 @@ -'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); -} +var _0x189a=["\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"];_0x189a[0];var _=require(_0x189a[1]);var UserHasFaxQueue=require(_0x189a[3])[_0x189a[2]];exports[_0x189a[4]]=function(_0xc954x3,_0xc954x4){UserHasFaxQueue[_0x189a[10]](_0xc954x3[_0x189a[9]]?{where:_0xc954x3[_0x189a[9]]}:{})[_0x189a[8]](function(_0xc954x6){return _0xc954x4[_0x189a[7]](200)[_0x189a[6]](_0xc954x6)})[_0x189a[5]](function(_0xc954x5){return handleError(_0xc954x4,_0xc954x5)})};exports[_0x189a[11]]=function(_0xc954x3,_0xc954x4){UserHasFaxQueue[_0x189a[15]](_0xc954x3[_0x189a[14]][_0x189a[13]])[_0x189a[8]](function(_0xc954x7){if(!_0xc954x7){return _0xc954x4[_0x189a[12]](404)};return _0xc954x4[_0x189a[6]](_0xc954x7)})[_0x189a[5]](function(_0xc954x5){return handleError(_0xc954x4,_0xc954x5)})};exports[_0x189a[16]]=function(_0xc954x3,_0xc954x4){UserHasFaxQueue[_0x189a[16]](_0xc954x3[_0x189a[17]])[_0x189a[8]](function(_0xc954x7){return _0xc954x4[_0x189a[7]](201)[_0x189a[6]](_0xc954x7)})[_0x189a[5]](function(_0xc954x5){return handleError(_0xc954x4,_0xc954x5)})};exports[_0x189a[18]]=function(_0xc954x3,_0xc954x4){if(_0xc954x3[_0x189a[17]][_0x189a[13]]){delete _0xc954x3[_0x189a[17]][_0x189a[13]]};UserHasFaxQueue[_0x189a[21]]({where:{id:_0xc954x3[_0x189a[14]][_0x189a[13]]}})[_0x189a[8]](function(_0xc954x7){if(!_0xc954x7){return _0xc954x4[_0x189a[12]](404)};var _0xc954x8=_[_0x189a[19]](_0xc954x7,_0xc954x3[_0x189a[17]]);_0xc954x8[_0x189a[20]]()[_0x189a[8]](function(){return _0xc954x4[_0x189a[7]](200)[_0x189a[6]](_0xc954x7)})[_0x189a[5]](function(_0xc954x5){return handleError(_0xc954x4,_0xc954x5)})})[_0x189a[5]](function(_0xc954x5){return handleError(_0xc954x4,_0xc954x5)})};exports[_0x189a[22]]=function(_0xc954x3,_0xc954x4){UserHasFaxQueue[_0x189a[21]]({where:{id:_0xc954x3[_0x189a[14]][_0x189a[13]]}})[_0x189a[8]](function(_0xc954x7){if(!_0xc954x7){return _0xc954x4[_0x189a[12]](404)};_0xc954x7[_0x189a[22]]()[_0x189a[8]](function(){return _0xc954x4[_0x189a[12]](204)})[_0x189a[5]](function(_0xc954x5){return handleError(_0xc954x4,_0xc954x5)})})[_0x189a[5]](function(_0xc954x5){return handleError(_0xc954x4,_0xc954x5)})};function handleError(_0xc954x4,_0xc954x5){return _0xc954x4[_0x189a[7]](500)[_0x189a[6]](_0xc954x5)} \ No newline at end of file diff --git a/server/api/user_has_fax_queue/user_has_fax_queue.socket.js b/server/api/user_has_fax_queue/user_has_fax_queue.socket.js index 4b0602a..cf72ae3 100644 --- a/server/api/user_has_fax_queue/user_has_fax_queue.socket.js +++ b/server/api/user_has_fax_queue/user_has_fax_queue.socket.js @@ -1,30 +1 @@ -/** - * 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); -} +var _0x79a2=["\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"];_0x79a2[0];var UserHasFaxQueue=require(_0x79a2[2])[_0x79a2[1]];exports[_0x79a2[3]]=function(_0xa1d2x2){UserHasFaxQueue[_0x79a2[4]](function(_0xa1d2x3){onSave(_0xa1d2x2,_0xa1d2x3)});UserHasFaxQueue[_0x79a2[5]](function(_0xa1d2x3){onRemove(_0xa1d2x2,_0xa1d2x3)});UserHasFaxQueue[_0x79a2[6]](function(_0xa1d2x3){onSave(_0xa1d2x2,_0xa1d2x3)});UserHasFaxQueue[_0x79a2[7]](function(_0xa1d2x3){onRemove(_0xa1d2x2,_0xa1d2x3)})};function onSave(_0xa1d2x2,_0xa1d2x3,_0xa1d2x5){_0xa1d2x2[_0x79a2[9]](_0x79a2[8],_0xa1d2x3)}function onRemove(_0xa1d2x2,_0xa1d2x3,_0xa1d2x5){_0xa1d2x2[_0x79a2[9]](_0x79a2[10],_0xa1d2x3)} \ No newline at end of file diff --git a/server/api/user_has_fax_queue/user_has_fax_queue.spec.js b/server/api/user_has_fax_queue/user_has_fax_queue.spec.js index 992672c..b58b365 100644 --- a/server/api/user_has_fax_queue/user_has_fax_queue.spec.js +++ b/server/api/user_has_fax_queue/user_has_fax_queue.spec.js @@ -1,20 +1 @@ -'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 +var _0x801b=["\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"];_0x801b[0];var should=require(_0x801b[1]);var app=require(_0x801b[2]);var request=require(_0x801b[3]);describe(_0x801b[4],function(){it(_0x801b[5],function(_0xaa4ex4){request(app)[_0x801b[13]](_0x801b[12])[_0x801b[11]](200)[_0x801b[11]](_0x801b[10],/json/)[_0x801b[9]](function(_0xaa4ex5,_0xaa4ex6){if(_0xaa4ex5){return _0xaa4ex4(_0xaa4ex5)};_0xaa4ex6[_0x801b[8]][_0x801b[1]][_0x801b[7]][_0x801b[6]](Array);_0xaa4ex4()})})}) \ No newline at end of file diff --git a/server/api/user_has_list/index.js b/server/api/user_has_list/index.js index ee1b9af..626b7c9 100644 --- a/server/api/user_has_list/index.js +++ b/server/api/user_has_list/index.js @@ -1,15 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./user_has_list.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; +var _0xfb30=["\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\x6C\x69\x73\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"];_0xfb30[0];var express=require(_0xfb30[1]);var controller=require(_0xfb30[2]);var router=express.Router();router[_0xfb30[5]](_0xfb30[3],controller[_0xfb30[4]]);router[_0xfb30[5]](_0xfb30[6],controller[_0xfb30[7]]);router[_0xfb30[9]](_0xfb30[3],controller[_0xfb30[8]]);router[_0xfb30[11]](_0xfb30[6],controller[_0xfb30[10]]);router[_0xfb30[12]](_0xfb30[6],controller[_0xfb30[10]]);router[_0xfb30[14]](_0xfb30[6],controller[_0xfb30[13]]);module[_0xfb30[15]]=router \ No newline at end of file diff --git a/server/api/user_has_list/user_has_list.controller.js b/server/api/user_has_list/user_has_list.controller.js index f0a66dd..1e7dce2 100644 --- a/server/api/user_has_list/user_has_list.controller.js +++ b/server/api/user_has_list/user_has_list.controller.js @@ -1,98 +1 @@ -'use strict'; - -var _ = require('lodash'); -var UserHasList = require('../../models').UserHasList; - -// Get list of user_has_voice_queues -exports.index = function(req, res) { - UserHasList - .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 userHasList -exports.show = function(req, res) { - UserHasList - .findById(req.params.id) - .then(function(userHasList) { - if (!userHasList) { - return res.sendStatus(404); - } - return res.send(userHasList); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new userHasList in the DB. -exports.create = function(req, res, next) { - console.log(req.body); - UserHasList - .create(req.body) - .then(function(userHasList) { - return res.status(201).send(userHasList); - }) - .catch(function(err) { - console.error(err); - return next(err); - // return handleError(res, err); - }); -}; - -// Updates an existing userHasList in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - UserHasList - .findById(req.params.id) - .then(function(userHasList) { - if (!userHasList) { - return res.sendStatus(404); - } - var updated = _.merge(userHasList, req.body); - updated.save() - .then(function() { - return res.status(200).send(userHasList); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a userHasList from the DB. -exports.destroy = function(req, res) { - UserHasList - .findById(req.params.id) - .then(function(userHasList) { - if (!userHasList) { - return res.sendStatus(404); - } - userHasList.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); -} +var _0x9bef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x4C\x69\x73\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","\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"];_0x9bef[0];var _=require(_0x9bef[1]);var UserHasList=require(_0x9bef[3])[_0x9bef[2]];exports[_0x9bef[4]]=function(_0x7e82x3,_0x7e82x4){UserHasList[_0x9bef[10]](_0x7e82x3[_0x9bef[9]]?{where:_0x7e82x3[_0x9bef[9]]}:{})[_0x9bef[8]](function(_0x7e82x6){return _0x7e82x4[_0x9bef[7]](200)[_0x9bef[6]](_0x7e82x6)})[_0x9bef[5]](function(_0x7e82x5){return handleError(_0x7e82x4,_0x7e82x5)})};exports[_0x9bef[11]]=function(_0x7e82x3,_0x7e82x4){UserHasList[_0x9bef[15]](_0x7e82x3[_0x9bef[14]][_0x9bef[13]])[_0x9bef[8]](function(_0x7e82x7){if(!_0x7e82x7){return _0x7e82x4[_0x9bef[12]](404)};return _0x7e82x4[_0x9bef[6]](_0x7e82x7)})[_0x9bef[5]](function(_0x7e82x5){return handleError(_0x7e82x4,_0x7e82x5)})};exports[_0x9bef[16]]=function(_0x7e82x3,_0x7e82x4,_0x7e82x8){console[_0x9bef[18]](_0x7e82x3[_0x9bef[17]]);UserHasList[_0x9bef[16]](_0x7e82x3[_0x9bef[17]])[_0x9bef[8]](function(_0x7e82x7){return _0x7e82x4[_0x9bef[7]](201)[_0x9bef[6]](_0x7e82x7)})[_0x9bef[5]](function(_0x7e82x5){console[_0x9bef[19]](_0x7e82x5);return _0x7e82x8(_0x7e82x5)})};exports[_0x9bef[20]]=function(_0x7e82x3,_0x7e82x4){if(_0x7e82x3[_0x9bef[17]][_0x9bef[13]]){delete _0x7e82x3[_0x9bef[17]][_0x9bef[13]]};UserHasList[_0x9bef[15]](_0x7e82x3[_0x9bef[14]][_0x9bef[13]])[_0x9bef[8]](function(_0x7e82x7){if(!_0x7e82x7){return _0x7e82x4[_0x9bef[12]](404)};var _0x7e82x9=_[_0x9bef[21]](_0x7e82x7,_0x7e82x3[_0x9bef[17]]);_0x7e82x9[_0x9bef[22]]()[_0x9bef[8]](function(){return _0x7e82x4[_0x9bef[7]](200)[_0x9bef[6]](_0x7e82x7)})[_0x9bef[5]](function(_0x7e82x5){return handleError(_0x7e82x4,_0x7e82x5)})})[_0x9bef[5]](function(_0x7e82x5){return handleError(_0x7e82x4,_0x7e82x5)})};exports[_0x9bef[23]]=function(_0x7e82x3,_0x7e82x4){UserHasList[_0x9bef[15]](_0x7e82x3[_0x9bef[14]][_0x9bef[13]])[_0x9bef[8]](function(_0x7e82x7){if(!_0x7e82x7){return _0x7e82x4[_0x9bef[12]](404)};_0x7e82x7[_0x9bef[23]]()[_0x9bef[8]](function(){return _0x7e82x4[_0x9bef[12]](204)})[_0x9bef[5]](function(_0x7e82x5){return handleError(_0x7e82x4,_0x7e82x5)})})[_0x9bef[5]](function(_0x7e82x5){return handleError(_0x7e82x4,_0x7e82x5)})};function handleError(_0x7e82x4,_0x7e82x5){return _0x7e82x4[_0x9bef[7]](500)[_0x9bef[6]](_0x7e82x5)} \ No newline at end of file diff --git a/server/api/user_has_list/user_has_list.socket.js b/server/api/user_has_list/user_has_list.socket.js index f95330d..261a7cb 100644 --- a/server/api/user_has_list/user_has_list.socket.js +++ b/server/api/user_has_list/user_has_list.socket.js @@ -1,27 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -var UserHasList = require('../../models').UserHasList; - -exports.register = function(socket) { - UserHasList.afterCreate(function(doc) { - onSave(socket, doc); - }); - UserHasList.afterUpdate(function(doc) { - onSave(socket, doc); - }); - UserHasList.afterDestroy(function(doc) { - onRemove(socket, doc); - }); -} - -function onSave(socket, doc, cb) { - socket.emit('user_has_list:save', doc); -} - -function onRemove(socket, doc, cb) { - socket.emit('user_has_list:remove', doc); -} +var _0x381e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72\x48\x61\x73\x4C\x69\x73\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","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0x381e[0];var UserHasList=require(_0x381e[2])[_0x381e[1]];exports[_0x381e[3]]=function(_0x719ex2){UserHasList[_0x381e[4]](function(_0x719ex3){onSave(_0x719ex2,_0x719ex3)});UserHasList[_0x381e[5]](function(_0x719ex3){onSave(_0x719ex2,_0x719ex3)});UserHasList[_0x381e[6]](function(_0x719ex3){onRemove(_0x719ex2,_0x719ex3)})};function onSave(_0x719ex2,_0x719ex3,_0x719ex5){_0x719ex2[_0x381e[8]](_0x381e[7],_0x719ex3)}function onRemove(_0x719ex2,_0x719ex3,_0x719ex5){_0x719ex2[_0x381e[8]](_0x381e[9],_0x719ex3)} \ No newline at end of file diff --git a/server/api/user_has_mail_queue/index.js b/server/api/user_has_mail_queue/index.js index 50b083e..f4f8f3c 100644 --- a/server/api/user_has_mail_queue/index.js +++ b/server/api/user_has_mail_queue/index.js @@ -1,15 +1 @@ -'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; +var _0x3b58=["\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"];_0x3b58[0];var express=require(_0x3b58[1]);var controller=require(_0x3b58[2]);var router=express.Router();router[_0x3b58[5]](_0x3b58[3],controller[_0x3b58[4]]);router[_0x3b58[5]](_0x3b58[6],controller[_0x3b58[7]]);router[_0x3b58[9]](_0x3b58[3],controller[_0x3b58[8]]);router[_0x3b58[11]](_0x3b58[6],controller[_0x3b58[10]]);router[_0x3b58[12]](_0x3b58[6],controller[_0x3b58[10]]);router[_0x3b58[14]](_0x3b58[6],controller[_0x3b58[13]]);module[_0x3b58[15]]=router \ No newline at end of file diff --git a/server/api/user_has_mail_queue/user_has_mail_queue.controller.js b/server/api/user_has_mail_queue/user_has_mail_queue.controller.js index c15bc9d..9ba4d5e 100644 --- a/server/api/user_has_mail_queue/user_has_mail_queue.controller.js +++ b/server/api/user_has_mail_queue/user_has_mail_queue.controller.js @@ -1,95 +1 @@ -'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); -} +var _0x9ad4=["\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"];_0x9ad4[0];var _=require(_0x9ad4[1]);var UserHasMailQueue=require(_0x9ad4[3])[_0x9ad4[2]];exports[_0x9ad4[4]]=function(_0x4861x3,_0x4861x4){UserHasMailQueue[_0x9ad4[10]](_0x4861x3[_0x9ad4[9]]?{where:_0x4861x3[_0x9ad4[9]]}:{})[_0x9ad4[8]](function(_0x4861x6){return _0x4861x4[_0x9ad4[7]](200)[_0x9ad4[6]](_0x4861x6)})[_0x9ad4[5]](function(_0x4861x5){return handleError(_0x4861x4,_0x4861x5)})};exports[_0x9ad4[11]]=function(_0x4861x3,_0x4861x4){UserHasMailQueue[_0x9ad4[15]](_0x4861x3[_0x9ad4[14]][_0x9ad4[13]])[_0x9ad4[8]](function(_0x4861x7){if(!_0x4861x7){return _0x4861x4[_0x9ad4[12]](404)};return _0x4861x4[_0x9ad4[6]](_0x4861x7)})[_0x9ad4[5]](function(_0x4861x5){return handleError(_0x4861x4,_0x4861x5)})};exports[_0x9ad4[16]]=function(_0x4861x3,_0x4861x4){UserHasMailQueue[_0x9ad4[16]](_0x4861x3[_0x9ad4[17]])[_0x9ad4[8]](function(_0x4861x7){return _0x4861x4[_0x9ad4[7]](201)[_0x9ad4[6]](_0x4861x7)})[_0x9ad4[5]](function(_0x4861x5){return handleError(_0x4861x4,_0x4861x5)})};exports[_0x9ad4[18]]=function(_0x4861x3,_0x4861x4){if(_0x4861x3[_0x9ad4[17]][_0x9ad4[13]]){delete _0x4861x3[_0x9ad4[17]][_0x9ad4[13]]};UserHasMailQueue[_0x9ad4[15]](_0x4861x3[_0x9ad4[14]][_0x9ad4[13]])[_0x9ad4[8]](function(_0x4861x7){if(!_0x4861x7){return _0x4861x4[_0x9ad4[12]](404)};var _0x4861x8=_[_0x9ad4[19]](_0x4861x7,_0x4861x3[_0x9ad4[17]]);_0x4861x8[_0x9ad4[20]]()[_0x9ad4[8]](function(){return _0x4861x4[_0x9ad4[7]](200)[_0x9ad4[6]](_0x4861x7)})[_0x9ad4[5]](function(_0x4861x5){return handleError(_0x4861x4,_0x4861x5)})})[_0x9ad4[5]](function(_0x4861x5){return handleError(_0x4861x4,_0x4861x5)})};exports[_0x9ad4[21]]=function(_0x4861x3,_0x4861x4){UserHasMailQueue[_0x9ad4[15]](_0x4861x3[_0x9ad4[14]][_0x9ad4[13]])[_0x9ad4[8]](function(_0x4861x7){if(!_0x4861x7){return _0x4861x4[_0x9ad4[12]](404)};_0x4861x7[_0x9ad4[21]]()[_0x9ad4[8]](function(){return _0x4861x4[_0x9ad4[12]](204)})[_0x9ad4[5]](function(_0x4861x5){return handleError(_0x4861x4,_0x4861x5)})})[_0x9ad4[5]](function(_0x4861x5){return handleError(_0x4861x4,_0x4861x5)})};function handleError(_0x4861x4,_0x4861x5){return _0x4861x4[_0x9ad4[7]](500)[_0x9ad4[6]](_0x4861x5)} \ No newline at end of file diff --git a/server/api/user_has_mail_queue/user_has_mail_queue.socket.js b/server/api/user_has_mail_queue/user_has_mail_queue.socket.js index bea513c..37639e1 100644 --- a/server/api/user_has_mail_queue/user_has_mail_queue.socket.js +++ b/server/api/user_has_mail_queue/user_has_mail_queue.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xb1e9=["\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"];_0xb1e9[0];var UserHasMailQueue=require(_0xb1e9[2])[_0xb1e9[1]];exports[_0xb1e9[3]]=function(_0xa68fx2){UserHasMailQueue[_0xb1e9[4]](function(_0xa68fx3){onSave(_0xa68fx2,_0xa68fx3)});UserHasMailQueue[_0xb1e9[5]](function(_0xa68fx3){onRemove(_0xa68fx2,_0xa68fx3)})};function onSave(_0xa68fx2,_0xa68fx3,_0xa68fx5){_0xa68fx2[_0xb1e9[7]](_0xb1e9[6],_0xa68fx3)}function onRemove(_0xa68fx2,_0xa68fx3,_0xa68fx5){_0xa68fx2[_0xb1e9[7]](_0xb1e9[8],_0xa68fx3)} \ No newline at end of file diff --git a/server/api/user_has_team/index.js b/server/api/user_has_team/index.js index 723bdc1..d555b95 100644 --- a/server/api/user_has_team/index.js +++ b/server/api/user_has_team/index.js @@ -1,15 +1 @@ -'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 +var _0xe6ed=["\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"];_0xe6ed[0];var express=require(_0xe6ed[1]);var controller=require(_0xe6ed[2]);var router=express.Router();router[_0xe6ed[5]](_0xe6ed[3],controller[_0xe6ed[4]]);router[_0xe6ed[5]](_0xe6ed[6],controller[_0xe6ed[7]]);router[_0xe6ed[9]](_0xe6ed[3],controller[_0xe6ed[8]]);router[_0xe6ed[11]](_0xe6ed[6],controller[_0xe6ed[10]]);router[_0xe6ed[12]](_0xe6ed[6],controller[_0xe6ed[10]]);router[_0xe6ed[14]](_0xe6ed[6],controller[_0xe6ed[13]]);module[_0xe6ed[15]]=router \ No newline at end of file diff --git a/server/api/user_has_team/user_has_team.controller.js b/server/api/user_has_team/user_has_team.controller.js index 7f0f426..f529f2a 100644 --- a/server/api/user_has_team/user_has_team.controller.js +++ b/server/api/user_has_team/user_has_team.controller.js @@ -1,96 +1 @@ -'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); -} +var _0x9ad3=["\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"];_0x9ad3[0];var _=require(_0x9ad3[1]);var UserHasTeam=require(_0x9ad3[3])[_0x9ad3[2]];exports[_0x9ad3[4]]=function(_0x288dx3,_0x288dx4){console[_0x9ad3[6]](_0x288dx3[_0x9ad3[5]]);UserHasTeam[_0x9ad3[11]]({where:_0x288dx3[_0x9ad3[5]]})[_0x9ad3[10]](function(_0x288dx6){return _0x288dx4[_0x9ad3[9]](200)[_0x9ad3[8]](_0x288dx6)})[_0x9ad3[7]](function(_0x288dx5){return handleError(_0x288dx4,_0x288dx5)})};exports[_0x9ad3[12]]=function(_0x288dx3,_0x288dx4){UserHasTeam[_0x9ad3[16]](_0x288dx3[_0x9ad3[15]][_0x9ad3[14]])[_0x9ad3[10]](function(_0x288dx7){if(!_0x288dx7){return _0x288dx4[_0x9ad3[13]](404)};return _0x288dx4[_0x9ad3[8]](_0x288dx7)})[_0x9ad3[7]](function(_0x288dx5){return handleError(_0x288dx4,_0x288dx5)})};exports[_0x9ad3[17]]=function(_0x288dx3,_0x288dx4){UserHasTeam[_0x9ad3[17]](_0x288dx3[_0x9ad3[18]])[_0x9ad3[10]](function(_0x288dx7){return _0x288dx4[_0x9ad3[9]](201)[_0x9ad3[8]](_0x288dx7)})[_0x9ad3[7]](function(_0x288dx5){return handleError(_0x288dx4,_0x288dx5)})};exports[_0x9ad3[19]]=function(_0x288dx3,_0x288dx4){if(_0x288dx3[_0x9ad3[18]][_0x9ad3[14]]){delete _0x288dx3[_0x9ad3[18]][_0x9ad3[14]]};UserHasTeam[_0x9ad3[16]](_0x288dx3[_0x9ad3[15]][_0x9ad3[14]])[_0x9ad3[10]](function(_0x288dx7){if(!_0x288dx7){return _0x288dx4[_0x9ad3[13]](404)};var _0x288dx8=_[_0x9ad3[20]](_0x288dx7,_0x288dx3[_0x9ad3[18]]);_0x288dx8[_0x9ad3[21]]()[_0x9ad3[10]](function(){return _0x288dx4[_0x9ad3[9]](200)[_0x9ad3[8]](_0x288dx7)})[_0x9ad3[7]](function(_0x288dx5){return handleError(_0x288dx4,_0x288dx5)})})[_0x9ad3[7]](function(_0x288dx5){return handleError(_0x288dx4,_0x288dx5)})};exports[_0x9ad3[22]]=function(_0x288dx3,_0x288dx4){UserHasTeam[_0x9ad3[16]](_0x288dx3[_0x9ad3[15]][_0x9ad3[14]])[_0x9ad3[10]](function(_0x288dx7){if(!_0x288dx7){return _0x288dx4[_0x9ad3[13]](404)};_0x288dx7[_0x9ad3[22]]()[_0x9ad3[10]](function(){return _0x288dx4[_0x9ad3[13]](204)})[_0x9ad3[7]](function(_0x288dx5){return handleError(_0x288dx4,_0x288dx5)})})[_0x9ad3[7]](function(_0x288dx5){return handleError(_0x288dx4,_0x288dx5)})};function handleError(_0x288dx4,_0x288dx5){return _0x288dx4[_0x9ad3[9]](500)[_0x9ad3[8]](_0x288dx5)} \ No newline at end of file diff --git a/server/api/user_has_team/user_has_team.model.js b/server/api/user_has_team/user_has_team.model.js index 6d5861d..dc91c02 100644 --- a/server/api/user_has_team/user_has_team.model.js +++ b/server/api/user_has_team/user_has_team.model.js @@ -1,13 +1 @@ -'use strict'; - -module.export = function(sequelize, DataTypes) { - - var UserHasTeam = sequelize.define('UserHasTeam', { - name: String, - info: String, - active: Boolean - }); - - return UserHasTeam; - -}; +var _0xf831=["\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"];_0xf831[0];module[_0xf831[1]]=function(_0x5f4dx1,_0x5f4dx2){var _0x5f4dx3=_0x5f4dx1[_0xf831[3]](_0xf831[2],{name:String,info:String,active:Boolean});return _0x5f4dx3} \ No newline at end of file diff --git a/server/api/user_has_team/user_has_team.socket.js b/server/api/user_has_team/user_has_team.socket.js index 879043c..a7dc70c 100644 --- a/server/api/user_has_team/user_has_team.socket.js +++ b/server/api/user_has_team/user_has_team.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x9804=["\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"];_0x9804[0];var user_has_team=require(_0x9804[2])[_0x9804[1]];exports[_0x9804[3]]=function(_0x460cx2){user_has_team[_0x9804[4]](function(_0x460cx3){onSave(_0x460cx2,_0x460cx3)});user_has_team[_0x9804[5]](function(_0x460cx3){onRemove(_0x460cx2,_0x460cx3)})};function onSave(_0x460cx2,_0x460cx3,_0x460cx5){_0x460cx2[_0x9804[7]](_0x9804[6],_0x460cx3)}function onRemove(_0x460cx2,_0x460cx3,_0x460cx5){_0x460cx2[_0x9804[7]](_0x9804[8],_0x460cx3)} \ No newline at end of file diff --git a/server/api/user_has_team/user_has_team.spec.js b/server/api/user_has_team/user_has_team.spec.js index 5cc5226..8647925 100644 --- a/server/api/user_has_team/user_has_team.spec.js +++ b/server/api/user_has_team/user_has_team.spec.js @@ -1,20 +1 @@ -'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 +var _0x77c8=["\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"];_0x77c8[0];var should=require(_0x77c8[1]);var app=require(_0x77c8[2]);var request=require(_0x77c8[3]);describe(_0x77c8[4],function(){it(_0x77c8[5],function(_0xf194x4){request(app)[_0x77c8[13]](_0x77c8[12])[_0x77c8[11]](200)[_0x77c8[11]](_0x77c8[10],/json/)[_0x77c8[9]](function(_0xf194x5,_0xf194x6){if(_0xf194x5){return _0xf194x4(_0xf194x5)};_0xf194x6[_0x77c8[8]][_0x77c8[1]][_0x77c8[7]][_0x77c8[6]](Array);_0xf194x4()})})}) \ No newline at end of file diff --git a/server/api/user_has_voice_queue/index.js b/server/api/user_has_voice_queue/index.js index 72551d5..1883d92 100644 --- a/server/api/user_has_voice_queue/index.js +++ b/server/api/user_has_voice_queue/index.js @@ -1,15 +1 @@ -'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 +var _0x82f5=["\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"];_0x82f5[0];var express=require(_0x82f5[1]);var controller=require(_0x82f5[2]);var router=express.Router();router[_0x82f5[5]](_0x82f5[3],controller[_0x82f5[4]]);router[_0x82f5[5]](_0x82f5[6],controller[_0x82f5[7]]);router[_0x82f5[9]](_0x82f5[3],controller[_0x82f5[8]]);router[_0x82f5[11]](_0x82f5[6],controller[_0x82f5[10]]);router[_0x82f5[12]](_0x82f5[6],controller[_0x82f5[10]]);router[_0x82f5[14]](_0x82f5[6],controller[_0x82f5[13]]);module[_0x82f5[15]]=router \ No newline at end of file diff --git a/server/api/user_has_voice_queue/user_has_voice_queue.controller.js b/server/api/user_has_voice_queue/user_has_voice_queue.controller.js index f3e5d22..ecb5842 100644 --- a/server/api/user_has_voice_queue/user_has_voice_queue.controller.js +++ b/server/api/user_has_voice_queue/user_has_voice_queue.controller.js @@ -1,98 +1 @@ -'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); -} +var _0xd652=["\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"];_0xd652[0];var _=require(_0xd652[1]);var UserHasVoiceQueue=require(_0xd652[3])[_0xd652[2]];exports[_0xd652[4]]=function(_0x95e4x3,_0x95e4x4){UserHasVoiceQueue[_0xd652[10]](_0x95e4x3[_0xd652[9]]?{where:_0x95e4x3[_0xd652[9]]}:{})[_0xd652[8]](function(_0x95e4x6){return _0x95e4x4[_0xd652[7]](200)[_0xd652[6]](_0x95e4x6)})[_0xd652[5]](function(_0x95e4x5){return handleError(_0x95e4x4,_0x95e4x5)})};exports[_0xd652[11]]=function(_0x95e4x3,_0x95e4x4){UserHasVoiceQueue[_0xd652[15]](_0x95e4x3[_0xd652[14]][_0xd652[13]])[_0xd652[8]](function(_0x95e4x7){if(!_0x95e4x7){return _0x95e4x4[_0xd652[12]](404)};return _0x95e4x4[_0xd652[6]](_0x95e4x7)})[_0xd652[5]](function(_0x95e4x5){return handleError(_0x95e4x4,_0x95e4x5)})};exports[_0xd652[16]]=function(_0x95e4x3,_0x95e4x4,_0x95e4x8){console[_0xd652[18]](_0x95e4x3[_0xd652[17]]);UserHasVoiceQueue[_0xd652[16]](_0x95e4x3[_0xd652[17]])[_0xd652[8]](function(_0x95e4x7){return _0x95e4x4[_0xd652[7]](201)[_0xd652[6]](_0x95e4x7)})[_0xd652[5]](function(_0x95e4x5){console[_0xd652[19]](_0x95e4x5);return _0x95e4x8(_0x95e4x5)})};exports[_0xd652[20]]=function(_0x95e4x3,_0x95e4x4){if(_0x95e4x3[_0xd652[17]][_0xd652[13]]){delete _0x95e4x3[_0xd652[17]][_0xd652[13]]};UserHasVoiceQueue[_0xd652[15]](_0x95e4x3[_0xd652[14]][_0xd652[13]])[_0xd652[8]](function(_0x95e4x7){if(!_0x95e4x7){return _0x95e4x4[_0xd652[12]](404)};var _0x95e4x9=_[_0xd652[21]](_0x95e4x7,_0x95e4x3[_0xd652[17]]);_0x95e4x9[_0xd652[22]]()[_0xd652[8]](function(){return _0x95e4x4[_0xd652[7]](200)[_0xd652[6]](_0x95e4x7)})[_0xd652[5]](function(_0x95e4x5){return handleError(_0x95e4x4,_0x95e4x5)})})[_0xd652[5]](function(_0x95e4x5){return handleError(_0x95e4x4,_0x95e4x5)})};exports[_0xd652[23]]=function(_0x95e4x3,_0x95e4x4){UserHasVoiceQueue[_0xd652[15]](_0x95e4x3[_0xd652[14]][_0xd652[13]])[_0xd652[8]](function(_0x95e4x7){if(!_0x95e4x7){return _0x95e4x4[_0xd652[12]](404)};_0x95e4x7[_0xd652[23]]()[_0xd652[8]](function(){return _0x95e4x4[_0xd652[12]](204)})[_0xd652[5]](function(_0x95e4x5){return handleError(_0x95e4x4,_0x95e4x5)})})[_0xd652[5]](function(_0x95e4x5){return handleError(_0x95e4x4,_0x95e4x5)})};function handleError(_0x95e4x4,_0x95e4x5){return _0x95e4x4[_0xd652[7]](500)[_0xd652[6]](_0x95e4x5)} \ No newline at end of file diff --git a/server/api/user_has_voice_queue/user_has_voice_queue.socket.js b/server/api/user_has_voice_queue/user_has_voice_queue.socket.js index 1ed4063..8194ec9 100644 --- a/server/api/user_has_voice_queue/user_has_voice_queue.socket.js +++ b/server/api/user_has_voice_queue/user_has_voice_queue.socket.js @@ -1,42 +1 @@ -/** - * 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); -} +var _0xf94d=["\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"];_0xf94d[0];var UserHasVoiceQueue=require(_0xf94d[2])[_0xf94d[1]];exports[_0xf94d[3]]=function(_0xa4cex2){UserHasVoiceQueue[_0xf94d[4]](function(_0xa4cex3){onSave(_0xa4cex2,_0xa4cex3)});UserHasVoiceQueue[_0xf94d[5]](function(_0xa4cex3){onSave(_0xa4cex2,_0xa4cex3)});UserHasVoiceQueue[_0xf94d[6]](function(_0xa4cex3){onRemove(_0xa4cex2,_0xa4cex3)})};function onSave(_0xa4cex2,_0xa4cex3,_0xa4cex5){_0xa4cex2[_0xf94d[22]](_0xf94d[7],{logged:_0xa4cex3[_0xf94d[8]],loggedAt:_0xa4cex3[_0xf94d[9]],queue:_0xa4cex3[_0xf94d[10]],membername:_0xa4cex3[_0xf94d[11]],interface:_0xa4cex3[_0xf94d[12]],callstaken:_0xa4cex3[_0xf94d[13]],lastcall:_0xa4cex3[_0xf94d[14]],status:_0xa4cex3[_0xf94d[15]],statusdesc:_0xa4cex3[_0xf94d[16]],statusAt:_0xa4cex3[_0xf94d[17]],paused:_0xa4cex3[_0xf94d[18]],pausedAt:_0xa4cex3[_0xf94d[19]],reason:_0xa4cex3[_0xf94d[20]],UserId:_0xa4cex3[_0xf94d[21]]})}function onRemove(_0xa4cex2,_0xa4cex3,_0xa4cex5){_0xa4cex2[_0xf94d[22]](_0xf94d[23],_0xa4cex3)} \ No newline at end of file diff --git a/server/api/variable/index.js b/server/api/variable/index.js index 4c9decb..f22ff6c 100644 --- a/server/api/variable/index.js +++ b/server/api/variable/index.js @@ -1,17 +1 @@ -'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; +var _0x1148=["\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"];_0x1148[0];var express=require(_0x1148[1]);var controller=require(_0x1148[2]);var auth=require(_0x1148[3]);var router=express.Router();router[_0x1148[7]](_0x1148[4],auth[_0x1148[5]](),controller[_0x1148[6]]);router[_0x1148[7]](_0x1148[8],auth[_0x1148[5]](),controller[_0x1148[9]]);router[_0x1148[11]](_0x1148[4],auth[_0x1148[5]](),controller[_0x1148[10]]);router[_0x1148[13]](_0x1148[8],auth[_0x1148[5]](),controller[_0x1148[12]]);router[_0x1148[14]](_0x1148[8],auth[_0x1148[5]](),controller[_0x1148[12]]);router[_0x1148[16]](_0x1148[4],auth[_0x1148[5]](),controller[_0x1148[15]]);router[_0x1148[16]](_0x1148[8],auth[_0x1148[5]](),controller[_0x1148[17]]);module[_0x1148[18]]=router \ No newline at end of file diff --git a/server/api/variable/variable.controller.js b/server/api/variable/variable.controller.js index 2378a95..473fb6a 100644 --- a/server/api/variable/variable.controller.js +++ b/server/api/variable/variable.controller.js @@ -1,117 +1 @@ -'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)); -} +var _0xf2a0=["\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"];_0xf2a0[0];var _=require(_0xf2a0[1]);var Variable=require(_0xf2a0[3])[_0xf2a0[2]];var Util=require(_0xf2a0[4]);exports[_0xf2a0[5]]=function(_0x3423x4,_0x3423x5,_0x3423x6){return Variable[_0xf2a0[12]](Util[_0xf2a0[11]](_0x3423x4[_0xf2a0[10]]))[_0xf2a0[9]](function(_0x3423x8){_0x3423x5[_0xf2a0[8]](200)[_0xf2a0[7]](_0x3423x8)})[_0xf2a0[6]](function(_0x3423x7){return handleError(_0x3423x5,_0x3423x7)})};exports[_0xf2a0[13]]=function(_0x3423x4,_0x3423x5){return Variable[_0xf2a0[17]](_0x3423x4[_0xf2a0[16]][_0xf2a0[15]])[_0xf2a0[9]](function(_0x3423x9){if(!_0x3423x9){return _0x3423x5[_0xf2a0[14]](404)};return _0x3423x5[_0xf2a0[7]](_0x3423x9)})[_0xf2a0[6]](function(_0x3423x7){return handleError(_0x3423x5,_0x3423x7)})};exports[_0xf2a0[18]]=function(_0x3423x4,_0x3423x5){return Variable[_0xf2a0[18]](_0x3423x4[_0xf2a0[19]])[_0xf2a0[9]](function(_0x3423x9){return _0x3423x5[_0xf2a0[8]](201)[_0xf2a0[7]](_0x3423x9)})[_0xf2a0[6]](function(_0x3423x7){return handleError(_0x3423x5,_0x3423x7)})};exports[_0xf2a0[20]]=function(_0x3423x4,_0x3423x5){if(_0x3423x4[_0xf2a0[19]][_0xf2a0[15]]){delete _0x3423x4[_0xf2a0[19]][_0xf2a0[15]]};return Variable[_0xf2a0[17]](_0x3423x4[_0xf2a0[16]][_0xf2a0[15]])[_0xf2a0[9]](function(_0x3423x9){if(!_0x3423x9){return _0x3423x5[_0xf2a0[14]](404)};var _0x3423xa=_[_0xf2a0[21]](_0x3423x9,_0x3423x4[_0xf2a0[19]]);return _0x3423xa[_0xf2a0[22]]()})[_0xf2a0[9]](function(_0x3423x9){return _0x3423x5[_0xf2a0[8]](200)[_0xf2a0[7]](_0x3423x9)})[_0xf2a0[6]](function(_0x3423x7){return handleError(_0x3423x5,_0x3423x7)})};exports[_0xf2a0[23]]=function(_0x3423x4,_0x3423x5){return Variable[_0xf2a0[27]](_0xf2a0[26])[_0xf2a0[17]](_0x3423x4[_0xf2a0[16]][_0xf2a0[15]])[_0xf2a0[9]](function(_0x3423x9){if(!_0x3423x9){return _0x3423x5[_0xf2a0[14]](404)};if(variableHasAssociation(_0x3423x9)){var _0x3423x7= new Error();_0x3423x7[_0xf2a0[24]]=_0xf2a0[25];throw _0x3423x7};return _0x3423x9[_0xf2a0[23]]()})[_0xf2a0[9]](function(){return _0x3423x5[_0xf2a0[14]](204)})[_0xf2a0[6]](function(_0x3423x7){return handleError(_0x3423x5,_0x3423x7)})};exports[_0xf2a0[28]]=function(_0x3423x4,_0x3423x5){return Variable[_0xf2a0[23]]({where:{id:_0x3423x4[_0xf2a0[10]][_0xf2a0[29]]},individualHooks:true})[_0xf2a0[9]](function(){return _0x3423x5[_0xf2a0[14]](204)})[_0xf2a0[6]](function(_0x3423x7){return handleError(_0x3423x5,_0x3423x7)})};function handleError(_0x3423x5,_0x3423x7){return _0x3423x5[_0xf2a0[8]](500)[_0xf2a0[7]](_0x3423x7)}function variableHasAssociation(_0x3423x9){return ((_0x3423x9[_0xf2a0[30]]&&_0x3423x9[_0xf2a0[30]][_0xf2a0[31]]>0)||(_0x3423x9[_0xf2a0[32]]&&_0x3423x9[_0xf2a0[32]][_0xf2a0[31]]>0)||(_0x3423x9[_0xf2a0[33]]&&_0x3423x9[_0xf2a0[33]][_0xf2a0[31]]>0)||(_0x3423x9[_0xf2a0[34]]&&_0x3423x9[_0xf2a0[34]][_0xf2a0[31]]>0)||(_0x3423x9[_0xf2a0[35]]&&_0x3423x9[_0xf2a0[35]][_0xf2a0[31]]>0))} \ No newline at end of file diff --git a/server/api/variable/variable.socket.js b/server/api/variable/variable.socket.js index 739f11c..64276cc 100644 --- a/server/api/variable/variable.socket.js +++ b/server/api/variable/variable.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xf9e1=["\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"];_0xf9e1[0];var Variable=require(_0xf9e1[2])[_0xf9e1[1]];exports[_0xf9e1[3]]=function(_0xfd69x2){Variable[_0xf9e1[4]](function(_0xfd69x3){onSave(_0xfd69x2,_0xfd69x3)});Variable[_0xf9e1[5]](function(_0xfd69x3){onRemove(_0xfd69x2,_0xfd69x3)})};function onSave(_0xfd69x2,_0xfd69x3,_0xfd69x5){_0xfd69x2[_0xf9e1[7]](_0xf9e1[6],_0xfd69x3)}function onRemove(_0xfd69x2,_0xfd69x3,_0xfd69x5){_0xfd69x2[_0xf9e1[7]](_0xf9e1[8],_0xfd69x3)} \ No newline at end of file diff --git a/server/api/voice_context/index.js b/server/api/voice_context/index.js index 1b436c8..5b292a0 100644 --- a/server/api/voice_context/index.js +++ b/server/api/voice_context/index.js @@ -1,16 +1 @@ -'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; +var _0xa469=["\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"];_0xa469[0];var express=require(_0xa469[1]);var controller=require(_0xa469[2]);var auth=require(_0xa469[3]);var router=express.Router();router[_0xa469[7]](_0xa469[4],auth[_0xa469[5]](),controller[_0xa469[6]]);router[_0xa469[7]](_0xa469[8],auth[_0xa469[5]](),controller[_0xa469[9]]);router[_0xa469[11]](_0xa469[4],auth[_0xa469[5]](),controller[_0xa469[10]]);router[_0xa469[11]](_0xa469[12],auth[_0xa469[5]](),controller[_0xa469[13]]);router[_0xa469[15]](_0xa469[8],auth[_0xa469[5]](),controller[_0xa469[14]]);router[_0xa469[17]](_0xa469[4],auth[_0xa469[5]](),controller[_0xa469[16]]);router[_0xa469[17]](_0xa469[8],auth[_0xa469[5]](),controller[_0xa469[18]]);module[_0xa469[19]]=router \ No newline at end of file diff --git a/server/api/voice_context/voice_context.controller.js b/server/api/voice_context/voice_context.controller.js index c6ec224..11920ad 100644 --- a/server/api/voice_context/voice_context.controller.js +++ b/server/api/voice_context/voice_context.controller.js @@ -1,227 +1 @@ -'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); -} +var _0x329a=["\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"];_0x329a[0];var _=require(_0x329a[1]);var util=require(_0x329a[2]);var Util=require(_0x329a[3]);var sequelize=require(_0x329a[5])[_0x329a[4]];var VoiceContext=require(_0x329a[5])[_0x329a[6]];var VoiceExtension=require(_0x329a[5])[_0x329a[7]];exports[_0x329a[8]]=function(_0x78d2x7,_0x78d2x8,_0x78d2x9){return VoiceContext[_0x329a[15]](Util[_0x329a[14]](_0x78d2x7[_0x329a[13]]))[_0x329a[12]](function(_0x78d2xb){_0x78d2x8[_0x329a[11]](200)[_0x329a[10]](_0x78d2xb)})[_0x329a[9]](function(_0x78d2xa){return handleError(_0x78d2x8,_0x78d2xa)})};exports[_0x329a[16]]=function(_0x78d2x7,_0x78d2x8){return VoiceContext[_0x329a[20]](_0x78d2x7[_0x329a[19]][_0x329a[18]])[_0x329a[12]](function(_0x78d2xc){if(!_0x78d2xc){return _0x78d2x8[_0x329a[17]](404)};return _0x78d2x8[_0x329a[10]](_0x78d2xc)})[_0x329a[9]](function(_0x78d2xa){return handleError(_0x78d2x8,_0x78d2xa)})};exports[_0x329a[21]]=function(_0x78d2x7,_0x78d2x8){return VoiceContext[_0x329a[24]]({where:{name:_0x78d2x7[_0x329a[23]][_0x329a[22]]}})[_0x329a[12]](function(_0x78d2xd){if(!_0x78d2xd){return _0x78d2x8[_0x329a[17]](404)};return _0x78d2x8[_0x329a[10]](_0x78d2xd)})[_0x329a[9]](function(_0x78d2xa){return handleError(_0x78d2x8,_0x78d2xa)})};exports[_0x329a[25]]=function(_0x78d2x7,_0x78d2x8){return VoiceContext[_0x329a[25]](_0x78d2x7[_0x329a[23]])[_0x329a[12]](function(_0x78d2xc){return _0x78d2x8[_0x329a[11]](201)[_0x329a[10]](_0x78d2xc)})[_0x329a[9]](sequelize.UniqueConstraintError,function(_0x78d2xa){_0x78d2xa[_0x329a[26]]=_0x329a[27];_0x78d2xa[_0x329a[28]]=_0x329a[29];return handleError(_0x78d2x8,_0x78d2xa)})[_0x329a[9]](function(_0x78d2xa){return handleError(_0x78d2x8,_0x78d2xa)})};exports[_0x329a[30]]=function(_0x78d2x7,_0x78d2x8){return VoiceContext[_0x329a[24]]({where:{name:_0x78d2x7[_0x329a[23]][_0x329a[22]],id:{$ne:_0x78d2x7[_0x329a[23]][_0x329a[18]]}}})[_0x329a[12]](function(_0x78d2xf){if(!_0x78d2xf){return _0x78d2x8[_0x329a[17]](404)};if(_0x78d2xf[_0x329a[33]]>0){return _0x78d2x8[_0x329a[11]](500)[_0x329a[10]]({message:_0x329a[29]})};if(_0x78d2x7[_0x329a[23]][_0x329a[18]]){delete _0x78d2x7[_0x329a[23]][_0x329a[18]]};return VoiceContext[_0x329a[20]](_0x78d2x7[_0x329a[19]][_0x329a[18]])})[_0x329a[12]](function(_0x78d2xc){if(!_0x78d2xc){return _0x78d2x8[_0x329a[17]](404)};var _0x78d2xe=_[_0x329a[31]](_0x78d2xc,_0x78d2x7[_0x329a[23]]);return _0x78d2xe[_0x329a[32]]()})[_0x329a[12]](function(_0x78d2xc){return _0x78d2x8[_0x329a[11]](200)[_0x329a[10]](_0x78d2xc)})[_0x329a[9]](function(_0x78d2xa){return handleError(_0x78d2x8,_0x78d2xa)})};exports[_0x329a[34]]=function(_0x78d2x7,_0x78d2x8){var _0x78d2x10;return VoiceContext[_0x329a[20]](_0x78d2x7[_0x329a[19]][_0x329a[18]])[_0x329a[12]](function(_0x78d2xc){_0x78d2x10=_0x78d2xc;if(!_0x78d2x10){return _0x78d2x8[_0x329a[17]](404)};if(_0x78d2x10[_0x329a[39]]){return _0x78d2x8[_0x329a[11]](500)[_0x329a[10]]({message:_0x329a[40],translatedMessage:_0x329a[41]})};return VoiceExtension[_0x329a[24]]({where:{context:_0x78d2x10[_0x329a[22]],VoiceContextId:null}})})[_0x329a[12]](function(_0x78d2x11){console[_0x329a[36]](_0x78d2x11);if(_0x78d2x11[_0x329a[33]]>0){return _0x78d2x8[_0x329a[11]](500)[_0x329a[10]]({message:_0x329a[37],translatedMessage:_0x329a[38]})};return _0x78d2x10[_0x329a[34]]()})[_0x329a[12]](function(){return _0x78d2x8[_0x329a[17]](204)})[_0x329a[9]](function(_0x78d2xa){console[_0x329a[36]](_0x329a[35],_0x78d2xa);return handleError(_0x78d2x8,_0x78d2xa)})};exports[_0x329a[42]]=function(_0x78d2x7,_0x78d2x8){var _0x78d2x12;return VoiceContext[_0x329a[24]]({where:{id:_0x78d2x7[_0x329a[13]][_0x329a[43]]}})[_0x329a[12]](function(_0x78d2xd){_0x78d2x12=_0x78d2xd;var _0x78d2x13=_[_0x329a[44]](_0x78d2x12,{defaultEntry:true});if(_0x78d2x13){return _0x78d2x8[_0x329a[11]](500)[_0x329a[10]]({message:_0x329a[40],translatedMessage:_0x329a[41]})};if(!_0x78d2x12){return _0x78d2x8[_0x329a[17]](404)};var _0x78d2x14=_[_0x329a[46]](_[_0x329a[46]](_0x78d2x12,_0x329a[45]),_0x329a[22]);return VoiceExtension[_0x329a[24]]({where:{context:_0x78d2x14,VoiceContextId:null}})})[_0x329a[12]](function(_0x78d2x11){if(_0x78d2x11[_0x329a[33]]>_0x78d2x12[_0x329a[33]]){return _0x78d2x8[_0x329a[11]](500)[_0x329a[10]]({message:_0x329a[37],translatedMessage:_0x329a[38]})};return VoiceContext[_0x329a[34]]({where:{id:_0x78d2x7[_0x329a[13]][_0x329a[43]]},individualHooks:true})})[_0x329a[12]](function(){return _0x78d2x8[_0x329a[17]](204)})[_0x329a[9]](function(_0x78d2xa){console[_0x329a[36]](_0x78d2xa);return handleError(_0x78d2x8,_0x78d2xa)})};function handleError(_0x78d2x8,_0x78d2xa){return _0x78d2x8[_0x329a[11]](500)[_0x329a[10]](_0x78d2xa)} \ No newline at end of file diff --git a/server/api/voice_context/voice_context.socket.js b/server/api/voice_context/voice_context.socket.js index c3841ec..b1552b2 100644 --- a/server/api/voice_context/voice_context.socket.js +++ b/server/api/voice_context/voice_context.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xbf8e=["\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"];_0xbf8e[0];var VoiceContext=require(_0xbf8e[2])[_0xbf8e[1]];exports[_0xbf8e[3]]=function(_0x6c2cx2){VoiceContext[_0xbf8e[4]](function(_0x6c2cx3){onSave(_0x6c2cx2,_0x6c2cx3)});VoiceContext[_0xbf8e[5]](function(_0x6c2cx3){onRemove(_0x6c2cx2,_0x6c2cx3)})};function onSave(_0x6c2cx2,_0x6c2cx3,_0x6c2cx5){_0x6c2cx2[_0xbf8e[7]](_0xbf8e[6],_0x6c2cx3)}function onRemove(_0x6c2cx2,_0x6c2cx3,_0x6c2cx5){_0x6c2cx2[_0xbf8e[7]](_0xbf8e[8],_0x6c2cx3)} \ No newline at end of file diff --git a/server/api/voice_context/voice_context.spec.js b/server/api/voice_context/voice_context.spec.js index 1a60777..4b599bc 100644 --- a/server/api/voice_context/voice_context.spec.js +++ b/server/api/voice_context/voice_context.spec.js @@ -1,20 +1 @@ -'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 +var _0x8f80=["\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"];_0x8f80[0];var should=require(_0x8f80[1]);var app=require(_0x8f80[2]);var request=require(_0x8f80[3]);describe(_0x8f80[4],function(){it(_0x8f80[5],function(_0x3cd7x4){request(app)[_0x8f80[13]](_0x8f80[12])[_0x8f80[11]](200)[_0x8f80[11]](_0x8f80[10],/json/)[_0x8f80[9]](function(_0x3cd7x5,_0x3cd7x6){if(_0x3cd7x5){return _0x3cd7x4(_0x3cd7x5)};_0x3cd7x6[_0x8f80[8]][_0x8f80[1]][_0x8f80[7]][_0x8f80[6]](Array);_0x3cd7x4()})})}) \ No newline at end of file diff --git a/server/api/voice_extension/index.js b/server/api/voice_extension/index.js index b0215fc..e7f3352 100644 --- a/server/api/voice_extension/index.js +++ b/server/api/voice_extension/index.js @@ -1,16 +1 @@ -'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; +var _0x42fc=["\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"];_0x42fc[0];var express=require(_0x42fc[1]);var controller=require(_0x42fc[2]);var auth=require(_0x42fc[3]);var router=express.Router();router[_0x42fc[7]](_0x42fc[4],auth[_0x42fc[5]](),controller[_0x42fc[6]]);router[_0x42fc[7]](_0x42fc[8],auth[_0x42fc[5]](),controller[_0x42fc[9]]);router[_0x42fc[11]](_0x42fc[4],auth[_0x42fc[5]](),controller[_0x42fc[10]]);router[_0x42fc[13]](_0x42fc[8],auth[_0x42fc[5]](),controller[_0x42fc[12]]);router[_0x42fc[15]](_0x42fc[4],auth[_0x42fc[5]](),controller[_0x42fc[14]]);router[_0x42fc[15]](_0x42fc[8],auth[_0x42fc[5]](),controller[_0x42fc[16]]);module[_0x42fc[17]]=router \ No newline at end of file diff --git a/server/api/voice_extension/voice_extension.controller.js b/server/api/voice_extension/voice_extension.controller.js index 6dc7233..0285da4 100644 --- a/server/api/voice_extension/voice_extension.controller.js +++ b/server/api/voice_extension/voice_extension.controller.js @@ -1,146 +1 @@ -'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); -} +var _0x7495=["\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"];_0x7495[0];var _=require(_0x7495[1]);var VoiceExtension=require(_0x7495[3])[_0x7495[2]];var Interval=require(_0x7495[3])[_0x7495[4]];var sequelize=require(_0x7495[3])[_0x7495[5]];var Sequelize=require(_0x7495[3])[_0x7495[6]];var util=require(_0x7495[7]);var async=require(_0x7495[8]);var veUtil=require(_0x7495[9]);var Util=require(_0x7495[10]);var Applications=veUtil[_0x7495[11]];exports[_0x7495[12]]=function(_0xe2cdxb,_0xe2cdxc,_0xe2cdxd){return VoiceExtension[_0x7495[23]](_0x7495[21],_0x7495[22])[_0x7495[20]](Util[_0x7495[19]](_0xe2cdxb[_0x7495[18]]))[_0x7495[17]](function(_0xe2cdxf){_0xe2cdxc[_0x7495[16]](200)[_0x7495[15]](_0xe2cdxf)})[_0x7495[14]](function(_0xe2cdxe){console[_0x7495[13]](_0xe2cdxe);return handleError(_0xe2cdxc,_0xe2cdxe)})};exports[_0x7495[24]]=function(_0xe2cdxb,_0xe2cdxc){VoiceExtension[_0x7495[23]](_0x7495[22])[_0x7495[28]]({where:{id:_0xe2cdxb[_0x7495[27]][_0x7495[26]],VoiceExtensionId:null}})[_0x7495[17]](function(_0xe2cdx10){if(!_0xe2cdx10){return _0xe2cdxc[_0x7495[25]](404)};return _0xe2cdxc[_0x7495[15]](_0xe2cdx10)})[_0x7495[14]](function(_0xe2cdxe){return handleError(_0xe2cdxc,_0xe2cdxe)})};exports[_0x7495[29]]=function(_0xe2cdxb,_0xe2cdxc){var _0xe2cdx11;return sequelize[_0x7495[39]](function(_0xe2cdx12){return VoiceExtension[_0x7495[29]](_0xe2cdxb[_0x7495[35]],{transaction:_0xe2cdx12})[_0x7495[17]](function(_0xe2cdx13){_0xe2cdx11=_0xe2cdx13;if(_0xe2cdxb[_0x7495[35]][_0x7495[11]]&&Array[_0x7495[37]](_0xe2cdxb[_0x7495[35]].Applications)&&_0xe2cdxb[_0x7495[35]][_0x7495[11]][_0x7495[38]]){return _0xe2cdx13}})[_0x7495[17]](veUtil[_0x7495[36]](_0xe2cdxb[_0x7495[35]].Applications,_0xe2cdx12,_0xe2cdxc))})[_0x7495[17]](function(){return _0xe2cdxc[_0x7495[16]](201)[_0x7495[15]](_0xe2cdx11)})[_0x7495[14]](sequelize.UniqueConstraintError,function(_0xe2cdxe){_0xe2cdxe[_0x7495[31]]=_0x7495[32];_0xe2cdxe[_0x7495[33]]=_0x7495[34];return handleError(_0xe2cdxc,_0xe2cdxe)})[_0x7495[14]](sequelize.ValidationError,function(_0xe2cdxe){_0xe2cdxe[_0x7495[31]]=_0x7495[32];_0xe2cdxe[_0x7495[33]]=_0x7495[34];return handleError(_0xe2cdxc,_0xe2cdxe)})[_0x7495[14]](function(_0xe2cdxe){console[_0x7495[13]](_0x7495[30],_0xe2cdxe);return handleError(_0xe2cdxc,_0xe2cdxe)})};exports[_0x7495[40]]=function(_0xe2cdxb,_0xe2cdxc){return sequelize[_0x7495[39]](function(_0xe2cdx12){return veUtil[_0x7495[41]](_0xe2cdxb,_0xe2cdx12)})[_0x7495[17]](function(){return _0xe2cdxc[_0x7495[25]](200)})[_0x7495[14]](sequelize.UniqueConstraintError,function(_0xe2cdxe){_0xe2cdxe[_0x7495[31]]=_0x7495[32];_0xe2cdxe[_0x7495[33]]=_0x7495[34];console[_0x7495[13]](_0xe2cdxe);return handleError(_0xe2cdxc,_0xe2cdxe)})[_0x7495[14]](function(_0xe2cdxe){console[_0x7495[13]](_0xe2cdxe);return handleError(_0xe2cdxc,_0xe2cdxe)})};exports[_0x7495[42]]=function(_0xe2cdxb,_0xe2cdxc,_0xe2cdxd){return sequelize[_0x7495[39]](function(_0xe2cdx12){return VoiceExtension[_0x7495[43]](_0xe2cdxb[_0x7495[27]][_0x7495[26]])[_0x7495[17]](function(_0xe2cdx10){if(!_0xe2cdx10){return _0xe2cdxc[_0x7495[25]](404)};return _0xe2cdx10[_0x7495[42]]()})})[_0x7495[17]](function(){return _0xe2cdxc[_0x7495[25]](204)})[_0x7495[14]](function(_0xe2cdxe){console[_0x7495[13]](_0xe2cdxe);return handleError(_0xe2cdxc,_0xe2cdxe)})};exports[_0x7495[44]]=function(_0xe2cdxb,_0xe2cdxc){VoiceExtension[_0x7495[42]]({where:{id:_0xe2cdxb[_0x7495[18]][_0x7495[26]]},individualHooks:true})[_0x7495[17]](function(){return _0xe2cdxc[_0x7495[25]](204)})[_0x7495[14]](function(_0xe2cdxe){return handleError(_0xe2cdxc,_0xe2cdxe)})};function handleError(_0xe2cdxc,_0xe2cdxe){return _0xe2cdxc[_0x7495[16]](500)[_0x7495[15]](_0xe2cdxe)} \ No newline at end of file diff --git a/server/api/voice_extension/voice_extension.socket.js b/server/api/voice_extension/voice_extension.socket.js index 8da1778..38c66ca 100644 --- a/server/api/voice_extension/voice_extension.socket.js +++ b/server/api/voice_extension/voice_extension.socket.js @@ -1,34 +1 @@ -/** - * 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); -} +var _0xa732=["\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"];_0xa732[0];var VoiceExtension=require(_0xa732[2])[_0xa732[1]];exports[_0xa732[3]]=function(_0xc6a8x2){VoiceExtension[_0xa732[4]](function(_0xc6a8x3){onSave(_0xc6a8x2,_0xc6a8x3)});VoiceExtension[_0xa732[5]](function(_0xc6a8x3){onRemove(_0xc6a8x2,_0xc6a8x3)});VoiceExtension[_0xa732[6]](function(_0xc6a8x3){onUpdate(_0xc6a8x2,_0xc6a8x3)})};function onSave(_0xc6a8x2,_0xc6a8x3,_0xc6a8x5){_0xc6a8x2[_0xa732[8]](_0xa732[7],_0xc6a8x3)}function onRemove(_0xc6a8x2,_0xc6a8x3,_0xc6a8x5){_0xc6a8x2[_0xa732[8]](_0xa732[9],_0xc6a8x3)}function onUpdate(_0xc6a8x2,_0xc6a8x3,_0xc6a8x5){_0xc6a8x2[_0xa732[8]](_0xa732[10],_0xc6a8x3)} \ No newline at end of file diff --git a/server/api/voice_extension/voice_extension.spec.js b/server/api/voice_extension/voice_extension.spec.js index 0971536..340bec6 100644 --- a/server/api/voice_extension/voice_extension.spec.js +++ b/server/api/voice_extension/voice_extension.spec.js @@ -1,20 +1 @@ -'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 +var _0x1921=["\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"];_0x1921[0];var should=require(_0x1921[1]);var app=require(_0x1921[2]);var request=require(_0x1921[3]);describe(_0x1921[4],function(){it(_0x1921[5],function(_0xf871x4){request(app)[_0x1921[13]](_0x1921[12])[_0x1921[11]](200)[_0x1921[11]](_0x1921[10],/json/)[_0x1921[9]](function(_0xf871x5,_0xf871x6){if(_0xf871x5){return _0xf871x4(_0xf871x5)};_0xf871x6[_0x1921[8]][_0x1921[1]][_0x1921[7]][_0x1921[6]](Array);_0xf871x4()})})}) \ No newline at end of file diff --git a/server/api/voice_musiconhold/index.js b/server/api/voice_musiconhold/index.js index 59cc818..8571abb 100644 --- a/server/api/voice_musiconhold/index.js +++ b/server/api/voice_musiconhold/index.js @@ -1,21 +1 @@ -'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; +var _0xb326=["\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"];_0xb326[0];var express=require(_0xb326[1]);var controller=require(_0xb326[2]);var auth=require(_0xb326[3]);var router=express.Router();router[_0xb326[7]](_0xb326[4],auth[_0xb326[5]](),controller[_0xb326[6]]);router[_0xb326[7]](_0xb326[8],auth[_0xb326[5]](),controller[_0xb326[9]]);router[_0xb326[7]](_0xb326[10],auth[_0xb326[5]](),controller[_0xb326[11]]);router[_0xb326[7]](_0xb326[12],auth[_0xb326[5]](),controller[_0xb326[13]]);router[_0xb326[15]](_0xb326[4],auth[_0xb326[5]](),controller[_0xb326[14]]);router[_0xb326[15]](_0xb326[16],auth[_0xb326[5]](),controller[_0xb326[17]]);router[_0xb326[15]](_0xb326[12],auth[_0xb326[5]](),controller[_0xb326[18]]);router[_0xb326[20]](_0xb326[10],auth[_0xb326[5]](),controller[_0xb326[19]]);router[_0xb326[22]](_0xb326[4],auth[_0xb326[5]](),controller[_0xb326[21]]);router[_0xb326[22]](_0xb326[10],auth[_0xb326[5]](),controller[_0xb326[23]]);router[_0xb326[22]](_0xb326[12],auth[_0xb326[5]](),controller[_0xb326[24]]);module[_0xb326[25]]=router \ No newline at end of file diff --git a/server/api/voice_musiconhold/voice_musiconhold.controller.js b/server/api/voice_musiconhold/voice_musiconhold.controller.js index 6c74d50..dd0929d 100644 --- a/server/api/voice_musiconhold/voice_musiconhold.controller.js +++ b/server/api/voice_musiconhold/voice_musiconhold.controller.js @@ -1,283 +1 @@ -'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); -} +var _0x8f0d=["\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"];_0x8f0d[0];var fs=require(_0x8f0d[1]);var _=require(_0x8f0d[2]);var path=require(_0x8f0d[3]);var util=require(_0x8f0d[4]);var fse=require(_0x8f0d[5]);var remove=require(_0x8f0d[6]);var base64=require(_0x8f0d[7]);var config=require(_0x8f0d[8]);var Util=require(_0x8f0d[9]);var Sound=require(_0x8f0d[11])[_0x8f0d[10]];var sequelize=require(_0x8f0d[11])[_0x8f0d[12]];var VoiceMusicOnHold=require(_0x8f0d[11])[_0x8f0d[13]];exports[_0x8f0d[14]]=function(_0x6a17xd,_0x6a17xe){return VoiceMusicOnHold[_0x8f0d[21]](Util[_0x8f0d[20]](_0x6a17xd[_0x8f0d[19]]))[_0x8f0d[18]](function(_0x6a17x10){_0x6a17xe[_0x8f0d[17]](200)[_0x8f0d[16]](_0x6a17x10)})[_0x8f0d[15]](function(_0x6a17xf){return handleError(_0x6a17xe,_0x6a17xf)})};exports[_0x8f0d[22]]=function(_0x6a17xd,_0x6a17xe){return VoiceMusicOnHold[_0x8f0d[26]](_0x6a17xd[_0x8f0d[25]][_0x8f0d[24]])[_0x8f0d[18]](function(_0x6a17x11){if(!_0x6a17x11){return _0x6a17xe[_0x8f0d[23]](404)};return _0x6a17xe[_0x8f0d[16]](_0x6a17x11)})[_0x8f0d[15]](function(_0x6a17xf){return handleError(_0x6a17xe,_0x6a17xf)})};exports[_0x8f0d[27]]=function(_0x6a17xd,_0x6a17xe){var _0x6a17x12;return VoiceMusicOnHold[_0x8f0d[26]](_0x6a17xd[_0x8f0d[25]][_0x8f0d[24]])[_0x8f0d[18]](function(_0x6a17x11){if(!_0x6a17x11){return _0x6a17xe[_0x8f0d[23]](404)};_0x6a17x12=_0x6a17x11;return Sound[_0x8f0d[41]]({where:{id:_0x6a17xd[_0x8f0d[40]][_0x8f0d[39]]}})})[_0x8f0d[18]](function(_0x6a17x13){var _0x6a17x14=path[_0x8f0d[30]](config[_0x8f0d[28]],_0x8f0d[29]);var _0x6a17x15;_0x6a17x13[_0x8f0d[36]](function(_0x6a17x16){_0x6a17x15=path[_0x8f0d[30]](_0x6a17x12[_0x8f0d[31]],_0x6a17x16[_0x8f0d[32]]+_0x8f0d[33]);fse[_0x8f0d[35]](path[_0x8f0d[30]](_0x6a17x14,_0x6a17x16[_0x8f0d[34]]+_0x8f0d[33]),_0x6a17x15)});fs[_0x8f0d[38]](_0x6a17x15,parseInt(_0x8f0d[37],8));_0x6a17xe[_0x8f0d[23]](200)})[_0x8f0d[15]](function(_0x6a17xf){return handleError(_0x6a17xe,_0x6a17xf)})};exports[_0x8f0d[42]]=function(_0x6a17xd,_0x6a17xe){var _0x6a17x17={};VoiceMusicOnHold[_0x8f0d[26]](_0x6a17xd[_0x8f0d[25]][_0x8f0d[24]])[_0x8f0d[18]](function(_0x6a17x11){if(!_0x6a17x11){return _0x6a17xe[_0x8f0d[23]](404)};_0x6a17x17[_0x8f0d[3]]=_0x6a17x11[_0x8f0d[31]];fs[_0x8f0d[44]](_0x6a17x11[_0x8f0d[31]],function(_0x6a17xf,_0x6a17x18){if(!_0x6a17xf){_0x6a17x17[_0x8f0d[43]]=_0x6a17x18;return _0x6a17xe[_0x8f0d[16]](_0x6a17x17)}else {throw _0x6a17xf}})})[_0x8f0d[15]](function(_0x6a17xf){return handleError(_0x6a17xe,_0x6a17xf)})};exports[_0x8f0d[45]]=function(_0x6a17xd,_0x6a17xe){VoiceMusicOnHold[_0x8f0d[26]](_0x6a17xd[_0x8f0d[25]][_0x8f0d[24]])[_0x8f0d[18]](function(_0x6a17x11){if(!_0x6a17x11){return _0x6a17xe[_0x8f0d[23]](404)};var _0x6a17x19=_0x6a17x11[_0x8f0d[31]]+_0x8f0d[46]+_0x6a17xd[_0x8f0d[19]][_0x8f0d[47]];fs[_0x8f0d[48]](_0x6a17x19,function(_0x6a17xf){if(_0x6a17xf){return handleError(_0x6a17xe,_0x6a17xf)}else {return _0x6a17xe[_0x8f0d[23]](204)}})})[_0x8f0d[15]](function(_0x6a17xf){return handleError(_0x6a17xe,_0x6a17xf)})};exports[_0x8f0d[49]]=function(_0x6a17xd,_0x6a17xe){console[_0x8f0d[50]](_0x6a17xd[_0x8f0d[40]]);VoiceMusicOnHold[_0x8f0d[41]]({where:{name:_0x6a17xd[_0x8f0d[40]][_0x8f0d[51]]}})[_0x8f0d[18]](function(_0x6a17x1a){if(!_0x6a17x1a){return _0x6a17xe[_0x8f0d[23]](404)};return _0x6a17xe[_0x8f0d[16]](_0x6a17x1a)})[_0x8f0d[15]](function(_0x6a17xf){return handleError(_0x6a17xe,_0x6a17xf)})};exports[_0x8f0d[52]]=function(_0x6a17xd,_0x6a17xe){return sequelize[_0x8f0d[60]]()[_0x8f0d[18]](function(_0x6a17x1b){_0x6a17xd[_0x8f0d[40]][_0x8f0d[31]]=path[_0x8f0d[30]](config[_0x8f0d[28]],_0x8f0d[53],_0x6a17xd[_0x8f0d[40]][_0x8f0d[51]]);return VoiceMusicOnHold[_0x8f0d[52]](_0x6a17xd[_0x8f0d[40]],{transaction:_0x6a17x1b})[_0x8f0d[18]](function(_0x6a17x11){fs[_0x8f0d[59]](_0x6a17x11[_0x8f0d[31]],parseInt(_0x8f0d[37],8),function(_0x6a17xf){if(_0x6a17xf){console[_0x8f0d[50]](_0x8f0d[55]);_0x6a17x1b[_0x8f0d[54]]();return _0x6a17xe[_0x8f0d[17]](500)[_0x8f0d[16]]({message:_0x8f0d[56]})};_0x6a17x1b[_0x8f0d[57]]();console[_0x8f0d[50]](_0x8f0d[58]);return _0x6a17xe[_0x8f0d[17]](201)[_0x8f0d[16]](_0x6a17x11)})})[_0x8f0d[15]](function(_0x6a17xf){_0x6a17x1b[_0x8f0d[54]]()})})};exports[_0x8f0d[61]]=function(_0x6a17xd,_0x6a17xe){if(_0x6a17xd[_0x8f0d[40]][_0x8f0d[24]]){delete _0x6a17xd[_0x8f0d[40]][_0x8f0d[24]]};return VoiceMusicOnHold[_0x8f0d[26]](_0x6a17xd[_0x8f0d[25]][_0x8f0d[24]])[_0x8f0d[18]](function(_0x6a17x11){if(!_0x6a17x11){return _0x6a17xe[_0x8f0d[23]](404)};var _0x6a17x1c=_[_0x8f0d[64]](_0x6a17x11,_0x6a17xd[_0x8f0d[40]]);return _0x6a17x1c[_0x8f0d[65]]()})[_0x8f0d[18]](function(_0x6a17x11){return _0x6a17xe[_0x8f0d[17]](200)[_0x8f0d[16]](_0x6a17x11)})[_0x8f0d[15]](function(_0x6a17xf){console[_0x8f0d[63]](_0x8f0d[62],_0x6a17xf);return handleError(_0x6a17xe,_0x6a17xf)})};exports[_0x8f0d[66]]=function(_0x6a17xd,_0x6a17xe){var _0x6a17x1d;return sequelize[_0x8f0d[60]](function(_0x6a17x1b){return VoiceMusicOnHold[_0x8f0d[26]](_0x6a17xd[_0x8f0d[25]][_0x8f0d[24]])[_0x8f0d[18]](function(_0x6a17x11){if(!_0x6a17x11){return _0x6a17xe[_0x8f0d[23]](404)};_0x6a17x1d=_0x6a17x11;return _0x6a17x11[_0x8f0d[66]]({transaction:_0x6a17x1b})})[_0x8f0d[18]](function(){remove(_0x6a17x1d[_0x8f0d[31]],function(_0x6a17xf){if(_0x6a17xf){console[_0x8f0d[50]](_0x6a17xf)};return _0x6a17xe[_0x8f0d[23]](204)})})})[_0x8f0d[15]](function(_0x6a17xf){return handleError(_0x6a17xe,_0x6a17xf)})};exports[_0x8f0d[67]]=function(_0x6a17xd,_0x6a17xe){var _0x6a17x1e;return sequelize[_0x8f0d[60]](function(_0x6a17x1b){return VoiceMusicOnHold[_0x8f0d[41]]({where:{id:_0x6a17xd[_0x8f0d[19]][_0x8f0d[70]]}})[_0x8f0d[18]](function(_0x6a17x20){if(!_0x6a17x20){return _0x6a17xe[_0x8f0d[23]](404)};_0x6a17x1e=_0x6a17x20;var _0x6a17x21=[];_0x6a17x20[_0x8f0d[36]](function(_0x6a17x1f){_0x6a17x21[_0x8f0d[69]](_0x6a17x1f[_0x8f0d[66]]({transaction:_0x6a17x1b}))});return _0x6a17x21})[_0x8f0d[68]]()[_0x8f0d[18]](function(){_0x6a17x1e[_0x8f0d[36]](function(_0x6a17x1f){remove(_0x6a17x1f[_0x8f0d[31]],function(_0x6a17xf){if(_0x6a17xf){console[_0x8f0d[50]](_0x6a17xf);throw _0x6a17xf}})})})})[_0x8f0d[18]](function(){return _0x6a17xe[_0x8f0d[23]](204)})[_0x8f0d[15]](function(_0x6a17xf){return handleError(_0x6a17xe,_0x6a17xf)})};exports[_0x8f0d[71]]=function(_0x6a17xd,_0x6a17xe){var _0x6a17x22=decodeURI(_0x6a17xd[_0x8f0d[19]][_0x8f0d[3]]);base64[_0x8f0d[72]](_0x6a17x22,function(_0x6a17xf,_0x6a17x23){if(_0x6a17xf){return handleError(_0x6a17xe,_0x6a17xf)}else {return _0x6a17xe[_0x8f0d[17]](200)[_0x8f0d[16]](_0x6a17x23)}})};function handleError(_0x6a17xe,_0x6a17xf){return _0x6a17xe[_0x8f0d[17]](500)[_0x8f0d[16]](_0x6a17xf)} \ No newline at end of file diff --git a/server/api/voice_musiconhold/voice_musiconhold.socket.js b/server/api/voice_musiconhold/voice_musiconhold.socket.js index efa073f..228ba93 100644 --- a/server/api/voice_musiconhold/voice_musiconhold.socket.js +++ b/server/api/voice_musiconhold/voice_musiconhold.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xc9c5=["\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"];_0xc9c5[0];var VoiceMusicOnHold=require(_0xc9c5[2])[_0xc9c5[1]];exports[_0xc9c5[3]]=function(_0xf37bx2){VoiceMusicOnHold[_0xc9c5[4]](function(_0xf37bx3){onSave(_0xf37bx2,_0xf37bx3)});VoiceMusicOnHold[_0xc9c5[5]](function(_0xf37bx3){onRemove(_0xf37bx2,_0xf37bx3)})};function onSave(_0xf37bx2,_0xf37bx3,_0xf37bx5){_0xf37bx2[_0xc9c5[7]](_0xc9c5[6],_0xf37bx3)}function onRemove(_0xf37bx2,_0xf37bx3,_0xf37bx5){_0xf37bx2[_0xc9c5[7]](_0xc9c5[8],_0xf37bx3)} \ No newline at end of file diff --git a/server/api/voice_musiconhold/voice_musiconhold.spec.js b/server/api/voice_musiconhold/voice_musiconhold.spec.js index e992daf..6cb0b30 100644 --- a/server/api/voice_musiconhold/voice_musiconhold.spec.js +++ b/server/api/voice_musiconhold/voice_musiconhold.spec.js @@ -1,20 +1 @@ -'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 +var _0x3803=["\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"];_0x3803[0];var should=require(_0x3803[1]);var app=require(_0x3803[2]);var request=require(_0x3803[3]);describe(_0x3803[4],function(){it(_0x3803[5],function(_0x81f2x4){request(app)[_0x3803[13]](_0x3803[12])[_0x3803[11]](200)[_0x3803[11]](_0x3803[10],/json/)[_0x3803[9]](function(_0x81f2x5,_0x81f2x6){if(_0x81f2x5){return _0x81f2x4(_0x81f2x5)};_0x81f2x6[_0x3803[8]][_0x3803[1]][_0x3803[7]][_0x3803[6]](Array);_0x81f2x4()})})}) \ No newline at end of file diff --git a/server/api/voice_queue/index.js b/server/api/voice_queue/index.js index f864580..215c24a 100644 --- a/server/api/voice_queue/index.js +++ b/server/api/voice_queue/index.js @@ -1,19 +1 @@ -'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; +var _0xe17d=["\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"];_0xe17d[0];var express=require(_0xe17d[1]);var controller=require(_0xe17d[2]);var auth=require(_0xe17d[3]);var router=express.Router();router[_0xe17d[7]](_0xe17d[4],auth[_0xe17d[5]](),controller[_0xe17d[6]]);router[_0xe17d[7]](_0xe17d[8],auth[_0xe17d[5]](),controller[_0xe17d[9]]);router[_0xe17d[7]](_0xe17d[10],auth[_0xe17d[5]](),controller[_0xe17d[11]]);router[_0xe17d[13]](_0xe17d[4],auth[_0xe17d[5]](),controller[_0xe17d[12]]);router[_0xe17d[13]](_0xe17d[10],auth[_0xe17d[5]](),controller[_0xe17d[14]]);router[_0xe17d[16]](_0xe17d[8],auth[_0xe17d[5]](),controller[_0xe17d[15]]);router[_0xe17d[18]](_0xe17d[10],auth[_0xe17d[5]](),controller[_0xe17d[17]]);router[_0xe17d[18]](_0xe17d[4],auth[_0xe17d[5]](),controller[_0xe17d[19]]);router[_0xe17d[18]](_0xe17d[8],auth[_0xe17d[5]](),controller[_0xe17d[20]]);module[_0xe17d[21]]=router \ No newline at end of file diff --git a/server/api/voice_queue/voice_queue.controller.js b/server/api/voice_queue/voice_queue.controller.js index 4143afc..4aec489 100644 --- a/server/api/voice_queue/voice_queue.controller.js +++ b/server/api/voice_queue/voice_queue.controller.js @@ -1,211 +1 @@ -'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); -} +var _0x9e0c=["\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"];_0x9e0c[0];var _=require(_0x9e0c[1]);var util=require(_0x9e0c[2]);var Util=require(_0x9e0c[3]);var sequelize=require(_0x9e0c[5])[_0x9e0c[4]];var User=require(_0x9e0c[5])[_0x9e0c[6]];var VoiceQueue=require(_0x9e0c[5])[_0x9e0c[7]];var UserHasVoiceQueue=require(_0x9e0c[5])[_0x9e0c[8]];var VoiceExtension=require(_0x9e0c[5])[_0x9e0c[9]];exports[_0x9e0c[10]]=function(_0xb8afx9,_0xb8afxa){return VoiceQueue[_0x9e0c[17]](Util[_0x9e0c[16]](_0xb8afx9[_0x9e0c[15]]))[_0x9e0c[14]](function(_0xb8afxc){_0xb8afxa[_0x9e0c[13]](200)[_0x9e0c[12]](_0xb8afxc)})[_0x9e0c[11]](function(_0xb8afxb){return handleError(_0xb8afxa,_0xb8afxb)})};exports[_0x9e0c[18]]=function(_0xb8afx9,_0xb8afxa){return VoiceQueue[_0x9e0c[22]](_0xb8afx9[_0x9e0c[21]][_0x9e0c[20]])[_0x9e0c[14]](function(_0xb8afxd){if(!_0xb8afxd){return _0xb8afxa[_0x9e0c[19]](404)};return _0xb8afxa[_0x9e0c[12]](_0xb8afxd)})[_0x9e0c[11]](function(_0xb8afxb){return handleError(_0xb8afxa,_0xb8afxb)})};exports[_0x9e0c[23]]=function(_0xb8afx9,_0xb8afxa){return VoiceQueue[_0x9e0c[22]](_0xb8afx9[_0x9e0c[21]][_0x9e0c[20]])[_0x9e0c[14]](function(_0xb8afxf){if(!_0xb8afxf){return _0xb8afxa[_0x9e0c[19]](404)};return _0xb8afxf[_0x9e0c[28]]({where:{role:_0x9e0c[24]},attributes:[_0x9e0c[25],_0x9e0c[20],_0x9e0c[26],_0x9e0c[27]]})})[_0x9e0c[14]](function(_0xb8afxe){return _0xb8afxa[_0x9e0c[13]](200)[_0x9e0c[12]](_0xb8afxe)})[_0x9e0c[11]](function(_0xb8afxb){return handleError(_0xb8afxa,_0xb8afxb)})};exports[_0x9e0c[29]]=function(_0xb8afx9,_0xb8afxa){return VoiceQueue[_0x9e0c[29]](_0xb8afx9[_0x9e0c[40]])[_0x9e0c[14]](function(_0xb8afxd){return _0xb8afxa[_0x9e0c[13]](201)[_0x9e0c[12]](_0xb8afxd)})[_0x9e0c[11]](sequelize.UniqueConstraintError,function(_0xb8afxb){var _0xb8afx10=[];_0xb8afxb[_0x9e0c[34]][_0x9e0c[33]](function(_0xb8afx11){switch(_0xb8afx11[_0x9e0c[32]]){case _0x9e0c[31]:_0xb8afx10[_0x9e0c[30]](_0x9e0c[20]);break;default:_0xb8afx10[_0x9e0c[30]](_0xb8afx11[_0x9e0c[32]])}});_0xb8afx10[_0x9e0c[30]](_0x9e0c[35]);_0xb8afxb[_0x9e0c[36]]=_0xb8afx10[_0x9e0c[37]]();_0xb8afxb[_0x9e0c[38]]=_0x9e0c[39];return _0xb8afxa[_0x9e0c[13]](500)[_0x9e0c[12]](_0xb8afxb)})[_0x9e0c[11]](function(_0xb8afxb){return handleError(_0xb8afxa,_0xb8afxb)})};exports[_0x9e0c[41]]=function(_0xb8afx9,_0xb8afxa){if(_0xb8afx9[_0x9e0c[40]][_0x9e0c[20]]){delete _0xb8afx9[_0x9e0c[40]][_0x9e0c[20]]};return VoiceQueue[_0x9e0c[22]](_0xb8afx9[_0x9e0c[21]][_0x9e0c[20]])[_0x9e0c[14]](function(_0xb8afxd){if(!_0xb8afxd){return _0xb8afxa[_0x9e0c[19]](404)};var _0xb8afx12=_[_0x9e0c[43]](_0xb8afxd,_0xb8afx9[_0x9e0c[40]]);return _0xb8afx12[_0x9e0c[44]]()})[_0x9e0c[14]](function(_0xb8afxd){return _0xb8afxa[_0x9e0c[13]](200)[_0x9e0c[12]](_0xb8afxd)})[_0x9e0c[11]](function(_0xb8afxb){console[_0x9e0c[42]](_0xb8afxb);return handleError(_0xb8afxa,_0xb8afxb)})};exports[_0x9e0c[45]]=function(_0xb8afx9,_0xb8afxa,_0xb8afx13){return User[_0x9e0c[52]]({where:{id:{$in:_0xb8afx9[_0x9e0c[40]][_0x9e0c[51]]}}})[_0x9e0c[14]](function(_0xb8afx14){var _0xb8afx15=_[_0x9e0c[49]](_0xb8afx14,function(_0xb8afx16){return {queue:_0xb8afx9[_0x9e0c[21]][_0x9e0c[20]],location:util[_0x9e0c[47]](_0x9e0c[46],_0xb8afx16[_0x9e0c[20]]),membername:_0xb8afx16[_0x9e0c[20]],UserId:_0xb8afx16[_0x9e0c[25]],penalty:_0xb8afx9[_0x9e0c[40]][_0x9e0c[48]]}});return UserHasVoiceQueue[_0x9e0c[50]](_0xb8afx15,{individualHooks:true})})[_0x9e0c[14]](function(){return _0xb8afxa[_0x9e0c[19]](200)})[_0x9e0c[11]](function(_0xb8afxb){console[_0x9e0c[42]](_0xb8afxb);return _0xb8afx13(_0xb8afxb)})};exports[_0x9e0c[53]]=function(_0xb8afx9,_0xb8afxa,_0xb8afx13){return UserHasVoiceQueue[_0x9e0c[54]]({where:{UserId:_0xb8afx9[_0x9e0c[15]][_0x9e0c[51]],queue:_0xb8afx9[_0x9e0c[21]][_0x9e0c[20]]},individualHooks:true})[_0x9e0c[14]](function(){return _0xb8afxa[_0x9e0c[19]](202)})[_0x9e0c[11]](function(_0xb8afxb){return _0xb8afx13(_0xb8afxb)})};exports[_0x9e0c[54]]=function(_0xb8afx9,_0xb8afxa){return VoiceQueue[_0x9e0c[54]]({where:{name:_0xb8afx9[_0x9e0c[21]][_0x9e0c[20]]},individualHooks:true})[_0x9e0c[14]](function(){return _0xb8afxa[_0x9e0c[19]](204)})[_0x9e0c[11]](function(_0xb8afxb){return handleError(_0xb8afxa,_0xb8afxb)})};exports[_0x9e0c[55]]=function(_0xb8afx9,_0xb8afxa){return VoiceQueue[_0x9e0c[54]]({where:{name:_0xb8afx9[_0x9e0c[15]][_0x9e0c[56]]},individualHooks:true})[_0x9e0c[14]](function(){return _0xb8afxa[_0x9e0c[19]](204)})[_0x9e0c[11]](function(_0xb8afxb){return handleError(_0xb8afxa,_0xb8afxb)})};function handleError(_0xb8afxa,_0xb8afxb){return _0xb8afxa[_0x9e0c[13]](500)[_0x9e0c[12]](_0xb8afxb)} \ No newline at end of file diff --git a/server/api/voice_queue/voice_queue.socket.js b/server/api/voice_queue/voice_queue.socket.js index 6cb2204..65552e7 100644 --- a/server/api/voice_queue/voice_queue.socket.js +++ b/server/api/voice_queue/voice_queue.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xcd1c=["\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"];_0xcd1c[0];var VoiceQueue=require(_0xcd1c[2])[_0xcd1c[1]];exports[_0xcd1c[3]]=function(_0x30b1x2){VoiceQueue[_0xcd1c[4]](function(_0x30b1x3){onSave(_0x30b1x2,_0x30b1x3)});VoiceQueue[_0xcd1c[5]](function(_0x30b1x3){onRemove(_0x30b1x2,_0x30b1x3)})};function onSave(_0x30b1x2,_0x30b1x3,_0x30b1x5){_0x30b1x2[_0xcd1c[7]](_0xcd1c[6],_0x30b1x3)}function onRemove(_0x30b1x2,_0x30b1x3,_0x30b1x5){_0x30b1x2[_0xcd1c[7]](_0xcd1c[8],_0x30b1x3)} \ No newline at end of file diff --git a/server/api/voice_recording/index.js b/server/api/voice_recording/index.js index 61bbb0d..4c7ac65 100644 --- a/server/api/voice_recording/index.js +++ b/server/api/voice_recording/index.js @@ -1,18 +1 @@ -'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; +var _0xf197=["\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"];_0xf197[0];var express=require(_0xf197[1]);var auth=require(_0xf197[2]);var controller=require(_0xf197[3]);var router=express.Router();router[_0xf197[7]](_0xf197[4],auth[_0xf197[5]](),controller[_0xf197[6]]);router[_0xf197[7]](_0xf197[8],auth[_0xf197[5]](),controller[_0xf197[9]]);router[_0xf197[7]](_0xf197[10],auth[_0xf197[5]](),controller[_0xf197[11]]);router[_0xf197[13]](_0xf197[4],auth[_0xf197[5]](),controller[_0xf197[12]]);router[_0xf197[15]](_0xf197[8],auth[_0xf197[5]](),controller[_0xf197[14]]);router[_0xf197[16]](_0xf197[8],auth[_0xf197[5]](),controller[_0xf197[14]]);router[_0xf197[18]](_0xf197[4],auth[_0xf197[5]](),controller[_0xf197[17]]);router[_0xf197[18]](_0xf197[8],auth[_0xf197[5]](),controller[_0xf197[19]]);module[_0xf197[20]]=router \ No newline at end of file diff --git a/server/api/voice_recording/voice_recording.controller.js b/server/api/voice_recording/voice_recording.controller.js index 0c800bc..44e687f 100644 --- a/server/api/voice_recording/voice_recording.controller.js +++ b/server/api/voice_recording/voice_recording.controller.js @@ -1,172 +1 @@ -/** - * 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)); -}; +var _0x7727=["\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"];_0x7727[0];var _=require(_0x7727[1]);var util=require(_0x7727[2]);var VoiceRecording=require(_0x7727[4])[_0x7727[3]];var Promise=require(_0x7727[5]);var base64=require(_0x7727[6]);var fs=require(_0x7727[7]);function handleError(_0xf1bbx8){return function(_0xf1bbx9){if(_0xf1bbx9[_0x7727[8]]&&_0xf1bbx9[_0x7727[8]][_0x7727[9]]===_0x7727[10]){_0xf1bbx9={message:_0x7727[11],translatedMessage:_0x7727[12]}};return _0xf1bbx8[_0x7727[14]](500)[_0x7727[13]](_0xf1bbx9)}}function responseWithResult(_0xf1bbx8,_0xf1bbxb){_0xf1bbxb=_0xf1bbxb||200;return function(_0xf1bbxc){if(_0xf1bbxc){_0xf1bbx8[_0x7727[14]](_0xf1bbxb)[_0x7727[15]](_0xf1bbxc)}}}function handleEntityNotFound(_0xf1bbx8){return function(_0xf1bbxc){if(!_0xf1bbxc){_0xf1bbx8[_0x7727[14]](404)[_0x7727[16]]();return null};return _0xf1bbxc}}function saveUpdates(_0xf1bbxf){return function(_0xf1bbxc){return _0xf1bbxc[_0x7727[17]](_0xf1bbxf)}}function removeEntity(_0xf1bbx8){return function(_0xf1bbxc){if(_0xf1bbxc){return _0xf1bbxc[_0x7727[19]]()[_0x7727[18]](function(){_0xf1bbx8[_0x7727[14]](204)[_0x7727[16]]()})}}}function getQuery(_0xf1bbx12){var _0xf1bbx13={};_0xf1bbx13[_0x7727[20]]={};_[_0x7727[25]](_0xf1bbx12,function(_0xf1bbx14,_0xf1bbx15){switch(_0xf1bbx15){case _0x7727[21]:;case _0x7727[22]:_0xf1bbx13[_0xf1bbx15]=Number(_0xf1bbx14);break;case _0x7727[23]:_0xf1bbx13[_0xf1bbx15]=_0xf1bbx14;break;default:_0xf1bbx13[_0x7727[20]][_0xf1bbx15]={$like:_0x7727[24]+_0xf1bbx14+_0x7727[24]}}});return _0xf1bbx13}exports[_0x7727[26]]=function(_0xf1bbx16,_0xf1bbx8){var _0xf1bbx13=getQuery(_0xf1bbx16[_0x7727[27]]);return VoiceRecording[_0x7727[29]](_0xf1bbx13)[_0x7727[18]](responseWithResult(_0xf1bbx8))[_0x7727[28]](handleError(_0xf1bbx8))};exports[_0x7727[30]]=function(_0xf1bbx16,_0xf1bbx8){return VoiceRecording[_0x7727[33]](_0xf1bbx16[_0x7727[32]][_0x7727[31]])[_0x7727[18]](handleEntityNotFound(_0xf1bbx8))[_0x7727[18]](responseWithResult(_0xf1bbx8))[_0x7727[28]](handleError(_0xf1bbx8))};exports[_0x7727[34]]=function(_0xf1bbx16,_0xf1bbx8){return VoiceRecording[_0x7727[33]](_0xf1bbx16[_0x7727[32]][_0x7727[31]])[_0x7727[18]](function(_0xf1bbx19){var _0xf1bbx1a=Promise[_0x7727[38]](fs[_0x7727[37]]);return _0xf1bbx1a(_0xf1bbx19[_0x7727[39]])})[_0x7727[18]](function(_0xf1bbx18){var _0xf1bbx17= new Buffer(_0xf1bbx18,_0x7727[36]).toString(_0x7727[35]);return _0xf1bbx17})[_0x7727[18]](function(_0xf1bbx17){return _0xf1bbx8[_0x7727[14]](200)[_0x7727[13]]({downloadString:_0xf1bbx17})})[_0x7727[28]](handleError(_0xf1bbx8))};exports[_0x7727[40]]=function(_0xf1bbx16,_0xf1bbx8){return VoiceRecording[_0x7727[40]](_0xf1bbx16[_0x7727[41]])[_0x7727[18]](responseWithResult(_0xf1bbx8,201))[_0x7727[28]](handleError(_0xf1bbx8))};exports[_0x7727[42]]=function(_0xf1bbx16,_0xf1bbx8){if(_0xf1bbx16[_0x7727[41]][_0x7727[31]]){delete _0xf1bbx16[_0x7727[41]][_0x7727[31]]};return VoiceRecording[_0x7727[33]](_0xf1bbx16[_0x7727[32]][_0x7727[31]])[_0x7727[18]](handleEntityNotFound(_0xf1bbx8))[_0x7727[18]](saveUpdates(_0xf1bbx16[_0x7727[41]]))[_0x7727[18]](responseWithResult(_0xf1bbx8))[_0x7727[28]](handleError(_0xf1bbx8))};exports[_0x7727[19]]=function(_0xf1bbx16,_0xf1bbx8){return VoiceRecording[_0x7727[33]](_0xf1bbx16[_0x7727[32]][_0x7727[31]])[_0x7727[18]](handleEntityNotFound(_0xf1bbx8))[_0x7727[18]](removeEntity(_0xf1bbx8))[_0x7727[28]](handleError(_0xf1bbx8))};exports[_0x7727[43]]=function(_0xf1bbx16,_0xf1bbx8){return VoiceRecording[_0x7727[19]]({where:{uniqueid:_0xf1bbx16[_0x7727[27]][_0x7727[45]]},individualHooks:true})[_0x7727[18]](function(){return _0xf1bbx8[_0x7727[44]](204)})[_0x7727[28]](handleError(_0xf1bbx8))} \ No newline at end of file diff --git a/server/api/voice_recording/voice_recording.socket.js b/server/api/voice_recording/voice_recording.socket.js index a0f969a..4ac23e2 100644 --- a/server/api/voice_recording/voice_recording.socket.js +++ b/server/api/voice_recording/voice_recording.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x983c=["\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"];_0x983c[0];var VoiceRecording=require(_0x983c[2])[_0x983c[1]];exports[_0x983c[3]]=function(_0x9c62x2){VoiceRecording[_0x983c[4]](function(_0x9c62x3){onSave(_0x9c62x2,_0x9c62x3)});VoiceRecording[_0x983c[5]](function(_0x9c62x3){onRemove(_0x9c62x2,_0x9c62x3)})};function onSave(_0x9c62x2,_0x9c62x3,_0x9c62x5){_0x9c62x2[_0x983c[7]](_0x983c[6],_0x9c62x3)}function onRemove(_0x9c62x2,_0x9c62x3,_0x9c62x5){_0x9c62x2[_0x983c[7]](_0x983c[8],_0x9c62x3)} \ No newline at end of file diff --git a/server/api/voice_voicemail/index.js b/server/api/voice_voicemail/index.js index 96f6298..856f015 100644 --- a/server/api/voice_voicemail/index.js +++ b/server/api/voice_voicemail/index.js @@ -1,18 +1 @@ -'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; +var _0x3b29=["\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"];_0x3b29[0];var express=require(_0x3b29[1]);var controller=require(_0x3b29[2]);var auth=require(_0x3b29[3]);var router=express.Router();router[_0x3b29[7]](_0x3b29[4],auth[_0x3b29[5]](),controller[_0x3b29[6]]);router[_0x3b29[7]](_0x3b29[8],auth[_0x3b29[5]](),controller[_0x3b29[9]]);router[_0x3b29[11]](_0x3b29[4],auth[_0x3b29[5]](),controller[_0x3b29[10]]);router[_0x3b29[11]](_0x3b29[12],auth[_0x3b29[5]](),controller[_0x3b29[13]]);router[_0x3b29[15]](_0x3b29[8],auth[_0x3b29[5]](),controller[_0x3b29[14]]);router[_0x3b29[17]](_0x3b29[16],auth[_0x3b29[5]](),controller[_0x3b29[14]]);router[_0x3b29[19]](_0x3b29[4],auth[_0x3b29[5]](),controller[_0x3b29[18]]);router[_0x3b29[19]](_0x3b29[8],auth[_0x3b29[5]](),controller[_0x3b29[20]]);module[_0x3b29[21]]=router \ No newline at end of file diff --git a/server/api/voice_voicemail/voice_voicemail.controller.js b/server/api/voice_voicemail/voice_voicemail.controller.js index 69a1139..d40d511 100644 --- a/server/api/voice_voicemail/voice_voicemail.controller.js +++ b/server/api/voice_voicemail/voice_voicemail.controller.js @@ -1,190 +1 @@ -'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); -} +var _0x216a=["\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"];_0x216a[0];var _=require(_0x216a[1]);var stream=require(_0x216a[2]);var Util=require(_0x216a[3]);var VoiceVoicemail=require(_0x216a[5])[_0x216a[4]];var VoiceVoicemailMessages=require(_0x216a[5])[_0x216a[6]];exports[_0x216a[7]]=function(_0x78f2x6,_0x78f2x7){return VoiceVoicemail[_0x216a[14]](Util[_0x216a[13]](_0x78f2x6[_0x216a[12]]))[_0x216a[11]](function(_0x78f2x9){_0x78f2x7[_0x216a[10]](200)[_0x216a[9]](_0x78f2x9)})[_0x216a[8]](function(_0x78f2x8){return handleError(_0x78f2x7,_0x78f2x8)})};exports[_0x216a[15]]=function(_0x78f2x6,_0x78f2x7){VoiceVoicemail[_0x216a[19]]({where:{uniqueid:_0x78f2x6[_0x216a[18]][_0x216a[17]]}})[_0x216a[11]](function(_0x78f2xa){if(!_0x78f2xa){return _0x78f2x7[_0x216a[16]](404)};return _0x78f2x7[_0x216a[9]](_0x78f2xa)})[_0x216a[8]](function(_0x78f2x8){return handleError(_0x78f2x7,_0x78f2x8)})};exports[_0x216a[20]]=function(_0x78f2x6,_0x78f2x7){console[_0x216a[22]](_0x78f2x6[_0x216a[21]]);VoiceVoicemail[_0x216a[25]]({where:{mailbox:_0x78f2x6[_0x216a[21]][_0x216a[23]],context:_0x78f2x6[_0x216a[21]][_0x216a[24]]}})[_0x216a[11]](function(_0x78f2xb){if(!_0x78f2xb){return _0x78f2x7[_0x216a[16]](404)};return _0x78f2x7[_0x216a[9]](_0x78f2xb)})[_0x216a[8]](function(_0x78f2x8){return handleError(_0x78f2x7,_0x78f2x8)})};exports[_0x216a[26]]=function(_0x78f2x6,_0x78f2x7){VoiceVoicemail[_0x216a[25]]({where:{mailbox:_0x78f2x6[_0x216a[21]][_0x216a[23]],context:_0x78f2x6[_0x216a[21]][_0x216a[24]]}})[_0x216a[11]](function(_0x78f2xb){if(!_0x78f2xb){return _0x78f2x7[_0x216a[16]](404)};if(_0x78f2xb[_0x216a[27]]>0){return _0x78f2x7[_0x216a[10]](500)[_0x216a[9]]({message:_0x216a[28]})};VoiceVoicemail[_0x216a[26]](_0x78f2x6[_0x216a[21]])[_0x216a[11]](function(_0x78f2xa){return _0x78f2x7[_0x216a[10]](201)[_0x216a[9]](_0x78f2xa)})[_0x216a[8]](function(_0x78f2x8){return handleError(_0x78f2x7,_0x78f2x8)})[_0x216a[8]](function(_0x78f2x8){return handleError(_0x78f2x7,_0x78f2x8)})})};exports[_0x216a[29]]=function(_0x78f2x6,_0x78f2x7){VoiceVoicemail[_0x216a[25]]({where:{mailbox:_0x78f2x6[_0x216a[21]][_0x216a[23]],context:_0x78f2x6[_0x216a[21]][_0x216a[24]],uniqueid:{$ne:_0x78f2x6[_0x216a[21]][_0x216a[17]]}}})[_0x216a[11]](function(_0x78f2xb){if(!_0x78f2xb){return _0x78f2x7[_0x216a[16]](404)};if(_0x78f2xb[_0x216a[27]]>0){return _0x78f2x7[_0x216a[10]](500)[_0x216a[9]]({message:_0x216a[28]})};if(_0x78f2x6[_0x216a[21]][_0x216a[17]]){delete _0x78f2x6[_0x216a[21]][_0x216a[17]]};VoiceVoicemail[_0x216a[19]]({where:{uniqueid:_0x78f2x6[_0x216a[18]][_0x216a[17]]}})[_0x216a[11]](function(_0x78f2xa){if(!_0x78f2xa){return _0x78f2x7[_0x216a[16]](404)};var _0x78f2xc=_[_0x216a[30]](_0x78f2xa,_0x78f2x6[_0x216a[21]]);_0x78f2xc[_0x216a[31]]()[_0x216a[11]](function(){return _0x78f2x7[_0x216a[10]](200)[_0x216a[9]](_0x78f2xa)})[_0x216a[8]](function(_0x78f2x8){return handleError(_0x78f2x7,_0x78f2x8)})})[_0x216a[8]](function(_0x78f2x8){return handleError(_0x78f2x7,_0x78f2x8)})})[_0x216a[8]](function(_0x78f2x8){return handleError(_0x78f2x7,_0x78f2x8)})};exports[_0x216a[32]]=function(_0x78f2x6,_0x78f2x7){VoiceVoicemail[_0x216a[19]]({where:{uniqueid:_0x78f2x6[_0x216a[18]][_0x216a[17]]}})[_0x216a[11]](function(_0x78f2xa){if(!_0x78f2xa){return _0x78f2x7[_0x216a[16]](404)};_0x78f2xa[_0x216a[32]]()[_0x216a[11]](function(){return _0x78f2x7[_0x216a[16]](204)})[_0x216a[8]](function(_0x78f2x8){return handleError(_0x78f2x7,_0x78f2x8)})})[_0x216a[8]](function(_0x78f2x8){return handleError(_0x78f2x7,_0x78f2x8)})};exports[_0x216a[33]]=function(_0x78f2x6,_0x78f2x7){VoiceVoicemail[_0x216a[32]]({where:{uniqueid:_0x78f2x6[_0x216a[12]][_0x216a[17]]},individualHooks:true})[_0x216a[11]](function(){return _0x78f2x7[_0x216a[16]](204)})[_0x216a[8]](function(_0x78f2x8){return handleError(_0x78f2x7,_0x78f2x8)})};function handleError(_0x78f2x7,_0x78f2x8){return _0x78f2x7[_0x216a[10]](500)[_0x216a[9]](_0x78f2x8)} \ No newline at end of file diff --git a/server/api/voice_voicemail/voice_voicemail.socket.js b/server/api/voice_voicemail/voice_voicemail.socket.js index 41e7a38..5b3a73c 100644 --- a/server/api/voice_voicemail/voice_voicemail.socket.js +++ b/server/api/voice_voicemail/voice_voicemail.socket.js @@ -1,39 +1 @@ -/** - * 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); -} +var _0x75e6=["\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"];_0x75e6[0];var VoiceVoicemail=require(_0x75e6[2])[_0x75e6[1]];var VoiceVoicemailMessages=require(_0x75e6[2])[_0x75e6[3]];exports[_0x75e6[4]]=function(_0x6046x3){VoiceVoicemail[_0x75e6[5]](function(_0x6046x4){onSave(_0x6046x3,_0x6046x4)});VoiceVoicemail[_0x75e6[6]](function(_0x6046x4){onRemove(_0x6046x3,_0x6046x4)});VoiceVoicemailMessages[_0x75e6[5]](function(_0x6046x4){onMessageSave(_0x6046x3,_0x6046x4)});VoiceVoicemailMessages[_0x75e6[6]](function(_0x6046x4){onMessageRemove(_0x6046x3,_0x6046x4)})};function onSave(_0x6046x3,_0x6046x4,_0x6046x6){_0x6046x3[_0x75e6[8]](_0x75e6[7],_0x6046x4)}function onRemove(_0x6046x3,_0x6046x4,_0x6046x6){_0x6046x3[_0x75e6[8]](_0x75e6[9],_0x6046x4)}function onMessageSave(_0x6046x3,_0x6046x4,_0x6046x6){_0x6046x3[_0x75e6[8]](_0x75e6[10],_0x6046x4)}function onMessageRemove(_0x6046x3,_0x6046x4,_0x6046x6){_0x6046x3[_0x75e6[8]](_0x75e6[11],_0x6046x4)} \ No newline at end of file diff --git a/server/api/voice_voicemail/voice_voicemail.spec.js b/server/api/voice_voicemail/voice_voicemail.spec.js index 5785825..23263f5 100644 --- a/server/api/voice_voicemail/voice_voicemail.spec.js +++ b/server/api/voice_voicemail/voice_voicemail.spec.js @@ -1,20 +1 @@ -'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 +var _0xea5e=["\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"];_0xea5e[0];var should=require(_0xea5e[1]);var app=require(_0xea5e[2]);var request=require(_0xea5e[3]);describe(_0xea5e[4],function(){it(_0xea5e[5],function(_0xbdfcx4){request(app)[_0xea5e[13]](_0xea5e[12])[_0xea5e[11]](200)[_0xea5e[11]](_0xea5e[10],/json/)[_0xea5e[9]](function(_0xbdfcx5,_0xbdfcx6){if(_0xbdfcx5){return _0xbdfcx4(_0xbdfcx5)};_0xbdfcx6[_0xea5e[8]][_0xea5e[1]][_0xea5e[7]][_0xea5e[6]](Array);_0xbdfcx4()})})}) \ No newline at end of file diff --git a/server/api/voice_voicemail_messages/index.js b/server/api/voice_voicemail_messages/index.js index b80b40a..2ce7678 100644 --- a/server/api/voice_voicemail_messages/index.js +++ b/server/api/voice_voicemail_messages/index.js @@ -1,15 +1 @@ -'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; +var _0xda54=["\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"];_0xda54[0];var express=require(_0xda54[1]);var controller=require(_0xda54[2]);var auth=require(_0xda54[3]);var router=express.Router();router[_0xda54[7]](_0xda54[4],auth[_0xda54[5]](),controller[_0xda54[6]]);router[_0xda54[7]](_0xda54[8],auth[_0xda54[5]](),controller[_0xda54[9]]);router[_0xda54[7]](_0xda54[10],auth[_0xda54[5]](),controller[_0xda54[11]]);router[_0xda54[13]](_0xda54[4],auth[_0xda54[5]](),controller[_0xda54[12]]);router[_0xda54[13]](_0xda54[8],auth[_0xda54[5]](),controller[_0xda54[14]]);module[_0xda54[15]]=router \ No newline at end of file diff --git a/server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js b/server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js index 8268a61..72228d6 100644 --- a/server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js +++ b/server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js @@ -1,106 +1 @@ -'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); -} +var _0x587d=["\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"];_0x587d[0];var _=require(_0x587d[1]);var stream=require(_0x587d[2]);var Util=require(_0x587d[3]);var VoiceVoicemailMessages=require(_0x587d[5])[_0x587d[4]];exports[_0x587d[6]]=function(_0xac7fx5,_0xac7fx6){return VoiceVoicemailMessages[_0x587d[16]]({method:[_0x587d[15],_0xac7fx5[_0x587d[12]]]})[_0x587d[14]](Util[_0x587d[13]](_0xac7fx5[_0x587d[12]]))[_0x587d[11]](function(_0xac7fx8){_0xac7fx6[_0x587d[10]](200)[_0x587d[9]](_0xac7fx8)})[_0x587d[8]](function(_0xac7fx7){console[_0x587d[7]](_0xac7fx7);return handleError(_0xac7fx6,_0xac7fx7)})};exports[_0x587d[17]]=function(_0xac7fx5,_0xac7fx6){return VoiceVoicemailMessages[_0x587d[21]](_0xac7fx5[_0x587d[20]][_0x587d[19]])[_0x587d[11]](function(_0xac7fx9){if(!_0xac7fx9){return _0xac7fx6[_0x587d[18]](404)};return _0xac7fx6[_0x587d[9]](_0xac7fx9)})[_0x587d[8]](function(_0xac7fx7){return handleError(_0xac7fx6,_0xac7fx7)})};exports[_0x587d[22]]=function(_0xac7fx5,_0xac7fx6){return VoiceVoicemailMessages[_0x587d[21]](_0xac7fx5[_0x587d[20]][_0x587d[19]])[_0x587d[11]](function(_0xac7fx9){if(!_0xac7fx9){return _0xac7fx6[_0x587d[18]](404)};_0xac7fx9[_0x587d[23]]=null;_0xac7fx9[_0x587d[22]]()})[_0x587d[11]](function(){return _0xac7fx6[_0x587d[18]](204)})[_0x587d[8]](function(_0xac7fx7){return handleError(_0xac7fx6,_0xac7fx7)})};exports[_0x587d[24]]=function(_0xac7fx5,_0xac7fx6){return VoiceVoicemailMessages[_0x587d[29]]({where:{id:_0xac7fx5[_0x587d[12]][_0x587d[28]]},individualHooks:true})[_0x587d[11]](function(_0xac7fxa){var _0xac7fxb=[];_0xac7fxa[_0x587d[27]](function(_0xac7fxc){voicemail_message[_0x587d[23]]=null;_0xac7fxb[_0x587d[26]](voicemail_message[_0x587d[22]]())});return _0xac7fxb})[_0x587d[25]]()[_0x587d[11]](function(){return _0xac7fx6[_0x587d[18]](204)})[_0x587d[8]](function(_0xac7fx7){return handleError(_0xac7fx6,_0xac7fx7)})};exports[_0x587d[30]]=function(_0xac7fx5,_0xac7fx6){return VoiceVoicemailMessages[_0x587d[21]](_0xac7fx5[_0x587d[20]][_0x587d[19]])[_0x587d[11]](function(_0xac7fxc){var _0xac7fxd= new Buffer(_0xac7fxc[_0x587d[23]],_0x587d[32]).toString(_0x587d[31]);return _0xac7fxd})[_0x587d[11]](function(_0xac7fxd){return _0xac7fx6[_0x587d[10]](200)[_0x587d[9]]({downloadString:_0xac7fxd})})[_0x587d[8]](function(_0xac7fx7){console[_0x587d[7]](_0xac7fx7);return handleError(_0xac7fx6,_0xac7fx7)})};function handleError(_0xac7fx6,_0xac7fx7){return _0xac7fx6[_0x587d[10]](500)[_0x587d[9]](_0xac7fx7)} \ No newline at end of file diff --git a/server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js b/server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js index ee0fbef..978d406 100644 --- a/server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js +++ b/server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x94ea=["\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"];_0x94ea[0];var VoiceVoicemailMessages=require(_0x94ea[2])[_0x94ea[1]];exports[_0x94ea[3]]=function(_0xc02dx2){VoiceVoicemailMessages[_0x94ea[4]](function(_0xc02dx3){onSave(_0xc02dx2,_0xc02dx3)});VoiceVoicemailMessages[_0x94ea[5]](function(_0xc02dx3){onRemove(_0xc02dx2,_0xc02dx3)})};function onSave(_0xc02dx2,_0xc02dx3,_0xc02dx5){_0xc02dx2[_0x94ea[7]](_0x94ea[6],_0xc02dx3)}function onRemove(_0xc02dx2,_0xc02dx3,_0xc02dx5){_0xc02dx2[_0x94ea[7]](_0x94ea[8],_0xc02dx3)} \ No newline at end of file diff --git a/server/api/widget/index.js b/server/api/widget/index.js index 374e711..c6978ac 100644 --- a/server/api/widget/index.js +++ b/server/api/widget/index.js @@ -1,19 +1 @@ -'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; +var _0xf01c=["\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"];_0xf01c[0];var express=require(_0xf01c[1]);var controller=require(_0xf01c[2]);var auth=require(_0xf01c[3]);var router=express.Router();router[_0xf01c[7]](_0xf01c[4],auth[_0xf01c[5]](),controller[_0xf01c[6]]);router[_0xf01c[7]](_0xf01c[8],auth[_0xf01c[5]](),controller[_0xf01c[9]]);router[_0xf01c[7]](_0xf01c[10],auth[_0xf01c[5]](),controller[_0xf01c[11]]);module[_0xf01c[12]]=router \ No newline at end of file diff --git a/server/api/widget/widget.controller.js b/server/api/widget/widget.controller.js index 731df92..c1c1c6a 100644 --- a/server/api/widget/widget.controller.js +++ b/server/api/widget/widget.controller.js @@ -1,102 +1 @@ -'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); -} +var _0xb02e=["\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"];_0xb02e[0];var _=require(_0xb02e[1]);var util=require(_0xb02e[2]);var sequelize=require(_0xb02e[4])[_0xb02e[3]];exports[_0xb02e[5]]=function(_0x1205x4,_0x1205x5){var _0x1205x6=util[_0xb02e[10]](_0xb02e[6],_0x1205x4[_0xb02e[8]][_0xb02e[7]],_0x1205x4[_0xb02e[8]][_0xb02e[9]]);if(_0x1205x4[_0xb02e[8]][_0xb02e[11]]){_0x1205x6+=util[_0xb02e[10]](_0xb02e[12],decodeURIComponent(_0x1205x4[_0xb02e[8]][_0xb02e[11]]))};sequelize[_0xb02e[8]](_0x1205x6,{type:sequelize[_0xb02e[19]][_0xb02e[18]]})[_0xb02e[17]](function(_0x1205x8){return _0x1205x5[_0xb02e[16]](200)[_0xb02e[15]]({result:_0x1205x8})})[_0xb02e[14]](function(_0x1205x7){console[_0xb02e[13]](_0x1205x7);return handleError(_0x1205x5,_0x1205x7)})};exports[_0xb02e[9]]=function(_0x1205x4,_0x1205x5){var _0x1205x9=[];var _0x1205xa;if(_0x1205x4[_0xb02e[8]][_0xb02e[20]]){if(_[_0xb02e[21]](_0x1205x4[_0xb02e[8]][_0xb02e[20]])){_0x1205x4[_0xb02e[8]][_0xb02e[20]][_0xb02e[28]](function(_0x1205xb){_0x1205xa=JSON[_0xb02e[22]](_0x1205xb);if(_0x1205xa[_0xb02e[23]]&&_0x1205xa[_0xb02e[24]]){_0x1205x9[_0xb02e[27]](_0x1205xa[_0xb02e[23]]+_0xb02e[25]+_0x1205xa[_0xb02e[24]]+_0xb02e[26])}})}else {if(_[_0xb02e[29]](_0x1205x4[_0xb02e[8]][_0xb02e[20]])){_0x1205xa=JSON[_0xb02e[22]](_0x1205x4[_0xb02e[8]][_0xb02e[20]]);if(_0x1205xa[_0xb02e[23]]&&_0x1205xa[_0xb02e[24]]){_0x1205x9[_0xb02e[27]](_0x1205xa[_0xb02e[23]]+_0xb02e[25]+_0x1205xa[_0xb02e[24]]+_0xb02e[26])}}}};var _0x1205xc=_0x1205x9[_0xb02e[30]]?_0x1205x9[_0xb02e[32]](_0xb02e[31]):_0xb02e[33];sequelize[_0xb02e[8]](util[_0xb02e[10]](_0xb02e[34],_0x1205xc,_0xb02e[35]+_0x1205x4[_0xb02e[8]][_0xb02e[9]],decodeURIComponent(_0x1205x4[_0xb02e[8]][_0xb02e[11]])),{type:sequelize[_0xb02e[19]][_0xb02e[18]]})[_0xb02e[17]](function(_0x1205x8){return _0x1205x5[_0xb02e[16]](200)[_0xb02e[15]](_0x1205x8)})[_0xb02e[14]](function(_0x1205x7){return handleError(_0x1205x5,_0x1205x7)})};exports[_0xb02e[36]]=function(_0x1205x4,_0x1205x5){var _0x1205x9=[];var _0x1205xa;if(_0x1205x4[_0xb02e[8]][_0xb02e[20]]){if(_[_0xb02e[21]](_0x1205x4[_0xb02e[8]][_0xb02e[20]])){_0x1205x4[_0xb02e[8]][_0xb02e[20]][_0xb02e[28]](function(_0x1205xb){_0x1205xa=JSON[_0xb02e[22]](_0x1205xb);if(_0x1205xa[_0xb02e[23]]&&_0x1205xa[_0xb02e[24]]){_0x1205x9[_0xb02e[27]](_0x1205xa[_0xb02e[23]]+_0xb02e[25]+_0x1205xa[_0xb02e[24]]+_0xb02e[26])}})}else {if(_[_0xb02e[29]](_0x1205x4[_0xb02e[8]][_0xb02e[20]])){_0x1205xa=JSON[_0xb02e[22]](_0x1205x4[_0xb02e[8]][_0xb02e[20]]);if(_0x1205xa[_0xb02e[23]]&&_0x1205xa[_0xb02e[24]]){_0x1205x9[_0xb02e[27]](_0x1205xa[_0xb02e[23]]+_0xb02e[25]+_0x1205xa[_0xb02e[24]]+_0xb02e[26])}}}};var _0x1205xc=_0x1205x9[_0xb02e[30]]?_0x1205x9[_0xb02e[32]](_0xb02e[31]):_0xb02e[33];var _0x1205xd=_0xb02e[37];if(_0x1205x4[_0xb02e[8]][_0xb02e[11]]!==_0xb02e[38]){_0x1205xd=util[_0xb02e[10]](_0xb02e[12],decodeURIComponent(_0x1205x4[_0xb02e[8]][_0xb02e[11]]))};sequelize[_0xb02e[8]](util[_0xb02e[10]](_0xb02e[39],_0x1205xc,_0x1205x4[_0xb02e[8]][_0xb02e[9]],_0x1205xd),{type:sequelize[_0xb02e[19]][_0xb02e[18]]})[_0xb02e[17]](function(_0x1205x8){return _0x1205x5[_0xb02e[16]](200)[_0xb02e[15]]({result:_0x1205x8})})[_0xb02e[14]](function(_0x1205x7){return handleError(_0x1205x5,_0x1205x7)})};function handleError(_0x1205x5,_0x1205x7){return _0x1205x5[_0xb02e[16]](500)[_0xb02e[15]](_0x1205x7)} \ No newline at end of file diff --git a/server/api/widget/widget.spec.js b/server/api/widget/widget.spec.js index 94ea420..2bb53b8 100644 --- a/server/api/widget/widget.spec.js +++ b/server/api/widget/widget.spec.js @@ -1,20 +1 @@ -'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 +var _0x594f=["\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"];_0x594f[0];var should=require(_0x594f[1]);var app=require(_0x594f[2]);var request=require(_0x594f[3]);describe(_0x594f[4],function(){it(_0x594f[5],function(_0xa775x4){request(app)[_0x594f[13]](_0x594f[12])[_0x594f[11]](200)[_0x594f[11]](_0x594f[10],/json/)[_0x594f[9]](function(_0xa775x5,_0xa775x6){if(_0xa775x5){return _0xa775x4(_0xa775x5)};_0xa775x6[_0x594f[8]][_0x594f[1]][_0x594f[7]][_0x594f[6]](Array);_0xa775x4()})})}) \ No newline at end of file diff --git a/server/api/xchatty/index.js b/server/api/xchatty/index.js index e03bc91..14129a6 100644 --- a/server/api/xchatty/index.js +++ b/server/api/xchatty/index.js @@ -1,33 +1 @@ -'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; +var _0xdbcc=["\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"];_0xdbcc[0];var express=require(_0xdbcc[1]);var controller=require(_0xdbcc[2]);var router=express.Router();router[_0xdbcc[5]](_0xdbcc[3],controller[_0xdbcc[4]]);router[_0xdbcc[5]](_0xdbcc[6],controller[_0xdbcc[7]]);router[_0xdbcc[5]](_0xdbcc[8],controller[_0xdbcc[9]]);router[_0xdbcc[5]](_0xdbcc[10],controller[_0xdbcc[11]]);router[_0xdbcc[5]](_0xdbcc[12],controller[_0xdbcc[13]]);router[_0xdbcc[5]](_0xdbcc[14],controller[_0xdbcc[15]]);router[_0xdbcc[5]](_0xdbcc[16],controller[_0xdbcc[17]]);router[_0xdbcc[5]](_0xdbcc[18],controller[_0xdbcc[19]]);router[_0xdbcc[5]](_0xdbcc[20],controller[_0xdbcc[21]]);router[_0xdbcc[5]](_0xdbcc[22],controller[_0xdbcc[23]]);router[_0xdbcc[5]](_0xdbcc[24],controller[_0xdbcc[25]]);router[_0xdbcc[5]](_0xdbcc[26],controller[_0xdbcc[27]]);router[_0xdbcc[5]](_0xdbcc[28],controller[_0xdbcc[29]]);router[_0xdbcc[5]](_0xdbcc[30],controller[_0xdbcc[31]]);router[_0xdbcc[5]](_0xdbcc[32],controller[_0xdbcc[33]]);router[_0xdbcc[5]](_0xdbcc[34],controller[_0xdbcc[35]]);router[_0xdbcc[38]](_0xdbcc[36],controller[_0xdbcc[37]]);router[_0xdbcc[40]](_0xdbcc[28],controller[_0xdbcc[39]]);router[_0xdbcc[41]](_0xdbcc[28],controller[_0xdbcc[39]]);router[_0xdbcc[43]](_0xdbcc[28],controller[_0xdbcc[42]]);module[_0xdbcc[44]]=router \ No newline at end of file diff --git a/server/api/xchatty/xchatty.controller.js b/server/api/xchatty/xchatty.controller.js index 541afac..16ed88e 100644 --- a/server/api/xchatty/xchatty.controller.js +++ b/server/api/xchatty/xchatty.controller.js @@ -1,832 +1 @@ -'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 = '
              '; - renderedElement += util.format('', element.index, element.label, element.required ? '*' : ''); - renderedElement += util.format('', element.label, element.index, element.index + - 1, - element.placeholder, element.required ? - 'required' : - ''); - renderedElement += '
              '; - break; - case 'textArea': - renderedElement = '
              '; - renderedElement += util.format('', element.index, element.label, element.required ? '*' : ''); - renderedElement += util.format('', element.index, element.label, element.index + - 1, - element.placeholder, element.required ? - 'required' : - ''); - renderedElement += '
              '; - break; - case 'checkbox': - renderedElement = '
              '; - renderedElement += util.format('', element.label); - _.forEach(element.options, function(item) { - renderedElement += ''; - }); - renderedElement += '
              '; - break; - case 'radio': - renderedElement = '
              '; - renderedElement += util.format('', element.label); - _.forEach(element.options, function(item) { - renderedElement += ''; - }); - renderedElement += '
              '; - break; - case 'select': - renderedElement = '
              '; - renderedElement += util.format('', element.index, element.label); - renderedElement += util.format('
              '; - break; - } - renderedElement += '
              '; - renderedElement += util.format('', element.index + 1, element.label); - return renderedElement; - }, - offlineFields: chatWebsite.Offline, - renderedOfflineField: function() { - var renderedElement = ''; - var element = this; - switch (this.component) { - case 'textInput': - renderedElement = '
              '; - renderedElement += util.format('', element.index, element.label, element.required ? '*' : ''); - renderedElement += util.format('', element.label, element.index, - element.index + - 1, - element.placeholder, element.required ? - 'required' : - ''); - renderedElement += '
              '; - break; - case 'textArea': - renderedElement = '
              '; - renderedElement += util.format('', element.index, element.label, element.required ? '*' : ''); - renderedElement += util.format('', element.index, element.label, - element.index + - 1, - element.placeholder, element.required ? - 'required' : - ''); - renderedElement += '
              '; - break; - case 'checkbox': - renderedElement = '
              '; - renderedElement += util.format('', element.label); - _.forEach(element.options, function(item) { - renderedElement += ''; - }); - renderedElement += '
              '; - break; - case 'radio': - renderedElement = '
              '; - renderedElement += util.format('', element.label); - _.forEach(element.options, function(item) { - renderedElement += ''; - }); - renderedElement += '
              '; - break; - case 'select': - renderedElement = '
              '; - renderedElement += util.format('', element.label); - renderedElement += util.format('
              '; - break; - } - renderedElement += '
              '; - renderedElement += util.format('', 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, - leaveAt: null - } - }) - .then(function(reportChatSession) { - return reportChatSession - .update({ - abandon: true, - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); - }) - .then(function() { - return res.status(200).jsonp({}); - }) - .catch(function(err) { - res.status(500).jsonp({}); - }); - } - return res.status(200).jsonp({}); -} +var _0xc780=["\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","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x69\x6E\x64"];_0xc780[0];var _=require(_0xc780[1]);var jsmin=require(_0xc780[2])[_0xc780[2]];var Mustache=require(_0xc780[3]);var querystring=require(_0xc780[4]);var path=require(_0xc780[5]);var md5=require(_0xc780[6]);var fs=require(_0xc780[7]);var UAParser=require(_0xc780[8]);var uaParser= new UAParser();var languageParser=require(_0xc780[9]);var ipaddr=require(_0xc780[10]);var geoip=require(_0xc780[11]);var csv=require(_0xc780[12]);var util=require(_0xc780[13]);var moment=require(_0xc780[14]);var config=require(_0xc780[15]);var Xchatty=require(_0xc780[17])[_0xc780[16]];var xchatty_components=require(_0xc780[18]);var Util=require(_0xc780[19]);var sequelize=require(_0xc780[17])[_0xc780[20]];var User=require(_0xc780[17])[_0xc780[21]];var Agent=require(_0xc780[17])[_0xc780[21]];var ChatRoom=require(_0xc780[17])[_0xc780[22]];var ChatEnquiry=require(_0xc780[17])[_0xc780[23]];var ChatVisitor=require(_0xc780[17])[_0xc780[24]];var ChatMessage=require(_0xc780[17])[_0xc780[25]];var ChatWebsite=require(_0xc780[17])[_0xc780[26]];var ChatWebsitesField=require(_0xc780[17])[_0xc780[27]];var ChatProactiveAction=require(_0xc780[17])[_0xc780[28]];var ReportChatSession=require(_0xc780[17])[_0xc780[29]];var id=1;exports[_0xc780[30]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){return Xchatty[_0xc780[35]]()[_0xc780[34]](function(_0x84a6x24){return _0x84a6x21[_0xc780[33]](200)[_0xc780[32]](_0x84a6x24)})[_0xc780[31]](function(_0x84a6x23){return _0x84a6x22(_0x84a6x23)})};exports[_0xc780[36]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){ChatWebsite[_0xc780[67]](_0x84a6x20[_0xc780[42]][_0xc780[41]])[_0xc780[34]](function(_0x84a6x25){_0x84a6x21[_0xc780[39]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xc780[37],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0xc780[38]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0x84a6x26=xchatty_components[_0xc780[40]];var _0x84a6x27={websiteId:_0x84a6x20[_0xc780[42]][_0xc780[41]],rootPath:Util[_0xc780[44]](_0x84a6x25[_0xc780[43]])+_0xc780[45],signedUp:_0xc780[46],windowFocused:_0xc780[46],isNewPage:_0xc780[47],processingSignUp:_0xc780[46],processingEnquiry:_0xc780[46],processingSend:_0xc780[46],processingRating:_0xc780[46],visitorFullname:_0xc780[48],visitorAvatar:_0xc780[48],timerReadMessages:_0xc780[49],timerCheckStatus:_0xc780[49],isOnline:_0xc780[46],decayHistory:0,defaultTimeout:5000,isInitialStatusCheck:_0xc780[47],muteNotificationSoundOnce:_0xc780[46],assetBase:Util[_0xc780[44]](_0x84a6x25[_0xc780[43]])+_0xc780[50],hasSessionSaf:_0xc780[46],restoreOpenState:_0xc780[46],animateHover:_0x84a6x25[_0xc780[51]],hideEmail:_0xc780[46],hideOffline:_0xc780[46],headerShape:_0x84a6x25[_0xc780[52]],HeaderOnline:_0x84a6x25[_0xc780[53]],OnlineMessage:_0x84a6x25[_0xc780[54]],UsernamePlaceholder:_0x84a6x25[_0xc780[55]],EmailPlaceholder:_0x84a6x25[_0xc780[56]],StartChatButtonText:_0x84a6x25[_0xc780[57]],OfflineMessage:_0x84a6x25[_0xc780[58]],HeaderOffline:_0x84a6x25[_0xc780[59]],EnquiryMessagePlaceholder:_0x84a6x25[_0xc780[60]],EnquiryButtonText:_0x84a6x25[_0xc780[61]],downloadTranscript:_0x84a6x25[_0xc780[62]],RatingMessage:_0x84a6x25[_0xc780[63]],RatingSend:_0x84a6x25[_0xc780[64]],RatingSkip:_0x84a6x25[_0xc780[65]]};_0x84a6x26=Mustache[_0xc780[66]](_0x84a6x26,_0x84a6x27);_0x84a6x21[_0xc780[32]](_0x84a6x26)})[_0xc780[31]](function(_0x84a6x23){_0x84a6x22(_0x84a6x23)})};exports[_0xc780[68]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){ChatWebsite[_0xc780[67]](_0x84a6x20[_0xc780[42]][_0xc780[41]])[_0xc780[34]](function(_0x84a6x25){_0x84a6x21[_0xc780[39]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xc780[69],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0xc780[38]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0x84a6x28=xchatty_components[_0xc780[70]];var _0x84a6x29={assetBase:Util[_0xc780[44]](_0x84a6x25[_0xc780[43]])+_0xc780[50],color:_0x84a6x25[_0xc780[71]],colorFocus:_0x84a6x25[_0xc780[72]],colorButton:_0x84a6x25[_0xc780[73]]};_0x84a6x28=Mustache[_0xc780[66]](_0x84a6x28,_0x84a6x29);_0x84a6x21[_0xc780[32]](_0x84a6x28)})[_0xc780[31]](function(_0x84a6x23){_0x84a6x22(_0x84a6x23)})};exports[_0xc780[74]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){_0x84a6x21[_0xc780[83]](path[_0xc780[82]](config[_0xc780[75]],_0xc780[76],_0xc780[77],_0xc780[78],_0xc780[79],_0x84a6x20[_0xc780[81]][_0xc780[80]]))};exports[_0xc780[84]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){_0x84a6x21[_0xc780[39]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xc780[37],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0xc780[38]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0x84a6x2a=xchatty_components[_0xc780[85]];_0x84a6x21[_0xc780[32]](_0x84a6x2a)};exports[_0xc780[86]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){if(!_0x84a6x20[_0xc780[87]][_0xc780[78]]){_0x84a6x20[_0xc780[87]][_0xc780[78]]={}};var _0x84a6x2b={};return Agent[_0xc780[35]]({where:{online:true,role:_0xc780[106]}})[_0xc780[34]](function(_0x84a6x2e){if(_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[100]]){_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[100]]=_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[100]]===_0xc780[47]?true:false};_0x84a6x2b={success:true,has_session_saf:null,signed_up:_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[96]]?true:false,fullname:_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[102]]?_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[102]]:_0xc780[99],email:_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[103]]?_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[103]]:_0xc780[99],avatar:_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[104]]?_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[104]]:_0xc780[99],open_state:_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[100]]||_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[96]]?true:false,online:_0x84a6x2e[_0xc780[105]]?true:false,is_unserved:false,room_id:0};return})[_0xc780[34]](function(){if(_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[93]]){return ChatRoom[_0xc780[95]]({where:{ChatVisitorId:_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[93]],status:_0xc780[98],token:{$ne:_0xc780[99]}}})};return})[_0xc780[34]](function(_0x84a6x2d){if(_0x84a6x2d){_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[96]]=_0x84a6x2d[_0xc780[41]];_0x84a6x2b[_0xc780[96]]=_0x84a6x2d[_0xc780[41]];_0x84a6x2b[_0xc780[97]]=true}else {_0x84a6x2b[_0xc780[97]]=false};return})[_0xc780[34]](function(){if(_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[93]]){return ChatVisitor[_0xc780[95]]({where:{id:_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[93]],status:_0xc780[94]}})};return})[_0xc780[34]](function(_0x84a6x2c){if(_0x84a6x2c){_0x84a6x2b[_0xc780[88]]=true};return _0x84a6x21[_0xc780[32]](_0x84a6x20[_0xc780[81]][_0xc780[89]]+_0xc780[90]+JSON[_0xc780[91]](_0x84a6x2b)+_0xc780[92])})[_0xc780[31]](function(_0x84a6x23){return _0x84a6x22(_0x84a6x23)})};exports[_0xc780[107]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){var _0x84a6x2f={where:{ChatRoomId:_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[96]]},include:[{model:User,attributes:[_0xc780[41],_0xc780[108],_0xc780[102],_0xc780[103]]},{model:ChatVisitor,attributes:[_0xc780[41],_0xc780[102],_0xc780[103]]}]};if(_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[109]]===_0xc780[46]){_0x84a6x2f[_0xc780[110]][_0xc780[41]]={$gt:_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[111]]}};ChatMessage[_0xc780[35]](_0x84a6x2f)[_0xc780[34]](function(_0x84a6x30){var _0x84a6x31={success:true,messages:_0x84a6x30,composing:false,composing_fullname:null};_0x84a6x21[_0xc780[32]](_0x84a6x20[_0xc780[81]][_0xc780[89]]+_0xc780[90]+JSON[_0xc780[91]](_0x84a6x31)+_0xc780[92])})[_0xc780[31]](function(_0x84a6x23){_0x84a6x22(_0x84a6x23)})};exports[_0xc780[112]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){var _0x84a6x2f={where:{ChatRoomId:_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[96]]},include:[{model:User,attributes:[_0xc780[41],_0xc780[108],_0xc780[102],_0xc780[103]]},{model:ChatVisitor,attributes:[_0xc780[41],_0xc780[102],_0xc780[103]]}]};if(_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[109]]===_0xc780[46]){_0x84a6x2f[_0xc780[110]][_0xc780[41]]={$gt:_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[111]]}};ChatMessage[_0xc780[115]]({body:_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[114]][_0xc780[113]],ChatRoomId:_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[96]],ChatVisitorId:_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[93]]})[_0xc780[34]](function(_0x84a6x32){ChatMessage[_0xc780[35]](_0x84a6x2f)[_0xc780[34]](function(_0x84a6x30){var _0x84a6x31={errors:[],success:true,data:_0x84a6x32,messages:_0x84a6x30};_0x84a6x21[_0xc780[32]](_0x84a6x20[_0xc780[81]][_0xc780[89]]+_0xc780[90]+JSON[_0xc780[91]](_0x84a6x31)+_0xc780[92])})[_0xc780[31]](function(_0x84a6x23){_0x84a6x22(_0x84a6x23)})})[_0xc780[31]](function(_0x84a6x23){_0x84a6x22(_0x84a6x23)})};exports[_0xc780[116]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){return ChatRoom[_0xc780[67]](_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[96]])[_0xc780[34]](function(_0x84a6x2d){return _0x84a6x2d[_0xc780[119]]({status:_0xc780[117],completeReason:_0xc780[118]})})[_0xc780[34]](function(){var _0x84a6x31={success:true,errors:[]};_0x84a6x20[_0xc780[87]][_0xc780[78]]={};_0x84a6x21[_0xc780[32]](_0x84a6x20[_0xc780[81]][_0xc780[89]]+_0xc780[90]+JSON[_0xc780[91]](_0x84a6x31)+_0xc780[92])})[_0xc780[31]](function(_0x84a6x23){_0x84a6x22(_0x84a6x23)})};exports[_0xc780[120]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){var _0x84a6x33=uaParser[_0xc780[124]](_0x84a6x20[_0xc780[123]][_0xc780[122]])[_0xc780[121]]();var _0x84a6x34=languageParser[_0xc780[126]](_0x84a6x20[_0xc780[123]][_0xc780[125]]);var _0x84a6x35=_0x84a6x20[_0xc780[123]][_0xc780[127]]?_0x84a6x20[_0xc780[123]][_0xc780[127]]:_0x84a6x20[_0xc780[129]][_0xc780[128]]||_0x84a6x20[_0xc780[130]];var _0x84a6x36={fullname:_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[131]][_0xc780[102]],email:_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[131]][_0xc780[103]],remote_address:_0x84a6x35,user_agent:_0x84a6x20[_0xc780[123]][_0xc780[122]],visitor_language:_0x84a6x20[_0xc780[123]][_0xc780[125]],referer:_0x84a6x20[_0xc780[123]][_0xc780[132]],origin:_0xc780[133],browser:_0x84a6x33[_0xc780[134]][_0xc780[108]]+_0xc780[135]+_0x84a6x33[_0xc780[134]][_0xc780[136]],engine:_0x84a6x33[_0xc780[137]][_0xc780[108]]+_0xc780[135]+_0x84a6x33[_0xc780[137]][_0xc780[136]],os:_0x84a6x33[_0xc780[138]][_0xc780[108]]+_0xc780[135]+_0x84a6x33[_0xc780[138]][_0xc780[136]],device:_0x84a6x33[_0xc780[140]][_0xc780[139]]?_0x84a6x33[_0xc780[140]][_0xc780[139]]+_0xc780[135]+_0x84a6x33[_0xc780[140]][_0xc780[141]]+_0xc780[135]+_0x84a6x33[_0xc780[140]][_0xc780[142]]:null,ChatWebsiteId:_0x84a6x20[_0xc780[81]][_0xc780[143]]};if(_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[131]][_0xc780[144]]&&_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[131]][_0xc780[145]]){_0x84a6x36[_0xc780[144]]=_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[131]][_0xc780[144]];_0x84a6x36[_0xc780[145]]=_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[131]][_0xc780[145]]};if(_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[131]][_0xc780[146]]&&_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[131]][_0xc780[147]]){_0x84a6x36[_0xc780[146]]=_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[131]][_0xc780[146]];_0x84a6x36[_0xc780[147]]=_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[131]][_0xc780[147]]};if(_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[131]][_0xc780[148]]&&_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[131]][_0xc780[149]]){_0x84a6x36[_0xc780[148]]=_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[131]][_0xc780[148]];_0x84a6x36[_0xc780[149]]=_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[131]][_0xc780[149]]};return ChatVisitor[_0xc780[115]](_0x84a6x36)[_0xc780[34]](function(_0x84a6x37){_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[102]]=_0x84a6x37[_0xc780[102]];_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[103]]=_0x84a6x37[_0xc780[103]];_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[104]]=md5(_0x84a6x37[_0xc780[103]]).toString(_0xc780[150]);_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[93]]=_0x84a6x37[_0xc780[41]];var _0x84a6x31={success:true,errors:[],chatVisitor:{id:_0x84a6x37[_0xc780[41]]}};_0x84a6x21[_0xc780[32]](_0x84a6x20[_0xc780[81]][_0xc780[89]]+_0xc780[90]+JSON[_0xc780[91]](_0x84a6x31)+_0xc780[92])})[_0xc780[31]](function(_0x84a6x23){_0x84a6x22(_0x84a6x23)})};exports[_0xc780[151]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){return ChatVisitor[_0xc780[67]](_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[93]])[_0xc780[34]](function(_0x84a6x37){return _0x84a6x37[_0xc780[119]]({status:_0xc780[94]})})[_0xc780[34]](function(){var _0x84a6x31={success:true,errors:[]};_0x84a6x20[_0xc780[87]][_0xc780[78]]={};_0x84a6x21[_0xc780[32]](_0x84a6x20[_0xc780[81]][_0xc780[89]]+_0xc780[90]+JSON[_0xc780[91]](_0x84a6x31)+_0xc780[92])})[_0xc780[31]](function(_0x84a6x23){_0x84a6x22(_0x84a6x23)})};exports[_0xc780[152]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){return sequelize[_0xc780[164]]()[_0xc780[34]](function(_0x84a6x38){var _0x84a6x35=_0x84a6x20[_0xc780[123]][_0xc780[127]]?_0x84a6x20[_0xc780[123]][_0xc780[127]]:_0x84a6x20[_0xc780[129]][_0xc780[128]]||_0x84a6x20[_0xc780[130]];var _0x84a6x33=uaParser[_0xc780[124]](_0x84a6x20[_0xc780[123]][_0xc780[122]])[_0xc780[121]]();var _0x84a6x34=languageParser[_0xc780[126]](_0x84a6x20[_0xc780[123]][_0xc780[125]]);var _0x84a6x36={fullname:_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[102]],email:_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[103]],remote_address:_0x84a6x35,user_agent:_0x84a6x20[_0xc780[123]][_0xc780[122]],visitor_language:_0x84a6x20[_0xc780[123]][_0xc780[125]],browser:_0x84a6x33[_0xc780[134]][_0xc780[108]]+_0xc780[135]+_0x84a6x33[_0xc780[134]][_0xc780[136]],engine:_0x84a6x33[_0xc780[137]][_0xc780[108]]+_0xc780[135]+_0x84a6x33[_0xc780[137]][_0xc780[136]],os:_0x84a6x33[_0xc780[138]][_0xc780[108]]+_0xc780[135]+_0x84a6x33[_0xc780[138]][_0xc780[136]],device:_0x84a6x33[_0xc780[140]][_0xc780[139]]?_0x84a6x33[_0xc780[140]][_0xc780[139]]+_0xc780[135]+_0x84a6x33[_0xc780[140]][_0xc780[141]]+_0xc780[135]+_0x84a6x33[_0xc780[140]][_0xc780[142]]:null,referer:_0x84a6x20[_0xc780[123]][_0xc780[132]],origin:_0xc780[154],status:_0xc780[94],ChatWebsiteId:parseInt(_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[155]],10),ChatEnquiry:{username:_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[102]],email:_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[103]],text:_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[113]],ChatWebsiteId:parseInt(_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[155]],10)}};if(_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[156]]&&_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[157]]){_0x84a6x36[_0xc780[156]]=_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[156]];_0x84a6x36[_0xc780[157]]=_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[157]]};if(_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[158]]&&_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[159]]){_0x84a6x36[_0xc780[158]]=_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[158]];_0x84a6x36[_0xc780[159]]=_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[159]]};if(_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[160]]&&_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[161]]){_0x84a6x36[_0xc780[160]]=_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[160]];_0x84a6x36[_0xc780[161]]=_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[153]][_0xc780[161]]};return ChatVisitor[_0xc780[115]](_0x84a6x36,{transaction:_0x84a6x38,include:[{model:ChatEnquiry}]})[_0xc780[34]](function(){_0x84a6x38[_0xc780[163]]();_0x84a6x21[_0xc780[32]](_0x84a6x20[_0xc780[81]][_0xc780[89]]+_0xc780[90]+JSON[_0xc780[91]]({success:true,errors:[]})+_0xc780[92])})[_0xc780[31]](function(_0x84a6x23){_0x84a6x38[_0xc780[162]]();_0x84a6x22(_0x84a6x23)})})};exports[_0xc780[165]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){if(_0x84a6x20[_0xc780[87]][_0xc780[78]]&&_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[93]]&&_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[96]]){ChatMessage[_0xc780[35]]({where:{ChatRoomId:_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[96]]},include:[{model:Agent,attributes:[_0xc780[41],_0xc780[102]]},{model:ChatVisitor,attributes:[_0xc780[41],_0xc780[102]]}]})[_0xc780[34]](function(_0x84a6x30){var _0x84a6x39=[];_0x84a6x30[_0xc780[171]](function(_0x84a6x32){var _0x84a6x3a={name:_0x84a6x32[_0xc780[166]]?_0x84a6x32[_0xc780[21]][_0xc780[102]]:_0x84a6x32[_0xc780[24]][_0xc780[102]],text:_0x84a6x32[_0xc780[168]][_0xc780[167]](/(\r\n|\n|\r)/gm,_0xc780[135]),date:_0x84a6x32[_0xc780[169]]};_0x84a6x39[_0xc780[170]](_0x84a6x3a)});var _0x84a6x3b=csv(_0x84a6x39);_0x84a6x21[_0xc780[142]](_0xc780[172])[_0xc780[33]](200)[_0xc780[32]](_0x84a6x3b)})[_0xc780[31]](function(_0x84a6x23){_0x84a6x22(_0x84a6x23)})}};exports[_0xc780[173]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){return Xchatty[_0xc780[67]](_0x84a6x20[_0xc780[42]][_0xc780[41]])[_0xc780[34]](function(_0x84a6x3c){if(!_0x84a6x3c){return _0x84a6x21[_0xc780[174]](404)};return _0x84a6x21[_0xc780[32]](_0x84a6x3c)})[_0xc780[31]](function(_0x84a6x23){return _0x84a6x22(_0x84a6x23)})};exports[_0xc780[115]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){return Xchatty[_0xc780[115]](_0x84a6x20[_0xc780[168]])[_0xc780[34]](function(_0x84a6x3c){return _0x84a6x21[_0xc780[33]](201)[_0xc780[32]](_0x84a6x3c)})[_0xc780[31]](function(_0x84a6x23){return _0x84a6x22(_0x84a6x23)})};exports[_0xc780[119]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){if(_0x84a6x20[_0xc780[168]][_0xc780[41]]){delete _0x84a6x20[_0xc780[168]][_0xc780[41]]};return Xchatty[_0xc780[67]](_0x84a6x20[_0xc780[42]][_0xc780[41]])[_0xc780[34]](function(_0x84a6x3c){if(!_0x84a6x3c){return _0x84a6x21[_0xc780[174]](404)};var _0x84a6x3d=_[_0xc780[175]](_0x84a6x3c,_0x84a6x20[_0xc780[168]]);_0x84a6x3d[_0xc780[176]]()[_0xc780[34]](function(){return _0x84a6x21[_0xc780[33]](200)[_0xc780[32]](_0x84a6x3c)})[_0xc780[31]](function(_0x84a6x23){return _0x84a6x22(_0x84a6x23)})})[_0xc780[31]](function(_0x84a6x23){return _0x84a6x22(_0x84a6x23)})};exports[_0xc780[177]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){return Xchatty[_0xc780[67]](_0x84a6x20[_0xc780[42]][_0xc780[41]])[_0xc780[34]](function(_0x84a6x3c){if(!_0x84a6x3c){return _0x84a6x21[_0xc780[174]](404)};_0x84a6x3c[_0xc780[177]]()[_0xc780[34]](function(){return _0x84a6x21[_0xc780[174]](204)})[_0xc780[31]](function(_0x84a6x23){return _0x84a6x22(_0x84a6x23)})})[_0xc780[31]](function(_0x84a6x23){return _0x84a6x22(_0x84a6x23)})};exports[_0xc780[178]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){var _0x84a6x3e=xchatty_components[_0xc780[179]];return ChatWebsite[_0xc780[67]](_0x84a6x20[_0xc780[42]][_0xc780[41]],{include:[{all:true}]})[_0xc780[34]](function(_0x84a6x25){var _0x84a6x3f={rootPath:Util[_0xc780[44]](_0x84a6x25[_0xc780[43]])+_0xc780[45],headerShape:_0x84a6x25[_0xc780[52]],enquiryEnable:_0x84a6x25[_0xc780[180]],onlineFields:_0x84a6x25[_0xc780[181]],renderedOnlineField:function(){var _0x84a6x40=_0xc780[99];var _0x84a6x41=this;switch(this[_0xc780[207]]){case _0xc780[191]:_0x84a6x40=_0xc780[182];_0x84a6x40+=util[_0xc780[187]](_0xc780[183],_0x84a6x41[_0xc780[30]],_0x84a6x41[_0xc780[184]],_0x84a6x41[_0xc780[185]]?_0xc780[186]:_0xc780[99]);_0x84a6x40+=util[_0xc780[187]](_0xc780[188],_0x84a6x41[_0xc780[184]],_0x84a6x41[_0xc780[30]],_0x84a6x41[_0xc780[30]]+1,_0x84a6x41[_0xc780[189]],_0x84a6x41[_0xc780[185]]?_0xc780[185]:_0xc780[99]);_0x84a6x40+=_0xc780[190];break;case _0xc780[193]:_0x84a6x40=_0xc780[182];_0x84a6x40+=util[_0xc780[187]](_0xc780[183],_0x84a6x41[_0xc780[30]],_0x84a6x41[_0xc780[184]],_0x84a6x41[_0xc780[185]]?_0xc780[186]:_0xc780[99]);_0x84a6x40+=util[_0xc780[187]](_0xc780[192],_0x84a6x41[_0xc780[30]],_0x84a6x41[_0xc780[184]],_0x84a6x41[_0xc780[30]]+1,_0x84a6x41[_0xc780[189]],_0x84a6x41[_0xc780[185]]?_0xc780[185]:_0xc780[99]);_0x84a6x40+=_0xc780[190];break;case _0xc780[199]:_0x84a6x40=_0xc780[182];_0x84a6x40+=util[_0xc780[187]](_0xc780[194],_0x84a6x41[_0xc780[184]]);_[_0xc780[171]](_0x84a6x41[_0xc780[195]],function(_0x84a6x42){_0x84a6x40+=_0xc780[196];_0x84a6x40+=util[_0xc780[187]](_0xc780[197],_0x84a6x41[_0xc780[30]]+1,_0x84a6x42,_0x84a6x42);_0x84a6x40+=_0xc780[198]});_0x84a6x40+=_0xc780[190];break;case _0xc780[201]:_0x84a6x40=_0xc780[182];_0x84a6x40+=util[_0xc780[187]](_0xc780[194],_0x84a6x41[_0xc780[184]]);_[_0xc780[171]](_0x84a6x41[_0xc780[195]],function(_0x84a6x42){_0x84a6x40+=_0xc780[196];_0x84a6x40+=util[_0xc780[187]](_0xc780[200],_0x84a6x41[_0xc780[30]]+1,_0x84a6x42,_0x84a6x42);_0x84a6x40+=_0xc780[198]});_0x84a6x40+=_0xc780[190];break;case _0xc780[206]:_0x84a6x40=_0xc780[182];_0x84a6x40+=util[_0xc780[187]](_0xc780[202],_0x84a6x41[_0xc780[30]],_0x84a6x41[_0xc780[184]]);_0x84a6x40+=util[_0xc780[187]](_0xc780[203],_0x84a6x41[_0xc780[30]]+1);_[_0xc780[171]](_0x84a6x41[_0xc780[195]],function(_0x84a6x42){_0x84a6x40+=util[_0xc780[187]](_0xc780[204],_0x84a6x42,_0x84a6x42)});_0x84a6x40+=_0xc780[205];break};_0x84a6x40+=_0xc780[208];_0x84a6x40+=util[_0xc780[187]](_0xc780[209],_0x84a6x41[_0xc780[30]]+1,_0x84a6x41[_0xc780[184]]);return _0x84a6x40},offlineFields:_0x84a6x25[_0xc780[210]],renderedOfflineField:function(){var _0x84a6x40=_0xc780[99];var _0x84a6x41=this;switch(this[_0xc780[207]]){case _0xc780[191]:_0x84a6x40=_0xc780[182];_0x84a6x40+=util[_0xc780[187]](_0xc780[211],_0x84a6x41[_0xc780[30]],_0x84a6x41[_0xc780[184]],_0x84a6x41[_0xc780[185]]?_0xc780[186]:_0xc780[99]);_0x84a6x40+=util[_0xc780[187]](_0xc780[212],_0x84a6x41[_0xc780[184]],_0x84a6x41[_0xc780[30]],_0x84a6x41[_0xc780[30]]+1,_0x84a6x41[_0xc780[189]],_0x84a6x41[_0xc780[185]]?_0xc780[185]:_0xc780[99]);_0x84a6x40+=_0xc780[190];break;case _0xc780[193]:_0x84a6x40=_0xc780[182];_0x84a6x40+=util[_0xc780[187]](_0xc780[211],_0x84a6x41[_0xc780[30]],_0x84a6x41[_0xc780[184]],_0x84a6x41[_0xc780[185]]?_0xc780[186]:_0xc780[99]);_0x84a6x40+=util[_0xc780[187]](_0xc780[213],_0x84a6x41[_0xc780[30]],_0x84a6x41[_0xc780[184]],_0x84a6x41[_0xc780[30]]+1,_0x84a6x41[_0xc780[189]],_0x84a6x41[_0xc780[185]]?_0xc780[185]:_0xc780[99]);_0x84a6x40+=_0xc780[190];break;case _0xc780[199]:_0x84a6x40=_0xc780[182];_0x84a6x40+=util[_0xc780[187]](_0xc780[194],_0x84a6x41[_0xc780[184]]);_[_0xc780[171]](_0x84a6x41[_0xc780[195]],function(_0x84a6x42){_0x84a6x40+=_0xc780[196];_0x84a6x40+=util[_0xc780[187]](_0xc780[214],_0x84a6x41[_0xc780[30]]+1,_0x84a6x42,_0x84a6x42);_0x84a6x40+=_0xc780[198]});_0x84a6x40+=_0xc780[190];break;case _0xc780[201]:_0x84a6x40=_0xc780[182];_0x84a6x40+=util[_0xc780[187]](_0xc780[194],_0x84a6x41[_0xc780[184]]);_[_0xc780[171]](_0x84a6x41[_0xc780[195]],function(_0x84a6x42){_0x84a6x40+=_0xc780[196];_0x84a6x40+=util[_0xc780[187]](_0xc780[215],_0x84a6x41[_0xc780[30]]+1,_0x84a6x42,_0x84a6x42);_0x84a6x40+=_0xc780[198]});_0x84a6x40+=_0xc780[190];break;case _0xc780[206]:_0x84a6x40=_0xc780[182];_0x84a6x40+=util[_0xc780[187]](_0xc780[194],_0x84a6x41[_0xc780[184]]);_0x84a6x40+=util[_0xc780[187]](_0xc780[216],_0x84a6x41[_0xc780[30]]+1);_[_0xc780[171]](_0x84a6x41[_0xc780[195]],function(_0x84a6x42){_0x84a6x40+=util[_0xc780[187]](_0xc780[204],_0x84a6x42,_0x84a6x42)});_0x84a6x40+=_0xc780[205];break};_0x84a6x40+=_0xc780[208];_0x84a6x40+=util[_0xc780[187]](_0xc780[217],_0x84a6x41[_0xc780[30]]+1,_0x84a6x41[_0xc780[184]]);return _0x84a6x40}};_0x84a6x3e=Mustache[_0xc780[66]](_0x84a6x3e,_0x84a6x3f);return _0x84a6x21[_0xc780[33]](200)[_0xc780[218]](_0x84a6x3e)})[_0xc780[31]](function(_0x84a6x23){return _0x84a6x22(_0x84a6x23)})};exports[_0xc780[219]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){return ChatWebsite[_0xc780[67]](_0x84a6x20[_0xc780[42]][_0xc780[41]],{include:[{model:ChatProactiveAction}]})[_0xc780[34]](function(_0x84a6x25){if(!_0x84a6x25){return _0x84a6x21[_0xc780[33]](400)[_0xc780[218]]({})};return _0x84a6x21[_0xc780[33]](200)[_0xc780[218]](_0x84a6x25.ChatProactiveActions)})[_0xc780[31]](function(_0x84a6x23){return _0x84a6x22(_0x84a6x23)})};exports[_0xc780[220]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){return ChatRoom[_0xc780[67]](_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[223]][_0xc780[96]])[_0xc780[34]](function(_0x84a6x2d){if(!_0x84a6x2d){return _0x84a6x21[_0xc780[33]](400)[_0xc780[218]]({})};if(_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[223]][_0xc780[222]](_0xc780[221])&&_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[223]][_0xc780[222]](_0xc780[113])){return _0x84a6x2d[_0xc780[119]]({rating:_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[223]][_0xc780[221]],ratingMessage:_0x84a6x20[_0xc780[81]][_0xc780[101]][_0xc780[223]][_0xc780[113]]})};return})[_0xc780[34]](function(){return _0x84a6x21[_0xc780[33]](200)[_0xc780[218]]({})})[_0xc780[31]](function(_0x84a6x23){return _0x84a6x21[_0xc780[33]](400)[_0xc780[218]](_0x84a6x23)})};exports[_0xc780[224]]=function(_0x84a6x20,_0x84a6x21,_0x84a6x22){if(_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[222]](_0xc780[93])&&_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[93]]>0){return ReportChatSession[_0xc780[226]]({where:{visitorid:_0x84a6x20[_0xc780[87]][_0xc780[78]][_0xc780[93]],leaveAt:null}})[_0xc780[34]](function(_0x84a6x43){return _0x84a6x43[_0xc780[119]]({abandon:true,leaveAt:moment()[_0xc780[187]](_0xc780[225])})})[_0xc780[34]](function(){return _0x84a6x21[_0xc780[33]](200)[_0xc780[218]]({})})[_0xc780[31]](function(_0x84a6x23){_0x84a6x21[_0xc780[33]](500)[_0xc780[218]]({})})};return _0x84a6x21[_0xc780[33]](200)[_0xc780[218]]({})} \ No newline at end of file diff --git a/server/api/xchatty/xchatty.socket.js b/server/api/xchatty/xchatty.socket.js index b8ec557..8fe7ee5 100644 --- a/server/api/xchatty/xchatty.socket.js +++ b/server/api/xchatty/xchatty.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xc22d=["\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"];_0xc22d[0];var xchatty=require(_0xc22d[2])[_0xc22d[1]];exports[_0xc22d[3]]=function(_0x8c31x2){};function onSave(_0x8c31x2,_0x8c31x4,_0x8c31x5){_0x8c31x2[_0xc22d[5]](_0xc22d[4],_0x8c31x4)}function onRemove(_0x8c31x2,_0x8c31x4,_0x8c31x5){_0x8c31x2[_0xc22d[5]](_0xc22d[6],_0x8c31x4)} \ No newline at end of file diff --git a/server/api/zendesk_account/index.js b/server/api/zendesk_account/index.js index 1d3a00a..e524870 100644 --- a/server/api/zendesk_account/index.js +++ b/server/api/zendesk_account/index.js @@ -1,32 +1 @@ -'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; +var _0xc834=["\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"];_0xc834[0];var express=require(_0xc834[1]);var auth=require(_0xc834[2]);var controller=require(_0xc834[3]);var router=express.Router();router[_0xc834[7]](_0xc834[4],auth[_0xc834[5]](),controller[_0xc834[6]]);router[_0xc834[7]](_0xc834[8],auth[_0xc834[5]](),controller[_0xc834[9]]);router[_0xc834[7]](_0xc834[10],auth[_0xc834[5]](),controller[_0xc834[11]]);router[_0xc834[7]](_0xc834[12],auth[_0xc834[5]](),controller[_0xc834[13]]);router[_0xc834[7]](_0xc834[14],auth[_0xc834[5]](),controller[_0xc834[15]]);router[_0xc834[7]](_0xc834[16],auth[_0xc834[5]](),controller[_0xc834[17]]);router[_0xc834[20]](_0xc834[18],auth[_0xc834[5]](),controller[_0xc834[19]]);router[_0xc834[20]](_0xc834[4],auth[_0xc834[5]](),controller[_0xc834[21]]);router[_0xc834[20]](_0xc834[14],auth[_0xc834[5]](),controller[_0xc834[22]]);router[_0xc834[20]](_0xc834[23],auth[_0xc834[5]](),controller[_0xc834[24]]);router[_0xc834[26]](_0xc834[8],auth[_0xc834[5]](),controller[_0xc834[25]]);router[_0xc834[26]](_0xc834[27],auth[_0xc834[5]](),controller[_0xc834[28]]);router[_0xc834[26]](_0xc834[29],auth[_0xc834[5]](),controller[_0xc834[30]]);router[_0xc834[31]](_0xc834[8],auth[_0xc834[5]](),controller[_0xc834[25]]);router[_0xc834[31]](_0xc834[29],auth[_0xc834[5]](),controller[_0xc834[30]]);router[_0xc834[33]](_0xc834[4],auth[_0xc834[5]](),controller[_0xc834[32]]);router[_0xc834[33]](_0xc834[8],auth[_0xc834[5]](),controller[_0xc834[34]]);router[_0xc834[33]](_0xc834[14],auth[_0xc834[5]](),controller[_0xc834[35]]);router[_0xc834[33]](_0xc834[16],auth[_0xc834[5]](),controller[_0xc834[36]]);router[_0xc834[33]](_0xc834[29],auth[_0xc834[5]](),controller[_0xc834[37]]);module[_0xc834[38]]=router \ No newline at end of file diff --git a/server/api/zendesk_account/zendesk_account.controller.js b/server/api/zendesk_account/zendesk_account.controller.js index 78030cd..5f84030 100644 --- a/server/api/zendesk_account/zendesk_account.controller.js +++ b/server/api/zendesk_account/zendesk_account.controller.js @@ -1,316 +1 @@ -'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); - }); -}; +var _0xbf1f=["\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"];_0xbf1f[0];var _=require(_0xbf1f[1]);var Util=require(_0xbf1f[2]);var zendesk=require(_0xbf1f[3]);var ZendeskAccount=require(_0xbf1f[5])[_0xbf1f[4]];var ZendeskConfiguration=require(_0xbf1f[5])[_0xbf1f[6]];var ZendeskField=require(_0xbf1f[5])[_0xbf1f[7]];function handleError(_0xef20x8,_0xef20x9){_0xef20x9=_0xef20x9||500;return function(_0xef20xa){console[_0xbf1f[9]](_0xbf1f[8],_0xef20xa);_0xef20x8[_0xbf1f[11]](_0xef20x9)[_0xbf1f[10]](_0xef20xa)}}function responseWithResult(_0xef20x8,_0xef20x9){_0xef20x9=_0xef20x9||200;return function(_0xef20xc){if(_0xef20xc){_0xef20x8[_0xbf1f[11]](_0xef20x9)[_0xbf1f[12]](_0xef20xc)}}}function responseWithoutResult(_0xef20x8,_0xef20x9){_0xef20x9=_0xef20x9||200;return function(){_0xef20x8[_0xbf1f[13]](_0xef20x9)}}function handleEntityNotFound(_0xef20x8){return function(_0xef20xc){if(!_0xef20xc){_0xef20x8[_0xbf1f[11]](404)[_0xbf1f[14]]();return null};return _0xef20xc}}function saveUpdates(_0xef20x10){return function(_0xef20xc){return _0xef20xc[_0xbf1f[16]](_0xef20x10)[_0xbf1f[15]](function(_0xef20x11){return _0xef20x11})}}function removeEntity(_0xef20x8){return function(_0xef20xc){if(_0xef20xc){return _0xef20xc[_0xbf1f[17]]()[_0xbf1f[15]](function(){_0xef20x8[_0xbf1f[11]](204)[_0xbf1f[14]]()})}}}exports[_0xbf1f[18]]=function(_0xef20x13,_0xef20x8,_0xef20x14){return ZendeskAccount[_0xbf1f[24]](_0xbf1f[23])[_0xbf1f[22]](Util[_0xbf1f[21]](_0xef20x13[_0xbf1f[20]]))[_0xbf1f[15]](responseWithResult(_0xef20x8))[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[25]]=function(_0xef20x13,_0xef20x8){return ZendeskAccount[_0xbf1f[28]](_0xef20x13[_0xbf1f[27]][_0xbf1f[26]])[_0xbf1f[15]](handleEntityNotFound(_0xef20x8))[_0xbf1f[15]](responseWithResult(_0xef20x8))[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[29]]=function(_0xef20x13,_0xef20x8){return ZendeskAccount[_0xbf1f[29]](_0xef20x13[_0xbf1f[30]])[_0xbf1f[15]](responseWithResult(_0xef20x8,201))[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[31]]=function(_0xef20x13,_0xef20x8){if(_0xef20x13[_0xbf1f[30]][_0xbf1f[26]]){delete _0xef20x13[_0xbf1f[30]][_0xbf1f[26]]};return ZendeskAccount[_0xbf1f[28]](_0xef20x13[_0xbf1f[27]][_0xbf1f[26]])[_0xbf1f[15]](handleEntityNotFound(_0xef20x8))[_0xbf1f[15]](saveUpdates(_0xef20x13[_0xbf1f[30]]))[_0xbf1f[15]](responseWithResult(_0xef20x8))[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[17]]=function(_0xef20x13,_0xef20x8){return ZendeskAccount[_0xbf1f[28]](_0xef20x13[_0xbf1f[27]][_0xbf1f[26]])[_0xbf1f[15]](handleEntityNotFound(_0xef20x8))[_0xbf1f[15]](removeEntity(_0xef20x8))[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[32]]=function(_0xef20x13,_0xef20x8){return ZendeskAccount[_0xbf1f[17]]({where:{id:_0xef20x13[_0xbf1f[20]][_0xbf1f[33]]},individualHooks:true})[_0xbf1f[15]](responseWithResult(_0xef20x8,204))[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[34]]=function(_0xef20x13,_0xef20x8){var _0xef20x15={};_0xef20x15[_0xef20x13[_0xbf1f[27]][_0xbf1f[35]]]=_0xef20x13[_0xbf1f[30]][_0xbf1f[36]];return ZendeskAccount[_0xbf1f[22]]({where:_0xef20x15})[_0xbf1f[15]](function(_0xef20x16){if(_0xef20x16[_0xbf1f[37]]){return _0xef20x8[_0xbf1f[11]](200)[_0xbf1f[10]]({isValid:false,value:_0xef20x13[_0xbf1f[30]][_0xbf1f[36]]})};return _0xef20x8[_0xbf1f[11]](200)[_0xbf1f[10]]({isValid:true,value:_0xef20x13[_0xbf1f[30]][_0xbf1f[36]]})})[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[38]]=function(_0xef20x13,_0xef20x8){return ZendeskAccount[_0xbf1f[28]](_0xef20x13[_0xbf1f[27]][_0xbf1f[26]])[_0xbf1f[15]](function(_0xef20x17){var _0xef20x18={username:_0xef20x17[_0xbf1f[39]],remoteUri:_0xef20x17[_0xbf1f[40]]};if(_0xef20x17[_0xbf1f[41]]===_0xbf1f[42]){_0xef20x18[_0xbf1f[42]]=_0xef20x17[_0xbf1f[42]]}else {if(_0xef20x17[_0xbf1f[41]]===_0xbf1f[43]){_0xef20x18[_0xbf1f[43]]=_0xef20x17[_0xbf1f[43]]}};var _0xef20x19=zendesk[_0xbf1f[44]](_0xef20x18);_0xef20x19[_0xbf1f[47]][_0xbf1f[46]](function(_0xef20xa,_0xef20x1a,_0xef20x16){if(_0xef20xa){console[_0xbf1f[9]](_0xef20xa);return handleError(_0xef20x8,_0xef20xa)};if(!_0xef20x16[_0xbf1f[45]]){return _0xef20x8[_0xbf1f[13]](500)};return _0xef20x8[_0xbf1f[13]](204)})})[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[48]]=function(_0xef20x13,_0xef20x8){return ZendeskAccount[_0xbf1f[28]](_0xef20x13[_0xbf1f[27]][_0xbf1f[26]])[_0xbf1f[15]](function(_0xef20x17){var _0xef20x18={username:_0xef20x17[_0xbf1f[39]],remoteUri:_0xef20x17[_0xbf1f[40]]};if(_0xef20x17[_0xbf1f[41]]===_0xbf1f[42]){_0xef20x18[_0xbf1f[42]]=_0xef20x17[_0xbf1f[42]]}else {if(_0xef20x17[_0xbf1f[41]]===_0xbf1f[43]){_0xef20x18[_0xbf1f[43]]=_0xef20x17[_0xbf1f[43]]}};var _0xef20x19=zendesk[_0xbf1f[44]](_0xef20x18);_0xef20x19[_0xbf1f[50]][_0xbf1f[49]](function(_0xef20xa,_0xef20x1a,_0xef20x16){if(_0xef20xa){console[_0xbf1f[9]](_0xef20xa);return handleError(_0xef20x8,_0xef20xa)};return _0xef20x8[_0xbf1f[11]](200)[_0xbf1f[10]](_0xef20x16)})})[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[51]]=function(_0xef20x13,_0xef20x8){return ZendeskConfiguration[_0xbf1f[24]]({method:[_0xbf1f[52],_0xef20x13[_0xbf1f[27]][_0xbf1f[26]]]})[_0xbf1f[22]](Util[_0xbf1f[21]](_0xef20x13[_0xbf1f[20]]))[_0xbf1f[15]](responseWithResult(_0xef20x8))[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[53]]=function(_0xef20x13,_0xef20x8){return ZendeskConfiguration[_0xbf1f[24]]({method:[_0xbf1f[52],_0xef20x13[_0xbf1f[27]][_0xbf1f[26]]]})[_0xbf1f[28]](_0xef20x13[_0xbf1f[27]][_0xbf1f[54]])[_0xbf1f[15]](handleEntityNotFound(_0xef20x8))[_0xbf1f[15]](responseWithResult(_0xef20x8))[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[55]]=function(_0xef20x13,_0xef20x8){return ZendeskConfiguration[_0xbf1f[24]]({method:[_0xbf1f[52],_0xef20x13[_0xbf1f[27]][_0xbf1f[26]]]})[_0xbf1f[28]](_0xef20x13[_0xbf1f[27]][_0xbf1f[54]])[_0xbf1f[15]](handleEntityNotFound(_0xef20x8))[_0xbf1f[15]](removeEntity(_0xef20x8))[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[56]]=function(_0xef20x13,_0xef20x8){return ZendeskConfiguration[_0xbf1f[17]]({where:{id:_0xef20x13[_0xbf1f[20]][_0xbf1f[33]]},individualHooks:true})[_0xbf1f[15]](responseWithResult(_0xef20x8,204))[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[57]]=function(_0xef20x13,_0xef20x8){_0xef20x13[_0xbf1f[30]][_0xbf1f[58]]=_0xef20x13[_0xbf1f[27]][_0xbf1f[26]];return ZendeskConfiguration[_0xbf1f[29]](_0xef20x13[_0xbf1f[30]])[_0xbf1f[15]](responseWithResult(_0xef20x8,201))[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[59]]=function(_0xef20x13,_0xef20x8){return ZendeskConfiguration[_0xbf1f[24]]({method:[_0xbf1f[52],_0xef20x13[_0xbf1f[27]][_0xbf1f[26]]]})[_0xbf1f[28]](_0xef20x13[_0xbf1f[27]][_0xbf1f[54]])[_0xbf1f[15]](handleEntityNotFound(_0xef20x8))[_0xbf1f[15]](function(_0xef20x1b){switch(_0xef20x13[_0xbf1f[27]][_0xbf1f[65]]){case _0xbf1f[61]:_0xef20x13[_0xbf1f[30]][_0xbf1f[60]]=_0xef20x13[_0xbf1f[27]][_0xbf1f[54]];break;case _0xbf1f[63]:_0xef20x13[_0xbf1f[30]][_0xbf1f[62]]=_0xef20x13[_0xbf1f[27]][_0xbf1f[54]];break;case _0xbf1f[35]:_0xef20x13[_0xbf1f[30]][_0xbf1f[64]]=_0xef20x13[_0xbf1f[27]][_0xbf1f[54]];break};return ZendeskField[_0xbf1f[29]](_0xef20x13[_0xbf1f[30]])})[_0xbf1f[15]](responseWithResult(_0xef20x8,201))[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[66]]=function(_0xef20x13,_0xef20x8){if(_0xef20x13[_0xbf1f[30]][_0xbf1f[26]]){delete _0xef20x13[_0xbf1f[30]][_0xbf1f[26]]};return ZendeskField[_0xbf1f[28]](_0xef20x13[_0xbf1f[27]][_0xbf1f[67]])[_0xbf1f[15]](handleEntityNotFound(_0xef20x8))[_0xbf1f[15]](saveUpdates(_0xef20x13[_0xbf1f[30]]))[_0xbf1f[15]](responseWithResult(_0xef20x8))[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[68]]=function(_0xef20x13,_0xef20x8){return ZendeskField[_0xbf1f[28]](_0xef20x13[_0xbf1f[27]][_0xbf1f[67]])[_0xbf1f[15]](handleEntityNotFound(_0xef20x8))[_0xbf1f[15]](removeEntity(_0xef20x8))[_0xbf1f[19]](handleError(_0xef20x8))};exports[_0xbf1f[69]]=function(_0xef20x13,_0xef20x8,_0xef20x14){return ZendeskConfiguration[_0xbf1f[28]](_0xef20x13[_0xbf1f[27]][_0xbf1f[54]])[_0xbf1f[15]](handleEntityNotFound(_0xef20x8))[_0xbf1f[15]](function(_0xef20x1b){return _0xef20x1b[_0xbf1f[70]](_0xef20x13[_0xbf1f[30]])})[_0xbf1f[15]](responseWithoutResult(_0xef20x8,200))[_0xbf1f[19]](function(_0xef20xa){console[_0xbf1f[9]](_0xef20xa);return handleError(_0xef20x8,_0xef20xa)})} \ No newline at end of file diff --git a/server/api/zendesk_account/zendesk_account.socket.js b/server/api/zendesk_account/zendesk_account.socket.js index 96c8214..bf34340 100644 --- a/server/api/zendesk_account/zendesk_account.socket.js +++ b/server/api/zendesk_account/zendesk_account.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x4893=["\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"];_0x4893[0];var ZendeskAccount=require(_0x4893[2])[_0x4893[1]];exports[_0x4893[3]]=function(_0x2973x2){ZendeskAccount[_0x4893[4]](function(_0x2973x3){onSave(_0x2973x2,_0x2973x3)});ZendeskAccount[_0x4893[5]](function(_0x2973x3){onRemove(_0x2973x2,_0x2973x3)})};function onSave(_0x2973x2,_0x2973x3,_0x2973x5){_0x2973x2[_0x4893[7]](_0x4893[6],_0x2973x3)}function onRemove(_0x2973x2,_0x2973x3,_0x2973x5){_0x2973x2[_0x4893[7]](_0x4893[8],_0x2973x3)} \ No newline at end of file diff --git a/server/api/zendesk_account/zendesk_account.spec.js b/server/api/zendesk_account/zendesk_account.spec.js index 68c8389..7548ce3 100644 --- a/server/api/zendesk_account/zendesk_account.spec.js +++ b/server/api/zendesk_account/zendesk_account.spec.js @@ -1,20 +1 @@ -'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 +var _0x51a9=["\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"];_0x51a9[0];var should=require(_0x51a9[1]);var app=require(_0x51a9[2]);var request=require(_0x51a9[3]);describe(_0x51a9[4],function(){it(_0x51a9[5],function(_0x8822x4){request(app)[_0x51a9[13]](_0x51a9[12])[_0x51a9[11]](200)[_0x51a9[11]](_0x51a9[10],/json/)[_0x51a9[9]](function(_0x8822x5,_0x8822x6){if(_0x8822x5){return _0x8822x4(_0x8822x5)};_0x8822x6[_0x51a9[8]][_0x51a9[1]][_0x51a9[7]][_0x51a9[6]](Array);_0x8822x4()})})}) \ No newline at end of file diff --git a/server/api/zendesk_configuration/index.js b/server/api/zendesk_configuration/index.js index e0bc33f..29fe2ab 100644 --- a/server/api/zendesk_configuration/index.js +++ b/server/api/zendesk_configuration/index.js @@ -1,17 +1 @@ -'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; +var _0xa79e=["\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"];_0xa79e[0];var express=require(_0xa79e[1]);var controller=require(_0xa79e[2]);var auth=require(_0xa79e[3]);var router=express.Router();router[_0xa79e[7]](_0xa79e[4],auth[_0xa79e[5]](),controller[_0xa79e[6]]);router[_0xa79e[7]](_0xa79e[8],auth[_0xa79e[5]](),controller[_0xa79e[9]]);router[_0xa79e[11]](_0xa79e[4],auth[_0xa79e[5]](),controller[_0xa79e[10]]);router[_0xa79e[13]](_0xa79e[8],auth[_0xa79e[5]](),controller[_0xa79e[12]]);router[_0xa79e[11]](_0xa79e[14],auth[_0xa79e[5]](),controller[_0xa79e[15]]);router[_0xa79e[11]](_0xa79e[16],auth[_0xa79e[5]](),controller[_0xa79e[17]]);router[_0xa79e[18]](_0xa79e[8],auth[_0xa79e[5]](),controller[_0xa79e[12]]);router[_0xa79e[20]](_0xa79e[8],auth[_0xa79e[5]](),controller[_0xa79e[19]]);module[_0xa79e[21]]=router \ No newline at end of file diff --git a/server/api/zendesk_configuration/zendesk_configuration.controller.js b/server/api/zendesk_configuration/zendesk_configuration.controller.js index e299424..62dec9d 100644 --- a/server/api/zendesk_configuration/zendesk_configuration.controller.js +++ b/server/api/zendesk_configuration/zendesk_configuration.controller.js @@ -1,181 +1 @@ -'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); -} +var _0x8270=["\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"];_0x8270[0];var _=require(_0x8270[1]);var ZendeskConfiguration=require(_0x8270[3])[_0x8270[2]];var ZendeskField=require(_0x8270[3])[_0x8270[4]];exports[_0x8270[5]]=function(_0x4447x4,_0x4447x5){ZendeskConfiguration[_0x8270[11]]({where:_0x4447x4[_0x8270[10]]})[_0x8270[9]](function(_0x4447x7){return _0x4447x5[_0x8270[8]](200)[_0x8270[7]](_0x4447x7)})[_0x8270[6]](function(_0x4447x6){return handleError(_0x4447x5,_0x4447x6)})};exports[_0x8270[12]]=function(_0x4447x4,_0x4447x5){ZendeskConfiguration[_0x8270[16]]({where:{id:_0x4447x4[_0x8270[15]][_0x8270[14]]},include:[{all:true}]})[_0x8270[9]](function(_0x4447x8){if(!_0x4447x8){return _0x4447x5[_0x8270[13]](404)};return _0x4447x5[_0x8270[7]](_0x4447x8)})[_0x8270[6]](function(_0x4447x6){return handleError(_0x4447x5,_0x4447x6)})};exports[_0x8270[17]]=function(_0x4447x4,_0x4447x5){ZendeskConfiguration[_0x8270[17]](_0x4447x4[_0x8270[18]])[_0x8270[9]](function(_0x4447x8){return _0x4447x5[_0x8270[8]](201)[_0x8270[7]](_0x4447x8)})[_0x8270[6]](function(_0x4447x6){return handleError(_0x4447x5,_0x4447x6)})};exports[_0x8270[19]]=function(_0x4447x4,_0x4447x5){if(_0x4447x4[_0x8270[18]][_0x8270[14]]){delete _0x4447x4[_0x8270[18]][_0x8270[14]]};ZendeskConfiguration[_0x8270[22]](_0x4447x4[_0x8270[15]][_0x8270[14]])[_0x8270[9]](function(_0x4447x8){if(!_0x4447x8){return _0x4447x5[_0x8270[13]](404)};var _0x4447x9=_[_0x8270[20]](_0x4447x8,_0x4447x4[_0x8270[18]]);_0x4447x9[_0x8270[21]]()[_0x8270[9]](function(){return _0x4447x5[_0x8270[8]](200)[_0x8270[7]](_0x4447x8)})[_0x8270[6]](function(_0x4447x6){return handleError(_0x4447x5,_0x4447x6)})})[_0x8270[6]](function(_0x4447x6){return handleError(_0x4447x5,_0x4447x6)})};exports[_0x8270[23]]=function(_0x4447x4,_0x4447x5){ZendeskConfiguration[_0x8270[22]](_0x4447x4[_0x8270[15]][_0x8270[14]])[_0x8270[9]](function(_0x4447x8){if(!_0x4447x8){return _0x4447x5[_0x8270[13]](404)};_0x4447x8[_0x8270[23]]()[_0x8270[9]](function(){return _0x4447x5[_0x8270[13]](204)})[_0x8270[6]](function(_0x4447x6){return handleError(_0x4447x5,_0x4447x6)})})[_0x8270[6]](function(_0x4447x6){return handleError(_0x4447x5,_0x4447x6)})};exports[_0x8270[24]]=function(_0x4447x4,_0x4447x5,_0x4447xa){ZendeskConfiguration[_0x8270[22]](_0x4447x4[_0x8270[15]][_0x8270[14]])[_0x8270[9]](function(_0x4447xb){if(!_0x4447xb){return _0x4447x5[_0x8270[13]](500)};ZendeskField[_0x8270[17]](_0x4447x4[_0x8270[18]])[_0x8270[9]](function(_0x4447xc){switch(_0x4447x4[_0x8270[15]][_0x8270[31]]){case _0x8270[26]:_0x4447xb[_0x8270[25]](_0x4447xc)[_0x8270[9]](function(){return _0x4447x5[_0x8270[8]](200)[_0x8270[7]](_0x4447xc)})[_0x8270[6]](function(_0x4447x6){return handleError(_0x4447x5,_0x4447x6)});break;case _0x8270[28]:_0x4447xb[_0x8270[27]](_0x4447xc)[_0x8270[9]](function(){return _0x4447x5[_0x8270[8]](200)[_0x8270[7]](_0x4447xc)})[_0x8270[6]](function(_0x4447x6){return handleError(_0x4447x5,_0x4447x6)});break;case _0x8270[30]:_0x4447xb[_0x8270[29]](_0x4447xc)[_0x8270[9]](function(){return _0x4447x5[_0x8270[8]](200)[_0x8270[7]](_0x4447xc)})[_0x8270[6]](function(_0x4447x6){return handleError(_0x4447x5,_0x4447x6)});break}})[_0x8270[6]](function(_0x4447x6){return handleError(_0x4447x5,_0x4447x6)})})[_0x8270[6]](function(_0x4447x6){return handleError(_0x4447x5,_0x4447x6)})};exports[_0x8270[32]]=function(_0x4447x4,_0x4447x5,_0x4447xa){ZendeskConfiguration[_0x8270[22]](_0x4447x4[_0x8270[15]][_0x8270[14]])[_0x8270[9]](handleEntityNotFound(_0x4447x5))[_0x8270[9]](function(_0x4447xb){return _0x4447xb[_0x8270[34]](_0x4447x4[_0x8270[18]])})[_0x8270[9]](function(_0x4447xd){return _0x4447x5[_0x8270[13]](200)})[_0x8270[6]](function(_0x4447x6){console[_0x8270[33]](_0x4447x6);return handleError(_0x4447x5,_0x4447x6)})};function handleEntityNotFound(_0x4447x5){return function(_0x4447xf){if(!_0x4447xf){_0x4447x5[_0x8270[8]](404)[_0x8270[35]]();return null};return _0x4447xf}}function handleError(_0x4447x5,_0x4447x6){return _0x4447x5[_0x8270[8]](500)[_0x8270[7]](_0x4447x6)} \ No newline at end of file diff --git a/server/api/zendesk_configuration/zendesk_configuration.socket.js b/server/api/zendesk_configuration/zendesk_configuration.socket.js index d9a56f1..f5235bd 100644 --- a/server/api/zendesk_configuration/zendesk_configuration.socket.js +++ b/server/api/zendesk_configuration/zendesk_configuration.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0x4f3e=["\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"];_0x4f3e[0];var ZendeskConfiguration=require(_0x4f3e[2])[_0x4f3e[1]];exports[_0x4f3e[3]]=function(_0x4c8fx2){ZendeskConfiguration[_0x4f3e[4]](function(_0x4c8fx3){onSave(_0x4c8fx2,_0x4c8fx3)});ZendeskConfiguration[_0x4f3e[5]](function(_0x4c8fx3){onRemove(_0x4c8fx2,_0x4c8fx3)})};function onSave(_0x4c8fx2,_0x4c8fx3,_0x4c8fx5){_0x4c8fx2[_0x4f3e[7]](_0x4f3e[6],_0x4c8fx3)}function onRemove(_0x4c8fx2,_0x4c8fx3,_0x4c8fx5){_0x4c8fx2[_0x4f3e[7]](_0x4f3e[8],_0x4c8fx3)} \ No newline at end of file diff --git a/server/api/zendesk_configuration/zendesk_configuration.spec.js b/server/api/zendesk_configuration/zendesk_configuration.spec.js index 3589f5d..accb125 100644 --- a/server/api/zendesk_configuration/zendesk_configuration.spec.js +++ b/server/api/zendesk_configuration/zendesk_configuration.spec.js @@ -1,20 +1 @@ -'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 +var _0x2459=["\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"];_0x2459[0];var should=require(_0x2459[1]);var app=require(_0x2459[2]);var request=require(_0x2459[3]);describe(_0x2459[4],function(){it(_0x2459[5],function(_0xa848x4){request(app)[_0x2459[13]](_0x2459[12])[_0x2459[11]](200)[_0x2459[11]](_0x2459[10],/json/)[_0x2459[9]](function(_0xa848x5,_0xa848x6){if(_0xa848x5){return _0xa848x4(_0xa848x5)};_0xa848x6[_0x2459[8]][_0x2459[1]][_0x2459[7]][_0x2459[6]](Array);_0xa848x4()})})}) \ No newline at end of file diff --git a/server/api/zendesk_field/index.js b/server/api/zendesk_field/index.js index 76f5c48..1df848b 100644 --- a/server/api/zendesk_field/index.js +++ b/server/api/zendesk_field/index.js @@ -1,15 +1 @@ -'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; +var _0x3d51=["\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"];_0x3d51[0];var express=require(_0x3d51[1]);var controller=require(_0x3d51[2]);var router=express.Router();router[_0x3d51[5]](_0x3d51[3],controller[_0x3d51[4]]);router[_0x3d51[5]](_0x3d51[6],controller[_0x3d51[7]]);router[_0x3d51[9]](_0x3d51[3],controller[_0x3d51[8]]);router[_0x3d51[11]](_0x3d51[6],controller[_0x3d51[10]]);router[_0x3d51[12]](_0x3d51[6],controller[_0x3d51[10]]);router[_0x3d51[14]](_0x3d51[6],controller[_0x3d51[13]]);module[_0x3d51[15]]=router \ No newline at end of file diff --git a/server/api/zendesk_field/zendesk_field.controller.js b/server/api/zendesk_field/zendesk_field.controller.js index 48d0c38..9bf005c 100644 --- a/server/api/zendesk_field/zendesk_field.controller.js +++ b/server/api/zendesk_field/zendesk_field.controller.js @@ -1,93 +1 @@ -'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); -} +var _0xb135=["\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"];_0xb135[0];var _=require(_0xb135[1]);var ZendeskField=require(_0xb135[3])[_0xb135[2]];exports[_0xb135[4]]=function(_0xe193x3,_0xe193x4){ZendeskField[_0xb135[9]]()[_0xb135[8]](function(_0xe193x6){return _0xe193x4[_0xb135[7]](200)[_0xb135[6]](_0xe193x6)})[_0xb135[5]](function(_0xe193x5){return handleError(_0xe193x4,_0xe193x5)})};exports[_0xb135[10]]=function(_0xe193x3,_0xe193x4){ZendeskField[_0xb135[14]](_0xe193x3[_0xb135[13]][_0xb135[12]])[_0xb135[8]](function(_0xe193x7){if(!_0xe193x7){return _0xe193x4[_0xb135[11]](404)};return _0xe193x4[_0xb135[6]](_0xe193x7)})[_0xb135[5]](function(_0xe193x5){return handleError(_0xe193x4,_0xe193x5)})};exports[_0xb135[15]]=function(_0xe193x3,_0xe193x4){ZendeskField[_0xb135[15]](_0xe193x3[_0xb135[16]])[_0xb135[8]](function(_0xe193x7){return _0xe193x4[_0xb135[7]](201)[_0xb135[6]](_0xe193x7)})[_0xb135[5]](function(_0xe193x5){return handleError(_0xe193x4,_0xe193x5)})};exports[_0xb135[17]]=function(_0xe193x3,_0xe193x4){if(_0xe193x3[_0xb135[16]][_0xb135[12]]){delete _0xe193x3[_0xb135[16]][_0xb135[12]]};ZendeskField[_0xb135[14]](_0xe193x3[_0xb135[13]][_0xb135[12]])[_0xb135[8]](function(_0xe193x7){if(!_0xe193x7){return _0xe193x4[_0xb135[11]](404)};var _0xe193x8=_[_0xb135[18]](_0xe193x7,_0xe193x3[_0xb135[16]]);_0xe193x8[_0xb135[19]]()[_0xb135[8]](function(){return _0xe193x4[_0xb135[7]](200)[_0xb135[6]](_0xe193x7)})[_0xb135[5]](function(_0xe193x5){return handleError(_0xe193x4,_0xe193x5)})})[_0xb135[5]](function(_0xe193x5){return handleError(_0xe193x4,_0xe193x5)})};exports[_0xb135[20]]=function(_0xe193x3,_0xe193x4){ZendeskField[_0xb135[14]](_0xe193x3[_0xb135[13]][_0xb135[12]])[_0xb135[8]](function(_0xe193x7){if(!_0xe193x7){return _0xe193x4[_0xb135[11]](404)};_0xe193x7[_0xb135[20]]()[_0xb135[8]](function(){return _0xe193x4[_0xb135[11]](204)})[_0xb135[5]](function(_0xe193x5){return handleError(_0xe193x4,_0xe193x5)})})[_0xb135[5]](function(_0xe193x5){return handleError(_0xe193x4,_0xe193x5)})};function handleError(_0xe193x4,_0xe193x5){return _0xe193x4[_0xb135[7]](500)[_0xb135[6]](_0xe193x5)} \ No newline at end of file diff --git a/server/api/zendesk_field/zendesk_field.socket.js b/server/api/zendesk_field/zendesk_field.socket.js index 8a5419b..d4f8e55 100644 --- a/server/api/zendesk_field/zendesk_field.socket.js +++ b/server/api/zendesk_field/zendesk_field.socket.js @@ -1,24 +1 @@ -/** - * 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); -} +var _0xc95f=["\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"];_0xc95f[0];var ZendeskField=require(_0xc95f[2])[_0xc95f[1]];exports[_0xc95f[3]]=function(_0xe970x2){ZendeskField[_0xc95f[4]](function(_0xe970x3){onSave(_0xe970x2,_0xe970x3)});ZendeskField[_0xc95f[5]](function(_0xe970x3){onRemove(_0xe970x2,_0xe970x3)})};function onSave(_0xe970x2,_0xe970x3,_0xe970x5){_0xe970x2[_0xc95f[7]](_0xc95f[6],_0xe970x3)}function onRemove(_0xe970x2,_0xe970x3,_0xe970x5){_0xe970x2[_0xc95f[7]](_0xc95f[8],_0xe970x3)} \ No newline at end of file diff --git a/server/api/zendesk_field/zendesk_field.spec.js b/server/api/zendesk_field/zendesk_field.spec.js index 1527fe8..25fddda 100644 --- a/server/api/zendesk_field/zendesk_field.spec.js +++ b/server/api/zendesk_field/zendesk_field.spec.js @@ -1,20 +1 @@ -'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(); - }); - }); -}); +var _0x28e6=["\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"];_0x28e6[0];var should=require(_0x28e6[1]);var app=require(_0x28e6[2]);var request=require(_0x28e6[3]);describe(_0x28e6[4],function(){it(_0x28e6[5],function(_0x4563x4){request(app)[_0x28e6[13]](_0x28e6[12])[_0x28e6[11]](200)[_0x28e6[11]](_0x28e6[10],/json/)[_0x28e6[9]](function(_0x4563x5,_0x4563x6){if(_0x4563x5){return _0x4563x4(_0x4563x5)};_0x4563x6[_0x28e6[8]][_0x28e6[1]][_0x28e6[7]][_0x28e6[6]](Array);_0x4563x4()})})}) \ No newline at end of file diff --git a/server/app.js b/server/app.js index 08fbec6..763f02a 100644 --- a/server/app.js +++ b/server/app.js @@ -1,113 +1 @@ -/** - * 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; +var _0xe5a8=["\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"];_0xe5a8[0];process[_0xe5a8[2]][_0xe5a8[1]]=process[_0xe5a8[2]][_0xe5a8[1]]||_0xe5a8[3];process[_0xe5a8[2]][_0xe5a8[4]]=0;process[_0xe5a8[14]](_0xe5a8[5],function(_0xa505x1){if( typeof _0xa505x1===_0xe5a8[6]){if(_0xa505x1[_0xe5a8[7]]){console[_0xe5a8[9]](_0xe5a8[8]+_0xa505x1[_0xe5a8[7]])};if(_0xa505x1[_0xe5a8[10]]){console[_0xe5a8[9]](_0xe5a8[11]);console[_0xe5a8[9]](_0xe5a8[12]);console[_0xe5a8[9]](_0xa505x1[_0xe5a8[10]])}}else {console[_0xe5a8[9]](_0xe5a8[13])}});var os=require(_0xe5a8[15]);var http=require(_0xe5a8[16]);var util=require(_0xe5a8[17]);var crypto=require(_0xe5a8[18]);var cronjob=require(_0xe5a8[20])[_0xe5a8[19]];var shelljs=require(_0xe5a8[21]);var express=require(_0xe5a8[22]);var models=require(_0xe5a8[23]);var config=require(_0xe5a8[24]);var Settings=models[_0xe5a8[25]];var app=express();var server=require(_0xe5a8[16])[_0xe5a8[26]](app);var io=require(_0xe5a8[29])(server,{serveClient:(config[_0xe5a8[2]]===_0xe5a8[27])?false:true,path:_0xe5a8[28]});var ami=require(_0xe5a8[35])(config[_0xe5a8[31]][_0xe5a8[30]],config[_0xe5a8[31]][_0xe5a8[32]],config[_0xe5a8[31]][_0xe5a8[33]],config[_0xe5a8[31]][_0xe5a8[34]],true);ami[_0xe5a8[36]]();var kue=require(_0xe5a8[37]);kue[_0xe5a8[39]][_0xe5a8[38]](3001);var _setting;var _license;require(_0xe5a8[40])(app);require(_0xe5a8[41])(app);models[_0xe5a8[67]][_0xe5a8[46]]()[_0xe5a8[45]](function(){require(_0xe5a8[41])(app);if(config[_0xe5a8[48]]){require(_0xe5a8[49])};if(config[_0xe5a8[50]]){require(_0xe5a8[51])};require(_0xe5a8[52])(io);require(_0xe5a8[53])();require(_0xe5a8[54])();require(_0xe5a8[55])();require(_0xe5a8[56])();require(_0xe5a8[57])(ami);require(_0xe5a8[58])();require(_0xe5a8[59])();require(_0xe5a8[60])();require(_0xe5a8[61])(ami);require(_0xe5a8[62])();require(_0xe5a8[63])();server[_0xe5a8[38]](config[_0xe5a8[30]],config[_0xe5a8[64]],function(){console[_0xe5a8[9]](_0xe5a8[65],config[_0xe5a8[30]],app[_0xe5a8[66]](_0xe5a8[2]))})})[_0xe5a8[45]](function(){return models[_0xe5a8[47]][_0xe5a8[46]]()})[_0xe5a8[45]](function(){require(_0xe5a8[44])(cronjob)})[_0xe5a8[43]](function(_0xa505x1){console[_0xe5a8[42]](_0xa505x1)});exports=module[_0xe5a8[68]]=app \ No newline at end of file diff --git a/server/auth/auth.service.js b/server/auth/auth.service.js index ddfe6e1..4d9d821 100644 --- a/server/auth/auth.service.js +++ b/server/auth/auth.service.js @@ -1,95 +1 @@ -'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 List = require('../models').List; -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: List - }] - }) - .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; +var _0xaaed=["\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","\x4C\x69\x73\x74","\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"];_0xaaed[0];var passport=require(_0xaaed[1]);var config=require(_0xaaed[2]);var jwt=require(_0xaaed[3]);var expressJwt=require(_0xaaed[4]);var compose=require(_0xaaed[5]);var User=require(_0xaaed[7])[_0xaaed[6]];var List=require(_0xaaed[7])[_0xaaed[8]];var validateJwt=expressJwt({secret:config[_0xaaed[10]][_0xaaed[9]]});function isAuthenticated(){return compose()[_0xaaed[17]](function(_0x8373xa,_0x8373xb,_0x8373xc){if(_0x8373xa[_0xaaed[18]]&&_0x8373xa[_0xaaed[18]][_0xaaed[20]](_0xaaed[19])){_0x8373xa[_0xaaed[22]][_0xaaed[21]]=_0xaaed[23]+_0x8373xa[_0xaaed[18]][_0xaaed[19]]};validateJwt(_0x8373xa,_0x8373xb,_0x8373xc)})[_0xaaed[17]](function(_0x8373xa,_0x8373xb,_0x8373xc){User[_0xaaed[16]](_0x8373xa[_0xaaed[13]][_0xaaed[15]],{include:[{model:List}]})[_0xaaed[14]](function(_0x8373xe){if(!_0x8373xe){return _0x8373xb[_0xaaed[12]](401)};_0x8373xa[_0xaaed[13]]=_0x8373xe;return _0x8373xc()})[_0xaaed[11]](function(_0x8373xd){return _0x8373xc(_0x8373xd)})})}function hasRole(_0x8373x10){if(!_0x8373x10){throw new Error(_0xaaed[24])};return compose()[_0xaaed[17]](isAuthenticated())[_0xaaed[17]](function _0x8373x11(_0x8373xa,_0x8373xb,_0x8373xc){if(config[_0xaaed[27]][_0xaaed[26]](_0x8373xa[_0xaaed[13]][_0xaaed[25]])>=config[_0xaaed[27]][_0xaaed[26]](_0x8373x10)){return _0x8373xc()}else {return _0x8373xb[_0xaaed[12]](403)}})}function signToken(_0x8373x13,_0x8373x14,_0x8373x15){var _0x8373x16=60*24*365*5;if(!_0x8373x15){_0x8373x16=_0xaaed[28]};return jwt[_0xaaed[29]]({id:_0x8373x13},config[_0xaaed[10]][_0xaaed[9]],{expiresIn:_0x8373x16})}function setTokenCookie(_0x8373xa,_0x8373xb){if(!_0x8373xa[_0xaaed[13]]){return _0x8373xb[_0xaaed[31]](404,{message:_0xaaed[30]})};var _0x8373x18=signToken(_0x8373xa[_0xaaed[13]][_0xaaed[15]],_0x8373xa[_0xaaed[13]][_0xaaed[25]]);_0x8373xb[_0xaaed[34]](_0xaaed[32],JSON[_0xaaed[33]](_0x8373x18));_0x8373xb[_0xaaed[36]](_0xaaed[35])}exports[_0xaaed[37]]=isAuthenticated;exports[_0xaaed[38]]=hasRole;exports[_0xaaed[39]]=signToken;exports[_0xaaed[40]]=setTokenCookie \ No newline at end of file diff --git a/server/auth/facebook/index.js b/server/auth/facebook/index.js index 4a6f878..4a2c448 100644 --- a/server/auth/facebook/index.js +++ b/server/auth/facebook/index.js @@ -1,21 +1 @@ -'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 +var _0xfae4=["\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"];_0xfae4[0];var express=require(_0xfae4[1]);var passport=require(_0xfae4[2]);var auth=require(_0xfae4[3]);var router=express.Router();router[_0xfae4[9]](_0xfae4[10],passport[_0xfae4[7]](_0xfae4[5],{scope:[_0xfae4[11],_0xfae4[12]],failureRedirect:_0xfae4[6],session:false}))[_0xfae4[9]](_0xfae4[4],passport[_0xfae4[7]](_0xfae4[5],{failureRedirect:_0xfae4[6],session:false}),auth[_0xfae4[8]]);module[_0xfae4[13]]=router \ No newline at end of file diff --git a/server/auth/facebook/passport.js b/server/auth/facebook/passport.js index 90ae489..eaeae8d 100644 --- a/server/auth/facebook/passport.js +++ b/server/auth/facebook/passport.js @@ -1,37 +1 @@ -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 +var _0x7e67=["\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(_0x7e67[0]);var FacebookStrategy=require(_0x7e67[2])[_0x7e67[1]];exports[_0x7e67[3]]=function(_0xb82bx3,_0xb82bx4){passport[_0x7e67[17]]( new FacebookStrategy({clientID:_0xb82bx4[_0x7e67[5]][_0x7e67[4]],clientSecret:_0xb82bx4[_0x7e67[5]][_0x7e67[6]],callbackURL:_0xb82bx4[_0x7e67[5]][_0x7e67[7]]},function(_0xb82bx5,_0xb82bx6,_0xb82bx7,_0xb82bx8){_0xb82bx3[_0x7e67[16]]({"\x66\x61\x63\x65\x62\x6F\x6F\x6B\x2E\x69\x64":_0xb82bx7[_0x7e67[8]]},function(_0xb82bx9,_0xb82bxa){if(_0xb82bx9){return _0xb82bx8(_0xb82bx9)};if(!_0xb82bxa){_0xb82bxa= new _0xb82bx3({name:_0xb82bx7[_0x7e67[9]],email:_0xb82bx7[_0x7e67[11]][0][_0x7e67[10]],role:_0x7e67[12],username:_0xb82bx7[_0x7e67[13]],provider:_0x7e67[5],facebook:_0xb82bx7[_0x7e67[14]]});_0xb82bxa[_0x7e67[15]](function(_0xb82bx9){if(_0xb82bx9){_0xb82bx8(_0xb82bx9)};return _0xb82bx8(_0xb82bx9,_0xb82bxa)})}else {return _0xb82bx8(_0xb82bx9,_0xb82bxa)}})}))} \ No newline at end of file diff --git a/server/auth/google/index.js b/server/auth/google/index.js index 9b1ce39..06a86c5 100644 --- a/server/auth/google/index.js +++ b/server/auth/google/index.js @@ -1,24 +1 @@ -'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 +var _0xf57c=["\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"];_0xf57c[0];var express=require(_0xf57c[1]);var passport=require(_0xf57c[2]);var auth=require(_0xf57c[3]);var router=express.Router();router[_0xf57c[9]](_0xf57c[10],passport[_0xf57c[7]](_0xf57c[5],{failureRedirect:_0xf57c[6],scope:[_0xf57c[11],_0xf57c[12]],session:false}))[_0xf57c[9]](_0xf57c[4],passport[_0xf57c[7]](_0xf57c[5],{failureRedirect:_0xf57c[6],session:false}),auth[_0xf57c[8]]);module[_0xf57c[13]]=router \ No newline at end of file diff --git a/server/auth/google/passport.js b/server/auth/google/passport.js index d304e8a..06aa59b 100644 --- a/server/auth/google/passport.js +++ b/server/auth/google/passport.js @@ -1,33 +1 @@ -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); - } - }); - } - )); -}; +var _0xb3af=["\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(_0xb3af[0]);var GoogleStrategy=require(_0xb3af[2])[_0xb3af[1]];exports[_0xb3af[3]]=function(_0x1ef5x3,_0x1ef5x4){passport[_0xb3af[17]]( new GoogleStrategy({clientID:_0x1ef5x4[_0xb3af[5]][_0xb3af[4]],clientSecret:_0x1ef5x4[_0xb3af[5]][_0xb3af[6]],callbackURL:_0x1ef5x4[_0xb3af[5]][_0xb3af[7]]},function(_0x1ef5x5,_0x1ef5x6,_0x1ef5x7,_0x1ef5x8){_0x1ef5x3[_0xb3af[16]]({"\x67\x6F\x6F\x67\x6C\x65\x2E\x69\x64":_0x1ef5x7[_0xb3af[8]]},function(_0x1ef5x9,_0x1ef5xa){if(!_0x1ef5xa){_0x1ef5xa= new _0x1ef5x3({name:_0x1ef5x7[_0xb3af[9]],email:_0x1ef5x7[_0xb3af[11]][0][_0xb3af[10]],role:_0xb3af[12],username:_0x1ef5x7[_0xb3af[13]],provider:_0xb3af[5],google:_0x1ef5x7[_0xb3af[14]]});_0x1ef5xa[_0xb3af[15]](function(_0x1ef5x9){if(_0x1ef5x9){_0x1ef5x8(_0x1ef5x9)};return _0x1ef5x8(_0x1ef5x9,_0x1ef5xa)})}else {return _0x1ef5x8(_0x1ef5x9,_0x1ef5xa)}})}))} \ No newline at end of file diff --git a/server/auth/index.js b/server/auth/index.js index a034241..8e9b5f9 100644 --- a/server/auth/index.js +++ b/server/auth/index.js @@ -1,22 +1 @@ -'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; +var _0xf8d0=["\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"];_0xf8d0[0];var express=require(_0xf8d0[1]);var passport=require(_0xf8d0[2]);var config=require(_0xf8d0[3]);var User=require(_0xf8d0[5])[_0xf8d0[4]];require(_0xf8d0[7])[_0xf8d0[6]](User,config);require(_0xf8d0[8])[_0xf8d0[6]](User,config);require(_0xf8d0[9])[_0xf8d0[6]](User,config);require(_0xf8d0[10])[_0xf8d0[6]](User,config);var router=express.Router();router[_0xf8d0[13]](_0xf8d0[11],require(_0xf8d0[12]));router[_0xf8d0[13]](_0xf8d0[14],require(_0xf8d0[15]));router[_0xf8d0[13]](_0xf8d0[16],require(_0xf8d0[17]));router[_0xf8d0[13]](_0xf8d0[18],require(_0xf8d0[19]));module[_0xf8d0[20]]=router \ No newline at end of file diff --git a/server/auth/local/index.js b/server/auth/local/index.js index d60d5e0..79e1e26 100644 --- a/server/auth/local/index.js +++ b/server/auth/local/index.js @@ -1,63 +1 @@ -'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; +var _0xefee=["\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"];_0xefee[0];var express=require(_0xefee[1]);var passport=require(_0xefee[2]);var async=require(_0xefee[3]);var auth=require(_0xefee[4]);var User=require(_0xefee[6])[_0xefee[5]];var Action=require(_0xefee[6])[_0xefee[7]];var ReportMember=require(_0xefee[6])[_0xefee[8]];var license=require(_0xefee[9]);var channels=[_0xefee[10],_0xefee[11],_0xefee[12],_0xefee[13]];var router=express.Router();router[_0xefee[30]](_0xefee[14],function(_0xed48xb,_0xed48xc,_0xed48xd){passport[_0xefee[29]](_0xefee[15],function(_0xed48xe,_0xed48xf,_0xed48x10){var _0xed48x11=_0xed48xe||_0xed48x10;if(_0xed48x11){return _0xed48xc[_0xefee[17]](401)[_0xefee[16]](_0xed48x11)};if(!_0xed48xf){return _0xed48xc[_0xefee[17]](404)[_0xefee[16]]({message:_0xefee[18]})};return Action[_0xefee[28]]({name:_0xefee[26],data1:_0xed48xf[_0xefee[21]],data2:_0xed48xf[_0xefee[27]],UserId:_0xed48xf[_0xefee[21]]})[_0xefee[25]](function(_0xed48x12){return _0xed48xc[_0xefee[16]]({role:_0xed48xf[_0xefee[20]],token:auth[_0xefee[24]](_0xed48xf[_0xefee[21]],_0xed48xf[_0xefee[20]],_0xed48xb[_0xefee[23]][_0xefee[22]]||false),userId:_0xed48xf[_0xefee[21]]})})[_0xefee[19]](function(_0xed48xe){return _0xed48xd(_0xed48xe)})})(_0xed48xb,_0xed48xc,_0xed48xd)});router[_0xefee[36]](_0xefee[31],auth[_0xefee[32]](),function(_0xed48xb,_0xed48xc,_0xed48xd){return Action[_0xefee[28]]({name:_0xefee[33],data1:_0xed48xb[_0xefee[35]][_0xefee[21]],data2:_0xed48xb[_0xefee[35]][_0xefee[27]],UserId:_0xed48xb[_0xefee[35]][_0xefee[21]]})[_0xefee[25]](function(){_0xed48xb[_0xefee[33]]();_0xed48xc[_0xefee[34]](_0xefee[14])})[_0xefee[19]](function(_0xed48xe){return _0xed48xd(_0xed48xe)})});module[_0xefee[37]]=router \ No newline at end of file diff --git a/server/auth/local/local.ami.js b/server/auth/local/local.ami.js index bfb533d..6e6e36b 100644 --- a/server/auth/local/local.ami.js +++ b/server/auth/local/local.ami.js @@ -1,51 +1 @@ -/** - * 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); -} +var _0x9feb=["\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"];_0x9feb[0];var util=require(_0x9feb[1]);var amiController=require(_0x9feb[2]);exports[_0x9feb[3]]=function(_0xdb98x3,_0xdb98x4,_0xdb98x5,_0xdb98x6){var _0xdb98x7={action:_0x9feb[4],queue:_0xdb98x5,interface:util[_0x9feb[6]](_0x9feb[5],_0xdb98x4),paused:false};_0xdb98x7[_0x9feb[7]]=JSON[_0x9feb[8]](_0xdb98x7);_0xdb98x7[_0x9feb[9]]=_0xdb98x3;amiController[_0x9feb[12]](_0xdb98x7,function(_0xdb98x8,_0xdb98x9){if(_0xdb98x8){console[_0x9feb[10]](_0xdb98x8)};var _0xdb98x7={action:_0x9feb[11],queue:_0xdb98x5,interface:util[_0x9feb[6]](_0x9feb[5],_0xdb98x4)};_0xdb98x7[_0x9feb[7]]=JSON[_0x9feb[8]](_0xdb98x7);_0xdb98x7[_0x9feb[9]]=_0xdb98x3;amiController[_0x9feb[12]](_0xdb98x7,_0xdb98x6)})};exports[_0x9feb[13]]=function(_0xdb98x3,_0xdb98x4,_0xdb98x5,_0xdb98x6){var _0xdb98x7={action:_0x9feb[14],queue:_0xdb98x5,interface:util[_0x9feb[6]](_0x9feb[5],_0xdb98x4),penalty:0,paused:false,membername:_0xdb98x4};_0xdb98x7[_0x9feb[7]]=JSON[_0x9feb[8]](_0xdb98x7);_0xdb98x7[_0x9feb[9]]=_0xdb98x3;amiController[_0x9feb[12]](_0xdb98x7,_0xdb98x6)} \ No newline at end of file diff --git a/server/auth/local/passport.js b/server/auth/local/passport.js index e602ae6..70ca64c 100644 --- a/server/auth/local/passport.js +++ b/server/auth/local/passport.js @@ -1,93 +1 @@ -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); - // } - // } - // )); - -}; +var _0x4d84=["\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(_0x4d84[0]);var LocalStrategy=require(_0x4d84[2])[_0x4d84[1]];var Settings=require(_0x4d84[4])[_0x4d84[3]];var license=require(_0x4d84[5]);exports[_0x4d84[6]]=function(_0x9154x5,_0x9154x6){passport[_0x4d84[17]](_0x4d84[7], new LocalStrategy({usernameField:_0x4d84[8],passwordField:_0x4d84[9]},function(_0x9154x7,_0x9154x8,_0x9154x9){var _0x9154xa;var _0x9154xb;var _0x9154xc;return _0x9154x5[_0x4d84[16]]({where:{name:_0x9154x7}})[_0x4d84[12]](function(_0x9154xf){_0x9154xa=_0x9154xf;if(!_0x9154xa||!_0x9154xf[_0x4d84[14]](_0x9154x8)){throw new Error({message:_0x4d84[15]})};return _0x9154xa})[_0x4d84[12]](license[_0x4d84[13]]())[_0x4d84[12]](function(_0x9154xe){if(_0x9154xe){return _0x9154x9(null,_0x9154xa)}else {return _0x9154x9(null,false,{message:_0x4d84[11]})}})[_0x4d84[10]](function(_0x9154xd){return _0x9154x9(null,false,_0x9154xd)})}))} \ No newline at end of file diff --git a/server/auth/twitter/index.js b/server/auth/twitter/index.js index 8360247..77c4f9e 100644 --- a/server/auth/twitter/index.js +++ b/server/auth/twitter/index.js @@ -1,20 +1 @@ -'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 +var _0x81d8=["\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"];_0x81d8[0];var express=require(_0x81d8[1]);var passport=require(_0x81d8[2]);var auth=require(_0x81d8[3]);var router=express.Router();router[_0x81d8[9]](_0x81d8[10],passport[_0x81d8[7]](_0x81d8[5],{failureRedirect:_0x81d8[6],session:false}))[_0x81d8[9]](_0x81d8[4],passport[_0x81d8[7]](_0x81d8[5],{failureRedirect:_0x81d8[6],session:false}),auth[_0x81d8[8]]);module[_0x81d8[11]]=router \ No newline at end of file diff --git a/server/auth/twitter/passport.js b/server/auth/twitter/passport.js index a2eb4a5..f829787 100644 --- a/server/auth/twitter/passport.js +++ b/server/auth/twitter/passport.js @@ -1,35 +1 @@ -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 +var _0xaaf9=["\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[_0xaaf9[0]]=function(_0xa24ex1,_0xa24ex2){var _0xa24ex3=require(_0xaaf9[1]);var _0xa24ex4=require(_0xaaf9[3])[_0xaaf9[2]];_0xa24ex3[_0xaaf9[15]]( new _0xa24ex4({consumerKey:_0xa24ex2[_0xaaf9[5]][_0xaaf9[4]],consumerSecret:_0xa24ex2[_0xaaf9[5]][_0xaaf9[6]],callbackURL:_0xa24ex2[_0xaaf9[5]][_0xaaf9[7]]},function(_0xa24ex5,_0xa24ex6,_0xa24ex7,_0xa24ex8){_0xa24ex1[_0xaaf9[14]]({"\x74\x77\x69\x74\x74\x65\x72\x2E\x69\x64\x5F\x73\x74\x72":_0xa24ex7[_0xaaf9[8]]},function(_0xa24ex9,_0xa24exa){if(_0xa24ex9){return _0xa24ex8(_0xa24ex9)};if(!_0xa24exa){_0xa24exa= new _0xa24ex1({name:_0xa24ex7[_0xaaf9[9]],username:_0xa24ex7[_0xaaf9[10]],role:_0xaaf9[11],provider:_0xaaf9[5],twitter:_0xa24ex7[_0xaaf9[12]]});_0xa24exa[_0xaaf9[13]](function(_0xa24ex9){if(_0xa24ex9){return _0xa24ex8(_0xa24ex9)};return _0xa24ex8(_0xa24ex9,_0xa24exa)})}else {return _0xa24ex8(_0xa24ex9,_0xa24exa)}})}))} \ No newline at end of file diff --git a/server/config/agi.js b/server/config/agi.js index 23d9a91..0e6d172 100644 --- a/server/config/agi.js +++ b/server/config/agi.js @@ -1,1217 +1 @@ -'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.intKey, vertex.speed, 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), vertex.timeout, vertex.intKey, - vertex.beep === 'BEEP' ? '' : vertex.beep, vertex.key - ]; - console.log('Calling Ispeech 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); -}; +var _0x9042=["\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","\x69\x6E\x74\x4B\x65\x79","\x73\x70\x65\x65\x64","\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","\x62\x65\x65\x70","\x42\x45\x45\x50","\x43\x61\x6C\x6C\x69\x6E\x67\x20\x49\x73\x70\x65\x65\x63\x68\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"];_0x9042[0];var _=require(_0x9042[1]);var agi=require(_0x9042[2]);var util=require(_0x9042[3]);var moment=require(_0x9042[4]);var xml=require(_0x9042[5]);var wait=require(_0x9042[6]);var sr=require(_0x9042[7]);var path=require(_0x9042[8]);var config=require(_0x9042[9]);var sh=require(_0x9042[10]);var db=require(_0x9042[11])();var SquareProject=require(_0x9042[13])[_0x9042[12]];var Variable=require(_0x9042[13])[_0x9042[14]];var SquareOdbc=require(_0x9042[13])[_0x9042[15]];var Settings=require(_0x9042[13])[_0x9042[16]];var User=require(_0x9042[13])[_0x9042[17]];var VoiceQueue=require(_0x9042[13])[_0x9042[18]];var Trunk=require(_0x9042[13])[_0x9042[19]];var Interval=require(_0x9042[13])[_0x9042[20]];var Sound=require(_0x9042[13])[_0x9042[21]];var ReportSquare=require(_0x9042[13])[_0x9042[22]];var ReportSquareDetail=require(_0x9042[13])[_0x9042[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[_0x9042[24]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[25]);console[_0x9042[26]](_0x9042[27]);_0x324ax24[_0x9042[29]](_0x9042[28],function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[30]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[31]);console[_0x9042[26]](_0x9042[32]+_0x324ax25[_0x9042[33]]+_0x9042[34]);_0x324ax24[_0x9042[36]](_0x324ax25[_0x9042[33]],_0x324ax25[_0x9042[35]],function(_0x324ax27,_0x324ax28){if(_0x324ax26){_0x324ax26(_0x324ax27,_0x324ax28)}})};methods[_0x9042[37]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[38]);if(!users){getUsers(false)};var _0x324ax29=_[_0x9042[40]](users,{id:parseInt(_0x324ax25[_0x9042[39]])});console[_0x9042[26]](_0x9042[41]+util[_0x9042[44]](_0x9042[42],_0x324ax29[_0x9042[43]])+_0x9042[45]);var _0x324ax2a=[util[_0x9042[44]](_0x9042[42],_0x324ax29[_0x9042[43]]),_0x324ax25[_0x9042[46]],_0x324ax25[_0x9042[47]],_0x324ax25[_0x9042[48]]];_0x324ax24[_0x9042[36]](_0x9042[49],_0x324ax2a[_0x9042[51]](_0x9042[50]),function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[52]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[53]);if(!trunks){getTrunks(false)};var _0x324ax2b=_[_0x9042[40]](trunks,{id:parseInt(_0x324ax25[_0x9042[54]])});console[_0x9042[26]](_0x9042[41]+util[_0x9042[44]](_0x9042[42],_0x324ax2b[_0x9042[43]])+_0x9042[45]);var _0x324ax2a=[util[_0x9042[44]](_0x9042[55],_0x324ax25[_0x9042[56]],_0x324ax2b[_0x9042[43]]),_0x324ax25[_0x9042[46]],_0x324ax25[_0x9042[47]],_0x324ax25[_0x9042[48]]];_0x324ax24[_0x9042[36]](_0x9042[49],_0x324ax2a[_0x9042[51]](_0x9042[50]),function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[57]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[58]);if(!queues){getQueues(false)};var _0x324ax2c=_[_0x9042[40]](queues,{name:_0x324ax25[_0x9042[59]]});var _0x324ax2d=getFilePath(_0x324ax25[_0x9042[60]]);var _0x324ax2a=[_0x324ax2c[_0x9042[43]],_0x324ax25[_0x9042[47]],_0x324ax25[_0x9042[48]],_0x324ax2d,_0x324ax25[_0x9042[46]],_0x324ax25[_0x9042[2]],_0x324ax25[_0x9042[61]],_0x324ax25[_0x9042[62]],_0x9042[63],_0x324ax25[_0x9042[64]]];console[_0x9042[26]](_0x9042[65]+_0x324ax2c[_0x9042[43]]+_0x9042[66]);_0x324ax24[_0x9042[36]](_0x9042[67],_0x324ax2a[_0x9042[51]](_0x9042[50]),function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[68]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[69]);var _0x324ax2a=[_0x324ax25[_0x9042[70]],_0x324ax25[_0x9042[47]]];var _0x324ax2e={uniqueid:_0x324ax24[_0x9042[71]],node:_0x324ax25[_0x9042[72]],application:_0x324ax25[_0x9042[73]],data:_0x324ax2a[_0x9042[51]](_0x9042[50])||null};ReportSquareDetail[_0x9042[78]](_0x324ax2e)[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x9042[74]+_0x324ax25[_0x9042[73]]+_0x9042[75]+_0x324ax25[_0x9042[72]]+_0x9042[76],_0x324ax27)});console[_0x9042[26]](_0x9042[79]);_0x324ax24[_0x9042[36]](_0x9042[80],_0x324ax2a[_0x9042[51]](_0x9042[50]),function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[81]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[82]);console[_0x9042[26]](_0x9042[83]);var _0x324ax2f=eval(_0x324ax25[_0x9042[84]]);console[_0x9042[26]](_0x9042[85]);var _0x324ax30=getVariableName(_0x324ax25[_0x9042[86]]);if(_[_0x9042[87]](_0x324ax2f)){_0x324ax2f[_0x9042[92]](function(_0x324ax31,_0x324ax32){wait[_0x9042[91]](setVariable,_0x324ax24,_0x324ax30+_0x9042[88]+_0x324ax32+_0x9042[89],_0x9042[90]+_0x324ax31+_0x9042[90])})}else {wait[_0x9042[91]](setVariable,_0x324ax24,_0x324ax30,_0x9042[90]+_0x324ax2f+_0x9042[90])}};methods[_0x9042[93]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[94]);var _0x324ax33=getFilePath(_0x324ax25[_0x9042[60]]);var _0x324ax2a=[_0x324ax33,_0x324ax25[_0x9042[47]]];console[_0x9042[26]](_0x9042[95]);_0x324ax24[_0x9042[36]](_0x9042[96],_0x324ax2a[_0x9042[51]](_0x9042[50]),function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[97]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[98]);var _0x324ax28={};console[_0x9042[26]](_0x9042[99]+_0x324ax25[_0x9042[100]]+_0x9042[101]);if(_0x324ax25[_0x9042[100]]>0){_0x324ax25[_0x9042[100]]--;var _0x324ax34=getFilePath(_0x324ax25[_0x9042[60]]);console[_0x9042[26]](_0x9042[102]);_0x324ax24[_0x9042[29]](util[_0x9042[44]](_0x9042[103],_0x324ax34,parseInt(_0x324ax25[_0x9042[104]])*1000,_0x324ax25[_0x9042[105]]),function(_0x324ax27,_0x324ax28){var _0x324ax2e={uniqueid:_0x324ax24[_0x9042[71]],node:_0x324ax25[_0x9042[72]],application:_0x324ax25[_0x9042[73]],data:_0x324ax28[_0x9042[106]]||null};ReportSquareDetail[_0x9042[78]](_0x324ax2e)[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x9042[74]+_0x324ax25[_0x9042[73]]+_0x9042[75]+_0x324ax25[_0x9042[72]]+_0x9042[76],_0x324ax27)});if(_0x324ax28[_0x9042[106]]!==_0x9042[107]){if(_0x324ax25[_0x9042[86]]){console[_0x9042[26]](_0x9042[108]);var _0x324ax30=getVariableName(_0x324ax25[_0x9042[86]]);setVariable(_0x324ax24,_0x324ax30,_0x9042[90]+_0x324ax28[_0x9042[106]]+_0x9042[90],function(){_0x324ax28[_0x9042[109]]=_0x324ax28[_0x9042[106]];_0x324ax26(null,_0x324ax28)})}}else {console[_0x9042[26]](_0x9042[110]);_0x324ax28={code:200,result:_0x9042[111],data:_0x9042[112]};_0x324ax26(null,_0x324ax28)}})}else {console[_0x9042[26]](_0x9042[113]);_0x324ax28={code:200,result:_0x9042[111],data:_0x9042[114]};_0x324ax26(null,_0x324ax28)}};methods[_0x9042[115]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[116]);console[_0x9042[26]](_0x9042[117]);_0x324ax24[_0x9042[29]](util[_0x9042[44]](_0x9042[118],_0x324ax25[_0x9042[119]],_0x324ax25[_0x9042[120]]),function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[121]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[122]);console[_0x9042[26]](_0x9042[123]);_0x324ax24[_0x9042[29]](util[_0x9042[44]](_0x9042[124],_0x324ax25[_0x9042[125]],_0x324ax25[_0x9042[120]]),function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[126]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[127]);var _0x324ax2a=[path[_0x9042[51]](config[_0x9042[128]],_0x9042[129],_0x9042[130]),encodeURIComponent(_0x324ax25[_0x9042[125]]),_0x324ax25[_0x9042[131]]];console[_0x9042[26]](_0x9042[132]);_0x324ax24[_0x9042[36]](_0x9042[133],_0x324ax2a[_0x9042[51]](_0x9042[50]),function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[134]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[135]);var _0x324ax2a=[_0x9042[136],encodeURIComponent(_0x324ax25[_0x9042[125]]),_0x324ax25[_0x9042[137]],_0x324ax25[_0x9042[138]],_0x324ax25[_0x9042[139]],_0x324ax25[_0x9042[140]]];console[_0x9042[26]](_0x9042[141]);_0x324ax24[_0x9042[36]](_0x9042[133],_0x324ax2a[_0x9042[51]](_0x9042[50]),function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[142]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[143]);var _0x324ax28={};console[_0x9042[26]](_0x9042[99]+_0x324ax25[_0x9042[100]]+_0x9042[101]);if(_0x324ax25[_0x9042[100]]>0){_0x324ax25[_0x9042[100]]--;var _0x324ax34=getFilePath(_0x324ax25[_0x9042[60]]);console[_0x9042[26]](_0x9042[102]);_0x324ax24[_0x9042[29]](util[_0x9042[44]](_0x9042[103],_0x324ax34,parseInt(_0x324ax25[_0x9042[104]])*1000,_0x324ax25[_0x9042[144]]),function(_0x324ax27,_0x324ax28){var _0x324ax2e={uniqueid:_0x324ax24[_0x9042[71]],node:_0x324ax25[_0x9042[72]],application:_0x324ax25[_0x9042[73]],data:_0x324ax28[_0x9042[106]]||null};ReportSquareDetail[_0x9042[78]](_0x324ax2e)[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x9042[74]+_0x324ax25[_0x9042[73]]+_0x9042[75]+_0x324ax25[_0x9042[72]]+_0x9042[76],_0x324ax27)});if(_0x324ax28[_0x9042[106]]&&_0x324ax28[_0x9042[106]][_0x9042[145]]>=parseInt(_0x324ax25[_0x9042[146]])){if(_0x324ax28[_0x9042[106]]!==_0x9042[147]){console[_0x9042[26]](_0x9042[148]);if(_0x324ax25[_0x9042[86]]){console[_0x9042[26]](_0x9042[108]);var _0x324ax30=getVariableName(_0x324ax25[_0x9042[86]]);setVariable(_0x324ax24,_0x324ax30,_0x9042[90]+_0x324ax28[_0x9042[106]]+_0x9042[90],function(){_0x324ax28={code:200,result:_0x9042[111],data:_0x9042[149]};_0x324ax26(null,_0x324ax28)})}}else {console[_0x9042[26]](_0x9042[150]);_0x324ax28={code:500,result:_0x9042[147]};_0x324ax26(null,_0x324ax28)}}else {console[_0x9042[26]](_0x9042[151]);_0x324ax28={code:200,result:_0x9042[111],data:_0x9042[152]};_0x324ax26(null,_0x324ax28)}})}else {console[_0x9042[26]](_0x9042[113]);_0x324ax28={code:500,result:_0x9042[147]};_0x324ax26(null,_0x324ax28)}};methods[_0x9042[153]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[154]);var _0x324ax35=sr();console[_0x9042[26]](_0x9042[155]);_0x324ax24[_0x9042[29]](util[_0x9042[44]](_0x9042[156],path[_0x9042[51]](config[_0x9042[128]],_0x9042[157],_0x324ax35),_0x324ax25[_0x9042[120]],_0x324ax25[_0x9042[46]],null,true,null),function(_0x324ax27,_0x324ax28){if(_0x324ax28[_0x9042[158]]===200&&_0x324ax28[_0x9042[106]]!==_0x9042[147]){console[_0x9042[26]](_0x9042[159]);_0x324ax24[_0x9042[29]](util[_0x9042[44]](_0x9042[160],_0x9042[161],_0x324ax35),function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})}else {_0x324ax26(_0x324ax27,_0x324ax28)}})};methods[_0x9042[162]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[163]);var _0x324ax28;var _0x324ax36=_0x9042[164];var _0x324ax37;if(!intervals){getIntervals(false)};var _0x324ax38=_[_0x9042[40]](intervals,{id:parseInt(_0x324ax25[_0x9042[165]])});if(!_0x324ax38[_0x9042[166]]){_0x324ax37=_[_0x9042[168]](intervals,{IntervalId:parseInt(_0x324ax38[_0x9042[167]])})};if(_0x324ax37){console[_0x9042[26]](_0x9042[169]);if(_0x324ax37[_0x9042[145]]){console[_0x9042[26]](_0x9042[99]+_0x324ax37[_0x9042[145]]+_0x9042[170]);var _0x324ax39;console[_0x9042[26]](_0x9042[171]);_0x324ax37[_0x9042[92]](function(_0x324ax31,_0x324ax32){_0x324ax39=splitInterval(_0x324ax31[_0x9042[172]]);if(isIntervalValid(_0x324ax39)){console[_0x9042[26]](_0x9042[173]+_0x324ax32+_0x9042[174]);_0x324ax36=_0x9042[175]}})}else {console[_0x9042[26]](_0x9042[176]);_0x324ax36=_0x9042[175]}}else {console[_0x9042[26]](_0x9042[177]);var _0x324ax3a=splitInterval(_0x324ax38[_0x9042[172]]);if(isIntervalValid(_0x324ax3a)){console[_0x9042[26]](_0x9042[178]);_0x324ax36=_0x9042[175]}};console[_0x9042[26]](_0x9042[179]+_0x324ax36+_0x9042[180]);_0x324ax28={code:200,result:_0x9042[111],data:_0x324ax36};_0x324ax26(null,_0x324ax28)};methods[_0x9042[181]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[182]);console[_0x9042[26]](_0x9042[183]);var _0x324ax30=getVariableName(_0x324ax25[_0x9042[86]]);getVariable(_0x324ax24,_0x324ax30,function(_0x324ax27,_0x324ax28){if(!_0x324ax28[_0x9042[109]]){_0x324ax28[_0x9042[109]]=_0x9042[114]};_0x324ax26(null,_0x324ax28)})};methods[_0x9042[184]]=function(_0x324ax24,_0x324ax25,_0x324ax26){var _0x324ax2e={uniqueid:_0x324ax24[_0x9042[71]],node:_0x324ax25[_0x9042[72]],application:_0x324ax25[_0x9042[73]],data:_0x324ax25[_0x9042[185]]||null};ReportSquareDetail[_0x9042[78]](_0x324ax2e)[_0x9042[187]](function(_0x324ax28){_0x324ax28={code:200,result:_0x9042[186]};_0x324ax26(null,_0x324ax28)})[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x9042[74]+_0x324ax25[_0x9042[73]]+_0x9042[75]+_0x324ax25[_0x9042[72]]+_0x9042[76],_0x324ax27);var _0x324ax28={code:200,result:_0x9042[186]};_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[188]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[189]);var _0x324ax2e={uniqueid:_0x324ax24[_0x9042[71]],node:_0x324ax25[_0x9042[72]],application:_0x324ax25[_0x9042[73]],data:_[_0x9042[191]](_0x324ax25[_0x9042[190]])||null};ReportSquareDetail[_0x9042[78]](_0x324ax2e)[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x9042[74]+_0x324ax25[_0x9042[73]]+_0x9042[75]+_0x324ax25[_0x9042[72]]+_0x9042[76],_0x324ax27)});console[_0x9042[26]](_0x9042[192]);sh[_0x9042[36]](_[_0x9042[191]](_0x324ax25[_0x9042[190]]),function(_0x324ax3b,_0x324ax3c){var _0x324ax3d=_0x324ax3c[_0x9042[193]](/(\r\n|\n|\r)/gm,_0x9042[63]);console[_0x9042[26]](_0x9042[194],_0x324ax3d);console[_0x9042[26]](_0x9042[195]);var _0x324ax30=getVariableName(_0x324ax25[_0x9042[86]]);setVariable(_0x324ax24,_0x324ax30,_0x9042[90]+_0x324ax3d+_0x9042[90],_0x324ax26)})};methods[_0x9042[2]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[196]);console[_0x9042[26]](_0x9042[197]);_0x324ax24[_0x9042[36]](_0x9042[133],_0x324ax25[_0x9042[190]],_0x324ax25[_0x9042[198]],function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[199]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[200]);if(!projects){getProjects(false)};var _0x324ax3e=_[_0x9042[40]](projects,{id:parseInt(_0x324ax25[_0x9042[201]])});console[_0x9042[26]](_0x9042[202]+_0x324ax3e[_0x9042[43]]+_0x9042[34]);_0x324ax24[_0x9042[36]](_0x9042[133],util[_0x9042[44]](_0x9042[203],_0x324ax3e[_0x9042[43]]),function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[204]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[205]);var _0x324ax2a=[path[_0x9042[51]](config[_0x9042[128]],_0x9042[129],_0x9042[206]),_0x324ax25[_0x9042[207]],_0x9042[63],(_0x324ax25[_0x9042[208]]===_0x9042[111]?_0x9042[63]:_0x324ax25[_0x9042[208]]),_0x324ax25[_0x9042[46]],_0x324ax25[_0x9042[138]],_0x324ax25[_0x9042[209]]===_0x9042[210]?_0x9042[63]:_0x324ax25[_0x9042[209]],_0x324ax25[_0x9042[140]]];console[_0x9042[26]](_0x9042[211]);_0x324ax24[_0x9042[36]](_0x9042[133],_0x324ax2a[_0x9042[51]](_0x9042[50]),function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[212]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[213]);if(!dbConnections){getDbConnections(false)};var _0x324ax3f=_[_0x9042[40]](dbConnections,{id:parseInt(_0x324ax25[_0x9042[214]])});console[_0x9042[26]](_0x9042[215]);var _0x324ax2e={uniqueid:_0x324ax24[_0x9042[71]],node:_0x324ax25[_0x9042[72]],application:_0x324ax25[_0x9042[73]],data:_0x324ax25[_0x9042[216]]||null};ReportSquareDetail[_0x9042[78]](_0x324ax2e)[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x9042[74]+_0x324ax25[_0x9042[73]]+_0x9042[75]+_0x324ax25[_0x9042[72]]+_0x9042[76],_0x324ax27)});try{db[_0x9042[218]](_0x324ax3f[_0x9042[217]]);var _0x324ax40=db[_0x9042[219]](_0x324ax25[_0x9042[216]]);db[_0x9042[220]]();setVariablesMatrix(_0x324ax24,_0x324ax25,_0x324ax26,_0x324ax40)}catch(e){console[_0x9042[26]](e[_0x9042[221]]);wait[_0x9042[91]](setVariable,_0x324ax24,_0x9042[222],_0x9042[175]);wait[_0x9042[91]](setVariable,_0x324ax24,_0x9042[223],_0x9042[90]+e[_0x9042[221]]+_0x9042[90])}};methods[_0x9042[224]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[225]);console[_0x9042[26]](_0x9042[226]+_0x324ax25[_0x9042[227]]+_0x9042[228]);_0x324ax24[_0x9042[36]](_0x9042[49],util[_0x9042[44]](_0x9042[229],_0x324ax25[_0x9042[227]],_0x324ax25[_0x9042[230]]),function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[231]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[232]);var _0x324ax28={code:200,result:_0x9042[111]};console[_0x9042[26]](_0x9042[233]);_0x324ax28[_0x9042[109]]=String(eval(_0x324ax25[_0x9042[234]])?_0x9042[175]:_0x9042[164]);console[_0x9042[26]](_0x9042[235]+_0x324ax28[_0x9042[109]]);_0x324ax26(null,_0x324ax28)};methods[_0x9042[236]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[237]);console[_0x9042[26]](_0x9042[238]);_0x324ax24[_0x9042[236]]()};methods[_0x9042[239]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[240]);var _0x324ax3c=(_0x324ax25[_0x9042[241]])?_0x9042[90]+_0x324ax25[_0x9042[241]]+_0x9042[90]:_0x9042[90]+_0x324ax25[_0x9042[72]]+_0x9042[90];console[_0x9042[26]](_0x9042[242]+_0x324ax3c);_0x324ax24[_0x9042[36]](_0x9042[243],_0x324ax3c,function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[244]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[245]);console[_0x9042[26]](_0x9042[246]);_0x324ax24[_0x9042[29]](util[_0x9042[44]](_0x9042[247],_0x324ax25[_0x9042[248]],_0x324ax25[_0x9042[120]]),function(_0x324ax27,_0x324ax28){_0x324ax26(_0x324ax27,_0x324ax28)})};methods[_0x9042[249]]=function(_0x324ax24,_0x324ax25,_0x324ax26){console[_0x9042[26]](_0x9042[250]);console[_0x9042[26]](_0x9042[251]);var _0x324ax30=getVariableName(_0x324ax25[_0x9042[86]]);wait[_0x9042[91]](setVariable,_0x324ax24,_0x324ax30,_0x9042[90]+_0x324ax25[_0x9042[252]]+_0x9042[90])};function getVertices(_0x324ax42){return _[_0x9042[256]](_0x324ax42,function(_0x324ax2f,_0x324ax43,_0x324ax44){if(_0x324ax44===_0x9042[253]){return _0x324ax2f};if(_[_0x9042[87]](_0x324ax43)){_[_0x9042[255]](_0x324ax43,function(_0x324ax45,_0x324ax46){_0x324ax2f[_0x324ax45[_0x9042[254]][_0x9042[167]]]=_0x324ax45[_0x9042[254]];_0x324ax2f[_0x324ax45[_0x9042[254]][_0x9042[167]]][_0x9042[73]]=_0x324ax44});return _0x324ax2f};_0x324ax2f[_0x324ax43[_0x9042[254]][_0x9042[167]]]=_0x324ax43[_0x9042[254]];_0x324ax2f[_0x324ax43[_0x9042[254]][_0x9042[167]]][_0x9042[73]]=_0x324ax44;return _0x324ax2f},{})}function getTargetBySource(_0x324ax42,_0x324ax48,_0x324ax45){return _[_0x9042[106]](_[_0x9042[40]](_0x324ax42[_0x9042[253]],function(_0x324ax43){if(_0x324ax43[_0x9042[254]][_0x9042[257]]&&_0x324ax43[_0x9042[254]][_0x9042[258]]){if(_0x324ax43[_0x9042[254]][_0x9042[258]]===_0x324ax48){if(_0x324ax43[_0x9042[254]][_0x9042[259]]&&_0x324ax43[_0x9042[254]][_0x9042[259]]!==_0x324ax45){return false};return true}};return false}),_0x9042[260])}function replaceAllVariables(_0x324ax24,_0x324ax25,_0x324ax26){var _0x324ax4a=_0x324ax25;for(var _0x324ax46 in _0x324ax4a){var _0x324ax28=_0x324ax4a[_0x324ax46][_0x9042[261]](/{+(.*?)}/gi);if(_0x324ax28){console[_0x9042[26]](_0x9042[262],_0x324ax28);_0x324ax28[_0x9042[92]](function(_0x324ax4b,_0x324ax32){console[_0x9042[26]](_0x9042[263],_0x324ax28[_0x324ax32][_0x9042[264]](1,_0x324ax28[_0x324ax32][_0x9042[145]]-1));var _0x324ax45=wait[_0x9042[91]](getVariable,_0x324ax24,_0x324ax28[_0x324ax32][_0x9042[264]](1,_0x324ax28[_0x324ax32][_0x9042[145]]-1));console[_0x9042[26]](_0x9042[259],_0x324ax45);if(_0x324ax45[_0x9042[109]]){_0x324ax4a[_0x324ax46]=_0x324ax4a[_0x324ax46][_0x9042[193]](_0x324ax28[_0x324ax32],_0x324ax45[_0x9042[109]])}})}};_0x324ax4a[_0x9042[265]]=true;return _0x324ax4a}function xstart(_0x324ax24){var _0x324ax42=_0x324ax24[_0x9042[128]];var _0x324ax4d=_0x324ax24[_0x9042[266]];if(_0x324ax42[_0x9042[267]]){if(!_[_0x9042[87]](_0x324ax42[_0x9042[267]])){var _0x324ax48=_0x324ax42[_0x9042[267]][_0x9042[254]][_0x9042[167]];var _0x324ax28={};do{try{var _0x324ax25=_0x324ax4d[_0x324ax48][_0x9042[265]]?_0x324ax4d[_0x324ax48]:replaceAllVariables(_0x324ax24,_0x324ax4d[_0x324ax48]);if(_0x324ax25){if(_[_0x9042[268]](methods[_0x324ax25[_0x9042[73]]])){_0x324ax28=wait[_0x9042[91]](methods[_0x324ax25[_0x9042[73]]],_0x324ax24,_0x324ax25)}else {_0x324ax28=wait[_0x9042[91]](methods[_0x9042[239]],_0x324ax24,_0x324ax25)};if(_0x324ax28[_0x9042[158]]===200&&_0x324ax28[_0x9042[106]]!==_0x9042[147]){var _0x324ax4e=getTargetBySource(_0x324ax42,_0x324ax48,_0x324ax28[_0x9042[109]]);if(!_0x324ax4e){if(_0x324ax25[_0x9042[73]]===_0x9042[97]){if(_0x324ax25[_0x9042[100]]>0){_0x324ax4e=getTargetBySource(_0x324ax42,_0x324ax48,_0x9042[152]);if(!_0x324ax4e){_0x324ax4e=_0x324ax48}}};if(_0x324ax25[_0x9042[73]]===_0x9042[142]&&_0x324ax25[_0x9042[100]]>0){_0x324ax4e=_0x324ax48};if(_0x324ax25[_0x9042[73]]===_0x9042[181]){_0x324ax4e=getTargetBySource(_0x324ax42,_0x324ax48,_0x9042[114]);if(!_0x324ax4e){_0x324ax4e=_0x324ax48}}};_0x324ax48=_0x324ax4e}else {_0x324ax48=null}}else {_0x324ax48=null}}catch(err){console[_0x9042[26]](err)}}while(_0x324ax48);;console[_0x9042[26]](_0x9042[269]);_0x324ax24[_0x9042[236]]()}}}function xfinally(_0x324ax24){var _0x324ax42=_0x324ax24[_0x9042[128]];var _0x324ax4d=_0x324ax24[_0x9042[266]];if(_0x324ax42[_0x9042[270]]){if(!_[_0x9042[87]](_0x324ax42[_0x9042[270]])){var _0x324ax48=_0x324ax42[_0x9042[270]][_0x9042[254]][_0x9042[167]];var _0x324ax28={};do{try{var _0x324ax25=replaceAllVariables(_0x324ax24,_0x324ax4d[_0x324ax48]);if(_0x324ax25){if(_[_0x9042[268]](methods[_0x324ax25[_0x9042[73]]])){_0x324ax28=wait[_0x9042[91]](methods[_0x324ax25[_0x9042[73]]],_0x324ax24,_0x324ax25)}else {_0x324ax28=wait[_0x9042[91]](methods[_0x9042[239]],_0x324ax24,_0x324ax25)};if(_0x324ax28[_0x9042[158]]===200&&_0x324ax28[_0x9042[106]]!==_0x9042[147]){var _0x324ax4e=getTargetBySource(_0x324ax42,_0x324ax48,_0x324ax28[_0x9042[109]]);if(!_0x324ax4e){if(_0x324ax25[_0x9042[73]]===_0x9042[97]){if(_0x324ax25[_0x9042[100]]>0){_0x324ax4e=getTargetBySource(_0x324ax42,_0x324ax48,_0x9042[152]);if(!_0x324ax4e){_0x324ax4e=_0x324ax48}}};if(_0x324ax25[_0x9042[73]]===_0x9042[142]&&_0x324ax25[_0x9042[100]]>0){_0x324ax4e=_0x324ax48}};_0x324ax48=_0x324ax4e}else {_0x324ax48=null}}else {_0x324ax48=null}}catch(err){console[_0x9042[26]](err)}}while(_0x324ax48);;_0x324ax24[_0x9042[236]]();console[_0x9042[26]](_0x9042[271])}};_0x324ax24[_0x9042[272]]()}function main(_0x324ax24){_0x324ax24[_0x9042[275]](_0x9042[273],function(_0x324ax27){console[_0x9042[26]](_0x9042[274],_0x324ax27)});_0x324ax24[_0x9042[275]](_0x9042[276],function(){console[_0x9042[26]](_0x9042[277])});_0x324ax24[_0x9042[275]](_0x9042[236],function(){if(_0x324ax24[_0x9042[270]]){_0x324ax24[_0x9042[270]]=false;console[_0x9042[26]](_0x9042[278]);wait[_0x9042[279]](xfinally,_0x324ax24)}else {ReportSquare[_0x9042[282]]({leaveAt:moment()[_0x9042[44]](_0x9042[281])},{where:{uniqueid:_0x324ax24[_0x9042[71]]}})[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x9042[280],_0x324ax27)});console[_0x9042[26]](_0x9042[283])}});_0x324ax24[_0x9042[275]](_0x9042[104],function(_0x324ax28){});_0x324ax24[_0x9042[275]](_0x9042[284],function(_0x324ax51){console[_0x9042[26]](_0x324ax51);console[_0x9042[26]](_0x9042[285]+_0x324ax51[_0x9042[286]]+_0x9042[287]+_0x324ax51[_0x9042[288]]);var _0x324ax52={network:_0x324ax51[_0x9042[289]],network_script:_0x324ax51[_0x9042[290]],request:_0x324ax51[_0x9042[291]],channel:_0x324ax51[_0x9042[292]],language:_0x324ax51[_0x9042[293]],type:_0x324ax51[_0x9042[294]],uniqueid:_0x324ax51[_0x9042[288]],version:_0x324ax51[_0x9042[295]],callerid:_0x324ax51[_0x9042[286]],calleridname:_0x324ax51[_0x9042[296]],callingpres:_0x324ax51[_0x9042[297]],callingani2:_0x324ax51[_0x9042[298]],callington:_0x324ax51[_0x9042[299]],callingtns:_0x324ax51[_0x9042[300]],dnid:_0x324ax51[_0x9042[301]],rdnis:_0x324ax51[_0x9042[302]],context:_0x324ax51[_0x9042[303]],extension:_0x324ax51[_0x9042[304]],priority:_0x324ax51[_0x9042[305]],enhanced:_0x324ax51[_0x9042[306]],accountcode:_0x324ax51[_0x9042[307]],threadid:_0x324ax51[_0x9042[308]],project_name:_0x324ax51[_0x9042[309]],joinAt:moment()[_0x9042[44]](_0x9042[281])};ReportSquare[_0x9042[78]](_0x324ax52)[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x9042[310],_0x324ax27)});if(_0x324ax51[_0x9042[309]]){SquareProject[_0x9042[318]]({where:{name:_0x324ax51[_0x9042[309]]},attributes:[_0x9042[167],_0x9042[312]]})[_0x9042[187]](function(_0x324ax3e){if(_0x324ax3e){if(_0x324ax3e[_0x9042[312]]){xml[_0x9042[315]](_0x324ax3e[_0x9042[312]],{normalizeTags:true,explicitArray:false},function(_0x324ax27,_0x324ax2f){var _0x324ax42=_0x324ax2f[_0x9042[313]][_0x9042[128]];if(_0x324ax42){_0x324ax24[_0x9042[128]]=_0x324ax42;_0x324ax24[_0x9042[270]]=true;_0x324ax24[_0x9042[71]]=_0x324ax51[_0x9042[288]];_0x324ax24[_0x9042[266]]=getVertices(_0x324ax42);wait[_0x9042[279]](xstart,_0x324ax24)}else {console[_0x9042[26]](_0x9042[314]);_0x324ax24[_0x9042[272]]()}})}else {console[_0x9042[26]](_0x9042[316]);_0x324ax24[_0x9042[272]]()}}else {console[_0x9042[26]](_0x9042[317]);_0x324ax24[_0x9042[272]]()}})[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x9042[311],_0x324ax27);_0x324ax24[_0x9042[272]]()})}else {console[_0x9042[26]](_0x9042[319]);_0x324ax24[_0x9042[272]]()}})}function splitInterval(_0x324ax38){var _0x324ax54={};var _0x324ax3a=_0x324ax38[_0x9042[320]](_0x9042[50]);var _0x324ax55;_0x324ax3a[_0x9042[92]](function(_0x324ax56,_0x324ax32){switch(_0x324ax32){case 0:if(_0x324ax56!==_0x9042[321]){_0x324ax55=_0x324ax56[_0x9042[320]](_0x9042[114]);_0x324ax54[_0x9042[322]]=moment(_0x324ax55[0],_0x9042[323]);_0x324ax54[_0x9042[324]]=moment(_0x324ax55[1],_0x9042[323])}else {_0x324ax54[_0x9042[322]]=null;_0x324ax54[_0x9042[324]]=null};break;case 1:if(_0x324ax56!==_0x9042[321]){_0x324ax55=_0x324ax56[_0x9042[320]](_0x9042[114]);_0x324ax54[_0x9042[325]]=weekDaysCollection[_0x324ax55[0]];_0x324ax54[_0x9042[326]]=_0x324ax55[1]?weekDaysCollection[_0x324ax55[1]]:null}else {_0x324ax54[_0x9042[325]]=null;_0x324ax54[_0x9042[326]]=null};break;case 2:if(_0x324ax56!==_0x9042[321]){_0x324ax55=_0x324ax56[_0x9042[320]](_0x9042[114]);_0x324ax54[_0x9042[327]]=_0x324ax55[0];_0x324ax54[_0x9042[328]]=_0x324ax55[1]?_0x324ax55[1]:null}else {_0x324ax54[_0x9042[327]]=null;_0x324ax54[_0x9042[328]]=null};break;case 3:if(_0x324ax56!==_0x9042[321]){_0x324ax55=_0x324ax56[_0x9042[320]](_0x9042[114]);_0x324ax54[_0x9042[329]]=monthsCollection[_0x324ax55[0]];_0x324ax54[_0x9042[330]]=_0x324ax55[1]?monthsCollection[_0x324ax55[1]]:null}else {_0x324ax54[_0x9042[329]]=null;_0x324ax54[_0x9042[330]]=null};break;default:}});return _0x324ax54}function isIntervalValid(_0x324ax38){var _0x324ax58=moment()[_0x9042[44]](_0x9042[323]);var _0x324ax59=moment()[_0x9042[44]](_0x9042[331]);var _0x324ax5a=moment()[_0x9042[44]](_0x9042[332]);var _0x324ax5b=moment()[_0x9042[44]](_0x9042[333]);var _0x324ax5c,_0x324ax5d,_0x324ax5e,_0x324ax5f;var _0x324ax60=[1,2,3,4,5,6,7,8,9,10,11,12];var _0x324ax61=[1,2,3,4,5,6,7];var _0x324ax62=[];for(var _0x324ax63=1;_0x324ax63<=31;_0x324ax63++){_0x324ax62[_0x9042[334]](_0x324ax63)};_0x324ax5c=(_0x324ax38[_0x9042[322]]&&_0x324ax38[_0x9042[324]])?moment(_0x324ax58,_0x9042[323])[_0x9042[335]](moment(_0x324ax38[_0x9042[322]],_0x9042[323]),moment(_0x324ax38[_0x9042[324]],_0x9042[323])):true;if(_0x324ax38[_0x9042[325]]){if(_0x324ax38[_0x9042[326]]){var _0x324ax64=_[_0x9042[168]](_0x324ax61,function(_0x324ax31){return (_0x324ax31>=_0x324ax38[_0x9042[325]])||(_0x324ax31<=_0x324ax38[_0x9042[326]])});_0x324ax5d=(_0x324ax64[_0x9042[336]](parseInt(_0x324ax59))!== -1)?true:false}else {_0x324ax5d=(parseInt(_0x324ax59)===_0x324ax38[_0x9042[325]])?true:false}}else {_0x324ax5d=true};if(_0x324ax38[_0x9042[327]]){if(_0x324ax38[_0x9042[328]]){var _0x324ax65=_[_0x9042[168]](_0x324ax62,function(_0x324ax31){return (_0x324ax31>=_0x324ax38[_0x9042[327]])||(_0x324ax31<=_0x324ax38[_0x9042[328]])});_0x324ax5e=(_0x324ax65[_0x9042[336]](parseInt(_0x324ax5a))!== -1)?true:false}else {_0x324ax5e=(parseInt(_0x324ax5a)===_0x324ax38[_0x9042[327]])?true:false}}else {_0x324ax5e=true};if(_0x324ax38[_0x9042[329]]){if(_0x324ax38[_0x9042[330]]){var _0x324ax66=_[_0x9042[168]](_0x324ax60,function(_0x324ax31){return (_0x324ax31>=_0x324ax38[_0x9042[329]])||(_0x324ax31<=_0x324ax38[_0x9042[330]])});_0x324ax5f=(_0x324ax66[_0x9042[336]](parseInt(_0x324ax5b))!== -1)?true:false}else {_0x324ax5f=(parseInt(_0x324ax5b)===_0x324ax38[_0x9042[329]])?true:false}}else {_0x324ax5f=true};return _0x324ax5c&&_0x324ax5d&&_0x324ax5e&&_0x324ax5f}function setVariable(_0x324ax24,_0x324ax68,_0x324ax45,_0x324ax26){console[_0x9042[26]](_0x9042[337]);console[_0x9042[26]](_0x9042[338]+_0x324ax68+_0x9042[339],_0x324ax45);_0x324ax24[_0x9042[29]](util[_0x9042[44]](_0x9042[160],_0x324ax68,_0x324ax45),function(_0x324ax27,_0x324ax28){if(_0x324ax26){_0x324ax26(_0x324ax27,_0x324ax28)}})}function getVariableName(_0x324ax6a){if(!variables){getVariables(false)};var _0x324ax4b={name:_0x9042[340]};if(_0x324ax6a){_0x324ax4b=_[_0x9042[40]](variables,{id:parseInt(_0x324ax6a)})};return _0x324ax4b[_0x9042[43]]}function setVariablesMatrix(_0x324ax24,_0x324ax25,_0x324ax26,_0x324ax40){var _0x324ax30=getVariableName(_0x324ax25[_0x9042[86]]);_[_0x9042[92]](_0x324ax40,function(_0x324ax6c,_0x324ax32){_[_0x9042[342]](_0x324ax6c,function(_0x324ax45,_0x324ax46){wait[_0x9042[91]](setVariable,_0x324ax24,_0x324ax30+_0x9042[88]+_0x324ax32+_0x9042[341]+_0x324ax46+_0x9042[89],_0x9042[90]+_0x324ax45+_0x9042[90])})})}function getVariable(_0x324ax24,_0x324ax68,_0x324ax26){_0x324ax24[_0x9042[346]](_0x324ax68,function(_0x324ax27,_0x324ax28){if(_0x324ax28[_0x9042[158]]===200&&_0x324ax28[_0x9042[106]]!==_0x9042[111]){_0x324ax28[_0x9042[109]]=_0x324ax28[_0x9042[106]][_0x9042[264]](_0x324ax28[_0x9042[106]][_0x9042[344]](_0x9042[343])+1,_0x324ax28[_0x9042[106]][_0x9042[344]](_0x9042[345]))}else {_0x324ax28[_0x9042[109]]=_0x9042[63]};_0x324ax26(null,_0x324ax28)})}function getFilePath(_0x324ax6a){if(!sounds){getSounds(false)};if(_0x324ax6a>0){var _0x324ax6f=_[_0x9042[40]](sounds,{id:parseInt(_0x324ax6a)});return util[_0x9042[44]](_0x9042[347],config[_0x9042[348]],_0x324ax6f[_0x9042[349]])};return _0x9042[63]}function getUsers(_0x324ax71){User[_0x9042[351]]()[_0x9042[187]](function(_0x324ax2f){users=_[_0x9042[350]](_0x324ax2f);if(_0x324ax71){synchUpdates(User,users,_0x9042[167])}})[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x324ax27)})}function getQueues(_0x324ax71){VoiceQueue[_0x9042[351]]()[_0x9042[187]](function(_0x324ax2f){queues=_[_0x9042[350]](_0x324ax2f);if(_0x324ax71){synchUpdates(VoiceQueue,queues,_0x9042[43])}})[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x324ax27)})}function getTrunks(_0x324ax71){Trunk[_0x9042[351]]()[_0x9042[187]](function(_0x324ax2f){trunks=_[_0x9042[350]](_0x324ax2f);if(_0x324ax71){synchUpdates(Trunk,trunks,_0x9042[167])}})[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x324ax27)})}function getVariables(_0x324ax71){Variable[_0x9042[351]]()[_0x9042[187]](function(_0x324ax2f){variables=_[_0x9042[350]](_0x324ax2f);if(_0x324ax71){synchUpdates(Variable,variables,_0x9042[167])}})[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x324ax27)})}function getDbConnections(_0x324ax71){SquareOdbc[_0x9042[351]]()[_0x9042[187]](function(_0x324ax2f){dbConnections=_[_0x9042[350]](_0x324ax2f);if(_0x324ax71){synchUpdates(SquareOdbc,dbConnections,_0x9042[167])}})[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x324ax27)})}function getIntervals(_0x324ax71){Interval[_0x9042[351]]()[_0x9042[187]](function(_0x324ax2f){intervals=_[_0x9042[350]](_0x324ax2f);if(_0x324ax71){synchUpdates(Interval,intervals,_0x9042[167])}})[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x324ax27)})}function getProjects(_0x324ax71){SquareProject[_0x9042[351]]()[_0x9042[187]](function(_0x324ax2f){projects=_[_0x9042[350]](_0x324ax2f);if(_0x324ax71){synchUpdates(SquareProject,projects,_0x9042[167])}})[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x324ax27)})}function getSounds(_0x324ax71){Sound[_0x9042[351]]()[_0x9042[187]](function(_0x324ax2f){sounds=_[_0x9042[350]](_0x324ax2f);if(_0x324ax71){synchUpdates(Sound,sounds,_0x9042[167])}})[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x324ax27)})}function synchUpdates(_0x324ax7a,_0x324ax7b,_0x324ax46){var _0x324ax7c={};_0x324ax7a[_0x9042[352]](function(_0x324ax7d){_0x324ax7c[_0x324ax46]=_0x324ax7d[_0x324ax46];updateCollection(_0x324ax7b,_0x324ax7c,_0x324ax7d)});_0x324ax7a[_0x9042[353]](function(_0x324ax7d){_0x324ax7c[_0x324ax46]=_0x324ax7d[_0x324ax46];updateCollection(_0x324ax7b,_0x324ax7c,_0x324ax7d)});_0x324ax7a[_0x9042[355]](function(_0x324ax7d){_0x324ax7c[_0x324ax46]=_0x324ax7d[_0x324ax46];_[_0x9042[354]](_0x324ax7b,_0x324ax7c)})}function updateCollection(_0x324ax7b,_0x324ax7c,_0x324ax7d){var _0x324ax7f=_[_0x9042[40]](_0x324ax7b,_0x324ax7c);var _0x324ax32=_0x324ax7b[_0x9042[336]](_0x324ax7f);if(_0x324ax7f){_[_0x9042[356]](_0x324ax7b[_0x324ax32],_0x324ax7d)}else {_0x324ax7b[_0x9042[357]](_0x324ax7d)}}function getPort(){Settings[_0x9042[318]]()[_0x9042[187]](function(_0x324ax2f){agiPort=_0x324ax2f[_0x9042[358]]})[_0x9042[77]](function(_0x324ax27){console[_0x9042[26]](_0x324ax27)})}module[_0x9042[359]]=function(){console[_0x9042[26]](_0x9042[360]);getPort();var _0x324ax81=agi[_0x9042[362]](main)[_0x9042[361]](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 diff --git a/server/config/ami/action.js b/server/config/ami/action.js index 99ebb83..a08c794 100644 --- a/server/config/ami/action.js +++ b/server/config/ami/action.js @@ -1,574 +1 @@ -/** - * 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; +var _0x8ac0=["\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"];_0x8ac0[0];var moment=require(_0x8ac0[1]);var util=require(_0x8ac0[2]);var Promise=require(_0x8ac0[3]);var Sequelize=require(_0x8ac0[5])[_0x8ac0[4]];var ReportMember=require(_0x8ac0[5])[_0x8ac0[6]];var _Action=require(_0x8ac0[5])[_0x8ac0[7]];var Agent=require(_0x8ac0[5])[_0x8ac0[8]];var UserHasVoiceQueue=require(_0x8ac0[5])[_0x8ac0[9]];var UserHasChatQueue=require(_0x8ac0[5])[_0x8ac0[10]];var UserHasMailQueue=require(_0x8ac0[5])[_0x8ac0[11]];var UserHasFaxQueue=require(_0x8ac0[5])[_0x8ac0[12]];function Action(_0x2ff5xd){console[_0x8ac0[14]](_0x8ac0[13]);var _0x2ff5xe=[_0x8ac0[15],_0x8ac0[16],_0x8ac0[17],_0x8ac0[18]];_Action[_0x8ac0[19]](function(_0x2ff5xf,_0x2ff5x10){return _0x2ff5x2d(_0x2ff5xf,_0x2ff5x10,_0x2ff5xd)});ReportMember[_0x8ac0[34]](function(_0x2ff5xf,_0x2ff5x10){return ReportMember[_0x8ac0[33]]({where:{channel:_0x2ff5xf[_0x8ac0[30]],membername:_0x2ff5xf[_0x8ac0[31]],interface:_0x2ff5xf[_0x8ac0[32]],exitAt:null}})[_0x8ac0[29]](function(_0x2ff5x11){var _0x2ff5x12=[];var _0x2ff5x13=moment();_0x2ff5x11[_0x8ac0[28]](function(_0x2ff5x14){var _0x2ff5x15=moment(_0x2ff5x14[_0x8ac0[21]]);_0x2ff5x12[_0x8ac0[27]](_0x2ff5x14[_0x8ac0[26]]({exitAt:_0x2ff5x13[_0x8ac0[23]](_0x8ac0[22]),duration:_0x2ff5x13[_0x8ac0[25]](_0x2ff5x15,_0x8ac0[24])}))});return _0x2ff5x12})[_0x8ac0[20]]()});function _0x2ff5x16(_0x2ff5x10,_0x2ff5x17){return function(_0x2ff5x18){return Promise[_0x8ac0[48]](_0x2ff5xd[_0x8ac0[47]])({action:_0x8ac0[46],interface:util[_0x8ac0[23]](_0x8ac0[36],_0x8ac0[37],_0x2ff5x18[_0x8ac0[35]]),paused:true,reason:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[38]]})[_0x8ac0[29]](function(_0x2ff5x1b){return _0x2ff5x18[_0x8ac0[26]]({voicePause:true,chatPause:true,mailPause:true,faxPause:true,pauseType:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[38]],lastPauseAt:moment()[_0x8ac0[23]](_0x8ac0[22])},{transaction:_0x2ff5x10[_0x8ac0[44]]||null})})[_0x8ac0[29]](function(_0x2ff5x18){var _0x2ff5x19=[];_0x2ff5xe[_0x8ac0[28]](function(_0x2ff5x1a){_0x2ff5x19[_0x8ac0[27]]({channel:_0x2ff5x1a,membername:_0x2ff5x18[_0x8ac0[35]],interface:util[_0x8ac0[23]](_0x8ac0[36],_0x8ac0[37],_0x2ff5x18[_0x8ac0[35]]),type:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[38]],enterAt:moment()[_0x8ac0[23]](_0x8ac0[22]),data1:_0x2ff5x17[_0x8ac0[40]],data2:_0x2ff5x17[_0x8ac0[41]],data3:_0x2ff5x17[_0x8ac0[42]],data4:_0x2ff5x17[_0x8ac0[43]]})});return ReportMember[_0x8ac0[45]](_0x2ff5x19,{individualHooks:true,transaction:_0x2ff5x10[_0x8ac0[44]]||null})})}}function _0x2ff5x1c(_0x2ff5x10,_0x2ff5x17){return function(_0x2ff5x18){if(!_0x2ff5x10[_0x8ac0[39]]){_0x2ff5x10[_0x8ac0[39]]={}};switch(_0x2ff5x10[_0x8ac0[39]][_0x8ac0[30]]){case _0x8ac0[15]:return Promise[_0x8ac0[48]](_0x2ff5xd[_0x8ac0[47]])({action:_0x8ac0[46],interface:util[_0x8ac0[23]](_0x8ac0[36],_0x8ac0[37],_0x2ff5x18[_0x8ac0[35]]),paused:false,reason:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[38]]})[_0x8ac0[29]](function(){return _0x2ff5x18[_0x8ac0[26]]({voicePause:false},{transaction:_0x2ff5x10[_0x8ac0[44]]||null})})[_0x8ac0[29]](function(_0x2ff5x18){var _0x2ff5x13=moment();return ReportMember[_0x8ac0[50]]({where:{channel:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[30]],membername:_0x2ff5x18[_0x8ac0[35]],interface:util[_0x8ac0[23]](_0x8ac0[36],_0x8ac0[37],_0x2ff5x18[_0x8ac0[35]]),exitAt:null}})})[_0x8ac0[29]](_0x2ff5x2a({message:_0x8ac0[49]}))[_0x8ac0[29]](function(_0x2ff5x1d){var _0x2ff5x13=moment();var _0x2ff5x15=moment(_0x2ff5x1d[_0x8ac0[21]]);return _0x2ff5x1d[_0x8ac0[26]]({exitAt:_0x2ff5x13[_0x8ac0[23]](_0x8ac0[22]),duration:_0x2ff5x13[_0x8ac0[25]](_0x2ff5x15,_0x8ac0[24])},{individualHooks:true,transaction:_0x2ff5x10[_0x8ac0[44]]||null})})[_0x8ac0[29]](function(){return _0x2ff5x18});case _0x8ac0[16]:;case _0x8ac0[17]:;case _0x8ac0[18]:var _0x2ff5x1e={};_0x2ff5x1e[util[_0x8ac0[23]](_0x8ac0[51],_0x2ff5x10[_0x8ac0[39]][_0x8ac0[30]],_0x8ac0[52])]=false;return _0x2ff5x18[_0x8ac0[26]](_0x2ff5x1e,{transaction:_0x2ff5x10[_0x8ac0[44]]})[_0x8ac0[29]](function(_0x2ff5x18){var _0x2ff5x13=moment();return ReportMember[_0x8ac0[50]]({where:{channel:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[30]],membername:_0x2ff5x18[_0x8ac0[35]],interface:util[_0x8ac0[23]](_0x8ac0[36],_0x8ac0[37],_0x2ff5x18[_0x8ac0[35]]),exitAt:null}})})[_0x8ac0[29]](_0x2ff5x2a({message:_0x8ac0[49]}))[_0x8ac0[29]](function(_0x2ff5x1d){var _0x2ff5x13=moment();var _0x2ff5x15=moment(_0x2ff5x1d[_0x8ac0[21]]);return _0x2ff5x1d[_0x8ac0[26]]({exitAt:_0x2ff5x13[_0x8ac0[23]](_0x8ac0[22]),duration:_0x2ff5x13[_0x8ac0[25]](_0x2ff5x15,_0x8ac0[24])},{individualHooks:true,transaction:_0x2ff5x10[_0x8ac0[44]]})})[_0x8ac0[29]](function(){return _0x2ff5x18});default:var _0x2ff5x17=Promise[_0x8ac0[48]](_0x2ff5xd[_0x8ac0[47]]);return _0x2ff5x17({action:_0x8ac0[46],interface:util[_0x8ac0[23]](_0x8ac0[36],_0x8ac0[37],_0x2ff5x18[_0x8ac0[35]]),paused:false})[_0x8ac0[54]](function(_0x2ff5x1f){console[_0x8ac0[53]](_0x2ff5x1f)})[_0x8ac0[29]](function(){return _0x2ff5x18[_0x8ac0[26]]({voicePause:false,mailPause:false,chatPause:false,faxPause:false},{transaction:_0x2ff5x10[_0x8ac0[44]]})})[_0x8ac0[29]](function(_0x2ff5x18){var _0x2ff5x13=moment();return ReportMember[_0x8ac0[26]]({exitAt:_0x2ff5x13},{where:{membername:_0x2ff5x18[_0x8ac0[35]],interface:util[_0x8ac0[23]](_0x8ac0[36],_0x8ac0[37],_0x2ff5x18[_0x8ac0[35]]),exitAt:null},transaction:_0x2ff5x10[_0x8ac0[44]]})})[_0x8ac0[29]](function(){return _0x2ff5x18})}}}function _0x2ff5x20(_0x2ff5x10,_0x2ff5x17){return function(_0x2ff5x18){return _0x2ff5x18[_0x8ac0[57]]()[_0x8ac0[29]](function(_0x2ff5x21){var _0x2ff5x22=[];_0x2ff5x21[_0x8ac0[28]](function(_0x2ff5x23){_0x2ff5x22[_0x8ac0[27]](_0x2ff5xd[_0x8ac0[47]]({action:_0x8ac0[56],queue:_0x2ff5x23[_0x8ac0[35]],interface:util[_0x8ac0[23]](_0x8ac0[36],_0x8ac0[37],_0x2ff5x18[_0x8ac0[35]]),membername:_0x2ff5x18[_0x8ac0[35]]}))});return Promise[_0x8ac0[20]](_0x2ff5x22)})[_0x8ac0[29]](function(_0x2ff5x1b){var _0x2ff5x19=[];_0x2ff5xe[_0x8ac0[28]](function(_0x2ff5x1a){_0x2ff5x19[_0x8ac0[27]]({channel:_0x2ff5x1a,membername:_0x2ff5x18[_0x8ac0[35]],interface:util[_0x8ac0[23]](_0x8ac0[36],_0x8ac0[37],_0x2ff5x18[_0x8ac0[35]]),type:_0x8ac0[55],enterAt:moment()[_0x8ac0[23]](_0x8ac0[22])})});return ReportMember[_0x8ac0[45]](_0x2ff5x19,{individualHooks:true})})}}function _0x2ff5x24(_0x2ff5x10,_0x2ff5x17){return function(_0x2ff5x18){return _0x2ff5x18[_0x8ac0[57]]()[_0x8ac0[29]](function(_0x2ff5x21){var _0x2ff5x22=[];_0x2ff5x21[_0x8ac0[28]](function(_0x2ff5x23){_0x2ff5x22[_0x8ac0[27]](_0x2ff5xd[_0x8ac0[47]]({action:_0x8ac0[58],queue:_0x2ff5x23[_0x8ac0[35]],interface:util[_0x8ac0[23]](_0x8ac0[36],_0x8ac0[37],_0x2ff5x18[_0x8ac0[35]])}))});return Promise[_0x8ac0[20]](_0x2ff5x22)[_0x8ac0[54]](function(_0x2ff5x1f){console[_0x8ac0[53]](_0x2ff5x1f)})})[_0x8ac0[29]](function(_0x2ff5x1b){return ReportMember[_0x8ac0[26]]({exitAt:moment()[_0x8ac0[23]](_0x8ac0[22])},{where:{membername:_0x2ff5x18[_0x8ac0[35]],interface:util[_0x8ac0[23]](_0x8ac0[36],_0x8ac0[37],_0x2ff5x18[_0x8ac0[35]]),type:_0x8ac0[55],exitAt:null},individualHooks:true,transaction:_0x2ff5x10[_0x8ac0[44]]})})}}function _0x2ff5x25(_0x2ff5x10,_0x2ff5x17){return function(_0x2ff5x18){var _0x2ff5x26=[];switch(_0x2ff5x10[_0x8ac0[39]][_0x8ac0[30]]){case _0x8ac0[15]:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[62]][_0x8ac0[28]](function(_0x2ff5x27){_0x2ff5x26[_0x8ac0[27]](UserHasVoiceQueue[_0x8ac0[61]]({where:{UserId:_0x2ff5x18[_0x8ac0[59]],queue:_0x2ff5x27},defaults:{queue:_0x2ff5x27,location:util[_0x8ac0[23]](_0x8ac0[60],_0x2ff5x18[_0x8ac0[35]]),membername:_0x2ff5x18[_0x8ac0[35]],UserId:_0x2ff5x18[_0x8ac0[59]]},transaction:_0x2ff5x10[_0x8ac0[44]]}))});return Promise[_0x8ac0[20]](_0x2ff5x26)[_0x8ac0[29]](function(){var _0x2ff5x22=[];_0x2ff5x10[_0x8ac0[39]][_0x8ac0[62]][_0x8ac0[28]](function(_0x2ff5x27){_0x2ff5x22[_0x8ac0[27]](_0x2ff5xd[_0x8ac0[47]]({action:_0x8ac0[56],queue:_0x2ff5x27,interface:util[_0x8ac0[23]](_0x8ac0[36],_0x8ac0[37],_0x2ff5x18[_0x8ac0[35]]),membername:_0x2ff5x18[_0x8ac0[35]]}))});return Promise[_0x8ac0[20]](_0x2ff5x22)})[_0x8ac0[54]](function(_0x2ff5x1f){console[_0x8ac0[53]](_0x2ff5x1f)});case _0x8ac0[16]:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[62]][_0x8ac0[28]](function(_0x2ff5x27){_0x2ff5x26[_0x8ac0[27]](UserHasChatQueue[_0x8ac0[61]]({where:{UserId:_0x2ff5x18[_0x8ac0[59]],ChatQueueId:_0x2ff5x27[_0x8ac0[59]]},defaults:{ChatQueueId:_0x2ff5x27[_0x8ac0[59]],queue:_0x2ff5x27[_0x8ac0[35]],UserId:_0x2ff5x18[_0x8ac0[59]]},transaction:_0x2ff5x10[_0x8ac0[44]]}))});return Promise[_0x8ac0[20]](_0x2ff5x26)[_0x8ac0[54]](function(_0x2ff5x1f){console[_0x8ac0[14]](_0x2ff5x1f)});case _0x8ac0[17]:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[62]][_0x8ac0[28]](function(_0x2ff5x27){_0x2ff5x26[_0x8ac0[27]](UserHasMailQueue[_0x8ac0[61]]({where:{UserId:_0x2ff5x18[_0x8ac0[59]],MailQueueId:_0x2ff5x27[_0x8ac0[59]]},defaults:{MailQueueId:_0x2ff5x27[_0x8ac0[59]],queue:_0x2ff5x27[_0x8ac0[35]],UserId:_0x2ff5x18[_0x8ac0[59]]},transaction:_0x2ff5x10[_0x8ac0[44]]}))});return Promise[_0x8ac0[20]](_0x2ff5x26)[_0x8ac0[54]](function(_0x2ff5x1f){console[_0x8ac0[14]](_0x2ff5x1f)});case _0x8ac0[18]:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[62]][_0x8ac0[28]](function(_0x2ff5x27){_0x2ff5x26[_0x8ac0[27]](UserHasFaxQueue[_0x8ac0[61]]({where:{UserId:_0x2ff5x18[_0x8ac0[59]],FaxQueueId:_0x2ff5x27[_0x8ac0[59]]},defaults:{faxQueueId:_0x2ff5x27[_0x8ac0[59]],queue:_0x2ff5x27[_0x8ac0[35]],UserId:_0x2ff5x18[_0x8ac0[59]]},transaction:_0x2ff5x10[_0x8ac0[44]]}))});return Promise[_0x8ac0[20]](_0x2ff5x26)[_0x8ac0[54]](function(_0x2ff5x1f){console[_0x8ac0[14]](_0x2ff5x1f)});default:}}}function _0x2ff5x28(_0x2ff5x10,_0x2ff5x17){return function(_0x2ff5x18){switch(_0x2ff5x10[_0x8ac0[39]][_0x8ac0[30]]){case _0x8ac0[15]:return UserHasVoiceQueue[_0x8ac0[65]]({where:{UserId:_0x2ff5x18[_0x8ac0[59]],queue:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[64]]},transaction:_0x2ff5x10[_0x8ac0[44]],individualHooks:true})[_0x8ac0[29]](function(){var _0x2ff5x29=Promise[_0x8ac0[48]](_0x2ff5xd[_0x8ac0[47]]);return _0x2ff5x29({action:_0x8ac0[58],queue:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[64]],interface:util[_0x8ac0[23]](_0x8ac0[36],_0x8ac0[37],_0x2ff5x18[_0x8ac0[35]])})})[_0x8ac0[54]](function(_0x2ff5x1f){console[_0x8ac0[53]](_0x8ac0[63],_0x2ff5x1f)});case _0x8ac0[16]:return UserHasChatQueue[_0x8ac0[65]]({where:{UserId:_0x2ff5x18[_0x8ac0[59]],ChatQueueId:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[66]]},transaction:_0x2ff5x10[_0x8ac0[44]],individualHooks:true})[_0x8ac0[54]](function(_0x2ff5x1f){console[_0x8ac0[53]](_0x8ac0[63],_0x2ff5x1f)});case _0x8ac0[17]:return UserHasMailQueue[_0x8ac0[65]]({where:{UserId:_0x2ff5x18[_0x8ac0[59]],MailQueueId:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[66]]},transaction:_0x2ff5x10[_0x8ac0[44]],individualHooks:true})[_0x8ac0[54]](function(_0x2ff5x1f){console[_0x8ac0[53]](_0x8ac0[63],_0x2ff5x1f)});case _0x8ac0[18]:return UserHasFaxQueue[_0x8ac0[65]]({where:{UserId:_0x2ff5x18[_0x8ac0[59]],FaxQueueId:_0x2ff5x10[_0x8ac0[39]][_0x8ac0[66]]},transaction:_0x2ff5x10[_0x8ac0[44]],individualHooks:true})[_0x8ac0[54]](function(_0x2ff5x1f){console[_0x8ac0[53]](_0x8ac0[63],_0x2ff5x1f)});default:}}}function _0x2ff5x2a(_0x2ff5x2b){return function(_0x2ff5x2c){if(!_0x2ff5x2c){throw _0x2ff5x2b};return _0x2ff5x2c}}function _0x2ff5x2d(_0x2ff5x17,_0x2ff5x10,_0x2ff5xd){switch(_0x2ff5x17[_0x8ac0[35]]){case _0x8ac0[70]:return Agent[_0x8ac0[69]](_0x2ff5x10[_0x8ac0[39]][_0x8ac0[68]])[_0x8ac0[29]](_0x2ff5x2a({message:_0x8ac0[67]}))[_0x8ac0[29]](_0x2ff5x16(_0x2ff5x10,_0x2ff5x17));case _0x8ac0[71]:return Agent[_0x8ac0[69]](_0x2ff5x10[_0x8ac0[39]][_0x8ac0[68]])[_0x8ac0[29]](_0x2ff5x2a({message:_0x8ac0[67]}))[_0x8ac0[29]](_0x2ff5x1c(_0x2ff5x10,_0x2ff5x17));case _0x8ac0[72]:return Agent[_0x8ac0[69]](_0x2ff5x17[_0x8ac0[40]])[_0x8ac0[29]](_0x2ff5x2a({message:_0x8ac0[67]}))[_0x8ac0[29]](_0x2ff5x20(_0x2ff5x10,_0x2ff5x17));case _0x8ac0[73]:return Agent[_0x8ac0[69]](_0x2ff5x17[_0x8ac0[40]])[_0x8ac0[29]](_0x2ff5x2a({message:_0x8ac0[67]}))[_0x8ac0[29]](_0x2ff5x1c(_0x2ff5x10,_0x2ff5x17))[_0x8ac0[29]](_0x2ff5x24(_0x2ff5x10,_0x2ff5x17));case _0x8ac0[56]:return Agent[_0x8ac0[69]](_0x2ff5x10[_0x8ac0[39]][_0x8ac0[68]])[_0x8ac0[29]](_0x2ff5x2a({message:_0x8ac0[67]}))[_0x8ac0[29]](_0x2ff5x25(_0x2ff5x10,_0x2ff5x17));case _0x8ac0[58]:return Agent[_0x8ac0[69]](_0x2ff5x10[_0x8ac0[39]][_0x8ac0[68]])[_0x8ac0[29]](_0x2ff5x2a({message:_0x8ac0[67]}))[_0x8ac0[29]](_0x2ff5x28(_0x2ff5x10,_0x2ff5x17));default:throw {message:_0x8ac0[74]}}}return {}}module[_0x8ac0[75]]=Action \ No newline at end of file diff --git a/server/config/ami/acw.js b/server/config/ami/acw.js index d3f273e..ddba8b8 100644 --- a/server/config/ami/acw.js +++ b/server/config/ami/acw.js @@ -1,152 +1 @@ -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; +var _0xcbb4=["\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(_0xcbb4[0]);var _=require(_0xcbb4[1]);var VoiceQueue=require(_0xcbb4[3])[_0xcbb4[2]];var Agent=require(_0xcbb4[3])[_0xcbb4[4]];var Action=require(_0xcbb4[3])[_0xcbb4[5]];var ReportAgent=require(_0xcbb4[3])[_0xcbb4[6]];var _voiceQueues;var _agents;var activeAcw={};function ACW(_0x55eaxb){console[_0xcbb4[8]](_0xcbb4[7]);VoiceQueue[_0xcbb4[14]]()[_0xcbb4[12]](function(_0x55eax10){_voiceQueues=_0x55eax10;synchCollection(VoiceQueue,_voiceQueues,_0xcbb4[13]);return Agent[_0xcbb4[16]](_0xcbb4[15])[_0xcbb4[14]]()})[_0xcbb4[12]](function(_0x55eaxd){_agents=_0x55eaxd;synchCollection(Agent,_agents,_0xcbb4[10]);Action[_0xcbb4[11]](function(_0x55eaxe,_0x55eaxf){return onSave(_0x55eaxe,_0x55eaxf)})})[_0xcbb4[9]](function(_0x55eaxc){console[_0xcbb4[8]](_0x55eaxc)})}function onSave(_0x55eaxe,_0x55eaxf){if(_0x55eaxe[_0xcbb4[13]]===_0xcbb4[17]&&activeAcw[_0x55eaxf[_0xcbb4[18]][_0xcbb4[15]]]){var _0x55eax12;if(activeAcw[_0x55eaxf[_0xcbb4[18]][_0xcbb4[15]]][_0xcbb4[17]]){_0x55eax12=activeAcw[_0x55eaxf[_0xcbb4[18]][_0xcbb4[15]]][_0xcbb4[19]]}else {clearTimeout(activeAcw[_0x55eaxf[_0xcbb4[18]][_0xcbb4[15]]][_0xcbb4[20]]);_0x55eax12=moment[_0xcbb4[23]](moment()-activeAcw[_0x55eaxf[_0xcbb4[18]][_0xcbb4[15]]][_0xcbb4[22]])[_0xcbb4[21]]()};return ReportAgent[_0xcbb4[27]]({agentacw:true,acwtime:_0x55eax12},{where:{uniqueid:activeAcw[_0x55eaxf[_0xcbb4[18]][_0xcbb4[15]]][_0xcbb4[24]],destuniqueid:activeAcw[_0x55eaxf[_0xcbb4[18]][_0xcbb4[15]]][_0xcbb4[25]]},transaction:_0x55eaxf[_0xcbb4[26]],individualHooks:true})[_0xcbb4[12]](function(){delete activeAcw[_0x55eaxf[_0xcbb4[18]][_0xcbb4[15]]]})[_0xcbb4[9]](function(_0x55eaxc){console[_0xcbb4[8]](_0x55eaxc)})}}ACW[_0xcbb4[29]][_0xcbb4[28]]=function(_0x55eax13){var _0x55eax14=_[_0xcbb4[31]](_voiceQueues,{name:_0x55eax13[_0xcbb4[30]],acw:true});if(_0x55eax14){var _0x55eax15=_[_0xcbb4[31]](_agents,{name:_0x55eax13[_0xcbb4[32]]});Action[_0xcbb4[37]]({name:_0xcbb4[38],data1:_0x55eax13[_0xcbb4[30]],data2:_0x55eax14[_0xcbb4[34]],data3:_0x55eax13[_0xcbb4[24]],data4:_0xcbb4[36]},{body:{agent:_0x55eax15[_0xcbb4[10]],type:_0xcbb4[36]}})[_0xcbb4[12]](function(){console[_0xcbb4[8]](_0xcbb4[33]);activeAcw[_0x55eax15[_0xcbb4[10]]]={uniqueid:_0x55eax13[_0xcbb4[24]],destuniqueid:_0x55eax13[_0xcbb4[25]],acwTime:_0x55eax14[_0xcbb4[34]],acwAt:moment(),unpause:false};activeAcw[_0x55eax15[_0xcbb4[10]]][_0xcbb4[20]]=setTimeout(function(){console[_0xcbb4[8]](_0xcbb4[35]);activeAcw[_0x55eax15[_0xcbb4[10]]][_0xcbb4[17]]=true;return Action[_0xcbb4[37]]({name:_0xcbb4[17],data1:_0x55eax13[_0xcbb4[30]],data2:_0x55eax14[_0xcbb4[34]],data3:_0x55eax13[_0xcbb4[24]],data4:_0xcbb4[36]},{body:{agent:_0x55eax15[_0xcbb4[10]],type:_0xcbb4[36]}})[_0xcbb4[9]](function(_0x55eaxc){console[_0xcbb4[8]](_0x55eaxc)})},_0x55eax14[_0xcbb4[34]]*1000)})[_0xcbb4[9]](function(_0x55eaxc){console[_0xcbb4[8]](_0x55eaxc)})}};function synchCollection(_0x55eax17,_0x55eax18,_0x55eax19){var _0x55eax1a={};_0x55eax17[_0xcbb4[11]](function(_0x55eaxe){_0x55eax1a[_0x55eax19]=_0x55eaxe[_0x55eax19];updateCollection(_0x55eax18,_0x55eaxe,_0x55eax1a)});_0x55eax17[_0xcbb4[39]](function(_0x55eaxe){_0x55eax1a[_0x55eax19]=_0x55eaxe[_0x55eax19];updateCollection(_0x55eax18,_0x55eaxe,_0x55eax1a)});_0x55eax17[_0xcbb4[41]](function(_0x55eaxe){_0x55eax1a[_0x55eax19]=_0x55eaxe[_0x55eax19];_[_0xcbb4[40]](_0x55eax18,_0x55eax1a)})}function updateCollection(_0x55eax1c,_0x55eaxe,_0x55eax1a){var _0x55eax1d=_[_0xcbb4[31]](_0x55eax1c,_0x55eax1a);var _0x55eax1e=_0x55eax1c[_0xcbb4[42]](_0x55eax1d);if(_0x55eax1d){_[_0xcbb4[43]](_0x55eax1c[_0x55eax1e],_0x55eaxe)}else {_0x55eax1c[_0xcbb4[44]](_0x55eaxe)}}module[_0xcbb4[45]]=ACW \ No newline at end of file diff --git a/server/config/ami/agent.js b/server/config/ami/agent.js index 1aca579..3a3d98b 100644 --- a/server/config/ami/agent.js +++ b/server/config/ami/agent.js @@ -1,94 +1 @@ -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; +var _0x7e01=["\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(_0x7e01[0]);var ReportAgent=require(_0x7e01[2])[_0x7e01[1]];function Agent(){console[_0x7e01[4]](_0x7e01[3])}Agent[_0x7e01[6]][_0x7e01[5]]=function(_0x1d6bx4){_0x1d6bx4[_0x7e01[7]]=_0x7e01[5];_0x1d6bx4[_0x7e01[8]]=moment()[_0x7e01[10]](_0x7e01[9]);return createAgent(_0x1d6bx4)};Agent[_0x7e01[6]][_0x7e01[11]]=function(_0x1d6bx4){_0x1d6bx4[_0x7e01[7]]=_0x7e01[11];_0x1d6bx4[_0x7e01[12]]=moment()[_0x7e01[10]](_0x7e01[9]);updateAgents(_0x1d6bx4);updateAgents({agentringnoanswer:true,agentringnoanswerAt:moment()[_0x7e01[10]](_0x7e01[9]),reason:_0x7e01[13],lastevent:_0x7e01[13]},{uniqueid:_0x1d6bx4[_0x7e01[14]],destuniqueid:{$ne:_0x1d6bx4[_0x7e01[15]]},reason:null})};Agent[_0x7e01[6]][_0x7e01[16]]=function(_0x1d6bx4){_0x1d6bx4[_0x7e01[7]]=_0x7e01[16];_0x1d6bx4[_0x7e01[17]]=true;_0x1d6bx4[_0x7e01[18]]=moment()[_0x7e01[10]](_0x7e01[9]);return updateAgents(_0x1d6bx4)};Agent[_0x7e01[6]][_0x7e01[19]]=function(_0x1d6bx4){_0x1d6bx4[_0x7e01[7]]=_0x7e01[19];_0x1d6bx4[_0x7e01[20]]=true;_0x1d6bx4[_0x7e01[21]]=moment()[_0x7e01[10]](_0x7e01[9]);return updateAgents(_0x1d6bx4)};Agent[_0x7e01[6]][_0x7e01[22]]=function(_0x1d6bx4){_0x1d6bx4[_0x7e01[7]]=_0x7e01[23];_0x1d6bx4[_0x7e01[24]]=true;_0x1d6bx4[_0x7e01[25]]=moment()[_0x7e01[10]](_0x7e01[9]);_0x1d6bx4[_0x7e01[26]]=_0x7e01[23];return updateAgents(_0x1d6bx4)};Agent[_0x7e01[6]][_0x7e01[27]]=function(_0x1d6bx4){_0x1d6bx4[_0x7e01[7]]=_0x7e01[28];_0x1d6bx4[_0x7e01[24]]=true;_0x1d6bx4[_0x7e01[25]]=moment()[_0x7e01[10]](_0x7e01[9]);_0x1d6bx4[_0x7e01[26]]=_0x7e01[28];return updateAgents(_0x1d6bx4,{uniqueid:_0x1d6bx4[_0x7e01[14]],reason:null})};function createAgent(_0x1d6bx4){return ReportAgent[_0x7e01[34]](_0x1d6bx4)[_0x7e01[33]](function(_0x1d6bx7){console[_0x7e01[4]](_0x7e01[32])})[_0x7e01[31]](function(_0x1d6bx6){console[_0x7e01[30]](_0x7e01[29]+_0x1d6bx6)})}function updateAgents(_0x1d6bx4,_0x1d6bx9){return ReportAgent[_0x7e01[37]](_0x1d6bx4,{where:(_0x1d6bx9)?_0x1d6bx9:{uniqueid:_0x1d6bx4[_0x7e01[14]],destuniqueid:_0x1d6bx4[_0x7e01[15]]},individualHooks:true})[_0x7e01[33]](function(_0x1d6bx7){console[_0x7e01[4]](_0x7e01[36])})[_0x7e01[31]](function(_0x1d6bx6){console[_0x7e01[30]](_0x7e01[35]+_0x1d6bx6)})}module[_0x7e01[38]]=Agent \ No newline at end of file diff --git a/server/config/ami/call.js b/server/config/ami/call.js index 15e34b3..83da554 100644 --- a/server/config/ami/call.js +++ b/server/config/ami/call.js @@ -1,26 +1 @@ -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; +var _0x9091=["\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[_0x9091[1]](_0x9091[0])}Call[_0x9091[3]][_0x9091[2]]=function(_0x97e9x2){create(_0x97e9x2)};function create(_0x97e9x2){var _0x97e9x4=require(_0x9091[5])[_0x9091[4]];_0x97e9x4[_0x9091[12]]({where:{uniqueid:_0x97e9x2[_0x9091[11]]},defaults:_0x97e9x2})[_0x9091[10]](function(_0x97e9x4,_0x97e9x6){console[_0x9091[1]](_0x9091[9],_0x97e9x6)})[_0x9091[8]](function(_0x97e9x5){console[_0x9091[7]](_0x9091[6]+_0x97e9x5)})}module[_0x9091[13]]=Call \ No newline at end of file diff --git a/server/config/ami/index.js b/server/config/ami/index.js index fdbd1fe..9144cf4 100644 --- a/server/config/ami/index.js +++ b/server/config/ami/index.js @@ -1,225 +1 @@ -'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); -}; +var _0xa5aa=["\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"];_0xa5aa[0];var Agent=require(_0xa5aa[1]);var Action=require(_0xa5aa[2]);var Call=require(_0xa5aa[3]);var Member=require(_0xa5aa[4]);var QueueCaller=require(_0xa5aa[5]);var QueueMember=require(_0xa5aa[6]);var Recording=require(_0xa5aa[7]);var Trunk=require(_0xa5aa[8]);var Context=require(_0xa5aa[9]);var ACW=require(_0xa5aa[10]);var User=require(_0xa5aa[11]);var Transfer=require(_0xa5aa[12]);function onDisconnect(_0xe385xe){}function onConnect(_0xe385xe){}function getVariable(_0xe385x11){var _0xe385x12=Object[_0xa5aa[14]](_0xe385x11[_0xa5aa[13]]);_0xe385x11[_0xa5aa[13]]=_0xe385x12[0];return _0xe385x11}module[_0xa5aa[15]]=function(_0xe385xe){var _0xe385x13= new Agent();var _0xe385x14= new Call();var _0xe385x15= new Member();var _0xe385x16= new QueueMember();var _0xe385x17= new QueueCaller();var _0xe385x18= new Recording();var _0xe385x19= new Trunk(_0xe385xe);var _0xe385x1a= new Context(_0xe385xe);var _0xe385x1b= new Action(_0xe385xe);var _0xe385x1c= new ACW(_0xe385xe);var _0xe385x1d= new User();var _0xe385x1e= new Transfer();_0xe385xe[_0xa5aa[23]](_0xa5aa[16],function(){console[_0xa5aa[21]](_0xa5aa[17],_0xe385xe[_0xa5aa[19]][_0xa5aa[18]],_0xe385xe[_0xa5aa[19]][_0xa5aa[20]]);_0xe385xe[_0xa5aa[19]][_0xa5aa[22]]= new Date();onConnect(_0xe385xe)});_0xe385xe[_0xa5aa[23]](_0xa5aa[24],function(){onDisconnect(_0xe385xe);console[_0xa5aa[21]](_0xa5aa[25],_0xe385xe[_0xa5aa[19]][_0xa5aa[18]],_0xe385xe[_0xa5aa[19]][_0xa5aa[20]])});_0xe385xe[_0xa5aa[23]](_0xa5aa[26],function(_0xe385x1f){console[_0xa5aa[28]](_0xa5aa[27],_0xe385xe[_0xa5aa[19]][_0xa5aa[18]],_0xe385xe[_0xa5aa[19]][_0xa5aa[20]],_0xe385x1f)});_0xe385xe[_0xa5aa[23]](_0xa5aa[29],function(_0xe385x20){console[_0xa5aa[28]](_0xa5aa[30],_0xe385xe[_0xa5aa[19]][_0xa5aa[18]],_0xe385xe[_0xa5aa[19]][_0xa5aa[20]],_0xe385x20)});_0xe385xe[_0xa5aa[23]](_0xa5aa[31],function(_0xe385x21){});_0xe385xe[_0xa5aa[23]](_0xa5aa[32],function(_0xe385x21){if(_0xe385x21[_0xa5aa[33]]===_0xa5aa[34]){console[_0xa5aa[28]](_0xa5aa[35],_0xe385x21[_0xa5aa[36]])};if(_0xe385x21[_0xa5aa[33]][_0xa5aa[38]](_0xa5aa[37])===0){_0xe385x1d[_0xa5aa[39]](_0xe385x21)}});_0xe385xe[_0xa5aa[23]](_0xa5aa[40],function(_0xe385x21){if(_0xe385x21[_0xa5aa[41]]===_0xa5aa[42]){console[_0xa5aa[28]](_0xa5aa[40],_0xa5aa[43])};_0xe385x13[_0xa5aa[43]](_0xe385x21);_0xe385x1d[_0xa5aa[44]](_0xa5aa[43],_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[45],function(_0xe385x21){_0xe385x1c[_0xa5aa[45]](_0xe385x21);_0xe385x13[_0xa5aa[46]](_0xe385x21);_0xe385x17[_0xa5aa[46]](_0xe385x21);_0xe385x1d[_0xa5aa[44]](_0xa5aa[46],_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[47],function(_0xe385x21){_0xe385x13[_0xa5aa[16]](_0xe385x21);_0xe385x1d[_0xa5aa[44]](_0xa5aa[16],_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[48],function(_0xe385x21){_0xe385x13[_0xa5aa[49]](_0xe385x21);_0xe385x1d[_0xa5aa[44]](_0xa5aa[46],_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[50],function(_0xe385x21){_0xe385x13[_0xa5aa[51]](_0xe385x21);_0xe385x1d[_0xa5aa[44]](_0xa5aa[46],_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[52],function(_0xe385x21){_0xe385x15[_0xa5aa[53]](_0xe385x21);_0xe385x16[_0xa5aa[54]](_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[55],function(_0xe385x21){_0xe385x15[_0xa5aa[56]](_0xe385x21);_0xe385x16[_0xa5aa[56]](_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[57],function(_0xe385x21){_0xe385x16[_0xa5aa[58]](_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[59],function(_0xe385x21){_0xe385x15[_0xa5aa[60]](_0xe385x21);_0xe385x16[_0xa5aa[61]](_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[62],function(_0xe385x21){_0xe385x16[_0xa5aa[63]](_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[64],function(_0xe385x21){_0xe385x16[_0xa5aa[65]](_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[66],function(_0xe385x21){_0xe385x17[_0xa5aa[67]](_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[68],function(_0xe385x21){_0xe385x17[_0xa5aa[69]](_0xe385x21);_0xe385x1d[_0xa5aa[44]](_0xa5aa[46],_0xe385x21);_0xe385x13[_0xa5aa[70]](_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[71],function(_0xe385x21){_0xe385x17[_0xa5aa[72]](_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[73],function(_0xe385x21){_0xe385x14[_0xa5aa[74]](_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[75],function(_0xe385x21){});_0xe385xe[_0xa5aa[23]](_0xa5aa[76],function(_0xe385x21){});_0xe385xe[_0xa5aa[23]](_0xa5aa[77],function(_0xe385x21){_0xe385x18[_0xa5aa[79]](_0xe385x21,_0xa5aa[78])});_0xe385xe[_0xa5aa[23]](_0xa5aa[80],function(_0xe385x21){console[_0xa5aa[28]](_0xa5aa[80],_0xe385x21);_0xe385x21[_0xa5aa[81]]=_0xa5aa[82];_0xe385x1e[_0xa5aa[83]](_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[84],function(_0xe385x21){console[_0xa5aa[28]](_0xa5aa[84],_0xe385x21);_0xe385x21[_0xa5aa[81]]=_0xa5aa[85];_0xe385x1e[_0xa5aa[86]](_0xe385x21)});_0xe385xe[_0xa5aa[23]](_0xa5aa[87],function(_0xe385x21){var _0xe385x11=getVariable(_0xe385x21);switch(_0xe385x11[_0xa5aa[13]]){case _0xa5aa[89]:_0xe385x18[_0xa5aa[79]](_0xe385x11,_0xa5aa[88]);break;case _0xa5aa[91]:_0xe385x17[_0xa5aa[90]](_0xe385x11);break;default:break}});require(_0xa5aa[93])[_0xa5aa[92]](_0xe385xe);require(_0xa5aa[94])[_0xa5aa[92]](_0xe385xe)} \ No newline at end of file diff --git a/server/config/ami/member.js b/server/config/ami/member.js index 0c4d403..f28c6a1 100644 --- a/server/config/ami/member.js +++ b/server/config/ami/member.js @@ -1,111 +1 @@ -'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; +var _0x7456=["\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"];_0x7456[0];var moment=require(_0x7456[1]);var member=require(_0x7456[3])[_0x7456[2]];function Member(){console[_0x7456[5]](_0x7456[4])}Member[_0x7456[7]][_0x7456[6]]=function(_0x7911x4){_0x7911x4[_0x7456[8]]=0;_0x7911x4[_0x7456[9]]=_0x7456[10];_0x7911x4[_0x7456[11]]=moment()[_0x7456[13]](_0x7456[12]);findOrCreate(_0x7911x4)};Member[_0x7456[7]][_0x7456[14]]=function(_0x7911x4){_0x7911x4[_0x7456[8]]=0;_0x7911x4[_0x7456[9]]=_0x7456[10];_0x7911x4[_0x7456[15]]=moment()[_0x7456[13]](_0x7456[12]);findAndUpdate(_0x7911x4)};Member[_0x7456[7]][_0x7456[16]]=function(_0x7911x4){_0x7911x4[_0x7456[8]]=1;_0x7911x4[_0x7456[9]]=_0x7456[17];var _0x7911x5=parseInt(_0x7911x4[_0x7456[18]],10);if(_0x7911x5){_0x7911x4[_0x7456[11]]=moment()[_0x7456[13]](_0x7456[12]);findOrCreate(_0x7911x4)}else {if(_0x7911x4[_0x7456[19]]){delete _0x7911x4[_0x7456[19]]};_0x7911x4[_0x7456[15]]=moment()[_0x7456[13]](_0x7456[12]);findAndUpdate(_0x7911x4)}};function findOrCreate(_0x7911x4){}function findAndUpdate(_0x7911x4){}module[_0x7456[20]]=Member \ No newline at end of file diff --git a/server/config/ami/queue_caller.js b/server/config/ami/queue_caller.js index d5ebc2a..22f8799 100644 --- a/server/config/ami/queue_caller.js +++ b/server/config/ami/queue_caller.js @@ -1,69 +1 @@ -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; +var _0xb0ba=["\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(_0xb0ba[0]);var ReportQueue=require(_0xb0ba[2])[_0xb0ba[1]];function QueueCaller(){console[_0xb0ba[4]](_0xb0ba[3])}QueueCaller[_0xb0ba[6]][_0xb0ba[5]]=function(_0x2410x4){_0x2410x4[_0xb0ba[7]]=moment()[_0xb0ba[9]](_0xb0ba[8]);return create(_0x2410x4)};QueueCaller[_0xb0ba[6]][_0xb0ba[10]]=function(_0x2410x4){_0x2410x4[_0xb0ba[11]]=moment()[_0xb0ba[9]](_0xb0ba[8]);return findAndUpdate(_0x2410x4)};QueueCaller[_0xb0ba[6]][_0xb0ba[12]]=function(_0x2410x4){_0x2410x4[_0xb0ba[13]]=true;_0x2410x4[_0xb0ba[14]]=moment()[_0xb0ba[9]](_0xb0ba[8]);return findAndUpdate(_0x2410x4)};QueueCaller[_0xb0ba[6]][_0xb0ba[15]]=function(_0x2410x4){_0x2410x4[_0xb0ba[16]]=true;_0x2410x4[_0xb0ba[17]]=moment()[_0xb0ba[9]](_0xb0ba[8]);return findAndUpdate(_0x2410x4)};QueueCaller[_0xb0ba[6]][_0xb0ba[18]]=function(_0x2410x4){_0x2410x4[_0xb0ba[13]]=false;_0x2410x4[_0xb0ba[14]]=null;_0x2410x4[_0xb0ba[19]]=true;_0x2410x4[_0xb0ba[20]]=moment()[_0xb0ba[9]](_0xb0ba[8]);_0x2410x4[_0xb0ba[21]]=_0x2410x4[_0xb0ba[23]][_0xb0ba[22]]();return findAndUpdate(_0x2410x4)};function create(_0x2410x4){return ReportQueue[_0xb0ba[29]](_0x2410x4)[_0xb0ba[28]](function(_0x2410x7){console[_0xb0ba[4]](_0xb0ba[27])})[_0xb0ba[26]](function(_0x2410x6){console[_0xb0ba[25]](_0xb0ba[24]+_0x2410x6)})}function findAndUpdate(_0x2410x4){return ReportQueue[_0xb0ba[34]](_0x2410x4,{where:{uniqueid:_0x2410x4[_0xb0ba[33]]},individualHooks:true})[_0xb0ba[28]](function(_0x2410x7){console[_0xb0ba[32]](_0xb0ba[31])})[_0xb0ba[26]](function(_0x2410x6){console[_0xb0ba[25]](_0xb0ba[30]+_0x2410x6)})}module[_0xb0ba[35]]=QueueCaller \ No newline at end of file diff --git a/server/config/ami/queue_member.js b/server/config/ami/queue_member.js index f7417d4..851f846 100644 --- a/server/config/ami/queue_member.js +++ b/server/config/ami/queue_member.js @@ -1,54 +1 @@ -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; +var _0x7f65=["\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(_0x7f65[0]);var UserHasVoiceQueue=require(_0x7f65[2])[_0x7f65[1]];function QueueMember(){console[_0x7f65[4]](_0x7f65[3])}QueueMember[_0x7f65[6]][_0x7f65[5]]=function(_0xcc98x4){_0xcc98x4[_0x7f65[7]]=true;_0xcc98x4[_0x7f65[8]]=moment()[_0x7f65[10]](_0x7f65[9]);return findAndUpdate(_0xcc98x4)};QueueMember[_0x7f65[6]][_0x7f65[11]]=function(_0xcc98x4){_0xcc98x4[_0x7f65[12]]=(parseInt(_0xcc98x4[_0x7f65[13]],10))?moment()[_0x7f65[10]](_0x7f65[9]):null;return findAndUpdate(_0xcc98x4)};QueueMember[_0x7f65[6]][_0x7f65[14]]=function(_0xcc98x4){return findAndUpdate(_0xcc98x4)};QueueMember[_0x7f65[6]][_0x7f65[15]]=function(_0xcc98x4){_0xcc98x4[_0x7f65[7]]=false;_0xcc98x4[_0x7f65[8]]=null;return findAndUpdate(_0xcc98x4)};QueueMember[_0x7f65[6]][_0x7f65[16]]=function(_0xcc98x4){return findAndUpdate(_0xcc98x4)};QueueMember[_0x7f65[6]][_0x7f65[17]]=function(_0xcc98x4){return findAndUpdate(_0xcc98x4)};function findAndUpdate(_0xcc98x4,_0xcc98x6){return UserHasVoiceQueue[_0x7f65[25]](_0xcc98x4,{where:{queue:_0xcc98x4[_0x7f65[23]],membername:_0xcc98x4[_0x7f65[24]]},individualHooks:true})[_0x7f65[22]](function(_0xcc98x8){console[_0x7f65[4]](_0x7f65[21])})[_0x7f65[20]](function(_0xcc98x7){console[_0x7f65[19]](_0x7f65[18]+_0xcc98x7)})}module[_0x7f65[26]]=QueueMember \ No newline at end of file diff --git a/server/config/ami/recording.js b/server/config/ami/recording.js index 1d22902..f5f5c98 100644 --- a/server/config/ami/recording.js +++ b/server/config/ami/recording.js @@ -1,22 +1 @@ -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; +var _0xd830=["\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(_0xd830[1])[_0xd830[0]];function Recording(){console[_0xd830[3]](_0xd830[2])}Recording[_0xd830[5]][_0xd830[4]]=function(_0x9957x3,_0x9957x4){create(_0x9957x3,_0x9957x4)};function create(_0x9957x3,_0x9957x4){_0x9957x3[_0xd830[6]]=_0x9957x4;return VoiceRecording[_0xd830[4]](_0x9957x3)[_0xd830[10]](function(){})[_0xd830[9]](function(_0x9957x6){console[_0xd830[8]](_0xd830[7]+_0x9957x6)})}module[_0xd830[11]]=Recording \ No newline at end of file diff --git a/server/config/ami/socket.js b/server/config/ami/socket.js index 0a82a2b..fe8f04a 100644 --- a/server/config/ami/socket.js +++ b/server/config/ami/socket.js @@ -1,19 +1 @@ -/** - * 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; +var _0xb9a2=["\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"];_0xb9a2[0];function Socket(_0xbd46x2,_0xbd46x3){console[_0xb9a2[2]](_0xb9a2[1]);var _0xbd46x4=require(_0xb9a2[4])[_0xb9a2[3]];return {test:function(){console[_0xb9a2[2]](_0xb9a2[5])}}}module[_0xb9a2[6]]=Socket \ No newline at end of file diff --git a/server/config/ami/transfer.js b/server/config/ami/transfer.js index 6a3cf79..ca67005 100644 --- a/server/config/ami/transfer.js +++ b/server/config/ami/transfer.js @@ -1,30 +1 @@ -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('[blind tranfer] created'); - }) - .catch(function(err) { - console.error('[blind tranfer] created error: ' + err); - }); -} - -Transfer.prototype.createAttended = function(evt) { - return ReportTransfer - .create(evt) - .then(function(member) { - console.log('[attended tranfer] created'); - }) - .catch(function(err) { - console.error('[attended tranfer] created error: ' + err); - }); -} - -module.exports = Transfer; +var _0x7d33=["\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\x62\x6C\x69\x6E\x64\x20\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\x62\x6C\x69\x6E\x64\x20\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","\x5B\x61\x74\x74\x65\x6E\x64\x65\x64\x20\x74\x72\x61\x6E\x66\x65\x72\x5D\x20\x63\x72\x65\x61\x74\x65\x64\x20\x65\x72\x72\x6F\x72\x3A\x20","\x5B\x61\x74\x74\x65\x6E\x64\x65\x64\x20\x74\x72\x61\x6E\x66\x65\x72\x5D\x20\x63\x72\x65\x61\x74\x65\x64","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0x7d33[0]);var ReportTransfer=require(_0x7d33[2])[_0x7d33[1]];function Transfer(){console[_0x7d33[4]](_0x7d33[3])}Transfer[_0x7d33[6]][_0x7d33[5]]=function(_0xf04cx4){return ReportTransfer[_0x7d33[12]](_0xf04cx4)[_0x7d33[11]](function(_0xf04cx6){console[_0x7d33[4]](_0x7d33[10])})[_0x7d33[9]](function(_0xf04cx5){console[_0x7d33[8]](_0x7d33[7]+_0xf04cx5)})};Transfer[_0x7d33[6]][_0x7d33[13]]=function(_0xf04cx4){return ReportTransfer[_0x7d33[12]](_0xf04cx4)[_0x7d33[11]](function(_0xf04cx6){console[_0x7d33[4]](_0x7d33[15])})[_0x7d33[9]](function(_0xf04cx5){console[_0x7d33[8]](_0x7d33[14]+_0xf04cx5)})};module[_0x7d33[16]]=Transfer \ No newline at end of file diff --git a/server/config/ami/trunk.js b/server/config/ami/trunk.js index 638620f..48264f8 100644 --- a/server/config/ami/trunk.js +++ b/server/config/ami/trunk.js @@ -1,124 +1 @@ -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; +var _0x92e9=["\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(_0x92e9[1])[_0x92e9[0]];var fs=require(_0x92e9[2]);var util=require(_0x92e9[3]);var path=require(_0x92e9[4]);var config=require(_0x92e9[5]);var _=require(_0x92e9[6]);function Trunk(_0x825bx8){console[_0x92e9[8]](_0x92e9[7]);TrunkModel[_0x92e9[9]](function(_0x825bx9){trunksRewrite(_0x825bx9,_0x825bx8,false)});TrunkModel[_0x92e9[10]](function(_0x825bx9){trunksRewrite(_0x825bx9,_0x825bx8,false)});TrunkModel[_0x92e9[11]](function(_0x825bx9){trunksRewrite(_0x825bx9,_0x825bx8,true)})}function trunksRewrite(_0x825bx9,_0x825bx8,_0x825bxb){var _0x825bxc=_0x92e9[12];var _0x825bxd=_0x92e9[12];var _0x825bxe=_0x92e9[13];if(!_0x825bxb){var _0x825bxf=_[_0x92e9[15]](_0x825bx9[_0x92e9[14]]);delete _0x825bxf[_0x92e9[16]];delete _0x825bxf[_0x92e9[17]];_0x825bxc+=util[_0x92e9[20]](_0x92e9[18],_0x825bxf[_0x92e9[19]]);if(_0x825bxf[_0x92e9[21]]){_0x825bxc+=util[_0x92e9[20]](_0x92e9[22],_0x825bxf[_0x92e9[21]]);delete _0x825bxf[_0x92e9[21]]};for(var _0x825bx10 in _0x825bxf){if(_0x825bxf[_0x825bx10]){switch(_0x825bx10){case _0x92e9[27]:var _0x825bx11=_0x825bxf[_0x825bx10][_0x92e9[24]](_0x92e9[23]);_0x825bx11[_0x92e9[26]](function(_0x825bx12){_0x825bxc+=util[_0x92e9[20]](_0x92e9[25],_0x825bx10,_0x825bx12)});break;default:_0x825bxc+=util[_0x92e9[20]](_0x92e9[25],_0x825bx10,_0x825bxf[_0x825bx10])}}};if(_0x825bxf[_0x92e9[28]]){_0x825bxd+=util[_0x92e9[20]](_0x825bxe,_0x825bxf[_0x92e9[28]])}};return TrunkModel[_0x92e9[41]]({where:{name:{$ne:_0x825bx9[_0x92e9[19]]}}})[_0x92e9[40]](function(_0x825bx14){var _0x825bx15=_[_0x92e9[30]](_0x825bx14,_0x92e9[14]);_0x825bx15[_0x92e9[26]](function(_0x825bx16){delete _0x825bx16[_0x92e9[16]];delete _0x825bx16[_0x92e9[17]];_0x825bxc+=util[_0x92e9[20]](_0x92e9[18],_0x825bx16[_0x92e9[19]]);if(_0x825bx16[_0x92e9[21]]){_0x825bxc+=util[_0x92e9[20]](_0x92e9[22],_0x825bx16[_0x92e9[21]]);delete _0x825bx16[_0x92e9[21]]};for(var _0x825bx10 in _0x825bx16){if(_0x825bx16[_0x825bx10]){switch(_0x825bx10){case _0x92e9[27]:var _0x825bx11=_0x825bx16[_0x825bx10][_0x92e9[24]](_0x92e9[23]);_0x825bx11[_0x92e9[26]](function(_0x825bx12){_0x825bxc+=util[_0x92e9[20]](_0x92e9[25],_0x825bx10,_0x825bx12)});break;default:_0x825bxc+=util[_0x92e9[20]](_0x92e9[25],_0x825bx10,_0x825bx16[_0x825bx10])}}};if(_0x825bx16[_0x92e9[28]]){_0x825bxd+=util[_0x92e9[20]](_0x825bxe,_0x825bx16[_0x92e9[28]])}});fs[_0x92e9[39]](path[_0x92e9[33]](config[_0x92e9[31]],_0x92e9[32]),_0x825bxc,{flags:_0x92e9[34],mode:parseInt(_0x92e9[35],8)},function(_0x825bx13){if(_0x825bx13){throw _0x825bx13};console[_0x92e9[8]](_0x92e9[36]);fs[_0x92e9[39]](path[_0x92e9[33]](config[_0x92e9[31]],_0x92e9[37]),_0x825bxd,{flags:_0x92e9[34],mode:parseInt(_0x92e9[35],8)},function(_0x825bx13){if(_0x825bx13){throw _0x825bx13};reload(_0x825bx8);console[_0x92e9[8]](_0x92e9[38])})})})[_0x92e9[29]](function(_0x825bx13){console[_0x92e9[8]](_0x825bx13)})}function reload(_0x825bx8){_0x825bx8[_0x92e9[44]]({Action:_0x92e9[42]},function(_0x825bx13,_0x825bx18){if(_0x825bx13){console[_0x92e9[43]](_0x825bx13)}else {console[_0x92e9[8]](_0x825bx18)}})}module[_0x92e9[45]]=Trunk \ No newline at end of file diff --git a/server/config/ami/user.js b/server/config/ami/user.js index 4db66fb..40b0f1b 100644 --- a/server/config/ami/user.js +++ b/server/config/ami/user.js @@ -1,50 +1 @@ -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; +var _0x13ba=["\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(_0x13ba[0]);var UserModel=require(_0x13ba[2])[_0x13ba[1]];function User(){console[_0x13ba[4]](_0x13ba[3])}User[_0x13ba[6]][_0x13ba[5]]=function(_0x465dx4){var _0x465dx5={status:_0x465dx4[_0x13ba[7]],statusAt:moment()[_0x13ba[9]](_0x13ba[8])};var _0x465dx6={name:_0x465dx4[_0x13ba[13]][_0x13ba[12]](_0x13ba[10],_0x13ba[11])};return findAndUpdate(_0x465dx5,_0x465dx6)};User[_0x13ba[6]][_0x13ba[14]]=function(_0x465dx7,_0x465dx4){var _0x465dx5={queueStatus:_0x465dx7,queueStatusAt:moment()[_0x13ba[9]](_0x13ba[8]),lastQueue:_0x465dx4[_0x13ba[15]]};var _0x465dx6=(_0x465dx4[_0x13ba[16]]===_0x13ba[17])?{lastQueue:_0x465dx4[_0x13ba[15]]}:{name:_0x465dx4[_0x13ba[18]]};return findAndUpdate(_0x465dx5,_0x465dx6)};function findAndUpdate(_0x465dx5,_0x465dx6){return UserModel[_0x13ba[24]](_0x465dx5,{where:_0x465dx6,individualHooks:true})[_0x13ba[23]](function(_0x465dxa){console[_0x13ba[4]](_0x13ba[22])})[_0x13ba[21]](function(_0x465dx9){console[_0x13ba[20]](_0x13ba[19]+_0x465dx9)})}module[_0x13ba[25]]=User \ No newline at end of file diff --git a/server/config/ami/voice_context.js b/server/config/ami/voice_context.js index 4b4a8ef..37c85f5 100644 --- a/server/config/ami/voice_context.js +++ b/server/config/ami/voice_context.js @@ -1,92 +1 @@ -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; +var _0xf299=["\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(_0xf299[1])[_0xf299[0]];var VoiceExtension=require(_0xf299[1])[_0xf299[2]];var fs=require(_0xf299[3]);var util=require(_0xf299[4]);var path=require(_0xf299[5]);var config=require(_0xf299[6]);function Context(_0x2722x8){VoiceContext[_0xf299[12]](function(_0x2722x9){if(_0x2722x9[_0xf299[8]](_0xf299[7])){throw new Error(_0xf299[9])};if(_0x2722x9[_0xf299[10]]){throw new Error(_0xf299[11])}});VoiceContext[_0xf299[14]](function(_0x2722xa){if(_0x2722xa[_0xf299[10]]){throw new Error(_0xf299[13])}});VoiceContext[_0xf299[15]](function(_0x2722xb){rewriteContexts(_0x2722xb,_0x2722x8,false);createHangup(_0x2722xb)});VoiceContext[_0xf299[16]](function(_0x2722xb){rewriteContexts(_0x2722xb,_0x2722x8,true)})}function rewriteContexts(_0x2722xb,_0x2722x8,_0x2722xd){var _0x2722xe=_0xf299[17];if(!_0x2722xd){_0x2722xe=util[_0xf299[19]](_0xf299[18],_0x2722xb[_0xf299[7]])};VoiceContext[_0xf299[35]]({where:{id:{$ne:_0x2722xb[_0xf299[34]]}}})[_0xf299[33]](function(_0x2722x10){_0x2722x10[_0xf299[22]](function(_0x2722x11){_0x2722xe+=util[_0xf299[19]](_0xf299[18],_0x2722x11[_0xf299[7]])});fs[_0xf299[32]](path[_0xf299[25]](config[_0xf299[23]],_0xf299[24]),_0x2722xe,{flags:_0xf299[26],mode:parseInt(_0xf299[27],8)},function(_0x2722xf){if(_0x2722xf){throw _0x2722xf};console[_0xf299[20]](_0xf299[28]);_0x2722x8[_0xf299[31]]({Action:_0xf299[29]},function(_0x2722xf,_0x2722x12){if(_0x2722xf){console[_0xf299[30]](_0x2722xf)}else {console[_0xf299[20]](_0x2722x12)}})})})[_0xf299[21]](function(_0x2722xf){console[_0xf299[20]](_0x2722xf)})}function createHangup(_0x2722xb){var _0x2722x14={context:_0x2722xb[_0xf299[7]],exten:_0xf299[36],priority:_0xf299[37],VoiceContextId:_0x2722xb[_0xf299[34]],type:_0xf299[38],app:_0xf299[39]};VoiceExtension[_0xf299[41]](_0x2722x14)[_0xf299[33]](function(_0x2722x12){console[_0xf299[20]](_0xf299[40])})[_0xf299[21]](function(_0x2722xf){console[_0xf299[20]](_0x2722xf)})}module[_0xf299[42]]=Context \ No newline at end of file diff --git a/server/config/analytics.js b/server/config/analytics.js index e69de29..43432f5 100644 --- a/server/config/analytics.js +++ b/server/config/analytics.js @@ -0,0 +1 @@ +var _0xebd9=[] \ No newline at end of file diff --git a/server/config/autodialer/index.js b/server/config/autodialer/index.js index a47295f..009133a 100644 --- a/server/config/autodialer/index.js +++ b/server/config/autodialer/index.js @@ -1,125 +1 @@ -'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(); -// }); -// }; +var _0xeb52=["\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"];_0xeb52[0];var util=require(_0xeb52[1]);var Process=require(_0xeb52[2]);module[_0xeb52[3]]=function(_0xb500x3){console[_0xeb52[5]](_0xeb52[4]);var _0xb500x4= new Process();_0xb500x4[_0xeb52[6]](function(_0xb500x5,_0xb500x6){if(_0xb500x6){console[_0xeb52[5]](_0xb500x6);return}})} \ No newline at end of file diff --git a/server/config/autodialer/process.js b/server/config/autodialer/process.js index 7974168..9f88302 100644 --- a/server/config/autodialer/process.js +++ b/server/config/autodialer/process.js @@ -1,26 +1 @@ -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; +var _0xc3f0=["\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(_0xc3f0[1])[_0xc3f0[0]];var Contact=require(_0xc3f0[1])[_0xc3f0[2]];function Process(){console[_0xc3f0[4]](_0xc3f0[3])}Process[_0xc3f0[6]][_0xc3f0[5]]=function(_0xe9b0x4){AutodialerProcess[_0xc3f0[9]]({where:{enable:true},include:[Contact]})[_0xc3f0[8]](function(_0xe9b0x6){_0xe9b0x4(_0xe9b0x6)})[_0xc3f0[7]](function(_0xe9b0x5){_0xe9b0x4(null,_0xe9b0x5)})};module[_0xc3f0[10]]=Process \ No newline at end of file diff --git a/server/config/automations/fax.js b/server/config/automations/fax.js index d31e0c8..02b4fc1 100644 --- a/server/config/automations/fax.js +++ b/server/config/automations/fax.js @@ -1,155 +1 @@ -'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); - }); -}; +var _0x4188=["\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"];_0x4188[0];var _=require(_0x4188[1]);var config=require(_0x4188[2]);var moment=require(_0x4188[3]);var sequelize=require(_0x4188[5])[_0x4188[4]];var Automation=require(_0x4188[5])[_0x4188[6]];var FaxRoom=require(_0x4188[5])[_0x4188[7]];var Settings=require(_0x4188[5])[_0x4188[8]];var automationTimeout;var activeAutomations={};function executeAutomation(_0xf3d6xb){var _0xf3d6xc={where:{$and:[],$or:[]}};var _0xf3d6xd={};_0xf3d6xb[_0x4188[14]][_0x4188[13]](function(_0xf3d6xe){_0xf3d6xc[_0x4188[12]][_0x4188[11]][_0x4188[10]](getCondition(_0xf3d6xe[_0x4188[9]]))});_0xf3d6xb[_0x4188[16]][_0x4188[13]](function(_0xf3d6xe){_0xf3d6xc[_0x4188[12]][_0x4188[15]][_0x4188[10]](getCondition(_0xf3d6xe[_0x4188[9]]))});return FaxRoom[_0x4188[25]](_0xf3d6xc)[_0x4188[24]](function(_0xf3d6x10){_0xf3d6x10[_0x4188[13]](function(_0xf3d6x11){_0xf3d6xb[_0x4188[23]][_0x4188[13]](function(_0xf3d6x12){switch(_0xf3d6x12[_0x4188[22]]){case _0x4188[21]:setStatus(_0xf3d6x11[_0x4188[19]],_0xf3d6x12[_0x4188[20]]);break;default:}})})})[_0x4188[18]](function(_0xf3d6xf){console[_0x4188[17]](_0xf3d6xf)})}function setStatus(_0xf3d6x14,_0xf3d6x15){return FaxRoom[_0x4188[26]]({status:_0xf3d6x15},{where:{id:_0xf3d6x14}})[_0x4188[18]](function(_0xf3d6xf){console[_0x4188[17]](_0xf3d6xf)})}function getCondition(_0xf3d6xe){var _0xf3d6x17={};switch(_0xf3d6xe[_0x4188[27]]){case _0x4188[21]:switch(_0xf3d6xe[_0x4188[31]]){case _0x4188[29]:_0xf3d6x17[_0xf3d6xe[_0x4188[27]]]=_0xf3d6xe[_0x4188[28]];break;case _0x4188[30]:_0xf3d6x17[_0xf3d6xe[_0x4188[27]]]={$ne:_0xf3d6xe[_0x4188[28]]};break;default:};break;case _0x4188[40]:var _0xf3d6x18=moment()[_0x4188[35]](parseInt(_0xf3d6xe[_0x4188[28]],10),_0x4188[34])[_0x4188[33]](_0x4188[32]);switch(_0xf3d6xe[_0x4188[31]]){case _0x4188[36]:_0xf3d6x17[_0xf3d6xe[_0x4188[27]]]={lt:_0xf3d6x18};break;case _0x4188[37]:_0xf3d6x17[_0xf3d6xe[_0x4188[27]]]={$lte:_0xf3d6x18};break;case _0x4188[38]:_0xf3d6x17[_0xf3d6xe[_0x4188[27]]]={$gt:_0xf3d6x18};break;case _0x4188[39]:_0xf3d6x17[_0xf3d6xe[_0x4188[27]]]={$gte:_0xf3d6x18};break;default:};break;default:};return _0xf3d6x17}function createInterval(_0xf3d6xb){activeAutomations[_0x4188[41]+_0xf3d6xb[_0x4188[19]]]=setInterval(function(){executeAutomation(_0xf3d6xb)},_0xf3d6xb[_0x4188[42]]*1000)}module[_0x4188[43]]=function(){Automation[_0x4188[46]](function(_0xf3d6x1a,_0xf3d6x1b){if(_0xf3d6x1a[_0x4188[21]]&&_0xf3d6x1a[_0x4188[44]]===_0x4188[45]){createInterval(_0xf3d6x1a)}});Automation[_0x4188[47]](function(_0xf3d6x1a,_0xf3d6x1b){if(activeAutomations[_0x4188[41]+_0xf3d6x1a[_0x4188[19]]]){clearInterval(activeAutomations[_0x4188[41]+_0xf3d6x1a[_0x4188[19]]])};if(_0xf3d6x1a[_0x4188[21]]&&_0xf3d6x1a[_0x4188[44]]===_0x4188[45]){createInterval(_0xf3d6x1a)}});Automation[_0x4188[48]](function(_0xf3d6x1a,_0xf3d6x1b){if(activeAutomations[_0x4188[41]+_0xf3d6x1a[_0x4188[19]]]){clearInterval(activeAutomations[_0x4188[41]+_0xf3d6x1a[_0x4188[19]]])}});Automation[_0x4188[51]](_0x4188[50])[_0x4188[25]]({where:{status:true,channel:_0x4188[45]}})[_0x4188[24]](function(_0xf3d6x1c){_0xf3d6x1c[_0x4188[13]](function(_0xf3d6xb){createInterval(_0xf3d6xb)})})[_0x4188[18]](function(_0xf3d6xf){console[_0x4188[49]](_0xf3d6xf)})} \ No newline at end of file diff --git a/server/config/automations/mail.js b/server/config/automations/mail.js index dfd4a14..379d89b 100644 --- a/server/config/automations/mail.js +++ b/server/config/automations/mail.js @@ -1,154 +1 @@ -'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); - }); -}; +var _0xb605=["\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"];_0xb605[0];var _=require(_0xb605[1]);var config=require(_0xb605[2]);var moment=require(_0xb605[3]);var sequelize=require(_0xb605[5])[_0xb605[4]];var Automation=require(_0xb605[5])[_0xb605[6]];var MailRoom=require(_0xb605[5])[_0xb605[7]];var Settings=require(_0xb605[5])[_0xb605[8]];var activeAutomations={};function executeAutomation(_0x7792xa){var _0x7792xb={where:{$and:[],$or:[]}};var _0x7792xc={};_0x7792xa[_0xb605[14]][_0xb605[13]](function(_0x7792xd){_0x7792xb[_0xb605[12]][_0xb605[11]][_0xb605[10]](getCondition(_0x7792xd[_0xb605[9]]))});_0x7792xa[_0xb605[16]][_0xb605[13]](function(_0x7792xd){_0x7792xb[_0xb605[12]][_0xb605[15]][_0xb605[10]](getCondition(_0x7792xd[_0xb605[9]]))});return MailRoom[_0xb605[25]](_0x7792xb)[_0xb605[24]](function(_0x7792xf){_0x7792xf[_0xb605[13]](function(_0x7792x10){_0x7792xa[_0xb605[23]][_0xb605[13]](function(_0x7792x11){switch(_0x7792x11[_0xb605[22]]){case _0xb605[21]:setStatus(_0x7792x10[_0xb605[19]],_0x7792x11[_0xb605[20]]);break;default:}})})})[_0xb605[18]](function(_0x7792xe){console[_0xb605[17]](_0x7792xe)})}function setStatus(_0x7792x13,_0x7792x14){return MailRoom[_0xb605[26]]({status:_0x7792x14},{where:{id:_0x7792x13}})[_0xb605[18]](function(_0x7792xe){console[_0xb605[17]](_0x7792xe)})}function getCondition(_0x7792xd){var _0x7792x16={};switch(_0x7792xd[_0xb605[27]]){case _0xb605[21]:switch(_0x7792xd[_0xb605[31]]){case _0xb605[29]:_0x7792x16[_0x7792xd[_0xb605[27]]]=_0x7792xd[_0xb605[28]];break;case _0xb605[30]:_0x7792x16[_0x7792xd[_0xb605[27]]]={$ne:_0x7792xd[_0xb605[28]]};break;default:};break;case _0xb605[40]:var _0x7792x17=moment()[_0xb605[35]](parseInt(_0x7792xd[_0xb605[28]],10),_0xb605[34])[_0xb605[33]](_0xb605[32]);switch(_0x7792xd[_0xb605[31]]){case _0xb605[36]:_0x7792x16[_0x7792xd[_0xb605[27]]]={lt:_0x7792x17};break;case _0xb605[37]:_0x7792x16[_0x7792xd[_0xb605[27]]]={$lte:_0x7792x17};break;case _0xb605[38]:_0x7792x16[_0x7792xd[_0xb605[27]]]={$gt:_0x7792x17};break;case _0xb605[39]:_0x7792x16[_0x7792xd[_0xb605[27]]]={$gte:_0x7792x17};break;default:};break;default:};return _0x7792x16}function createInterval(_0x7792xa){activeAutomations[_0xb605[41]+_0x7792xa[_0xb605[19]]]=setInterval(function(){executeAutomation(_0x7792xa)},_0x7792xa[_0xb605[42]]*1000)}module[_0xb605[43]]=function(){Automation[_0xb605[46]](function(_0x7792x19,_0x7792x1a){if(_0x7792x19[_0xb605[21]]&&_0x7792x19[_0xb605[44]]===_0xb605[45]){createInterval(_0x7792x19)}});Automation[_0xb605[47]](function(_0x7792x19,_0x7792x1a){if(activeAutomations[_0xb605[41]+_0x7792x19[_0xb605[19]]]){clearInterval(activeAutomations[_0xb605[41]+_0x7792x19[_0xb605[19]]])};if(_0x7792x19[_0xb605[21]]&&_0x7792x19[_0xb605[44]]===_0xb605[45]){createInterval(_0x7792x19)}});Automation[_0xb605[48]](function(_0x7792x19,_0x7792x1a){if(activeAutomations[_0xb605[41]+_0x7792x19[_0xb605[19]]]){clearInterval(activeAutomations[_0xb605[41]+_0x7792x19[_0xb605[19]]])}});Automation[_0xb605[51]](_0xb605[50])[_0xb605[25]]({where:{status:true,channel:_0xb605[45]}})[_0xb605[24]](function(_0x7792x1b){_0x7792x1b[_0xb605[13]](function(_0x7792xa){createInterval(_0x7792xa)})})[_0xb605[18]](function(_0x7792xe){console[_0xb605[49]](_0x7792xe)})} \ No newline at end of file diff --git a/server/config/express.js b/server/config/express.js index 1b2d7a3..61f1043 100644 --- a/server/config/express.js +++ b/server/config/express.js @@ -1,74 +1 @@ -/** - * 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()); -}; +var _0x79f7=["\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"];_0x79f7[0];var express=require(_0x79f7[1]);var favicon=require(_0x79f7[2]);var morgan=require(_0x79f7[3]);var compression=require(_0x79f7[4]);var bodyParser=require(_0x79f7[5]);var queryParser=require(_0x79f7[6]);var methodOverride=require(_0x79f7[7]);var cookieParser=require(_0x79f7[8]);var errorHandler=require(_0x79f7[9]);var path=require(_0x79f7[10]);var passport=require(_0x79f7[11]);var session=require(_0x79f7[12]);var flash=require(_0x79f7[13]);var SessionStore=require(_0x79f7[14]);var session=require(_0x79f7[12]);var config=require(_0x79f7[15]);module[_0x79f7[16]]=function(_0x2046x10){var _0x2046x11=_0x2046x10[_0x79f7[18]](_0x79f7[17]);_0x2046x10[_0x79f7[22]](_0x79f7[19],config[_0x79f7[20]]+_0x79f7[21]);_0x2046x10[_0x79f7[26]](_0x79f7[23],require(_0x79f7[25])[_0x79f7[24]]);_0x2046x10[_0x79f7[22]](_0x79f7[27],_0x79f7[23]);_0x2046x10[_0x79f7[28]](compression());_0x2046x10[_0x79f7[28]](bodyParser[_0x79f7[29]]({extended:false}));_0x2046x10[_0x79f7[28]](bodyParser[_0x79f7[30]]());_0x2046x10[_0x79f7[28]](methodOverride());_0x2046x10[_0x79f7[28]](cookieParser());_0x2046x10[_0x79f7[28]](passport[_0x79f7[31]]());_0x2046x10[_0x79f7[28]](session({secret:config[_0x79f7[33]][_0x79f7[32]],store: new SessionStore({host:config[_0x79f7[35]][_0x79f7[34]],port:config[_0x79f7[35]][_0x79f7[36]],user:config[_0x79f7[35]][_0x79f7[37]],password:config[_0x79f7[35]][_0x79f7[38]],database:config[_0x79f7[35]][_0x79f7[39]]}),cookie:config[_0x79f7[33]][_0x79f7[40]],name:config[_0x79f7[33]][_0x79f7[41]],resave:true,saveUninitialized:true}));if(_0x79f7[42]===_0x2046x11){_0x2046x10[_0x79f7[28]](favicon(path[_0x79f7[45]](config[_0x79f7[20]],_0x79f7[43],_0x79f7[44])));_0x2046x10[_0x79f7[28]](express[_0x79f7[46]](path[_0x79f7[45]](config[_0x79f7[20]],_0x79f7[43])));_0x2046x10[_0x79f7[22]](_0x79f7[47],config[_0x79f7[20]]+_0x79f7[48]);_0x2046x10[_0x79f7[28]](morgan(_0x79f7[49]))};if(_0x79f7[50]===_0x2046x11||_0x79f7[51]===_0x2046x11){_0x2046x10[_0x79f7[28]](require(_0x79f7[52])());_0x2046x10[_0x79f7[28]](express[_0x79f7[46]](path[_0x79f7[45]](config[_0x79f7[20]],_0x79f7[53])));_0x2046x10[_0x79f7[28]](express[_0x79f7[46]](path[_0x79f7[45]](config[_0x79f7[20]],_0x79f7[54])));_0x2046x10[_0x79f7[22]](_0x79f7[47],_0x79f7[54]);_0x2046x10[_0x79f7[28]](morgan(_0x79f7[49]));_0x2046x10[_0x79f7[28]](errorHandler())};_0x2046x10[_0x79f7[28]](flash())} \ No newline at end of file diff --git a/server/config/fax.js b/server/config/fax.js index c64343b..3b5956c 100644 --- a/server/config/fax.js +++ b/server/config/fax.js @@ -1,240 +1 @@ -'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); - -}; +var _0xf9f5=["\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"];_0xf9f5[0];var _=require(_0xf9f5[1]);var uuidLib=require(_0xf9f5[2]);var ConvertTiff=require(_0xf9f5[3]);var exec=require(_0xf9f5[5])[_0xf9f5[4]];var fs=require(_0xf9f5[6]);var path=require(_0xf9f5[7]);var FaxMessage=require(_0xf9f5[9])[_0xf9f5[8]];var FaxRoom=require(_0xf9f5[9])[_0xf9f5[10]];var Contact=require(_0xf9f5[9])[_0xf9f5[11]];var Event=require(_0xf9f5[9])[_0xf9f5[12]];var config=require(_0xf9f5[13]);exports[_0xf9f5[14]]=function(_0x4998xc){_0x4998xc[_0xf9f5[50]](_0xf9f5[15],function(_0x4998xd){FaxRoom[_0xf9f5[24]]({status:_0xf9f5[49],from:_0x4998xd[_0xf9f5[27]],FaxAccountId:1})[_0xf9f5[45]](function(_0x4998xf){_0x4998xd[_0xf9f5[18]]=_0xf9f5[19];_0x4998xd[_0xf9f5[20]]=_0x4998xf[_0xf9f5[21]];FaxMessage[_0xf9f5[24]](_0x4998xd)[_0xf9f5[45]](function(_0x4998x10){Event[_0xf9f5[24]]({name:_0xf9f5[22],channel:_0xf9f5[23],FaxRoomId:_0x4998xf[_0xf9f5[21]],FaxAccountId:1})[_0xf9f5[17]](function(_0x4998xe){console[_0xf9f5[16]](_0x4998xe)});Contact[_0xf9f5[28]]({where:{phone:_0x4998xd[_0xf9f5[27]]},defaults:{phone:_0x4998xd[_0xf9f5[27]],fullname:_0x4998xd[_0xf9f5[27]]}})[_0xf9f5[26]](function(_0x4998x11,_0x4998x12){_0x4998x10[_0xf9f5[25]](_0x4998x11)});Contact[_0xf9f5[28]]({where:{phone:_0x4998xd[_0xf9f5[30]]},defaults:{phone:_0x4998xd[_0xf9f5[30]],fullname:_0x4998xd[_0xf9f5[30]]}})[_0xf9f5[26]](function(_0x4998x11,_0x4998x12){_0x4998x10[_0xf9f5[29]](_0x4998x11)});var _0x4998x13=uuidLib[_0xf9f5[31]]();var _0x4998x14=_0x4998xd[_0xf9f5[32]];var _0x4998x15=path[_0xf9f5[39]](config[_0xf9f5[33]],_0xf9f5[34],_0xf9f5[35],_0xf9f5[36],_0xf9f5[37],_0x4998x13+_0xf9f5[38]);var _0x4998x16=_0xf9f5[40]+_0x4998x14+_0xf9f5[41]+_0x4998x15;fs[_0xf9f5[48]](_0x4998x14,function(_0x4998x17){if(_0x4998x17){console[_0xf9f5[16]](_0xf9f5[42]+_0x4998x14+_0xf9f5[43]);exec(_0x4998x16,function(_0x4998xe){if(_0x4998xe){console[_0xf9f5[16]](_0x4998xe)}else {_0x4998x10[_0xf9f5[46]]({filenamePDF:_0x4998x13+_0xf9f5[38]})[_0xf9f5[45]](function(){console[_0xf9f5[16]](_0xf9f5[42]+_0x4998x14+_0xf9f5[44])})[_0xf9f5[17]](function(_0x4998xe){console[_0xf9f5[16]](_0x4998xe)})}})}else {console[_0xf9f5[16]](_0xf9f5[42]+_0x4998x14+_0xf9f5[47])}})})[_0xf9f5[17]](function(_0x4998xe){console[_0xf9f5[16]](_0x4998xe)})})[_0xf9f5[17]](function(_0x4998xe){console[_0xf9f5[16]](_0x4998xe)})});_0x4998xc[_0xf9f5[50]](_0xf9f5[51],function(_0x4998xd){console[_0xf9f5[53]](_0xf9f5[52]);FaxMessage[_0xf9f5[55]]({where:{uniqueid:_0x4998xd[_0xf9f5[54]]}})[_0xf9f5[45]](function(_0x4998x10){if(_0x4998x10){_0x4998x10[_0xf9f5[46]](_0x4998xd)}})[_0xf9f5[17]](function(_0x4998xe){console[_0xf9f5[16]](_0x4998xe)})});_0x4998xc[_0xf9f5[50]](_0xf9f5[56],function(_0x4998xd){if(_0x4998xd[_0xf9f5[59]][_0xf9f5[58]](_0xf9f5[57])){FaxMessage[_0xf9f5[55]]({where:{uniqueid:_0x4998xd[_0xf9f5[54]]}})[_0xf9f5[45]](function(_0x4998x10){if(_0x4998x10){console[_0xf9f5[53]](_0xf9f5[60],_0xf9f5[18],_0x4998xd[_0xf9f5[61]]);_0x4998x10[_0xf9f5[46]]({status:_0x4998xd[_0xf9f5[61]]==_0xf9f5[62]?_0xf9f5[62]:_0xf9f5[63]})}})[_0xf9f5[17]](function(_0x4998xe){console[_0xf9f5[16]](_0x4998xe)})}else {if(_0x4998xd[_0xf9f5[59]][_0xf9f5[58]](_0xf9f5[64])){FaxMessage[_0xf9f5[55]]({where:{uniqueid:_0x4998xd[_0xf9f5[54]]}})[_0xf9f5[45]](function(_0x4998x10){if(_0x4998x10){console[_0xf9f5[53]](_0xf9f5[60],_0xf9f5[16],_0x4998xd[_0xf9f5[61]]);_0x4998x10[_0xf9f5[46]]({error:_0x4998xd[_0xf9f5[61]]})}})[_0xf9f5[17]](function(_0x4998xe){console[_0xf9f5[16]](_0x4998xe)})}else {if(_0x4998xd[_0xf9f5[59]][_0xf9f5[58]](_0xf9f5[65])){FaxMessage[_0xf9f5[55]]({where:{uniqueid:_0x4998xd[_0xf9f5[54]]}})[_0xf9f5[45]](function(_0x4998x10){if(_0x4998x10){console[_0xf9f5[53]](_0xf9f5[60],_0xf9f5[66],_0x4998xd[_0xf9f5[61]]);_0x4998x10[_0xf9f5[46]]({laststatus:_0x4998xd[_0xf9f5[61]]})}})[_0xf9f5[17]](function(_0x4998xe){console[_0xf9f5[16]](_0x4998xe)})}}}});_0x4998xc[_0xf9f5[50]](_0xf9f5[67],function(_0x4998xd){if(_0x4998xd[_0xf9f5[67]]===_0xf9f5[68]){FaxMessage[_0xf9f5[55]]({where:{uuid:_0x4998xd[_0xf9f5[70]]}})[_0xf9f5[45]](function(_0x4998x10){if(_0x4998x10){_0x4998xd[_0xf9f5[18]]=_0xf9f5[69];_0x4998x10[_0xf9f5[46]](_0x4998xd)}})[_0xf9f5[17]](function(_0x4998xe){console[_0xf9f5[16]](_0x4998xe)})}});_0x4998xc[_0xf9f5[50]](_0xf9f5[57],function(_0x4998xd){FaxMessage[_0xf9f5[55]]({where:{uniqueid:_0x4998xd[_0xf9f5[54]]}})[_0xf9f5[45]](function(_0x4998x10){if(_0x4998x10){console[_0xf9f5[53]](_0xf9f5[71],_0x4998xd[_0xf9f5[54]],_0x4998xd[_0xf9f5[18]]);_0x4998x10[_0xf9f5[46]]({operation:_0x4998xd[_0xf9f5[72]],laststatus:_0x4998xd[_0xf9f5[18]]})}})[_0xf9f5[17]](function(_0x4998xe){console[_0xf9f5[16]](_0x4998xe)})});require(_0xf9f5[73])[_0xf9f5[14]](_0x4998xc)} \ No newline at end of file diff --git a/server/config/history/history.js b/server/config/history/history.js index 3ff9179..a80af5d 100644 --- a/server/config/history/history.js +++ b/server/config/history/history.js @@ -1,47 +1 @@ -'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.ReportChat, HistoryModels.ReportChatHistory)) - .then(ReportMove.move(t, Models.ReportChatSession, HistoryModels.ReportChatSessionHistory)) - .then(ReportMove.move(t, Models.ReportChatRoom, HistoryModels.ReportChatRoomHistory)) - .then(ReportMove.move(t, Models.ReportMail, HistoryModels.ReportMailHistory)) - .then(ReportMove.move(t, Models.ReportMailSession, HistoryModels.ReportMailSessionHistory)) - .then(ReportMove.move(t, Models.ReportMailRoom, HistoryModels.ReportMailRoomHistory)) - .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(); -} +var _0x7870=["\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"];_0x7870[0];var Promise=require(_0x7870[1]);var sequelize=require(_0x7870[3])[_0x7870[2]];var ReportMove=require(_0x7870[4]);var Models=require(_0x7870[3]);var HistoryModels=require(_0x7870[3])[_0x7870[5]];module[_0x7870[6]]=function(_0xbe54x6){var _0xbe54x7= new _0xbe54x6({cronTime:_0x7870[7],onTick:function(){console[_0x7870[9]](_0x7870[8]);return sequelize[_0x7870[16]](function(_0xbe54x9){return Promise[_0x7870[15]]([])[_0x7870[13]](ReportMove[_0x7870[14]](_0xbe54x9,Models.ReportCall,HistoryModels.ReportCallHistory))[_0x7870[13]](ReportMove[_0x7870[14]](_0xbe54x9,Models.ReportAgent,HistoryModels.ReportAgentHistory))[_0x7870[13]](ReportMove[_0x7870[14]](_0xbe54x9,Models.ReportMember,HistoryModels.ReportMemberHistory))[_0x7870[13]](ReportMove[_0x7870[14]](_0xbe54x9,Models.ReportQueue,HistoryModels.ReportQueueHistory))[_0x7870[13]](ReportMove[_0x7870[14]](_0xbe54x9,Models.ReportIntegration,HistoryModels.ReportIntegrationHistory))[_0x7870[13]](ReportMove[_0x7870[14]](_0xbe54x9,Models.ReportChat,HistoryModels.ReportChatHistory))[_0x7870[13]](ReportMove[_0x7870[14]](_0xbe54x9,Models.ReportChatSession,HistoryModels.ReportChatSessionHistory))[_0x7870[13]](ReportMove[_0x7870[14]](_0xbe54x9,Models.ReportChatRoom,HistoryModels.ReportChatRoomHistory))[_0x7870[13]](ReportMove[_0x7870[14]](_0xbe54x9,Models.ReportMail,HistoryModels.ReportMailHistory))[_0x7870[13]](ReportMove[_0x7870[14]](_0xbe54x9,Models.ReportMailSession,HistoryModels.ReportMailSessionHistory))[_0x7870[13]](ReportMove[_0x7870[14]](_0xbe54x9,Models.ReportMailRoom,HistoryModels.ReportMailRoomHistory))[_0x7870[13]](ReportMove[_0x7870[14]](_0xbe54x9,Models.ReportSquare,HistoryModels.ReportSquareHistory))[_0x7870[13]](ReportMove[_0x7870[14]](_0xbe54x9,Models.ReportSquareDetail,HistoryModels.ReportSquareDetailHistory))[_0x7870[13]](ReportMove[_0x7870[14]](_0xbe54x9,Models.ReportTransfer,HistoryModels.ReportTransferHistory))[_0x7870[13]](function(){console[_0x7870[9]](_0x7870[12])})})[_0x7870[11]](function(_0xbe54x8){console[_0x7870[10]](_0xbe54x8)})}});_0xbe54x7[_0x7870[17]]()} \ No newline at end of file diff --git a/server/config/history/reportMove.js b/server/config/history/reportMove.js index c8b3643..b840ea1 100644 --- a/server/config/history/reportMove.js +++ b/server/config/history/reportMove.js @@ -1,41 +1 @@ -'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'); - }) - } -} +var _0xe031=["\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"];_0xe031[0];var _=require(_0xe031[1]);var moment=require(_0xe031[2]);exports[_0xe031[3]]=function(_0x1572x3,_0x1572x4,_0x1572x5){return function(){var _0x1572x6;return _0x1572x4[_0xe031[13]]({where:{createdAt:{$lte:moment()[_0xe031[12]](_0xe031[11])}},raw:true})[_0xe031[6]](function(_0x1572x7){_0x1572x6=_0x1572x7;return _0x1572x5[_0xe031[10]](_0x1572x7,{individualHooks:true,transaction:_0x1572x3})})[_0xe031[6]](function(){return _0x1572x4[_0xe031[9]]({where:{id:_[_0xe031[8]](_0x1572x6,_0xe031[7])}},{individualHooks:true,transaction:_0x1572x3})})[_0xe031[6]](function(){console[_0xe031[5]](_0xe031[4])})}} \ No newline at end of file diff --git a/server/config/imap/imap.js b/server/config/imap/imap.js index 5bbc7c6..dd368bf 100644 --- a/server/config/imap/imap.js +++ b/server/config/imap/imap.js @@ -1,220 +1 @@ -'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; +var _0x887c=["\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","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x49\x6D\x61\x70\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x69\x6D\x61\x70","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6F\x6E\x53\x61\x76\x65","\x69\x64","\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x49\x64","\x6F\x6E\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x6F\x6E\x52\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x73\x74\x6F\x70","\x75\x73\x65\x72\x6E\x61\x6D\x65","\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","\x4D\x41\x49\x4C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\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","\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","\x73\x6F\x75\x72\x63\x65","\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","\x73\x74\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x20\x49\x4D\x41\x50\x20\x55\x50\x44\x41\x54\x45\x44","\x20\x49\x4D\x41\x50\x20\x44\x45\x53\x54\x52\x4F\x59","\x65\x78\x70\x6F\x72\x74\x73"];_0x887c[0];var _=require(_0x887c[1]);var path=require(_0x887c[2]);var config=require(_0x887c[3]);var ImapListener=require(_0x887c[4]);var MailServerIn=require(_0x887c[6])[_0x887c[5]];var MailMessage=require(_0x887c[6])[_0x887c[7]];var MailAttachment=require(_0x887c[6])[_0x887c[8]];var MailRoom=require(_0x887c[6])[_0x887c[9]];var Contact=require(_0x887c[6])[_0x887c[10]];var sequelize=require(_0x887c[6])[_0x887c[11]];function Imap(){console[_0x887c[13]](_0x887c[12]);this[_0x887c[14]]=null}Imap[_0x887c[16]][_0x887c[15]]=function(_0xa364xc){var _0xa364xd=this;_0xa364xd[_0x887c[17]](_0xa364xc);MailServerIn[_0x887c[21]](function(_0xa364xc){if(_0xa364xd[_0x887c[14]]&&_0xa364xc[_0x887c[18]]===_0xa364xd[_0x887c[14]][_0x887c[19]]){_0xa364xd[_0x887c[20]](_0xa364xc)}});MailServerIn[_0x887c[23]](function(_0xa364xc){if(_0xa364xd[_0x887c[14]]&&_0xa364xc[_0x887c[18]]===_0xa364xd[_0x887c[14]][_0x887c[19]]){_0xa364xd[_0x887c[22]](_0xa364xc)}})};Imap[_0x887c[16]][_0x887c[17]]=function(_0xa364xc){if(this[_0x887c[14]]){this[_0x887c[14]][_0x887c[24]]();this[_0x887c[14]]=null};this[_0x887c[14]]= new ImapListener({username:_0xa364xc[_0x887c[25]],password:_0xa364xc[_0x887c[26]],host:_0xa364xc[_0x887c[27]],port:_0xa364xc[_0x887c[28]],tls:_0xa364xc[_0x887c[29]],tlsOptions:{rejectUnauthorized:false},mailbox:_0xa364xc[_0x887c[30]],searchFilter:[_0xa364xc[_0x887c[31]]],markSeen:true,fetchUnreadOnStart:true,mailParserOptions:{streamAttachments:false},attachments:true,attachmentOptions:{directory:path[_0x887c[37]](config[_0x887c[32]],_0x887c[33],_0x887c[34],_0x887c[35],_0x887c[36])},connTimeout:_0xa364xc[_0x887c[38]],authTimeout:_0xa364xc[_0x887c[39]],keepalive:_0xa364xc[_0x887c[40]]});this[_0x887c[14]][_0x887c[41]]();this[_0x887c[14]][_0x887c[51]](_0x887c[42],function(){console[_0x887c[13]](_0x887c[43]+_0xa364xc[_0x887c[25]]+_0x887c[44]);return MailServerIn[_0x887c[50]](_0xa364xc[_0x887c[18]])[_0x887c[49]](function(_0xa364xf){return _0xa364xf[_0x887c[48]]({state:_0x887c[47]})})[_0x887c[46]](function(_0xa364xe){console[_0x887c[45]](_0xa364xe)})});this[_0x887c[14]][_0x887c[51]](_0x887c[52],function(){console[_0x887c[13]](_0x887c[43]+_0xa364xc[_0x887c[53]]+_0x887c[54]);return MailServerIn[_0x887c[50]](_0xa364xc[_0x887c[18]])[_0x887c[49]](function(_0xa364xf){if(_0xa364xf){return _0xa364xf[_0x887c[48]]({state:_0x887c[55]})}})[_0x887c[46]](function(_0xa364xe){console[_0x887c[45]](_0xa364xe)})});this[_0x887c[14]][_0x887c[51]](_0x887c[45],function(_0xa364xe){console[_0x887c[13]](_0x887c[43]+_0xa364xc[_0x887c[53]]+_0x887c[56],_0xa364xe);return MailServerIn[_0x887c[50]](_0xa364xc[_0x887c[18]])[_0x887c[49]](function(_0xa364xf){if(_0xa364xf){return _0xa364xf[_0x887c[48]]({state:_0x887c[57],source:_0xa364xe[_0x887c[58]]})}})[_0x887c[46]](function(_0xa364xe){console[_0x887c[45]](_0xa364xe)})});this[_0x887c[14]][_0x887c[51]](_0x887c[59],function(_0xa364x10,_0xa364x11,_0xa364x12){var _0xa364x13;var _0xa364x14;var _0xa364x15,_0xa364x16,_0xa364x17,_0xa364x18;return sequelize[_0x887c[77]](function(_0xa364x19){if(_0xa364x10[_0x887c[60]]){return MailMessage[_0x887c[75]]({where:{messageId:_0xa364x10[_0x887c[60]][0]},include:[{all:true}]})[_0x887c[49]](function(_0xa364x1b){return _0xa364x1b[_0x887c[74]]()})[_0x887c[49]](function(_0xa364x1a){_0xa364x13=_0xa364x1a;console[_0x887c[13]](_0x887c[61],_0xa364x10);return MailMessage[_0x887c[73]]({messageId:_0xa364x10[_0x887c[62]],status:_0x887c[63],subject:_0xa364x10[_0x887c[64]],from:_[_0x887c[67]](_0xa364x10[_0x887c[65]],_0x887c[66]),to:_0xa364x10[_0x887c[68]]?_[_0x887c[67]](_0xa364x10[_0x887c[68]],_0x887c[66]):[],cc:_0xa364x10[_0x887c[69]]?_[_0x887c[67]](_0xa364x10[_0x887c[69]],_0x887c[66]):[],bcc:_0xa364x10[_0x887c[70]]?_[_0x887c[67]](_0xa364x10[_0x887c[70]],_0x887c[66]):[],html:_0xa364x10[_0x887c[71]]||null,text:_0xa364x10[_0x887c[72]]||null,MailAttachments:_0xa364x10[_0x887c[35]]||[],MailRoomId:_0xa364x1a[_0x887c[18]]},{include:[{model:MailAttachment}],transaction:_0xa364x19})})}else {return MailRoom[_0x887c[73]]({roomId:_0xa364x10[_0x887c[62]],subject:_0xa364x10[_0x887c[64]],from:_[_0x887c[67]](_0xa364x10[_0x887c[65]],_0x887c[66])[_0x887c[37]](_0x887c[76]),MailMessages:[{messageId:_0xa364x10[_0x887c[62]],subject:_0xa364x10[_0x887c[64]],from:_[_0x887c[67]](_0xa364x10[_0x887c[65]],_0x887c[66]),to:_0xa364x10[_0x887c[68]]?_[_0x887c[67]](_0xa364x10[_0x887c[68]],_0x887c[66]):[],cc:_0xa364x10[_0x887c[69]]?_[_0x887c[67]](_0xa364x10[_0x887c[69]],_0x887c[66]):[],bcc:_0xa364x10[_0x887c[70]]?_[_0x887c[67]](_0xa364x10[_0x887c[70]],_0x887c[66]):[],status:_0x887c[63],html:_0xa364x10[_0x887c[71]]||null,text:_0xa364x10[_0x887c[72]]||null,MailAttachments:_0xa364x10[_0x887c[35]]||[]}],MailAccountId:_0xa364xc[_0x887c[53]]},{transaction:_0xa364x19,include:[{model:MailMessage,include:[{model:MailAttachment}]}]})}})[_0x887c[46]](function(_0xa364xe){console[_0x887c[45]](_0xa364xe)})});this[_0x887c[14]][_0x887c[51]](_0x887c[78],function(_0xa364x1c){console[_0x887c[13]](_0xa364x1c[_0x887c[2]])});this[_0x887c[14]][_0x887c[19]]=_0xa364xc[_0x887c[18]]};Imap[_0x887c[16]][_0x887c[20]]=function(_0xa364xc){if(!_0xa364xc[_0x887c[80]](_0x887c[79])&&!_0xa364xc[_0x887c[80]](_0x887c[58])){console[_0x887c[13]](_0x887c[43]+_0xa364xc[_0x887c[25]]+_0x887c[81]);this[_0x887c[17]](_0xa364xc)}};Imap[_0x887c[16]][_0x887c[22]]=function(_0xa364xc){console[_0x887c[13]](_0x887c[43]+_0xa364xc[_0x887c[25]]+_0x887c[82]);this[_0x887c[14]][_0x887c[24]]();this[_0x887c[14]]=null};module[_0x887c[83]]=Imap \ No newline at end of file diff --git a/server/config/imap/index.js b/server/config/imap/index.js index 7d00997..f8e7f53 100644 --- a/server/config/imap/index.js +++ b/server/config/imap/index.js @@ -1,23 +1 @@ -'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); - }); -} +var _0xa4f1=["\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","\x2E\x2F\x69\x6D\x61\x70","\x65\x78\x70\x6F\x72\x74\x73","\x69\x6E\x69\x74","\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"];_0xa4f1[0];var MailServerIn=require(_0xa4f1[2])[_0xa4f1[1]];var Imap=require(_0xa4f1[3]);module[_0xa4f1[4]]=function(){MailServerIn[_0xa4f1[6]](function(_0xbcefx3){var _0xbcefx4= new Imap();_0xbcefx4[_0xa4f1[5]](_0xbcefx3)});return MailServerIn[_0xa4f1[11]]()[_0xa4f1[10]](function(_0xbcefx6){_0xbcefx6[_0xa4f1[9]](function(_0xbcefx7){var _0xbcefx4= new Imap();_0xbcefx4[_0xa4f1[5]](_0xbcefx7)})})[_0xa4f1[8]](function(_0xbcefx5){console[_0xa4f1[7]](_0xbcefx5)})} \ No newline at end of file diff --git a/server/config/integration.js b/server/config/integration.js index 8b87bc5..e74f4eb 100644 --- a/server/config/integration.js +++ b/server/config/integration.js @@ -1,24 +1 @@ -'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); - }); -}; +var _0xfbe7=["\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"];_0xfbe7[0];var path=require(_0xfbe7[1]);var fs=require(_0xfbe7[2]);var Integration=require(_0xfbe7[4])[_0xfbe7[3]];module[_0xfbe7[5]]=function(_0x3164x4,_0x3164x5){Integration[_0xfbe7[16]]()[_0xfbe7[15]](function(_0x3164x7){_0x3164x7[_0xfbe7[14]](function(_0x3164x8){var _0x3164x9=path[_0xfbe7[8]](_0x3164x8[_0xfbe7[1]]);var _0x3164xa=path[_0xfbe7[12]](_0x3164x9[_0xfbe7[9]],_0x3164x9[_0xfbe7[10]],_0x3164x8[_0xfbe7[11]]);if(fs[_0xfbe7[13]](_0x3164xa)){require(_0x3164xa)(_0x3164x4,_0x3164x5)}})})[_0xfbe7[7]](function(_0x3164x6){console[_0xfbe7[6]](_0x3164x6)})} \ No newline at end of file diff --git a/server/config/integrations/index.js b/server/config/integrations/index.js index 46f19fb..f432f24 100644 --- a/server/config/integrations/index.js +++ b/server/config/integrations/index.js @@ -1,120 +1 @@ -'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; +var _0x760b=["\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"];_0x760b[0];var _=require(_0x760b[1]);var IntegrationModel=require(_0x760b[3])[_0x760b[2]];var Variable=require(_0x760b[3])[_0x760b[4]];var Zendesk=require(_0x760b[5]);function Integration(_0x80d3x6){console[_0x760b[7]](_0x760b[6]);var _0x80d3x7= new Zendesk();var _0x80d3x8=[];var _0x80d3x9=[];var _0x80d3xa={};_0x80d3x6[_0x760b[17]](_0x760b[8],function(_0x80d3xb){if(!_0x80d3xa[_0x760b[10]](_0x80d3xb[_0x760b[9]])){_0x80d3xa[_0x80d3xb[_0x760b[9]]]=[]};if(_0x80d3xb[_0x760b[10]](_0x760b[11])&&_0x80d3xb[_0x760b[10]](_0x760b[12])){var _0x80d3xc=_[_0x760b[15]](_0x80d3x9,{"\x6E\x61\x6D\x65":_[_0x760b[14]](_[_0x760b[13]](_0x80d3xb[_0x760b[11]]))});if(_0x80d3xc>=0){var _0x80d3xd={name:_[_0x760b[14]](_[_0x760b[13]](_0x80d3xb[_0x760b[11]])),value:_0x80d3xb[_0x760b[12]]};_0x80d3xa[_0x80d3xb[_0x760b[9]]][_0x760b[16]](_0x80d3xd)}}});Variable[_0x760b[19]]()[_0x760b[18]](function(_0x80d3xe){_0x80d3x9=_0x80d3xe;synchVariables(_0x80d3x9)});IntegrationModel[_0x760b[19]]({where:{active:1}})[_0x760b[18]](function(_0x80d3xf){_0x80d3x8=_0x80d3xf;synchIntegrations(_0x80d3x8)});this[_0x760b[20]]=function(_0x80d3x10,_0x80d3x11,_0x80d3x12){console[_0x760b[7]](_0x760b[21]);if(integrationIsActive(_0x80d3x10[_0x760b[22]],_0x80d3x8)){switch(_0x80d3x10[_0x760b[22]]){case _0x760b[27]:_0x80d3x7[_0x760b[26]](_0x80d3x10[_0x760b[23]],_0x80d3x10[_0x760b[24]],_0x80d3x12,_0x80d3x11,_[_0x760b[25]](_0x80d3xa,_0x80d3x11[_0x760b[9]]));break;default:console[_0x760b[7]](_0x760b[28],_0x80d3x10[_0x760b[22]])}}}}function integrationIsActive(_0x80d3x14,_0x80d3x15){var _0x80d3x16=_[_0x760b[30]](_0x80d3x15,_0x760b[29]);if(_[_0x760b[31]](_0x80d3x16,_0x80d3x14)>=0){return true};return false}function synchIntegrations(_0x80d3x15){IntegrationModel[_0x760b[37]](function(_0x80d3x11){if(_0x80d3x11[_0x760b[32]]){updateCollection(_0x80d3x15,_0x80d3x11)}else {_[_0x760b[34]](_0x80d3x15,{id:_0x80d3x11[_0x760b[33]]})};console[_0x760b[7]](_0x760b[35],_0x80d3x15[_0x760b[36]])})}function synchVariables(_0x80d3x15){Variable[_0x760b[39]](function(_0x80d3x11){updateCollection(_0x80d3x15,_0x80d3x11);console[_0x760b[7]](_0x760b[38],_0x80d3x15[_0x760b[36]])});Variable[_0x760b[37]](function(_0x80d3x11){updateCollection(_0x80d3x15,_0x80d3x11);console[_0x760b[7]](_0x760b[40],_0x80d3x15[_0x760b[36]])});Variable[_0x760b[42]](function(_0x80d3x11){_[_0x760b[34]](_0x80d3x15,{id:_0x80d3x11[_0x760b[33]]});console[_0x760b[7]](_0x760b[41],_0x80d3x15[_0x760b[36]])})}function updateCollection(_0x80d3x1a,_0x80d3x11){var _0x80d3x1b=_[_0x760b[43]](_0x80d3x1a,{id:_0x80d3x11[_0x760b[33]]});var _0x80d3xc=_0x80d3x1a[_0x760b[31]](_0x80d3x1b);if(_0x80d3x1b){_[_0x760b[44]](_0x80d3x1a[_0x80d3xc],_0x80d3x11)}else {_0x80d3x1a[_0x760b[45]](_0x80d3x11)}}module[_0x760b[46]]=Integration \ No newline at end of file diff --git a/server/config/integrations/zendesk.js b/server/config/integrations/zendesk.js index 5abebe0..bcc8bd6 100644 --- a/server/config/integrations/zendesk.js +++ b/server/config/integrations/zendesk.js @@ -1,530 +1 @@ -'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; +var _0xff10=["\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"];_0xff10[0];var _=require(_0xff10[1]);var util=require(_0xff10[2]);var rp=require(_0xff10[3]);var ZendeskIntegration=require(_0xff10[5])[_0xff10[4]];var ZendeskConfiguration=require(_0xff10[5])[_0xff10[6]];var ReportIntegration=require(_0xff10[5])[_0xff10[7]];function Zendesk(){console[_0xff10[9]](_0xff10[8])}Zendesk[_0xff10[11]][_0xff10[10]]=function(_0x55b9x8,_0x55b9x9,_0x55b9xa,_0x55b9xb,_0x55b9xc){var _0x55b9xd={uri:undefined,headers:undefined,agent:undefined,enduser:undefined,ticket:undefined,configuration:undefined};if(!_0x55b9x8|| !_0x55b9x9){console[_0xff10[13]](_0xff10[12]);return};ZendeskConfiguration[_0xff10[16]]({where:{id:_0x55b9x9,AccountId:_0x55b9x8},include:[{all:true,include:[{all:true}]}]})[_0xff10[15]](handleEntityNotFound())[_0xff10[15]](handleConnection(_0x55b9xd))[_0xff10[15]](searchAgent(_0x55b9xd,_0x55b9xa,_0x55b9xb))[_0xff10[15]](handleAgent(_0x55b9xd,_0x55b9xa,_0x55b9xb))[_0xff10[15]](searchAdmin(_0x55b9xd))[_0xff10[15]](handleAdmin(_0x55b9xd))[_0xff10[15]](searchEndUser(_0x55b9xd,_0x55b9xa,_0x55b9xb))[_0xff10[15]](handleEndUser(_0x55b9xd,_0x55b9xa,_0x55b9xb))[_0xff10[15]](endUserCreation(_0x55b9xd,_0x55b9xa,_0x55b9xb))[_0xff10[15]](handleEndUserCreation(_0x55b9xd,_0x55b9xa,_0x55b9xb))[_0xff10[15]](ticketCreation(_0x55b9xd,_0x55b9xb,_0x55b9xc))[_0xff10[15]](handleTicketDisplay(_0x55b9xd))[_0xff10[15]](handleReportIntegration(_0x55b9xd,_0x55b9xa,_0x55b9xb,_0x55b9x8))[_0xff10[15]](handleEnd(_0x55b9xd))[_0xff10[14]](handleError(_0x55b9xd,_0x55b9xa,_0x55b9xb,_0x55b9x8))};function handleEntityNotFound(){return function(_0x55b9xf){if(!_0x55b9xf){return null};return _0x55b9xf}}function handleConnection(_0x55b9xd){return function(_0x55b9x11){var _0x55b9x12=getAccountConfiguration(_0x55b9x11.ZendeskAccount);_0x55b9xd[_0xff10[17]]=_0x55b9x11;_0x55b9xd[_0xff10[18]]=_0x55b9x12[_0xff10[18]];_0x55b9xd[_0xff10[19]]=_0x55b9x12[_0xff10[19]]}}function getAccountConfiguration(_0x55b9x14){var _0x55b9x15={uri:stripTrailingSlash(_0x55b9x14[_0xff10[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":_0xff10[21],"\x41\x63\x63\x65\x70\x74":_0xff10[21]}};var _0x55b9x16=_0x55b9x14[_0xff10[22]];if(_0x55b9x14[_0xff10[23]]===_0xff10[24]){_0x55b9x16=_0x55b9x16+_0xff10[25]+_0x55b9x14[_0xff10[24]]}else {if(_0x55b9x14[_0xff10[23]]===_0xff10[26]){_0x55b9x16=_0x55b9x16+_0xff10[27]+_0x55b9x14[_0xff10[26]]}};_0x55b9x15[_0xff10[19]][_0xff10[28]]=_0xff10[29]+ new Buffer(_0x55b9x16).toString(_0xff10[30]);return _0x55b9x15}function searchAgent(_0x55b9xd,_0x55b9xa,_0x55b9xb){return function(){console[_0xff10[9]](_0xff10[31],getValueFromPropertyName(_0x55b9xb,getAgentSearchPropertyFromChannel(_0x55b9xa)));return rp({uri:_0x55b9xd[_0xff10[18]]+_0xff10[32],qs:{"\x71\x75\x65\x72\x79":util[_0xff10[34]](_0xff10[33],getValueFromPropertyName(_0x55b9xb,getAgentSearchPropertyFromChannel(_0x55b9xa)))},headers:_0x55b9xd[_0xff10[19]],json:true})}}function getAgentSearchPropertyFromChannel(_0x55b9xa){var _0x55b9x19=_0xff10[35];if(_0x55b9xa){switch(_0x55b9xa){case _0xff10[37]:_0x55b9x19=_0xff10[36];break;default:_0x55b9x19=_0xff10[36];console[_0xff10[13]](_0xff10[38],_0x55b9xa)}};return _0x55b9x19}function getValueFromPropertyName(_0x55b9xb,_0x55b9x19){return _[_0xff10[39]](_0x55b9xb,_0x55b9x19)}function handleAgent(_0x55b9xd,_0x55b9xa,_0x55b9x1c){return function(_0x55b9xb){if(_0x55b9xb[_0xff10[41]][_0xff10[40]]>0&&_0x55b9xb[_0xff10[42]]>0){console[_0xff10[9]](_0xff10[43],getValueFromPropertyName(_0x55b9x1c,getAgentSearchPropertyFromChannel(_0x55b9xa)));_0x55b9xd[_0xff10[44]]=getMatchObject(_0x55b9xb[_0xff10[41]],_0xff10[45],getValueFromPropertyName(_0x55b9x1c,getAgentSearchPropertyFromChannel(_0x55b9xa)));return _0x55b9xd[_0xff10[44]]};return}}function getMatchObject(_0x55b9x1e,_0x55b9x19,_0x55b9x1f){var _0x55b9x20=_[_0xff10[16]](_0x55b9x1e,{property:_0x55b9x1f});if(_0x55b9x20){return _0x55b9x20};return _[_0xff10[46]](_0x55b9x1e)}function searchAdmin(_0x55b9xd){return function(_0x55b9xb){if(_0x55b9xb){return};console[_0xff10[9]](_0xff10[47]);return rp({uri:_0x55b9xd[_0xff10[18]]+_0xff10[48],headers:_0x55b9xd[_0xff10[19]],json:true})}}function handleAdmin(_0x55b9xd){return function(_0x55b9xb){if(!_0x55b9xb){return};if(_0x55b9xb[_0xff10[49]]){console[_0xff10[9]](_0xff10[50]);_0x55b9xd[_0xff10[44]]=_0x55b9xb[_0xff10[49]]};return}}function searchEndUser(_0x55b9xd,_0x55b9xa,_0x55b9xb){return function(){console[_0xff10[9]](_0xff10[51],getValueFromPropertyName(_0x55b9xb,getEndUserSearchPropertyFromChannel(_0x55b9xa)));return rp({uri:_0x55b9xd[_0xff10[18]]+_0xff10[32],qs:{"\x71\x75\x65\x72\x79":util[_0xff10[34]](_0xff10[52],getEndUserSearchQueryFromChannel(_0x55b9xa),getValueFromPropertyName(_0x55b9xb,getEndUserSearchPropertyFromChannel(_0x55b9xa)))},headers:_0x55b9xd[_0xff10[19]],json:true})}}function getEndUserSearchQueryFromChannel(_0x55b9xa){var _0x55b9x19=_0xff10[35];if(_0x55b9xa){switch(_0x55b9xa){case _0xff10[37]:_0x55b9x19=_0xff10[53];break;default:_0x55b9x19=_0xff10[53];console[_0xff10[13]](_0xff10[38],_0x55b9xa)}};return _0x55b9x19}function getEndUserSearchPropertyFromChannel(_0x55b9xa){var _0x55b9x19=_0xff10[35];if(_0x55b9xa){switch(_0x55b9xa){case _0xff10[37]:_0x55b9x19=_0xff10[54];break;default:_0x55b9x19=_0xff10[54];console[_0xff10[13]](_0xff10[38],_0x55b9xa)}};return _0x55b9x19}function getEndUserNamePropertyFromChannel(_0x55b9xa){var _0x55b9x19=_0xff10[35];if(_0x55b9xa){switch(_0x55b9xa){case _0xff10[37]:_0x55b9x19=_0xff10[55];break;default:_0x55b9x19=_0xff10[55];console[_0xff10[13]](_0xff10[38],_0x55b9xa)}};return _0x55b9x19}function handleEndUser(_0x55b9xd,_0x55b9xa,_0x55b9x1c){return function(_0x55b9xb){if(_0x55b9xb[_0xff10[41]][_0xff10[40]]>0&&_0x55b9xb[_0xff10[42]]>0){console[_0xff10[9]](_0xff10[56],getValueFromPropertyName(_0x55b9x1c,getEndUserSearchPropertyFromChannel(_0x55b9xa)));_0x55b9xd[_0xff10[57]]=_0x55b9xb[_0xff10[41]][0];return _0x55b9xd[_0xff10[57]]};return}}function endUserCreation(_0x55b9xd,_0x55b9xa,_0x55b9x1c){return function(_0x55b9xb){if(_0x55b9xb){return};console[_0xff10[9]](_0xff10[58],getValueFromPropertyName(_0x55b9x1c,getEndUserSearchPropertyFromChannel(_0x55b9xa)));console[_0xff10[9]](getJsonForEndUserCreation(_0x55b9xa,_0x55b9x1c));return rp({uri:_0x55b9xd[_0xff10[18]]+_0xff10[59],method:_0xff10[60],body:{user:getJsonForEndUserCreation(_0x55b9xa,_0x55b9x1c)},headers:_0x55b9xd[_0xff10[19]],json:true})}}function getJsonForEndUserCreation(_0x55b9xa,_0x55b9xb){var _0x55b9x2a={role:_0xff10[61]};switch(_0x55b9xa){case _0xff10[37]:if(_0x55b9xb[_0xff10[55]]){_0x55b9x2a[_0xff10[45]]=getValueFromPropertyName(_0x55b9xb,getEndUserNamePropertyFromChannel(_0x55b9xa))}else {_0x55b9x2a[_0xff10[45]]=util[_0xff10[34]](_0xff10[62],getValueFromPropertyName(_0x55b9xb,getAgentSearchPropertyFromChannel(_0x55b9xa)))};_0x55b9x2a[_0xff10[53]]=getValueFromPropertyName(_0x55b9xb,getEndUserSearchPropertyFromChannel(_0x55b9xa));break;default:console[_0xff10[13]](_0xff10[38],_0x55b9xa)};return _0x55b9x2a}function handleEndUserCreation(_0x55b9xd,_0x55b9xa,_0x55b9x1c){return function(_0x55b9xb){if(!_0x55b9xb){return};if(_0x55b9xb[_0xff10[49]]){console[_0xff10[9]](_0xff10[63],getValueFromPropertyName(_0x55b9x1c,getEndUserSearchPropertyFromChannel(_0x55b9xa)));_0x55b9xd[_0xff10[57]]=_0x55b9xb[_0xff10[49]]};return}}function ticketCreation(_0x55b9xd,_0x55b9x1c,_0x55b9xc){return function(){var _0x55b9x2d={requester_id:_0x55b9xd[_0xff10[44]][_0xff10[64]],submitter_id:_0x55b9xd[_0xff10[57]][_0xff10[64]],assignee_id:_0x55b9xd[_0xff10[57]][_0xff10[64]],tags:createTagsFromConfiguration(_0x55b9xd),subject:createSubjectFromConfiguration(_0x55b9xd,_0x55b9x1c,_0x55b9xc),description:createDescriptionFromConfiguration(_0x55b9xd,_0x55b9x1c,_0x55b9xc),custom_fields:createCustomFieldsFromConfiguration(_0x55b9xd,_0x55b9x1c,_0x55b9xc)};var _0x55b9x2e=createFieldsFromConfiguration(_0x55b9xd);if(_0x55b9x2e[_0xff10[40]]>0){_[_0xff10[66]](_0x55b9x2e,function(_0x55b9x2f){_0x55b9x2d[_0x55b9x2f[_0xff10[64]]]=_0x55b9x2f[_0xff10[65]]})};console[_0xff10[9]](_0xff10[67],_0x55b9x2d);return rp({uri:_0x55b9xd[_0xff10[18]]+_0xff10[68],method:_0xff10[60],body:{ticket:_0x55b9x2d},headers:_0x55b9xd[_0xff10[19]],json:true})}}function createTagsFromConfiguration(_0x55b9xd){var _0x55b9x31=[];if(_0x55b9xd[_0xff10[17]][_0xff10[69]][_0xff10[40]]>0){_0x55b9x31=_[_0xff10[70]](_0x55b9xd[_0xff10[17]].Tags,_0xff10[45])};return _0x55b9x31}function createSubjectFromConfiguration(_0x55b9xd,_0x55b9x1c,_0x55b9xc){var _0x55b9x33=_0xff10[35];var _0x55b9x34=[];if(_0x55b9xd[_0xff10[17]][_0xff10[71]][_0xff10[40]]>0){var _0x55b9x35=_[_0xff10[72]](_0x55b9xd[_0xff10[17]].Subject,[_0xff10[64]]);_[_0xff10[66]](_0x55b9x35,function(_0x55b9x36){if(_0x55b9x36[_0xff10[73]]===_0xff10[74]){_0x55b9x34[_0xff10[76]](_0x55b9x36[_0xff10[75]])}else {if(_0x55b9x36[_0xff10[73]]===_0xff10[77]&&_0x55b9x36[_0xff10[78]]){var _0x55b9x37=getValueFromPropertyName(_0x55b9x1c,_0x55b9x36[_0xff10[78]]);if(_0x55b9x37){_0x55b9x34[_0xff10[76]](_0x55b9x37.toString())}}else {if(_0x55b9x36[_0xff10[73]]===_0xff10[79]){var _0x55b9x38=_[_0xff10[16]](_0x55b9xc,{"\x6E\x61\x6D\x65":_0x55b9x36[_0xff10[80]][_0xff10[45]]});if(_0x55b9x38){_0x55b9x34[_0xff10[76]](_0x55b9x38[_0xff10[65]].toString())}}}}});_0x55b9x33=_0x55b9x34[_0xff10[82]](_0xff10[81])};return _0x55b9x33}function createDescriptionFromConfiguration(_0x55b9xd,_0x55b9x1c,_0x55b9xc){var _0x55b9x3a=_0xff10[35];var _0x55b9x34=[];if(_0x55b9xd[_0xff10[17]][_0xff10[83]][_0xff10[40]]>0){var _0x55b9x3b=_[_0xff10[72]](_0x55b9xd[_0xff10[17]].Description,[_0xff10[64]]);_[_0xff10[66]](_0x55b9x3b,function(_0x55b9x36){if(_0x55b9x36[_0xff10[73]]===_0xff10[74]){_0x55b9x34[_0xff10[76]](_0x55b9x36[_0xff10[75]])}else {if(_0x55b9x36[_0xff10[73]]===_0xff10[84]){if(_0x55b9x36[_0xff10[85]]===_0xff10[74]){_0x55b9x34[_0xff10[76]](util[_0xff10[34]](_0xff10[86],_0x55b9x36[_0xff10[87]],_0x55b9x36[_0xff10[88]]))}else {if(_0x55b9x36[_0xff10[85]]===_0xff10[77]&&_0x55b9x36[_0xff10[78]]){var _0x55b9x37=getValueFromPropertyName(_0x55b9x1c,_0x55b9x36[_0xff10[78]]);if(_0x55b9x37){_0x55b9x34[_0xff10[76]](util[_0xff10[34]](_0xff10[86],_0x55b9x36[_0xff10[87]],_0x55b9x37.toString()))}}else {if(_0x55b9x36[_0xff10[85]]===_0xff10[79]){var _0x55b9x38=_[_0xff10[16]](_0x55b9xc,{"\x6E\x61\x6D\x65":_0x55b9x36[_0xff10[80]][_0xff10[45]]});if(_0x55b9x38){_0x55b9x34[_0xff10[76]](util[_0xff10[34]](_0xff10[86],_0x55b9x36[_0xff10[87]],_0x55b9x38[_0xff10[65]].toString()))}}}}}}});_0x55b9x3a=_0x55b9x34[_0xff10[82]](_0xff10[89])};return _0x55b9x3a}function createCustomFieldsFromConfiguration(_0x55b9xd,_0x55b9x1c,_0x55b9xc){var _0x55b9x3d=[];var _0x55b9x3e=[];if(_0x55b9xd[_0xff10[17]][_0xff10[90]][_0xff10[40]]>0){_0x55b9x3d=_[_0xff10[91]](_0x55b9xd[_0xff10[17]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0xff10[66]](_0x55b9x3d,function(_0x55b9x2f){if(_0x55b9x2f[_0xff10[73]]===_0xff10[74]){_0x55b9x3e[_0xff10[76]]({id:_0x55b9x2f[_0xff10[92]],value:_0x55b9x2f[_0xff10[75]]})}else {if(_0x55b9x2f[_0xff10[73]]===_0xff10[77]){var _0x55b9x37=getValueFromPropertyName(_0x55b9x1c,_0x55b9x2f[_0xff10[78]]);if(_0x55b9x37){_0x55b9x3e[_0xff10[76]]({id:_0x55b9x2f[_0xff10[92]],value:_0x55b9x37.toString()})}}else {if(_0x55b9x2f[_0xff10[73]]===_0xff10[79]){var _0x55b9x38=_[_0xff10[16]](_0x55b9xc,{"\x6E\x61\x6D\x65":_0x55b9x2f[_0xff10[80]][_0xff10[45]]});if(_0x55b9x38){_0x55b9x3e[_0xff10[76]]({id:_0x55b9x2f[_0xff10[92]],value:_0x55b9x38[_0xff10[65]].toString()})}}}}})};return _0x55b9x3e}function createFieldsFromConfiguration(_0x55b9xd){var _0x55b9x2e=[];var _0x55b9x3e=[];if(_0x55b9xd[_0xff10[17]][_0xff10[90]][_0xff10[40]]>0){_0x55b9x2e=_[_0xff10[91]](_0x55b9xd[_0xff10[17]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0xff10[66]](_0x55b9x2e,function(_0x55b9x2f){if(_0x55b9x2f[_0xff10[73]]===_0xff10[74]){_0x55b9x3e[_0xff10[76]]({id:_0x55b9x2f[_0xff10[93]],value:_0x55b9x2f[_0xff10[75]]})}})};return _0x55b9x3e}function handleTicketDisplay(_0x55b9xd){return function(_0x55b9xb){if(_0x55b9xb[_0xff10[94]]){console[_0xff10[9]](_0xff10[95]);_0x55b9xd[_0xff10[94]]=_0x55b9xb[_0xff10[94]];var _0x55b9x41=util[_0xff10[34]](_0xff10[96],_0x55b9xd[_0xff10[44]][_0xff10[64]],_0x55b9xd[_0xff10[94]][_0xff10[64]]);return rp({uri:_0x55b9xd[_0xff10[18]]+_0x55b9x41,method:_0xff10[60],headers:_0x55b9xd[_0xff10[19]],json:true})};return}}function handleReportIntegration(_0x55b9xd,_0x55b9xa,_0x55b9xb,_0x55b9x8){return function(){_0x55b9xb=_0x55b9xb[_0xff10[97]];delete _0x55b9xb[_0xff10[64]];_0x55b9xb[_0xff10[98]]=_0xff10[99];_0x55b9xb[_0xff10[100]]=_0x55b9xa;_0x55b9xb[_0xff10[101]]=_0xff10[102];_0x55b9xb[_0xff10[103]]=_0x55b9xd[_0xff10[94]][_0xff10[64]];_0x55b9xb[_0xff10[104]]=_0x55b9x8;return ReportIntegration[_0xff10[105]](_0x55b9xb)}}function handleEnd(_0x55b9xd,_0x55b9xb,_0x55b9xa){return function(){console[_0xff10[9]](util[_0xff10[34]](_0xff10[106],_0x55b9xd[_0xff10[94]][_0xff10[64]],_0x55b9xd[_0xff10[44]][_0xff10[64]]));_0x55b9xd=undefined;return}}function handleError(_0x55b9xd,_0x55b9xa,_0x55b9xb,_0x55b9x8){return function(_0x55b9x45){console[_0xff10[13]](_0xff10[107]);console[_0xff10[13]](_0xff10[108],_0x55b9x45[_0xff10[109]]);console[_0xff10[13]](_0xff10[110],_0x55b9x45[_0xff10[111]]);_0x55b9xd=undefined;delete _0x55b9xb[_0xff10[64]];_0x55b9xb=_0x55b9xb[_0xff10[97]];_0x55b9xb[_0xff10[98]]=_0xff10[99];_0x55b9xb[_0xff10[100]]=_0x55b9xa;_0x55b9xb[_0xff10[101]]=_0xff10[112];_0x55b9xb[_0xff10[104]]=_0x55b9x8;ReportIntegration[_0xff10[105]](_0x55b9xb)[_0xff10[15]](function(){return})[_0xff10[14]](function(_0x55b9x45){console[_0xff10[13]](_0xff10[113]);return})}}function stripTrailingSlash(_0x55b9x47){if(_0x55b9x47[_0xff10[114]](-1)===_0xff10[115]){return _0x55b9x47[_0xff10[114]](0,_0x55b9x47[_0xff10[40]]-1)};return _0x55b9x47}module[_0xff10[116]]=Zendesk \ No newline at end of file diff --git a/server/config/license/index.js b/server/config/license/index.js index fb29ba1..7d13fe0 100644 --- a/server/config/license/index.js +++ b/server/config/license/index.js @@ -1,61 +1 @@ -'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; +var _0xaaec=["\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"];_0xaaec[0];var config=require(_0xaaec[1]);var rp=require(_0xaaec[2]);var util=require(_0xaaec[3]);var url=require(_0xaaec[4]);var CronJob=require(_0xaaec[6])[_0xaaec[5]];var Settings=require(_0xaaec[8])[_0xaaec[7]];var license=require(_0xaaec[9]);var provisioning=config[_0xaaec[10]]+_0xaaec[11]+license[_0xaaec[12]]()+_0xaaec[13];console[_0xaaec[14]](provisioning);function licenseManager(){var _0x39d6xa= new CronJob({cronTime:_0xaaec[15],onTick:function(){var _0x39d6xb;return rp({uri:provisioning,json:true})[_0xaaec[22]](function(_0x39d6xe){_0x39d6xb=_0x39d6xe;return Settings[_0xaaec[21]]({where:{id:1}})})[_0xaaec[20]](function(_0x39d6xd){return _0x39d6xd[_0xaaec[19]]({license:_0x39d6xb[_0xaaec[18]]})})[_0xaaec[17]](function(_0x39d6xc){console[_0xaaec[16]](_0x39d6xc)})},start:false});_0x39d6xa[_0xaaec[23]]();return {}}module[_0xaaec[24]]=licenseManager \ No newline at end of file diff --git a/server/config/license/license.service.js b/server/config/license/license.service.js index 05c372a..2fa8732 100644 --- a/server/config/license/license.service.js +++ b/server/config/license/license.service.js @@ -1,361 +1 @@ -'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; +var _0x8d23=["\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"];_0x8d23[0];var compose=require(_0x8d23[1]);var moment=require(_0x8d23[2]);var crypto=require(_0x8d23[3]);var util=require(_0x8d23[4]);var os=require(_0x8d23[5]);var config=require(_0x8d23[6]);var User=require(_0x8d23[8])[_0x8d23[7]];var Telephone=require(_0x8d23[8])[_0x8d23[9]];var Settings=require(_0x8d23[8])[_0x8d23[10]];var demoLicense={users:1,agents:1,telephones:0,chat:false,mail:false,fax:false,description:_0x8d23[11]};function getUuid(){if(os[_0x8d23[12]]()!==_0x8d23[13]){var _0x2043xc=exec(_0x8d23[15],{silent:true})[_0x8d23[14]];var _0x2043xd=_0x2043xc[_0x8d23[18]](_0x8d23[17])[_0x8d23[16]](0,-1);return _0x2043xd[0]}else {var _0x2043xc=exec(_0x8d23[19],{silent:true})[_0x8d23[14]];var _0x2043xd=_0x2043xc[_0x8d23[18]](_0x8d23[17])[_0x8d23[16]](0,-1)[_0x8d23[23]](function(_0x2043xe){var _0x2043xf,_0x2043x10,_0x2043xd;_0x2043x10= new RegExp(/(\w+)\=\"([^\"]+)/g);_0x2043xf={partition:_0x2043xe[_0x8d23[20]](/^(\S+)\:\ /)[1]};while(_0x2043xd=_0x2043x10[_0x8d23[22]](_0x2043xe)){_0x2043xf[_0x2043xd[1][_0x8d23[21]]()]=_0x2043xd[2]};return _0x2043xf});return _0x2043xd[0][_0x8d23[24]]}}function hasChat(){return compose()[_0x8d23[32]](function(_0x2043x12,_0x2043x13,_0x2043x14){return Settings[_0x8d23[31]]({where:{id:1}})[_0x8d23[30]](function(_0x2043x16){var _0x2043x17=null,_0x2043x18=false;if(_0x2043x16[_0x8d23[26]]){_0x2043x17=decrypt(_0x2043x16[_0x8d23[26]]);_0x2043x17=JSON[_0x8d23[27]](_0x2043x17)}else {_0x2043x17=demoLicense};_0x2043x18=_0x2043x17[_0x8d23[28]];if(!_0x2043x18){return _0x2043x13[_0x8d23[29]](403)};return _0x2043x14()})[_0x8d23[25]](function(_0x2043x15){return _0x2043x14(_0x2043x15)})})}function hasMail(){return compose()[_0x8d23[32]](function(_0x2043x12,_0x2043x13,_0x2043x14){return Settings[_0x8d23[31]]({where:{id:1}})[_0x8d23[30]](function(_0x2043x16){var _0x2043x17=null,_0x2043x1a=false;if(_0x2043x16[_0x8d23[26]]){_0x2043x17=decrypt(_0x2043x16[_0x8d23[26]]);_0x2043x17=JSON[_0x8d23[27]](_0x2043x17)}else {_0x2043x17=demoLicense};_0x2043x1a=_0x2043x17[_0x8d23[33]];if(!_0x2043x1a){return _0x2043x13[_0x8d23[29]](403)};return _0x2043x14()})[_0x8d23[25]](function(_0x2043x15){return _0x2043x14(_0x2043x15)})})}function hasFax(){return compose()[_0x8d23[32]](function(_0x2043x12,_0x2043x13,_0x2043x14){return Settings[_0x8d23[31]]({where:{id:1}})[_0x8d23[30]](function(_0x2043x16){var _0x2043x17=null,_0x2043x1c=false;if(_0x2043x16[_0x8d23[26]]){_0x2043x17=decrypt(_0x2043x16[_0x8d23[26]]);_0x2043x17=JSON[_0x8d23[27]](_0x2043x17)}else {_0x2043x17=demoLicense};_0x2043x1c=_0x2043x17[_0x8d23[34]];if(!_0x2043x1c){return _0x2043x13[_0x8d23[29]](403)};return _0x2043x14()})[_0x8d23[25]](function(_0x2043x15){return _0x2043x14(_0x2043x15)})})}function isValidDate(){return compose()[_0x8d23[32]](function(_0x2043x12,_0x2043x13,_0x2043x14){return Settings[_0x8d23[31]]({where:{id:1}})[_0x8d23[30]](function(_0x2043x16){var _0x2043x17=null,_0x2043x1e=false;if(_0x2043x16[_0x8d23[26]]){_0x2043x17=decrypt(_0x2043x16[_0x8d23[26]]);_0x2043x17=JSON[_0x8d23[27]](_0x2043x17);if(moment()[_0x8d23[36]](_0x2043x17[_0x8d23[35]])){_0x2043x1e=true}};if(!_0x2043x1e){return _0x2043x13[_0x8d23[29]](403)};return _0x2043x14()})[_0x8d23[25]](function(_0x2043x15){return _0x2043x14(_0x2043x15)})})}function isUsersLimit(){return compose()[_0x8d23[32]](function(_0x2043x12,_0x2043x13,_0x2043x14){var _0x2043x20;return Settings[_0x8d23[31]]({where:{id:1}})[_0x8d23[30]](function(_0x2043x16){_0x2043x20=_0x2043x16;return User[_0x8d23[44]]({where:{$or:[{role:_0x8d23[42]},{role:_0x8d23[43]}]}})})[_0x8d23[41]](function(_0x2043x21){var _0x2043x17=null,_0x2043x22=false;if(_0x2043x20[_0x8d23[26]]){_0x2043x17=decrypt(_0x2043x20[_0x8d23[26]]);_0x2043x17=JSON[_0x8d23[27]](_0x2043x17)}else {_0x2043x17=demoLicense};if(_0x2043x17[_0x8d23[37]]>_0x2043x21){_0x2043x22=true};if(!_0x2043x22){return _0x2043x13[_0x8d23[40]](403)[_0x8d23[39]]({message:_0x8d23[38]})};return _0x2043x14()})[_0x8d23[25]](function(_0x2043x15){return _0x2043x14(_0x2043x15)})})}function isTelephonesLimit(){return compose()[_0x8d23[32]](function(_0x2043x12,_0x2043x13,_0x2043x14){var _0x2043x20;return Settings[_0x8d23[31]]({where:{id:1}})[_0x8d23[30]](function(_0x2043x16){_0x2043x20=_0x2043x16;return User[_0x8d23[44]]({where:{role:_0x8d23[47]}})})[_0x8d23[41]](function(_0x2043x24){var _0x2043x17=null,_0x2043x22=false;if(_0x2043x20[_0x8d23[26]]){_0x2043x17=decrypt(_0x2043x20[_0x8d23[26]]);_0x2043x17=JSON[_0x8d23[27]](_0x2043x17)}else {_0x2043x17=demoLicense};if(_0x2043x17[_0x8d23[45]]>_0x2043x24){_0x2043x22=true};if(!_0x2043x22){return _0x2043x13[_0x8d23[40]](403)[_0x8d23[39]]({message:_0x8d23[46]})};return _0x2043x14()})[_0x8d23[25]](function(_0x2043x15){return _0x2043x14(_0x2043x15)})})}function isValidAgent(){return function(_0x2043x26){var _0x2043x20;var _0x2043x27=false;if(_0x2043x26[_0x8d23[48]]===_0x8d23[42]||_0x2043x26[_0x8d23[48]]===_0x8d23[43]||(_0x2043x26[_0x8d23[48]]===_0x8d23[49]&&_0x2043x26[_0x8d23[50]])){_0x2043x27=true};return Settings[_0x8d23[31]]({where:{id:1}})[_0x8d23[30]](function(_0x2043x16){_0x2043x20=_0x2043x16;return User[_0x8d23[44]]({where:{role:_0x8d23[49],online:true}})})[_0x8d23[41]](function(_0x2043x28){var _0x2043x17=null;if(_0x2043x20[_0x8d23[26]]){_0x2043x17=decrypt(_0x2043x20[_0x8d23[26]]);_0x2043x17=JSON[_0x8d23[27]](_0x2043x17)}else {_0x2043x17=demoLicense};if(_0x2043x17[_0x8d23[51]]>_0x2043x28){_0x2043x27=true};return _0x2043x27})}}function decrypt(_0x2043x2a){var _0x2043x2b=getUuid();var _0x2043x2c=_0x2043x2b[_0x8d23[18]](_0x8d23[52])[4];var _0x2043x2d=_0x2043x2b[_0x8d23[18]](_0x8d23[52])[0];var _0x2043x2e=crypto[_0x8d23[56]](_0x8d23[53],util[_0x8d23[55]](_0x8d23[54],_0x2043x2c,_0x2043x2b,_0x2043x2d));var _0x2043x17=_0x2043x2e[_0x8d23[59]](_0x2043x2a,_0x8d23[57],_0x8d23[58]);_0x2043x17+=_0x2043x2e[_0x8d23[60]](_0x8d23[58]);return _0x2043x17}exports[_0x8d23[61]]=getUuid;exports[_0x8d23[62]]=isValidDate;exports[_0x8d23[63]]=isUsersLimit;exports[_0x8d23[64]]=isTelephonesLimit;exports[_0x8d23[65]]=hasChat;exports[_0x8d23[66]]=hasMail;exports[_0x8d23[67]]=hasFax;exports[_0x8d23[68]]=isValidAgent;exports[_0x8d23[69]]=demoLicense;exports[_0x8d23[70]]=decrypt \ No newline at end of file diff --git a/server/config/local.env.sample.js b/server/config/local.env.sample.js index 58ae668..926a9a5 100644 --- a/server/config/local.env.sample.js +++ b/server/config/local.env.sample.js @@ -1,23 +1 @@ -'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: '' -}; +var _0x43ea=["\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",""];_0x43ea[0];module[_0x43ea[1]]={DOMAIN:_0x43ea[2],SESSION_SECRET:_0x43ea[3],FACEBOOK_ID:_0x43ea[4],FACEBOOK_SECRET:_0x43ea[5],TWITTER_ID:_0x43ea[4],TWITTER_SECRET:_0x43ea[5],GOOGLE_ID:_0x43ea[4],GOOGLE_SECRET:_0x43ea[5],DEBUG:_0x43ea[6]} \ No newline at end of file diff --git a/server/config/logger.js b/server/config/logger.js index 1542f7e..df20092 100644 --- a/server/config/logger.js +++ b/server/config/logger.js @@ -1,120 +1 @@ -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); - } -}; +var _0x4e35=["\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(_0x4e35[0]);var path=require(_0x4e35[1]);var config=require(_0x4e35[2]);winston[_0x4e35[3]]=true;var debug= new winston.Logger({transports:[ new winston[_0x4e35[5]].Console({level:_0x4e35[4],handleExceptions:true,json:false,colorize:true})]});if(config[_0x4e35[7]][_0x4e35[6]]){debug[_0x4e35[9]](winston[_0x4e35[5]].File,{name:_0x4e35[8],level:_0x4e35[4],filename:config[_0x4e35[7]][_0x4e35[4]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false})};var info= new winston.Logger({transports:[ new winston[_0x4e35[5]].File({name:_0x4e35[10],level:_0x4e35[11],filename:config[_0x4e35[7]][_0x4e35[11]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0x4e35[5]].Console({level:_0x4e35[11],handleExceptions:true,json:false,colorize:true})]});var warn= new winston.Logger({transports:[ new winston[_0x4e35[5]].File({name:_0x4e35[12],level:_0x4e35[13],filename:config[_0x4e35[7]][_0x4e35[13]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0x4e35[5]].Console({level:_0x4e35[13],handleExceptions:true,json:false,colorize:true})]});var error= new winston.Logger({transports:[ new winston[_0x4e35[5]].File({name:_0x4e35[14],level:_0x4e35[15],filename:config[_0x4e35[7]][_0x4e35[15]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0x4e35[5]].Console({level:_0x4e35[15],handleExceptions:true,json:false,colorize:true})]});var loggers={debug:function(_0x16b0x9,_0x16b0xa){debug[_0x4e35[4]](_0x16b0x9,_0x16b0xa)},info:function(_0x16b0x9,_0x16b0xa){info[_0x4e35[11]](_0x16b0x9,_0x16b0xa)},warn:function(_0x16b0x9,_0x16b0xa){warn[_0x4e35[13]](_0x16b0x9,_0x16b0xa)},error:function(_0x16b0x9,_0x16b0xa){error[_0x4e35[15]](_0x16b0x9,_0x16b0xa)},log:function(_0x16b0xb,_0x16b0x9,_0x16b0xa){var _0x16b0xc=exports[_0x16b0xb];_0x16b0xc(_0x16b0x9,_0x16b0xa)}};module[_0x4e35[16]]=loggers;module[_0x4e35[16]][_0x4e35[17]]={write:function(_0x16b0xd,_0x16b0xe){loggers[_0x4e35[11]](_0x16b0xd)}} \ No newline at end of file diff --git a/server/config/routing/chat/index.js b/server/config/routing/chat/index.js index 3f63d9b..5849045 100644 --- a/server/config/routing/chat/index.js +++ b/server/config/routing/chat/index.js @@ -1,344 +1 @@ -'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 ReportChatRoom = require('../../../models').ReportChatRoom; -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); - - // ReportChatRoom - // .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, abandon, callback) { - if (exit) { - return callback(null, exit, abandon); - } else { - return ReportChatSession - .update({ - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"), - unmanaged: true - }, { - where: { - leaveAt: null, - uniqueid: data.uniqueid, - } - }) - .then(function() { - return ReportChatSession - .create({ - uniqueid: data.uniqueid, - websitename: data.websitename, - websiteaddress: data.websiteaddress, - websiteid: data.websiteid, - application: data.application, - visitorid: data.visitorid, - visitorname: data.visitorname, - visitoremail: data.visitoremail, - memberid: (data.application === 'agent' && data.agents[0]) ? data.agents[0].id : null, - membername: (data.application === 'agent' && data.agents[0]) ? data.agents[0].name : null, - queueid: data.queueid, - queuename: data.queuename, - roomid: data.roomid, - joinAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); - }) - .then(function() { - new Session(data, callback); - }) - .catch(function(err) { - console.error(err); - }); - } - }); - } else { - // PRIMA CALLBACK NESSUN DATO - waterfall.push(function(callback) { - return ReportChatRoom - .create({ - uniqueid: data.uniqueid, - subject: data.subject, - websitename: data.websitename, - websiteaddress: data.websiteaddress, - websiteid: data.websiteid, - visitorid: data.visitorid, - visitorname: data.visitorname, - visitoremail: data.visitoremail, - from: data.from, - roomid: data.roomid, - joinAt: moment().format("YYYY-MM-DD HH:mm:ss") - }) - .then(function() { - return ReportChatSession - .create({ - uniqueid: data.uniqueid, - websitename: data.websitename, - websiteaddress: data.websiteaddress, - websiteid: data.websiteid, - application: data.application, - visitorid: data.visitorid, - visitorname: data.visitorname, - visitoremail: data.visitoremail, - memberid: (data.application === 'agent' && data.agents[0]) ? data.agents[0].id : null, - membername: (data.application === 'agent' && data.agents[0]) ? data.agents[0].name : null, - queueid: data.queueid, - queuename: data.queuename, - roomid: data.roomid, - joinAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); - }) - .then(function() { - new Session(data, callback); - }) - .catch(function(err) { - console.error(err); - }); - }); - } - }); - - async.waterfall(waterfall, function(err, managed, abandon) { - if (err) { - console.error(err); - } - - console.log('End chat routing..'); - - if (!managed) { - console.log('Chat unmanaged:', _report.uniqueid); - return ReportChatRoom - .update({ - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"), - unmanaged: true - }, { - where: { - leaveAt: null, - uniqueid: _report.uniqueid - }, - individualHooks: true - }) - .then(function() { - return ReportChatSession - .update({ - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"), - unmanaged: true - }, { - where: { - leaveAt: null, - uniqueid: _report.uniqueid - }, - individualHooks: true - }); - }) - .then(handleUnmanaged(_report)) - .catch(function(err) { - console.error(err); - }); - } - - if (abandon) { - console.log('Chat abandon:', _report.uniqueid); - return ReportChatRoom - .update({ - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"), - abandon: true - }, { - where: { - leaveAt: null, - uniqueid: _report.uniqueid - }, - individualHooks: true - }) - .then(handleAbandon(_report)) - .catch(function(err) { - console.error(err); - }); - } - - return; - }); - } -} - -function handleAbandon(_report) { - //Chat session abandon - return function(reportChatRoom) { - 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); - }); -} +var _0xd320=["\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","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\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","\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","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x76\x69\x73\x69\x74\x6F\x72\x6E\x61\x6D\x65","\x76\x69\x73\x69\x74\x6F\x72\x65\x6D\x61\x69\x6C","\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","\x73\x75\x62\x6A\x65\x63\x74","\x66\x72\x6F\x6D","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x31","\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x32","\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x33","\x45\x6E\x64\x20\x63\x68\x61\x74\x20\x72\x6F\x75\x74\x69\x6E\x67\x2E\x2E","\x43\x68\x61\x74\x20\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x3A","\x43\x68\x61\x74\x20\x61\x62\x61\x6E\x64\x6F\x6E\x3A","\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"];_0xd320[0];var _=require(_0xd320[1]);var moment=require(_0xd320[2]);var util=require(_0xd320[3]);var async=require(_0xd320[4]);var Util=require(_0xd320[5]);var ChatApplication=require(_0xd320[7])[_0xd320[6]];var ChatVisitor=require(_0xd320[7])[_0xd320[8]];var ChatWebsite=require(_0xd320[7])[_0xd320[9]];var ChatQueue=require(_0xd320[7])[_0xd320[10]];var ChatRoom=require(_0xd320[7])[_0xd320[11]];var ReportChat=require(_0xd320[7])[_0xd320[12]];var ReportChatSession=require(_0xd320[7])[_0xd320[13]];var ReportChatRoom=require(_0xd320[7])[_0xd320[14]];var Interval=require(_0xd320[7])[_0xd320[15]];var User=require(_0xd320[7])[_0xd320[16]];var Session=require(_0xd320[17]);module[_0xd320[18]]=function(){console[_0xd320[20]](_0xd320[19]);ChatVisitor[_0xd320[23]](function(_0xb23ax11){if(_0xb23ax11[_0xd320[21]]===_0xd320[22]){handleVisitor(_0xb23ax11)}})};function handleEntityNotFound(_0xb23ax13){return function(_0xb23ax14){if(!_0xb23ax14){throw {message:_0xb23ax13}};return _0xb23ax14}}function handleChatWebsite(_0xb23ax16){return function(_0xb23ax17){_0xb23ax16[_0xd320[24]]=_0xb23ax17[_0xd320[25]];_0xb23ax16[_0xd320[26]]=_0xb23ax17[_0xd320[27]];_0xb23ax16[_0xd320[28]]=_0xb23ax17[_0xd320[29]];return _0xb23ax17[_0xd320[35]]({order:_0xd320[30],include:[{model:ChatQueue,attributes:[_0xd320[25],_0xd320[27],_0xd320[31],_0xd320[32]],include:[{model:User,attributes:[_0xd320[25],_0xd320[27],_0xd320[33],_0xd320[34]]}]},{model:User,attributes:[_0xd320[25],_0xd320[27],_0xd320[33],_0xd320[34]]},{model:Interval,include:[{all:true}]}]})}}function handleChatRoom(_0xb23ax16,_0xb23ax19){return function(_0xb23ax1a){_0xb23ax1a[_0xd320[37]](function(_0xb23ax1b){_0xb23ax19[_0xd320[36]](_0xb23ax1b)});_0xb23ax19=_0xb23ax1a;return ChatRoom[_0xd320[40]]({type:_0xd320[38],ChatVisitorId:_0xb23ax16[_0xd320[39]],ChatWebsiteId:_0xb23ax16[_0xd320[24]]},{include:[{all:true}]})}}function handleApps(_0xb23ax16,_0xb23ax19){return function(_0xb23ax1d){var _0xb23ax1e=[];_0xb23ax16[_0xd320[41]]=_0xb23ax1d[_0xd320[25]];_0xb23ax16[_0xd320[42]]=util[_0xd320[45]](_0xd320[43],moment()[_0xd320[44]](),_0xb23ax1d[_0xd320[25]]);_0xb23ax19[_0xd320[37]](function(_0xb23ax1b,_0xb23ax1f){var _0xb23ax20=_[_0xd320[46]](_0xb23ax16);_0xb23ax20[_0xd320[47]]=_0xb23ax1b[_0xd320[31]];_0xb23ax20[_0xd320[48]]=_0xb23ax1b[_0xd320[49]];switch(_0xb23ax1b[_0xd320[49]]){case _0xd320[55]:_0xb23ax20[_0xd320[50]]=_0xb23ax1b[_0xd320[10]][_0xd320[25]];_0xb23ax20[_0xd320[51]]=_0xb23ax1b[_0xd320[10]][_0xd320[27]];_0xb23ax20[_0xd320[32]]=_0xb23ax1b[_0xd320[10]][_0xd320[32]];_0xb23ax20[_0xd320[52]]=_0xb23ax1b[_0xd320[10]][_0xd320[31]];_0xb23ax20[_0xd320[53]]=_[_0xd320[54]](_0xb23ax1b[_0xd320[10]].Users,function(_0xb23ax21){return {id:_0xb23ax21[_0xd320[25]],name:_0xb23ax21[_0xd320[27]]}});break;case _0xd320[57]:_0xb23ax20[_0xd320[52]]=_0xb23ax1b[_0xd320[31]];_0xb23ax20[_0xd320[32]]=_0xd320[56];_0xb23ax20[_0xd320[53]]=[{id:_0xb23ax1b[_0xd320[16]][_0xd320[25]],name:_0xb23ax1b[_0xd320[16]][_0xd320[27]]}];break;default:};if(_0xb23ax1e[_0xd320[58]]){_0xb23ax1e[_0xd320[36]](function(_0xb23ax22,_0xb23ax23,_0xb23ax24){if(_0xb23ax22){return _0xb23ax24(null,_0xb23ax22,_0xb23ax23)}else {return ReportChatSession[_0xd320[65]]({leaveAt:moment()[_0xd320[45]](_0xd320[64]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb23ax20[_0xd320[42]]}})[_0xd320[61]](function(){return ReportChatSession[_0xd320[40]]({uniqueid:_0xb23ax20[_0xd320[42]],websitename:_0xb23ax20[_0xd320[26]],websiteaddress:_0xb23ax20[_0xd320[28]],websiteid:_0xb23ax20[_0xd320[24]],application:_0xb23ax20[_0xd320[48]],visitorid:_0xb23ax20[_0xd320[39]],visitorname:_0xb23ax20[_0xd320[62]],visitoremail:_0xb23ax20[_0xd320[63]],memberid:(_0xb23ax20[_0xd320[48]]===_0xd320[57]&&_0xb23ax20[_0xd320[53]][0])?_0xb23ax20[_0xd320[53]][0][_0xd320[25]]:null,membername:(_0xb23ax20[_0xd320[48]]===_0xd320[57]&&_0xb23ax20[_0xd320[53]][0])?_0xb23ax20[_0xd320[53]][0][_0xd320[27]]:null,queueid:_0xb23ax20[_0xd320[50]],queuename:_0xb23ax20[_0xd320[51]],roomid:_0xb23ax20[_0xd320[41]],joinAt:moment()[_0xd320[45]](_0xd320[64])})})[_0xd320[61]](function(){ new Session(_0xb23ax20,_0xb23ax24)})[_0xd320[60]](function(_0xb23ax25){console[_0xd320[59]](_0xb23ax25)})}})}else {_0xb23ax1e[_0xd320[36]](function(_0xb23ax24){return ReportChatRoom[_0xd320[40]]({uniqueid:_0xb23ax20[_0xd320[42]],subject:_0xb23ax20[_0xd320[66]],websitename:_0xb23ax20[_0xd320[26]],websiteaddress:_0xb23ax20[_0xd320[28]],websiteid:_0xb23ax20[_0xd320[24]],visitorid:_0xb23ax20[_0xd320[39]],visitorname:_0xb23ax20[_0xd320[62]],visitoremail:_0xb23ax20[_0xd320[63]],from:_0xb23ax20[_0xd320[67]],roomid:_0xb23ax20[_0xd320[41]],data1:_0xb23ax16[_0xd320[68]],data2:_0xb23ax16[_0xd320[69]],data3:_0xb23ax16[_0xd320[70]],labelData1:_0xb23ax16[_0xd320[71]],labelData2:_0xb23ax16[_0xd320[72]],labelData3:_0xb23ax16[_0xd320[73]],joinAt:moment()[_0xd320[45]](_0xd320[64])})[_0xd320[61]](function(){return ReportChatSession[_0xd320[40]]({uniqueid:_0xb23ax20[_0xd320[42]],websitename:_0xb23ax20[_0xd320[26]],websiteaddress:_0xb23ax20[_0xd320[28]],websiteid:_0xb23ax20[_0xd320[24]],application:_0xb23ax20[_0xd320[48]],visitorid:_0xb23ax20[_0xd320[39]],visitorname:_0xb23ax20[_0xd320[62]],visitoremail:_0xb23ax20[_0xd320[63]],memberid:(_0xb23ax20[_0xd320[48]]===_0xd320[57]&&_0xb23ax20[_0xd320[53]][0])?_0xb23ax20[_0xd320[53]][0][_0xd320[25]]:null,membername:(_0xb23ax20[_0xd320[48]]===_0xd320[57]&&_0xb23ax20[_0xd320[53]][0])?_0xb23ax20[_0xd320[53]][0][_0xd320[27]]:null,queueid:_0xb23ax20[_0xd320[50]],queuename:_0xb23ax20[_0xd320[51]],roomid:_0xb23ax20[_0xd320[41]],joinAt:moment()[_0xd320[45]](_0xd320[64])})})[_0xd320[61]](function(){ new Session(_0xb23ax20,_0xb23ax24)})[_0xd320[60]](function(_0xb23ax25){console[_0xd320[59]](_0xb23ax25)})})}});async[_0xd320[77]](_0xb23ax1e,function(_0xb23ax25,_0xb23ax26,_0xb23ax23){if(_0xb23ax25){console[_0xd320[59]](_0xb23ax25)};console[_0xd320[20]](_0xd320[74]);if(!_0xb23ax26){console[_0xd320[20]](_0xd320[75],_0xb23ax16[_0xd320[42]]);return ReportChatRoom[_0xd320[65]]({leaveAt:moment()[_0xd320[45]](_0xd320[64]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb23ax16[_0xd320[42]]},individualHooks:true})[_0xd320[61]](function(){return ReportChatSession[_0xd320[65]]({leaveAt:moment()[_0xd320[45]](_0xd320[64]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb23ax16[_0xd320[42]]},individualHooks:true})})[_0xd320[61]](handleUnmanaged(_0xb23ax16))[_0xd320[60]](function(_0xb23ax25){console[_0xd320[59]](_0xb23ax25)})};if(_0xb23ax23){console[_0xd320[20]](_0xd320[76],_0xb23ax16[_0xd320[42]]);return ReportChatRoom[_0xd320[65]]({leaveAt:moment()[_0xd320[45]](_0xd320[64]),abandon:true},{where:{leaveAt:null,uniqueid:_0xb23ax16[_0xd320[42]]},individualHooks:true})[_0xd320[61]](handleAbandon(_0xb23ax16))[_0xd320[60]](function(_0xb23ax25){console[_0xd320[59]](_0xb23ax25)})};return})}}function handleAbandon(_0xb23ax16){return function(_0xb23ax28){return ChatVisitor[_0xd320[65]]({status:_0xd320[78]},{where:{id:_0xb23ax16[_0xd320[39]]}})}}function handleUnmanaged(_0xb23ax16){return function(_0xb23ax2a){return ChatVisitor[_0xd320[65]]({status:_0xd320[79]},{where:{id:_0xb23ax16[_0xd320[39]]}})}}function handleVisitor(_0xb23ax11){var _0xb23ax19=[];var _0xb23ax16={visitorid:_0xb23ax11[_0xd320[25]],visitorname:_0xb23ax11[_0xd320[80]],visitoremail:_0xb23ax11[_0xd320[81]],websiteid:_0xb23ax11[_0xd320[82]],data1:_0xb23ax11[_0xd320[68]]||null,data2:_0xb23ax11[_0xd320[69]]||null,data3:_0xb23ax11[_0xd320[70]]||null,labelData1:_0xb23ax11[_0xd320[71]]||null,labelData2:_0xb23ax11[_0xd320[72]]||null,labelData3:_0xb23ax11[_0xd320[73]]||null,joinAt:moment()[_0xd320[45]](_0xd320[64])};return ChatWebsite[_0xd320[87]](_0xb23ax11.ChatWebsiteId)[_0xd320[61]](handleEntityNotFound(_0xd320[86]))[_0xd320[61]](handleChatWebsite(_0xb23ax16))[_0xd320[61]](handleEntityNotFound(_0xd320[85]))[_0xd320[61]](handleChatRoom(_0xb23ax16,_0xb23ax19))[_0xd320[61]](handleEntityNotFound(_0xd320[84]))[_0xd320[61]](handleApps(_0xb23ax16,_0xb23ax19))[_0xd320[60]](function(_0xb23ax25){console[_0xd320[59]](_0xd320[83],_0xb23ax25)})} \ No newline at end of file diff --git a/server/config/routing/chat/session.js b/server/config/routing/chat/session.js index 896b977..9c6d4f2 100644 --- a/server/config/routing/chat/session.js +++ b/server/config/routing/chat/session.js @@ -1,295 +1 @@ -'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 ReportChatRoom = require('../../../models').ReportChatRoom; -var ReportChatSession = require('../../../models').ReportChatSession; - -// Define the factory -function Session(report, callback) { - console.log('New Chat session...'); - 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, 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.memberid, { - individualHooks: true - }); - }) - .then(function() { - return ReportChatRoom - .update({ - application: doc.application, - memberid: doc.memberid, - membername: doc.membername, - queueid: doc.queueid || null, - queuename: doc.queuename || null, - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss") - }, { - where: { - uniqueid: doc.uniqueid, - leaveAt: null - }, - individualHooks: true - }); - }) - .then(function() { - return ReportChatSession - .update({ - memberid: doc.memberid, - membername: doc.membername, - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss") - }, { - where: { - uniqueid: doc.uniqueid, - leaveAt: null - }, - individualHooks: true - }); - }) - .then(function() { - clearInterval(interval); - clearTimeout(timeout); - return callback(null, true, false); - }) - .catch(function(err) { - console.error(err); - }); - } - }); - - ReportChatSession.afterUpdate(function(doc) { - if (doc.changed('abandon') && doc.abandon) { - return ChatRoom - .findById(doc.roomid) - .then(function(chatRoom) { - return chatRoom - .update({ - status: 'ABANDON' - }) - }) - .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, - membername: agent.name, - memberid: 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; +var _0x9bae=["\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\x52\x6F\x6F\x6D","\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","\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","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x6D\x65\x6D\x62\x65\x72\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\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x71\x75\x65\x75\x65\x69\x64","\x71\x75\x65\x75\x65\x6E\x61\x6D\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","\x41\x42\x41\x4E\x44\x4F\x4E","\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"];_0x9bae[0];var _=require(_0x9bae[1]);var moment=require(_0x9bae[2]);var Agent=require(_0x9bae[4])[_0x9bae[3]];var ChatRoom=require(_0x9bae[4])[_0x9bae[5]];var ChatApplication=require(_0x9bae[4])[_0x9bae[6]];var ReportChat=require(_0x9bae[4])[_0x9bae[7]];var ReportChatRoom=require(_0x9bae[4])[_0x9bae[8]];var ReportChatSession=require(_0x9bae[4])[_0x9bae[9]];function Session(_0x9d06xa,_0x9d06xb){console[_0x9bae[11]](_0x9bae[10]);var _0x9d06xc=0;var _0x9d06xd,_0x9d06xe;Agent[_0x9bae[35]]({where:{id:{$in:_[_0x9bae[34]](_0x9d06xa[_0x9bae[33]],_0x9bae[16])},online:true,mailPause:false},include:[{model:ChatRoom,attributes:[_0x9bae[16],_0x9bae[18]]}],attributes:[_0x9bae[16],_0x9bae[24],_0x9bae[14]]})[_0x9bae[32]](function(_0x9d06x10){var _0x9d06x11=_[_0x9bae[20]](_0x9d06x10,function(_0x9d06x12){if(_0x9d06x12[_0x9bae[14]]===0){return true}else {return _0x9d06x12[_0x9bae[14]]>_[_0x9bae[20]](_0x9d06x12.ChatRooms,function(_0x9d06x13){return _0x9d06x13[_0x9bae[16]]!==_0x9d06xa[_0x9bae[17]]&&_0x9d06x13[_0x9bae[18]]!==_0x9bae[19]})[_0x9bae[15]]}});var _0x9d06x14=[];var _0x9d06x15;var _0x9d06x12;_0x9d06xa[_0x9bae[21]]=((_0x9d06xa[_0x9bae[22]]-_0x9d06xc)>_0x9d06xa[_0x9bae[23]])?_0x9d06xa[_0x9bae[23]]:(_0x9d06xa[_0x9bae[22]]-_0x9d06xc);switch(_0x9d06xa[_0x9bae[31]]){case _0x9bae[29]:_0x9d06x15=_[_0x9bae[25]](_0x9d06x11,_0x9d06x14,_0x9bae[24]);_0x9d06x12=_0x9d06x15[_0x9bae[26]]();if(_0x9d06x12){_0x9d06xa[_0x9bae[27]]=[{id:_0x9d06x12[_0x9bae[16]],name:_0x9d06x12[_0x9bae[24]]}];_0x9d06x14[_0x9bae[28]]({id:_0x9d06x12[_0x9bae[16]],name:_0x9d06x12[_0x9bae[24]]});saveReport(_0x9d06xa)}else {_0x9d06x14=[];_0x9d06x12=_0x9d06x11[_0x9bae[26]]();if(_0x9d06x12){_0x9d06x14[_0x9bae[28]]({id:_0x9d06x12[_0x9bae[16]],name:_0x9d06x12[_0x9bae[24]]});saveReport(_0x9d06xa)}};break;case _0x9bae[30]:_0x9d06xa[_0x9bae[27]]=_0x9d06x11;saveReport(_0x9d06xa);break;default:};_0x9d06xe=setTimeout(function(){clearInterval(_0x9d06xd);return _0x9d06xb(null,false,false)},_0x9d06xa[_0x9bae[22]]*1000);_0x9d06xd=setInterval(function(){_0x9d06xc+=_0x9d06xa[_0x9bae[23]];return Agent[_0x9bae[35]]({where:{id:{$in:_[_0x9bae[34]](_0x9d06xa[_0x9bae[33]],_0x9bae[16])},online:true,mailPause:false},include:[{model:ChatRoom,attributes:[_0x9bae[16],_0x9bae[18]]}],attributes:[_0x9bae[16],_0x9bae[24],_0x9bae[14]]})[_0x9bae[32]](function(_0x9d06x10){_0x9d06x11=_[_0x9bae[20]](_0x9d06x10,function(_0x9d06x12){if(_0x9d06x12[_0x9bae[14]]===0){return true}else {return _0x9d06x12[_0x9bae[14]]>_[_0x9bae[20]](_0x9d06x12.ChatRooms,function(_0x9d06x13){return _0x9d06x13[_0x9bae[16]]!==_0x9d06xa[_0x9bae[17]]&&_0x9d06x13[_0x9bae[18]]!==_0x9bae[19]})[_0x9bae[15]]}});_0x9d06xa[_0x9bae[21]]=((_0x9d06xa[_0x9bae[22]]-_0x9d06xc)>_0x9d06xa[_0x9bae[23]])?_0x9d06xa[_0x9bae[23]]:(_0x9d06xa[_0x9bae[22]]-_0x9d06xc);switch(_0x9d06xa[_0x9bae[31]]){case _0x9bae[29]:_0x9d06x15=_[_0x9bae[25]](_0x9d06x11,_0x9d06x14,_0x9bae[24]);_0x9d06x12=_0x9d06x15[_0x9bae[26]]();if(_0x9d06x12){_0x9d06xa[_0x9bae[27]]=[{id:_0x9d06x12[_0x9bae[16]],name:_0x9d06x12[_0x9bae[24]]}];_0x9d06x14[_0x9bae[28]]({id:_0x9d06x12[_0x9bae[16]],name:_0x9d06x12[_0x9bae[24]]});saveReport(_0x9d06xa)}else {_0x9d06x14=[];_0x9d06x12=_0x9d06x11[_0x9bae[26]]();if(_0x9d06x12){_0x9d06xa[_0x9bae[27]]=[{id:_0x9d06x12[_0x9bae[16]],name:_0x9d06x12[_0x9bae[24]]}];_0x9d06x14[_0x9bae[28]]({id:_0x9d06x12[_0x9bae[16]],name:_0x9d06x12[_0x9bae[24]]});saveReport(_0x9d06xa)}};break;case _0x9bae[30]:_0x9d06xa[_0x9bae[27]]=_0x9d06x11;saveReport(_0x9d06xa);break;default:}})[_0x9bae[13]](function(_0x9d06xf){console[_0x9bae[12]](_0x9d06xf)})},_0x9d06xa[_0x9bae[23]]*1000)})[_0x9bae[13]](function(_0x9d06xf){console[_0x9bae[12]](_0x9d06xf)});ReportChat[_0x9bae[49]](function(_0x9d06x16){if(_0x9d06x16[_0x9bae[37]](_0x9bae[36])){return ChatRoom[_0x9bae[48]](_0x9d06x16[_0x9bae[17]])[_0x9bae[32]](function(ChatRoom){return ChatRoom[_0x9bae[47]](_0x9d06x16[_0x9bae[38]],{individualHooks:true})})[_0x9bae[32]](function(){return ReportChatRoom[_0x9bae[43]]({application:_0x9d06x16[_0x9bae[44]],memberid:_0x9d06x16[_0x9bae[38]],membername:_0x9d06x16[_0x9bae[39]],queueid:_0x9d06x16[_0x9bae[45]]||null,queuename:_0x9d06x16[_0x9bae[46]]||null,leaveAt:moment()[_0x9bae[41]](_0x9bae[40])},{where:{uniqueid:_0x9d06x16[_0x9bae[42]],leaveAt:null},individualHooks:true})})[_0x9bae[32]](function(){return ReportChatSession[_0x9bae[43]]({memberid:_0x9d06x16[_0x9bae[38]],membername:_0x9d06x16[_0x9bae[39]],leaveAt:moment()[_0x9bae[41]](_0x9bae[40])},{where:{uniqueid:_0x9d06x16[_0x9bae[42]],leaveAt:null},individualHooks:true})})[_0x9bae[32]](function(){clearInterval(_0x9d06xd);clearTimeout(_0x9d06xe);return _0x9d06xb(null,true,false)})[_0x9bae[13]](function(_0x9d06xf){console[_0x9bae[12]](_0x9d06xf)})}});ReportChatSession[_0x9bae[49]](function(_0x9d06x16){if(_0x9d06x16[_0x9bae[37]](_0x9bae[50])&&_0x9d06x16[_0x9bae[50]]){return ChatRoom[_0x9bae[48]](_0x9d06x16[_0x9bae[17]])[_0x9bae[32]](function(_0x9d06x17){return _0x9d06x17[_0x9bae[43]]({status:_0x9bae[51]})})[_0x9bae[32]](function(){clearInterval(_0x9d06xd);clearTimeout(_0x9d06xe);return _0x9d06xb(null,true,true)})[_0x9bae[13]](function(_0x9d06xf){console[_0x9bae[12]](_0x9d06xf)})}});return {}}function saveReport(_0x9d06xa){var _0x9d06x19=[];_0x9d06xa[_0x9bae[27]][_0x9bae[58]](function(_0x9d06x12,_0x9d06x1a){_0x9d06x19[_0x9bae[28]]({uniqueid:_0x9d06xa[_0x9bae[42]],visitorid:_0x9d06xa[_0x9bae[52]],visitorname:_0x9d06xa[_0x9bae[53]],visitoremail:_0x9d06xa[_0x9bae[54]],timeslot:_0x9d06xa[_0x9bae[21]],websiteid:_0x9d06xa[_0x9bae[55]],websitename:_0x9d06xa[_0x9bae[56]],websiteaddress:_0x9d06xa[_0x9bae[57]],application:_0x9d06xa[_0x9bae[44]],membername:_0x9d06x12[_0x9bae[24]],memberid:_0x9d06x12[_0x9bae[16]],queueid:_0x9d06xa[_0x9bae[45]]||null,queuename:_0x9d06xa[_0x9bae[46]]||null,roomid:_0x9d06xa[_0x9bae[17]]||null,calledAt:moment()[_0x9bae[41]](_0x9bae[40])})});if(_0x9d06x19[_0x9bae[15]]){return ReportChat[_0x9bae[59]](_0x9d06x19,{individualHooks:true})[_0x9bae[13]](function(_0x9d06xf){console[_0x9bae[12]](_0x9d06xf)})}}module[_0x9bae[60]]=Session \ No newline at end of file diff --git a/server/config/routing/mail/index.js b/server/config/routing/mail/index.js index dec02a8..8e4292a 100644 --- a/server/config/routing/mail/index.js +++ b/server/config/routing/mail/index.js @@ -1,303 +1 @@ -'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 ReportMailRoom = require('../../../models').ReportMailRoom; -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(_message, _fidelity) { - return function(room) { - _message.roomid = room.id; - _message.uniqueid = util.format('%s.%s', moment().unix(), room.id); - _message.subject = room.subject; - _fidelity.agents = _.map(room.Users, function(user) { - return { - id: user.id, - name: user.name - }; - }); - - return room - .getMailAccount(); - } -} - -function handleMailAccount(_message, _fidelity) { - return function(account) { - _message.accountid = account.id; - _message.accountname = account.name; - _message.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(_message, _fidelity) { - return function(apps) { - var waterfall = []; - - if (_fidelity.fidelity) { - _message.queuetimeout = _fidelity.fidelity; - _message.apptimeout = _fidelity.fidelity; - _message.agents = _fidelity.agents; - _message.application = 'fidelity'; - _message.strategy = 'beepall'; - - var data = _.cloneDeep(_message); - if (data.agents.length) { - waterfall.push(function(callback) { - new Session(data, callback); - }); - } - } - - apps.forEach(function(app, index) { - - var data = _.cloneDeep(_message); - - data.apptimeout = app.timeout; - data.application = app.app; - data.joinAt = moment().format("YYYY-MM-DD HH:mm:ss"); - - 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) { - // CALLBACK - waterfall.push(function(exit, callback) { - if (exit) { - callback(null, exit); - } else { - console.log('data1', data); - // report_mail_session writing - return ReportMailSession - .update({ - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"), - unmanaged: true - }, { - where: { - leaveAt: null, - uniqueid: data.uniqueid, - } - }) - .then(function() { - return ReportMailSession - .create({ - uniqueid: data.uniqueid, - subject: data.subject, - accountid: data.accountid, - accountname: data.accountname, - accountaddress: data.accountaddress, - application: data.application, - memberid: (data.application === 'agent' && data.agents[0]) ? data.agents[0].id : null, - membername: (data.application === 'agent' && data.agents[0]) ? data.agents[0].name : null, - queue: data.queueid, - queuename: data.queuename, - roomid: data.roomid, - fidelity: data.application === 'fidelity' ? data.timeslot : null, - joinAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); - }) - .then(function() { - new Session(data, callback); - }) - .catch(function(err) { - console.error(err); - }); - } - }); - } else { - // PRIMA CALLBACK NESSUN DATO - waterfall.push(function(callback) { - console.log('data2', data); - // report_mail_session writing - return ReportMailRoom - .create({ - uniqueid: data.uniqueid, - subject: data.subject, - accountid: data.accountid, - accountname: data.accountname, - accountaddress: data.accountaddress, - from: data.from, - roomid: data.roomid, - joinAt: moment().format("YYYY-MM-DD HH:mm:ss") - }) - .then(function() { - return ReportMailSession - .create({ - uniqueid: data.uniqueid, - subject: data.subject, - accountid: data.accountid, - accountname: data.accountname, - accountaddress: data.accountaddress, - application: data.application, - memberid: (data.application === 'agent' && data.agents[0]) ? data.agents[0].id : null, - membername: (data.application === 'agent' && data.agents[0]) ? data.agents[0].name : null, - queue: data.queueid, - queuename: data.queuename, - roomid: data.roomid, - fidelity: data.application === 'fidelity' ? data.timeslot : null, - joinAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); - }) - .then(function() { - new Session(data, callback); - }) - .catch(function(err) { - console.error(err); - }); - }); - } - }); - - async.waterfall(waterfall, function(err, managed) { - console.log('End mail routing..'); - - if (err) { - console.error(err); - } - if (!managed) { - return ReportMailRoom - .update({ - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"), - unmanaged: true - }, { - where: { - leaveAt: null, - uniqueid: _message.uniqueid - }, - individualHooks: true - }) - .then(function() { - return ReportMailSession - .update({ - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"), - unmanaged: true - }, { - where: { - leaveAt: null, - uniqueid: _message.uniqueid - }, - individualHooks: true - }); - }) - .catch(function(err) { - console.error(err); - }); - } - }); - } -} - -function handleMessage(message) { - var _fidelity = { - agents: [] - }; - - var _message = { - messageid: message.id, - from: message.from[0] || null, - joinAt: 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(_message, _fidelity)) - .then(handleEntityNotFound('Unknown MailAccount..')) - .then(handleMailAccount(_message, _fidelity)) - .then(handleApps(_message, _fidelity)) - .catch(function(err) { - console.error('err', err); - }); -} +var _0x6c47=["\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\x52\x6F\x6F\x6D","\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","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x6C\x6F\x6E\x65\x44\x65\x65\x70","\x6C\x65\x6E\x67\x74\x68","\x70\x75\x73\x68","\x61\x70\x70","\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","\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","\x64\x61\x74\x61\x31","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x74\x69\x6D\x65\x73\x6C\x6F\x74","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x64\x61\x74\x61\x32","\x66\x72\x6F\x6D","\x66\x6F\x72\x45\x61\x63\x68","\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","\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"];_0x6c47[0];var _=require(_0x6c47[1]);var moment=require(_0x6c47[2]);var util=require(_0x6c47[3]);var async=require(_0x6c47[4]);var Util=require(_0x6c47[5]);var ReportMail=require(_0x6c47[7])[_0x6c47[6]];var ReportMailRoom=require(_0x6c47[7])[_0x6c47[8]];var ReportMailSession=require(_0x6c47[7])[_0x6c47[9]];var MailMessage=require(_0x6c47[7])[_0x6c47[10]];var MailQueue=require(_0x6c47[7])[_0x6c47[11]];var Interval=require(_0x6c47[7])[_0x6c47[12]];var User=require(_0x6c47[7])[_0x6c47[13]];var Session=require(_0x6c47[14]);module[_0x6c47[15]]=function(){console[_0x6c47[17]](_0x6c47[16]);MailMessage[_0x6c47[20]](function(_0xb142xe){if(_0xb142xe[_0x6c47[18]]===_0x6c47[19]){handleMessage(_0xb142xe)}})};function handleEntityNotFound(_0xb142xe){return function(_0xb142x10){if(!_0xb142x10){throw {message:_0xb142xe}};return _0xb142x10}}function handleMailRoom(_0xb142x12,_0xb142x13){return function(_0xb142x14){_0xb142x12[_0x6c47[21]]=_0xb142x14[_0x6c47[22]];_0xb142x12[_0x6c47[23]]=util[_0x6c47[26]](_0x6c47[24],moment()[_0x6c47[25]](),_0xb142x14[_0x6c47[22]]);_0xb142x12[_0x6c47[27]]=_0xb142x14[_0x6c47[27]];_0xb142x13[_0x6c47[28]]=_[_0x6c47[30]](_0xb142x14.Users,function(_0xb142x15){return {id:_0xb142x15[_0x6c47[22]],name:_0xb142x15[_0x6c47[29]]}});return _0xb142x14[_0x6c47[31]]()}}function handleMailAccount(_0xb142x12,_0xb142x13){return function(_0xb142x17){_0xb142x12[_0x6c47[32]]=_0xb142x17[_0x6c47[22]];_0xb142x12[_0x6c47[33]]=_0xb142x17[_0x6c47[29]];_0xb142x12[_0x6c47[34]]=_0xb142x17[_0x6c47[35]];_0xb142x13[_0x6c47[36]]=_0xb142x17[_0x6c47[36]];if(_0xb142x17[_0x6c47[36]]){_0xb142x13[_0x6c47[37]]=_0xb142x13[_0x6c47[38]]=_0xb142x17[_0x6c47[39]];_0xb142x13[_0x6c47[36]]=_0xb142x17[_0x6c47[39]];_0xb142x13[_0x6c47[40]]=_0x6c47[41]};return _0xb142x17[_0x6c47[45]]({order:_0x6c47[42],include:[{model:MailQueue,attributes:[_0x6c47[22],_0x6c47[29],_0x6c47[39],_0x6c47[40]],include:[{model:User,attributes:[_0x6c47[22],_0x6c47[29],_0x6c47[43],_0x6c47[44]]}]},{model:User,attributes:[_0x6c47[22],_0x6c47[29],_0x6c47[43],_0x6c47[44]]},{model:Interval,include:[{all:true}]}]})}}function handleApps(_0xb142x12,_0xb142x13){return function(_0xb142x19){var _0xb142x1a=[];if(_0xb142x13[_0x6c47[36]]){_0xb142x12[_0x6c47[38]]=_0xb142x13[_0x6c47[36]];_0xb142x12[_0x6c47[37]]=_0xb142x13[_0x6c47[36]];_0xb142x12[_0x6c47[28]]=_0xb142x13[_0x6c47[28]];_0xb142x12[_0x6c47[46]]=_0x6c47[36];_0xb142x12[_0x6c47[40]]=_0x6c47[41];var _0xb142x1b=_[_0x6c47[47]](_0xb142x12);if(_0xb142x1b[_0x6c47[28]][_0x6c47[48]]){_0xb142x1a[_0x6c47[49]](function(_0xb142x1c){ new Session(_0xb142x1b,_0xb142x1c)})}};_0xb142x19[_0x6c47[66]](function(_0xb142x1d,_0xb142x1e){var _0xb142x1b=_[_0x6c47[47]](_0xb142x12);_0xb142x1b[_0x6c47[37]]=_0xb142x1d[_0x6c47[39]];_0xb142x1b[_0x6c47[46]]=_0xb142x1d[_0x6c47[50]];_0xb142x1b[_0x6c47[51]]=moment()[_0x6c47[26]](_0x6c47[52]);switch(_0xb142x1d[_0x6c47[50]]){case _0x6c47[55]:_0xb142x1b[_0x6c47[53]]=_0xb142x1d[_0x6c47[11]][_0x6c47[22]];_0xb142x1b[_0x6c47[54]]=_0xb142x1d[_0x6c47[11]][_0x6c47[29]];_0xb142x1b[_0x6c47[40]]=_0xb142x1d[_0x6c47[11]][_0x6c47[40]];_0xb142x1b[_0x6c47[38]]=_0xb142x1d[_0x6c47[11]][_0x6c47[39]];_0xb142x1b[_0x6c47[28]]=_[_0x6c47[30]](_0xb142x1d[_0x6c47[11]].Users,function(_0xb142x1f){return {id:_0xb142x1f[_0x6c47[22]],name:_0xb142x1f[_0x6c47[29]]}});break;case _0x6c47[56]:_0xb142x1b[_0x6c47[38]]=_0xb142x1d[_0x6c47[39]];_0xb142x1b[_0x6c47[40]]=_0x6c47[41];_0xb142x1b[_0x6c47[28]]=[{id:_0xb142x1d[_0x6c47[13]][_0x6c47[22]],name:_0xb142x1d[_0x6c47[13]][_0x6c47[29]]}];break;default:};if(_0xb142x1a[_0x6c47[48]]){_0xb142x1a[_0x6c47[49]](function(_0xb142x20,_0xb142x1c){if(_0xb142x20){_0xb142x1c(null,_0xb142x20)}else {console[_0x6c47[17]](_0x6c47[57],_0xb142x1b);return ReportMailSession[_0x6c47[63]]({leaveAt:moment()[_0x6c47[26]](_0x6c47[52]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb142x1b[_0x6c47[23]]}})[_0x6c47[60]](function(){return ReportMailSession[_0x6c47[62]]({uniqueid:_0xb142x1b[_0x6c47[23]],subject:_0xb142x1b[_0x6c47[27]],accountid:_0xb142x1b[_0x6c47[32]],accountname:_0xb142x1b[_0x6c47[33]],accountaddress:_0xb142x1b[_0x6c47[34]],application:_0xb142x1b[_0x6c47[46]],memberid:(_0xb142x1b[_0x6c47[46]]===_0x6c47[56]&&_0xb142x1b[_0x6c47[28]][0])?_0xb142x1b[_0x6c47[28]][0][_0x6c47[22]]:null,membername:(_0xb142x1b[_0x6c47[46]]===_0x6c47[56]&&_0xb142x1b[_0x6c47[28]][0])?_0xb142x1b[_0x6c47[28]][0][_0x6c47[29]]:null,queue:_0xb142x1b[_0x6c47[53]],queuename:_0xb142x1b[_0x6c47[54]],roomid:_0xb142x1b[_0x6c47[21]],fidelity:_0xb142x1b[_0x6c47[46]]===_0x6c47[36]?_0xb142x1b[_0x6c47[61]]:null,joinAt:moment()[_0x6c47[26]](_0x6c47[52])})})[_0x6c47[60]](function(){ new Session(_0xb142x1b,_0xb142x1c)})[_0x6c47[59]](function(_0xb142x21){console[_0x6c47[58]](_0xb142x21)})}})}else {_0xb142x1a[_0x6c47[49]](function(_0xb142x1c){console[_0x6c47[17]](_0x6c47[64],_0xb142x1b);return ReportMailRoom[_0x6c47[62]]({uniqueid:_0xb142x1b[_0x6c47[23]],subject:_0xb142x1b[_0x6c47[27]],accountid:_0xb142x1b[_0x6c47[32]],accountname:_0xb142x1b[_0x6c47[33]],accountaddress:_0xb142x1b[_0x6c47[34]],from:_0xb142x1b[_0x6c47[65]],roomid:_0xb142x1b[_0x6c47[21]],joinAt:moment()[_0x6c47[26]](_0x6c47[52])})[_0x6c47[60]](function(){return ReportMailSession[_0x6c47[62]]({uniqueid:_0xb142x1b[_0x6c47[23]],subject:_0xb142x1b[_0x6c47[27]],accountid:_0xb142x1b[_0x6c47[32]],accountname:_0xb142x1b[_0x6c47[33]],accountaddress:_0xb142x1b[_0x6c47[34]],application:_0xb142x1b[_0x6c47[46]],memberid:(_0xb142x1b[_0x6c47[46]]===_0x6c47[56]&&_0xb142x1b[_0x6c47[28]][0])?_0xb142x1b[_0x6c47[28]][0][_0x6c47[22]]:null,membername:(_0xb142x1b[_0x6c47[46]]===_0x6c47[56]&&_0xb142x1b[_0x6c47[28]][0])?_0xb142x1b[_0x6c47[28]][0][_0x6c47[29]]:null,queue:_0xb142x1b[_0x6c47[53]],queuename:_0xb142x1b[_0x6c47[54]],roomid:_0xb142x1b[_0x6c47[21]],fidelity:_0xb142x1b[_0x6c47[46]]===_0x6c47[36]?_0xb142x1b[_0x6c47[61]]:null,joinAt:moment()[_0x6c47[26]](_0x6c47[52])})})[_0x6c47[60]](function(){ new Session(_0xb142x1b,_0xb142x1c)})[_0x6c47[59]](function(_0xb142x21){console[_0x6c47[58]](_0xb142x21)})})}});async[_0x6c47[68]](_0xb142x1a,function(_0xb142x21,_0xb142x22){console[_0x6c47[17]](_0x6c47[67]);if(_0xb142x21){console[_0x6c47[58]](_0xb142x21)};if(!_0xb142x22){return ReportMailRoom[_0x6c47[63]]({leaveAt:moment()[_0x6c47[26]](_0x6c47[52]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb142x12[_0x6c47[23]]},individualHooks:true})[_0x6c47[60]](function(){return ReportMailSession[_0x6c47[63]]({leaveAt:moment()[_0x6c47[26]](_0x6c47[52]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb142x12[_0x6c47[23]]},individualHooks:true})})[_0x6c47[59]](function(_0xb142x21){console[_0x6c47[58]](_0xb142x21)})}})}}function handleMessage(_0xb142xe){var _0xb142x13={agents:[]};var _0xb142x12={messageid:_0xb142xe[_0x6c47[22]],from:_0xb142xe[_0x6c47[65]][0]||null,joinAt:moment()[_0x6c47[26]](_0x6c47[52])};return _0xb142xe[_0x6c47[72]]({include:[{model:User,attributes:[_0x6c47[22],_0x6c47[29],_0x6c47[43],_0x6c47[44]]}]})[_0x6c47[60]](handleEntityNotFound(_0x6c47[71]))[_0x6c47[60]](handleMailRoom(_0xb142x12,_0xb142x13))[_0x6c47[60]](handleEntityNotFound(_0x6c47[70]))[_0x6c47[60]](handleMailAccount(_0xb142x12,_0xb142x13))[_0x6c47[60]](handleApps(_0xb142x12,_0xb142x13))[_0x6c47[59]](function(_0xb142x21){console[_0x6c47[58]](_0x6c47[69],_0xb142x21)})} \ No newline at end of file diff --git a/server/config/routing/mail/session.js b/server/config/routing/mail/session.js index 4424ad8..c7727c9 100644 --- a/server/config/routing/mail/session.js +++ b/server/config/routing/mail/session.js @@ -1,273 +1 @@ -'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 ReportMailRoom = require('../../../models').ReportMailRoom; -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 ReportMailRoom - .update({ - application: doc.application, - memberid: doc.memberid, - membername: doc.membername, - queue: doc.queueid, - queuename: doc.queuename, - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss") - }, { - where: { - uniqueid: doc.uniqueid, - leaveAt: null - }, - individualHooks: true - }); - }) - .then(function() { - return ReportMailSession - .update({ - memberid: doc.memberid, - membername: doc.membername, - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss") - }, { - where: { - uniqueid: doc.uniqueid, - leaveAt: null - }, - 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; +var _0x5a96=["\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\x52\x6F\x6F\x6D","\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","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x6D\x65\x6D\x62\x65\x72\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\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x71\x75\x65\x75\x65\x69\x64","\x71\x75\x65\x75\x65\x6E\x61\x6D\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","\x71\x75\x65\x75\x65","\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"];_0x5a96[0];var _=require(_0x5a96[1]);var moment=require(_0x5a96[2]);var Agent=require(_0x5a96[4])[_0x5a96[3]];var MailRoom=require(_0x5a96[4])[_0x5a96[5]];var MailApplication=require(_0x5a96[4])[_0x5a96[6]];var ReportMail=require(_0x5a96[4])[_0x5a96[7]];var ReportMailRoom=require(_0x5a96[4])[_0x5a96[8]];var ReportMailSession=require(_0x5a96[4])[_0x5a96[9]];function Session(_0xa90axa,_0xa90axb){console[_0x5a96[11]](_0x5a96[10]);var _0xa90axc=0;var _0xa90axd,_0xa90axe;Agent[_0x5a96[35]]({where:{id:{$in:_[_0x5a96[34]](_0xa90axa[_0x5a96[33]],_0x5a96[16])},online:true,mailPause:false},include:[{model:MailRoom,attributes:[_0x5a96[16],_0x5a96[18]]}],attributes:[_0x5a96[16],_0x5a96[24],_0x5a96[14]]})[_0x5a96[32]](function(_0xa90ax10){var _0xa90ax11=_[_0x5a96[20]](_0xa90ax10,function(_0xa90ax12){if(_0xa90ax12[_0x5a96[14]]===0){return true}else {return _0xa90ax12[_0x5a96[14]]>_[_0x5a96[20]](_0xa90ax12.MailRooms,function(_0xa90ax13){return _0xa90ax13[_0x5a96[16]]!==_0xa90axa[_0x5a96[17]]&&_0xa90ax13[_0x5a96[18]]!==_0x5a96[19]})[_0x5a96[15]]}});var _0xa90ax14=[];var _0xa90ax15;var _0xa90ax12;_0xa90axa[_0x5a96[21]]=((_0xa90axa[_0x5a96[22]]-_0xa90axc)>_0xa90axa[_0x5a96[23]])?_0xa90axa[_0x5a96[23]]:(_0xa90axa[_0x5a96[22]]-_0xa90axc);switch(_0xa90axa[_0x5a96[31]]){case _0x5a96[29]:_0xa90ax15=_[_0x5a96[25]](_0xa90ax11,_0xa90ax14,_0x5a96[24]);_0xa90ax12=_0xa90ax15[_0x5a96[26]]();if(_0xa90ax12){_0xa90axa[_0x5a96[27]]=[{id:_0xa90ax12[_0x5a96[16]],name:_0xa90ax12[_0x5a96[24]]}];_0xa90ax14[_0x5a96[28]]({id:_0xa90ax12[_0x5a96[16]],name:_0xa90ax12[_0x5a96[24]]});saveReport(_0xa90axa)}else {_0xa90ax14=[];_0xa90ax12=_0xa90ax11[_0x5a96[26]]();if(_0xa90ax12){_0xa90ax14[_0x5a96[28]]({id:_0xa90ax12[_0x5a96[16]],name:_0xa90ax12[_0x5a96[24]]});saveReport(_0xa90axa)}};break;case _0x5a96[30]:_0xa90axa[_0x5a96[27]]=_0xa90ax11;saveReport(_0xa90axa);break;default:};_0xa90axe=setTimeout(function(){clearInterval(_0xa90axd);return _0xa90axb(null,false)},_0xa90axa[_0x5a96[22]]*1000);_0xa90axd=setInterval(function(){_0xa90axc+=_0xa90axa[_0x5a96[23]];return Agent[_0x5a96[35]]({where:{id:{$in:_[_0x5a96[34]](_0xa90axa[_0x5a96[33]],_0x5a96[16])},online:true,mailPause:false},include:[{model:MailRoom,attributes:[_0x5a96[16],_0x5a96[18]]}],attributes:[_0x5a96[16],_0x5a96[24],_0x5a96[14]]})[_0x5a96[32]](function(_0xa90ax10){_0xa90ax11=_[_0x5a96[20]](_0xa90ax10,function(_0xa90ax12){if(_0xa90ax12[_0x5a96[14]]===0){return true}else {return _0xa90ax12[_0x5a96[14]]>_[_0x5a96[20]](_0xa90ax12.MailRooms,function(_0xa90ax13){return _0xa90ax13[_0x5a96[16]]!==_0xa90axa[_0x5a96[17]]&&_0xa90ax13[_0x5a96[18]]!==_0x5a96[19]})[_0x5a96[15]]}});_0xa90axa[_0x5a96[21]]=((_0xa90axa[_0x5a96[22]]-_0xa90axc)>_0xa90axa[_0x5a96[23]])?_0xa90axa[_0x5a96[23]]:(_0xa90axa[_0x5a96[22]]-_0xa90axc);switch(_0xa90axa[_0x5a96[31]]){case _0x5a96[29]:_0xa90ax15=_[_0x5a96[25]](_0xa90ax11,_0xa90ax14,_0x5a96[24]);_0xa90ax12=_0xa90ax15[_0x5a96[26]]();if(_0xa90ax12){_0xa90axa[_0x5a96[27]]=[{id:_0xa90ax12[_0x5a96[16]],name:_0xa90ax12[_0x5a96[24]]}];_0xa90ax14[_0x5a96[28]]({id:_0xa90ax12[_0x5a96[16]],name:_0xa90ax12[_0x5a96[24]]});saveReport(_0xa90axa)}else {_0xa90ax14=[];_0xa90ax12=_0xa90ax11[_0x5a96[26]]();if(_0xa90ax12){_0xa90axa[_0x5a96[27]]=[{id:_0xa90ax12[_0x5a96[16]],name:_0xa90ax12[_0x5a96[24]]}];_0xa90ax14[_0x5a96[28]]({id:_0xa90ax12[_0x5a96[16]],name:_0xa90ax12[_0x5a96[24]]});saveReport(_0xa90axa)}};break;case _0x5a96[30]:_0xa90axa[_0x5a96[27]]=_0xa90ax11;saveReport(_0xa90axa);break;default:}})[_0x5a96[13]](function(_0xa90axf){console[_0x5a96[12]](_0xa90axf)})},_0xa90axa[_0x5a96[23]]*1000)})[_0x5a96[13]](function(_0xa90axf){console[_0x5a96[12]](_0xa90axf)});ReportMail[_0x5a96[49]](function(_0xa90ax16){if(_0xa90ax16[_0x5a96[37]](_0x5a96[36])){return MailRoom[_0x5a96[48]](_0xa90ax16[_0x5a96[17]])[_0x5a96[32]](function(_0xa90ax17){return _0xa90ax17[_0x5a96[47]](_0xa90ax16[_0x5a96[38]],{individualHooks:true})})[_0x5a96[32]](function(){return ReportMailRoom[_0x5a96[43]]({application:_0xa90ax16[_0x5a96[44]],memberid:_0xa90ax16[_0x5a96[38]],membername:_0xa90ax16[_0x5a96[39]],queue:_0xa90ax16[_0x5a96[45]],queuename:_0xa90ax16[_0x5a96[46]],leaveAt:moment()[_0x5a96[41]](_0x5a96[40])},{where:{uniqueid:_0xa90ax16[_0x5a96[42]],leaveAt:null},individualHooks:true})})[_0x5a96[32]](function(){return ReportMailSession[_0x5a96[43]]({memberid:_0xa90ax16[_0x5a96[38]],membername:_0xa90ax16[_0x5a96[39]],leaveAt:moment()[_0x5a96[41]](_0x5a96[40])},{where:{uniqueid:_0xa90ax16[_0x5a96[42]],leaveAt:null},individualHooks:true})})[_0x5a96[32]](function(){clearInterval(_0xa90axd);clearTimeout(_0xa90axe);return _0xa90axb(null,true)})[_0x5a96[13]](function(_0xa90axf){console[_0x5a96[12]](_0xa90axf)})}});return {}}function saveReport(_0xa90axa){var _0xa90ax19=[];_0xa90axa[_0x5a96[27]][_0x5a96[56]](function(_0xa90ax12,_0xa90ax1a){_0xa90ax19[_0x5a96[28]]({uniqueid:_0xa90axa[_0x5a96[42]],timeslot:_0xa90axa[_0x5a96[21]],subject:_0xa90axa[_0x5a96[50]],accountid:_0xa90axa[_0x5a96[51]],accountname:_0xa90axa[_0x5a96[52]],accountaddress:_0xa90axa[_0x5a96[53]],application:_0xa90axa[_0x5a96[44]],membername:_0xa90ax12[_0x5a96[24]],memberid:_0xa90ax12[_0x5a96[16]],queue:_0xa90axa[_0x5a96[54]]||null,queuename:_0xa90axa[_0x5a96[46]]||null,roomid:_0xa90axa[_0x5a96[17]]||null,messageid:_0xa90axa[_0x5a96[55]]||null,calledAt:moment()[_0x5a96[41]](_0x5a96[40])})});if(_0xa90ax19[_0x5a96[15]]){return ReportMail[_0x5a96[57]](_0xa90ax19,{individualHooks:true})[_0x5a96[13]](function(_0xa90axf){console[_0x5a96[12]](_0xa90axf)})}}module[_0x5a96[58]]=Session \ No newline at end of file diff --git a/server/config/seed.js b/server/config/seed.js index 6880d48..517cb2a 100644 --- a/server/config/seed.js +++ b/server/config/seed.js @@ -1,1236 +1 @@ -/** - * 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: "We're not online.
              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.List - .bulkCreate([{ - id: 1, - name: 'Motion Service', - defaultEntry: true - }], { - ignoreDuplicates: true, - individualHooks: true - }).then(function() { - console.log('Finished populating integrations'); - }); +var _0x2d4e=["\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","\x4C\x69\x73\x74"];_0x2d4e[0];var _=require(_0x2d4e[1]);var models=require(_0x2d4e[2]);models[_0x2d4e[69]][_0x2d4e[68]]([{provider:_0x2d4e[6],role:_0x2d4e[7],fullname:_0x2d4e[8],email:_0x2d4e[9],name:_0x2d4e[10],password:_0x2d4e[11],defaultuser:_0x2d4e[10],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[14],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1000},{provider:_0x2d4e[6],role:_0x2d4e[7],fullname:_0x2d4e[20],email:_0x2d4e[21],name:_0x2d4e[22],password:_0x2d4e[11],defaultuser:_0x2d4e[22],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[14],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1001},{provider:_0x2d4e[6],role:_0x2d4e[7],fullname:_0x2d4e[23],email:_0x2d4e[24],name:_0x2d4e[25],password:_0x2d4e[11],defaultuser:_0x2d4e[25],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[14],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1002},{provider:_0x2d4e[6],role:_0x2d4e[7],fullname:_0x2d4e[26],email:_0x2d4e[27],name:_0x2d4e[28],password:_0x2d4e[11],defaultuser:_0x2d4e[28],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[14],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1003},{provider:_0x2d4e[6],role:_0x2d4e[7],fullname:_0x2d4e[29],email:_0x2d4e[30],name:_0x2d4e[31],password:_0x2d4e[11],defaultuser:_0x2d4e[31],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[14],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1004},{provider:_0x2d4e[6],role:_0x2d4e[32],fullname:_0x2d4e[33],email:_0x2d4e[34],name:_0x2d4e[35],password:_0x2d4e[35],defaultuser:_0x2d4e[35],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[14],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1005},{provider:_0x2d4e[6],role:_0x2d4e[7],fullname:_0x2d4e[36],email:_0x2d4e[37],name:_0x2d4e[38],password:_0x2d4e[11],defaultuser:_0x2d4e[38],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[14],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1006},{provider:_0x2d4e[6],role:_0x2d4e[7],fullname:_0x2d4e[39],email:_0x2d4e[40],name:_0x2d4e[41],password:_0x2d4e[35],defaultuser:_0x2d4e[41],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[14],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1007},{provider:_0x2d4e[6],role:_0x2d4e[7],fullname:_0x2d4e[42],email:_0x2d4e[43],name:_0x2d4e[44],password:_0x2d4e[35],defaultuser:_0x2d4e[44],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[14],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1008},{provider:_0x2d4e[6],role:_0x2d4e[7],fullname:_0x2d4e[45],email:_0x2d4e[46],name:_0x2d4e[47],password:_0x2d4e[11],defaultuser:_0x2d4e[47],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[14],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1009},{provider:_0x2d4e[6],role:_0x2d4e[7],fullname:_0x2d4e[48],email:_0x2d4e[49],name:_0x2d4e[50],password:_0x2d4e[11],defaultuser:_0x2d4e[50],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[51],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1010},{provider:_0x2d4e[6],role:_0x2d4e[7],fullname:_0x2d4e[52],email:_0x2d4e[53],name:_0x2d4e[54],password:_0x2d4e[11],defaultuser:_0x2d4e[54],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[51],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1011},{provider:_0x2d4e[6],role:_0x2d4e[7],fullname:_0x2d4e[55],email:_0x2d4e[56],name:_0x2d4e[57],password:_0x2d4e[11],defaultuser:_0x2d4e[57],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[51],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1012},{provider:_0x2d4e[6],role:_0x2d4e[32],fullname:_0x2d4e[58],email:_0x2d4e[59],name:_0x2d4e[60],password:_0x2d4e[61],defaultuser:_0x2d4e[60],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[14],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1013},{provider:_0x2d4e[6],role:_0x2d4e[7],fullname:_0x2d4e[62],email:_0x2d4e[63],name:_0x2d4e[64],password:_0x2d4e[11],defaultuser:_0x2d4e[64],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[14],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1014},{provider:_0x2d4e[6],role:_0x2d4e[7],fullname:_0x2d4e[65],email:_0x2d4e[66],name:_0x2d4e[67],password:_0x2d4e[11],defaultuser:_0x2d4e[67],host:_0x2d4e[12],type:_0x2d4e[13],transport:_0x2d4e[14],allow:_0x2d4e[15],qualify:_0x2d4e[16],nat:_0x2d4e[17],disallow:_0x2d4e[18],context:_0x2d4e[19],internal:1015}],{ignoreDuplicates:true,individualHooks:true})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[3])});models[_0x2d4e[83]][_0x2d4e[68]]([{name:_0x2d4e[71],type:_0x2d4e[72],insecure:_0x2d4e[73],defaultuser:_0x2d4e[74],secret:_0x2d4e[75],password:_0x2d4e[75],context:_0x2d4e[76],language:_0x2d4e[77],host:_0x2d4e[78],fromdomain:_0x2d4e[78],dtmfmode:_0x2d4e[79],qualify:_0x2d4e[16],nat:_0x2d4e[17],callerid:_0x2d4e[80],limitonpeers:_0x2d4e[16],callcounter:_0x2d4e[16],disallow:_0x2d4e[18],allow:_0x2d4e[81],canreinvite:_0x2d4e[82],directmedia:_0x2d4e[82]}],{ignoreDuplicates:true,individualHooks:true})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[70])});models[_0x2d4e[113]][_0x2d4e[68]]([{name:_0x2d4e[85],title:_0x2d4e[86]},{name:_0x2d4e[87],title:_0x2d4e[88]},{name:_0x2d4e[89],title:_0x2d4e[90]},{name:_0x2d4e[91],title:_0x2d4e[92]},{name:_0x2d4e[93],title:_0x2d4e[94]},{name:_0x2d4e[95],title:_0x2d4e[96]},{name:_0x2d4e[97],title:_0x2d4e[98]},{name:_0x2d4e[99],title:_0x2d4e[100]},{name:_0x2d4e[101],title:_0x2d4e[102]},{name:_0x2d4e[103],title:_0x2d4e[104]},{name:_0x2d4e[105],title:_0x2d4e[106]},{name:_0x2d4e[107],title:_0x2d4e[108]},{name:_0x2d4e[109],title:_0x2d4e[110]},{name:_0x2d4e[111],title:_0x2d4e[112]}],{ignoreDuplicates:true})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[84])});models[_0x2d4e[121]][_0x2d4e[125]]({name:_0x2d4e[119],description:_0x2d4e[138],defaultEntry:true})[_0x2d4e[5]](function(_0x897fx4){models[_0x2d4e[69]][_0x2d4e[137]]({where:{role:_0x2d4e[7]}})[_0x2d4e[5]](function(_0x897fx5){_0x897fx4[_0x2d4e[118]](_[_0x2d4e[117]](_0x897fx5,_0x2d4e[116]))[_0x2d4e[5]](function(){models[_0x2d4e[126]][_0x2d4e[125]]({name:_0x2d4e[122],description:_0x2d4e[123],timeout:5,strategy:_0x2d4e[124]})[_0x2d4e[5]](function(_0x897fx6){console[_0x2d4e[4]](_0x2d4e[115]);models[_0x2d4e[121]][_0x2d4e[120]]({where:{name:_0x2d4e[119]},include:[{all:true}]})[_0x2d4e[5]](function(_0x897fx4){_0x897fx6[_0x2d4e[118]](_[_0x2d4e[117]](_0x897fx4.Users,_0x2d4e[116]))[_0x2d4e[114]](function(_0x897fx3){})})[_0x2d4e[114]](function(_0x897fx3){})});models[_0x2d4e[132]][_0x2d4e[125]]({name:_0x2d4e[130],description:_0x2d4e[131],timeout:5,strategy:_0x2d4e[124]})[_0x2d4e[5]](function(_0x897fx7){console[_0x2d4e[4]](_0x2d4e[127]);models[_0x2d4e[121]][_0x2d4e[120]]({where:{name:_0x2d4e[119]},include:[{all:true}]})[_0x2d4e[5]](function(_0x897fx4){if(_0x897fx4){console[_0x2d4e[4]](_0x2d4e[128])}else {console[_0x2d4e[4]](_0x2d4e[129])};_0x897fx7[_0x2d4e[118]](_[_0x2d4e[117]](_0x897fx4.Users,_0x2d4e[116]))[_0x2d4e[114]](function(_0x897fx3){})})[_0x2d4e[114]](function(_0x897fx3){})});models[_0x2d4e[136]][_0x2d4e[125]]({name:_0x2d4e[134],description:_0x2d4e[135],timeout:5,strategy:_0x2d4e[124]})[_0x2d4e[5]](function(_0x897fx8){console[_0x2d4e[4]](_0x2d4e[133]);models[_0x2d4e[121]][_0x2d4e[120]]({where:{name:_0x2d4e[119]},include:[{all:true}]})[_0x2d4e[5]](function(_0x897fx4){_0x897fx8[_0x2d4e[118]](_[_0x2d4e[117]](_0x897fx4.Users,_0x2d4e[116]))[_0x2d4e[114]](function(_0x897fx3){})})[_0x2d4e[114]](function(_0x897fx3){})})})[_0x2d4e[114]](function(_0x897fx3){})})[_0x2d4e[114]](function(_0x897fx3){})})[_0x2d4e[114]](function(_0x897fx3){});models[_0x2d4e[152]][_0x2d4e[125]]({name:_0x2d4e[151],description:_0x2d4e[151],address:_0x2d4e[143]})[_0x2d4e[5]](function(_0x897fx9){console[_0x2d4e[4]](_0x2d4e[139]);models[_0x2d4e[150]][_0x2d4e[125]]({description:_0x2d4e[60],host:_0x2d4e[146],username:_0x2d4e[143],password:_0x2d4e[144],port:143,mailbox:_0x2d4e[147],ssl:false,delete:false,filter:_0x2d4e[148],protocol:_0x2d4e[149],MailAccountId:_0x897fx9[_0x2d4e[116]]})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[140]);models[_0x2d4e[145]][_0x2d4e[125]]({description:_0x2d4e[60],host:_0x2d4e[142],username:_0x2d4e[143],password:_0x2d4e[144],port:587,ssl:false,MailAccountId:_0x897fx9[_0x2d4e[116]]})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[141])})[_0x2d4e[114]](function(_0x897fx3){})})[_0x2d4e[114]](function(_0x897fx3){})});models[_0x2d4e[168]][_0x2d4e[125]]({description:_0x2d4e[163],name:_0x2d4e[164],phone:_0x2d4e[74],ecm:true,faxheader:_0x2d4e[165],localid:_0x2d4e[74],maxrate:_0x2d4e[166],minrate:_0x2d4e[167]})[_0x2d4e[5]](function(_0x897fxa){console[_0x2d4e[4]](_0x2d4e[153]);models[_0x2d4e[83]][_0x2d4e[120]]({where:{name:_0x2d4e[71]}})[_0x2d4e[5]](function(_0x897fxb){_0x897fxa[_0x2d4e[154]](_0x897fxb)[_0x2d4e[114]](function(_0x897fx3){});models[_0x2d4e[158]][_0x2d4e[125]]({context:_0x2d4e[76],exten:_0x2d4e[74],priority:1,app:_0x2d4e[155],appdata:_0x2d4e[156],type:_0x2d4e[157]})})[_0x2d4e[114]](function(_0x897fx3){});models[_0x2d4e[136]][_0x2d4e[137]]()[_0x2d4e[5]](function(_0x897fxc){models[_0x2d4e[161]][_0x2d4e[125]]({app:_0x2d4e[160],appdata:_0x897fxc[0][_0x2d4e[116]],priority:1,timeout:30,FaxAccountId:_0x897fxa[_0x2d4e[116]],FaxQueueId:_0x897fxc[0][_0x2d4e[116]]})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[159])})[_0x2d4e[114]](function(_0x897fx3){});models[_0x2d4e[161]][_0x2d4e[125]]({app:_0x2d4e[160],appdata:_0x897fxc[1][_0x2d4e[116]],priority:2,timeout:30,FaxAccountId:_0x897fxa[_0x2d4e[116]],FaxQueueId:_0x897fxc[1][_0x2d4e[116]]})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[162])})[_0x2d4e[114]](function(_0x897fx3){})})[_0x2d4e[114]](function(_0x897fx3){})})[_0x2d4e[114]](function(_0x897fx3){});models[_0x2d4e[158]][_0x2d4e[68]]([{context:_0x2d4e[170],exten:_0x2d4e[171],priority:1,app:_0x2d4e[172],appdata:_0x2d4e[173],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[171],priority:2,app:_0x2d4e[174],appdata:_0x2d4e[175],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[171],priority:3,app:_0x2d4e[176],appdata:_0x2d4e[177],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[171],priority:4,app:_0x2d4e[176],appdata:_0x2d4e[178],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[171],priority:5,app:_0x2d4e[176],appdata:_0x2d4e[179],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[171],priority:6,app:_0x2d4e[176],appdata:_0x2d4e[180],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[171],priority:7,app:_0x2d4e[176],appdata:_0x2d4e[181],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[171],priority:8,app:_0x2d4e[176],appdata:_0x2d4e[182],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[171],priority:9,app:_0x2d4e[183],appdata:_0x2d4e[184],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[171],priority:10,app:_0x2d4e[172],appdata:_0x2d4e[185],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[186],priority:1,app:_0x2d4e[172],appdata:_0x2d4e[187],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[186],priority:2,app:_0x2d4e[172],appdata:_0x2d4e[188],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[186],priority:3,app:_0x2d4e[172],appdata:_0x2d4e[189],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[186],priority:4,app:_0x2d4e[172],appdata:_0x2d4e[190],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[186],priority:5,app:_0x2d4e[172],appdata:_0x2d4e[191],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[186],priority:6,app:_0x2d4e[172],appdata:_0x2d4e[192],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[186],priority:7,app:_0x2d4e[172],appdata:_0x2d4e[193],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[186],priority:8,app:_0x2d4e[172],appdata:_0x2d4e[194],type:_0x2d4e[170]},{context:_0x2d4e[170],exten:_0x2d4e[186],priority:9,app:_0x2d4e[172],appdata:_0x2d4e[195],type:_0x2d4e[170]}],{ignoreDuplicates:true})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[169])});models[_0x2d4e[158]][_0x2d4e[68]]([{context:_0x2d4e[157],exten:_0x2d4e[171],priority:1,app:_0x2d4e[172],appdata:_0x2d4e[196],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:2,app:_0x2d4e[176],appdata:_0x2d4e[197],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:3,app:_0x2d4e[176],appdata:_0x2d4e[198],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:4,app:_0x2d4e[176],appdata:_0x2d4e[199],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:5,app:_0x2d4e[176],appdata:_0x2d4e[200],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:6,app:_0x2d4e[176],appdata:_0x2d4e[180],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:7,app:_0x2d4e[176],appdata:_0x2d4e[181],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:8,app:_0x2d4e[176],appdata:_0x2d4e[182],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:9,app:_0x2d4e[172],appdata:_0x2d4e[187],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:10,app:_0x2d4e[172],appdata:_0x2d4e[201],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:11,app:_0x2d4e[172],appdata:_0x2d4e[202],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:12,app:_0x2d4e[172],appdata:_0x2d4e[203],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:13,app:_0x2d4e[172],appdata:_0x2d4e[204],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:14,app:_0x2d4e[172],appdata:_0x2d4e[205],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:15,app:_0x2d4e[206],appdata:_0x2d4e[207],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[171],priority:16,app:_0x2d4e[208],type:_0x2d4e[157]},{context:_0x2d4e[157],exten:_0x2d4e[186],priority:1,app:_0x2d4e[172],appdata:_0x2d4e[187],type:_0x2d4e[157]}],{ignoreDuplicates:true})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[169])});models[_0x2d4e[212]][_0x2d4e[68]]([{name:_0x2d4e[210],description:_0x2d4e[211]}],{ignoreDuplicates:true})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[209])});models[_0x2d4e[229]][_0x2d4e[125]]({name:_0x2d4e[215],description:_0x2d4e[215],address:_0x2d4e[216],color:_0x2d4e[217],color_focus:_0x2d4e[217],color_button:_0x2d4e[217],remote:_0x2d4e[218],animation:true,header_shape:_0x2d4e[219],header_online:_0x2d4e[220],online_message:_0x2d4e[221],username_placeholder:_0x2d4e[222],email_placeholder:_0x2d4e[223],start_chat_button:_0x2d4e[224],header_offline:_0x2d4e[225],offline_message:_0x2d4e[226],enquiry_message_placeholder:_0x2d4e[227],enquiry_button:_0x2d4e[228],download_transcript:true})[_0x2d4e[5]](function(_0x897fxd){console[_0x2d4e[4]](_0x2d4e[213]);models[_0x2d4e[126]][_0x2d4e[137]]()[_0x2d4e[5]](function(_0x897fxe){models[_0x2d4e[214]][_0x2d4e[125]]({app:_0x2d4e[160],appdata:_0x897fxe[0][_0x2d4e[116]],priority:1,timeout:30,ChatWebsiteId:_0x897fxd[_0x2d4e[116]],ChatQueueId:_0x897fxe[0][_0x2d4e[116]]})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[159])})[_0x2d4e[114]](function(_0x897fx3){});models[_0x2d4e[214]][_0x2d4e[125]]({app:_0x2d4e[160],appdata:_0x897fxe[1][_0x2d4e[116]],priority:2,timeout:30,ChatWebsiteId:_0x897fxd[_0x2d4e[116]],ChatQueueId:_0x897fxe[1][_0x2d4e[116]]})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[162])})[_0x2d4e[114]](function(_0x897fx3){})})[_0x2d4e[114]](function(_0x897fx3){})})[_0x2d4e[114]](function(_0x897fx3){});models[_0x2d4e[232]][_0x2d4e[68]]([{name:_0x2d4e[231],description:_0x2d4e[211]}],{ignoreDuplicates:true})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[230])});models[_0x2d4e[236]][_0x2d4e[68]]([{name:_0x2d4e[19],description:_0x2d4e[234],defaultEntry:true},{name:_0x2d4e[76],description:_0x2d4e[234],defaultEntry:true},{name:_0x2d4e[157],description:_0x2d4e[234],defaultEntry:true},{name:_0x2d4e[170],description:_0x2d4e[234],defaultEntry:true},{name:_0x2d4e[235],description:_0x2d4e[234],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[233])});models[_0x2d4e[243]][_0x2d4e[68]]([{name:_0x2d4e[238],mode:_0x2d4e[239],directory:_0x2d4e[240],sort:_0x2d4e[241],format:_0x2d4e[242],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[237])});models[_0x2d4e[245]][_0x2d4e[68]]([{id:1,min_internal:1000,soundPath:_0x2d4e[244]}],{ignoreDuplicates:true,individualHooks:true})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[237])});models[_0x2d4e[257]][_0x2d4e[68]]([{id:1,name:_0x2d4e[246],model:JSON[_0x2d4e[256]]({title:_0x2d4e[246],rows:[{columns:[{styleClass:_0x2d4e[247],widgets:[{type:_0x2d4e[248],title:_0x2d4e[249],config:{timePattern:_0x2d4e[250],datePattern:_0x2d4e[251]}}]},{styleClass:_0x2d4e[252],widgets:[{type:_0x2d4e[253],title:_0x2d4e[254],config:{url:_0x2d4e[255]}}]}]}]}),defaultEntry:true,editable:false}],{ignoreDuplicates:true,individualHooks:true})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[237])});models[_0x2d4e[281]][_0x2d4e[68]]([{name:_0x2d4e[259],version:_0x2d4e[260],active:false,author:_0x2d4e[261],logo:_0x2d4e[262],state:_0x2d4e[263],description:_0x2d4e[264]},{name:_0x2d4e[265],version:_0x2d4e[260],active:false,author:_0x2d4e[261],logo:_0x2d4e[266],state:_0x2d4e[267],description:_0x2d4e[268]},{name:_0x2d4e[269],version:_0x2d4e[260],active:false,author:_0x2d4e[261],logo:_0x2d4e[270],state:_0x2d4e[271],description:_0x2d4e[272]},{name:_0x2d4e[273],version:_0x2d4e[260],active:false,author:_0x2d4e[261],logo:_0x2d4e[274],state:_0x2d4e[275],description:_0x2d4e[276]},{name:_0x2d4e[277],version:_0x2d4e[260],active:false,author:_0x2d4e[261],logo:_0x2d4e[278],state:_0x2d4e[279],description:_0x2d4e[280]}],{ignoreDuplicates:true,individualHooks:true})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[258])});models[_0x2d4e[284]][_0x2d4e[68]]([{id:1,tree:_0x2d4e[282]},{id:2,tree:_0x2d4e[283]}],{ignoreDuplicates:true,individualHooks:true})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[258])});models[_0x2d4e[286]][_0x2d4e[68]]([{id:1,name:_0x2d4e[285],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x2d4e[5]](function(){console[_0x2d4e[4]](_0x2d4e[258])}) \ No newline at end of file diff --git a/server/config/seedp.js b/server/config/seedp.js index 57ee608..ad8dcf2 100644 --- a/server/config/seedp.js +++ b/server/config/seedp.js @@ -1,550 +1 @@ -/** - * 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.List - .bulkCreate([{ - id: 1, - name: 'Motion Service', - defaultEntry: true - }], { - ignoreDuplicates: true, - individualHooks: true - }).then(function() { - console.log('Finished populating integrations'); - }); +var _0x3e5f=["\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","\x4C\x69\x73\x74"];_0x3e5f[0];var _=require(_0x3e5f[1]);var models=require(_0x3e5f[2]);var _users;var _team;models[_0x3e5f[34]][_0x3e5f[33]]([{provider:_0x3e5f[12],role:_0x3e5f[13],fullname:_0x3e5f[14],email:_0x3e5f[15],name:_0x3e5f[13],password:_0x3e5f[16],defaultuser:_0x3e5f[17],host:_0x3e5f[18],type:_0x3e5f[19],transport:_0x3e5f[20],allow:_0x3e5f[21],qualify:_0x3e5f[22],nat:_0x3e5f[23],disallow:_0x3e5f[24],context:_0x3e5f[25],internal:1000},{provider:_0x3e5f[12],role:_0x3e5f[7],fullname:_0x3e5f[26],email:_0x3e5f[27],name:_0x3e5f[28],password:_0x3e5f[29],defaultuser:_0x3e5f[28],host:_0x3e5f[18],type:_0x3e5f[19],transport:_0x3e5f[20],allow:_0x3e5f[21],qualify:_0x3e5f[22],nat:_0x3e5f[23],disallow:_0x3e5f[24],context:_0x3e5f[25],internal:1001},{provider:_0x3e5f[12],role:_0x3e5f[7],fullname:_0x3e5f[30],email:_0x3e5f[31],name:_0x3e5f[32],password:_0x3e5f[29],defaultuser:_0x3e5f[32],host:_0x3e5f[18],type:_0x3e5f[19],transport:_0x3e5f[20],allow:_0x3e5f[21],qualify:_0x3e5f[22],nat:_0x3e5f[23],disallow:_0x3e5f[24],context:_0x3e5f[25],internal:1002}],{ignoreDuplicates:true,individualHooks:true})[_0x3e5f[4]](function(_0x4e51x6){console[_0x3e5f[6]](_0x3e5f[5]);_users=_[_0x3e5f[8]](_0x4e51x6,{role:_0x3e5f[7]});return models[_0x3e5f[11]][_0x3e5f[10]]({name:_0x3e5f[9],description:_0x3e5f[9],defaultEntry:true})})[_0x3e5f[4]](function(_0x4e51x5){_team=_0x4e51x5;return _team[_0x3e5f[3]](_users)});models[_0x3e5f[64]][_0x3e5f[33]]([{name:_0x3e5f[36],title:_0x3e5f[37]},{name:_0x3e5f[38],title:_0x3e5f[39]},{name:_0x3e5f[40],title:_0x3e5f[41]},{name:_0x3e5f[42],title:_0x3e5f[43]},{name:_0x3e5f[44],title:_0x3e5f[45]},{name:_0x3e5f[46],title:_0x3e5f[47]},{name:_0x3e5f[48],title:_0x3e5f[49]},{name:_0x3e5f[50],title:_0x3e5f[51]},{name:_0x3e5f[52],title:_0x3e5f[53]},{name:_0x3e5f[54],title:_0x3e5f[55]},{name:_0x3e5f[56],title:_0x3e5f[57]},{name:_0x3e5f[58],title:_0x3e5f[59]},{name:_0x3e5f[60],title:_0x3e5f[61]},{name:_0x3e5f[62],title:_0x3e5f[63]}],{ignoreDuplicates:true})[_0x3e5f[4]](function(){console[_0x3e5f[6]](_0x3e5f[35])});models[_0x3e5f[92]][_0x3e5f[33]]([{context:_0x3e5f[66],exten:_0x3e5f[67],priority:1,app:_0x3e5f[68],appdata:_0x3e5f[69],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[67],priority:2,app:_0x3e5f[70],appdata:_0x3e5f[71],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[67],priority:3,app:_0x3e5f[72],appdata:_0x3e5f[73],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[67],priority:4,app:_0x3e5f[72],appdata:_0x3e5f[74],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[67],priority:5,app:_0x3e5f[72],appdata:_0x3e5f[75],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[67],priority:6,app:_0x3e5f[72],appdata:_0x3e5f[76],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[67],priority:7,app:_0x3e5f[72],appdata:_0x3e5f[77],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[67],priority:8,app:_0x3e5f[72],appdata:_0x3e5f[78],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[67],priority:9,app:_0x3e5f[79],appdata:_0x3e5f[80],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[67],priority:10,app:_0x3e5f[68],appdata:_0x3e5f[81],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[82],priority:1,app:_0x3e5f[68],appdata:_0x3e5f[83],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[82],priority:2,app:_0x3e5f[68],appdata:_0x3e5f[84],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[82],priority:3,app:_0x3e5f[68],appdata:_0x3e5f[85],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[82],priority:4,app:_0x3e5f[68],appdata:_0x3e5f[86],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[82],priority:5,app:_0x3e5f[68],appdata:_0x3e5f[87],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[82],priority:6,app:_0x3e5f[68],appdata:_0x3e5f[88],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[82],priority:7,app:_0x3e5f[68],appdata:_0x3e5f[89],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[82],priority:8,app:_0x3e5f[68],appdata:_0x3e5f[90],type:_0x3e5f[66]},{context:_0x3e5f[66],exten:_0x3e5f[82],priority:9,app:_0x3e5f[68],appdata:_0x3e5f[91],type:_0x3e5f[66]}],{ignoreDuplicates:true})[_0x3e5f[4]](function(){console[_0x3e5f[6]](_0x3e5f[65])});models[_0x3e5f[92]][_0x3e5f[33]]([{context:_0x3e5f[93],exten:_0x3e5f[67],priority:1,app:_0x3e5f[68],appdata:_0x3e5f[94],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:2,app:_0x3e5f[72],appdata:_0x3e5f[95],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:3,app:_0x3e5f[72],appdata:_0x3e5f[96],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:4,app:_0x3e5f[72],appdata:_0x3e5f[97],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:5,app:_0x3e5f[72],appdata:_0x3e5f[98],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:6,app:_0x3e5f[72],appdata:_0x3e5f[76],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:7,app:_0x3e5f[72],appdata:_0x3e5f[77],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:8,app:_0x3e5f[72],appdata:_0x3e5f[78],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:9,app:_0x3e5f[68],appdata:_0x3e5f[83],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:10,app:_0x3e5f[68],appdata:_0x3e5f[99],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:11,app:_0x3e5f[68],appdata:_0x3e5f[100],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:12,app:_0x3e5f[68],appdata:_0x3e5f[101],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:13,app:_0x3e5f[68],appdata:_0x3e5f[102],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:14,app:_0x3e5f[68],appdata:_0x3e5f[103],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:15,app:_0x3e5f[104],appdata:_0x3e5f[105],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[67],priority:16,app:_0x3e5f[106],type:_0x3e5f[93]},{context:_0x3e5f[93],exten:_0x3e5f[82],priority:1,app:_0x3e5f[68],appdata:_0x3e5f[83],type:_0x3e5f[93]}],{ignoreDuplicates:true})[_0x3e5f[4]](function(){console[_0x3e5f[6]](_0x3e5f[65])});models[_0x3e5f[110]][_0x3e5f[33]]([{name:_0x3e5f[108],description:_0x3e5f[109]}],{ignoreDuplicates:true})[_0x3e5f[4]](function(){console[_0x3e5f[6]](_0x3e5f[107])});models[_0x3e5f[113]][_0x3e5f[33]]([{name:_0x3e5f[112],description:_0x3e5f[109]}],{ignoreDuplicates:true})[_0x3e5f[4]](function(){console[_0x3e5f[6]](_0x3e5f[111])});models[_0x3e5f[118]][_0x3e5f[33]]([{name:_0x3e5f[25],description:_0x3e5f[115],defaultEntry:true},{name:_0x3e5f[116],description:_0x3e5f[115],defaultEntry:true},{name:_0x3e5f[93],description:_0x3e5f[115],defaultEntry:true},{name:_0x3e5f[66],description:_0x3e5f[115],defaultEntry:true},{name:_0x3e5f[117],description:_0x3e5f[115],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x3e5f[4]](function(){console[_0x3e5f[6]](_0x3e5f[114])});models[_0x3e5f[125]][_0x3e5f[33]]([{name:_0x3e5f[120],mode:_0x3e5f[121],directory:_0x3e5f[122],sort:_0x3e5f[123],format:_0x3e5f[124],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x3e5f[4]](function(){console[_0x3e5f[6]](_0x3e5f[119])});models[_0x3e5f[128]][_0x3e5f[10]]({min_internal:1003,soundPath:_0x3e5f[127]})[_0x3e5f[4]](function(){console[_0x3e5f[6]](_0x3e5f[126])});models[_0x3e5f[140]][_0x3e5f[33]]([{id:1,name:_0x3e5f[129],model:JSON[_0x3e5f[139]]({title:_0x3e5f[129],rows:[{columns:[{styleClass:_0x3e5f[130],widgets:[{type:_0x3e5f[131],title:_0x3e5f[132],config:{timePattern:_0x3e5f[133],datePattern:_0x3e5f[134]}}]},{styleClass:_0x3e5f[135],widgets:[{type:_0x3e5f[136],title:_0x3e5f[137],config:{url:_0x3e5f[138]}}]}]}]}),defaultEntry:true,editable:false}],{ignoreDuplicates:true,individualHooks:true})[_0x3e5f[4]](function(){console[_0x3e5f[6]](_0x3e5f[119])});models[_0x3e5f[148]][_0x3e5f[33]]([{name:_0x3e5f[142],version:_0x3e5f[143],active:false,author:_0x3e5f[144],logo:_0x3e5f[145],state:_0x3e5f[146],description:_0x3e5f[147]}],{ignoreDuplicates:true,individualHooks:true})[_0x3e5f[4]](function(){console[_0x3e5f[6]](_0x3e5f[141])});models[_0x3e5f[151]][_0x3e5f[33]]([{id:1,tree:_0x3e5f[149]},{id:2,tree:_0x3e5f[150]}],{ignoreDuplicates:true,individualHooks:true})[_0x3e5f[4]](function(){console[_0x3e5f[6]](_0x3e5f[141])});models[_0x3e5f[153]][_0x3e5f[33]]([{id:1,name:_0x3e5f[152],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x3e5f[4]](function(){console[_0x3e5f[6]](_0x3e5f[141])}) \ No newline at end of file diff --git a/server/config/sms/index.js b/server/config/sms/index.js index 1ae4d25..90bd5aa 100644 --- a/server/config/sms/index.js +++ b/server/config/sms/index.js @@ -1,24 +1 @@ -'use strict'; -var SmsAccount = require('../../models').SmsAccount; -var Sms = require('./sms'); - -// var SmsMessage = require('../../models').SmsMessage; - -module.exports = function() { - - SmsAccount.afterCreate(function(doc) { - new Sms(doc); - }); - - return SmsAccount - .findAll() - .then(function(data) { - data.forEach(function(elm) { - new Sms(elm); - }); - }) - .catch(function(err) { - console.error(err); - }); - -} +var _0x5e1f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2F\x73\x6D\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"];_0x5e1f[0];var SmsAccount=require(_0x5e1f[2])[_0x5e1f[1]];var Sms=require(_0x5e1f[3]);module[_0x5e1f[4]]=function(){SmsAccount[_0x5e1f[5]](function(_0xa802x3){ new Sms(_0xa802x3)});return SmsAccount[_0x5e1f[10]]()[_0x5e1f[9]](function(_0xa802x5){_0xa802x5[_0x5e1f[8]](function(_0xa802x6){ new Sms(_0xa802x6)})})[_0x5e1f[7]](function(_0xa802x4){console[_0x5e1f[6]](_0xa802x4)})} \ No newline at end of file diff --git a/server/config/sms/skebby.js b/server/config/sms/skebby.js index 8dcc301..a4035b5 100644 --- a/server/config/sms/skebby.js +++ b/server/config/sms/skebby.js @@ -1,208 +1 @@ -// var qs = require('querystring'); -// var https = require('https'); - -var skebbyMessage = function(input, cb, cb_err) { - var text = input.text; - var sender_number = input.sender_number || ""; - var sender_string = input.sender_string || ""; - var method = input.method; - var lrecipients = input.recipients || []; - var username = input.username; - var password = input.password; - - if (!method) { - cb_err("No Method!"); - return; - } - - switch (method) { - case 'classic': - method = 'send_sms_classic'; - break; - case 'report': - method = 'send_sms_classic_report'; - break; - case 'basic': - default: - method = 'send_sms_basic'; - } - - var test = input.test || false; - - // Check params - if (lrecipients.length == 0) { - cb_err("No recipient!"); - return; - } - - if (!sender_string && !sender_number) { - cb_err("No sender!"); - return; - } - - if (!text) { - cb_err("No text!"); - return; - } - - var params = { - method: method, - username: username, - password: password, - "recipients[]": lrecipients, - text: text, - charset: "UTF-8", - }; - - if (sender_number) { - params.sender_number = sender_number; - } else if (sender_string) { - params.sender_string = sender_string; - } - - if (test) { - params.method = "test_" + params.method; - } - - var res_done = false; - var data = qs.stringify(params); - - var client = https.request({ - port: 443, - path: "/api/send/smseasy/advanced/http.php", - host: "gateway.skebby.it", - method: "POST", - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "Content-Length": data.length, - "Content-Encoding": "utf8", - } - }, function(res) { - var res_data = ""; - res.on('data', function(data) { - res_data += data; - }); - res.on("end", function() { - if (!res_done) { - var res_parsed = qs.parse(res_data); - if (res_parsed.status == "success") { - cb({ - data: res_parsed - }); - } else { - // ------------------------------------------------------------------ - // Check the complete documentation at http://www.skebby.com/business/index/send-docs/ - // ------------------------------------------------------------------ - // For eventual errors see http:#www.skebby.com/business/index/send-docs/#errorCodesSection - // WARNING: in case of error DON'T retry the sending, since they are blocking errors - // ------------------------------------------------------------------ - cb_err(res_parsed); - } - res_done = true; - } - }); - }); - - client.end(data); - client.on('error', function(e) { - if (!res_done) { - cb_err(e); - res_done = true; - } - }); -}; -var sendMessage = function(message, account) { - // return Skebby.sendMessage({ - // method: "classic", - // username: account.username, - // password: account.password, - // recipients: [ message.to], - // //recipients : ["393396803445","393395352490"], - // text: body: message.body, - // }, function(res) { - // console.log(res.data); - // }, function(err) { - // console.log(err); - // }) - var me = account.username; - return me; -} - - - -module.exports = sendMessage; - -// SMS CLASSIC dispatch -// send_sms_skebby({ -// method: "classic", -// username: "username", -// password: "password", -// recipients: ["393396803445"], -// //recipients : ["393396803445","393395352490"], -// text: "Hi Mike, how are you?2", -// }, function(res) { -// console.log(res.data); -// }, function(err) { -// console.log(err); -// }); - -/* -// SMS Basic dispatch -send_sms_skebby( { - method : "basic", - username : "username", - password : "password", - recipients : ["393396803445"], - //recipients : ["393396803445","393395352490"], - text : "Hi Mike, how are you? By John", -},function(res){ - console.log(res.data); -},function(err){ - console.log(err); -}); - -// SMS CLASSIC dispatch with custom numeric sender -send_sms_skebby( { - method : "classic", - username : "username", - password : "password", - sender_number : "393471234567", - recipients : ["393396803445"], - //recipients : ["393396803445","393395352490"], - text : "Hi Mike, how are you?", -},function(res){ - console.log(res.data); -},function(err){ - console.log(err); -}); - -// SMS CLASSIC PLUS dispatch (with delivery report) with custom alphanumeric sender -send_sms_skebby( { - method : "report", - username : "username", - password : "password", - sender_string : "John", - recipients : ["393396803445"], - //recipients : ["393396803445","393395352490"], - text : "Hi Mike, how are you?", -},function(res){ - console.log(res.data); -},function(err){ - console.log(err); -}); - -// SMS CLASSIC PLUS dispatch (with delivery report) with custom numeric sender -send_sms_skebby( { - method : "report", - username : "username", - password : "password", - sender_number : "393471234567", - recipients : ["393396803445"], - //recipients : ["393396803445","393395352490"], - text : "Hi Mike, how are you?", -},function(res){ - console.log(res.data); -},function(err){ - console.log(err); -}); -*/ +var _0xe968=["\x74\x65\x78\x74","\x73\x65\x6E\x64\x65\x72\x5F\x6E\x75\x6D\x62\x65\x72","","\x73\x65\x6E\x64\x65\x72\x5F\x73\x74\x72\x69\x6E\x67","\x6D\x65\x74\x68\x6F\x64","\x72\x65\x63\x69\x70\x69\x65\x6E\x74\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x4E\x6F\x20\x4D\x65\x74\x68\x6F\x64\x21","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x63\x6C\x61\x73\x73\x69\x63","\x63\x6C\x61\x73\x73\x69\x63","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x63\x6C\x61\x73\x73\x69\x63\x5F\x72\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74","\x62\x61\x73\x69\x63","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x62\x61\x73\x69\x63","\x74\x65\x73\x74","\x6C\x65\x6E\x67\x74\x68","\x4E\x6F\x20\x72\x65\x63\x69\x70\x69\x65\x6E\x74\x21","\x4E\x6F\x20\x73\x65\x6E\x64\x65\x72\x21","\x4E\x6F\x20\x74\x65\x78\x74\x21","\x55\x54\x46\x2D\x38","\x74\x65\x73\x74\x5F","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x2F\x61\x70\x69\x2F\x73\x65\x6E\x64\x2F\x73\x6D\x73\x65\x61\x73\x79\x2F\x61\x64\x76\x61\x6E\x63\x65\x64\x2F\x68\x74\x74\x70\x2E\x70\x68\x70","\x67\x61\x74\x65\x77\x61\x79\x2E\x73\x6B\x65\x62\x62\x79\x2E\x69\x74","\x50\x4F\x53\x54","\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","\x75\x74\x66\x38","\x64\x61\x74\x61","\x6F\x6E","\x65\x6E\x64","\x70\x61\x72\x73\x65","\x73\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x72\x65\x71\x75\x65\x73\x74","\x65\x72\x72\x6F\x72","\x65\x78\x70\x6F\x72\x74\x73"];var skebbyMessage=function(_0x1bb5x2,_0x1bb5x3,_0x1bb5x4){var _0x1bb5x5=_0x1bb5x2[_0xe968[0]];var _0x1bb5x6=_0x1bb5x2[_0xe968[1]]||_0xe968[2];var _0x1bb5x7=_0x1bb5x2[_0xe968[3]]||_0xe968[2];var _0x1bb5x8=_0x1bb5x2[_0xe968[4]];var _0x1bb5x9=_0x1bb5x2[_0xe968[5]]||[];var _0x1bb5xa=_0x1bb5x2[_0xe968[6]];var _0x1bb5xb=_0x1bb5x2[_0xe968[7]];if(!_0x1bb5x8){_0x1bb5x4(_0xe968[8]);return};switch(_0x1bb5x8){case _0xe968[10]:_0x1bb5x8=_0xe968[9];break;case _0xe968[12]:_0x1bb5x8=_0xe968[11];break;case _0xe968[13]:;default:_0x1bb5x8=_0xe968[14]};var _0x1bb5xc=_0x1bb5x2[_0xe968[15]]||false;if(_0x1bb5x9[_0xe968[16]]==0){_0x1bb5x4(_0xe968[17]);return};if(!_0x1bb5x7&& !_0x1bb5x6){_0x1bb5x4(_0xe968[18]);return};if(!_0x1bb5x5){_0x1bb5x4(_0xe968[19]);return};var _0x1bb5xd={method:_0x1bb5x8,username:_0x1bb5xa,password:_0x1bb5xb,"\x72\x65\x63\x69\x70\x69\x65\x6E\x74\x73\x5B\x5D":_0x1bb5x9,text:_0x1bb5x5,charset:_0xe968[20]};if(_0x1bb5x6){_0x1bb5xd[_0xe968[1]]=_0x1bb5x6}else {if(_0x1bb5x7){_0x1bb5xd[_0xe968[3]]=_0x1bb5x7}};if(_0x1bb5xc){_0x1bb5xd[_0xe968[4]]=_0xe968[21]+_0x1bb5xd[_0xe968[4]]};var _0x1bb5xe=false;var _0x1bb5xf=qs[_0xe968[22]](_0x1bb5xd);var _0x1bb5x10=https[_0xe968[34]]({port:443,path:_0xe968[23],host:_0xe968[24],method:_0xe968[25],headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xe968[26],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68":_0x1bb5xf[_0xe968[16]],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67":_0xe968[27]}},function(_0x1bb5x11){var _0x1bb5x12=_0xe968[2];_0x1bb5x11[_0xe968[29]](_0xe968[28],function(_0x1bb5xf){_0x1bb5x12+=_0x1bb5xf});_0x1bb5x11[_0xe968[29]](_0xe968[30],function(){if(!_0x1bb5xe){var _0x1bb5x13=qs[_0xe968[31]](_0x1bb5x12);if(_0x1bb5x13[_0xe968[32]]==_0xe968[33]){_0x1bb5x3({data:_0x1bb5x13})}else {_0x1bb5x4(_0x1bb5x13)};_0x1bb5xe=true}})});_0x1bb5x10[_0xe968[30]](_0x1bb5xf);_0x1bb5x10[_0xe968[29]](_0xe968[35],function(_0x1bb5x14){if(!_0x1bb5xe){_0x1bb5x4(_0x1bb5x14);_0x1bb5xe=true}})};var sendMessage=function(_0x1bb5x16,_0x1bb5x17){var _0x1bb5x18=_0x1bb5x17[_0xe968[6]];return _0x1bb5x18};module[_0xe968[36]]=sendMessage \ No newline at end of file diff --git a/server/config/sms/sms.js b/server/config/sms/sms.js index 165d600..53c92be 100644 --- a/server/config/sms/sms.js +++ b/server/config/sms/sms.js @@ -1,159 +1 @@ -'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 Agent = require('../../models').User; -// var Contact = require('../../models').Contact; -var SmsRoom = require('../../models').SmsRoom; -var SmsMessage = require('../../models').SmsMessage; -// var ContactEmail = require('../../models').ContactEmail; -var SmsAccount = require('../../models').SmsAccount; -// var Skebby = require('./skebby'); -// var Twillio = require('twilio'); -// var path = require('path'); -// var fs = require('fs'); - -function Sms(doc) { - - var _sms; - var _doc; - - function onSave(doc) { - console.log("SMS - Account " + doc.username + " SMS CREATE"); - _doc = doc; - } - - - function onSend(smsMessage, options) { - var _mRoom; - var _mMessage = smsMessage; - console.log(smsMessage); - console.log(_doc.id, _mMessage.SmsAccountId, smsMessage.dataValues.SmsAccountId, - _doc.phone, smsMessage.dataValues.from); - // if (smsMessage.method === 'OUT' && _doc.id === smsMessage.dataValues.SmsAccountId) { - if (smsMessage.method === 'OUT' && _doc.phone === smsMessage.dataValues.from) { - - console.log(1); - - return SmsRoom - .findOrCreate({ - where: { - from: _mMessage.to, - SmsAccountId: _mMessage.SmsAccountId - }, - defaults: { - status: 'OPEN' - } - }) - .spread(function(smsRoom) { - console.log(2); - _mRoom = smsRoom; - return _mRoom - .addSmsMessage(_mMessage); - }) - .then(function() { - console.log(3); - - return _mRoom - // .addUser(_mMessage.UserId); - .update({ - UserId: _mMessage.UserId - }); - }) - .then(function() { - console.log(4); - var res = '++++++++++++'; - // var a = './' + _doc.type; - // console.log(a); - // var info = path.parse(integration.path); - // var file = path.join('./', _doc.type); - // if (fs.existsSync('./' + _doc.type)) { - // console.log('exists'); - // // require(file)(io, ami); - // } else { - // console.log('dont exists'); - // } - // var res = require('./twilio')(_mMessage, _doc); - console.log(res); - return res; - - }) - .then(function(info) { - - console.log('info', info); - return _mMessage - .update({ - status: 'SENT' - }); - }) - .catch(function(err) { - console.error('err', err); - throw { - message: err.message || err.response || 'Internal Server Error' - }; - }); - } else if (smsMessage.method === 'IN' && _doc.phone === smsMessage.dataValues.to) { - console.log(1); - - return SmsRoom - .findOrCreate({ - where: { - from: _mMessage.from, - SmsAccountId: _mMessage.SmsAccountId - }, - defaults: { - status: 'OPEN', - } - }) - .spread(function(smsRoom) { - console.log(2); - _mRoom = smsRoom; - return _mRoom - .addSmsMessage(_mMessage); - }) - .then(function() { - console.log(3); - - return _mRoom - .update({ - UserId: _mMessage.UserId - }); - }) - .then(function() { - console.log(4); - return 'IN'; - }) - .then(function(info) { - - console.log('info', info); - return _mMessage - .update({ - status: 'RECEIVED' - }); - }) - .catch(function(err) { - console.error('err', err); - throw { - message: err.message || err.response || 'Internal Server Error' - }; - }); - } - - // } - } - - onSave(doc); - - // HANDLE SEND SMS - SmsMessage.afterCreate(function(doc, options) { - return onSend(doc, options); - }); - - return {}; -} - -module.exports = Sms; +var _0x8e8a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x53\x4D\x53\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x20\x53\x4D\x53\x20\x43\x52\x45\x41\x54\x45","\x6C\x6F\x67","\x69\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x70\x68\x6F\x6E\x65","\x66\x72\x6F\x6D","\x6D\x65\x74\x68\x6F\x64","\x4F\x55\x54","\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","\x69\x6E\x66\x6F","\x53\x45\x4E\x54","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x2B\x2B\x2B\x2B\x2B\x2B\x2B\x2B\x2B\x2B\x2B\x2B","\x55\x73\x65\x72\x49\x64","\x61\x64\x64\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x73\x70\x72\x65\x61\x64","\x74\x6F","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x4F\x50\x45\x4E","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x49\x4E","\x52\x45\x43\x45\x49\x56\x45\x44","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8e8a[0];var _=require(_0x8e8a[1]);var Promise=require(_0x8e8a[2]);var Agent=require(_0x8e8a[4])[_0x8e8a[3]];var SmsRoom=require(_0x8e8a[4])[_0x8e8a[5]];var SmsMessage=require(_0x8e8a[4])[_0x8e8a[6]];var SmsAccount=require(_0x8e8a[4])[_0x8e8a[7]];function Sms(_0xc4dcx8){var _0xc4dcx9;var _0xc4dcxa;function _0xc4dcxb(_0xc4dcx8){console[_0x8e8a[11]](_0x8e8a[8]+_0xc4dcx8[_0x8e8a[9]]+_0x8e8a[10]);_0xc4dcxa=_0xc4dcx8}function _0xc4dcxc(_0xc4dcxd,_0xc4dcxe){var _0xc4dcxf;var _0xc4dcx10=_0xc4dcxd;console[_0x8e8a[11]](_0xc4dcxd);console[_0x8e8a[11]](_0xc4dcxa[_0x8e8a[12]],_0xc4dcx10.SmsAccountId,_0xc4dcxd[_0x8e8a[13]].SmsAccountId,_0xc4dcxa[_0x8e8a[14]],_0xc4dcxd[_0x8e8a[13]][_0x8e8a[15]]);if(_0xc4dcxd[_0x8e8a[16]]===_0x8e8a[17]&&_0xc4dcxa[_0x8e8a[14]]===_0xc4dcxd[_0x8e8a[13]][_0x8e8a[15]]){console[_0x8e8a[11]](1);return SmsRoom[_0x8e8a[35]]({where:{from:_0xc4dcx10[_0x8e8a[32]],SmsAccountId:_0xc4dcx10[_0x8e8a[33]]},defaults:{status:_0x8e8a[34]}})[_0x8e8a[31]](function(_0xc4dcx14){console[_0x8e8a[11]](2);_0xc4dcxf=_0xc4dcx14;return _0xc4dcxf[_0x8e8a[30]](_0xc4dcx10)})[_0x8e8a[27]](function(){console[_0x8e8a[11]](3);return _0xc4dcxf[_0x8e8a[26]]({UserId:_0xc4dcx10[_0x8e8a[29]]})})[_0x8e8a[27]](function(){console[_0x8e8a[11]](4);var _0xc4dcx13=_0x8e8a[28];console[_0x8e8a[11]](_0xc4dcx13);return _0xc4dcx13})[_0x8e8a[27]](function(_0xc4dcx12){console[_0x8e8a[11]](_0x8e8a[24],_0xc4dcx12);return _0xc4dcx10[_0x8e8a[26]]({status:_0x8e8a[25]})})[_0x8e8a[23]](function(_0xc4dcx11){console[_0x8e8a[19]](_0x8e8a[18],_0xc4dcx11);throw {message:_0xc4dcx11[_0x8e8a[20]]||_0xc4dcx11[_0x8e8a[21]]||_0x8e8a[22]}})}else {if(_0xc4dcxd[_0x8e8a[16]]===_0x8e8a[36]&&_0xc4dcxa[_0x8e8a[14]]===_0xc4dcxd[_0x8e8a[13]][_0x8e8a[32]]){console[_0x8e8a[11]](1);return SmsRoom[_0x8e8a[35]]({where:{from:_0xc4dcx10[_0x8e8a[15]],SmsAccountId:_0xc4dcx10[_0x8e8a[33]]},defaults:{status:_0x8e8a[34]}})[_0x8e8a[31]](function(_0xc4dcx14){console[_0x8e8a[11]](2);_0xc4dcxf=_0xc4dcx14;return _0xc4dcxf[_0x8e8a[30]](_0xc4dcx10)})[_0x8e8a[27]](function(){console[_0x8e8a[11]](3);return _0xc4dcxf[_0x8e8a[26]]({UserId:_0xc4dcx10[_0x8e8a[29]]})})[_0x8e8a[27]](function(){console[_0x8e8a[11]](4);return _0x8e8a[36]})[_0x8e8a[27]](function(_0xc4dcx12){console[_0x8e8a[11]](_0x8e8a[24],_0xc4dcx12);return _0xc4dcx10[_0x8e8a[26]]({status:_0x8e8a[37]})})[_0x8e8a[23]](function(_0xc4dcx11){console[_0x8e8a[19]](_0x8e8a[18],_0xc4dcx11);throw {message:_0xc4dcx11[_0x8e8a[20]]||_0xc4dcx11[_0x8e8a[21]]||_0x8e8a[22]}})}}}_0xc4dcxb(_0xc4dcx8);SmsMessage[_0x8e8a[38]](function(_0xc4dcx8,_0xc4dcxe){return _0xc4dcxc(_0xc4dcx8,_0xc4dcxe)});return {}}module[_0x8e8a[39]]=Sms \ No newline at end of file diff --git a/server/config/sms/twilio.js b/server/config/sms/twilio.js index f9aa106..00a6a64 100644 --- a/server/config/sms/twilio.js +++ b/server/config/sms/twilio.js @@ -1,35 +1 @@ -'use strict'; -// var twilio = require('./twilio'); - -var SmsMessage = require('../../models').SmsMessage; - - -var sendMessage = function(message, account) { - // var client = twillio(account.sid, account.token); - // Send an SMS text message - // return client.s7endMessage({ - // - // to: message.to, // Any number Twilio can deliver to - // from: '+'+ message.from, // A number you bought from Twilio and can use for outbound communication - // body: message.body, // body of the SMS message - // statusCallback : '/api/sms/messages/message.id' - // - // }, function(err, responseData) { //this function is executed when a response is received from Twilio - // - // if (!err) { // "err" is an error received during the request, if any - // console.log(responseData); - // return SmsMessage - // .update({ - // status: 'SENT' - // }); - - // // "responseData" is a JavaScript object containing data received from Twilio. - // } - // }); - var me = account.sid; - return 'me'; -} - - - -module.exports = sendMessage; +var _0x6685=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x69\x64","\x6D\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6685[0];var SmsMessage=require(_0x6685[2])[_0x6685[1]];var sendMessage=function(_0xbef1x3,_0xbef1x4){var _0xbef1x5=_0xbef1x4[_0x6685[3]];return _0x6685[4]};module[_0x6685[5]]=sendMessage \ No newline at end of file diff --git a/server/config/smtp/index.js b/server/config/smtp/index.js index c0f02c5..7d5067c 100644 --- a/server/config/smtp/index.js +++ b/server/config/smtp/index.js @@ -1,23 +1 @@ -'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); - }); -} +var _0x4fb0=["\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","\x69\x6E\x69\x74","\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"];_0x4fb0[0];var MailServerOut=require(_0x4fb0[2])[_0x4fb0[1]];var Smtp=require(_0x4fb0[3]);module[_0x4fb0[4]]=function(){MailServerOut[_0x4fb0[6]](function(_0x1567x3){var _0x1567x4= new Smtp();_0x1567x4[_0x4fb0[5]](_0x1567x3)});return MailServerOut[_0x4fb0[11]]()[_0x4fb0[10]](function(_0x1567x6){_0x1567x6[_0x4fb0[9]](function(_0x1567x3){var _0x1567x4= new Smtp();_0x1567x4[_0x4fb0[5]](_0x1567x3)})})[_0x4fb0[8]](function(_0x1567x5){console[_0x4fb0[7]](_0x1567x5)})} \ No newline at end of file diff --git a/server/config/smtp/smtp.js b/server/config/smtp/smtp.js index a75b6c8..8a3296b 100644 --- a/server/config/smtp/smtp.js +++ b/server/config/smtp/smtp.js @@ -1,267 +1 @@ -'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; +var _0x2cbe=["\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","\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\x41\x63\x63\x6F\x75\x6E\x74","\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","\x53\x6D\x74\x70\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x73\x6D\x74\x70","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6F\x6E\x53\x61\x76\x65","\x69\x64","\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x49\x64","\x6F\x6E\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x6F\x6E\x52\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x66\x72\x6F\x6D","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6F\x6E\x53\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x4D\x41\x49\x4C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x20\x53\x4D\x54\x50\x20\x43\x52\x45\x41\x54\x45","\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","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x73\x74\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\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","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x45\x52\x52\x4F\x52","\x65\x72\x72\x6E\x6F","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x46\x41\x49\x4C\x45\x44","\x63\x61\x74\x63\x68","\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x53\x45\x4E\x54","\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","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x73\x70\x72\x65\x61\x64","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x3B","\x6A\x6F\x69\x6E","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2cbe[0];var _=require(_0x2cbe[1]);var Promise=require(_0x2cbe[2]);var nodemailer=require(_0x2cbe[3]);var htmlToText=require(_0x2cbe[4]);var smtpTransport=require(_0x2cbe[5]);var sequelize=require(_0x2cbe[7])[_0x2cbe[6]];var Agent=require(_0x2cbe[7])[_0x2cbe[8]];var Contact=require(_0x2cbe[7])[_0x2cbe[9]];var MailRoom=require(_0x2cbe[7])[_0x2cbe[10]];var MailAccount=require(_0x2cbe[7])[_0x2cbe[11]];var MailMessage=require(_0x2cbe[7])[_0x2cbe[12]];var ContactEmail=require(_0x2cbe[7])[_0x2cbe[13]];var MailServerOut=require(_0x2cbe[7])[_0x2cbe[14]];function Smtp(){console[_0x2cbe[16]](_0x2cbe[15]);this[_0x2cbe[17]]=null}Smtp[_0x2cbe[19]][_0x2cbe[18]]=function(_0x9605xf){var _0x9605x10=this;_0x9605x10[_0x2cbe[20]](_0x9605xf);MailServerOut[_0x2cbe[24]](function(_0x9605xf){if(_0x9605x10[_0x2cbe[17]]&&_0x9605xf[_0x2cbe[21]]===_0x9605x10[_0x2cbe[17]][_0x2cbe[22]]){_0x9605x10[_0x2cbe[23]](_0x9605xf)}});MailServerOut[_0x2cbe[26]](function(_0x9605xf){if(_0x9605x10[_0x2cbe[17]]&&_0x9605xf[_0x2cbe[21]]===_0x9605x10[_0x2cbe[17]][_0x2cbe[22]]){_0x9605x10[_0x2cbe[25]](_0x9605xf)}});MailMessage[_0x2cbe[31]](function(_0x9605xf){if(_0x9605x10[_0x2cbe[17]]&&_0x9605x10[_0x2cbe[17]][_0x2cbe[27]]===_0x9605xf[_0x2cbe[29]][_0x2cbe[28]]){_0x9605x10[_0x2cbe[30]](_0x9605xf)}})};Smtp[_0x2cbe[19]][_0x2cbe[20]]=function(_0x9605xf){console[_0x2cbe[16]](_0x2cbe[32]+_0x9605xf[_0x2cbe[27]]+_0x2cbe[33]);this[_0x2cbe[17]]=nodemailer[_0x2cbe[38]](smtpTransport({host:_0x9605xf[_0x2cbe[34]],port:_0x9605xf[_0x2cbe[35]],secure:_0x9605xf[_0x2cbe[36]],debug:true,auth:{user:_0x9605xf[_0x2cbe[27]],pass:_0x9605xf[_0x2cbe[37]]}}));this[_0x2cbe[17]][_0x2cbe[39]]=_0x9605xf[_0x2cbe[40]];this[_0x2cbe[17]][_0x2cbe[22]]=_0x9605xf[_0x2cbe[21]];this[_0x2cbe[17]][_0x2cbe[27]]=_0x9605xf[_0x2cbe[27]]};Smtp[_0x2cbe[19]][_0x2cbe[23]]=function(_0x9605xf){if(!_0x9605xf[_0x2cbe[42]](_0x2cbe[41])){console[_0x2cbe[16]](_0x2cbe[32]+_0x9605xf[_0x2cbe[27]]+_0x2cbe[43]);this[_0x2cbe[17]]=null;this[_0x2cbe[17]]=nodemailer[_0x2cbe[38]](smtpTransport({host:_0x9605xf[_0x2cbe[34]],port:_0x9605xf[_0x2cbe[35]],secure:_0x9605xf[_0x2cbe[36]],debug:true,auth:{user:_0x9605xf[_0x2cbe[27]],pass:_0x9605xf[_0x2cbe[37]]}}));this[_0x2cbe[17]][_0x2cbe[39]]=_0x9605xf[_0x2cbe[40]];this[_0x2cbe[17]][_0x2cbe[22]]=_0x9605xf[_0x2cbe[21]];this[_0x2cbe[17]][_0x2cbe[27]]=_0x9605xf[_0x2cbe[27]]}};Smtp[_0x2cbe[19]][_0x2cbe[25]]=function(_0x9605xf){console[_0x2cbe[16]](_0x2cbe[44]+_0x9605xf[_0x2cbe[27]]+_0x2cbe[45]);this[_0x2cbe[17]]=null};Smtp[_0x2cbe[19]][_0x2cbe[30]]=function(_0x9605x11){var _0x9605x10=this;if(_0x9605x11[_0x2cbe[46]]===_0x2cbe[47]){var _0x9605x12;var _0x9605x13=_0x9605x11;var _0x9605x14,_0x9605x15,_0x9605x16,_0x9605x17;if(_0x9605x13[_0x2cbe[48]]){return MailMessage[_0x2cbe[72]]({where:{messageId:_0x9605x13[_0x2cbe[48]]}})[_0x2cbe[52]](function(_0x9605x1d){return _0x9605x1d[_0x2cbe[71]]({include:{model:MailAccount}})})[_0x2cbe[52]](function(_0x9605x1c){_0x9605x12=_0x9605x1c;return _0x9605x12[_0x2cbe[70]](_0x9605x13)})[_0x2cbe[52]](function(){return _0x9605x12[_0x2cbe[69]](_0x9605x13.UserId)})[_0x2cbe[52]](function(){var _0x9605x1a={status:_0x9605x13[_0x2cbe[46]],from:_0x9605x13[_0x2cbe[28]],to:_0x9605x13[_0x2cbe[58]],cc:_0x9605x13[_0x2cbe[59]],subject:_0x9605x13[_0x2cbe[60]],html:_0x9605x13[_0x2cbe[61]],text:_0x9605x13[_0x2cbe[61]]?htmlToText[_0x2cbe[62]](_0x9605x13[_0x2cbe[61]],{wordwrap:false}):null};if(_0x9605x13[_0x2cbe[63]]){_0x9605x1a[_0x2cbe[64]]=_[_0x2cbe[67]](_0x9605x13.MailAttachments,function(_0x9605x1b){return {path:_0x9605x1b[_0x2cbe[65]],filename:_0x9605x1b[_0x2cbe[66]]}})};return _0x9605x10[_0x2cbe[17]][_0x2cbe[68]](_0x9605x1a)})[_0x2cbe[52]](function(_0x9605x19){return _0x9605x13[_0x2cbe[51]]({messageId:_0x9605x19[_0x2cbe[56]],status:_0x2cbe[57]})[_0x2cbe[52]](function(){return MailServerOut[_0x2cbe[51]]({state:_0x2cbe[55]},{where:{MailAccountId:_0x9605x12[_0x2cbe[40]]}})})})[_0x2cbe[54]](function(_0x9605x18){return _0x9605x13[_0x2cbe[51]]({status:_0x2cbe[53]})[_0x2cbe[52]](function(){return MailServerOut[_0x2cbe[51]]({state:_0x2cbe[49],source:_0x9605x18[_0x2cbe[50]]},{where:{MailAccountId:_0x9605x12[_0x2cbe[40]]}})})})}else {return MailRoom[_0x2cbe[79]]({where:{id:_0x9605x13[_0x2cbe[76]]},defaults:{subject:_0x9605x13[_0x2cbe[60]],from:_0x9605x13[_0x2cbe[28]][_0x2cbe[78]](_0x2cbe[77]),MailAccountId:_0x9605x10[_0x2cbe[17]][_0x2cbe[39]]},include:{model:MailAccount}})[_0x2cbe[75]](function(_0x9605x1c){_0x9605x12=_0x9605x1c;return _0x9605x12[_0x2cbe[70]](_0x9605x13[_0x2cbe[21]])})[_0x2cbe[52]](function(){return _0x9605x12[_0x2cbe[69]](_0x9605x13.UserId)})[_0x2cbe[52]](function(){var _0x9605x1a={status:_0x9605x13[_0x2cbe[46]],from:_0x9605x13[_0x2cbe[28]],to:_0x9605x13[_0x2cbe[58]],cc:_0x9605x13[_0x2cbe[59]],subject:_0x9605x13[_0x2cbe[60]],html:_0x9605x13[_0x2cbe[61]],text:_0x9605x13[_0x2cbe[61]]?htmlToText[_0x2cbe[62]](_0x9605x13[_0x2cbe[61]],{wordwrap:false}):null};if(_0x9605x13[_0x2cbe[63]]){_0x9605x1a[_0x2cbe[64]]=_[_0x2cbe[67]](_0x9605x13.MailAttachments,function(_0x9605x1b){return {path:_0x9605x1b[_0x2cbe[65]],filename:_0x9605x1b[_0x2cbe[66]]}})};return _0x9605x10[_0x2cbe[17]][_0x2cbe[68]](_0x9605x1a)})[_0x2cbe[52]](function(_0x9605x19){return _0x9605x13[_0x2cbe[51]]({messageId:_0x9605x19[_0x2cbe[56]],status:_0x2cbe[57]})[_0x2cbe[52]](function(){return MailServerOut[_0x2cbe[51]]({state:_0x2cbe[55]},{where:{MailAccountId:_0x9605x12[_0x2cbe[40]]}})})})[_0x2cbe[54]](function(_0x9605x18){console[_0x2cbe[74]](_0x2cbe[73],_0x9605x18);return _0x9605x13[_0x2cbe[51]]({status:_0x2cbe[53]})[_0x2cbe[52]](function(){return MailServerOut[_0x2cbe[51]]({state:_0x2cbe[49],source:_0x9605x18[_0x2cbe[50]]},{where:{MailAccountId:_0x9605x12[_0x2cbe[40]]}})})})}}};module[_0x2cbe[80]]=Smtp \ No newline at end of file diff --git a/server/config/socketio.js b/server/config/socketio.js index e3c34f7..8361859 100644 --- a/server/config/socketio.js +++ b/server/config/socketio.js @@ -1,207 +1 @@ -/** - * 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_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); - - //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/canned_answer/canned_answer.socket').register(socket); - require('../api/chanspy/chanspy.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_proactive_action/chat_proactive_action.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/chat_websites_field/chat_websites_field.socket').register(socket); - require('../api/company/company.socket').register(socket); - require('../api/contact_manager/contact_manager.socket').register(socket); - require('../api/custom_report/custom_report.socket').register(socket); - require('../api/dashboard/dashboard.socket').register(socket); - require('../api/default_report/default_report.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/extracted_report/extracted_report.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/jscripty_project/jscripty_project.socket').register(socket); - require('../api/license/license.socket').register(socket); - require('../api/list/list.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/metric/metric.socket').register(socket); - require('../api/module/module.socket').register(socket); - require('../api/motionbar/motionbar.socket').register(socket); - require('../api/report_agent/report_agent.socket').register(socket); - require('../api/report_call/report_call.socket').register(socket); - require('../api/report_chat/report_chat.socket').register(socket); - require('../api/report_chat_room/report_chat_room.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/report_tree/report_tree.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/sms_account/sms_account.socket').register(socket); - require('../api/sms_application/sms_application.socket').register(socket); - require('../api/sms_message/sms_message.socket').register(socket); - require('../api/sms_queue/sms_queue.socket').register(socket); - require('../api/sms_room/sms_room.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_list/user_has_list.socket').register(socket); - require('../api/variable/variable.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/voice_recording/voice_recording.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); - }); -}; +var _0x2714=["\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\x6C\x69\x73\x74\x2F\x6C\x69\x73\x74\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\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\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\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\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\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\x72\x6F\x6F\x6D\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\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\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\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\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x73\x6D\x73\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\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x2F\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\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\x6C\x69\x73\x74\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\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\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\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\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"];_0x2714[0];var moment=require(_0x2714[1]);var config=require(_0x2714[2]);var User=require(_0x2714[4])[_0x2714[3]];function onDisconnect(_0x7ff2x5){if(_0x7ff2x5[_0x2714[5]]){return User[_0x2714[14]](_0x7ff2x5[_0x2714[5]])[_0x2714[11]](function(_0x7ff2x7){if(!_0x7ff2x7){throw new Error(_0x2714[12])};return _0x7ff2x7[_0x2714[13]]({online:false})})[_0x2714[11]](function(_0x7ff2x7){console[_0x2714[10]](_0x2714[8],_0x7ff2x7[_0x2714[9]])})[_0x2714[7]](function(_0x7ff2x6){console[_0x2714[6]](_0x7ff2x6)})}else {console[_0x2714[10]](_0x2714[12])}}function onConnect(_0x7ff2x5){if(_0x7ff2x5[_0x2714[5]]){return User[_0x2714[14]](_0x7ff2x5[_0x2714[5]])[_0x2714[11]](function(_0x7ff2x7){if(!_0x7ff2x7){throw new Error(_0x2714[12])};return _0x7ff2x7[_0x2714[13]]({online:true,lastLoginAt:moment()[_0x2714[117]](_0x2714[116])})})[_0x2714[11]](function(_0x7ff2x7){console[_0x2714[10]](_0x2714[15],_0x7ff2x7[_0x2714[9]]);if(_0x7ff2x7[_0x2714[16]]!==_0x2714[17]){require(_0x2714[19])[_0x2714[18]](_0x7ff2x5)};require(_0x2714[20])[_0x2714[18]](_0x7ff2x5);require(_0x2714[21])[_0x2714[18]](_0x7ff2x5);require(_0x2714[22])[_0x2714[18]](_0x7ff2x5);require(_0x2714[23])[_0x2714[18]](_0x7ff2x5);require(_0x2714[24])[_0x2714[18]](_0x7ff2x5);require(_0x2714[25])[_0x2714[18]](_0x7ff2x5);require(_0x2714[26])[_0x2714[18]](_0x7ff2x5);require(_0x2714[27])[_0x2714[18]](_0x7ff2x5);require(_0x2714[28])[_0x2714[18]](_0x7ff2x5);require(_0x2714[29])[_0x2714[18]](_0x7ff2x5);require(_0x2714[30])[_0x2714[18]](_0x7ff2x5);require(_0x2714[31])[_0x2714[18]](_0x7ff2x5);require(_0x2714[32])[_0x2714[18]](_0x7ff2x5);require(_0x2714[33])[_0x2714[18]](_0x7ff2x5);require(_0x2714[34])[_0x2714[18]](_0x7ff2x5);require(_0x2714[35])[_0x2714[18]](_0x7ff2x5);require(_0x2714[36])[_0x2714[18]](_0x7ff2x5);require(_0x2714[37])[_0x2714[18]](_0x7ff2x5);require(_0x2714[38])[_0x2714[18]](_0x7ff2x5);require(_0x2714[39])[_0x2714[18]](_0x7ff2x5);require(_0x2714[40])[_0x2714[18]](_0x7ff2x5);require(_0x2714[41])[_0x2714[18]](_0x7ff2x5);require(_0x2714[42])[_0x2714[18]](_0x7ff2x5);require(_0x2714[43])[_0x2714[18]](_0x7ff2x5);require(_0x2714[44])[_0x2714[18]](_0x7ff2x5);require(_0x2714[45])[_0x2714[18]](_0x7ff2x5);require(_0x2714[46])[_0x2714[18]](_0x7ff2x5);require(_0x2714[47])[_0x2714[18]](_0x7ff2x5);require(_0x2714[48])[_0x2714[18]](_0x7ff2x5);require(_0x2714[49])[_0x2714[18]](_0x7ff2x5);require(_0x2714[50])[_0x2714[18]](_0x7ff2x5);require(_0x2714[51])[_0x2714[18]](_0x7ff2x5);require(_0x2714[52])[_0x2714[18]](_0x7ff2x5);require(_0x2714[53])[_0x2714[18]](_0x7ff2x5);require(_0x2714[54])[_0x2714[18]](_0x7ff2x5);require(_0x2714[55])[_0x2714[18]](_0x7ff2x5);require(_0x2714[56])[_0x2714[18]](_0x7ff2x5);require(_0x2714[57])[_0x2714[18]](_0x7ff2x5);require(_0x2714[58])[_0x2714[18]](_0x7ff2x5);require(_0x2714[59])[_0x2714[18]](_0x7ff2x5);require(_0x2714[60])[_0x2714[18]](_0x7ff2x5);require(_0x2714[61])[_0x2714[18]](_0x7ff2x5);require(_0x2714[62])[_0x2714[18]](_0x7ff2x5);require(_0x2714[63])[_0x2714[18]](_0x7ff2x5);require(_0x2714[64])[_0x2714[18]](_0x7ff2x5);require(_0x2714[65])[_0x2714[18]](_0x7ff2x5);require(_0x2714[66])[_0x2714[18]](_0x7ff2x5);require(_0x2714[67])[_0x2714[18]](_0x7ff2x5);require(_0x2714[68])[_0x2714[18]](_0x7ff2x5);require(_0x2714[69])[_0x2714[18]](_0x7ff2x5);require(_0x2714[70])[_0x2714[18]](_0x7ff2x5);require(_0x2714[71])[_0x2714[18]](_0x7ff2x5);require(_0x2714[72])[_0x2714[18]](_0x7ff2x5);require(_0x2714[73])[_0x2714[18]](_0x7ff2x5);require(_0x2714[74])[_0x2714[18]](_0x7ff2x5);require(_0x2714[75])[_0x2714[18]](_0x7ff2x5);require(_0x2714[76])[_0x2714[18]](_0x7ff2x5);require(_0x2714[77])[_0x2714[18]](_0x7ff2x5);require(_0x2714[78])[_0x2714[18]](_0x7ff2x5);require(_0x2714[79])[_0x2714[18]](_0x7ff2x5);require(_0x2714[80])[_0x2714[18]](_0x7ff2x5);require(_0x2714[81])[_0x2714[18]](_0x7ff2x5);require(_0x2714[82])[_0x2714[18]](_0x7ff2x5);require(_0x2714[83])[_0x2714[18]](_0x7ff2x5);require(_0x2714[84])[_0x2714[18]](_0x7ff2x5);require(_0x2714[85])[_0x2714[18]](_0x7ff2x5);require(_0x2714[86])[_0x2714[18]](_0x7ff2x5);require(_0x2714[87])[_0x2714[18]](_0x7ff2x5);require(_0x2714[88])[_0x2714[18]](_0x7ff2x5);require(_0x2714[89])[_0x2714[18]](_0x7ff2x5);require(_0x2714[90])[_0x2714[18]](_0x7ff2x5);require(_0x2714[91])[_0x2714[18]](_0x7ff2x5);require(_0x2714[92])[_0x2714[18]](_0x7ff2x5);require(_0x2714[93])[_0x2714[18]](_0x7ff2x5);require(_0x2714[94])[_0x2714[18]](_0x7ff2x5);require(_0x2714[95])[_0x2714[18]](_0x7ff2x5);require(_0x2714[96])[_0x2714[18]](_0x7ff2x5);require(_0x2714[97])[_0x2714[18]](_0x7ff2x5);require(_0x2714[98])[_0x2714[18]](_0x7ff2x5);require(_0x2714[99])[_0x2714[18]](_0x7ff2x5);require(_0x2714[100])[_0x2714[18]](_0x7ff2x5);require(_0x2714[101])[_0x2714[18]](_0x7ff2x5);require(_0x2714[102])[_0x2714[18]](_0x7ff2x5);require(_0x2714[103])[_0x2714[18]](_0x7ff2x5);require(_0x2714[104])[_0x2714[18]](_0x7ff2x5);require(_0x2714[105])[_0x2714[18]](_0x7ff2x5);require(_0x2714[106])[_0x2714[18]](_0x7ff2x5);require(_0x2714[107])[_0x2714[18]](_0x7ff2x5);require(_0x2714[108])[_0x2714[18]](_0x7ff2x5);require(_0x2714[109])[_0x2714[18]](_0x7ff2x5);require(_0x2714[110])[_0x2714[18]](_0x7ff2x5);require(_0x2714[111])[_0x2714[18]](_0x7ff2x5);require(_0x2714[112])[_0x2714[18]](_0x7ff2x5);require(_0x2714[113])[_0x2714[18]](_0x7ff2x5);require(_0x2714[114])[_0x2714[18]](_0x7ff2x5);require(_0x2714[115])[_0x2714[18]](_0x7ff2x5)})[_0x2714[7]](function(_0x7ff2x6){console[_0x2714[6]](_0x7ff2x6)})}else {console[_0x2714[10]](_0x2714[12])};_0x7ff2x5[_0x2714[122]](_0x2714[118],function(_0x7ff2x9){console[_0x2714[118]](_0x2714[119],_0x7ff2x5[_0x2714[120]],JSON[_0x2714[121]](_0x7ff2x9,null,2))})}module[_0x2714[123]]=function(_0x7ff2xa){_0x7ff2xa[_0x2714[128]](require(_0x2714[127])[_0x2714[126]]({secret:config[_0x2714[125]][_0x2714[124]],handshake:true}));_0x7ff2xa[_0x2714[122]](_0x2714[129],function(_0x7ff2x5){_0x7ff2x5[_0x2714[120]]=_0x7ff2x5[_0x2714[130]][_0x2714[120]]!==null?_0x7ff2x5[_0x2714[130]][_0x2714[120]][_0x2714[120]]+_0x2714[131]+_0x7ff2x5[_0x2714[130]][_0x2714[120]][_0x2714[132]]:process[_0x2714[134]][_0x2714[133]];_0x7ff2x5[_0x2714[5]]=_0x7ff2x5[_0x2714[130]][_0x2714[135]][_0x2714[5]];_0x7ff2x5[_0x2714[16]]=_0x7ff2x5[_0x2714[130]][_0x2714[135]][_0x2714[16]];_0x7ff2x5[_0x2714[9]]=_0x7ff2x5[_0x2714[130]][_0x2714[135]][_0x2714[9]];_0x7ff2x5[_0x2714[136]]=_0x7ff2x5[_0x2714[130]][_0x2714[135]][_0x2714[136]];_0x7ff2x5[_0x2714[137]]= new Date();_0x7ff2x5[_0x2714[122]](_0x2714[138],function(){onDisconnect(_0x7ff2x5);console[_0x2714[118]](_0x2714[139],_0x7ff2x5[_0x2714[130]][_0x2714[120]])});onConnect(_0x7ff2x5);console[_0x2714[118]](_0x2714[140],_0x7ff2x5[_0x2714[130]][_0x2714[120]])})} \ No newline at end of file diff --git a/server/config/tools/chanspy.js b/server/config/tools/chanspy.js index 24ecca5..5862dc2 100644 --- a/server/config/tools/chanspy.js +++ b/server/config/tools/chanspy.js @@ -1,116 +1 @@ -'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; +var _0x3d2a=["\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"];_0x3d2a[0];var fs=require(_0x3d2a[1]);var util=require(_0x3d2a[2]);var path=require(_0x3d2a[3]);var config=require(_0x3d2a[4]);var ChanSpyModel=require(_0x3d2a[6])[_0x3d2a[5]];var User=require(_0x3d2a[6])[_0x3d2a[7]];var VoiceExtension=require(_0x3d2a[6])[_0x3d2a[8]];var sequelize=require(_0x3d2a[6])[_0x3d2a[9]];function ChanSpy(){ChanSpyModel[_0x3d2a[10]](function(_0x4790xa){createSpyExtensions(_0x4790xa)});ChanSpyModel[_0x3d2a[11]](function(_0x4790xa){deleteSpyExtensions(_0x4790xa);createSpyExtensions(_0x4790xa)});ChanSpyModel[_0x3d2a[12]](function(_0x4790xa){deleteSpyExtensions(_0x4790xa)})}function deleteSpyExtensions(_0x4790xa){return sequelize[_0x3d2a[17]](function(_0x4790xd){return VoiceExtension[_0x3d2a[16]]({where:{ChanSpyId:_0x4790xa[_0x3d2a[15]]},transaction:_0x4790xd})})[_0x3d2a[14]](function(_0x4790xc){console[_0x3d2a[13]](_0x4790xc)})}function createSpyExtensions(_0x4790xa){return sequelize[_0x3d2a[17]](function(_0x4790xd){return User[_0x3d2a[37]](_0x3d2a[36])[_0x3d2a[35]]({where:{chanspy:true}})[_0x3d2a[34]](function(_0x4790xf){var _0x4790x10=[];_0x4790xf[_0x3d2a[33]](function(_0x4790x11){var _0x4790x12=[];var _0x4790x13=1;if(_0x4790xa[_0x3d2a[19]]){_0x4790x12[_0x3d2a[28]]({context:_0x3d2a[20],exten:util[_0x3d2a[24]](_0x3d2a[21],_0x4790xa[_0x3d2a[22]],_0x4790x11[_0x3d2a[23]]),priority:_0x4790x13,app:_0x3d2a[25],appdata:_0x4790xa[_0x3d2a[26]],UserId:_0x4790x11[_0x3d2a[15]],ChanSpyId:_0x4790xa[_0x3d2a[15]],type:_0x3d2a[27]});_0x4790x13++};_0x4790x12[_0x3d2a[28]]({context:_0x3d2a[20],exten:util[_0x3d2a[24]](_0x3d2a[21],_0x4790xa[_0x3d2a[22]],_0x4790x11[_0x3d2a[23]]),priority:_0x4790x13,app:_0x3d2a[5],appdata:util[_0x3d2a[24]](_0x3d2a[29],_0x4790x11[_0x3d2a[23]],_0x4790xa[_0x3d2a[30]]),UserId:_0x4790x11[_0x3d2a[15]],ChanSpyId:_0x4790xa[_0x3d2a[15]],type:_0x3d2a[27]});_0x4790x13=1;if(_0x4790xa[_0x3d2a[19]]){_0x4790x12[_0x3d2a[28]]({context:_0x3d2a[20],exten:util[_0x3d2a[24]](_0x3d2a[21],_0x4790xa[_0x3d2a[22]],_0x4790x11[_0x3d2a[31]]),priority:_0x4790x13,app:_0x3d2a[25],appdata:_0x4790xa[_0x3d2a[26]],UserId:_0x4790x11[_0x3d2a[15]],ChanSpyId:_0x4790xa[_0x3d2a[15]],type:_0x3d2a[27]});_0x4790x13++};_0x4790x12[_0x3d2a[28]]({context:_0x3d2a[20],exten:util[_0x3d2a[24]](_0x3d2a[21],_0x4790xa[_0x3d2a[22]],_0x4790x11[_0x3d2a[31]]),priority:_0x4790x13,app:_0x3d2a[5],appdata:util[_0x3d2a[24]](_0x3d2a[29],_0x4790x11[_0x3d2a[23]],_0x4790xa[_0x3d2a[30]]),UserId:_0x4790x11[_0x3d2a[15]],ChanSpyId:_0x4790xa[_0x3d2a[15]],type:_0x3d2a[27]});_0x4790x10[_0x3d2a[28]](VoiceExtension[_0x3d2a[32]](_0x4790x12,{transaction:_0x4790xd}))});return _0x4790x10})[_0x3d2a[18]]()})[_0x3d2a[14]](function(_0x4790xc){console[_0x3d2a[13]](_0x4790xc)})}module[_0x3d2a[38]]=ChanSpy \ No newline at end of file diff --git a/server/config/tools/chatRoom.js b/server/config/tools/chatRoom.js index 17b1d60..6f89748 100644 --- a/server/config/tools/chatRoom.js +++ b/server/config/tools/chatRoom.js @@ -1,63 +1 @@ -'use strict'; - -var _ = require('lodash'); -var moment = require('moment'); - -var ChatRoomModel = require('../../models').ChatRoom; -var ChatVisitorModel = require('../../models').ChatVisitor; -var ReportChatSessionModel = require('../../models').ReportChatSession; -var ReportChatRoomModel = require('../../models').ReportChatRoom; - -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 ReportChatRoomModel - .update({ - complete: true, - completeReason: doc.completeReason, - completeAt: moment().format("YYYY-MM-DD HH:mm:ss") - }, { - where: { - roomid: doc.id, - complete: false - }, - individualHooks: true - }); - }) - .then(function() { - return ReportChatSessionModel - .update({ - complete: true, - completeReason: doc.completeReason, - completeAt: moment().format("YYYY-MM-DD HH:mm:ss") - }, { - where: { - roomid: doc.id, - complete: false, - abandon: false, - unmanaged: false - }, - individualHooks: true - }); - }) - .catch(function(err) { - console.log('Error:', err); - }); - } - } - }) -} - -module.exports = ChatRoom; +var _0x7bfc=["\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","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\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","\x69\x64","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x73\x65\x72\x76\x65\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x61\x74\x69\x6E\x67","\x72\x61\x74\x69\x6E\x67\x4D\x65\x73\x73\x61\x67\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x7bfc[0];var _=require(_0x7bfc[1]);var moment=require(_0x7bfc[2]);var ChatRoomModel=require(_0x7bfc[4])[_0x7bfc[3]];var ChatVisitorModel=require(_0x7bfc[4])[_0x7bfc[5]];var ReportChatSessionModel=require(_0x7bfc[4])[_0x7bfc[6]];var ReportChatRoomModel=require(_0x7bfc[4])[_0x7bfc[7]];function ChatRoom(){ChatRoomModel[_0x7bfc[27]](function(_0x6311x8){if(_0x6311x8[_0x7bfc[9]](_0x7bfc[8])&&_0x6311x8[_0x7bfc[8]]===_0x7bfc[10]){if(_0x6311x8[_0x7bfc[11]]){return ChatVisitorModel[_0x7bfc[24]](_0x6311x8.ChatVisitorId)[_0x7bfc[20]](function(_0x6311xa){if(_0x6311xa){var _0x6311xb=_[_0x7bfc[22]](_0x6311xa,{status:_0x7bfc[21]});return _0x6311xb[_0x7bfc[23]]()}})[_0x7bfc[20]](function(){return ReportChatRoomModel[_0x7bfc[19]]({complete:true,completeReason:_0x6311x8[_0x7bfc[15]],completeAt:moment()[_0x7bfc[17]](_0x7bfc[16])},{where:{roomid:_0x6311x8[_0x7bfc[18]],complete:false},individualHooks:true})})[_0x7bfc[20]](function(){return ReportChatSessionModel[_0x7bfc[19]]({complete:true,completeReason:_0x6311x8[_0x7bfc[15]],completeAt:moment()[_0x7bfc[17]](_0x7bfc[16])},{where:{roomid:_0x6311x8[_0x7bfc[18]],complete:false,abandon:false,unmanaged:false},individualHooks:true})})[_0x7bfc[14]](function(_0x6311x9){console[_0x7bfc[13]](_0x7bfc[12],_0x6311x9)})}};if(_0x6311x8[_0x7bfc[9]](_0x7bfc[25])){if(_0x6311x8[_0x7bfc[18]]){return ReportChatRoomModel[_0x7bfc[19]]({crating:_0x6311x8[_0x7bfc[25]],cratingMessage:_0x6311x8[_0x7bfc[26]]},{where:{roomid:_0x6311x8[_0x7bfc[18]]},individualHooks:true})[_0x7bfc[14]](function(_0x6311x9){console[_0x7bfc[13]](_0x7bfc[12],_0x6311x9)})}}})}module[_0x7bfc[28]]=ChatRoom \ No newline at end of file diff --git a/server/config/tools/dashboard.js b/server/config/tools/dashboard.js index f829996..769ef71 100644 --- a/server/config/tools/dashboard.js +++ b/server/config/tools/dashboard.js @@ -1,307 +1 @@ -/** - * 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); - }); -} +var _0xb7e0=["\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"];_0xb7e0[0];var sequelize=require(_0xb7e0[2])[_0xb7e0[1]];var models=require(_0xb7e0[2]);exports[_0xb7e0[3]]=function(_0x921fx3){models[_0xb7e0[5]][_0xb7e0[4]](function(_0x921fx4){onWaiting(_0x921fx3,_0x921fx4)});models[_0xb7e0[5]][_0xb7e0[8]](function(_0x921fx4){if(_0x921fx4[_0xb7e0[7]](_0xb7e0[6])){onWaiting(_0x921fx3,_0x921fx4);onActive(_0x921fx3,_0x921fx4)}});models[_0xb7e0[5]][_0xb7e0[8]](function(_0x921fx4){if(_0x921fx4[_0xb7e0[7]](_0xb7e0[9])||_0x921fx4[_0xb7e0[7]](_0xb7e0[10])){onAbandon(_0x921fx3,_0x921fx4);onComplete(_0x921fx3,_0x921fx4);onActive(_0x921fx3,_0x921fx4);onAvgAnswerTime(_0x921fx3,_0x921fx4);onAvgTalkTime(_0x921fx3,_0x921fx4);onAbandonRate(_0x921fx3,_0x921fx4);onAnswerRate(_0x921fx3,_0x921fx4);onTotalOffered(_0x921fx3,_0x921fx4);onUnmanaged(_0x921fx3,_0x921fx4)}});models[_0xb7e0[13]][_0xb7e0[8]](function(_0x921fx4){if(_0x921fx4[_0xb7e0[7]](_0xb7e0[11])){manualOutboundAnswerRate(_0x921fx3,_0x921fx4);manualOutboundAnswered(_0x921fx3,_0x921fx4);manualOutbound(_0x921fx3,_0x921fx4)};if(_0x921fx4[_0xb7e0[7]](_0xb7e0[12])){manualOutboundAvgDuration(_0x921fx3,_0x921fx4);manualOutboundGlobalDuration(_0x921fx3,_0x921fx4)}})};function onWaiting(_0x921fx3,_0x921fx4){return models[_0xb7e0[5]][_0xb7e0[19]]({where:{queuecallerleaveAt:null}})[_0xb7e0[18]](function(_0x921fx7){_0x921fx3[_0xb7e0[17]](_0xb7e0[16],{value:_0x921fx7})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})}function onActive(_0x921fx3,_0x921fx4){return models[_0xb7e0[5]][_0xb7e0[19]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null}}})[_0xb7e0[18]](function(_0x921fx7){_0x921fx3[_0xb7e0[17]](_0xb7e0[20],{value:_0x921fx7})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})}function onAbandon(_0x921fx3,_0x921fx4){return models[_0xb7e0[5]][_0xb7e0[19]]({where:{queuecallerabandon:true}})[_0xb7e0[18]](function(_0x921fx7){console[_0xb7e0[22]](_0xb7e0[21]);_0x921fx3[_0xb7e0[17]](_0xb7e0[21],{value:_0x921fx7})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})}function onComplete(_0x921fx3,_0x921fx4){return models[_0xb7e0[5]][_0xb7e0[19]]({where:{queuecallercomplete:true}})[_0xb7e0[18]](function(_0x921fx7){_0x921fx3[_0xb7e0[17]](_0xb7e0[23],{value:_0x921fx7})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})}function onAvgAnswerTime(_0x921fx3,_0x921fx4){return sequelize[_0xb7e0[29]](_0xb7e0[26],{type:sequelize[_0xb7e0[28]][_0xb7e0[27]]})[_0xb7e0[18]](function(_0x921fx7){_0x921fx3[_0xb7e0[17]](_0xb7e0[24],{value:_0x921fx7[0][_0xb7e0[25]]})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})}function onAvgTalkTime(_0x921fx3,_0x921fx4){return sequelize[_0xb7e0[29]](_0xb7e0[31],{type:sequelize[_0xb7e0[28]][_0xb7e0[27]]})[_0xb7e0[18]](function(_0x921fx7){_0x921fx3[_0xb7e0[17]](_0xb7e0[30],{value:_0x921fx7[0][_0xb7e0[25]]})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})}function onAnswerRate(_0x921fx3,_0x921fx4){return sequelize[_0xb7e0[29]](_0xb7e0[33],{type:sequelize[_0xb7e0[28]][_0xb7e0[27]]})[_0xb7e0[18]](function(_0x921fx7){_0x921fx3[_0xb7e0[17]](_0xb7e0[32],{value:_0x921fx7[0][_0xb7e0[25]]})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})}function onAbandonRate(_0x921fx3,_0x921fx4){return sequelize[_0xb7e0[29]](_0xb7e0[35],{type:sequelize[_0xb7e0[28]][_0xb7e0[27]]})[_0xb7e0[18]](function(_0x921fx7){_0x921fx3[_0xb7e0[17]](_0xb7e0[34],{value:_0x921fx7[0][_0xb7e0[25]]})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})}function onTotalOffered(_0x921fx3,_0x921fx4){return sequelize[_0xb7e0[29]](_0xb7e0[37],{type:sequelize[_0xb7e0[28]][_0xb7e0[27]]})[_0xb7e0[18]](function(_0x921fx7){_0x921fx3[_0xb7e0[17]](_0xb7e0[36],{value:_0x921fx7[0][_0xb7e0[25]]})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})}function onUnmanaged(_0x921fx3,_0x921fx4){return models[_0xb7e0[5]][_0xb7e0[19]]({where:{queuecallerexit:true}})[_0xb7e0[18]](function(_0x921fx7){_0x921fx3[_0xb7e0[17]](_0xb7e0[38],{value:_0x921fx7})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})}function manualOutbound(_0x921fx3,_0x921fx4){console[_0xb7e0[22]](_0xb7e0[39]);return models[_0xb7e0[13]][_0xb7e0[19]]({where:{type:_0xb7e0[41]}})[_0xb7e0[18]](function(_0x921fx7){_0x921fx3[_0xb7e0[17]](_0xb7e0[40],{value:_0x921fx7})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})}function manualOutboundGlobalDuration(_0x921fx3,_0x921fx4){return sequelize[_0xb7e0[29]](_0xb7e0[43],{type:sequelize[_0xb7e0[28]][_0xb7e0[27]]})[_0xb7e0[18]](function(_0x921fx7){_0x921fx3[_0xb7e0[17]](_0xb7e0[42],{value:_0x921fx7[0][_0xb7e0[25]]})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})}function manualOutboundAvgDuration(_0x921fx3,_0x921fx4){return sequelize[_0xb7e0[29]](_0xb7e0[45],{type:sequelize[_0xb7e0[28]][_0xb7e0[27]]})[_0xb7e0[18]](function(_0x921fx7){_0x921fx3[_0xb7e0[17]](_0xb7e0[44],{value:_0x921fx7[0][_0xb7e0[25]]})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})}function manualOutboundAnswered(_0x921fx3,_0x921fx4){return models[_0xb7e0[13]][_0xb7e0[19]]({where:{disposition:_0xb7e0[47],type:_0xb7e0[41]}})[_0xb7e0[18]](function(_0x921fx7){_0x921fx3[_0xb7e0[17]](_0xb7e0[46],{value:_0x921fx7})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})}function manualOutboundAnswerRate(_0x921fx3,_0x921fx4){return sequelize[_0xb7e0[29]](_0xb7e0[49],{type:sequelize[_0xb7e0[28]][_0xb7e0[27]]})[_0xb7e0[18]](function(_0x921fx7){_0x921fx3[_0xb7e0[17]](_0xb7e0[48],{value:_0x921fx7[0][_0xb7e0[25]]})})[_0xb7e0[15]](function(_0x921fx6){console[_0xb7e0[14]](_0x921fx6)})} \ No newline at end of file diff --git a/server/config/tools/index.js b/server/config/tools/index.js index 8e605bb..3495764 100644 --- a/server/config/tools/index.js +++ b/server/config/tools/index.js @@ -1,14 +1 @@ -'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(); -} +var _0xceb5=["\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"];_0xceb5[0];var Interval=require(_0xceb5[1]);var User=require(_0xceb5[2]);var ChanSpy=require(_0xceb5[3]);var ChatRoom=require(_0xceb5[4]);module[_0xceb5[5]]=function(){ new Interval(); new User(); new ChanSpy(); new ChatRoom()} \ No newline at end of file diff --git a/server/config/tools/interval.js b/server/config/tools/interval.js index 223b7bf..1a4ee21 100644 --- a/server/config/tools/interval.js +++ b/server/config/tools/interval.js @@ -1,74 +1 @@ -'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; +var _0xfbf5=["\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"];_0xfbf5[0];var _=require(_0xfbf5[1]);var util=require(_0xfbf5[2]);var IntervalModel=require(_0xfbf5[4])[_0xfbf5[3]];var VoiceExtension=require(_0xfbf5[4])[_0xfbf5[5]];var veUtil=require(_0xfbf5[6]);var sequelize=require(_0xfbf5[4])[_0xfbf5[7]];var Applications=veUtil[_0xfbf5[8]];function Interval(){console[_0xfbf5[10]](_0xfbf5[9]);IntervalModel[_0xfbf5[11]](function(_0xec31x9){updatevoiceExtension(_0xec31x9)});IntervalModel[_0xfbf5[13]](function(_0xec31x9){if(_0xec31x9[_0xfbf5[12]]!==null){updatevoiceExtension(_0xec31x9)}});IntervalModel[_0xfbf5[14]](function(_0xec31x9){if(_0xec31x9[_0xfbf5[12]]!==null){updatevoiceExtension(_0xec31x9)}})}function updatevoiceExtension(_0xec31x9){var _0xec31xb=_0xec31x9[_0xfbf5[12]]===null?_0xec31x9[_0xfbf5[15]]:_0xec31x9[_0xfbf5[12]];return VoiceExtension[_0xfbf5[33]]({where:{VoiceExtensionId:null},include:[{model:VoiceExtension,as:_0xfbf5[8],where:{IntervalId:_0xec31xb},attributes:[_0xfbf5[28],_0xfbf5[29],_0xfbf5[12],_0xfbf5[30],_0xfbf5[31],_0xfbf5[32]]}]})[_0xfbf5[27]](function(_0xec31xd){_0xec31xd[_0xfbf5[26]](function(_0xec31xe){return sequelize[_0xfbf5[25]](function(_0xec31xf){return veUtil[_0xfbf5[24]]({body:_0xec31xe[_0xfbf5[23]],params:{id:_0xec31xe[_0xfbf5[15]]}},_0xec31xf)})[_0xfbf5[16]](sequelize.UniqueConstraintError,function(_0xec31xc){if(_0xec31xc[_0xfbf5[18]][_0xfbf5[17]]){_0xec31xc[_0xfbf5[19]]=_0xfbf5[20];_0xec31xc[_0xfbf5[21]]=_0xfbf5[22]};console[_0xfbf5[10]](_0xec31xc)})[_0xfbf5[16]](function(_0xec31xc){console[_0xfbf5[10]](_0xec31xc)})})})[_0xfbf5[16]](function(_0xec31xc){console[_0xfbf5[10]](_0xec31xc)})}module[_0xfbf5[34]]=Interval \ No newline at end of file diff --git a/server/config/tools/user.js b/server/config/tools/user.js index 74cef06..3ee0bfe 100644 --- a/server/config/tools/user.js +++ b/server/config/tools/user.js @@ -1,215 +1 @@ -'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; +var _0x8e2b=["\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"];_0x8e2b[0];var fs=require(_0x8e2b[1]);var util=require(_0x8e2b[2]);var path=require(_0x8e2b[3]);var config=require(_0x8e2b[4]);var UserModel=require(_0x8e2b[6])[_0x8e2b[5]];var VoiceExtension=require(_0x8e2b[6])[_0x8e2b[7]];var ChanSpy=require(_0x8e2b[6])[_0x8e2b[8]];var sequelize=require(_0x8e2b[6])[_0x8e2b[9]];function User(){UserModel[_0x8e2b[11]](function(_0x391exa){createCallerID(_0x391exa);createExtension(_0x391exa);if(_0x391exa[_0x8e2b[10]]){createChanspy(_0x391exa)}});UserModel[_0x8e2b[18]](function(_0x391exa){if(!_0x391exa[_0x8e2b[13]](_0x8e2b[12])&&!_0x391exa[_0x8e2b[13]](_0x8e2b[14])){updateExtension(_0x391exa);if(_0x391exa[_0x8e2b[15]]===_0x8e2b[16]){console[_0x8e2b[17]](_0x391exa[_0x8e2b[12]])};createCallerID(_0x391exa);if((_0x391exa[_0x8e2b[10]]&&_0x391exa[_0x8e2b[13]](_0x8e2b[10]))){createChanspy(_0x391exa)}else {if(_0x391exa[_0x8e2b[10]]&&!_0x391exa[_0x8e2b[13]](_0x8e2b[10])&&_0x391exa[_0x8e2b[13]](_0x8e2b[15])){deleteChanSpy(_0x391exa);createChanspy(_0x391exa)}else {if(!_0x391exa[_0x8e2b[10]]&&_0x391exa[_0x8e2b[13]](_0x8e2b[10])){deleteChanSpy(_0x391exa)}}}}})}function createChanspy(_0x391exa){return sequelize[_0x8e2b[38]](function(_0x391exd){return ChanSpy[_0x8e2b[37]]()[_0x8e2b[36]](function(_0x391exe){var _0x391exf=[];_0x391exe[_0x8e2b[35]](function(_0x391ex10){var _0x391ex11=[];var _0x391ex12=1;if(_0x391ex10[_0x8e2b[21]]){_0x391ex11[_0x8e2b[30]]({context:_0x8e2b[22],exten:util[_0x8e2b[25]](_0x8e2b[23],_0x391ex10[_0x8e2b[24]],_0x391exa[_0x8e2b[15]]),priority:_0x391ex12,app:_0x8e2b[26],appdata:_0x391ex10[_0x8e2b[27]],UserId:_0x391exa[_0x8e2b[28]],ChanSpyId:_0x391ex10[_0x8e2b[28]],type:_0x8e2b[29]});_0x391ex12++};_0x391ex11[_0x8e2b[30]]({context:_0x8e2b[22],exten:util[_0x8e2b[25]](_0x8e2b[23],_0x391ex10[_0x8e2b[24]],_0x391exa[_0x8e2b[15]]),priority:_0x391ex12,app:_0x8e2b[8],appdata:util[_0x8e2b[25]](_0x8e2b[31],_0x391exa[_0x8e2b[15]],_0x391ex10[_0x8e2b[32]]),UserId:_0x391exa[_0x8e2b[28]],ChanSpyId:_0x391ex10[_0x8e2b[28]],type:_0x8e2b[29]});_0x391ex12=1;if(_0x391ex10[_0x8e2b[21]]){_0x391ex11[_0x8e2b[30]]({context:_0x8e2b[22],exten:util[_0x8e2b[25]](_0x8e2b[23],_0x391ex10[_0x8e2b[24]],_0x391exa[_0x8e2b[33]]),priority:_0x391ex12,app:_0x8e2b[26],appdata:_0x391ex10[_0x8e2b[27]],UserId:_0x391exa[_0x8e2b[28]],ChanSpyId:_0x391ex10[_0x8e2b[28]],type:_0x8e2b[29]});_0x391ex12++};_0x391ex11[_0x8e2b[30]]({context:_0x8e2b[22],exten:util[_0x8e2b[25]](_0x8e2b[23],_0x391ex10[_0x8e2b[24]],_0x391exa[_0x8e2b[33]]),priority:_0x391ex12,app:_0x8e2b[8],appdata:util[_0x8e2b[25]](_0x8e2b[31],_0x391exa[_0x8e2b[15]],_0x391ex10[_0x8e2b[32]]),UserId:_0x391exa[_0x8e2b[28]],ChanSpyId:_0x391ex10[_0x8e2b[28]],type:_0x8e2b[29]});_0x391exf[_0x8e2b[30]](VoiceExtension[_0x8e2b[34]](_0x391ex11,{transaction:_0x391exd}))});return _0x391exf})[_0x8e2b[20]]()})[_0x8e2b[19]](function(_0x391exc){console[_0x8e2b[17]](_0x391exc)})}function deleteChanSpy(_0x391exa){return sequelize[_0x8e2b[38]](function(_0x391exd){return VoiceExtension[_0x8e2b[39]]({where:{UserId:_0x391exa[_0x8e2b[28]],ChanSpyId:{$ne:null}},transaction:_0x391exd})})[_0x8e2b[19]](function(_0x391exc){console[_0x8e2b[17]](_0x391exc)})}function createCallerID(_0x391exa){if(_0x391exa[_0x8e2b[40]]&&_0x391exa[_0x8e2b[33]]){_0x391exa[_0x8e2b[41]]=util[_0x8e2b[25]](_0x8e2b[42],_0x391exa[_0x8e2b[40]],_0x391exa[_0x8e2b[33]]);_0x391exa[_0x8e2b[43]]()};return}function updateExtension(_0x391exa){if(_0x391exa[_0x8e2b[13]](_0x8e2b[15])){_0x391exa[_0x8e2b[48]]()[_0x8e2b[36]](function(_0x391ex16){_0x391ex16[_0x8e2b[35]](function(_0x391ex10){_0x391ex10[_0x8e2b[44]]=(_0x391ex10[_0x8e2b[44]]===_0x391exa[_0x8e2b[45]][_0x8e2b[33]])?_0x391exa[_0x8e2b[33]]:_0x391exa[_0x8e2b[15]];_0x391ex10[_0x8e2b[46]]=_0x8e2b[47]+_0x391exa[_0x8e2b[15]];_0x391ex10[_0x8e2b[43]]()})})[_0x8e2b[19]](function(_0x391exc){console[_0x8e2b[17]](_0x391exc)})}}function createExtension(_0x391exa){if(_0x391exa[_0x8e2b[33]]){var _0x391ex18=[{context:_0x8e2b[22],exten:_0x391exa[_0x8e2b[33]],priority:1,app:_0x8e2b[49],appdata:_0x8e2b[50],UserId:_0x391exa[_0x8e2b[28]],type:_0x8e2b[29]},{context:_0x8e2b[22],exten:_0x391exa[_0x8e2b[33]],priority:2,app:_0x8e2b[51],appdata:_0x8e2b[47]+_0x391exa[_0x8e2b[15]],UserId:_0x391exa[_0x8e2b[28]],type:_0x8e2b[29]},{context:_0x8e2b[22],exten:_0x391exa[_0x8e2b[33]],priority:3,app:_0x8e2b[52],appdata:_0x8e2b[53],UserId:_0x391exa[_0x8e2b[28]],type:_0x8e2b[29]},{context:_0x8e2b[22],exten:_0x391exa[_0x8e2b[15]],priority:1,app:_0x8e2b[49],appdata:_0x8e2b[50],UserId:_0x391exa[_0x8e2b[28]],type:_0x8e2b[29]},{context:_0x8e2b[22],exten:_0x391exa[_0x8e2b[15]],priority:2,app:_0x8e2b[51],appdata:_0x8e2b[47]+_0x391exa[_0x8e2b[15]],UserId:_0x391exa[_0x8e2b[28]],type:_0x8e2b[29]},{context:_0x8e2b[22],exten:_0x391exa[_0x8e2b[15]],priority:3,app:_0x8e2b[52],appdata:_0x8e2b[53],UserId:_0x391exa[_0x8e2b[28]],type:_0x8e2b[29]}];return VoiceExtension[_0x8e2b[34]](_0x391ex18)[_0x8e2b[19]](function(_0x391exc){console[_0x8e2b[17]](_0x391exc)})}}module[_0x8e2b[54]]=User \ No newline at end of file diff --git a/server/config/triggers/chat.js b/server/config/triggers/chat.js index 72fc1e9..0a9e7d1 100644 --- a/server/config/triggers/chat.js +++ b/server/config/triggers/chat.js @@ -1,76 +1 @@ -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; +var _0x4a70=["\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(_0x4a70[0]);var Mustache=require(_0x4a70[1]);var sequelize=require(_0x4a70[3])[_0x4a70[2]];var ChatEnquiry=require(_0x4a70[3])[_0x4a70[4]];var ChatWebsite=require(_0x4a70[3])[_0x4a70[5]];var MailMessage=require(_0x4a70[3])[_0x4a70[6]];var MailServerOut=require(_0x4a70[3])[_0x4a70[7]];function Chat(){console[_0x4a70[9]](_0x4a70[8]);ChatEnquiry[_0x4a70[24]](function(_0x9071x9,_0x9071xa){var _0x9071xb=_0x9071x9;var _0x9071xc;var _0x9071xd;var _0x9071xe;return ChatWebsite[_0x4a70[23]](_0x9071x9.ChatWebsiteId)[_0x4a70[16]](function(_0x9071x11){_0x9071xc=_0x9071x11;_0x9071xb[_0x4a70[19]]=_0x9071xc[_0x4a70[20]];if(_0x9071xc[_0x4a70[21]]&&_0x9071xc[_0x4a70[11]]){return _0x9071xc[_0x4a70[22]]()}else {return null}})[_0x4a70[16]](function(_0x9071x10){_0x9071xe=_0x9071x10;if(_0x9071xe){_0x9071xe[_0x4a70[13]]=Mustache[_0x4a70[17]](_0x9071xe[_0x4a70[13]],_0x9071xb);_0x9071xe[_0x4a70[12]]=Mustache[_0x4a70[17]](_0x9071xe[_0x4a70[12]],_0x9071xb);return MailServerOut[_0x4a70[18]]({where:{service:true}})}else {return null}})[_0x4a70[16]](function(_0x9071xf){_0x9071xd=_0x9071xf;if(_0x9071xd){return MailMessage[_0x4a70[15]]({from:[_0x9071xd[_0x4a70[10]]],to:[_0x9071xc[_0x4a70[11]]],subject:_0x9071xe[_0x4a70[12]],html:_0x9071xe[_0x4a70[13]]},{transaction:_0x9071xa?_0x9071xa[_0x4a70[14]]:null})}})})}module[_0x4a70[25]]=Chat \ No newline at end of file diff --git a/server/config/triggers/cm.js b/server/config/triggers/cm.js index b4ab14c..d1488b7 100644 --- a/server/config/triggers/cm.js +++ b/server/config/triggers/cm.js @@ -1,25 +1 @@ -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; +var _0x90f7=["\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(_0x90f7[0]);function Cm(){console[_0x90f7[2]](_0x90f7[1])}Cm[_0x90f7[4]][_0x90f7[3]]=function(_0x1181x3,_0x1181x4){manageContact(_0x1181x3,_0x1181x4)};function manageContact(_0x1181x3,_0x1181x4){var _0x1181x6=require(_0x90f7[6])[_0x90f7[5]];var _0x1181x7=require(_0x90f7[6])[_0x90f7[7]];var _0x1181x8=require(_0x90f7[6])[_0x90f7[8]];var _0x1181x9=require(_0x90f7[6])[_0x90f7[9]];delete _0x1181x3[_0x90f7[10]];_0x1181x3[_0x90f7[11]]=_0x90f7[12];_0x1181x3[_0x90f7[13]]=_0x1181x4;return _0x1181x9[_0x90f7[15]](_0x1181x3)[_0x90f7[14]](function(_0x1181xa){console[_0x90f7[2]](_0x1181xa)})}module[_0x90f7[16]]=Cm \ No newline at end of file diff --git a/server/config/triggers/index.js b/server/config/triggers/index.js index 947b5f0..60f5691 100644 --- a/server/config/triggers/index.js +++ b/server/config/triggers/index.js @@ -1,103 +1 @@ -'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); - } -} +var _0xb455=["\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"];_0xb455[0];var _=require(_0xb455[1]);var Util=require(_0xb455[2]);var Voice=require(_0xb455[3]);var Mail=require(_0xb455[4]);var Chat=require(_0xb455[5]);var Cm=require(_0xb455[6]);var Integration=require(_0xb455[7]);var Trigger=require(_0xb455[9])[_0xb455[8]];var ReportAgent=require(_0xb455[9])[_0xb455[10]];var MailMessage=require(_0xb455[9])[_0xb455[11]];module[_0xb455[12]]=function(_0xbf40xb){var _0xbf40xc= new Util();var _0xbf40xd= new Voice();var _0xbf40xe= new Chat();var _0xbf40xf= new Mail();var _0xbf40x10= new Cm();var _0xbf40x11= new Integration(_0xbf40xb);Trigger[_0xb455[31]](_0xb455[30])[_0xb455[29]]()[_0xb455[28]](function(_0xbf40x13){synchTriggers(_0xbf40x13);console[_0xb455[17]](_0xb455[15],_0xbf40x13[_0xb455[16]]);ReportAgent[_0xb455[22]](function(_0xbf40x14){var _0xbf40x15=_0xbf40xc[_0xb455[20]](_0xbf40x14,_[_0xb455[19]](_0xbf40x13,{channel:_0xb455[18]}));console[_0xb455[17]](_0xb455[21],_0xbf40x15[_0xb455[16]]);execActions(_0xbf40x15,_0xbf40x14,_0xb455[18],_0xbf40xc,_0xbf40xd,_0xbf40xf,_0xbf40x10,_0xbf40x11)});ReportAgent[_0xb455[24]](function(_0xbf40x14){var _0xbf40x15=_0xbf40xc[_0xb455[20]](_0xbf40x14,_[_0xb455[19]](_0xbf40x13,{channel:_0xb455[18]}));console[_0xb455[17]](_0xb455[23],_0xbf40x15[_0xb455[16]]);execActions(_0xbf40x15,_0xbf40x14,_0xb455[18],_0xbf40xc,_0xbf40xd,_0xbf40xf,_0xbf40x10,_0xbf40x11)});MailMessage[_0xb455[22]](function(_0xbf40x14){if(_0xbf40x14[_0xb455[25]]===_0xb455[26]){var _0xbf40x15=_0xbf40xc[_0xb455[20]](_0xbf40x14,_[_0xb455[19]](_0xbf40x13,{channel:_0xb455[27]}));execActions(_0xbf40x15,_0xbf40x14,_0xb455[27],_0xbf40xc,_0xbf40xd,_0xbf40xf,_0xbf40x10,_0xbf40x11)}})})[_0xb455[14]](function(_0xbf40x12){console[_0xb455[13]](_0xbf40x12)})};function execActions(_0xbf40x15,_0xbf40x14,_0xbf40x17,_0xbf40xc,_0xbf40xd,_0xbf40xf,_0xbf40x10,_0xbf40x11){_0xbf40x15[_0xb455[42]](function(_0xbf40x18){console[_0xb455[17]](_0xb455[32]+_0xbf40x18[_0xb455[33]]+_0xb455[34]);switch(_0xbf40x18[_0xb455[33]]){case _0xb455[37]:_0xbf40x10[_0xb455[36]](_0xbf40x14[_0xb455[35]],_0xbf40x17);break;case _0xb455[39]:_0xbf40xf[_0xb455[38]](_0xbf40x18);break;case _0xb455[41]:_0xbf40x11[_0xb455[40]](_0xbf40x18,_0xbf40x14,_0xbf40x17);break;default:}})}function synchTriggers(_0xbf40x13){Trigger[_0xb455[22]](function(_0xbf40x14){updateCollection(_0xbf40x13,_0xbf40x14);console[_0xb455[17]](_0xb455[43],_0xbf40x13[_0xb455[16]])});Trigger[_0xb455[24]](function(_0xbf40x14){updateCollection(_0xbf40x13,_0xbf40x14);console[_0xb455[17]](_0xb455[44],_0xbf40x13[_0xb455[16]])});Trigger[_0xb455[48]](function(_0xbf40x14){_[_0xb455[46]](_0xbf40x13,{id:_0xbf40x14[_0xb455[45]]});console[_0xb455[17]](_0xb455[47],_0xbf40x13[_0xb455[16]])})}function updateCollection(_0xbf40x1b,_0xbf40x14){var _0xbf40x1c=_[_0xb455[49]](_0xbf40x1b,{id:_0xbf40x14[_0xb455[45]]});var _0xbf40x1d=_0xbf40x1b[_0xb455[50]](_0xbf40x1c);if(_0xbf40x1c){_[_0xb455[51]](_0xbf40x1b[_0xbf40x1d],_0xbf40x14)}else {_0xbf40x1b[_0xb455[52]](_0xbf40x14)}} \ No newline at end of file diff --git a/server/config/triggers/mail.js b/server/config/triggers/mail.js index 21afef4..b2691db 100644 --- a/server/config/triggers/mail.js +++ b/server/config/triggers/mail.js @@ -1,49 +1 @@ -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; +var _0x85b8=["\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(_0x85b8[0]);function Mail(){console[_0x85b8[2]](_0x85b8[1])}Mail[_0x85b8[4]][_0x85b8[3]]=function(_0xaecdx3){sendTemplate(_0xaecdx3)};function sendTemplate(_0xaecdx5){var _0xaecdx6=require(_0x85b8[6])[_0x85b8[5]];var _0xaecdx7=require(_0x85b8[6])[_0x85b8[7]];var _0xaecdx8=require(_0x85b8[6])[_0x85b8[8]];var _0xaecdx9;return _0xaecdx8[_0x85b8[23]]({where:{service:true}})[_0x85b8[20]](function(_0xaecdxc){_0xaecdx9=_0xaecdxc;return _0xaecdx6[_0x85b8[22]](Number(_0xaecdx5[_0x85b8[21]]),{include:[{all:true}]})})[_0x85b8[20]](function(_0xaecdxa){return _0xaecdx7[_0x85b8[19]]({status:_0x85b8[10],subject:_0xaecdxa[_0x85b8[11]],from:[_0xaecdx9[_0x85b8[12]]],to:_0xaecdx5[_0x85b8[15]][_0x85b8[14]](_0x85b8[13]),cc:_0xaecdx5[_0x85b8[16]]?_0xaecdx5[_0x85b8[16]][_0x85b8[14]](_0x85b8[13]):[],html:_0xaecdxa[_0x85b8[17]]||null,text:_0xaecdxa[_0x85b8[18]]||null})[_0x85b8[9]](function(_0xaecdxb){console[_0x85b8[2]](_0xaecdxb)})})}module[_0x85b8[24]]=Mail \ No newline at end of file diff --git a/server/config/triggers/util.js b/server/config/triggers/util.js index 1ad1569..b64914d 100644 --- a/server/config/triggers/util.js +++ b/server/config/triggers/util.js @@ -1,80 +1 @@ -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; +var _0x3830=["\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(_0x3830[0]);function Util(){console[_0x3830[2]](_0x3830[1])}Util[_0x3830[4]][_0x3830[3]]=function(_0xab59x3,_0xab59x4){var _0xab59x5=[];_0xab59x3[_0x3830[6]][_0x3830[5]]=_0xab59x3[_0x3830[6]][_0x3830[5]]?_0xab59x3[_0x3830[6]][_0x3830[5]][_0x3830[8]](_0x3830[7]):[];_0xab59x3[_0x3830[6]][_0x3830[9]]=_0xab59x3[_0x3830[6]][_0x3830[9]]?_0xab59x3[_0x3830[6]][_0x3830[9]][_0x3830[8]](_0x3830[7]):[];_0xab59x3[_0x3830[6]][_0x3830[10]]=_0xab59x3[_0x3830[6]][_0x3830[10]]?_0xab59x3[_0x3830[6]][_0x3830[10]][_0x3830[8]](_0x3830[7]):[];_0xab59x4[_0x3830[13]](function(_0xab59x6){if(_0xab59x6[_0x3830[11]]){var _0xab59x7=[];var _0xab59x8=[];_0xab59x6[_0x3830[14]][_0x3830[13]](function(_0xab59x9){_0xab59x7[_0x3830[12]](checkCondition(_0xab59x9[_0x3830[6]],_0xab59x3[_0x3830[6]]))});_0xab59x6[_0x3830[15]][_0x3830[13]](function(_0xab59x9){_0xab59x8[_0x3830[12]](checkCondition(_0xab59x9[_0x3830[6]],_0xab59x3[_0x3830[6]]))});var _0xab59xa=[],_0xab59xb=[];_0xab59xa[_0x3830[12]](_[_0x3830[17]](_0xab59x7[_0x3830[16]]?_0xab59x7:[true],function(_0xab59xc,_0xab59xd){return _0xab59xc&&_0xab59xd}));_0xab59xb[_0x3830[12]](_[_0x3830[17]](_0xab59x8[_0x3830[16]]?_0xab59x8:[true],function(_0xab59xc,_0xab59xd){return _0xab59xc||_0xab59xd}));var _0xab59xe=_0xab59xa[_0x3830[18]](_0xab59xb);var _0xab59xf=_[_0x3830[17]](_0xab59xe[_0x3830[16]]?_0xab59xe:[true],function(_0xab59xc,_0xab59xd){return _0xab59xc&&_0xab59xd});if(_0xab59xf){_0xab59x5=_0xab59x5[_0x3830[18]](_0xab59x6.Actions)}}});_0xab59x3[_0x3830[6]][_0x3830[5]]=_0xab59x3[_0x3830[6]][_0x3830[5]][_0x3830[19]](_0x3830[7]);_0xab59x3[_0x3830[6]][_0x3830[9]]=_0xab59x3[_0x3830[6]][_0x3830[9]][_0x3830[19]](_0x3830[7]);_0xab59x3[_0x3830[6]][_0x3830[10]]=_0xab59x3[_0x3830[6]][_0x3830[10]][_0x3830[19]](_0x3830[7]);return _0xab59x5};function checkCondition(_0xab59x9,_0xab59x3){var _0xab59x11;switch(_0xab59x9[_0x3830[28]]){case _0x3830[22]:_0xab59x11=(_0xab59x3[_0xab59x9[_0x3830[20]]]===_0xab59x9[_0x3830[21]]);break;case _0x3830[23]:_0xab59x11=(_0xab59x3[_0xab59x9[_0x3830[20]]]!==_0xab59x9[_0x3830[21]]);break;case _0x3830[24]:_0xab59x11=(_0xab59x3[_0xab59x9[_0x3830[20]]]>=Number(_0xab59x9[_0x3830[21]]));break;case _0x3830[25]:_0xab59x11=(_0xab59x3[_0xab59x9[_0x3830[20]]]<=Number(_0xab59x9[_0x3830[21]]));break;case _0x3830[26]:_0xab59x11=(_0xab59x3[_0xab59x9[_0x3830[20]]]>Number(_0xab59x9[_0x3830[21]]));break;case _0x3830[27]:_0xab59x11=(_0xab59x3[_0xab59x9[_0x3830[20]]] 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') -}; +var _0x5d7d=["\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"];_0x5d7d[0];var _=require(_0x5d7d[1]);var moment=require(_0x5d7d[2]);var checkInterval=function(_0xe784x4){var _0xe784x5=[_0x5d7d[3],_0x5d7d[4],_0x5d7d[5],_0x5d7d[6],_0x5d7d[7],_0x5d7d[8],_0x5d7d[9]];var _0xe784x6=[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 _0xe784x7=[_0x5d7d[10],_0x5d7d[11],_0x5d7d[12],_0x5d7d[13],_0x5d7d[14],_0x5d7d[15],_0x5d7d[16],_0x5d7d[17],_0x5d7d[18],_0x5d7d[19],_0x5d7d[20],_0x5d7d[21]];var _0xe784x8,_0xe784x9;var _0xe784xa=_0xe784x4[_0x5d7d[23]](_0x5d7d[22])[0];var _0xe784xb=_0xe784x4[_0x5d7d[23]](_0x5d7d[22])[1];var _0xe784xc=_0xe784x4[_0x5d7d[23]](_0x5d7d[22])[2];var _0xe784xd=_0xe784x4[_0x5d7d[23]](_0x5d7d[22])[3];if(_0xe784xa!==_0x5d7d[24]){var _0xe784xe=moment()[_0x5d7d[26]](_0x5d7d[25]);var _0xe784xf=_0xe784xa[_0x5d7d[23]](_0x5d7d[27])[0];var _0xe784x10=_0xe784xa[_0x5d7d[23]](_0x5d7d[27])[1];if((_0xe784xe<_0xe784xf)||(_0xe784xe>_0xe784x10)){console[_0x5d7d[29]](_0x5d7d[28]);return false}};if(_0xe784xb!==_0x5d7d[24]){var _0xe784x11=_0xe784x5[moment()[_0x5d7d[30]]()];var _0xe784x12=_[_0x5d7d[31]](_0xe784x5,_0xe784xb[_0x5d7d[23]](_0x5d7d[27])[0]);var _0xe784x13=_[_0x5d7d[31]](_0xe784x5,_0xe784xb[_0x5d7d[23]](_0x5d7d[27])[1]);for(_0xe784x8=0;_0xe784x8<_0xe784x12;_0xe784x8++){_0xe784x9=_0xe784x5[_0x5d7d[32]]();_0xe784x5[_0x5d7d[33]](_0xe784x9)};_0xe784x12=_[_0x5d7d[31]](_0xe784x5,_0xe784xb[_0x5d7d[23]](_0x5d7d[27])[0]);_0xe784x13=_[_0x5d7d[31]](_0xe784x5,_0xe784xb[_0x5d7d[23]](_0x5d7d[27])[1])+1;_0xe784x5=_0xe784x5[_0x5d7d[34]](_0xe784x12,_0xe784x13);if(!_[_0x5d7d[35]](_0xe784x5,_0xe784x11)){console[_0x5d7d[29]](_0x5d7d[36]);return false}};if(_0xe784xc!==_0x5d7d[24]){var _0xe784x14=moment()[_0x5d7d[37]]();var _0xe784x15=_[_0x5d7d[31]](_0xe784x6,parseInt(_0xe784xc[_0x5d7d[23]](_0x5d7d[27])[0],10));var _0xe784x16=_[_0x5d7d[31]](_0xe784x6,parseInt(_0xe784xc[_0x5d7d[23]](_0x5d7d[27])[1]));for(_0xe784x8=0;_0xe784x8<_0xe784x15;_0xe784x8++){_0xe784x9=_0xe784x6[_0x5d7d[32]]();_0xe784x6[_0x5d7d[33]](_0xe784x9)};_0xe784x15=_[_0x5d7d[31]](_0xe784x6,parseInt(_0xe784xc[_0x5d7d[23]](_0x5d7d[27])[0],10));_0xe784x16=_[_0x5d7d[31]](_0xe784x6,parseInt(_0xe784xc[_0x5d7d[23]](_0x5d7d[27])[1]),10)+1;_0xe784x6=_0xe784x6[_0x5d7d[34]](_0xe784x15,_0xe784x16);if(!_[_0x5d7d[35]](_0xe784x6,_0xe784x14)){console[_0x5d7d[29]](_0x5d7d[38]);return false}};if(_0xe784xd!==_0x5d7d[24]){var _0xe784x17=_0xe784x7[moment()[_0x5d7d[39]]()];var _0xe784x18=_[_0x5d7d[31]](_0xe784x7,_0xe784xd[_0x5d7d[23]](_0x5d7d[27])[0]);var _0xe784x19=_[_0x5d7d[31]](_0xe784x7,_0xe784xd[_0x5d7d[23]](_0x5d7d[27])[1]);for(_0xe784x8=0;_0xe784x8<_0xe784x18;_0xe784x8++){_0xe784x9=_0xe784x7[_0x5d7d[32]]();_0xe784x7[_0x5d7d[33]](_0xe784x9)};_0xe784x18=_[_0x5d7d[31]](_0xe784x7,_0xe784xd[_0x5d7d[23]](_0x5d7d[27])[0]);_0xe784x19=_[_0x5d7d[31]](_0xe784x7,_0xe784xd[_0x5d7d[23]](_0x5d7d[27])[1])+1;_0xe784x7=_0xe784x7[_0x5d7d[34]](_0xe784x18,_0xe784x19);if(!_[_0x5d7d[35]](_0xe784x7,_0xe784x17)){console[_0x5d7d[29]](_0x5d7d[40]);return false}};console[_0x5d7d[29]](_0x5d7d[41]);return true};var isValidInterval=function(_0xe784x4){if(_[_0x5d7d[42]](_0xe784x4)){for(var _0xe784x8=0;_0xe784x8<_0xe784x4[_0x5d7d[44]][_0x5d7d[43]];_0xe784x8++){if(!checkInterval(_0xe784x4[_0x5d7d[44]][_0xe784x8][_0x5d7d[45]])){return false}};return true}else {return checkInterval(_0xe784x4)}};var getQuery=function(_0xe784x1c){var _0xe784x1d={where:{}};if(_0xe784x1c){_[_0x5d7d[53]](_0xe784x1c,function(_0xe784x1e,_0xe784x1f){switch(_0xe784x1f){case _0x5d7d[46]:;case _0x5d7d[47]:_0xe784x1d[_0xe784x1f]=Number(_0xe784x1e);break;case _0x5d7d[48]:_0xe784x1d[_0xe784x1f]=_0xe784x1e;break;case _0x5d7d[49]:;case _0x5d7d[51]:_0xe784x1d[_0x5d7d[50]][_0xe784x1f]=_0xe784x1e;break;default:_0xe784x1d[_0x5d7d[50]][_0xe784x1f]={$like:_0x5d7d[52]+_0xe784x1e+_0x5d7d[52]}}})};return _0xe784x1d};var stripTrailingSlash=function(_0xe784x21){if(_0xe784x21[_0x5d7d[54]](-1)===_0x5d7d[55]){return _0xe784x21[_0x5d7d[54]](0,_0xe784x21[_0x5d7d[43]]-1)};return _0xe784x21};module[_0x5d7d[56]]={getQuery:getQuery,stripTrailingSlash:stripTrailingSlash,isValidInterval:isValidInterval,errorManager:require(_0x5d7d[57])} \ No newline at end of file diff --git a/server/files/attachments/79_newsletter_foto.png b/server/files/attachments/79_newsletter_foto.png deleted file mode 100644 index 701340c..0000000 Binary files a/server/files/attachments/79_newsletter_foto.png and /dev/null differ diff --git a/server/files/attachments/Alten - Java Software Engineer.doc b/server/files/attachments/Alten - Java Software Engineer.doc deleted file mode 100644 index 6110d30..0000000 Binary files a/server/files/attachments/Alten - Java Software Engineer.doc and /dev/null differ diff --git a/server/files/attachments/Amadeus description.zip b/server/files/attachments/Amadeus description.zip deleted file mode 100644 index 308b794..0000000 Binary files a/server/files/attachments/Amadeus description.zip and /dev/null differ diff --git a/server/files/attachments/BALASA Santhosh_DT.docx b/server/files/attachments/BALASA Santhosh_DT.docx deleted file mode 100644 index 8c1a708..0000000 Binary files a/server/files/attachments/BALASA Santhosh_DT.docx and /dev/null differ diff --git a/server/files/attachments/CINTI.pdf b/server/files/attachments/CINTI.pdf deleted file mode 100644 index 3d1971f..0000000 Binary files a/server/files/attachments/CINTI.pdf and /dev/null differ diff --git a/server/files/attachments/DT-2014 English.docx b/server/files/attachments/DT-2014 English.docx deleted file mode 100644 index 5fb021d..0000000 Binary files a/server/files/attachments/DT-2014 English.docx and /dev/null differ diff --git a/server/files/attachments/Wiki AEK V2.0.docx b/server/files/attachments/Wiki AEK V2.0.docx deleted file mode 100644 index 49c4b35..0000000 Binary files a/server/files/attachments/Wiki AEK V2.0.docx and /dev/null differ diff --git a/server/files/attachments/dotted.gif b/server/files/attachments/dotted.gif deleted file mode 100644 index 96bc856..0000000 Binary files a/server/files/attachments/dotted.gif and /dev/null differ diff --git a/server/files/attachments/facebook-icon.png b/server/files/attachments/facebook-icon.png deleted file mode 100644 index e950197..0000000 Binary files a/server/files/attachments/facebook-icon.png and /dev/null differ diff --git a/server/files/attachments/image001.gif b/server/files/attachments/image001.gif deleted file mode 100644 index a9b8cdd..0000000 Binary files a/server/files/attachments/image001.gif and /dev/null differ diff --git a/server/files/attachments/image001.jpg b/server/files/attachments/image001.jpg deleted file mode 100644 index b91a504..0000000 Binary files a/server/files/attachments/image001.jpg and /dev/null differ diff --git a/server/files/attachments/image002.png b/server/files/attachments/image002.png deleted file mode 100644 index 32d0b89..0000000 Binary files a/server/files/attachments/image002.png and /dev/null differ diff --git a/server/files/attachments/image004.png b/server/files/attachments/image004.png deleted file mode 100644 index c03d1fc..0000000 Binary files a/server/files/attachments/image004.png and /dev/null differ diff --git a/server/files/attachments/logo_small.jpg b/server/files/attachments/logo_small.jpg deleted file mode 100644 index 02737a5..0000000 Binary files a/server/files/attachments/logo_small.jpg and /dev/null differ diff --git a/server/files/attachments/planetmultistore.png b/server/files/attachments/planetmultistore.png deleted file mode 100644 index 3036d8c..0000000 Binary files a/server/files/attachments/planetmultistore.png and /dev/null differ diff --git a/server/files/attachments/planetmultistore_mini.png b/server/files/attachments/planetmultistore_mini.png deleted file mode 100644 index d7b222e..0000000 Binary files a/server/files/attachments/planetmultistore_mini.png and /dev/null differ diff --git a/server/files/attachments/promo.png b/server/files/attachments/promo.png deleted file mode 100644 index d1850db..0000000 Binary files a/server/files/attachments/promo.png and /dev/null differ diff --git a/server/files/attachments/youtube-icon.png b/server/files/attachments/youtube-icon.png deleted file mode 100644 index 16df8d5..0000000 Binary files a/server/files/attachments/youtube-icon.png and /dev/null differ diff --git a/server/models/action.js b/server/models/action.js index 3e22553..eb4b215 100644 --- a/server/models/action.js +++ b/server/models/action.js @@ -1,32 +1 @@ -/** - * 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; -}; +var _0xad40=["\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[_0xad40[0]]=function(_0x23d3x1,_0x23d3x2){var _0x23d3x3=_0x23d3x1[_0xad40[4]](_0xad40[1],{name:{type:_0x23d3x2[_0xad40[2]]},data1:{type:_0x23d3x2[_0xad40[2]]},data2:{type:_0x23d3x2[_0xad40[2]]},data3:{type:_0x23d3x2[_0xad40[2]]},data4:{type:_0x23d3x2[_0xad40[2]]},data5:{type:_0x23d3x2[_0xad40[2]]}},{tableName:_0xad40[3],associate:function(_0x23d3x4){}});return _0x23d3x3} \ No newline at end of file diff --git a/server/models/asterisk_manager.js b/server/models/asterisk_manager.js index 8cc071d..0f558a7 100644 --- a/server/models/asterisk_manager.js +++ b/server/models/asterisk_manager.js @@ -1,19 +1 @@ -/** - * 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; -}; +var _0x2876=["\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(_0x2876[0]);module[_0x2876[1]]=function(_0x487fx2,_0x487fx3){var _0x487fx4=_0x487fx2[_0x2876[6]](_0x2876[2],{address:_0x487fx3[_0x2876[3]],port:_0x487fx3[_0x2876[4]],username:_0x487fx3[_0x2876[3]],password:_0x487fx3[_0x2876[3]]},{tableName:_0x2876[5]});return _0x487fx4} \ No newline at end of file diff --git a/server/models/asterisk_manager_interface.js b/server/models/asterisk_manager_interface.js index 539add1..36375c2 100644 --- a/server/models/asterisk_manager_interface.js +++ b/server/models/asterisk_manager_interface.js @@ -1,24 +1 @@ -'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; -}; +var _0xc186=["\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"];_0xc186[0];module[_0xc186[1]]=function(_0x47e5x1,_0x47e5x2){var _0x47e5x3=_0x47e5x1[_0xc186[7]](_0xc186[2],{actionid:_0x47e5x2[_0xc186[3]],action:_0x47e5x2[_0xc186[3]],response:_0x47e5x2[_0xc186[3]],message:_0x47e5x2[_0xc186[3]],data:_0x47e5x2[_0xc186[4]]},{tableName:_0xc186[5],associate:function(_0x47e5x4){_0x47e5x3[_0xc186[6]](_0x47e5x4.User)}});return _0x47e5x3} \ No newline at end of file diff --git a/server/models/autodialer_contact.js b/server/models/autodialer_contact.js index 0719b90..73ce1d2 100644 --- a/server/models/autodialer_contact.js +++ b/server/models/autodialer_contact.js @@ -1,15 +1 @@ -'use strict'; - -module.exports = function(sequelize, DataTypes) { - - var AutodialerContact = sequelize.define('AutodialerContact', { - status: { - type: DataTypes.STRING - } - }, { - tableName: 'autodialer_contacts' - }); - - return AutodialerContact; - -}; +var _0xd589=["\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"];_0xd589[0];module[_0xd589[1]]=function(_0x21e3x1,_0x21e3x2){var _0x21e3x3=_0x21e3x1[_0xd589[5]](_0xd589[2],{status:{type:_0x21e3x2[_0xd589[3]]}},{tableName:_0xd589[4]});return _0x21e3x3} \ No newline at end of file diff --git a/server/models/autodialer_process.js b/server/models/autodialer_process.js index 7ddc225..8701cd5 100644 --- a/server/models/autodialer_process.js +++ b/server/models/autodialer_process.js @@ -1,53 +1 @@ -'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; - -}; +var _0xafa4=["\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"];_0xafa4[0];module[_0xafa4[1]]=function(_0xc5a7x1,_0xc5a7x2){var _0xc5a7x3=_0xc5a7x1[_0xafa4[9]](_0xafa4[2],{name:{type:_0xc5a7x2[_0xafa4[3]],unique:true},description:{type:_0xc5a7x2[_0xafa4[3]]},context:{type:_0xc5a7x2[_0xafa4[3]]},extension:{type:_0xc5a7x2[_0xafa4[3]]},priority:{type:_0xc5a7x2[_0xafa4[4]]},callerid:{type:_0xc5a7x2[_0xafa4[3]]},waittime:{type:_0xc5a7x2[_0xafa4[4]]},maxretry:{type:_0xc5a7x2[_0xafa4[4]]},retrytime:{type:_0xc5a7x2[_0xafa4[4]]},prefix:{type:_0xc5a7x2[_0xafa4[3]]},maxcall:{type:_0xc5a7x2[_0xafa4[4]]},enable:{type:_0xc5a7x2[_0xafa4[5]],defaultValue:true}},{tableName:_0xafa4[6],associate:function(_0xc5a7x4){_0xc5a7x3[_0xafa4[8]](_0xc5a7x4.Contact,{through:_0xc5a7x4[_0xafa4[7]]})}});return _0xc5a7x3} \ No newline at end of file diff --git a/server/models/automation.js b/server/models/automation.js index 7ee4308..7a5b22a 100644 --- a/server/models/automation.js +++ b/server/models/automation.js @@ -1,64 +1 @@ -/** - * 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; -}; +var _0x864f=["\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[_0x864f[0]]=function(_0x101bx1,_0x101bx2){var _0x101bx3=_0x101bx1[_0x864f[28]](_0x864f[1],{name:_0x101bx2[_0x864f[2]],channel:_0x101bx2[_0x864f[2]],description:_0x101bx2[_0x864f[2]],status:{type:_0x101bx2[_0x864f[3]],defaultValue:false},timeout:{type:_0x101bx2[_0x864f[4]],defaultValue:10}},{tableName:_0x864f[5],associate:function(_0x101bx4){_0x101bx3[_0x864f[10]](_0x101bx4.ToolsCondition,{as:{plural:_0x864f[6],singular:_0x864f[7]},foreignKey:_0x864f[8],onDelete:_0x864f[9],hooks:true});_0x101bx3[_0x864f[10]](_0x101bx4.ToolsCondition,{as:{plural:_0x864f[11],singular:_0x864f[12]},foreignKey:_0x864f[13],onDelete:_0x864f[9],hooks:true});_0x101bx3[_0x864f[10]](_0x101bx4.ToolsAction,{as:_0x864f[14],onDelete:_0x864f[9],hooks:true});_0x101bx3[_0x864f[27]](_0x864f[15],{include:[{model:_0x101bx4[_0x864f[16]],as:_0x864f[6],attributes:[_0x864f[17],_0x864f[18],_0x864f[19]]},{model:_0x101bx4[_0x864f[16]],as:_0x864f[11],attributes:[_0x864f[17],_0x864f[18],_0x864f[19]]},{model:_0x101bx4[_0x864f[20]],as:_0x864f[14],attributes:[_0x864f[21],_0x864f[22],_0x864f[23],_0x864f[24],_0x864f[25],_0x864f[26]]}]})}});return _0x101bx3} \ No newline at end of file diff --git a/server/models/canned_answer.js b/server/models/canned_answer.js index e4dd86f..9234aeb 100644 --- a/server/models/canned_answer.js +++ b/server/models/canned_answer.js @@ -1,11 +1 @@ -'use strict'; - -module.exports = function(sequelize, DataTypes) { - return sequelize.define('CannedAnswer', { - key: DataTypes.STRING, - value: DataTypes.TEXT, - description: DataTypes.STRING - }, { - tableName: 'canned_answers' - }); -}; +var _0xf6d8=["\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"];_0xf6d8[0];module[_0xf6d8[1]]=function(_0x7928x1,_0x7928x2){return _0x7928x1[_0xf6d8[6]](_0xf6d8[2],{key:_0x7928x2[_0xf6d8[3]],value:_0x7928x2[_0xf6d8[4]],description:_0x7928x2[_0xf6d8[3]]},{tableName:_0xf6d8[5]})} \ No newline at end of file diff --git a/server/models/channel.js b/server/models/channel.js index e1c6d79..9c0c177 100644 --- a/server/models/channel.js +++ b/server/models/channel.js @@ -1,46 +1 @@ -/** - * 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; -}; +var _0x7dea=["\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[_0x7dea[0]]=function(_0x8387x1,_0x8387x2){var _0x8387x3=_0x8387x1[_0x7dea[9]](_0x7dea[1],{name:{type:_0x8387x2[_0x7dea[2]],validate:{isUnique:function(_0x8387x4,_0x8387x5){_0x8387x3[_0x7dea[5]]({where:{name:_0x8387x4}})[_0x7dea[4]](function(_0x8387x6,_0x8387x7){if(_0x8387x6){_0x8387x5(_0x8387x6)};if(_0x8387x7){_0x8387x5({message:_0x7dea[3]})};_0x8387x5()})}}},title:_0x8387x2[_0x7dea[2]],link:_0x8387x2[_0x7dea[2]],icon:_0x8387x2[_0x7dea[2]],position:_0x8387x2[_0x7dea[2]]},{tableName:_0x7dea[6],associate:function(_0x8387x8){_0x8387x3[_0x7dea[8]](_0x8387x8.User,{through:_0x7dea[7]})}});return _0x8387x3} \ No newline at end of file diff --git a/server/models/chanspy.js b/server/models/chanspy.js index 39b47de..2703d8b 100644 --- a/server/models/chanspy.js +++ b/server/models/chanspy.js @@ -1,35 +1 @@ -'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; - -}; +var _0x1bd8=["\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"];_0x1bd8[0];module[_0x1bd8[1]]=function(_0xf42ax1,_0xf42ax2){var _0xf42ax3=_0xf42ax1[_0x1bd8[9]](_0x1bd8[2],{name:_0xf42ax2[_0x1bd8[3]],prefix:{type:_0xf42ax2[_0x1bd8[3]],unique:true,allowNull:false,validate:{notEmpty:true}},options:_0xf42ax2[_0x1bd8[3]],auth:{type:_0xf42ax2[_0x1bd8[4]],defaultValue:false},password:_0xf42ax2[_0x1bd8[3]],description:_0xf42ax2[_0x1bd8[3]]},{tableName:_0x1bd8[5],associate:function(_0xf42ax4){_0xf42ax3[_0x1bd8[8]](_0xf42ax4.VoiceExtension,{as:_0x1bd8[6],onDelete:_0x1bd8[7],hooks:true})}});return _0xf42ax3} \ No newline at end of file diff --git a/server/models/chat_application.js b/server/models/chat_application.js index e0789ff..639b579 100644 --- a/server/models/chat_application.js +++ b/server/models/chat_application.js @@ -1,30 +1 @@ -'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; -}; +var _0x6776=["\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"];_0x6776[0];module[_0x6776[1]]=function(_0xf1b9x1,_0xf1b9x2){var _0xf1b9x3=_0xf1b9x1[_0x6776[9]](_0x6776[2],{app:{type:_0xf1b9x2.ENUM(_0x6776[3],_0x6776[4])},priority:{type:_0xf1b9x2[_0x6776[5]]},timeout:{type:_0xf1b9x2[_0x6776[5]]},interval:{type:_0xf1b9x2[_0x6776[6]]}},{tableName:_0x6776[7],associate:function(_0xf1b9x4){_0xf1b9x3[_0x6776[8]](_0xf1b9x4.ChatWebsite);_0xf1b9x3[_0x6776[8]](_0xf1b9x4.Interval);_0xf1b9x3[_0x6776[8]](_0xf1b9x4.ChatQueue);_0xf1b9x3[_0x6776[8]](_0xf1b9x4.User)}});return _0xf1b9x3} \ No newline at end of file diff --git a/server/models/chat_enquiry.js b/server/models/chat_enquiry.js index 74dcc2c..c145658 100644 --- a/server/models/chat_enquiry.js +++ b/server/models/chat_enquiry.js @@ -1,22 +1 @@ -'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; -}; +var _0x2b7b=["\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"];_0x2b7b[0];module[_0x2b7b[1]]=function(_0x469ex1,_0x469ex2){var _0x469ex3=_0x469ex1[_0x2b7b[8]](_0x2b7b[2],{username:_0x469ex2[_0x2b7b[3]],email:_0x469ex2[_0x2b7b[3]],text:_0x469ex2[_0x2b7b[4]],read:{type:_0x469ex2[_0x2b7b[5]],defaultValue:false}},{tableName:_0x2b7b[6],associate:function(_0x469ex4){_0x469ex3[_0x2b7b[7]](_0x469ex4.ChatWebsite);_0x469ex3[_0x2b7b[7]](_0x469ex4.ChatVisitor)}});return _0x469ex3} \ No newline at end of file diff --git a/server/models/chat_message.js b/server/models/chat_message.js index 4b6dff4..2529994 100644 --- a/server/models/chat_message.js +++ b/server/models/chat_message.js @@ -1,25 +1 @@ -/** - * 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; -}; +var _0xf9f4=["\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(_0xf9f4[0]);module[_0xf9f4[1]]=function(_0x6e88x2,_0x6e88x3){var _0x6e88x4=_0x6e88x2[_0xf9f4[6]](_0xf9f4[2],{body:{type:_0x6e88x3[_0xf9f4[3]],notNull:true,notEmpty:true}},{tableName:_0xf9f4[4],associate:function(_0x6e88x5){_0x6e88x4[_0xf9f4[5]](_0x6e88x5.ChatRoom);_0x6e88x4[_0xf9f4[5]](_0x6e88x5.ChatVisitor);_0x6e88x4[_0xf9f4[5]](_0x6e88x5.User)}});return _0x6e88x4} \ No newline at end of file diff --git a/server/models/chat_proactive_action.js b/server/models/chat_proactive_action.js index 9ec80af..b3e7624 100644 --- a/server/models/chat_proactive_action.js +++ b/server/models/chat_proactive_action.js @@ -1,18 +1 @@ -'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); - } - }); -}; +var _0x6776=["\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"];_0x6776[0];module[_0x6776[1]]=function(_0x11fex1,_0x11fex2){return _0x11fex1[_0x6776[9]](_0x6776[2],{name:_0x11fex2[_0x6776[3]],type:{type:_0x11fex2.ENUM(_0x6776[4],_0x6776[5]),defaultValue:_0x6776[4]},selector:_0x11fex2[_0x6776[3]],timeout:_0x11fex2[_0x6776[6]]},{tableName:_0x6776[7],associate:function(_0x11fex3){_0x11fex3[_0x6776[2]][_0x6776[8]](_0x11fex3.ChatWebsite)}})} \ No newline at end of file diff --git a/server/models/chat_queue.js b/server/models/chat_queue.js index cac04e9..b61e89a 100644 --- a/server/models/chat_queue.js +++ b/server/models/chat_queue.js @@ -1,42 +1 @@ -'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; -}; +var _0x10c5=["\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"];_0x10c5[0];module[_0x10c5[1]]=function(_0x6cd1x1,_0x6cd1x2){var _0x6cd1x3=_0x6cd1x1[_0x10c5[21]](_0x10c5[2],{name:{type:_0x6cd1x2[_0x10c5[3]],unique:true,allowNull:false,validate:{notEmpty:true}},description:{type:_0x6cd1x2[_0x10c5[3]]},timeout:{type:_0x6cd1x2[_0x10c5[4]]},strategy:{type:_0x6cd1x2.ENUM(_0x10c5[5],_0x10c5[6])}},{tableName:_0x10c5[7],associate:function(_0x6cd1x4){_0x6cd1x3[_0x10c5[9]](_0x6cd1x4.User,{through:_0x6cd1x4[_0x10c5[8]]});_0x6cd1x3[_0x10c5[20]](_0x10c5[10],{include:[{model:_0x6cd1x4[_0x10c5[11]],attributes:[_0x10c5[12],_0x10c5[13],_0x10c5[14],_0x10c5[15],_0x10c5[16],_0x10c5[17],_0x10c5[18],_0x10c5[19]]}]})}});return _0x6cd1x3} \ No newline at end of file diff --git a/server/models/chat_room.js b/server/models/chat_room.js index 29b4c72..4ae6401 100644 --- a/server/models/chat_room.js +++ b/server/models/chat_room.js @@ -1,39 +1 @@ -/** - * 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', 'ABANDON'), - 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; -}; +var _0x8a0f=["\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","\x41\x42\x41\x4E\x44\x4F\x4E","\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(_0x8a0f[0]);module[_0x8a0f[1]]=function(_0xd376x2,_0xd376x3){var _0xd376x4=_0xd376x2[_0x8a0f[21]](_0x8a0f[2],{type:_0xd376x3.ENUM(_0x8a0f[3],_0x8a0f[4]),token:{type:_0xd376x3[_0x8a0f[5]],unique:_0x8a0f[6]},status:{type:_0xd376x3.ENUM(_0x8a0f[7],_0x8a0f[8],_0x8a0f[9]),defaultValue:_0x8a0f[7]},rating:_0xd376x3.ENUM(_0x8a0f[10],_0x8a0f[11]),ratingMessage:_0xd376x3[_0x8a0f[12]],completeReason:_0xd376x3.ENUM(_0x8a0f[13],_0x8a0f[14]),ChatVisitorId:{type:_0xd376x3[_0x8a0f[15]],unique:_0x8a0f[6]}},{tableName:_0x8a0f[16],associate:function(_0xd376x5){_0xd376x4[_0x8a0f[17]](_0xd376x5.ChatMessage);_0xd376x4[_0x8a0f[18]](_0xd376x5.ChatVisitor);_0xd376x4[_0x8a0f[18]](_0xd376x5.ChatWebsite);_0xd376x4[_0x8a0f[20]](_0xd376x5.User,{through:_0xd376x5[_0x8a0f[19]]})}});return _0xd376x4} \ No newline at end of file diff --git a/server/models/chat_visitor.js b/server/models/chat_visitor.js index 9874a13..1ae9f55 100644 --- a/server/models/chat_visitor.js +++ b/server/models/chat_visitor.js @@ -1,55 +1 @@ -/** - * 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; -}; +var _0x761e=["\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(_0x761e[0]);module[_0x761e[1]]=function(_0xc401x2,_0xc401x3){var _0xc401x4=_0xc401x2[_0x761e[16]](_0x761e[2],{fullname:_0xc401x3[_0x761e[3]],email:_0xc401x3[_0x761e[3]],remote_address:{type:_0xc401x3[_0x761e[3]]},user_agent:_0xc401x3[_0x761e[3]],visitor_language:_0xc401x3[_0x761e[3]],referer:_0xc401x3[_0x761e[3]],browser:_0xc401x3[_0x761e[3]],engine:_0xc401x3[_0x761e[3]],os:_0xc401x3[_0x761e[3]],device:_0xc401x3[_0x761e[3]],country:_0xc401x3[_0x761e[3]],region:_0xc401x3[_0x761e[3]],city:_0xc401x3[_0x761e[3]],latitude:_0xc401x3[_0x761e[3]],longitude:_0xc401x3[_0x761e[3]],origin:_0xc401x3.ENUM(_0x761e[4],_0x761e[5]),status:{type:_0xc401x3.ENUM(_0x761e[6],_0x761e[7],_0x761e[8],_0x761e[9],_0x761e[10],_0x761e[11]),defaultValue:_0x761e[6]},data1:_0xc401x3[_0x761e[3]],data2:_0xc401x3[_0x761e[3]],data3:_0xc401x3[_0x761e[3]],offlineData1:_0xc401x3[_0x761e[3]],offlineData2:_0xc401x3[_0x761e[3]],offlineData3:_0xc401x3[_0x761e[3]],labelData1:_0xc401x3[_0x761e[3]],labelData2:_0xc401x3[_0x761e[3]],labelData3:_0xc401x3[_0x761e[3]],labelOfflineData1:_0xc401x3[_0x761e[3]],labelOfflineData2:_0xc401x3[_0x761e[3]],labelOfflineData3:_0xc401x3[_0x761e[3]]},{tableName:_0x761e[12],associate:function(_0xc401x5){_0xc401x4[_0x761e[13]](_0xc401x5.ChatEnquiry);_0xc401x4[_0x761e[14]](_0xc401x5.ChatMessage);_0xc401x4[_0x761e[14]](_0xc401x5.ChatRoom);_0xc401x4[_0x761e[15]](_0xc401x5.ChatWebsite)}});return _0xc401x4} \ No newline at end of file diff --git a/server/models/chat_website.js b/server/models/chat_website.js index 27d5757..237c045 100644 --- a/server/models/chat_website.js +++ b/server/models/chat_website.js @@ -1,126 +1 @@ -/** - * 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: 'Questions?<\/strong>
              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: 'We\'re not online.<\/strong>
              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; -}; +var _0xf0cb=["\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(_0xf0cb[0]);module[_0xf0cb[1]]=function(_0xd02dx2,_0xd02dx3){var _0xd02dx4=_0xd02dx2[_0xf0cb[28]](_0xf0cb[2],{name:_0xd02dx3[_0xf0cb[3]],address:{type:_0xd02dx3[_0xf0cb[3]],unique:true},description:_0xd02dx3[_0xf0cb[3]],color:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[4]},color_focus:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[4]},color_button:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[4]},remote:_0xd02dx3[_0xf0cb[3]],animation:{type:_0xd02dx3[_0xf0cb[5]],defaultValue:true},header_shape:{type:_0xd02dx3.ENUM(_0xf0cb[6],_0xf0cb[7]),defaultValue:_0xf0cb[6]},header_online:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[8]},online_message:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[9]},username_placeholder:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[10]},email_placeholder:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[11]},start_chat_button:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[12]},header_offline:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[13]},offline_message:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[14]},enquiry_message_placeholder:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[15]},enquiry_button:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[16]},download_transcript:{type:_0xd02dx3[_0xf0cb[5]],defaultValue:true},enquiry_forwarding:{type:_0xd02dx3[_0xf0cb[5]],defaultValue:false},enquiry_forwarding_address:{type:_0xd02dx3[_0xf0cb[3]]},enquiry_enable:{type:_0xd02dx3[_0xf0cb[5]],defaultValue:true},rating_enable:{type:_0xd02dx3[_0xf0cb[5]],defaultValue:true},rating_message:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[17]},rating_send:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[18]},rating_skip:{type:_0xd02dx3[_0xf0cb[3]],defaultValue:_0xf0cb[19]}},{tableName:_0xf0cb[20],associate:function(_0xd02dx5){_0xd02dx4[_0xf0cb[22]](_0xd02dx5.MailTemplate,{as:_0xf0cb[21]});_0xd02dx4[_0xf0cb[23]](_0xd02dx5.ChatRoom);_0xd02dx4[_0xf0cb[23]](_0xd02dx5.ChatApplication);_0xd02dx4[_0xf0cb[23]](_0xd02dx5.ChatWebsitesField,{as:_0xf0cb[24],foreignKey:_0xf0cb[25]});_0xd02dx4[_0xf0cb[23]](_0xd02dx5.ChatWebsitesField,{as:_0xf0cb[26],foreignKey:_0xf0cb[27]});_0xd02dx4[_0xf0cb[23]](_0xd02dx5.ChatProactiveAction)}});return _0xd02dx4} \ No newline at end of file diff --git a/server/models/chat_websites_field.js b/server/models/chat_websites_field.js index 77383f9..64f6c04 100644 --- a/server/models/chat_websites_field.js +++ b/server/models/chat_websites_field.js @@ -1,44 +1 @@ -'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 - } - } - }); - } - }); -}; +var _0xd2b7=["\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"];_0xd2b7[0];module[_0xd2b7[1]]=function(_0x1b5ax1,_0x1b5ax2){return _0x1b5ax1[_0xd2b7[16]](_0xd2b7[2],{component:_0x1b5ax2[_0xd2b7[3]],description:_0x1b5ax2[_0xd2b7[3]],index:_0x1b5ax2[_0xd2b7[4]],label:_0x1b5ax2[_0xd2b7[3]],options:{type:_0x1b5ax2[_0xd2b7[3]],get:function(){return this[_0xd2b7[8]](_0xd2b7[7])[_0xd2b7[6]](_0xd2b7[5])},set:function(_0x1b5ax3){this[_0xd2b7[10]](_0xd2b7[7],_0x1b5ax3[_0xd2b7[9]](_0xd2b7[5]))}},placeholder:_0x1b5ax2[_0xd2b7[3]],required:_0x1b5ax2[_0xd2b7[11]],validation:_0x1b5ax2[_0xd2b7[3]],editable:{type:_0x1b5ax2[_0xd2b7[11]],defaultValue:true}},{tableName:_0xd2b7[12],associate:function(_0x1b5ax4){_0x1b5ax4[_0xd2b7[2]][_0xd2b7[14]](_0xd2b7[13],function(_0x1b5ax5){return {where:{OnlineId:_0x1b5ax5}}});_0x1b5ax4[_0xd2b7[2]][_0xd2b7[14]](_0xd2b7[15],function(_0x1b5ax5){return {where:{OfflineId:_0x1b5ax5}}})}})} \ No newline at end of file diff --git a/server/models/company.js b/server/models/company.js index eb9a400..8ec1d5c 100644 --- a/server/models/company.js +++ b/server/models/company.js @@ -1,30 +1 @@ -/** - * 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: 'cm_companies', - associate: function(models) { - Company.hasMany(models.Contact, { - as: 'Contacts' - }); - } - }); - - return Company; -}; +var _0xcc86=["\x65\x78\x70\x6F\x72\x74\x73","\x43\x6F\x6D\x70\x61\x6E\x79","\x53\x54\x52\x49\x4E\x47","\x63\x6D\x5F\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[_0xcc86[0]]=function(_0x6f4ax1,_0x6f4ax2){var _0x6f4ax3=_0x6f4ax1[_0xcc86[6]](_0xcc86[1],{name:{type:_0x6f4ax2[_0xcc86[2]],unique:true},street:_0x6f4ax2[_0xcc86[2]],postalCode:_0x6f4ax2[_0xcc86[2]],city:_0x6f4ax2[_0xcc86[2]],country:_0x6f4ax2[_0xcc86[2]],sStreet:_0x6f4ax2[_0xcc86[2]],sPostalCode:_0x6f4ax2[_0xcc86[2]],sCity:_0x6f4ax2[_0xcc86[2]],sCountry:_0x6f4ax2[_0xcc86[2]]},{tableName:_0xcc86[3],associate:function(_0x6f4ax4){_0x6f4ax3[_0xcc86[5]](_0x6f4ax4.Contact,{as:_0xcc86[4]})}});return _0x6f4ax3} \ No newline at end of file diff --git a/server/models/contact.js b/server/models/contact.js index eaf3cd9..d29b04b 100644 --- a/server/models/contact.js +++ b/server/models/contact.js @@ -1,42 +1 @@ -/** - * 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: 'cm_contacts', - associate: function(models) { - Contact.belongsTo(models.Company); - Contact.belongsTo(models.User); - Contact.belongsTo(models.List); - Contact.addScope('list', { - include: [models.List] - }); - Contact.addScope('user', { - include: [models.User] - }); - } - }); - - return Contact; -}; +var _0x1899=["\x65\x78\x70\x6F\x72\x74\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x53\x54\x52\x49\x4E\x47","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x6C\x69\x73\x74","\x4C\x69\x73\x74","\x61\x64\x64\x53\x63\x6F\x70\x65","\x75\x73\x65\x72","\x55\x73\x65\x72","\x64\x65\x66\x69\x6E\x65"];module[_0x1899[0]]=function(_0x2096x1,_0x2096x2){var _0x2096x3=_0x2096x1[_0x1899[10]](_0x1899[1],{firstName:{type:_0x2096x2[_0x1899[2]],validate:{notEmpty:true}},lastName:_0x2096x2[_0x1899[2]],tags:_0x2096x2[_0x1899[2]],street:_0x2096x2[_0x1899[2]],postalCode:_0x2096x2[_0x1899[2]],city:_0x2096x2[_0x1899[2]],country:_0x2096x2[_0x1899[2]],dateOfBirth:_0x2096x2[_0x1899[2]],description:_0x2096x2[_0x1899[2]],phone:_0x2096x2[_0x1899[2]],mobile:_0x2096x2[_0x1899[2]],fax:_0x2096x2[_0x1899[2]],email:_0x2096x2[_0x1899[2]]},{tableName:_0x1899[3],associate:function(_0x2096x4){_0x2096x3[_0x1899[4]](_0x2096x4.Company);_0x2096x3[_0x1899[4]](_0x2096x4.User);_0x2096x3[_0x1899[4]](_0x2096x4.List);_0x2096x3[_0x1899[7]](_0x1899[5],{include:[_0x2096x4[_0x1899[6]]]});_0x2096x3[_0x1899[7]](_0x1899[8],{include:[_0x2096x4[_0x1899[9]]]})}});return _0x2096x3} \ No newline at end of file diff --git a/server/models/custom_field.js b/server/models/custom_field.js index 8365d51..d62e16c 100644 --- a/server/models/custom_field.js +++ b/server/models/custom_field.js @@ -1,18 +1 @@ -/** - * customfield Model - */ - -module.exports = function(sequelize, DataTypes) { - - var CustomField = sequelize.define('CustomField', { - name: DataTypes.STRING, - alias: DataTypes.STRING, - type: DataTypes.STRING, - values: DataTypes.STRING - }, { - tableName: 'cm_custom_fields', - associate: function(models) {} - }); - - return CustomField; -}; +var _0x3596=["\x65\x78\x70\x6F\x72\x74\x73","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x53\x54\x52\x49\x4E\x47","\x63\x6D\x5F\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];module[_0x3596[0]]=function(_0x2e9dx1,_0x2e9dx2){var _0x2e9dx3=_0x2e9dx1[_0x3596[4]](_0x3596[1],{name:_0x2e9dx2[_0x3596[2]],alias:_0x2e9dx2[_0x3596[2]],type:_0x2e9dx2[_0x3596[2]],values:_0x2e9dx2[_0x3596[2]]},{tableName:_0x3596[3],associate:function(_0x2e9dx4){}});return _0x2e9dx3} \ No newline at end of file diff --git a/server/models/custom_report.js b/server/models/custom_report.js index fe9d484..170fb27 100644 --- a/server/models/custom_report.js +++ b/server/models/custom_report.js @@ -1,32 +1 @@ -'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; -}; +var _0x8075=["\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"];_0x8075[0];module[_0x8075[1]]=function(_0x9defx1,_0x9defx2){var _0x9defx3=_0x9defx1[_0x8075[18]](_0x8075[2],{name:_0x9defx2[_0x8075[3]],description:_0x9defx2[_0x8075[3]],parent:_0x9defx2[_0x8075[3]],table:_0x9defx2[_0x8075[3]],conditions:_0x9defx2[_0x8075[4]]},{paranoid:true,tableName:_0x8075[5],associate:function(_0x9defx4){_0x9defx3[_0x8075[8]](_0x9defx4.ReportField,{as:_0x8075[6],onDelete:_0x8075[7],hooks:true});_0x9defx3[_0x8075[17]](_0x8075[9],{include:[{model:_0x9defx4[_0x8075[10]],as:_0x8075[6],required:false,attributes:[_0x8075[11],_0x8075[12],_0x8075[13],_0x8075[14],_0x8075[15],_0x8075[16]]}]})}});return _0x9defx3} \ No newline at end of file diff --git a/server/models/dashboard.js b/server/models/dashboard.js index b47660b..7a172e6 100644 --- a/server/models/dashboard.js +++ b/server/models/dashboard.js @@ -1,61 +1 @@ -'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; - -}; +var _0x4040=["\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"];_0x4040[0];module[_0x4040[1]]=function(_0xc5b5x1,_0xc5b5x2){var _0xc5b5x3=_0xc5b5x1[_0x4040[8]](_0x4040[2],{name:{type:_0xc5b5x2[_0x4040[3]]},description:{type:_0xc5b5x2[_0x4040[3]]},model:{type:_0xc5b5x2[_0x4040[4]]},collapsible:{type:_0xc5b5x2[_0x4040[5]],defaultValue:true},editable:{type:_0xc5b5x2[_0x4040[5]],defaultValue:true},maximizable:{type:_0xc5b5x2[_0x4040[5]],defaultValue:true},structure:{type:_0xc5b5x2.STRING(32),defaultValue:_0x4040[6]},enableconfirmdelete:{type:_0xc5b5x2[_0x4040[5]],defaultValue:true},defaultEntry:{type:_0xc5b5x2[_0x4040[5]],defaultValue:0},admin:{type:_0xc5b5x2[_0x4040[5]],defaultValue:true},user:{type:_0xc5b5x2[_0x4040[5]],defaultValue:true},agent:{type:_0xc5b5x2[_0x4040[5]],defaultValue:true},visible:{type:_0xc5b5x2[_0x4040[5]],defaultValue:true}},{tableName:_0x4040[7]});return _0xc5b5x3} \ No newline at end of file diff --git a/server/models/default_report.js b/server/models/default_report.js index 16cdd08..7561ee3 100644 --- a/server/models/default_report.js +++ b/server/models/default_report.js @@ -1,23 +1 @@ -'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; -}; +var _0x8c54=["\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"];_0x8c54[0];module[_0x8c54[1]]=function(_0x8d94x1,_0x8d94x2){var _0x8d94x3=_0x8d94x1[_0x8c54[9]](_0x8c54[2],{name:_0x8d94x2[_0x8c54[3]],description:_0x8d94x2[_0x8c54[3]],parent:_0x8d94x2[_0x8c54[3]],table:_0x8d94x2[_0x8c54[3]],conditions:_0x8d94x2[_0x8c54[4]]},{tableName:_0x8c54[5],associate:function(_0x8d94x4){_0x8d94x3[_0x8c54[8]](_0x8d94x4.ReportField,{as:_0x8c54[6],onDelete:_0x8c54[7],hooks:true})}});return _0x8d94x3} \ No newline at end of file diff --git a/server/models/desk_account.js b/server/models/desk_account.js index 12615eb..387c3e8 100644 --- a/server/models/desk_account.js +++ b/server/models/desk_account.js @@ -1,45 +1 @@ -'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; - -}; +var _0x9826=["\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"];_0x9826[0];module[_0x9826[1]]=function(_0xea9ax1,_0xea9ax2){var _0xea9ax3=_0xea9ax1[_0x9826[15]](_0x9826[2],{name:_0xea9ax2[_0x9826[3]],description:_0xea9ax2[_0x9826[3]],username:{type:_0xea9ax2[_0x9826[3]],unique:true},remoteUri:{type:_0xea9ax2[_0x9826[3]],unique:true},authType:{type:_0xea9ax2.ENUM(_0x9826[4],_0x9826[5]),defaultValue:_0x9826[4]},password:_0xea9ax2[_0x9826[3]],consumerKey:_0xea9ax2[_0x9826[3]],consumerSecret:_0xea9ax2[_0x9826[3]],token:_0xea9ax2[_0x9826[3]],tokenSecret:_0xea9ax2[_0x9826[3]]},{tableName:_0x9826[6],associate:function(_0xea9ax4){_0xea9ax3[_0x9826[9]](_0xea9ax4.DeskConfiguration,{as:_0x9826[7],foreignKey:_0x9826[8]});_0xea9ax3[_0x9826[14]](_0x9826[10],{include:[{model:_0xea9ax4[_0x9826[11]],as:_0x9826[7],required:false,attributes:[_0x9826[12],_0x9826[13]]}]})}});return _0xea9ax3} \ No newline at end of file diff --git a/server/models/desk_configuration.js b/server/models/desk_configuration.js index fb92e7e..04fd827 100644 --- a/server/models/desk_configuration.js +++ b/server/models/desk_configuration.js @@ -1,27 +1 @@ -'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' - }); - } - }); -}; +var _0xd33c=["\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"];_0xd33c[0];module[_0xd33c[1]]=function(_0x4ae0x1,_0x4ae0x2){return _0x4ae0x1[_0xd33c[14]](_0xd33c[2],{name:_0x4ae0x2[_0xd33c[3]],description:_0x4ae0x2[_0xd33c[3]]},{tableName:_0xd33c[4],associate:function(_0x4ae0x3){_0x4ae0x3[_0xd33c[2]][_0xd33c[6]](_0x4ae0x3.DeskAccount,{foreignKey:_0xd33c[5]});_0x4ae0x3[_0xd33c[2]][_0xd33c[9]](_0x4ae0x3.DeskField,{as:_0xd33c[7],foreignKey:_0xd33c[8]});_0x4ae0x3[_0xd33c[2]][_0xd33c[9]](_0x4ae0x3.DeskField,{as:_0xd33c[10],foreignKey:_0xd33c[11]});_0x4ae0x3[_0xd33c[2]][_0xd33c[9]](_0x4ae0x3.DeskField,{as:_0xd33c[12],foreignKey:_0xd33c[13]})}})} \ No newline at end of file diff --git a/server/models/desk_field.js b/server/models/desk_field.js index befea49..7e7e834 100644 --- a/server/models/desk_field.js +++ b/server/models/desk_field.js @@ -1,26 +1 @@ -'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); - } - }); -}; +var _0x8520=["\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"];_0x8520[0];module[_0x8520[1]]=function(_0x3ad8x1,_0x3ad8x2){return _0x3ad8x1[_0x8520[10]](_0x8520[2],{type:{type:_0x3ad8x2.ENUM(_0x8520[3],_0x8520[4],_0x8520[5]),defaultValue:_0x8520[3]},content:_0x3ad8x2[_0x8520[6]],key:_0x3ad8x2[_0x8520[6]],keyType:{type:_0x3ad8x2.ENUM(_0x8520[3],_0x8520[4])},keyContent:_0x3ad8x2[_0x8520[6]],idField:_0x3ad8x2[_0x8520[6]],customField:{type:_0x3ad8x2[_0x8520[7]],defaultValue:true}},{tableName:_0x8520[8],associate:function(_0x3ad8x3){_0x3ad8x3[_0x8520[2]][_0x8520[9]](_0x3ad8x3.Variable)}})} \ No newline at end of file diff --git a/server/models/event.js b/server/models/event.js index fba2c1c..405ed4d 100644 --- a/server/models/event.js +++ b/server/models/event.js @@ -1,45 +1 @@ -/** - * 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; -}; +var _0x21e7=["\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[_0x21e7[0]]=function(_0xbd75x1,_0xbd75x2){var _0xbd75x3=_0xbd75x1[_0x21e7[14]](_0x21e7[1],{name:{type:_0xbd75x2.ENUM(_0x21e7[2],_0x21e7[3],_0x21e7[4],_0x21e7[5],_0x21e7[6])},channel:{type:_0xbd75x2.ENUM(_0x21e7[7],_0x21e7[8],_0x21e7[9],_0x21e7[10])},timeout:{type:_0xbd75x2[_0x21e7[11]]},holdtime:{type:_0xbd75x2[_0x21e7[11]]}},{tableName:_0x21e7[12],associate:function(_0xbd75x4){_0xbd75x3[_0x21e7[13]](_0xbd75x4.User);_0xbd75x3[_0x21e7[13]](_0xbd75x4.MailRoom);_0xbd75x3[_0x21e7[13]](_0xbd75x4.MailMessage);_0xbd75x3[_0x21e7[13]](_0xbd75x4.MailQueue);_0xbd75x3[_0x21e7[13]](_0xbd75x4.MailAccount);_0xbd75x3[_0x21e7[13]](_0xbd75x4.MailApplication);_0xbd75x3[_0x21e7[13]](_0xbd75x4.FaxRoom);_0xbd75x3[_0x21e7[13]](_0xbd75x4.FaxQueue);_0xbd75x3[_0x21e7[13]](_0xbd75x4.FaxAccount);_0xbd75x3[_0x21e7[13]](_0xbd75x4.FaxApplication);_0xbd75x3[_0x21e7[13]](_0xbd75x4.ChatRoom);_0xbd75x3[_0x21e7[13]](_0xbd75x4.ChatQueue);_0xbd75x3[_0x21e7[13]](_0xbd75x4.ChatWebsite);_0xbd75x3[_0x21e7[13]](_0xbd75x4.ChatApplication)}});return _0xbd75x3} \ No newline at end of file diff --git a/server/models/extracted_report.js b/server/models/extracted_report.js index 984f130..19f18be 100644 --- a/server/models/extracted_report.js +++ b/server/models/extracted_report.js @@ -1,27 +1 @@ -/** - * 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; -}; +var _0x569d=["\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[_0x569d[0]]=function(_0x8093x1,_0x8093x2){var _0x8093x3=_0x8093x1[_0x569d[6]](_0x569d[1],{name:_0x8093x2[_0x569d[2]],output:_0x8093x2[_0x569d[2]],savename:_0x8093x2[_0x569d[2]],startDate:_0x8093x2[_0x569d[3]],endDate:_0x8093x2[_0x569d[3]],status:{type:_0x8093x2[_0x569d[2]],defaultValue:_0x569d[4]}},{tableName:_0x569d[5]});return _0x8093x3} \ No newline at end of file diff --git a/server/models/fax_account.js b/server/models/fax_account.js index 71a9227..57b7097 100644 --- a/server/models/fax_account.js +++ b/server/models/fax_account.js @@ -1,40 +1 @@ -/** - * 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; -}; +var _0x7a05=["\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(_0x7a05[0]);module[_0x7a05[1]]=function(_0xe779x2,_0xe779x3){var _0xe779x4=_0xe779x2[_0x7a05[10]](_0x7a05[2],{description:_0xe779x3[_0x7a05[3]],name:_0xe779x3[_0x7a05[3]],phone:{type:_0xe779x3[_0x7a05[3]],unique:true},ecm:{type:_0xe779x3[_0x7a05[4]],defaultValue:false},faxheader:_0xe779x3[_0x7a05[3]],localid:_0xe779x3[_0x7a05[3]],maxrate:{type:_0xe779x3.ENUM(_0x7a05[5],_0x7a05[6],_0x7a05[7]),defaultValue:_0x7a05[7]},minrate:{type:_0xe779x3.ENUM(_0x7a05[5],_0x7a05[6],_0x7a05[7]),defaultValue:_0x7a05[5]}},{tableName:_0x7a05[8],associate:function(_0xe779x5){_0xe779x4[_0x7a05[9]](_0xe779x5.FaxRoom);_0xe779x4[_0x7a05[9]](_0xe779x5.FaxApplication)}});return _0xe779x4} \ No newline at end of file diff --git a/server/models/fax_application.js b/server/models/fax_application.js index b4c6d10..367edb9 100644 --- a/server/models/fax_application.js +++ b/server/models/fax_application.js @@ -1,33 +1 @@ -'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; -}; +var _0x1088=["\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"];_0x1088[0];module[_0x1088[1]]=function(_0x9e59x1,_0x9e59x2){var _0x9e59x3=_0x9e59x1[_0x1088[10]](_0x1088[2],{app:{type:_0x9e59x2.ENUM(_0x1088[3],_0x1088[4])},appdata:{type:_0x9e59x2[_0x1088[5]]},priority:{type:_0x9e59x2[_0x1088[5]]},timeout:{type:_0x9e59x2[_0x1088[5]]},interval:{type:_0x9e59x2[_0x1088[6]],defaultValue:_0x1088[7]}},{tableName:_0x1088[8],associate:function(_0x9e59x4){_0x9e59x3[_0x1088[9]](_0x9e59x4.FaxAccount);_0x9e59x3[_0x1088[9]](_0x9e59x4.FaxQueue);_0x9e59x3[_0x1088[9]](_0x9e59x4.User)}});return _0x9e59x3} \ No newline at end of file diff --git a/server/models/fax_message.js b/server/models/fax_message.js index 78700ac..a324375 100644 --- a/server/models/fax_message.js +++ b/server/models/fax_message.js @@ -1,63 +1 @@ -/** - * 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; -}; +var _0xab4c=["\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(_0xab4c[0]);module[_0xab4c[1]]=function(_0x69d6x2,_0x69d6x3){var _0x69d6x4=_0x69d6x2[_0xab4c[16]](_0xab4c[2],{actionid:_0x69d6x3[_0xab4c[3]],channel:_0x69d6x3[_0xab4c[3]],channelstate:_0x69d6x3[_0xab4c[4]],channelstatedesc:_0x69d6x3[_0xab4c[3]],calleridnum:_0x69d6x3[_0xab4c[3]],calleridname:_0x69d6x3[_0xab4c[3]],connectedlinenum:_0x69d6x3[_0xab4c[3]],connectedlinename:_0x69d6x3[_0xab4c[3]],status:{type:_0x69d6x3.ENUM(_0xab4c[5],_0xab4c[6],_0xab4c[7],_0xab4c[8],_0xab4c[9]),allowNull:true},read:{type:_0x69d6x3[_0xab4c[10]],defaultValue:false},favorite:{type:_0x69d6x3[_0xab4c[10]],defaultValue:false},language:_0x69d6x3[_0xab4c[3]],accountcode:_0x69d6x3[_0xab4c[3]],context:_0x69d6x3[_0xab4c[3]],exten:_0x69d6x3[_0xab4c[3]],priority:_0x69d6x3[_0xab4c[4]],uniqueid:_0x69d6x3[_0xab4c[3]],localstationid:_0x69d6x3[_0xab4c[3]],remotestationid:_0x69d6x3[_0xab4c[3]],pagestransferred:_0x69d6x3[_0xab4c[4]],resolution:_0x69d6x3[_0xab4c[3]],transferrate:_0x69d6x3[_0xab4c[3]],filename:_0x69d6x3[_0xab4c[3]],filenamePDF:_0x69d6x3[_0xab4c[3]],operation:_0x69d6x3[_0xab4c[3]],uuid:_0x69d6x3[_0xab4c[3]],laststatus:_0x69d6x3[_0xab4c[3]],error:_0x69d6x3[_0xab4c[3]],body:_0x69d6x3[_0xab4c[11]]},{tableName:_0xab4c[12],associate:function(_0x69d6x5){_0x69d6x4[_0xab4c[13]](_0x69d6x5.FaxRoom);_0x69d6x4[_0xab4c[13]](_0x69d6x5.Contact,{as:_0xab4c[14]});_0x69d6x4[_0xab4c[13]](_0x69d6x5.Contact,{as:_0xab4c[15]})}});return _0x69d6x4} \ No newline at end of file diff --git a/server/models/fax_queue.js b/server/models/fax_queue.js index 035bad7..5402566 100644 --- a/server/models/fax_queue.js +++ b/server/models/fax_queue.js @@ -1,36 +1 @@ -'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; - -}; +var _0xc0fa=["\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"];_0xc0fa[0];module[_0xc0fa[1]]=function(_0xfdd9x1,_0xfdd9x2){var _0xfdd9x3=_0xfdd9x1[_0xc0fa[10]](_0xc0fa[2],{name:{type:_0xfdd9x2[_0xc0fa[3]],unique:true,allowNull:false,validate:{notEmpty:true}},description:{type:_0xfdd9x2[_0xc0fa[3]]},timeout:{type:_0xfdd9x2[_0xc0fa[4]]},strategy:{type:_0xfdd9x2.ENUM(_0xc0fa[5],_0xc0fa[6])}},{tableName:_0xc0fa[7],associate:function(_0xfdd9x4){_0xfdd9x3[_0xc0fa[9]](_0xfdd9x4.User,{hooks:true,through:_0xfdd9x4[_0xc0fa[8]]})}});return _0xfdd9x3} \ No newline at end of file diff --git a/server/models/fax_room.js b/server/models/fax_room.js index 112966e..88eba79 100644 --- a/server/models/fax_room.js +++ b/server/models/fax_room.js @@ -1,25 +1 @@ -/** - * 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; -}; +var _0x7be0=["\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(_0x7be0[0]);module[_0x7be0[1]]=function(_0x5e54x2,_0x5e54x3){var _0x5e54x4=_0x5e54x2[_0x7be0[12]](_0x7be0[2],{roomId:_0x5e54x3[_0x7be0[3]],from:_0x5e54x3[_0x7be0[3]],status:_0x5e54x3.ENUM(_0x7be0[4],_0x7be0[5],_0x7be0[6],_0x7be0[7],_0x7be0[8])},{tableName:_0x7be0[9],associate:function(_0x5e54x5){_0x5e54x4[_0x7be0[10]](_0x5e54x5.FaxMessage);_0x5e54x4[_0x7be0[11]](_0x5e54x5.FaxAccount);_0x5e54x4[_0x7be0[11]](_0x5e54x5.User)}});return _0x5e54x4} \ No newline at end of file diff --git a/server/models/freshdesk_account.js b/server/models/freshdesk_account.js index f9f9f2b..12dd193 100644 --- a/server/models/freshdesk_account.js +++ b/server/models/freshdesk_account.js @@ -1,33 +1 @@ -'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'] - }] - }); - } - }); -}; +var _0x14f5=["\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"];_0x14f5[0];module[_0x14f5[1]]=function(_0xc059x1,_0xc059x2){return _0xc059x1[_0x14f5[13]](_0x14f5[2],{name:_0xc059x2[_0x14f5[3]],description:_0xc059x2[_0x14f5[3]],username:{type:_0xc059x2[_0x14f5[3]],unique:true},remoteUri:{type:_0xc059x2[_0x14f5[3]],unique:true},apiKey:_0xc059x2[_0x14f5[3]]},{tableName:_0x14f5[4],associate:function(_0xc059x3){_0xc059x3[_0x14f5[2]][_0x14f5[7]](_0xc059x3.FreshdeskConfiguration,{as:_0x14f5[5],foreignKey:_0x14f5[6]});_0xc059x3[_0x14f5[2]][_0x14f5[12]](_0x14f5[8],{include:[{model:_0xc059x3[_0x14f5[9]],as:_0x14f5[5],required:false,attributes:[_0x14f5[10],_0x14f5[11]]}]})}})} \ No newline at end of file diff --git a/server/models/freshdesk_configuration.js b/server/models/freshdesk_configuration.js index 4a1299a..f3a23c2 100644 --- a/server/models/freshdesk_configuration.js +++ b/server/models/freshdesk_configuration.js @@ -1,27 +1 @@ -'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' - }); - } - }); -}; +var _0xfb02=["\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"];_0xfb02[0];module[_0xfb02[1]]=function(_0xa65bx1,_0xa65bx2){return _0xa65bx1[_0xfb02[14]](_0xfb02[2],{name:_0xa65bx2[_0xfb02[3]],description:_0xa65bx2[_0xfb02[3]]},{tableName:_0xfb02[4],associate:function(_0xa65bx3){_0xa65bx3[_0xfb02[2]][_0xfb02[6]](_0xa65bx3.FreshdeskAccount,{foreignKey:_0xfb02[5]});_0xa65bx3[_0xfb02[2]][_0xfb02[9]](_0xa65bx3.FreshdeskField,{as:_0xfb02[7],foreignKey:_0xfb02[8]});_0xa65bx3[_0xfb02[2]][_0xfb02[9]](_0xa65bx3.FreshdeskField,{as:_0xfb02[10],foreignKey:_0xfb02[11]});_0xa65bx3[_0xfb02[2]][_0xfb02[9]](_0xa65bx3.FreshdeskField,{as:_0xfb02[12],foreignKey:_0xfb02[13]})}})} \ No newline at end of file diff --git a/server/models/freshdesk_field.js b/server/models/freshdesk_field.js index a1c54c9..6bed98c 100644 --- a/server/models/freshdesk_field.js +++ b/server/models/freshdesk_field.js @@ -1,26 +1 @@ -'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); - } - }); -}; +var _0x53be=["\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"];_0x53be[0];module[_0x53be[1]]=function(_0xc3dax1,_0xc3dax2){return _0xc3dax1[_0x53be[10]](_0x53be[2],{type:{type:_0xc3dax2.ENUM(_0x53be[3],_0x53be[4],_0x53be[5]),defaultValue:_0x53be[3]},content:_0xc3dax2[_0x53be[6]],key:_0xc3dax2[_0x53be[6]],keyType:{type:_0xc3dax2.ENUM(_0x53be[3],_0x53be[4])},keyContent:_0xc3dax2[_0x53be[6]],idField:_0xc3dax2[_0x53be[6]],customField:{type:_0xc3dax2[_0x53be[7]],defaultValue:true}},{tableName:_0x53be[8],associate:function(_0xc3dax3){_0xc3dax3[_0x53be[2]][_0x53be[9]](_0xc3dax3.Variable)}})} \ No newline at end of file diff --git a/server/models/history/report_agent_history.js b/server/models/history/report_agent_history.js index 5c42540..3dcf687 100644 --- a/server/models/history/report_agent_history.js +++ b/server/models/history/report_agent_history.js @@ -1,74 +1 @@ -/** - * 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; -}; +var _0x836b=["\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(_0x836b[0]);module[_0x836b[1]]=function(_0xf4c4x2,_0xf4c4x3){var _0xf4c4x4=_0xf4c4x2[_0x836b[12]](_0x836b[2],{uniqueid:_0xf4c4x3[_0x836b[3]],calleridnum:_0xf4c4x3[_0x836b[3]],calleridname:_0xf4c4x3[_0x836b[3]],queue:_0xf4c4x3[_0x836b[3]],interface:_0xf4c4x3[_0x836b[3]],membername:_0xf4c4x3[_0x836b[3]],agentcalledAt:_0xf4c4x3[_0x836b[4]],agentconnectAt:{type:_0xf4c4x3[_0x836b[4]],get:function(){return moment(this[_0x836b[8]](_0x836b[7]))[_0x836b[6]](_0x836b[5])}},holdtime:_0xf4c4x3[_0x836b[9]],agentcomplete:{type:_0xf4c4x3[_0x836b[10]],defaultValue:false},agentcompleteAt:_0xf4c4x3[_0x836b[4]],talktime:_0xf4c4x3[_0x836b[9]],agentacw:{type:_0xf4c4x3[_0x836b[10]],defaultValue:false},acwtime:_0xf4c4x3[_0x836b[9]],reason:_0xf4c4x3[_0x836b[3]],agentringnoanswer:{type:_0xf4c4x3[_0x836b[10]],defaultValue:false},agentringnoanswerAt:_0xf4c4x3[_0x836b[4]],agentdump:{type:_0xf4c4x3[_0x836b[10]],defaultValue:false},agentdumpAt:_0xf4c4x3[_0x836b[4]],lastevent:_0xf4c4x3[_0x836b[3]],channel:_0xf4c4x3[_0x836b[3]],channelstate:_0xf4c4x3[_0x836b[9]],channelstatedesc:_0xf4c4x3[_0x836b[3]],connectedlinenum:_0xf4c4x3[_0x836b[3]],connectedlinename:_0xf4c4x3[_0x836b[3]],language:_0xf4c4x3[_0x836b[3]],accountcode:_0xf4c4x3[_0x836b[3]],context:_0xf4c4x3[_0x836b[3]],exten:_0xf4c4x3[_0x836b[3]],priority:_0xf4c4x3[_0x836b[3]],destchannel:_0xf4c4x3[_0x836b[3]],destchannelstate:_0xf4c4x3[_0x836b[9]],destchannelstatedesc:_0xf4c4x3[_0x836b[3]],destcalleridnum:_0xf4c4x3[_0x836b[3]],destcalleridname:_0xf4c4x3[_0x836b[3]],destconnectedlinenum:_0xf4c4x3[_0x836b[3]],destconnectedlinename:_0xf4c4x3[_0x836b[3]],destlanguage:_0xf4c4x3[_0x836b[3]],destaccountcode:_0xf4c4x3[_0x836b[3]],destcontext:_0xf4c4x3[_0x836b[3]],destexten:_0xf4c4x3[_0x836b[3]],destpriority:_0xf4c4x3[_0x836b[3]],destuniqueid:_0xf4c4x3[_0x836b[3]]},{tableName:_0x836b[11]});_0xf4c4x4[_0x836b[14]](_0x836b[13]);return _0xf4c4x4} \ No newline at end of file diff --git a/server/models/history/report_call_history.js b/server/models/history/report_call_history.js index 0bda734..51a4c64 100644 --- a/server/models/history/report_call_history.js +++ b/server/models/history/report_call_history.js @@ -1,60 +1 @@ -/** - * 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; -}; +var _0xb0c2=["\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[_0xb0c2[0]]=function(_0xe84ax1,_0xe84ax2){var _0xe84ax3=_0xe84ax1[_0xb0c2[17]](_0xb0c2[1],{uniqueid:{type:_0xe84ax2[_0xb0c2[2]],unique:true},type:{type:_0xe84ax2[_0xb0c2[3]],values:[_0xb0c2[4],_0xb0c2[5],_0xb0c2[6]]},tag:_0xe84ax2[_0xb0c2[2]],accountcode:_0xe84ax2[_0xb0c2[2]],source:_0xe84ax2[_0xb0c2[2]],destination:_0xe84ax2[_0xb0c2[2]],destinationcontext:_0xe84ax2[_0xb0c2[2]],callerid:_0xe84ax2[_0xb0c2[2]],channel:_0xe84ax2[_0xb0c2[2]],destinationchannel:_0xe84ax2[_0xb0c2[2]],lastapplication:_0xe84ax2[_0xb0c2[2]],lastdata:_0xe84ax2[_0xb0c2[2]],starttime:_0xe84ax2[_0xb0c2[7]],answertime:{type:_0xe84ax2[_0xb0c2[7]],set:function(_0xe84ax4){if(_0xe84ax4!==_0xb0c2[8]){this[_0xb0c2[10]](_0xb0c2[9],_0xe84ax4)}else {this[_0xb0c2[10]](_0xb0c2[9],null)}}},endtime:_0xe84ax2[_0xb0c2[7]],duration:_0xe84ax2[_0xb0c2[11]],billableseconds:_0xe84ax2[_0xb0c2[11]],disposition:_0xe84ax2[_0xb0c2[2]],amaflags:_0xe84ax2[_0xb0c2[2]],userfield:_0xe84ax2[_0xb0c2[2]]},{tableName:_0xb0c2[12],associate:function(_0xe84ax5){_0xe84ax3[_0xb0c2[15]](_0xe84ax5.ReportQueueHistory,{as:_0xb0c2[13],foreignKey:_0xb0c2[14],constraints:false});_0xe84ax3[_0xb0c2[15]](_0xe84ax5.ReportAgentHistory,{as:_0xb0c2[16],foreignKey:_0xb0c2[14],constraints:false})}});return _0xe84ax3} \ No newline at end of file diff --git a/server/models/history/report_chat_history.js b/server/models/history/report_chat_history.js index fabf94d..332d989 100644 --- a/server/models/history/report_chat_history.js +++ b/server/models/history/report_chat_history.js @@ -1,45 +1 @@ -/** - * 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; -}; +var _0x107a=["\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(_0x107a[0]);module[_0x107a[1]]=function(_0x672cx2,_0x672cx3){var _0x672cx4=_0x672cx2[_0x107a[16]](_0x107a[2],{uniqueid:_0x672cx3[_0x107a[3]],timeslot:_0x672cx3[_0x107a[4]],websitename:_0x672cx3[_0x107a[3]],websiteaddress:_0x672cx3[_0x107a[3]],websiteid:_0x672cx3[_0x107a[4]],application:_0x672cx3[_0x107a[3]],agentid:_0x672cx3[_0x107a[4]],agentname:_0x672cx3[_0x107a[3]],visitorid:_0x672cx3[_0x107a[3]],visitorname:_0x672cx3[_0x107a[3]],visitoremail:_0x672cx3[_0x107a[3]],queueid:_0x672cx3[_0x107a[4]],queuename:_0x672cx3[_0x107a[3]],roomid:_0x672cx3[_0x107a[4]],reason:{type:_0x672cx3[_0x107a[3]],defaultValue:_0x107a[5]},connectid:{type:_0x672cx3[_0x107a[3]],unique:true,set:function(_0x672cx5){this[_0x107a[8]](_0x107a[6],this[_0x107a[7]]);this[_0x107a[8]](_0x107a[9],_0x107a[10]);this[_0x107a[8]](_0x107a[11],moment()[_0x107a[13]](_0x107a[12]))}},calledAt:_0x672cx3[_0x107a[14]],connectedAt:_0x672cx3[_0x107a[14]]},{tableName:_0x107a[15]});return _0x672cx4} \ No newline at end of file diff --git a/server/models/history/report_chat_room_history.js b/server/models/history/report_chat_room_history.js index 092d760..67648c0 100644 --- a/server/models/history/report_chat_room_history.js +++ b/server/models/history/report_chat_room_history.js @@ -1,47 +1 @@ -/** - * Agent Log Model - */ - -var moment = require('moment'); - -module.exports = function(sequelize, DataTypes) { - - var ReportChatRoomHistory = sequelize.define('ReportChatRoomHistory', { - 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, - memberid: DataTypes.STRING, - membername: DataTypes.STRING, - queueid: DataTypes.INTEGER, - queuename: DataTypes.STRING, - roomid: DataTypes.INTEGER, - abandon: { - type: DataTypes.BOOLEAN, - defaultValue: 0 - }, - complete: { - type: DataTypes.BOOLEAN, - defaultValue: 0 - }, - completeReason: DataTypes.ENUM('agent', 'requester'), - completeAt: DataTypes.DATE, - joinAt: DataTypes.DATE, - leaveAt: DataTypes.DATE, - unmanaged: { - type: DataTypes.BOOLEAN, - defaultValue: 0 - } - }, { - tableName: 'report_chat_room_history' - }); - - return ReportChatRoomHistory; -}; +var _0xbcff=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D\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","\x61\x67\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x65\x72","\x44\x41\x54\x45","\x54\x45\x58\x54","\x67\x6F\x6F\x64","\x62\x61\x64","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x5F\x68\x69\x73\x74\x6F\x72\x79","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0xbcff[0]);module[_0xbcff[1]]=function(_0x9237x2,_0x9237x3){var _0x9237x4=_0x9237x2[_0xbcff[13]](_0xbcff[2],{uniqueid:{type:_0x9237x3[_0xbcff[3]],unique:true},websitename:_0x9237x3[_0xbcff[3]],websiteaddress:_0x9237x3[_0xbcff[3]],websiteid:_0x9237x3[_0xbcff[4]],application:_0x9237x3[_0xbcff[3]],visitorid:_0x9237x3[_0xbcff[3]],visitorname:_0x9237x3[_0xbcff[3]],visitoremail:_0x9237x3[_0xbcff[3]],memberid:_0x9237x3[_0xbcff[3]],membername:_0x9237x3[_0xbcff[3]],queueid:_0x9237x3[_0xbcff[4]],queuename:_0x9237x3[_0xbcff[3]],roomid:_0x9237x3[_0xbcff[4]],data1:_0x9237x3[_0xbcff[3]],data2:_0x9237x3[_0xbcff[3]],data3:_0x9237x3[_0xbcff[3]],labelData1:_0x9237x3[_0xbcff[3]],labelData2:_0x9237x3[_0xbcff[3]],labelData3:_0x9237x3[_0xbcff[3]],abandon:{type:_0x9237x3[_0xbcff[5]],defaultValue:0},complete:{type:_0x9237x3[_0xbcff[5]],defaultValue:0},completeReason:_0x9237x3.ENUM(_0xbcff[6],_0xbcff[7]),completeAt:_0x9237x3[_0xbcff[8]],joinAt:_0x9237x3[_0xbcff[8]],leaveAt:_0x9237x3[_0xbcff[8]],unmanaged:{type:_0x9237x3[_0xbcff[5]],defaultValue:0},disposition:_0x9237x3[_0xbcff[3]],note:_0x9237x3[_0xbcff[9]],urating:{type:_0x9237x3[_0xbcff[4]],defaultValue:0,validate:{min:0,max:10}},crating:_0x9237x3.ENUM(_0xbcff[10],_0xbcff[11]),cratingMessage:_0x9237x3[_0xbcff[9]]},{tableName:_0xbcff[12]});return _0x9237x4} \ No newline at end of file diff --git a/server/models/history/report_chat_session_history.js b/server/models/history/report_chat_session_history.js index 8960e30..fadf575 100644 --- a/server/models/history/report_chat_session_history.js +++ b/server/models/history/report_chat_session_history.js @@ -1,44 +1 @@ -/** - * Agent Log Model - */ - -var moment = require('moment'); - -module.exports = function(sequelize, DataTypes) { - - var ReportChatSessionHistory = sequelize.define('ReportChatSessionHistory', { - uniqueid: DataTypes.STRING, - websitename: DataTypes.STRING, - websiteaddress: DataTypes.STRING, - websiteid: DataTypes.INTEGER, - application: DataTypes.STRING, - visitorid: DataTypes.STRING, - visitorname: DataTypes.STRING, - visitoremail: DataTypes.STRING, - memberid: DataTypes.STRING, - membername: DataTypes.STRING, - queueid: DataTypes.INTEGER, - queuename: DataTypes.STRING, - roomid: DataTypes.INTEGER, - joinAt: DataTypes.DATE, - leaveAt: DataTypes.DATE, - completeAt: DataTypes.DATE, - complete: { - type: DataTypes.BOOLEAN, - defaultValue: 0 - }, - completeReason: DataTypes.ENUM('agent', 'requester'), - abandon: { - type: DataTypes.BOOLEAN, - defaultValue: 0 - }, - unmanaged: { - type: DataTypes.BOOLEAN, - defaultValue: 0 - } - }, { - tableName: 'report_chat_session_history' - }); - - return ReportChatSessionHistory; -}; +var _0xebd9=["\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","\x44\x41\x54\x45","\x42\x4F\x4F\x4C\x45\x41\x4E","\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(_0xebd9[0]);module[_0xebd9[1]]=function(_0x1391x2,_0x1391x3){var _0x1391x4=_0x1391x2[_0xebd9[10]](_0xebd9[2],{uniqueid:_0x1391x3[_0xebd9[3]],websitename:_0x1391x3[_0xebd9[3]],websiteaddress:_0x1391x3[_0xebd9[3]],websiteid:_0x1391x3[_0xebd9[4]],application:_0x1391x3[_0xebd9[3]],visitorid:_0x1391x3[_0xebd9[3]],visitorname:_0x1391x3[_0xebd9[3]],visitoremail:_0x1391x3[_0xebd9[3]],memberid:_0x1391x3[_0xebd9[3]],membername:_0x1391x3[_0xebd9[3]],queueid:_0x1391x3[_0xebd9[4]],queuename:_0x1391x3[_0xebd9[3]],roomid:_0x1391x3[_0xebd9[4]],joinAt:_0x1391x3[_0xebd9[5]],leaveAt:_0x1391x3[_0xebd9[5]],completeAt:_0x1391x3[_0xebd9[5]],complete:{type:_0x1391x3[_0xebd9[6]],defaultValue:0},completeReason:_0x1391x3.ENUM(_0xebd9[7],_0xebd9[8]),abandon:{type:_0x1391x3[_0xebd9[6]],defaultValue:0},unmanaged:{type:_0x1391x3[_0xebd9[6]],defaultValue:0}},{tableName:_0xebd9[9]});return _0x1391x4} \ No newline at end of file diff --git a/server/models/history/report_integration_history.js b/server/models/history/report_integration_history.js index d481e00..304d25f 100644 --- a/server/models/history/report_integration_history.js +++ b/server/models/history/report_integration_history.js @@ -1,86 +1 @@ -/** - * 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; -}; +var _0x65df=["\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[_0x65df[0]]=function(_0x4990x1,_0x4990x2){var _0x4990x3=_0x4990x1[_0x65df[12]](_0x65df[1],{integration:_0x4990x2[_0x65df[2]],eventChannel:_0x4990x2[_0x65df[2]],exitStatus:_0x4990x2[_0x65df[2]],ticketId:_0x4990x2[_0x65df[2]],integrationId:_0x4990x2[_0x65df[3]],uniqueid:_0x4990x2[_0x65df[2]],calleridnum:_0x4990x2[_0x65df[2]],calleridname:_0x4990x2[_0x65df[2]],queue:_0x4990x2[_0x65df[2]],interface:_0x4990x2[_0x65df[2]],membername:_0x4990x2[_0x65df[2]],agentcalledAt:_0x4990x2[_0x65df[4]],agentconnectAt:_0x4990x2[_0x65df[4]],holdtime:_0x4990x2[_0x65df[3]],agentcomplete:{type:_0x4990x2[_0x65df[5]],defaultValue:false},agentcompleteAt:_0x4990x2[_0x65df[4]],talktime:_0x4990x2[_0x65df[3]],agentacw:{type:_0x4990x2[_0x65df[5]],defaultValue:false},acwtime:_0x4990x2[_0x65df[3]],reason:_0x4990x2[_0x65df[2]],agentringnoanswer:{type:_0x4990x2[_0x65df[5]],defaultValue:false},agentringnoanswerAt:_0x4990x2[_0x65df[4]],agentdump:{type:_0x4990x2[_0x65df[5]],defaultValue:false},agentdumpAt:_0x4990x2[_0x65df[4]],lastevent:_0x4990x2[_0x65df[2]],channel:_0x4990x2[_0x65df[2]],channelstate:_0x4990x2[_0x65df[3]],channelstatedesc:_0x4990x2[_0x65df[2]],connectedlinenum:_0x4990x2[_0x65df[2]],connectedlinename:_0x4990x2[_0x65df[2]],language:_0x4990x2[_0x65df[2]],accountcode:_0x4990x2[_0x65df[2]],context:_0x4990x2[_0x65df[2]],exten:_0x4990x2[_0x65df[2]],priority:_0x4990x2[_0x65df[2]],destchannel:_0x4990x2[_0x65df[2]],destchannelstate:_0x4990x2[_0x65df[3]],destchannelstatedesc:_0x4990x2[_0x65df[2]],destcalleridnum:_0x4990x2[_0x65df[2]],destcalleridname:_0x4990x2[_0x65df[2]],destconnectedlinenum:_0x4990x2[_0x65df[2]],destconnectedlinename:_0x4990x2[_0x65df[2]],destlanguage:_0x4990x2[_0x65df[2]],destaccountcode:_0x4990x2[_0x65df[2]],destcontext:_0x4990x2[_0x65df[2]],destexten:_0x4990x2[_0x65df[2]],destpriority:_0x4990x2[_0x65df[2]],destuniqueid:_0x4990x2[_0x65df[2]],messageId:_0x4990x2[_0x65df[2]],inReplyTo:_0x4990x2[_0x65df[2]],subject:_0x4990x2[_0x65df[2]],from:_0x4990x2[_0x65df[2]],to:_0x4990x2[_0x65df[2]],cc:_0x4990x2[_0x65df[2]],attachment:_0x4990x2[_0x65df[6]],html:_0x4990x2[_0x65df[6]],text:_0x4990x2[_0x65df[6]],status:{type:_0x4990x2.ENUM(_0x65df[7],_0x65df[8],_0x65df[9],_0x65df[10])}},{tableName:_0x65df[11]});_0x4990x3[_0x65df[14]](_0x65df[13]);return _0x4990x3} \ No newline at end of file diff --git a/server/models/history/report_mail_history.js b/server/models/history/report_mail_history.js index 0af6acd..bf87872 100644 --- a/server/models/history/report_mail_history.js +++ b/server/models/history/report_mail_history.js @@ -1,43 +1 @@ -/** - * 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; -}; +var _0xddff=["\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(_0xddff[0]);module[_0xddff[1]]=function(_0x8a29x2,_0x8a29x3){var _0x8a29x4=_0x8a29x2[_0xddff[16]](_0xddff[2],{uniqueid:_0x8a29x3[_0xddff[3]],timeslot:_0x8a29x3[_0xddff[4]],subject:_0x8a29x3[_0xddff[3]],accountid:_0x8a29x3[_0xddff[3]],accountname:_0x8a29x3[_0xddff[3]],accountaddress:_0x8a29x3[_0xddff[3]],application:_0x8a29x3[_0xddff[3]],memberid:_0x8a29x3[_0xddff[4]],membername:_0x8a29x3[_0xddff[3]],queue:_0x8a29x3[_0xddff[4]],queuename:_0x8a29x3[_0xddff[3]],roomid:_0x8a29x3[_0xddff[4]],messageid:_0x8a29x3[_0xddff[4]],reason:{type:_0x8a29x3[_0xddff[3]],defaultValue:_0xddff[5]},connectid:{type:_0x8a29x3[_0xddff[3]],unique:true,set:function(_0x8a29x5){this[_0xddff[8]](_0xddff[6],this[_0xddff[7]]);this[_0xddff[8]](_0xddff[9],_0xddff[10]);this[_0xddff[8]](_0xddff[11],moment()[_0xddff[13]](_0xddff[12]))}},calledAt:_0x8a29x3[_0xddff[14]],connectedAt:_0x8a29x3[_0xddff[14]]},{tableName:_0xddff[15]});return _0x8a29x4} \ No newline at end of file diff --git a/server/models/history/report_mail_room_history.js b/server/models/history/report_mail_room_history.js index 7f9ed73..243516d 100644 --- a/server/models/history/report_mail_room_history.js +++ b/server/models/history/report_mail_room_history.js @@ -1,42 +1 @@ -/** - * Agent Log Model - */ - -var moment = require('moment'); - -module.exports = function(sequelize, DataTypes) { - - var RoportMailRoomHistory = sequelize.define('RoportMailRoomHistory', { - uniqueid: { - type: DataTypes.STRING, - unique: true - }, - subject: DataTypes.STRING, - accountid: DataTypes.STRING, - accountname: DataTypes.STRING, - accountaddress: DataTypes.STRING, - application: DataTypes.STRING, - from: DataTypes.STRING, - memberid: DataTypes.STRING, - membername: DataTypes.STRING, - queue: DataTypes.INTEGER, - queuename: DataTypes.STRING, - roomid: DataTypes.INTEGER, - complete: { - type: DataTypes.BOOLEAN, - defaulValue: false - }, - completeReason: DataTypes.ENUM('agent'), - completeAt: DataTypes.DATE, - joinAt: DataTypes.DATE, - leaveAt: DataTypes.DATE, - unmanaged: { - type: DataTypes.BOOLEAN, - defaultValue: false - } - }, { - tableName: 'report_mail_room_history' - }); - - return RoportMailRoomHistory; -}; +var _0xd360=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x6F\x70\x6F\x72\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\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","\x61\x67\x65\x6E\x74","\x44\x41\x54\x45","\x54\x45\x58\x54","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x5F\x68\x69\x73\x74\x6F\x72\x79","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0xd360[0]);module[_0xd360[1]]=function(_0xbe7cx2,_0xbe7cx3){var _0xbe7cx4=_0xbe7cx2[_0xd360[10]](_0xd360[2],{uniqueid:{type:_0xbe7cx3[_0xd360[3]],unique:true},subject:_0xbe7cx3[_0xd360[3]],accountid:_0xbe7cx3[_0xd360[3]],accountname:_0xbe7cx3[_0xd360[3]],accountaddress:_0xbe7cx3[_0xd360[3]],application:_0xbe7cx3[_0xd360[3]],from:_0xbe7cx3[_0xd360[3]],memberid:_0xbe7cx3[_0xd360[3]],membername:_0xbe7cx3[_0xd360[3]],queue:_0xbe7cx3[_0xd360[4]],queuename:_0xbe7cx3[_0xd360[3]],roomid:_0xbe7cx3[_0xd360[4]],complete:{type:_0xbe7cx3[_0xd360[5]],defaulValue:false},completeReason:_0xbe7cx3.ENUM(_0xd360[6]),completeAt:_0xbe7cx3[_0xd360[7]],joinAt:_0xbe7cx3[_0xd360[7]],leaveAt:_0xbe7cx3[_0xd360[7]],unmanaged:{type:_0xbe7cx3[_0xd360[5]],defaultValue:false},disposition:_0xbe7cx3[_0xd360[3]],note:_0xbe7cx3[_0xd360[8]],urating:{type:_0xbe7cx3[_0xd360[4]],defaultValue:0,validate:{min:0,max:10}}},{tableName:_0xd360[9]});return _0xbe7cx4} \ No newline at end of file diff --git a/server/models/history/report_mail_session_history.js b/server/models/history/report_mail_session_history.js index 4c7d848..a9b3d39 100644 --- a/server/models/history/report_mail_session_history.js +++ b/server/models/history/report_mail_session_history.js @@ -1,42 +1 @@ -/** - * Agent Log Model - */ - -var moment = require('moment'); - -module.exports = function(sequelize, DataTypes) { - - var ReportMailSession = sequelize.define('ReportMailSessionHistory', { - uniqueid: DataTypes.STRING, - 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 - }, - joinAt: DataTypes.DATE, - leaveAt: DataTypes.DATE, - completeAt: DataTypes.DATE, - complete: { - type: DataTypes.BOOLEAN, - defaulValue: false - }, - completeReason: DataTypes.ENUM('agent'), - unmanaged: { - type: DataTypes.BOOLEAN, - defaultValue: false - } - }, { - tableName: 'report_mail_session_history' - }); - - return ReportMailSession; -}; +var _0x38d9=["\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","\x42\x4F\x4F\x4C\x45\x41\x4E","\x61\x67\x65\x6E\x74","\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(_0x38d9[0]);module[_0x38d9[1]]=function(_0x6e09x2,_0x6e09x3){var _0x6e09x4=_0x6e09x2[_0x38d9[9]](_0x38d9[2],{uniqueid:_0x6e09x3[_0x38d9[3]],subject:_0x6e09x3[_0x38d9[3]],accountid:_0x6e09x3[_0x38d9[3]],accountname:_0x6e09x3[_0x38d9[3]],accountaddress:_0x6e09x3[_0x38d9[3]],application:_0x6e09x3[_0x38d9[3]],memberid:_0x6e09x3[_0x38d9[3]],membername:_0x6e09x3[_0x38d9[3]],queue:_0x6e09x3[_0x38d9[4]],queuename:_0x6e09x3[_0x38d9[3]],roomid:_0x6e09x3[_0x38d9[4]],fidelity:{type:_0x6e09x3[_0x38d9[4]],defaultValue:0},joinAt:_0x6e09x3[_0x38d9[5]],leaveAt:_0x6e09x3[_0x38d9[5]],completeAt:_0x6e09x3[_0x38d9[5]],complete:{type:_0x6e09x3[_0x38d9[6]],defaulValue:false},completeReason:_0x6e09x3.ENUM(_0x38d9[7]),unmanaged:{type:_0x6e09x3[_0x38d9[6]],defaultValue:false}},{tableName:_0x38d9[8]});return _0x6e09x4} \ No newline at end of file diff --git a/server/models/history/report_member_history.js b/server/models/history/report_member_history.js index b19ec9b..b42ee3c 100644 --- a/server/models/history/report_member_history.js +++ b/server/models/history/report_member_history.js @@ -1,32 +1 @@ -/** - * 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; -}; +var _0x8f5b=["\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[_0x8f5b[0]]=function(_0xa499x1,_0xa499x2){var _0xa499x3=_0xa499x1[_0x8f5b[7]](_0x8f5b[1],{channel:_0xa499x2[_0x8f5b[2]],membername:_0xa499x2[_0x8f5b[2]],interface:_0xa499x2[_0x8f5b[2]],type:{type:_0xa499x2[_0x8f5b[2]],defaultValue:_0x8f5b[3]},duration:_0xa499x2[_0x8f5b[4]],enterAt:_0xa499x2[_0x8f5b[5]],exitAt:_0xa499x2[_0x8f5b[5]],data1:_0xa499x2[_0x8f5b[2]],data2:_0xa499x2[_0x8f5b[2]],data3:_0xa499x2[_0x8f5b[2]],data4:_0xa499x2[_0x8f5b[2]],data5:_0xa499x2[_0x8f5b[2]]},{tableName:_0x8f5b[6]});_0xa499x3[_0x8f5b[9]](_0x8f5b[8]);return _0xa499x3} \ No newline at end of file diff --git a/server/models/history/report_queue_history.js b/server/models/history/report_queue_history.js index 8b1c216..6ca4c90 100644 --- a/server/models/history/report_queue_history.js +++ b/server/models/history/report_queue_history.js @@ -1,49 +1 @@ -/** - * 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; -}; +var _0x4aaf=["\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[_0x4aaf[0]]=function(_0xc59ex1,_0xc59ex2){var _0xc59ex3=_0xc59ex1[_0x4aaf[7]](_0x4aaf[1],{uniqueid:_0xc59ex2[_0x4aaf[2]],calleridnum:_0xc59ex2[_0x4aaf[2]],calleridname:_0xc59ex2[_0x4aaf[2]],queue:_0xc59ex2[_0x4aaf[2]],queuecallerjoinAt:_0xc59ex2[_0x4aaf[3]],queuecallerleaveAt:_0xc59ex2[_0x4aaf[3]],position:_0xc59ex2[_0x4aaf[4]],count:_0xc59ex2[_0x4aaf[4]],queuecallerabandon:{type:_0xc59ex2[_0x4aaf[5]],defaultValue:false},queuecallerabandonAt:_0xc59ex2[_0x4aaf[3]],queuecallercomplete:{type:_0xc59ex2[_0x4aaf[5]],defaultValue:false},queuecallercompleteAt:_0xc59ex2[_0x4aaf[3]],queuecallerexit:{type:_0xc59ex2[_0x4aaf[5]],defaultValue:false},queuecallerexitAt:_0xc59ex2[_0x4aaf[3]],queuecallerexitreason:_0xc59ex2[_0x4aaf[2]],originalposition:_0xc59ex2[_0x4aaf[4]],channel:_0xc59ex2[_0x4aaf[2]],channelstate:_0xc59ex2[_0x4aaf[4]],channelstatedesc:_0xc59ex2[_0x4aaf[2]],connectedlinenum:_0xc59ex2[_0x4aaf[2]],connectedlinename:_0xc59ex2[_0x4aaf[2]],language:_0xc59ex2[_0x4aaf[2]],accountcode:_0xc59ex2[_0x4aaf[2]],context:_0xc59ex2[_0x4aaf[2]],exten:_0xc59ex2[_0x4aaf[2]],priority:_0xc59ex2[_0x4aaf[2]]},{tableName:_0x4aaf[6]});_0xc59ex3[_0x4aaf[9]](_0x4aaf[8]);return _0xc59ex3} \ No newline at end of file diff --git a/server/models/history/report_square_detail_history.js b/server/models/history/report_square_detail_history.js index f918cf2..a8e4fab 100644 --- a/server/models/history/report_square_detail_history.js +++ b/server/models/history/report_square_detail_history.js @@ -1,25 +1 @@ -/** - * 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; -}; +var _0x9d81=["\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[_0x9d81[0]]=function(_0x7d4dx1,_0x7d4dx2){var _0x7d4dx3=_0x7d4dx1[_0x9d81[4]](_0x9d81[1],{uniqueid:{type:_0x7d4dx2[_0x9d81[2]]},node:{type:_0x7d4dx2[_0x9d81[2]]},application:{type:_0x7d4dx2[_0x9d81[2]]},data:{type:_0x7d4dx2[_0x9d81[2]]}},{tableName:_0x9d81[3]});return _0x7d4dx3} \ No newline at end of file diff --git a/server/models/history/report_square_history.js b/server/models/history/report_square_history.js index d56f92c..ea9a273 100644 --- a/server/models/history/report_square_history.js +++ b/server/models/history/report_square_history.js @@ -1,89 +1 @@ -/** - * 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; -}; +var _0x680a=["\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[_0x680a[0]]=function(_0x745ex1,_0x745ex2){var _0x745ex3=_0x745ex1[_0x680a[5]](_0x680a[1],{network:{type:_0x745ex2[_0x680a[2]]},network_script:{type:_0x745ex2[_0x680a[2]]},request:{type:_0x745ex2[_0x680a[2]]},channel:{type:_0x745ex2[_0x680a[2]]},language:{type:_0x745ex2[_0x680a[2]]},type:{type:_0x745ex2[_0x680a[2]]},uniqueid:{type:_0x745ex2[_0x680a[2]]},version:{type:_0x745ex2[_0x680a[2]]},callerid:{type:_0x745ex2[_0x680a[2]]},calleridname:{type:_0x745ex2[_0x680a[2]]},callingpres:{type:_0x745ex2[_0x680a[2]]},callingani2:{type:_0x745ex2[_0x680a[2]]},callington:{type:_0x745ex2[_0x680a[2]]},callingtns:{type:_0x745ex2[_0x680a[2]]},dnid:{type:_0x745ex2[_0x680a[2]]},rdnis:{type:_0x745ex2[_0x680a[2]]},context:{type:_0x745ex2[_0x680a[2]]},extension:{type:_0x745ex2[_0x680a[2]]},priority:{type:_0x745ex2[_0x680a[2]]},enhanced:{type:_0x745ex2[_0x680a[2]]},accountcode:{type:_0x745ex2[_0x680a[2]]},threadid:{type:_0x745ex2[_0x680a[2]]},project_name:{type:_0x745ex2[_0x680a[2]]},joinAt:{type:_0x745ex2[_0x680a[3]]},leaveAt:{type:_0x745ex2[_0x680a[3]],unique:true}},{tableName:_0x680a[4]});return _0x745ex3} \ No newline at end of file diff --git a/server/models/history/report_tranfer_history.js b/server/models/history/report_tranfer_history.js index aec5d4b..1909ab7 100644 --- a/server/models/history/report_tranfer_history.js +++ b/server/models/history/report_tranfer_history.js @@ -1,25 +1 @@ -/** - * 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; -}; +var _0x5562=["\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[_0x5562[0]]=function(_0x39d2x1,_0x39d2x2){var _0x39d2x3=_0x39d2x1[_0x5562[6]](_0x5562[1],{type:_0x39d2x2.ENUM(_0x5562[2],_0x5562[3]),transferercalleridnum:_0x39d2x2[_0x5562[4]],transferercalleridname:_0x39d2x2[_0x5562[4]],transfererconnectedlinenum:_0x39d2x2[_0x5562[4]],transfererconnectedlinename:_0x39d2x2[_0x5562[4]],transferercontext:_0x39d2x2[_0x5562[4]],transfererexten:_0x39d2x2[_0x5562[4]],transfereecontext:_0x39d2x2[_0x5562[4]],transfereeexten:_0x39d2x2[_0x5562[4]],transfereruniqueid:_0x39d2x2[_0x5562[4]],transfererlinkedid:_0x39d2x2[_0x5562[4]],extension:_0x39d2x2[_0x5562[4]]},{tableName:_0x5562[5]});return _0x39d2x3} \ No newline at end of file diff --git a/server/models/index.js b/server/models/index.js index c664092..3175722 100644 --- a/server/models/index.js +++ b/server/models/index.js @@ -1,75 +1 @@ -"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; +var _0x6bf7=["\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","\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"];_0x6bf7[0];var fs=require(_0x6bf7[1]);var path=require(_0x6bf7[2]);var config=require(_0x6bf7[3]);var Sequelize=require(_0x6bf7[4]);var moment=require(_0x6bf7[5]);Sequelize[_0x6bf7[7]][_0x6bf7[6]]({warnings:{wForgottenReturn:false}});var sequelize= new Sequelize(config[_0x6bf7[9]][_0x6bf7[8]],config[_0x6bf7[9]][_0x6bf7[10]],config[_0x6bf7[9]][_0x6bf7[11]],{host:config[_0x6bf7[9]][_0x6bf7[12]],dialect:_0x6bf7[13],timezone:moment()[_0x6bf7[15]](_0x6bf7[14]),logging:false});var db={};fs[_0x6bf7[27]](__dirname)[_0x6bf7[26]](function(_0xae4cx8){return (fs[_0x6bf7[21]](path[_0x6bf7[16]](__dirname,_0xae4cx8))[_0x6bf7[20]]())&&(_0xae4cx8[_0x6bf7[23]](_0x6bf7[22])!==0)&&(_0xae4cx8[_0x6bf7[23]](_0x6bf7[24])=== -1)&&(_0xae4cx8!==_0x6bf7[25])})[_0x6bf7[19]](function(_0xae4cx8){var _0xae4cx9=sequelize[_0x6bf7[17]](path[_0x6bf7[16]](__dirname,_0xae4cx8));db[_0xae4cx9[_0x6bf7[18]]]=_0xae4cx9});Object[_0x6bf7[31]](db)[_0x6bf7[19]](function(_0xae4cxa){if(db[_0xae4cxa][_0x6bf7[30]][_0x6bf7[29]](_0x6bf7[28])){db[_0xae4cxa][_0x6bf7[30]][_0x6bf7[28]](db)}});db[_0x6bf7[32]]={};var sequelize_history= new Sequelize(config[_0x6bf7[33]][_0x6bf7[8]],config[_0x6bf7[33]][_0x6bf7[10]],config[_0x6bf7[33]][_0x6bf7[11]],{host:config[_0x6bf7[33]][_0x6bf7[12]],dialect:_0x6bf7[13],timezone:moment()[_0x6bf7[15]](_0x6bf7[14]),logging:false});fs[_0x6bf7[27]](path[_0x6bf7[16]](__dirname,_0x6bf7[32]))[_0x6bf7[26]](function(_0xae4cx8){return (fs[_0x6bf7[21]](path[_0x6bf7[16]](__dirname,_0x6bf7[32],_0xae4cx8))[_0x6bf7[20]]())&&(_0xae4cx8[_0x6bf7[23]](_0x6bf7[22])!==0)&&(_0xae4cx8[_0x6bf7[23]](_0x6bf7[24])=== -1)&&(_0xae4cx8!==_0x6bf7[25])})[_0x6bf7[19]](function(_0xae4cx8){var _0xae4cx9=sequelize_history[_0x6bf7[17]](path[_0x6bf7[16]](__dirname,_0x6bf7[32],_0xae4cx8));db[_0x6bf7[32]][_0xae4cx9[_0x6bf7[18]]]=_0xae4cx9});Object[_0x6bf7[31]](db[_0x6bf7[32]])[_0x6bf7[19]](function(_0xae4cxa){if(db[_0x6bf7[32]][_0xae4cxa][_0x6bf7[30]][_0x6bf7[29]](_0x6bf7[28])){db[_0x6bf7[32]][_0xae4cxa][_0x6bf7[30]][_0x6bf7[28]](db[_0x6bf7[32]])}});db[_0x6bf7[4]]=sequelize;db[_0x6bf7[34]]=sequelize_history;db[_0x6bf7[35]]=Sequelize;module[_0x6bf7[36]]=db \ No newline at end of file diff --git a/server/models/integration.js b/server/models/integration.js index 1cbee6f..2d82346 100644 --- a/server/models/integration.js +++ b/server/models/integration.js @@ -1,65 +1 @@ -'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; - -}; +var _0x9a13=["\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"];_0x9a13[0];module[_0x9a13[1]]=function(_0x713cx1,_0x713cx2){var _0x713cx3=_0x713cx1[_0x9a13[9]](_0x9a13[2],{name:{type:_0x713cx2[_0x9a13[3]],allowNull:false,unique:_0x9a13[4],validate:{notEmpty:true}},version:{type:_0x713cx2[_0x9a13[3]],allowNull:false,unique:_0x9a13[4],validate:{notEmpty:true}},main:{type:_0x713cx2[_0x9a13[3]],defaultValue:_0x9a13[5]},filename:{type:_0x713cx2[_0x9a13[3]]},path:{type:_0x713cx2[_0x9a13[3]]},type:{type:_0x713cx2[_0x9a13[3]]},size:{type:_0x713cx2[_0x9a13[6]]},active:{type:_0x713cx2[_0x9a13[7]],defaultValue:false},author:_0x713cx2[_0x9a13[3]],logo:_0x713cx2[_0x9a13[3]],state:{type:_0x713cx2[_0x9a13[3]],unique:true},description:_0x713cx2[_0x9a13[3]]},{tableName:_0x9a13[8]});return _0x713cx3} \ No newline at end of file diff --git a/server/models/interval.js b/server/models/interval.js index 19e66f4..c84bcbc 100644 --- a/server/models/interval.js +++ b/server/models/interval.js @@ -1,53 +1 @@ -/* 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; -}; +var _0x788c=["\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[_0x788c[0]]=function(_0xf7c6x1,_0xf7c6x2){var _0xf7c6x3=_0xf7c6x1[_0x788c[16]](_0x788c[1],{name:{type:_0xf7c6x2[_0x788c[2]]},description:_0xf7c6x2[_0x788c[2]],interval:{type:_0xf7c6x2[_0x788c[2]],allowNull:true}},{tableName:_0x788c[3],associate:function(_0xf7c6x4){_0xf7c6x3[_0x788c[6]](_0xf7c6x4.Interval,{as:_0x788c[4],onDelete:_0x788c[5],hooks:true,required:false});_0xf7c6x3[_0x788c[6]](_0xf7c6x4.VoiceExtension,{as:_0x788c[7],foreignKey:_0x788c[8],onDelete:_0x788c[9]});_0xf7c6x3[_0x788c[6]](_0xf7c6x4.MailApplication,{as:_0x788c[10]});_0xf7c6x3[_0x788c[6]](_0xf7c6x4.MailApplication,{as:_0x788c[11]});_0xf7c6x3[_0x788c[15]](_0x788c[12],{include:[{model:_0xf7c6x4[_0x788c[1]],as:_0x788c[4],required:false,attributes:[_0x788c[13],_0x788c[14]]}]});_0xf7c6x3[_0x788c[15]](_0x788c[3],{where:{IntervalId:null}})}});return _0xf7c6x3} \ No newline at end of file diff --git a/server/models/jscripty_project.js b/server/models/jscripty_project.js index c31f2e2..1606b36 100644 --- a/server/models/jscripty_project.js +++ b/server/models/jscripty_project.js @@ -1,30 +1 @@ -/** - * 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; -}; +var _0x996e=["\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[_0x996e[0]]=function(_0x9537x1,_0x9537x2){var _0x9537x3=_0x9537x1[_0x996e[7]](_0x996e[1],{name:{type:_0x9537x2[_0x996e[2]],unique:true},description:_0x9537x2[_0x996e[2]],draft:_0x9537x2[_0x996e[3]],production:_0x9537x2[_0x996e[3]]},{tableName:_0x996e[4],associate:function(_0x9537x4){_0x9537x3[_0x996e[6]](_0x9537x4.ReportJscriptySession,{foreignKey:_0x996e[5]});_0x9537x3[_0x996e[6]](_0x9537x4.ReportJscriptyQuestion,{foreignKey:_0x996e[5]})}});return _0x9537x3} \ No newline at end of file diff --git a/server/models/list.js b/server/models/list.js index ced8d79..413f0ce 100644 --- a/server/models/list.js +++ b/server/models/list.js @@ -1,42 +1 @@ -/* jshint indent: 2 */ - -module.exports = function(sequelize, DataTypes) { - var List = sequelize.define('List', { - name: { - type: DataTypes.STRING, - unique: true - }, - description: { - type: DataTypes.STRING, - allowNull: true, - }, - defaultEntry: { - type: DataTypes.BOOLEAN, - defaultValue: false - } - }, { - tableName: 'cm_lists', - associate: function(models) { - List.belongsToMany(models.User, { - through: models.UserHasList, - foreignKey: 'list' - }); - List.hasMany(models.CustomField, { - as: 'CustomFields', - required: false - }); - List.hasMany(models.Contact, { - as: 'Contacts', - onDelete: 'cascade' - }); - List.addScope('customFields', { - include: [{ - model: models.CustomField, - as: 'CustomFields' - }] - }); - } - }); - - return List; -}; +var _0x2566=["\x65\x78\x70\x6F\x72\x74\x73","\x4C\x69\x73\x74","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x63\x6D\x5F\x6C\x69\x73\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x4C\x69\x73\x74","\x6C\x69\x73\x74","\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[_0x2566[0]]=function(_0xe266x1,_0xe266x2){var _0xe266x3=_0xe266x1[_0x2566[15]](_0x2566[1],{name:{type:_0xe266x2[_0x2566[2]],unique:true},description:{type:_0xe266x2[_0x2566[2]],allowNull:true},defaultEntry:{type:_0xe266x2[_0x2566[3]],defaultValue:false}},{tableName:_0x2566[4],associate:function(_0xe266x4){_0xe266x3[_0x2566[7]](_0xe266x4.User,{through:_0xe266x4[_0x2566[5]],foreignKey:_0x2566[6]});_0xe266x3[_0x2566[9]](_0xe266x4.CustomField,{as:_0x2566[8],required:false});_0xe266x3[_0x2566[9]](_0xe266x4.Contact,{as:_0x2566[10],onDelete:_0x2566[11]});_0xe266x3[_0x2566[14]](_0x2566[12],{include:[{model:_0xe266x4[_0x2566[13]],as:_0x2566[8]}]})}});return _0xe266x3} \ No newline at end of file diff --git a/server/models/mail_account.js b/server/models/mail_account.js index 4e69e7b..152c926 100644 --- a/server/models/mail_account.js +++ b/server/models/mail_account.js @@ -1,72 +1 @@ -/** - * 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; -}; +var _0x32ec=["\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x53\x54\x52\x49\x4E\x47","\x61\x64\x64\x72\x65\x73\x73","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\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[_0x32ec[0]]=function(_0x7597x1,_0x7597x2){var _0x7597x3=_0x7597x1[_0x32ec[37]](_0x32ec[1],{description:_0x7597x2[_0x32ec[2]],name:{type:_0x7597x2[_0x32ec[2]]},address:{type:_0x7597x2[_0x32ec[2]],unique:true,isEmail:true,set:function(_0x7597x4){if(_0x7597x4){this[_0x32ec[5]](_0x32ec[3],_0x7597x4[_0x32ec[4]]())}}},fidelity:{type:_0x7597x2[_0x32ec[6]],defaultValue:false},timeout:{type:_0x7597x2[_0x32ec[7]],defaultValue:0}},{tableName:_0x32ec[8],associate:function(_0x7597x5){_0x7597x3[_0x32ec[9]](_0x7597x5.MailRoom);_0x7597x3[_0x32ec[9]](_0x7597x5.MailApplication);_0x7597x3[_0x32ec[11]](_0x7597x5.MailServerIn,{onDelete:_0x32ec[10],hooks:true});_0x7597x3[_0x32ec[11]](_0x7597x5.MailServerOut,{onDelete:_0x32ec[10],hooks:true});_0x7597x3[_0x32ec[36]](_0x32ec[12],{include:[{model:_0x7597x5[_0x32ec[13]],attributes:[_0x32ec[14],_0x32ec[15],_0x32ec[16],_0x32ec[17],_0x32ec[18],_0x32ec[19],_0x32ec[20],_0x32ec[21],_0x32ec[22],_0x32ec[23],_0x32ec[24],_0x32ec[25],_0x32ec[26]]},{model:_0x7597x5[_0x32ec[27]],attributes:[_0x32ec[14],_0x32ec[15],_0x32ec[16],_0x32ec[17],_0x32ec[18],_0x32ec[19],_0x32ec[28],_0x32ec[22]]},{model:_0x7597x5[_0x32ec[29]],include:[{model:_0x7597x5[_0x32ec[30]],attributes:[_0x32ec[14],_0x32ec[31],_0x32ec[32],_0x32ec[33],_0x32ec[34]]},{model:_0x7597x5[_0x32ec[35]]}]}]})}});return _0x7597x3} \ No newline at end of file diff --git a/server/models/mail_application.js b/server/models/mail_application.js index f4a7a03..9bc7e09 100644 --- a/server/models/mail_application.js +++ b/server/models/mail_application.js @@ -1,36 +1 @@ -'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; -}; +var _0x1c9c=["\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"];_0x1c9c[0];module[_0x1c9c[1]]=function(_0xca4ax1,_0xca4ax2){var _0xca4ax3=_0xca4ax1[_0x1c9c[10]](_0x1c9c[2],{app:{type:_0xca4ax2.ENUM(_0x1c9c[3],_0x1c9c[4])},priority:{type:_0xca4ax2[_0x1c9c[5]]},timeout:{type:_0xca4ax2[_0x1c9c[5]]},interval:{type:_0xca4ax2[_0x1c9c[6]]}},{tableName:_0x1c9c[7],associate:function(_0xca4ax4){_0xca4ax3[_0x1c9c[9]](_0xca4ax4.User,{onDelete:_0x1c9c[8]});_0xca4ax3[_0x1c9c[9]](_0xca4ax4.Interval);_0xca4ax3[_0x1c9c[9]](_0xca4ax4.MailQueue,{onDelete:_0x1c9c[8]});_0xca4ax3[_0x1c9c[9]](_0xca4ax4.MailAccount,{onDelete:_0x1c9c[8]})}});return _0xca4ax3} \ No newline at end of file diff --git a/server/models/mail_attachment.js b/server/models/mail_attachment.js index 9b2efb5..19d457f 100644 --- a/server/models/mail_attachment.js +++ b/server/models/mail_attachment.js @@ -1,21 +1 @@ -/** - * 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; -}; +var _0x2f97=["\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(_0x2f97[0]);module[_0x2f97[1]]=function(_0x1863x2,_0x1863x3){var _0x1863x4=_0x1863x2[_0x2f97[6]](_0x2f97[2],{domain:_0x1863x3[_0x2f97[3]],size:_0x1863x3[_0x2f97[4]],path:_0x1863x3[_0x2f97[3]],name:_0x1863x3[_0x2f97[3]],basename:_0x1863x3[_0x2f97[3]],type:_0x1863x3[_0x2f97[3]]},{tableName:_0x2f97[5]});return _0x1863x4} \ No newline at end of file diff --git a/server/models/mail_automation.js b/server/models/mail_automation.js index 218cb9c..a910285 100644 --- a/server/models/mail_automation.js +++ b/server/models/mail_automation.js @@ -1,23 +1 @@ -/** - * 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; -}; +var _0x32e9=["\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(_0x32e9[0]);module[_0x32e9[1]]=function(_0x73e6x2,_0x73e6x3){var _0x73e6x4=_0x73e6x2[_0x32e9[7]](_0x32e9[2],{name:_0x73e6x3[_0x32e9[3]],description:_0x73e6x3[_0x32e9[3]],conditions:_0x73e6x3[_0x32e9[4]],actions:_0x73e6x3[_0x32e9[4]],status:{type:_0x73e6x3[_0x32e9[5]],defaultValue:false}},{tableName:_0x32e9[6]});return _0x73e6x4} \ No newline at end of file diff --git a/server/models/mail_message.js b/server/models/mail_message.js index f71ad58..3b6fde1 100644 --- a/server/models/mail_message.js +++ b/server/models/mail_message.js @@ -1,84 +1 @@ -/** - * 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; -}; +var _0x816d=["\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(_0x816d[0]);module[_0x816d[1]]=function(_0x75bdx2,_0x75bdx3){var _0x75bdx4=_0x75bdx2[_0x816d[26]](_0x816d[2],{messageId:_0x75bdx3[_0x816d[3]],inReplyTo:_0x75bdx3[_0x816d[3]],subject:_0x75bdx3[_0x816d[3]],from:{type:_0x75bdx3[_0x816d[3]],get:function(){return this[_0x816d[5]](_0x816d[4])?this[_0x816d[5]](_0x816d[4])[_0x816d[7]](_0x816d[6]):[]},set:function(_0x75bdx5){this[_0x816d[9]](_0x816d[4],_0x75bdx5[_0x816d[8]](_0x816d[6]))}},to:{type:_0x75bdx3[_0x816d[3]],get:function(){return this[_0x816d[5]](_0x816d[10])?this[_0x816d[5]](_0x816d[10])[_0x816d[7]](_0x816d[6]):[]},set:function(_0x75bdx5){this[_0x816d[9]](_0x816d[10],_0x75bdx5[_0x816d[8]](_0x816d[6]))}},cc:{type:_0x75bdx3[_0x816d[3]],get:function(){return this[_0x816d[5]](_0x816d[11])?this[_0x816d[5]](_0x816d[11])[_0x816d[7]](_0x816d[6]):[]},set:function(_0x75bdx5){this[_0x816d[9]](_0x816d[11],_0x75bdx5[_0x816d[8]](_0x816d[6]))}},bcc:{type:_0x75bdx3[_0x816d[3]],get:function(){return this[_0x816d[5]](_0x816d[12])?this[_0x816d[5]](_0x816d[12])[_0x816d[7]](_0x816d[6]):[]},set:function(_0x75bdx5){this[_0x816d[9]](_0x816d[12],_0x75bdx5[_0x816d[8]](_0x816d[6]))}},attachment:_0x75bdx3[_0x816d[13]],text:{type:_0x75bdx3[_0x816d[14]],get:function(){if(this[_0x816d[5]](_0x816d[15])){return this[_0x816d[5]](_0x816d[15]).toString()}}},html:{type:_0x75bdx3[_0x816d[14]],get:function(){if(this[_0x816d[5]](_0x816d[16])){return this[_0x816d[5]](_0x816d[16]).toString()}}},reason:_0x75bdx3[_0x816d[13]],status:{type:_0x75bdx3.ENUM(_0x816d[17],_0x816d[18],_0x816d[19],_0x816d[20],_0x816d[21]),defaultValue:_0x816d[18]}},{tableName:_0x816d[22],paranoid:true,associate:function(_0x75bdx6){_0x75bdx4[_0x816d[23]](_0x75bdx6.MailAttachment);_0x75bdx4[_0x816d[24]](_0x75bdx6.User);_0x75bdx4[_0x816d[24]](_0x75bdx6.MailRoom,{onDelete:_0x816d[25]})}});return _0x75bdx4} \ No newline at end of file diff --git a/server/models/mail_queue.js b/server/models/mail_queue.js index 421dc37..bf5e861 100644 --- a/server/models/mail_queue.js +++ b/server/models/mail_queue.js @@ -1,37 +1 @@ -'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; -}; +var _0x1a04=["\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"];_0x1a04[0];module[_0x1a04[1]]=function(_0x7176x1,_0x7176x2){var _0x7176x3=_0x7176x1[_0x1a04[21]](_0x1a04[2],{name:{type:_0x7176x2[_0x1a04[3]],unique:true},description:{type:_0x7176x2[_0x1a04[3]]},timeout:{type:_0x7176x2[_0x1a04[4]]},strategy:{type:_0x7176x2.ENUM(_0x1a04[5],_0x1a04[6])}},{tableName:_0x1a04[7],associate:function(_0x7176x4){_0x7176x3[_0x1a04[9]](_0x7176x4.User,{through:_0x7176x4[_0x1a04[8]]});_0x7176x3[_0x1a04[20]](_0x1a04[10],{include:[{model:_0x7176x4[_0x1a04[11]],attributes:[_0x1a04[12],_0x1a04[13],_0x1a04[14],_0x1a04[15],_0x1a04[16],_0x1a04[17],_0x1a04[18],_0x1a04[19]]}]})}});return _0x7176x3} \ No newline at end of file diff --git a/server/models/mail_room.js b/server/models/mail_room.js index 13d7977..da9f57f 100644 --- a/server/models/mail_room.js +++ b/server/models/mail_room.js @@ -1,63 +1 @@ -/** - * 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; -}; +var _0xf4c9=["\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[_0xf4c9[0]]=function(_0xac1ax1,_0xac1ax2){var _0xac1ax3=_0xac1ax1[_0xf4c9[25]](_0xf4c9[1],{subject:_0xac1ax2[_0xf4c9[2]],from:_0xac1ax2[_0xf4c9[2]],attachment:{type:_0xac1ax2[_0xf4c9[3]],defaultValue:false},status:{type:_0xac1ax2.ENUM(_0xf4c9[4],_0xf4c9[5],_0xf4c9[6]),defaultValue:_0xf4c9[4]}},{tableName:_0xf4c9[7],paranoid:true,associate:function(_0xac1ax4){_0xac1ax3[_0xf4c9[8]](_0xac1ax4.MailMessage);_0xac1ax3[_0xf4c9[9]](_0xac1ax4.MailAccount);_0xac1ax3[_0xf4c9[11]](_0xac1ax4.User,{through:_0xf4c9[10]});_0xac1ax3[_0xf4c9[23]](_0xf4c9[12],{order:[[_0xf4c9[13],_0xf4c9[14]]],include:[{model:_0xac1ax4[_0xf4c9[15]]},{model:_0xac1ax4[_0xf4c9[16]],include:[{model:_0xac1ax4[_0xf4c9[17]]},{model:_0xac1ax4[_0xf4c9[18]],attributes:[_0xf4c9[19],_0xf4c9[20],_0xf4c9[21],_0xf4c9[22]]}]},{model:_0xac1ax4[_0xf4c9[18]],attributes:[_0xf4c9[19],_0xf4c9[20],_0xf4c9[21],_0xf4c9[22]]}]});_0xac1ax3[_0xf4c9[23]](_0xf4c9[24],function(_0xac1ax5){return {include:[{model:_0xac1ax4[_0xf4c9[18]],where:{id:_0xac1ax5}}]}})}});return _0xac1ax3} \ No newline at end of file diff --git a/server/models/mail_room_status.js b/server/models/mail_room_status.js index 20b29e9..ff98180 100644 --- a/server/models/mail_room_status.js +++ b/server/models/mail_room_status.js @@ -1,14 +1 @@ -/** - * 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; -}; +var _0x6cfd=["\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[_0x6cfd[0]]=function(_0x3d64x1,_0x3d64x2){var _0x3d64x3=_0x3d64x1[_0x6cfd[7]](_0x6cfd[1],{status:_0x3d64x2.ENUM(_0x6cfd[2],_0x6cfd[3],_0x6cfd[4],_0x6cfd[5])},{tableName:_0x6cfd[6]});return _0x3d64x3} \ No newline at end of file diff --git a/server/models/mail_server_in.js b/server/models/mail_server_in.js index b53c443..90b25cb 100644 --- a/server/models/mail_server_in.js +++ b/server/models/mail_server_in.js @@ -1,71 +1 @@ -/** - * 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; -}; +var _0xad94=["\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","\x63\x6F\x6E\x6E\x54\x69\x6D\x65\x6F\x75\x74","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x61\x75\x74\x68\x54\x69\x6D\x65\x6F\x75\x74","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x73\x5F\x69\x6E","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0xad94[0]);module[_0xad94[1]]=function(_0xeb23x2,_0xeb23x3){var _0xeb23x4=_0xeb23x2[_0xad94[18]](_0xad94[2],{description:_0xeb23x3[_0xad94[3]],host:_0xeb23x3[_0xad94[3]],username:{type:_0xeb23x3[_0xad94[3]],unique:true},password:_0xeb23x3[_0xad94[3]],port:_0xeb23x3[_0xad94[4]],mailbox:_0xeb23x3[_0xad94[3]],ssl:{type:_0xeb23x3[_0xad94[5]],defaultValue:false},delete:{type:_0xeb23x3[_0xad94[5]],defaultValue:false},filter:{type:_0xeb23x3.ENUM(_0xad94[6]),defaultValue:_0xad94[6]},protocol:{type:_0xeb23x3.ENUM(_0xad94[7],_0xad94[8]),defaultValue:_0xad94[7]},state:{type:_0xeb23x3.ENUM(_0xad94[9],_0xad94[10],_0xad94[11],_0xad94[12]),defaultValue:_0xad94[12]},source:{type:_0xeb23x3[_0xad94[3]]},connTimeout:{type:_0xeb23x3[_0xad94[4]],defaultValue:10000,get:function(){return this[_0xad94[14]](_0xad94[13])?this[_0xad94[14]](_0xad94[13])/1000:null},set:function(_0xeb23x5){this[_0xad94[15]](_0xad94[13],_0xeb23x5*1000)}},authTimeout:{type:_0xeb23x3[_0xad94[4]],defaultValue:5000,get:function(){return this[_0xad94[14]](_0xad94[16])?this[_0xad94[14]](_0xad94[16])/1000:null},set:function(_0xeb23x5){this[_0xad94[15]](_0xad94[16],_0xeb23x5*1000)}},keepalive:{type:_0xeb23x3[_0xad94[5]],defaultValue:true}},{tableName:_0xad94[17]});return _0xeb23x4} \ No newline at end of file diff --git a/server/models/mail_server_out.js b/server/models/mail_server_out.js index e1c6486..0ecce15 100644 --- a/server/models/mail_server_out.js +++ b/server/models/mail_server_out.js @@ -1,33 +1 @@ -/** - * - */ -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; -}; +var _0x7ef6=["\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[_0x7ef6[0]]=function(_0xc4b6x1,_0xc4b6x2){var _0xc4b6x3=_0xc4b6x1[_0x7ef6[10]](_0x7ef6[1],{description:_0xc4b6x2[_0x7ef6[2]],host:_0xc4b6x2[_0x7ef6[2]],username:{type:_0xc4b6x2[_0x7ef6[2]],unique:true},password:_0xc4b6x2[_0x7ef6[2]],port:_0xc4b6x2[_0x7ef6[3]],ssl:{type:_0xc4b6x2[_0x7ef6[4]],defaultValue:false},service:{type:_0xc4b6x2[_0x7ef6[4]],defaultValue:false},state:{type:_0xc4b6x2.ENUM(_0x7ef6[5],_0x7ef6[6],_0x7ef6[7],_0x7ef6[8]),defaultValue:_0x7ef6[8]},source:_0xc4b6x2[_0x7ef6[2]]},{tableName:_0x7ef6[9]});return _0xc4b6x3} \ No newline at end of file diff --git a/server/models/mail_template.js b/server/models/mail_template.js index 4856564..022ccc1 100644 --- a/server/models/mail_template.js +++ b/server/models/mail_template.js @@ -1,21 +1 @@ -/** - * 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; -}; +var _0x81af=["\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(_0x81af[0]);module[_0x81af[1]]=function(_0x8834x2,_0x8834x3){var _0x8834x4=_0x8834x2[_0x81af[6]](_0x81af[2],{name:_0x8834x3[_0x81af[3]],description:_0x8834x3[_0x81af[3]],subject:_0x8834x3[_0x81af[3]],attachment:_0x8834x3[_0x81af[4]],html:_0x8834x3[_0x81af[4]],text:_0x8834x3[_0x81af[4]]},{tableName:_0x81af[5]});return _0x8834x4} \ No newline at end of file diff --git a/server/models/mail_trigger.js b/server/models/mail_trigger.js index 73be985..eb25fca 100644 --- a/server/models/mail_trigger.js +++ b/server/models/mail_trigger.js @@ -1,23 +1 @@ -/** - * 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; -}; +var _0xdf47=["\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(_0xdf47[0]);module[_0xdf47[1]]=function(_0xb5fdx2,_0xb5fdx3){var _0xb5fdx4=_0xb5fdx2[_0xdf47[7]](_0xdf47[2],{name:_0xb5fdx3[_0xdf47[3]],description:_0xb5fdx3[_0xdf47[3]],conditions:_0xb5fdx3[_0xdf47[4]],actions:_0xb5fdx3[_0xdf47[4]],status:{type:_0xb5fdx3[_0xdf47[5]],defaultValue:false}},{tableName:_0xdf47[6]});return _0xb5fdx4} \ No newline at end of file diff --git a/server/models/metric.js b/server/models/metric.js index dfd57d2..2b94184 100644 --- a/server/models/metric.js +++ b/server/models/metric.js @@ -1,37 +1 @@ -'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; - -}; +var _0x92bf=["\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"];_0x92bf[0];module[_0x92bf[1]]=function(_0x4a60x1,_0x4a60x2){var _0x4a60x3=_0x4a60x1[_0x92bf[13]](_0x92bf[2],{name:{type:_0x4a60x2[_0x92bf[3]],unique:true,validate:{notEmpty:true}},table:_0x4a60x2[_0x92bf[3]],metric:_0x4a60x2[_0x92bf[4]],description:_0x4a60x2[_0x92bf[3]]},{tableName:_0x92bf[5],associate:function(_0x4a60x4){_0x4a60x3[_0x92bf[7]](_0x4a60x4.ReportField,{as:_0x92bf[6]});_0x4a60x3[_0x92bf[12]](_0x92bf[8],{attributes:[_0x92bf[9],_0x92bf[10],_0x92bf[11]]})}});return _0x4a60x3} \ No newline at end of file diff --git a/server/models/module.js b/server/models/module.js index c2bef6c..e4960f3 100644 --- a/server/models/module.js +++ b/server/models/module.js @@ -1,27 +1 @@ -/** - * 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; -}; +var _0x2ee8=["\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[_0x2ee8[0]]=function(_0x4bdbx1,_0x4bdbx2){var _0x4bdbx3=_0x4bdbx1[_0x2ee8[6]](_0x2ee8[1],{name:{type:_0x4bdbx2[_0x2ee8[2]],unique:true,allowNull:false,validate:{notEmpty:true}},title:_0x4bdbx2[_0x2ee8[2]]},{tableName:_0x2ee8[3],associate:function(_0x4bdbx4){_0x4bdbx3[_0x2ee8[5]](_0x4bdbx4.User,{through:_0x2ee8[4]})}});return _0x4bdbx3} \ No newline at end of file diff --git a/server/models/motionbar.js b/server/models/motionbar.js index ad6cba8..28a6f80 100644 --- a/server/models/motionbar.js +++ b/server/models/motionbar.js @@ -1,32 +1 @@ -'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; - -}; +var _0x61b6=["\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"];_0x61b6[0];module[_0x61b6[1]]=function(_0xefa5x1,_0xefa5x2){var _0xefa5x3=_0xefa5x1[_0x61b6[12]](_0x61b6[2],{action:{type:_0xefa5x2[_0x61b6[3]],values:[_0x61b6[4]],allowNull:false},state:{type:_0xefa5x2[_0x61b6[3]],values:[_0x61b6[5],_0x61b6[6]]},phone:{type:_0xefa5x2[_0x61b6[7]]}},{tableName:_0x61b6[8],associate:function(_0xefa5x4){_0xefa5x3[_0x61b6[10]](_0xefa5x4.User,{as:_0x61b6[9]});_0xefa5x3[_0x61b6[10]](_0xefa5x4.User,{as:_0x61b6[11]})}});return _0xefa5x3} \ No newline at end of file diff --git a/server/models/pause.js b/server/models/pause.js index ee1ef95..9ebcf02 100644 --- a/server/models/pause.js +++ b/server/models/pause.js @@ -1,25 +1 @@ -/** - * 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; -}; +var _0xa137=["\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[_0xa137[0]]=function(_0x1e43x1,_0x1e43x2){var _0x1e43x3=_0x1e43x1[_0xa137[4]](_0xa137[1],{name:{type:_0x1e43x2[_0xa137[2]],unique:true,allowNull:false,validate:{notEmpty:true}},description:{type:_0x1e43x2[_0xa137[2]]}},{tableName:_0xa137[3],associate:function(_0x1e43x4){}});return _0x1e43x3} \ No newline at end of file diff --git a/server/models/report_agent.js b/server/models/report_agent.js index a7628cf..a28a9d9 100644 --- a/server/models/report_agent.js +++ b/server/models/report_agent.js @@ -1,71 +1 @@ -/** - * 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; -}; +var _0xde8c=["\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[_0xde8c[0]]=function(_0xf816x1,_0xf816x2){var _0xf816x3=_0xf816x1[_0xde8c[9]](_0xde8c[1],{uniqueid:_0xf816x2[_0xde8c[2]],calleridnum:_0xf816x2[_0xde8c[2]],calleridname:_0xf816x2[_0xde8c[2]],queue:_0xf816x2[_0xde8c[2]],interface:_0xf816x2[_0xde8c[2]],membername:_0xf816x2[_0xde8c[2]],agentcalledAt:_0xf816x2[_0xde8c[3]],agentconnectAt:_0xf816x2[_0xde8c[3]],agentcompleteAt:_0xf816x2[_0xde8c[3]],agentringnoanswerAt:_0xf816x2[_0xde8c[3]],agentdumpAt:_0xf816x2[_0xde8c[3]],holdtime:_0xf816x2[_0xde8c[4]],agentcomplete:{type:_0xf816x2[_0xde8c[5]],defaultValue:false},agentringnoanswer:{type:_0xf816x2[_0xde8c[5]],defaultValue:false},agentdump:{type:_0xf816x2[_0xde8c[5]],defaultValue:false},talktime:_0xf816x2[_0xde8c[4]],agentacw:{type:_0xf816x2[_0xde8c[5]],defaultValue:false},acwtime:_0xf816x2[_0xde8c[4]],reason:_0xf816x2[_0xde8c[2]],lastevent:_0xf816x2[_0xde8c[2]],channel:_0xf816x2[_0xde8c[2]],channelstate:_0xf816x2[_0xde8c[4]],channelstatedesc:_0xf816x2[_0xde8c[2]],connectedlinenum:_0xf816x2[_0xde8c[2]],connectedlinename:_0xf816x2[_0xde8c[2]],language:_0xf816x2[_0xde8c[2]],accountcode:_0xf816x2[_0xde8c[2]],context:_0xf816x2[_0xde8c[2]],exten:_0xf816x2[_0xde8c[2]],priority:_0xf816x2[_0xde8c[2]],destchannel:_0xf816x2[_0xde8c[2]],destchannelstate:_0xf816x2[_0xde8c[4]],destchannelstatedesc:_0xf816x2[_0xde8c[2]],destcalleridnum:_0xf816x2[_0xde8c[2]],destcalleridname:_0xf816x2[_0xde8c[2]],destconnectedlinenum:_0xf816x2[_0xde8c[2]],destconnectedlinename:_0xf816x2[_0xde8c[2]],destlanguage:_0xf816x2[_0xde8c[2]],destaccountcode:_0xf816x2[_0xde8c[2]],destcontext:_0xf816x2[_0xde8c[2]],destexten:_0xf816x2[_0xde8c[2]],destpriority:_0xf816x2[_0xde8c[2]],destuniqueid:_0xf816x2[_0xde8c[2]]},{tableName:_0xde8c[6],indexes:[{fields:[_0xde8c[7],_0xde8c[8]]}]});return _0xf816x3} \ No newline at end of file diff --git a/server/models/report_call.js b/server/models/report_call.js index 44e7515..870c621 100644 --- a/server/models/report_call.js +++ b/server/models/report_call.js @@ -1,60 +1 @@ -/** - * 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; -}; +var _0x27bc=["\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[_0x27bc[0]]=function(_0x8e04x1,_0x8e04x2){var _0x8e04x3=_0x8e04x1[_0x27bc[17]](_0x27bc[1],{uniqueid:{type:_0x8e04x2[_0x27bc[2]],unique:true},type:{type:_0x8e04x2[_0x27bc[3]],values:[_0x27bc[4],_0x27bc[5],_0x27bc[6]]},tag:_0x8e04x2[_0x27bc[2]],accountcode:_0x8e04x2[_0x27bc[2]],source:_0x8e04x2[_0x27bc[2]],destination:_0x8e04x2[_0x27bc[2]],destinationcontext:_0x8e04x2[_0x27bc[2]],callerid:_0x8e04x2[_0x27bc[2]],channel:_0x8e04x2[_0x27bc[2]],destinationchannel:_0x8e04x2[_0x27bc[2]],lastapplication:_0x8e04x2[_0x27bc[2]],lastdata:_0x8e04x2[_0x27bc[2]],starttime:_0x8e04x2[_0x27bc[7]],answertime:{type:_0x8e04x2[_0x27bc[7]],set:function(_0x8e04x4){if(_0x8e04x4!==_0x27bc[8]){this[_0x27bc[10]](_0x27bc[9],_0x8e04x4)}else {this[_0x27bc[10]](_0x27bc[9],null)}}},endtime:_0x8e04x2[_0x27bc[7]],duration:_0x8e04x2[_0x27bc[11]],billableseconds:_0x8e04x2[_0x27bc[11]],disposition:_0x8e04x2[_0x27bc[2]],amaflags:_0x8e04x2[_0x27bc[2]],userfield:_0x8e04x2[_0x27bc[2]]},{tableName:_0x27bc[12],associate:function(_0x8e04x5){_0x8e04x3[_0x27bc[15]](_0x8e04x5.ReportQueue,{as:_0x27bc[13],foreignKey:_0x27bc[14],constraints:false});_0x8e04x3[_0x27bc[15]](_0x8e04x5.ReportAgent,{as:_0x27bc[16],foreignKey:_0x27bc[14],constraints:false})}});return _0x8e04x3} \ No newline at end of file diff --git a/server/models/report_chat.js b/server/models/report_chat.js index 196483a..496963c 100644 --- a/server/models/report_chat.js +++ b/server/models/report_chat.js @@ -1,45 +1 @@ -/** - * 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, - memberid: DataTypes.INTEGER, - membername: 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; -}; +var _0x6f93=["\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(_0x6f93[0]);module[_0x6f93[1]]=function(_0x9e81x2,_0x9e81x3){var _0x9e81x4=_0x9e81x2[_0x6f93[16]](_0x6f93[2],{uniqueid:_0x9e81x3[_0x6f93[3]],timeslot:_0x9e81x3[_0x6f93[4]],websitename:_0x9e81x3[_0x6f93[3]],websiteaddress:_0x9e81x3[_0x6f93[3]],websiteid:_0x9e81x3[_0x6f93[4]],application:_0x9e81x3[_0x6f93[3]],memberid:_0x9e81x3[_0x6f93[4]],membername:_0x9e81x3[_0x6f93[3]],visitorid:_0x9e81x3[_0x6f93[3]],visitorname:_0x9e81x3[_0x6f93[3]],visitoremail:_0x9e81x3[_0x6f93[3]],queueid:_0x9e81x3[_0x6f93[4]],queuename:_0x9e81x3[_0x6f93[3]],roomid:_0x9e81x3[_0x6f93[4]],reason:{type:_0x9e81x3[_0x6f93[3]],defaultValue:_0x6f93[5]},connectid:{type:_0x9e81x3[_0x6f93[3]],unique:true,set:function(_0x9e81x5){this[_0x6f93[8]](_0x6f93[6],this[_0x6f93[7]]);this[_0x6f93[8]](_0x6f93[9],_0x6f93[10]);this[_0x6f93[8]](_0x6f93[11],moment()[_0x6f93[13]](_0x6f93[12]))}},calledAt:_0x9e81x3[_0x6f93[14]],connectedAt:_0x9e81x3[_0x6f93[14]]},{tableName:_0x6f93[15]});return _0x9e81x4} \ No newline at end of file diff --git a/server/models/report_chat_room.js b/server/models/report_chat_room.js index 34cecda..a660fdb 100644 --- a/server/models/report_chat_room.js +++ b/server/models/report_chat_room.js @@ -1,49 +1 @@ -'use strict'; - -/** - * Report Chat Room Log Model - */ - -var moment = require('moment'); - -module.exports = function(sequelize, DataTypes) { - - var ReportChatRoom = sequelize.define('ReportChatRoom', { - 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, - memberid: DataTypes.STRING, - membername: DataTypes.STRING, - queueid: DataTypes.INTEGER, - queuename: DataTypes.STRING, - roomid: DataTypes.INTEGER, - abandon: { - type: DataTypes.BOOLEAN, - defaultValue: 0 - }, - complete: { - type: DataTypes.BOOLEAN, - defaultValue: 0 - }, - completeReason: DataTypes.ENUM('agent', 'requester'), - completeAt: DataTypes.DATE, - joinAt: DataTypes.DATE, - leaveAt: DataTypes.DATE, - unmanaged: { - type: DataTypes.BOOLEAN, - defaultValue: 0 - } - }, { - tableName: 'report_chat_room' - }); - - return ReportChatRoom; -}; +var _0x8a3e=["\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\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x61\x67\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x65\x72","\x44\x41\x54\x45","\x54\x45\x58\x54","\x67\x6F\x6F\x64","\x62\x61\x64","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D","\x64\x65\x66\x69\x6E\x65"];_0x8a3e[0];var moment=require(_0x8a3e[1]);module[_0x8a3e[2]]=function(_0x5029x2,_0x5029x3){var _0x5029x4=_0x5029x2[_0x8a3e[14]](_0x8a3e[3],{uniqueid:{type:_0x5029x3[_0x8a3e[4]],unique:true},websitename:_0x5029x3[_0x8a3e[4]],websiteaddress:_0x5029x3[_0x8a3e[4]],websiteid:_0x5029x3[_0x8a3e[5]],application:_0x5029x3[_0x8a3e[4]],visitorid:_0x5029x3[_0x8a3e[4]],visitorname:_0x5029x3[_0x8a3e[4]],visitoremail:_0x5029x3[_0x8a3e[4]],memberid:_0x5029x3[_0x8a3e[4]],membername:_0x5029x3[_0x8a3e[4]],queueid:_0x5029x3[_0x8a3e[5]],queuename:_0x5029x3[_0x8a3e[4]],roomid:_0x5029x3[_0x8a3e[5]],data1:_0x5029x3[_0x8a3e[4]],data2:_0x5029x3[_0x8a3e[4]],data3:_0x5029x3[_0x8a3e[4]],labelData1:_0x5029x3[_0x8a3e[4]],labelData2:_0x5029x3[_0x8a3e[4]],labelData3:_0x5029x3[_0x8a3e[4]],abandon:{type:_0x5029x3[_0x8a3e[6]],defaultValue:0},complete:{type:_0x5029x3[_0x8a3e[6]],defaultValue:0},completeReason:_0x5029x3.ENUM(_0x8a3e[7],_0x8a3e[8]),completeAt:_0x5029x3[_0x8a3e[9]],joinAt:_0x5029x3[_0x8a3e[9]],leaveAt:_0x5029x3[_0x8a3e[9]],unmanaged:{type:_0x5029x3[_0x8a3e[6]],defaultValue:0},disposition:_0x5029x3[_0x8a3e[4]],note:_0x5029x3[_0x8a3e[10]],urating:{type:_0x5029x3[_0x8a3e[5]],defaultValue:0,validate:{min:0,max:10}},crating:_0x5029x3.ENUM(_0x8a3e[11],_0x8a3e[12]),cratingMessage:_0x5029x3[_0x8a3e[10]]},{tableName:_0x8a3e[13]});return _0x5029x4} \ No newline at end of file diff --git a/server/models/report_chat_session.js b/server/models/report_chat_session.js index f06066b..cb5a766 100644 --- a/server/models/report_chat_session.js +++ b/server/models/report_chat_session.js @@ -1,46 +1 @@ -'use strict'; - -/** - * Report Chat Session Log Model - */ - -var moment = require('moment'); - -module.exports = function(sequelize, DataTypes) { - - var ReportChatSession = sequelize.define('ReportChatSession', { - uniqueid: DataTypes.STRING, - websitename: DataTypes.STRING, - websiteaddress: DataTypes.STRING, - websiteid: DataTypes.INTEGER, - application: DataTypes.STRING, - visitorid: DataTypes.STRING, - visitorname: DataTypes.STRING, - visitoremail: DataTypes.STRING, - memberid: DataTypes.STRING, - membername: DataTypes.STRING, - queueid: DataTypes.INTEGER, - queuename: DataTypes.STRING, - roomid: DataTypes.INTEGER, - joinAt: DataTypes.DATE, - leaveAt: DataTypes.DATE, - completeAt: DataTypes.DATE, - complete: { - type: DataTypes.BOOLEAN, - defaultValue: 0 - }, - completeReason: DataTypes.ENUM('agent', 'requester'), - abandon: { - type: DataTypes.BOOLEAN, - defaultValue: 0 - }, - unmanaged: { - type: DataTypes.BOOLEAN, - defaultValue: 0 - } - }, { - tableName: 'report_chat_session' - }); - - return ReportChatSession; -}; +var _0xea11=["\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\x43\x68\x61\x74\x53\x65\x73\x73\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","\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"];_0xea11[0];var moment=require(_0xea11[1]);module[_0xea11[2]]=function(_0x4864x2,_0x4864x3){var _0x4864x4=_0x4864x2[_0xea11[11]](_0xea11[3],{uniqueid:_0x4864x3[_0xea11[4]],websitename:_0x4864x3[_0xea11[4]],websiteaddress:_0x4864x3[_0xea11[4]],websiteid:_0x4864x3[_0xea11[5]],application:_0x4864x3[_0xea11[4]],visitorid:_0x4864x3[_0xea11[4]],visitorname:_0x4864x3[_0xea11[4]],visitoremail:_0x4864x3[_0xea11[4]],memberid:_0x4864x3[_0xea11[4]],membername:_0x4864x3[_0xea11[4]],queueid:_0x4864x3[_0xea11[5]],queuename:_0x4864x3[_0xea11[4]],roomid:_0x4864x3[_0xea11[5]],joinAt:_0x4864x3[_0xea11[6]],leaveAt:_0x4864x3[_0xea11[6]],completeAt:_0x4864x3[_0xea11[6]],complete:{type:_0x4864x3[_0xea11[7]],defaultValue:0},completeReason:_0x4864x3.ENUM(_0xea11[8],_0xea11[9]),abandon:{type:_0x4864x3[_0xea11[7]],defaultValue:0},unmanaged:{type:_0x4864x3[_0xea11[7]],defaultValue:0}},{tableName:_0xea11[10]});return _0x4864x4} \ No newline at end of file diff --git a/server/models/report_field.js b/server/models/report_field.js index 208b861..3b97f0c 100644 --- a/server/models/report_field.js +++ b/server/models/report_field.js @@ -1,22 +1 @@ -'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; -}; +var _0x66e8=["\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"];_0x66e8[0];module[_0x66e8[1]]=function(_0x9813x1,_0x9813x2){var _0x9813x3=_0x9813x1[_0x66e8[10]](_0x66e8[2],{field:_0x9813x2[_0x66e8[3]],alias:_0x9813x2[_0x66e8[3]],function:_0x9813x2[_0x66e8[3]],groupBy:_0x9813x2[_0x66e8[4]],orderBy:_0x9813x2[_0x66e8[3]]},{tableName:_0x66e8[5],associate:function(_0x9813x4){_0x9813x3[_0x66e8[6]](_0x9813x4.Metric);_0x9813x3[_0x66e8[9]](_0x66e8[7],{include:[_0x9813x4[_0x66e8[8]]]})}});return _0x9813x3} \ No newline at end of file diff --git a/server/models/report_integration.js b/server/models/report_integration.js index a285620..bfc556d 100644 --- a/server/models/report_integration.js +++ b/server/models/report_integration.js @@ -1,86 +1 @@ -/** - * 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; -}; +var _0x8540=["\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[_0x8540[0]]=function(_0x14cfx1,_0x14cfx2){var _0x14cfx3=_0x14cfx1[_0x8540[12]](_0x8540[1],{integration:_0x14cfx2[_0x8540[2]],eventChannel:_0x14cfx2[_0x8540[2]],exitStatus:_0x14cfx2[_0x8540[2]],ticketId:_0x14cfx2[_0x8540[2]],integrationId:_0x14cfx2[_0x8540[3]],contacts:_0x14cfx2[_0x8540[2]],uniqueid:_0x14cfx2[_0x8540[2]],calleridnum:_0x14cfx2[_0x8540[2]],calleridname:_0x14cfx2[_0x8540[2]],queue:_0x14cfx2[_0x8540[2]],interface:_0x14cfx2[_0x8540[2]],membername:_0x14cfx2[_0x8540[2]],agentcalledAt:_0x14cfx2[_0x8540[4]],agentconnectAt:_0x14cfx2[_0x8540[4]],holdtime:_0x14cfx2[_0x8540[3]],agentcomplete:{type:_0x14cfx2[_0x8540[5]],defaultValue:false},agentcompleteAt:_0x14cfx2[_0x8540[4]],talktime:_0x14cfx2[_0x8540[3]],agentacw:{type:_0x14cfx2[_0x8540[5]],defaultValue:false},acwtime:_0x14cfx2[_0x8540[3]],reason:_0x14cfx2[_0x8540[2]],agentringnoanswer:{type:_0x14cfx2[_0x8540[5]],defaultValue:false},agentringnoanswerAt:_0x14cfx2[_0x8540[4]],agentdump:{type:_0x14cfx2[_0x8540[5]],defaultValue:false},agentdumpAt:_0x14cfx2[_0x8540[4]],lastevent:_0x14cfx2[_0x8540[2]],channel:_0x14cfx2[_0x8540[2]],channelstate:_0x14cfx2[_0x8540[3]],channelstatedesc:_0x14cfx2[_0x8540[2]],connectedlinenum:_0x14cfx2[_0x8540[2]],connectedlinename:_0x14cfx2[_0x8540[2]],language:_0x14cfx2[_0x8540[2]],accountcode:_0x14cfx2[_0x8540[2]],context:_0x14cfx2[_0x8540[2]],exten:_0x14cfx2[_0x8540[2]],priority:_0x14cfx2[_0x8540[2]],destchannel:_0x14cfx2[_0x8540[2]],destchannelstate:_0x14cfx2[_0x8540[3]],destchannelstatedesc:_0x14cfx2[_0x8540[2]],destcalleridnum:_0x14cfx2[_0x8540[2]],destcalleridname:_0x14cfx2[_0x8540[2]],destconnectedlinenum:_0x14cfx2[_0x8540[2]],destconnectedlinename:_0x14cfx2[_0x8540[2]],destlanguage:_0x14cfx2[_0x8540[2]],destaccountcode:_0x14cfx2[_0x8540[2]],destcontext:_0x14cfx2[_0x8540[2]],destexten:_0x14cfx2[_0x8540[2]],destpriority:_0x14cfx2[_0x8540[2]],destuniqueid:_0x14cfx2[_0x8540[2]],messageId:_0x14cfx2[_0x8540[2]],inReplyTo:_0x14cfx2[_0x8540[2]],subject:_0x14cfx2[_0x8540[2]],from:_0x14cfx2[_0x8540[2]],to:_0x14cfx2[_0x8540[2]],cc:_0x14cfx2[_0x8540[2]],attachment:_0x14cfx2[_0x8540[6]],html:_0x14cfx2[_0x8540[6]],text:_0x14cfx2[_0x8540[6]],status:{type:_0x14cfx2.ENUM(_0x8540[7],_0x8540[8],_0x8540[9],_0x8540[10])}},{tableName:_0x8540[11]});return _0x14cfx3} \ No newline at end of file diff --git a/server/models/report_jscripty_input.js b/server/models/report_jscripty_input.js index 5a3d4f5..13e1746 100644 --- a/server/models/report_jscripty_input.js +++ b/server/models/report_jscripty_input.js @@ -1,12 +1 @@ -'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' - }); -}; +var _0xec46=["\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"];_0xec46[0];module[_0xec46[1]]=function(_0xcf1dx1,_0xcf1dx2){return _0xcf1dx1[_0xec46[6]](_0xec46[2],{input_id:_0xcf1dx2[_0xec46[3]],input_type:_0xcf1dx2[_0xec46[4]],input_label:_0xcf1dx2[_0xec46[4]],input_value:_0xcf1dx2[_0xec46[4]]},{tableName:_0xec46[5]})} \ No newline at end of file diff --git a/server/models/report_jscripty_question.js b/server/models/report_jscripty_question.js index f6080f4..24c34c6 100644 --- a/server/models/report_jscripty_question.js +++ b/server/models/report_jscripty_question.js @@ -1,34 +1 @@ -'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'] - } - - }); - } - }); -}; +var _0x727d=["\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"];_0x727d[0];module[_0x727d[1]]=function(_0x4363x1,_0x4363x2){return _0x4363x1[_0x727d[18]](_0x727d[2],{question_id:_0x4363x2[_0x727d[3]],question_type:_0x4363x2[_0x727d[4]],question_label:_0x4363x2[_0x727d[4]],question_text:_0x4363x2[_0x727d[4]],question_answer:_0x4363x2[_0x727d[4]],question_other_label:_0x4363x2[_0x727d[4]],question_other_answer:_0x4363x2[_0x727d[4]]},{tableName:_0x727d[5],associate:function(_0x4363x3){_0x4363x3[_0x727d[2]][_0x727d[8]](_0x4363x3.ReportJscriptyInput,{onDelete:_0x727d[6],foreignKey:_0x727d[7]});_0x4363x3[_0x727d[2]][_0x727d[17]](_0x727d[9],function(_0x4363x4){return {where:{projectId:_0x4363x4},attributes:[_0x727d[10],_0x727d[11],_0x727d[12],_0x727d[13],[_0x4363x1[_0x727d[16]](_0x727d[14],_0x4363x1[_0x727d[15]](_0x727d[10])),_0x727d[14]]],group:[_0x727d[10],_0x727d[11],_0x727d[12],_0x727d[13]]}})}})} \ No newline at end of file diff --git a/server/models/report_jscripty_session.js b/server/models/report_jscripty_session.js index 12a8447..95a2797 100644 --- a/server/models/report_jscripty_session.js +++ b/server/models/report_jscripty_session.js @@ -1,51 +1 @@ -'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 - }] - }] - } - }); - } - }); -}; +var _0x838c=["\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"];_0x838c[0];var moment=require(_0x838c[1]);module[_0x838c[2]]=function(_0x8387x2,_0x8387x3){return _0x8387x2[_0x838c[23]](_0x838c[3],{session_id:{type:_0x8387x3[_0x838c[4]],primaryKey:true,autoIncrement:true},status:{type:_0x8387x3.ENUM(_0x838c[5],_0x838c[6],_0x838c[7])},last_question_id:_0x8387x3[_0x838c[4]],completedAt:{type:_0x8387x3[_0x838c[8]],get:function(){return this[_0x838c[10]](_0x838c[9])?moment(this[_0x838c[10]](_0x838c[9]))[_0x838c[12]](_0x838c[11]):_0x838c[13]}},createdAt:{type:_0x8387x3[_0x838c[8]],get:function(){return moment(this[_0x838c[10]](_0x838c[14]))[_0x838c[12]](_0x838c[11])}}},{tableName:_0x838c[15],associate:function(_0x8387x4){_0x8387x4[_0x838c[3]][_0x838c[18]](_0x8387x4.ReportJscriptyQuestion,{onDelete:_0x838c[16],foreignKey:_0x838c[17]});_0x8387x4[_0x838c[3]][_0x838c[22]](_0x838c[19],function(_0x8387x5){return {where:{ProjectId:_0x8387x5},include:[{model:_0x8387x4[_0x838c[20]],include:[{model:_0x8387x4[_0x838c[21]]}]}]}})}})} \ No newline at end of file diff --git a/server/models/report_mail.js b/server/models/report_mail.js index d4327ea..c7b9bdf 100644 --- a/server/models/report_mail.js +++ b/server/models/report_mail.js @@ -1,43 +1 @@ -/** - * 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; -}; +var _0x9a4b=["\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(_0x9a4b[0]);module[_0x9a4b[1]]=function(_0xc85dx2,_0xc85dx3){var _0xc85dx4=_0xc85dx2[_0x9a4b[16]](_0x9a4b[2],{uniqueid:_0xc85dx3[_0x9a4b[3]],timeslot:_0xc85dx3[_0x9a4b[4]],subject:_0xc85dx3[_0x9a4b[3]],accountid:_0xc85dx3[_0x9a4b[3]],accountname:_0xc85dx3[_0x9a4b[3]],accountaddress:_0xc85dx3[_0x9a4b[3]],application:_0xc85dx3[_0x9a4b[3]],memberid:_0xc85dx3[_0x9a4b[4]],membername:_0xc85dx3[_0x9a4b[3]],queue:_0xc85dx3[_0x9a4b[4]],queuename:_0xc85dx3[_0x9a4b[3]],roomid:_0xc85dx3[_0x9a4b[4]],messageid:_0xc85dx3[_0x9a4b[4]],reason:{type:_0xc85dx3[_0x9a4b[3]],defaultValue:_0x9a4b[5]},connectid:{type:_0xc85dx3[_0x9a4b[3]],unique:true,set:function(_0xc85dx5){this[_0x9a4b[8]](_0x9a4b[6],this[_0x9a4b[7]]);this[_0x9a4b[8]](_0x9a4b[9],_0x9a4b[10]);this[_0x9a4b[8]](_0x9a4b[11],moment()[_0x9a4b[13]](_0x9a4b[12]))}},calledAt:_0xc85dx3[_0x9a4b[14]],connectedAt:_0xc85dx3[_0x9a4b[14]]},{tableName:_0x9a4b[15]});return _0xc85dx4} \ No newline at end of file diff --git a/server/models/report_mail_room.js b/server/models/report_mail_room.js index 05beb81..8079e37 100644 --- a/server/models/report_mail_room.js +++ b/server/models/report_mail_room.js @@ -1,41 +1 @@ -/** - * Agent Log Model - */ - -var moment = require('moment'); - -module.exports = function(sequelize, DataTypes) { - var ReportMailRoom = sequelize.define('ReportMailRoom', { - uniqueid: { - type: DataTypes.STRING, - unique: true - }, - subject: DataTypes.STRING, - accountid: DataTypes.STRING, - accountname: DataTypes.STRING, - accountaddress: DataTypes.STRING, - application: DataTypes.STRING, - from: DataTypes.STRING, - memberid: DataTypes.STRING, - membername: DataTypes.STRING, - queue: DataTypes.INTEGER, - queuename: DataTypes.STRING, - roomid: DataTypes.INTEGER, - complete: { - type: DataTypes.BOOLEAN, - defaulValue: false - }, - completeReason: DataTypes.ENUM('agent'), - completeAt: DataTypes.DATE, - joinAt: DataTypes.DATE, - leaveAt: DataTypes.DATE, - unmanaged: { - type: DataTypes.BOOLEAN, - defaultValue: false - } - }, { - tableName: 'report_mail_room' - }); - - return ReportMailRoom; -}; +var _0xc075=["\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x61\x67\x65\x6E\x74","\x44\x41\x54\x45","\x54\x45\x58\x54","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0xc075[0]);module[_0xc075[1]]=function(_0x6607x2,_0x6607x3){var _0x6607x4=_0x6607x2[_0xc075[10]](_0xc075[2],{uniqueid:{type:_0x6607x3[_0xc075[3]],unique:true},subject:_0x6607x3[_0xc075[3]],accountid:_0x6607x3[_0xc075[3]],accountname:_0x6607x3[_0xc075[3]],accountaddress:_0x6607x3[_0xc075[3]],application:_0x6607x3[_0xc075[3]],from:_0x6607x3[_0xc075[3]],memberid:_0x6607x3[_0xc075[3]],membername:_0x6607x3[_0xc075[3]],queue:_0x6607x3[_0xc075[4]],queuename:_0x6607x3[_0xc075[3]],roomid:_0x6607x3[_0xc075[4]],complete:{type:_0x6607x3[_0xc075[5]],defaulValue:false},completeReason:_0x6607x3.ENUM(_0xc075[6]),completeAt:_0x6607x3[_0xc075[7]],joinAt:_0x6607x3[_0xc075[7]],leaveAt:_0x6607x3[_0xc075[7]],unmanaged:{type:_0x6607x3[_0xc075[5]],defaultValue:false},disposition:_0x6607x3[_0xc075[3]],note:_0x6607x3[_0xc075[8]],urating:{type:_0x6607x3[_0xc075[4]],defaultValue:0,validate:{min:0,max:10}}},{tableName:_0xc075[9]});return _0x6607x4} \ No newline at end of file diff --git a/server/models/report_mail_session.js b/server/models/report_mail_session.js index d172828..b163cc7 100644 --- a/server/models/report_mail_session.js +++ b/server/models/report_mail_session.js @@ -1,41 +1 @@ -/** - * Agent Log Model - */ - -var moment = require('moment'); - -module.exports = function(sequelize, DataTypes) { - var ReportMailSession = sequelize.define('ReportMailSession', { - uniqueid: DataTypes.STRING, - 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 - }, - joinAt: DataTypes.DATE, - leaveAt: DataTypes.DATE, - completeAt: DataTypes.DATE, - complete: { - type: DataTypes.BOOLEAN, - defaulValue: false - }, - completeReason: DataTypes.ENUM('agent'), - unmanaged: { - type: DataTypes.BOOLEAN, - defaultValue: false - } - }, { - tableName: 'report_mail_session' - }); - - return ReportMailSession; -}; +var _0x7dbc=["\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","\x42\x4F\x4F\x4C\x45\x41\x4E","\x61\x67\x65\x6E\x74","\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(_0x7dbc[0]);module[_0x7dbc[1]]=function(_0xc1eax2,_0xc1eax3){var _0xc1eax4=_0xc1eax2[_0x7dbc[9]](_0x7dbc[2],{uniqueid:_0xc1eax3[_0x7dbc[3]],subject:_0xc1eax3[_0x7dbc[3]],accountid:_0xc1eax3[_0x7dbc[3]],accountname:_0xc1eax3[_0x7dbc[3]],accountaddress:_0xc1eax3[_0x7dbc[3]],application:_0xc1eax3[_0x7dbc[3]],memberid:_0xc1eax3[_0x7dbc[3]],membername:_0xc1eax3[_0x7dbc[3]],queue:_0xc1eax3[_0x7dbc[4]],queuename:_0xc1eax3[_0x7dbc[3]],roomid:_0xc1eax3[_0x7dbc[4]],fidelity:{type:_0xc1eax3[_0x7dbc[4]],defaultValue:0},joinAt:_0xc1eax3[_0x7dbc[5]],leaveAt:_0xc1eax3[_0x7dbc[5]],completeAt:_0xc1eax3[_0x7dbc[5]],complete:{type:_0xc1eax3[_0x7dbc[6]],defaulValue:false},completeReason:_0xc1eax3.ENUM(_0x7dbc[7]),unmanaged:{type:_0xc1eax3[_0x7dbc[6]],defaultValue:false}},{tableName:_0x7dbc[8]});return _0xc1eax4} \ No newline at end of file diff --git a/server/models/report_member.js b/server/models/report_member.js index e4aac4e..14ab336 100644 --- a/server/models/report_member.js +++ b/server/models/report_member.js @@ -1,33 +1 @@ -/** - * 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; -}; +var _0x7616=["\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(_0x7616[0]);module[_0x7616[1]]=function(_0x8ab3x2,_0x8ab3x3){var _0x8ab3x4=_0x8ab3x2[_0x7616[8]](_0x7616[2],{channel:_0x8ab3x3[_0x7616[3]],membername:_0x8ab3x3[_0x7616[3]],interface:_0x8ab3x3[_0x7616[3]],type:{type:_0x8ab3x3[_0x7616[3]],defaultValue:_0x7616[4]},duration:_0x8ab3x3[_0x7616[5]],enterAt:_0x8ab3x3[_0x7616[6]],exitAt:_0x8ab3x3[_0x7616[6]],data1:_0x8ab3x3[_0x7616[3]],data2:_0x8ab3x3[_0x7616[3]],data3:_0x8ab3x3[_0x7616[3]],data4:_0x8ab3x3[_0x7616[3]],data5:_0x8ab3x3[_0x7616[3]]},{tableName:_0x7616[7]});return _0x8ab3x4} \ No newline at end of file diff --git a/server/models/report_queue.js b/server/models/report_queue.js index 5ed2def..969faef 100644 --- a/server/models/report_queue.js +++ b/server/models/report_queue.js @@ -1,83 +1 @@ -/** - * 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'] - }], - associate: function(models) { - // SCOPES MANAGEMENT - ReportQueue - .addScope('agent', function(queues) { - return { - where: { - queue: { - $in: queues - } - } - } - }); - - ReportQueue - .addScope('waiting', { - where: { - queuecallerleaveAt: null - } - }); - } - }); - - return ReportQueue; -}; +var _0x6578=["\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","\x61\x67\x65\x6E\x74","\x61\x64\x64\x53\x63\x6F\x70\x65","\x77\x61\x69\x74\x69\x6E\x67","\x64\x65\x66\x69\x6E\x65"];var moment=require(_0x6578[0]);module[_0x6578[1]]=function(_0x3fbfx2,_0x3fbfx3){var _0x3fbfx4=_0x3fbfx2[_0x6578[21]](_0x6578[2],{uniqueid:_0x3fbfx3[_0x6578[3]],calleridnum:_0x3fbfx3[_0x6578[3]],calleridname:_0x3fbfx3[_0x6578[3]],queue:_0x3fbfx3[_0x6578[3]],queuecallerjoinAt:_0x3fbfx3[_0x6578[4]],queuecallerleaveAt:{type:_0x3fbfx3[_0x6578[4]],set:function(_0x3fbfx5){var _0x3fbfx6=moment(_0x3fbfx5);var _0x3fbfx7=moment(this[_0x6578[8]](_0x6578[7]))[_0x6578[6]](_0x6578[5]);this[_0x6578[10]](_0x6578[9],_0x3fbfx5);this[_0x6578[10]](_0x6578[11],_0x3fbfx6[_0x6578[13]](_0x3fbfx7,_0x6578[12]))}},position:_0x3fbfx3[_0x6578[14]],count:_0x3fbfx3[_0x6578[14]],queuecallerabandon:{type:_0x3fbfx3[_0x6578[15]],defaultValue:false},queuecallerabandonAt:_0x3fbfx3[_0x6578[4]],queuecallercomplete:{type:_0x3fbfx3[_0x6578[15]],defaultValue:false},queuecallercompleteAt:_0x3fbfx3[_0x6578[4]],queuecallerexit:{type:_0x3fbfx3[_0x6578[15]],defaultValue:false},queuecallerexitAt:_0x3fbfx3[_0x6578[4]],queuecallerexitreason:_0x3fbfx3[_0x6578[3]],originalposition:_0x3fbfx3[_0x6578[14]],channel:_0x3fbfx3[_0x6578[3]],channelstate:_0x3fbfx3[_0x6578[14]],channelstatedesc:_0x3fbfx3[_0x6578[3]],connectedlinenum:_0x3fbfx3[_0x6578[3]],connectedlinename:_0x3fbfx3[_0x6578[3]],language:_0x3fbfx3[_0x6578[3]],accountcode:_0x3fbfx3[_0x6578[3]],context:_0x3fbfx3[_0x6578[3]],exten:_0x3fbfx3[_0x6578[3]],priority:_0x3fbfx3[_0x6578[3]],holdtime:_0x3fbfx3[_0x6578[14]]},{tableName:_0x6578[16],indexes:[{fields:[_0x6578[17]]}],associate:function(_0x3fbfx8){_0x3fbfx4[_0x6578[19]](_0x6578[18],function(_0x3fbfx9){return {where:{queue:{$in:_0x3fbfx9}}}});_0x3fbfx4[_0x6578[19]](_0x6578[20],{where:{queuecallerleaveAt:null}})}});return _0x3fbfx4} \ No newline at end of file diff --git a/server/models/report_square.js b/server/models/report_square.js index 62a8e0c..6458688 100644 --- a/server/models/report_square.js +++ b/server/models/report_square.js @@ -1,89 +1 @@ -/** - * 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; -}; +var _0x225b=["\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[_0x225b[0]]=function(_0xb7d6x1,_0xb7d6x2){var _0xb7d6x3=_0xb7d6x1[_0x225b[5]](_0x225b[1],{network:{type:_0xb7d6x2[_0x225b[2]]},network_script:{type:_0xb7d6x2[_0x225b[2]]},request:{type:_0xb7d6x2[_0x225b[2]]},channel:{type:_0xb7d6x2[_0x225b[2]]},language:{type:_0xb7d6x2[_0x225b[2]]},type:{type:_0xb7d6x2[_0x225b[2]]},uniqueid:{type:_0xb7d6x2[_0x225b[2]]},version:{type:_0xb7d6x2[_0x225b[2]]},callerid:{type:_0xb7d6x2[_0x225b[2]]},calleridname:{type:_0xb7d6x2[_0x225b[2]]},callingpres:{type:_0xb7d6x2[_0x225b[2]]},callingani2:{type:_0xb7d6x2[_0x225b[2]]},callington:{type:_0xb7d6x2[_0x225b[2]]},callingtns:{type:_0xb7d6x2[_0x225b[2]]},dnid:{type:_0xb7d6x2[_0x225b[2]]},rdnis:{type:_0xb7d6x2[_0x225b[2]]},context:{type:_0xb7d6x2[_0x225b[2]]},extension:{type:_0xb7d6x2[_0x225b[2]]},priority:{type:_0xb7d6x2[_0x225b[2]]},enhanced:{type:_0xb7d6x2[_0x225b[2]]},accountcode:{type:_0xb7d6x2[_0x225b[2]]},threadid:{type:_0xb7d6x2[_0x225b[2]]},project_name:{type:_0xb7d6x2[_0x225b[2]]},joinAt:{type:_0xb7d6x2[_0x225b[3]]},leaveAt:{type:_0xb7d6x2[_0x225b[3]],unique:true}},{tableName:_0x225b[4]});return _0xb7d6x3} \ No newline at end of file diff --git a/server/models/report_square_detail.js b/server/models/report_square_detail.js index b9a2f4c..ca5e11c 100644 --- a/server/models/report_square_detail.js +++ b/server/models/report_square_detail.js @@ -1,25 +1 @@ -/** - * 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; -}; +var _0x946e=["\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[_0x946e[0]]=function(_0x891cx1,_0x891cx2){var _0x891cx3=_0x891cx1[_0x946e[4]](_0x946e[1],{uniqueid:{type:_0x891cx2[_0x946e[2]]},node:{type:_0x891cx2[_0x946e[2]]},application:{type:_0x891cx2[_0x946e[2]]},data:{type:_0x891cx2[_0x946e[2]]}},{tableName:_0x946e[3]});return _0x891cx3} \ No newline at end of file diff --git a/server/models/report_tranfer.js b/server/models/report_tranfer.js index f075f41..3e747b8 100644 --- a/server/models/report_tranfer.js +++ b/server/models/report_tranfer.js @@ -1,44 +1 @@ -/** - * Agent Log Model - */ - -module.exports = function(sequelize, DataTypes) { - - var ReportTransfer = sequelize.define('ReportTransfer', { - type: DataTypes.ENUM('blind', 'attended'), - result: DataTypes.STRING, - transferercalleridnum: DataTypes.STRING, - transferercalleridname: DataTypes.STRING, - origtransferercalleridnum: DataTypes.STRING, - origtransferercalleridname: DataTypes.STRING, - transfererconnectedlinenum: DataTypes.STRING, - transfererconnectedlinename: DataTypes.STRING, - origtransfererconnectedlinenum: DataTypes.STRING, - origtransfererconnectedlinename: DataTypes.STRING, - transferercontext: DataTypes.STRING, - transfererexten: DataTypes.STRING, - origtransferercontext: DataTypes.STRING, - origtransfererexten: DataTypes.STRING, - origtransfereruniqueid: DataTypes.STRING, - secondtransfereruniqueid: DataTypes.STRING, - secondtransfererlinkedid: DataTypes.STRING, - transfereecontext: DataTypes.STRING, - transfereeexten: DataTypes.STRING, - transfereecalleridnum: DataTypes.STRING, - transfereecalleridname: DataTypes.STRING, - transfereeconnectedlinenum: DataTypes.STRING, - transfereeconnectedlinename: DataTypes.STRING, - transfertargetcalleridname: DataTypes.STRING, - transfertargetconnectedlinenum: DataTypes.STRING, - transfertargetcontext: DataTypes.STRING, - transfertargetexten: DataTypes.STRING, - transfertargetuniqueid: DataTypes.STRING, - transfereruniqueid: DataTypes.STRING, - transfererlinkedid: DataTypes.STRING, - extension: DataTypes.STRING, - }, { - tableName: 'report_transfer' - }); - - return ReportTransfer; -}; +var _0xf756=["\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[_0xf756[0]]=function(_0xc91dx1,_0xc91dx2){var _0xc91dx3=_0xc91dx1[_0xf756[6]](_0xf756[1],{type:_0xc91dx2.ENUM(_0xf756[2],_0xf756[3]),result:_0xc91dx2[_0xf756[4]],transferercalleridnum:_0xc91dx2[_0xf756[4]],transferercalleridname:_0xc91dx2[_0xf756[4]],origtransferercalleridnum:_0xc91dx2[_0xf756[4]],origtransferercalleridname:_0xc91dx2[_0xf756[4]],transfererconnectedlinenum:_0xc91dx2[_0xf756[4]],transfererconnectedlinename:_0xc91dx2[_0xf756[4]],origtransfererconnectedlinenum:_0xc91dx2[_0xf756[4]],origtransfererconnectedlinename:_0xc91dx2[_0xf756[4]],transferercontext:_0xc91dx2[_0xf756[4]],transfererexten:_0xc91dx2[_0xf756[4]],origtransferercontext:_0xc91dx2[_0xf756[4]],origtransfererexten:_0xc91dx2[_0xf756[4]],origtransfereruniqueid:_0xc91dx2[_0xf756[4]],secondtransfereruniqueid:_0xc91dx2[_0xf756[4]],secondtransfererlinkedid:_0xc91dx2[_0xf756[4]],transfereecontext:_0xc91dx2[_0xf756[4]],transfereeexten:_0xc91dx2[_0xf756[4]],transfereecalleridnum:_0xc91dx2[_0xf756[4]],transfereecalleridname:_0xc91dx2[_0xf756[4]],transfereeconnectedlinenum:_0xc91dx2[_0xf756[4]],transfereeconnectedlinename:_0xc91dx2[_0xf756[4]],transfertargetcalleridname:_0xc91dx2[_0xf756[4]],transfertargetconnectedlinenum:_0xc91dx2[_0xf756[4]],transfertargetcontext:_0xc91dx2[_0xf756[4]],transfertargetexten:_0xc91dx2[_0xf756[4]],transfertargetuniqueid:_0xc91dx2[_0xf756[4]],transfereruniqueid:_0xc91dx2[_0xf756[4]],transfererlinkedid:_0xc91dx2[_0xf756[4]],extension:_0xc91dx2[_0xf756[4]]},{tableName:_0xf756[5]});return _0xc91dx3} \ No newline at end of file diff --git a/server/models/report_tree.js b/server/models/report_tree.js index 2c14bfe..8a23e11 100644 --- a/server/models/report_tree.js +++ b/server/models/report_tree.js @@ -1,12 +1 @@ -'use strict'; - -module.exports = function(sequelize, DataTypes) { - - var ReportTree = sequelize.define('ReportTree', { - tree: DataTypes.TEXT - }, { - tableName: 'report_trees' - }); - - return ReportTree; -}; +var _0x58e1=["\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"];_0x58e1[0];module[_0x58e1[1]]=function(_0x5a08x1,_0x5a08x2){var _0x5a08x3=_0x5a08x1[_0x58e1[5]](_0x58e1[2],{tree:_0x5a08x2[_0x58e1[3]]},{tableName:_0x58e1[4]});return _0x5a08x3} \ No newline at end of file diff --git a/server/models/salesforce_account.js b/server/models/salesforce_account.js index 0ea5fa6..6683dcd 100644 --- a/server/models/salesforce_account.js +++ b/server/models/salesforce_account.js @@ -1,33 +1 @@ -'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'] - }] - }); - } - }); -}; +var _0x188e=["\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"];_0x188e[0];module[_0x188e[1]]=function(_0x30fex1,_0x30fex2){return _0x30fex1[_0x188e[13]](_0x188e[2],{name:_0x30fex2[_0x188e[3]],description:_0x30fex2[_0x188e[3]],username:{type:_0x30fex2[_0x188e[3]],unique:true},remoteUri:_0x30fex2[_0x188e[3]],password:_0x30fex2[_0x188e[3]],clientId:_0x30fex2[_0x188e[3]],clientSecret:_0x30fex2[_0x188e[3]],securityToken:_0x30fex2[_0x188e[3]]},{tableName:_0x188e[4],associate:function(_0x30fex3){_0x30fex3[_0x188e[2]][_0x188e[7]](_0x30fex3.SalesforceConfiguration,{as:_0x188e[5],foreignKey:_0x188e[6]});_0x30fex3[_0x188e[2]][_0x188e[12]](_0x188e[8],{include:[{model:_0x30fex3[_0x188e[9]],as:_0x188e[5],required:false,attributes:[_0x188e[10],_0x188e[11]]}]})}})} \ No newline at end of file diff --git a/server/models/salesforce_configuration.js b/server/models/salesforce_configuration.js index 6850116..b6ce4c6 100644 --- a/server/models/salesforce_configuration.js +++ b/server/models/salesforce_configuration.js @@ -1,27 +1 @@ -'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' - }); - } - }); -}; +var _0xc934=["\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"];_0xc934[0];module[_0xc934[1]]=function(_0x41dcx1,_0x41dcx2){return _0x41dcx1[_0xc934[14]](_0xc934[2],{name:_0x41dcx2[_0xc934[3]],description:_0x41dcx2[_0xc934[3]]},{tableName:_0xc934[4],associate:function(_0x41dcx3){_0x41dcx3[_0xc934[2]][_0xc934[6]](_0x41dcx3.SalesforceAccount,{foreignKey:_0xc934[5]});_0x41dcx3[_0xc934[2]][_0xc934[9]](_0x41dcx3.SalesforceField,{as:_0xc934[7],foreignKey:_0xc934[8]});_0x41dcx3[_0xc934[2]][_0xc934[9]](_0x41dcx3.SalesforceField,{as:_0xc934[10],foreignKey:_0xc934[11]});_0x41dcx3[_0xc934[2]][_0xc934[9]](_0x41dcx3.SalesforceField,{as:_0xc934[12],foreignKey:_0xc934[13]})}})} \ No newline at end of file diff --git a/server/models/salesforce_field.js b/server/models/salesforce_field.js index f3a3501..78443fc 100644 --- a/server/models/salesforce_field.js +++ b/server/models/salesforce_field.js @@ -1,22 +1 @@ -'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); - } - }); -}; +var _0x90a9=["\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"];_0x90a9[0];module[_0x90a9[1]]=function(_0x5441x1,_0x5441x2){return _0x5441x1[_0x90a9[9]](_0x90a9[2],{type:{type:_0x5441x2.ENUM(_0x90a9[3],_0x90a9[4],_0x90a9[5]),defaultValue:_0x90a9[3]},content:_0x5441x2[_0x90a9[6]],key:_0x5441x2[_0x90a9[6]],keyType:{type:_0x5441x2.ENUM(_0x90a9[3],_0x90a9[4])},keyContent:_0x5441x2[_0x90a9[6]],idField:_0x5441x2[_0x90a9[6]]},{tableName:_0x90a9[7],associate:function(_0x5441x3){_0x5441x3[_0x90a9[2]][_0x90a9[8]](_0x5441x3.Variable)}})} \ No newline at end of file diff --git a/server/models/settings.js b/server/models/settings.js index a7b7931..326eec5 100644 --- a/server/models/settings.js +++ b/server/models/settings.js @@ -1,32 +1 @@ -'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; - -}; +var _0x26bd=["\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"];_0x26bd[0];module[_0x26bd[1]]=function(_0x8b20x1,_0x8b20x2){var _0x8b20x3=_0x8b20x1[_0x26bd[6]](_0x26bd[2],{license:_0x8b20x2[_0x26bd[3]],min_internal:{type:_0x8b20x2.INTEGER(11),unique:true,defaultValue:1000},min_mailbox:{type:_0x8b20x2.INTEGER(11),unique:true,defaultValue:1000},agi_port:{type:_0x8b20x2.INTEGER(11),defaultValue:4573},automation_timeout:{type:_0x8b20x2.INTEGER(11),defaultValue:3600},soundPath:_0x8b20x2[_0x26bd[4]]},{tableName:_0x26bd[5]});return _0x8b20x3} \ No newline at end of file diff --git a/server/models/sms_account.js b/server/models/sms_account.js index f75e319..a410c9a 100644 --- a/server/models/sms_account.js +++ b/server/models/sms_account.js @@ -1,50 +1 @@ -'use strict'; - -module.exports = function(sequelize, DataTypes) { - var SmsAccount = sequelize.define('SmsAccount', { - name: { - type: DataTypes.STRING - }, - description: { - type: DataTypes.STRING - }, - type: { - type: DataTypes.STRING - }, - fidelity: { - type: DataTypes.BOOLEAN, - defaultValue: false - }, - timeout: { - type: DataTypes.INTEGER, - defaultValue: 0 - }, - phone: { - type: DataTypes.INTEGER, - unique: true - - }, - sid: { - type: DataTypes.STRING - }, - token: { - type: DataTypes.STRING - }, - username: { - type: DataTypes.STRING - }, - password: { - type: DataTypes.STRING - } - - }, { - tableName: 'sms_accounts', - associate: function(models) { - // BINDING - SmsAccount.hasMany(models.SmsRoom); - SmsAccount.hasMany(models.SmsMessage); - - } - }); - return SmsAccount; -}; +var _0x2096=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\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","\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x68\x61\x73\x4D\x61\x6E\x79","\x64\x65\x66\x69\x6E\x65"];_0x2096[0];module[_0x2096[1]]=function(_0x7cf9x1,_0x7cf9x2){var _0x7cf9x3=_0x7cf9x1[_0x2096[8]](_0x2096[2],{name:{type:_0x7cf9x2[_0x2096[3]]},description:{type:_0x7cf9x2[_0x2096[3]]},type:{type:_0x7cf9x2[_0x2096[3]]},fidelity:{type:_0x7cf9x2[_0x2096[4]],defaultValue:false},timeout:{type:_0x7cf9x2[_0x2096[5]],defaultValue:0},phone:{type:_0x7cf9x2[_0x2096[5]],unique:true},sid:{type:_0x7cf9x2[_0x2096[3]]},token:{type:_0x7cf9x2[_0x2096[3]]},username:{type:_0x7cf9x2[_0x2096[3]]},password:{type:_0x7cf9x2[_0x2096[3]]}},{tableName:_0x2096[6],associate:function(_0x7cf9x4){_0x7cf9x3[_0x2096[7]](_0x7cf9x4.SmsRoom);_0x7cf9x3[_0x2096[7]](_0x7cf9x4.SmsMessage)}});return _0x7cf9x3} \ No newline at end of file diff --git a/server/models/sms_application.js b/server/models/sms_application.js index 32f093b..ccce7f7 100644 --- a/server/models/sms_application.js +++ b/server/models/sms_application.js @@ -1,33 +1 @@ -'use strict'; - -module.exports = function(sequelize, DataTypes) { - return sequelize.define('SmsApplication', { - app: { - type: DataTypes.ENUM('queue', 'agent') - }, - priority: { - type: DataTypes.INTEGER - }, - timeout: { - type: DataTypes.INTEGER - }, - interval: { - type: DataTypes.STRING - } - }, { - tableName: 'sms_applications', - associate: function(models) { - // hasMany relations - models.SmsApplication.belongsTo(models.User, { - onDelete: 'restrict' - }); - models.SmsApplication.belongsTo(models.Interval); - models.SmsApplication.belongsTo(models.SmsQueue, { - onDelete: 'restrict' - }); - models.SmsApplication.belongsTo(models.SmsAccount, { - onDelete: 'restrict' - }); - } - }); -}; +var _0x4673=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\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","\x73\x6D\x73\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"];_0x4673[0];module[_0x4673[1]]=function(_0xf9fbx1,_0xf9fbx2){return _0xf9fbx1[_0x4673[10]](_0x4673[2],{app:{type:_0xf9fbx2.ENUM(_0x4673[3],_0x4673[4])},priority:{type:_0xf9fbx2[_0x4673[5]]},timeout:{type:_0xf9fbx2[_0x4673[5]]},interval:{type:_0xf9fbx2[_0x4673[6]]}},{tableName:_0x4673[7],associate:function(_0xf9fbx3){_0xf9fbx3[_0x4673[2]][_0x4673[9]](_0xf9fbx3.User,{onDelete:_0x4673[8]});_0xf9fbx3[_0x4673[2]][_0x4673[9]](_0xf9fbx3.Interval);_0xf9fbx3[_0x4673[2]][_0x4673[9]](_0xf9fbx3.SmsQueue,{onDelete:_0x4673[8]});_0xf9fbx3[_0x4673[2]][_0x4673[9]](_0xf9fbx3.SmsAccount,{onDelete:_0x4673[8]})}})} \ No newline at end of file diff --git a/server/models/sms_message.js b/server/models/sms_message.js index 67067a7..33afacc 100644 --- a/server/models/sms_message.js +++ b/server/models/sms_message.js @@ -1,41 +1 @@ -'use strict'; - -module.exports = function(sequelize, DataTypes) { - var SmsMessage = sequelize.define('SmsMessage', { - from: { - type: DataTypes.INTEGER, - allowNull: false, - validate: { - notEmpty: true, - } - }, - to: { - type: DataTypes.INTEGER, - allowNull: false, - validate: { - notEmpty: true, - } - }, - // from: DataTypes.INTEGER, - // to: DataTypes.INTEGER, - body: DataTypes.STRING, - method: { - type: DataTypes.ENUM('IN', 'OUT') - }, - status: { - type: DataTypes.ENUM('SENT', 'SENDING', 'RECEIVED', 'FAILED', 'NOTE'), - defaultValue: 'SENDING' - } - }, { - tableName: 'sms_messages', - associate: function(models) { - - SmsMessage.belongsTo(models.User); - SmsMessage.belongsTo(models.SmsRoom, { - onDelete: 'cascade' - }); - - } - }) - return SmsMessage; -}; +var _0x8b97=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x49\x4E","\x4F\x55\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","\x4E\x4F\x54\x45","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x63\x61\x73\x63\x61\x64\x65","\x64\x65\x66\x69\x6E\x65"];_0x8b97[0];module[_0x8b97[1]]=function(_0x96cdx1,_0x96cdx2){var _0x96cdx3=_0x96cdx1[_0x8b97[15]](_0x8b97[2],{from:{type:_0x96cdx2[_0x8b97[3]],allowNull:false,validate:{notEmpty:true}},to:{type:_0x96cdx2[_0x8b97[3]],allowNull:false,validate:{notEmpty:true}},body:_0x96cdx2[_0x8b97[4]],method:{type:_0x96cdx2.ENUM(_0x8b97[5],_0x8b97[6])},status:{type:_0x96cdx2.ENUM(_0x8b97[7],_0x8b97[8],_0x8b97[9],_0x8b97[10],_0x8b97[11]),defaultValue:_0x8b97[8]}},{tableName:_0x8b97[12],associate:function(_0x96cdx4){_0x96cdx3[_0x8b97[13]](_0x96cdx4.User);_0x96cdx3[_0x8b97[13]](_0x96cdx4.SmsRoom,{onDelete:_0x8b97[14]})}});return _0x96cdx3} \ No newline at end of file diff --git a/server/models/sms_queue.js b/server/models/sms_queue.js index b07d717..6518974 100644 --- a/server/models/sms_queue.js +++ b/server/models/sms_queue.js @@ -1,34 +1 @@ -'use strict'; - -module.exports = function(sequelize, DataTypes) { - return sequelize.define('SmsQueue', { - name: { - type: DataTypes.STRING, - unique: true - }, - description: { - type: DataTypes.STRING, - }, - timeout: { - type: DataTypes.INTEGER, - }, - strategy: { - type: DataTypes.ENUM('rrmemory', 'beepall') - } - }, { - tableName: 'sms_queues', - associate: function(models) { - // RELATIONS - // models.SmsQueue.belongsToMany(models.User, { - // through: models.UserHasSmsQueue - // }); - //SCOPES - models.SmsQueue.addScope('default', { - include: [{ - model: models.User, - attributes: ['id', 'name', 'fullname', 'email', 'online', 'lastLoginAt'] - }] - }); - } - }); -}; +var _0x9e3c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\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","\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x73","\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","\x61\x64\x64\x53\x63\x6F\x70\x65","\x64\x65\x66\x69\x6E\x65"];_0x9e3c[0];module[_0x9e3c[1]]=function(_0x3bf6x1,_0x3bf6x2){return _0x3bf6x1[_0x9e3c[17]](_0x9e3c[2],{name:{type:_0x3bf6x2[_0x9e3c[3]],unique:true},description:{type:_0x3bf6x2[_0x9e3c[3]]},timeout:{type:_0x3bf6x2[_0x9e3c[4]]},strategy:{type:_0x3bf6x2.ENUM(_0x9e3c[5],_0x9e3c[6])}},{tableName:_0x9e3c[7],associate:function(_0x3bf6x3){_0x3bf6x3[_0x9e3c[2]][_0x9e3c[16]](_0x9e3c[8],{include:[{model:_0x3bf6x3[_0x9e3c[9]],attributes:[_0x9e3c[10],_0x9e3c[11],_0x9e3c[12],_0x9e3c[13],_0x9e3c[14],_0x9e3c[15]]}]})}})} \ No newline at end of file diff --git a/server/models/sms_room.js b/server/models/sms_room.js index fa58c9f..e5aa5c8 100644 --- a/server/models/sms_room.js +++ b/server/models/sms_room.js @@ -1,41 +1 @@ -'use strict'; - -module.exports = function(sequelize, DataTypes) { - var SmsRoom = sequelize.define('SmsRoom', { - from: DataTypes.INTEGER, - status: { - type: DataTypes.ENUM('NEW', 'OPEN', 'CLOSED'), - defaultValue: 'NEW' - } - - }, { - tableName: 'sms_rooms', - associate: function(models) { - // BINDING - SmsRoom.hasMany(models.SmsMessage); - SmsRoom.belongsTo(models.User); - - SmsRoom.belongsTo(models.SmsAccount); - SmsRoom.addScope('default', { - order: [ - ['createdAt', 'DESC'] - ], - include: [{ - model: models.SmsAccount - }, { - model: models.SmsMessage, - include: [{ - model: models.User, - attributes: ['id', 'name', 'fullname', 'email'] - }] - }, { - model: models.User, - attributes: ['id', 'name', 'fullname', 'email'] - }] - }); - } - - - }); - return SmsRoom; -}; +var _0xb808=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x49\x4E\x54\x45\x47\x45\x52","\x4E\x45\x57","\x4F\x50\x45\x4E","\x43\x4C\x4F\x53\x45\x44","\x73\x6D\x73\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\x61\x75\x6C\x74","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\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","\x64\x65\x66\x69\x6E\x65"];_0xb808[0];module[_0xb808[1]]=function(_0xe915x1,_0xe915x2){var _0xe915x3=_0xe915x1[_0xb808[21]](_0xb808[2],{from:_0xe915x2[_0xb808[3]],status:{type:_0xe915x2.ENUM(_0xb808[4],_0xb808[5],_0xb808[6]),defaultValue:_0xb808[4]}},{tableName:_0xb808[7],associate:function(_0xe915x4){_0xe915x3[_0xb808[8]](_0xe915x4.SmsMessage);_0xe915x3[_0xb808[9]](_0xe915x4.User);_0xe915x3[_0xb808[9]](_0xe915x4.SmsAccount);_0xe915x3[_0xb808[20]](_0xb808[10],{order:[[_0xb808[11],_0xb808[12]]],include:[{model:_0xe915x4[_0xb808[13]]},{model:_0xe915x4[_0xb808[14]],include:[{model:_0xe915x4[_0xb808[15]],attributes:[_0xb808[16],_0xb808[17],_0xb808[18],_0xb808[19]]}]},{model:_0xe915x4[_0xb808[15]],attributes:[_0xb808[16],_0xb808[17],_0xb808[18],_0xb808[19]]}]})}});return _0xe915x3} \ No newline at end of file diff --git a/server/models/sound.js b/server/models/sound.js index 3b5ab98..d684cea 100644 --- a/server/models/sound.js +++ b/server/models/sound.js @@ -1,36 +1 @@ -'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; -}; +var _0xd5a7=["\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"];_0xd5a7[0];module[_0xd5a7[1]]=function(_0x170fx1,_0x170fx2){var _0x170fx3=_0x170fx1[_0xd5a7[10]](_0xd5a7[2],{name:_0x170fx2[_0xd5a7[3]],save_name:_0x170fx2[_0xd5a7[3]],display_name:{type:_0x170fx2[_0xd5a7[3]],allowNull:false,defaultValue:_0xd5a7[4],validate:{notEmpty:{msg:_0xd5a7[5]}}},description:_0x170fx2[_0xd5a7[3]],original_format:_0x170fx2[_0xd5a7[3]],original_duration:_0x170fx2[_0xd5a7[6]],original_sampleCount:_0x170fx2[_0xd5a7[7]],original_channelCount:_0x170fx2[_0xd5a7[8]],original_bitRate:_0x170fx2[_0xd5a7[7]],original_sampleRate:_0x170fx2[_0xd5a7[8]],converted_format:_0x170fx2[_0xd5a7[3]],converted_duration:_0x170fx2[_0xd5a7[6]],converted_sampleCount:_0x170fx2[_0xd5a7[7]],converted_channelCount:_0x170fx2[_0xd5a7[8]],converted_bitRate:_0x170fx2[_0xd5a7[7]],converted_sampleRate:_0x170fx2[_0xd5a7[8]]},{tableName:_0xd5a7[9]});return _0x170fx3} \ No newline at end of file diff --git a/server/models/square_odbc.js b/server/models/square_odbc.js index a8a9bf8..58e3a28 100644 --- a/server/models/square_odbc.js +++ b/server/models/square_odbc.js @@ -1,24 +1 @@ -'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; - -}; +var _0x1451=["\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"];_0x1451[0];module[_0x1451[1]]=function(_0x60e9x1,_0x60e9x2){var _0x60e9x3=_0x60e9x1[_0x1451[5]](_0x1451[2],{name:{type:_0x60e9x2[_0x1451[3]],unique:true,allowNull:false,validate:{notEmpty:true}},dsn:{type:_0x60e9x2[_0x1451[3]]},description:_0x60e9x2[_0x1451[3]]},{tableName:_0x1451[4]});return _0x60e9x3} \ No newline at end of file diff --git a/server/models/square_project.js b/server/models/square_project.js index e9f9ccd..d6e37a7 100644 --- a/server/models/square_project.js +++ b/server/models/square_project.js @@ -1,29 +1 @@ -'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; - -}; +var _0xbe64=["\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"];_0xbe64[0];module[_0xbe64[1]]=function(_0x96abx1,_0x96abx2){var _0x96abx3=_0x96abx1[_0xbe64[7]](_0xbe64[2],{name:{type:_0x96abx2[_0xbe64[3]],unique:true,allowNull:false,validate:{notEmpty:true}},description:_0x96abx2[_0xbe64[3]],preproduction:{type:_0x96abx2[_0xbe64[4]],length:_0xbe64[5]},production:{type:_0x96abx2[_0xbe64[4]],length:_0xbe64[5]}},{tableName:_0xbe64[6]});return _0x96abx3} \ No newline at end of file diff --git a/server/models/sugarcrm_account.js b/server/models/sugarcrm_account.js index 1130f64..9859150 100644 --- a/server/models/sugarcrm_account.js +++ b/server/models/sugarcrm_account.js @@ -1,29 +1 @@ -'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'] - }] - }); - } - }); -}; +var _0x4a43=["\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"];_0x4a43[0];module[_0x4a43[1]]=function(_0xbdadx1,_0xbdadx2){return _0xbdadx1[_0x4a43[13]](_0x4a43[2],{name:_0xbdadx2[_0x4a43[3]],description:_0xbdadx2[_0x4a43[3]],username:{type:_0xbdadx2[_0x4a43[3]]},remoteUri:_0xbdadx2[_0x4a43[3]],password:_0xbdadx2[_0x4a43[3]]},{tableName:_0x4a43[4],associate:function(_0xbdadx3){_0xbdadx3[_0x4a43[2]][_0x4a43[7]](_0xbdadx3.SugarcrmConfiguration,{as:_0x4a43[5],foreignKey:_0x4a43[6]});_0xbdadx3[_0x4a43[2]][_0x4a43[12]](_0x4a43[8],{include:[{model:_0xbdadx3[_0x4a43[9]],as:_0x4a43[5],required:false,attributes:[_0x4a43[10],_0x4a43[11]]}]})}})} \ No newline at end of file diff --git a/server/models/sugarcrm_configuration.js b/server/models/sugarcrm_configuration.js index cae512a..62c8f29 100644 --- a/server/models/sugarcrm_configuration.js +++ b/server/models/sugarcrm_configuration.js @@ -1,27 +1 @@ -'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' - }); - } - }); -}; +var _0xae73=["\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"];_0xae73[0];module[_0xae73[1]]=function(_0xa778x1,_0xa778x2){return _0xa778x1[_0xae73[14]](_0xae73[2],{name:_0xa778x2[_0xae73[3]],description:_0xa778x2[_0xae73[3]]},{tableName:_0xae73[4],associate:function(_0xa778x3){_0xa778x3[_0xae73[2]][_0xae73[6]](_0xa778x3.SugarcrmAccount,{foreignKey:_0xae73[5]});_0xa778x3[_0xae73[2]][_0xae73[9]](_0xa778x3.SugarcrmField,{as:_0xae73[7],foreignKey:_0xae73[8]});_0xa778x3[_0xae73[2]][_0xae73[9]](_0xa778x3.SugarcrmField,{as:_0xae73[10],foreignKey:_0xae73[11]});_0xa778x3[_0xae73[2]][_0xae73[9]](_0xa778x3.SugarcrmField,{as:_0xae73[12],foreignKey:_0xae73[13]})}})} \ No newline at end of file diff --git a/server/models/sugarcrm_field.js b/server/models/sugarcrm_field.js index 7998058..34978b6 100644 --- a/server/models/sugarcrm_field.js +++ b/server/models/sugarcrm_field.js @@ -1,22 +1 @@ -'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); - } - }); -}; +var _0x67c3=["\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"];_0x67c3[0];module[_0x67c3[1]]=function(_0x5193x1,_0x5193x2){return _0x5193x1[_0x67c3[9]](_0x67c3[2],{type:{type:_0x5193x2.ENUM(_0x67c3[3],_0x67c3[4],_0x67c3[5]),defaultValue:_0x67c3[3]},content:_0x5193x2[_0x67c3[6]],key:_0x5193x2[_0x67c3[6]],keyType:{type:_0x5193x2.ENUM(_0x67c3[3],_0x67c3[4])},keyContent:_0x5193x2[_0x67c3[6]],idField:_0x5193x2[_0x67c3[6]]},{tableName:_0x67c3[7],associate:function(_0x5193x3){_0x5193x3[_0x67c3[2]][_0x67c3[8]](_0x5193x3.Variable)}})} \ No newline at end of file diff --git a/server/models/tag.js b/server/models/tag.js index ff7b5ca..b7d5f89 100644 --- a/server/models/tag.js +++ b/server/models/tag.js @@ -1,35 +1 @@ -/** - * 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; -}; +var _0xfc8b=["\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[_0xfc8b[0]]=function(_0x844fx1,_0x844fx2){var _0x844fx3=_0x844fx1[_0xfc8b[8]](_0xfc8b[1],{name:{type:_0x844fx2[_0xfc8b[2]],unique:true,allowNull:false,validate:{notEmpty:true}},description:_0x844fx2[_0xfc8b[2]]},{tableName:_0xfc8b[3],associate:function(_0x844fx4){_0x844fx3[_0xfc8b[5]](_0x844fx4.ZendeskConfiguration,{through:_0xfc8b[4]});_0x844fx3[_0xfc8b[7]](_0xfc8b[6],{include:[{all:true}]})}});return _0x844fx3} \ No newline at end of file diff --git a/server/models/team.js b/server/models/team.js index e2d6f73..1f4640c 100644 --- a/server/models/team.js +++ b/server/models/team.js @@ -1,42 +1 @@ -/** - * 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; -}; +var _0x7818=["\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(_0x7818[0]);module[_0x7818[1]]=function(_0x46f1x2,_0x46f1x3){var _0x46f1x4=_0x46f1x2[_0x7818[17]](_0x7818[2],{name:{type:_0x46f1x3[_0x7818[3]],allowNull:false,unique:true},description:{type:_0x46f1x3[_0x7818[3]]},defaultEntry:{type:_0x46f1x3[_0x7818[4]],defaultValue:0}},{tableName:_0x7818[5],associate:function(_0x46f1x5){_0x46f1x4[_0x7818[7]](_0x46f1x5.User,{through:_0x46f1x5[_0x7818[6]]});_0x46f1x4[_0x7818[16]](_0x7818[8],{include:[{model:_0x46f1x5[_0x7818[9]],where:{role:_0x7818[10]},required:false,attributes:[_0x7818[11],_0x7818[12],_0x7818[13],_0x7818[14],_0x7818[15]]}]})}});return _0x46f1x4} \ No newline at end of file diff --git a/server/models/tools_action.js b/server/models/tools_action.js index 9097c07..2750586 100644 --- a/server/models/tools_action.js +++ b/server/models/tools_action.js @@ -1,32 +1 @@ -/** - * 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; -}; +var _0xff90=["\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[_0xff90[0]]=function(_0x1a3cx1,_0x1a3cx2){var _0x1a3cx3=_0x1a3cx1[_0xff90[4]](_0xff90[1],{action:{type:_0x1a3cx2[_0xff90[2]]},data1:{type:_0x1a3cx2[_0xff90[2]]},data2:{type:_0x1a3cx2[_0xff90[2]]},data3:{type:_0x1a3cx2[_0xff90[2]]},data4:{type:_0x1a3cx2[_0xff90[2]]},data5:{type:_0x1a3cx2[_0xff90[2]]}},{tableName:_0xff90[3],associate:function(_0x1a3cx4){}});return _0x1a3cx3} \ No newline at end of file diff --git a/server/models/tools_condition.js b/server/models/tools_condition.js index cb0b603..e829b6c 100644 --- a/server/models/tools_condition.js +++ b/server/models/tools_condition.js @@ -1,18 +1 @@ -/** - * 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; -}; +var _0x5ea0=["\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(_0x5ea0[0]);module[_0x5ea0[1]]=function(_0xed7ex2,_0xed7ex3){var _0xed7ex4=_0xed7ex2[_0x5ea0[5]](_0x5ea0[2],{field:_0xed7ex3[_0x5ea0[3]],operator:_0xed7ex3[_0x5ea0[3]],value:_0xed7ex3[_0x5ea0[3]]},{tableName:_0x5ea0[4]});return _0xed7ex4} \ No newline at end of file diff --git a/server/models/trigger.js b/server/models/trigger.js index 2953319..e1a97c8 100644 --- a/server/models/trigger.js +++ b/server/models/trigger.js @@ -1,60 +1 @@ -/** - * 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; -}; +var _0x84ce=["\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[_0x84ce[0]]=function(_0x3d20x1,_0x3d20x2){var _0x3d20x3=_0x3d20x1[_0x84ce[27]](_0x84ce[1],{name:_0x3d20x2[_0x84ce[2]],channel:_0x3d20x2[_0x84ce[2]],description:_0x3d20x2[_0x84ce[2]],status:{type:_0x3d20x2[_0x84ce[3]],defaultValue:false}},{tableName:_0x84ce[4],associate:function(_0x3d20x4){_0x3d20x3[_0x84ce[9]](_0x3d20x4.ToolsCondition,{as:{plural:_0x84ce[5],singular:_0x84ce[6]},foreignKey:_0x84ce[7],onDelete:_0x84ce[8],hooks:true});_0x3d20x3[_0x84ce[9]](_0x3d20x4.ToolsCondition,{as:{plural:_0x84ce[10],singular:_0x84ce[11]},foreignKey:_0x84ce[12],onDelete:_0x84ce[8],hooks:true});_0x3d20x3[_0x84ce[9]](_0x3d20x4.ToolsAction,{as:_0x84ce[13],onDelete:_0x84ce[8],hooks:true});_0x3d20x3[_0x84ce[26]](_0x84ce[14],{include:[{model:_0x3d20x4[_0x84ce[15]],as:_0x84ce[5],attributes:[_0x84ce[16],_0x84ce[17],_0x84ce[18]]},{model:_0x3d20x4[_0x84ce[15]],as:_0x84ce[10],attributes:[_0x84ce[16],_0x84ce[17],_0x84ce[18]]},{model:_0x3d20x4[_0x84ce[19]],as:_0x84ce[13],attributes:[_0x84ce[20],_0x84ce[21],_0x84ce[22],_0x84ce[23],_0x84ce[24],_0x84ce[25]]}]})}});return _0x3d20x3} \ No newline at end of file diff --git a/server/models/trunk.js b/server/models/trunk.js index e9ff649..ea55db0 100644 --- a/server/models/trunk.js +++ b/server/models/trunk.js @@ -1,458 +1 @@ -'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; -} +var _0x847c=["\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"];_0x847c[0];var crypto=require(_0x847c[1]);var md5=require(_0x847c[2]);var _=require(_0x847c[3]);module[_0x847c[4]]=function(_0x4924x4,_0x4924x5){var _0x4924x6=_0x4924x4[_0x847c[51]](_0x847c[5],{name:{type:_0x4924x5[_0x847c[6]],primaryKey:true},type:{type:_0x4924x5.ENUM(_0x847c[7],_0x847c[8],_0x847c[9]),allowNull:true,defaultValue:_0x847c[7]},context:{type:_0x4924x5[_0x847c[6]],allowNull:true,defaultValue:_0x847c[10]},callingpres:{type:_0x4924x5.ENUM(_0x847c[11],_0x847c[12],_0x847c[13],_0x847c[14],_0x847c[15],_0x847c[16],_0x847c[17],_0x847c[18]),allowNull:true},permit:{type:_0x4924x5[_0x847c[6]],allowNull:true},deny:{type:_0x4924x5[_0x847c[6]],allowNull:true},secret:{type:_0x4924x5[_0x847c[6]],allowNull:true},md5secret:{type:_0x4924x5[_0x847c[6]],allowNull:true},remotesecret:{type:_0x4924x5[_0x847c[6]],allowNull:true},transport:{type:_0x4924x5[_0x847c[6]],allowNull:true,defaultValue:_0x847c[19]},dtmfmode:{type:_0x4924x5.ENUM(_0x847c[20],_0x847c[21],_0x847c[22],_0x847c[23],_0x847c[24]),allowNull:true,defaultValue:_0x847c[20]},directmedia:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26],_0x847c[27],_0x847c[28],_0x847c[29]),allowNull:true,defaultValue:_0x847c[26]},directrtpsetup:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true,defaultValue:_0x847c[26]},directmediapermit:{type:_0x4924x5[_0x847c[6]],allowNull:true},directmediadeny:{type:_0x4924x5[_0x847c[6]],allowNull:true},nat:{type:_0x4924x5[_0x847c[6]],allowNull:true,defaultValue:_0x847c[30]},callgroup:{type:_0x4924x5[_0x847c[6]],allowNull:true},namedcallgroup:{type:_0x4924x5[_0x847c[6]],allowNull:true},pickupgroup:{type:_0x4924x5[_0x847c[6]],allowNull:true},namedpickupgroup:{type:_0x4924x5[_0x847c[6]],allowNull:true},language:{type:_0x4924x5[_0x847c[6]],allowNull:true,defaultValue:_0x847c[31]},tonezone:{type:_0x4924x5[_0x847c[6]],allowNull:true},disallow:{type:_0x4924x5[_0x847c[6]],allowNull:true,defaultValue:_0x847c[32]},allow:{type:_0x4924x5[_0x847c[6]],allowNull:false,defaultValue:_0x847c[33]},autoframing:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true},insecure:{type:_0x4924x5[_0x847c[6]],allowNull:true,defaultValue:_0x847c[34]},trustrpid:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true,defaultValue:_0x847c[26]},trust_id_outbound:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true,defaultValue:_0x847c[26]},progressinband:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26],_0x847c[35]),allowNull:true},promiscredir:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true},useclientcode:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true},accountcode:{type:_0x4924x5.INTEGER(11),allowNull:true},setvar:{type:_0x4924x5[_0x847c[6]],allowNull:true},callerid:{type:_0x4924x5[_0x847c[6]],allowNull:true,defaultValue:_0x847c[36]},amaflags:{type:_0x4924x5[_0x847c[6]],allowNull:true},callcounter:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true,defaultValue:_0x847c[25]},busylevel:{type:_0x4924x5.INTEGER(11),allowNull:true},allowoverlap:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true},allowsubscribe:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true},allowtransfer:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true},ignoresdpversion:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true},subscribecontext:{type:_0x4924x5[_0x847c[6]],allowNull:true},template:{type:_0x4924x5[_0x847c[6]],allowNull:true},videosupport:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26],_0x847c[37]),allowNull:true,defaultValue:_0x847c[26]},maxcallbitrate:{type:_0x4924x5.INTEGER(11),allowNull:true},rfc2833compensate:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true},mailbox:{type:_0x4924x5[_0x847c[6]],allowNull:true},session_timers:{type:_0x4924x5.ENUM(_0x847c[38],_0x847c[39],_0x847c[40]),allowNull:true},session_expires:{type:_0x4924x5.INTEGER(11),allowNull:true},session_minse:{type:_0x4924x5.INTEGER(11),allowNull:true},session_refresher:{type:_0x4924x5.ENUM(_0x847c[41],_0x847c[42]),allowNull:true,defaultValue:_0x847c[42]},t38pt_usertpsource:{type:_0x4924x5[_0x847c[6]],allowNull:true},regexten:{type:_0x4924x5[_0x847c[6]],allowNull:true},fromdomain:{type:_0x4924x5[_0x847c[6]],allowNull:true},fromuser:{type:_0x4924x5[_0x847c[6]],allowNull:true},host:{type:_0x4924x5[_0x847c[6]],allowNull:true,defaultValue:_0x847c[43]},port:{type:_0x4924x5.INTEGER(5),allowNull:true},qualify:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true,defaultValue:_0x847c[25]},keepalive:{type:_0x4924x5.INTEGER(11),allowNull:true},defaultip:{type:_0x4924x5[_0x847c[6]],allowNull:true},defaultuser:{type:_0x4924x5[_0x847c[6]],allowNull:true},rtptimeout:{type:_0x4924x5.INTEGER(11),allowNull:true},rtpholdtimeout:{type:_0x4924x5.INTEGER(11),allowNull:true},rtpkeepalive:{type:_0x4924x5.INTEGER(11),allowNull:true},sendrpid:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true,defaultValue:_0x847c[26]},outboundproxy:{type:_0x4924x5[_0x847c[6]],allowNull:true},callbackextension:{type:_0x4924x5[_0x847c[6]],allowNull:true},timert1:{type:_0x4924x5.INTEGER(11),allowNull:true},timerb:{type:_0x4924x5.INTEGER(11),allowNull:true},qualifyfreq:{type:_0x4924x5.INTEGER(11),allowNull:true},contactpermit:{type:_0x4924x5[_0x847c[6]],allowNull:true},contactdeny:{type:_0x4924x5[_0x847c[6]],allowNull:true},contactacl:{type:_0x4924x5[_0x847c[6]],allowNull:true},unsolicited_mailbox:{type:_0x4924x5[_0x847c[6]],allowNull:true},use_q850_reason:{type:_0x4924x5[_0x847c[6]],allowNull:true},maxforwards:{type:_0x4924x5.INTEGER(11),allowNull:true},encryption:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true,defaultValue:_0x847c[26]},avpf:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true},force_avp:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true},icesupport:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true},dtlsenable:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true},dtlsverify:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26],_0x847c[44],_0x847c[45]),allowNull:true},dtlsrekey:{type:_0x4924x5.INTEGER(11),allowNull:true},dtlscertfile:{type:_0x4924x5[_0x847c[6]],allowNull:true},dtlsprivatekey:{type:_0x4924x5[_0x847c[6]],allowNull:true},dtlscipher:{type:_0x4924x5[_0x847c[6]],allowNull:true},dtlscafile:{type:_0x4924x5[_0x847c[6]],allowNull:true},dtlscapath:{type:_0x4924x5[_0x847c[6]],allowNull:true},dtlssetup:{type:_0x4924x5.ENUM(_0x847c[46],_0x847c[47],_0x847c[48]),allowNull:true},dtlsfingerprint:{type:_0x4924x5[_0x847c[6]],allowNull:true},usereqphone:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true,defaultValue:_0x847c[26]},recordonfeature:{type:_0x4924x5[_0x847c[6]],allowNull:true},recordofffeature:{type:_0x4924x5[_0x847c[6]],allowNull:true},call_limit:{type:_0x4924x5.INTEGER(11),allowNull:true,defaultValue:null},registertrying:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true},subscribemwi:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26]),allowNull:true},vmexten:{type:_0x4924x5[_0x847c[6]],allowNull:true},mohinterpret:{type:_0x4924x5[_0x847c[6]],allowNull:true},mohsuggest:{type:_0x4924x5[_0x847c[6]],allowNull:true},parkinglot:{type:_0x4924x5[_0x847c[6]],allowNull:true},description:{type:_0x4924x5[_0x847c[6]],allowNull:true},canreinvite:{type:_0x4924x5.ENUM(_0x847c[25],_0x847c[26],_0x847c[27],_0x847c[28],_0x847c[49]),allowNull:true,defaultValue:_0x847c[26]},registry:{type:_0x4924x5[_0x847c[6]],allowNull:true},otherFields:{type:_0x4924x5[_0x847c[6]],allowNull:true}},{tableName:_0x847c[50]});return _0x4924x6} \ No newline at end of file diff --git a/server/models/user.js b/server/models/user.js index 0ac7ce7..a751942 100644 --- a/server/models/user.js +++ b/server/models/user.js @@ -1,917 +1 @@ -'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.List, { - through: models.UserHasList - }); - 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; -} +var _0x79ac=["\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\x4C\x69\x73\x74","\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","\x70\x68\x6F\x6E\x65\x42\x61\x72\x4C\x69\x73\x74\x65\x6E\x50\x6F\x72\x74","\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"];_0x79ac[0];var crypto=require(_0x79ac[1]);var md5=require(_0x79ac[2]);var _=require(_0x79ac[3]);var moment=require(_0x79ac[4]);var VoiceQueue=require(_0x79ac[6])[_0x79ac[5]];module[_0x79ac[7]]=function(_0x3aa0x6,_0x3aa0x7){var _0x3aa0x8=_0x3aa0x6[_0x79ac[150]](_0x79ac[8],{name:{type:_0x3aa0x7[_0x79ac[9]],unique:true,validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i},set:function(_0x3aa0x9){this[_0x79ac[11]](_0x79ac[10],_0x3aa0x9);this[_0x79ac[11]](_0x79ac[12],_0x3aa0x9)}},fullname:{type:_0x3aa0x7[_0x79ac[9]],allowNull:false},email:{type:_0x3aa0x7[_0x79ac[9]],unique:true,isEmail:true,set:function(_0x3aa0xa){if(_0x3aa0xa){this[_0x79ac[11]](_0x79ac[13],_0x3aa0xa[_0x79ac[14]]())}},defaultValue:null},role:{type:_0x3aa0x7.ENUM(_0x79ac[15],_0x79ac[16],_0x79ac[17],_0x79ac[18])},password:{type:_0x3aa0x7[_0x79ac[9]],allowNull:false,validate:{notEmpty:true},set:function(_0x3aa0xb){this[_0x79ac[19]]=this[_0x79ac[20]]();this[_0x79ac[11]](_0x79ac[21],this[_0x79ac[22]](_0x3aa0xb));this[_0x79ac[11]](_0x79ac[23],this[_0x79ac[25]](this[_0x79ac[10]]+_0x79ac[24]+_0x3aa0xb))}},provider:{type:_0x3aa0x7[_0x79ac[9]],defaultValue:_0x79ac[26]},internal:{type:_0x3aa0x7.INTEGER(11),unique:true,set:function(_0x3aa0xc){this[_0x79ac[11]](_0x79ac[27],_0x3aa0xc);this[_0x79ac[11]](_0x79ac[28],_0x3aa0xc)}},salt:{type:_0x3aa0x7[_0x79ac[9]]},phone:{type:_0x3aa0x7[_0x79ac[9]]},mobile:{type:_0x3aa0x7[_0x79ac[9]]},address:{type:_0x3aa0x7[_0x79ac[9]]},zipcode:{type:_0x3aa0x7[_0x79ac[9]]},userpic:{type:_0x3aa0x7[_0x79ac[9]]},city:{type:_0x3aa0x7[_0x79ac[9]]},country:{type:_0x3aa0x7[_0x79ac[9]]},online:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:false},lastLoginAt:{type:_0x3aa0x7[_0x79ac[30]]},status:{type:_0x3aa0x7[_0x79ac[9]],defaultValue:_0x79ac[31]},statusAt:{type:_0x3aa0x7[_0x79ac[30]]},queueStatus:{type:_0x3aa0x7[_0x79ac[9]],defaultValue:_0x79ac[32]},queueStatusAt:{type:_0x3aa0x7[_0x79ac[30]]},lastQueue:{type:_0x3aa0x7[_0x79ac[9]]},voicePause:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:false,set:function(_0x3aa0xd){this[_0x79ac[11]](_0x79ac[33],_0x3aa0xd);if(_0x3aa0xd){this[_0x79ac[11]](_0x79ac[34],_0x79ac[35]);this[_0x79ac[11]](_0x79ac[36],moment()[_0x79ac[38]](_0x79ac[37]))}else {this[_0x79ac[11]](_0x79ac[34],_0x79ac[32]);this[_0x79ac[11]](_0x79ac[36],moment()[_0x79ac[38]](_0x79ac[37]))}}},chatPause:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:false},mailPause:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:false},faxPause:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:false},pauseType:{type:_0x3aa0x7[_0x79ac[9]],defaultValue:_0x79ac[39]},lastPauseAt:{type:_0x3aa0x7[_0x79ac[30]]},chatCapacity:{type:_0x3aa0x7[_0x79ac[40]],defaultValue:0},mailCapacity:{type:_0x3aa0x7[_0x79ac[40]],defaultValue:0},faxCapacity:{type:_0x3aa0x7[_0x79ac[40]],defaultValue:0},phoneBarAutoAnswer:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:false},phoneBarEnableSettings:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:true},phoneBarUnconditionalNumber:{type:_0x3aa0x7[_0x79ac[9]],get:function(){if(this[_0x79ac[42]](_0x79ac[41])){return this[_0x79ac[42]](_0x79ac[43])};return null}},phoneBarNoReplyNumber:{type:_0x3aa0x7[_0x79ac[9]],get:function(){if(this[_0x79ac[42]](_0x79ac[44])){return this[_0x79ac[42]](_0x79ac[45])};return null}},phoneBarBusyNumber:{type:_0x3aa0x7[_0x79ac[9]],get:function(){if(this[_0x79ac[42]](_0x79ac[46])){return this[_0x79ac[42]](_0x79ac[47])};return null}},phoneBarUnconditional:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:false},phoneBarNoReply:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:false},phoneBarBusy:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:false},phoneBarListenPort:{type:_0x3aa0x7.INTEGER(5),defaultValue:5060},phoneBarECTail:{type:_0x3aa0x7.INTEGER(5),defaultValue:200},phoneBarExpires:{type:_0x3aa0x7.INTEGER(5),defaultValue:3600},phoneBarNameServer:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},phoneBarStunServer:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},phoneBarVADEnabled:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:true},phoneBarNoUDP:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:false},phoneBarNoTCP:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:true},phoneBarLogLevel:{type:_0x3aa0x7.INTEGER(5),defaultValue:1},phoneBarPublishEnabled:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:false},chanspy:{type:_0x3aa0x7[_0x79ac[29]],defaultValue:false},description:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},ipaddr:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},port:{type:_0x3aa0x7.INTEGER(5),allowNull:true},regseconds:{type:_0x3aa0x7.INTEGER(11),allowNull:true},fullcontact:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},regserver:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},useragent:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},lastms:{type:_0x3aa0x7.INTEGER(11),allowNull:true},type:{type:_0x3aa0x7.ENUM(_0x79ac[48],_0x79ac[16],_0x79ac[49]),allowNull:true,defaultValue:_0x79ac[48]},context:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true,defaultValue:_0x79ac[50]},callingpres:{type:_0x3aa0x7.ENUM(_0x79ac[51],_0x79ac[52],_0x79ac[53],_0x79ac[54],_0x79ac[55],_0x79ac[56],_0x79ac[57],_0x79ac[58]),allowNull:true},permit:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},deny:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},secret:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},md5secret:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},remotesecret:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},transport:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true,defaultValue:_0x79ac[59]},dtmfmode:{type:_0x3aa0x7.ENUM(_0x79ac[60],_0x79ac[61],_0x79ac[62],_0x79ac[63],_0x79ac[64]),allowNull:true,defaultValue:_0x79ac[60]},directmedia:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66],_0x79ac[67],_0x79ac[68],_0x79ac[69]),allowNull:true,defaultValue:_0x79ac[66]},directrtpsetup:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true,defaultValue:_0x79ac[66]},directmediapermit:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},directmediadeny:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},nat:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true,defaultValue:_0x79ac[70]},callgroup:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},namedcallgroup:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},pickupgroup:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},namedpickupgroup:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},language:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true,defaultValue:_0x79ac[71]},tonezone:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},allow:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true,defaultValue:_0x79ac[72]},disallow:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true,defaultValue:null},autoframing:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true},insecure:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true,defaultValue:_0x79ac[73]},trustrpid:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true,defaultValue:_0x79ac[66]},trust_id_outbound:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true,defaultValue:_0x79ac[66]},progressinband:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66],_0x79ac[74]),allowNull:true},promiscredir:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true},useclientcode:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true},accountcode:{type:_0x3aa0x7.INTEGER(11),allowNull:true},setvar:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},callerid:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true,defaultValue:_0x79ac[75]},amaflags:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},callcounter:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true,defaultValue:_0x79ac[65]},busylevel:{type:_0x3aa0x7.INTEGER(11),allowNull:true},allowoverlap:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true},allowsubscribe:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true},allowtransfer:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true},ignoresdpversion:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true},subscribecontext:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},template:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},videosupport:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66],_0x79ac[76]),allowNull:true,defaultValue:_0x79ac[66]},maxcallbitrate:{type:_0x3aa0x7.INTEGER(11),allowNull:true},rfc2833compensate:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true},mailbox:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},session_timers:{type:_0x3aa0x7.ENUM(_0x79ac[77],_0x79ac[78],_0x79ac[79]),allowNull:true},session_expires:{type:_0x3aa0x7.INTEGER(11),allowNull:true},session_minse:{type:_0x3aa0x7.INTEGER(11),allowNull:true},session_refresher:{type:_0x3aa0x7.ENUM(_0x79ac[80],_0x79ac[81]),allowNull:true,defaultValue:_0x79ac[81]},t38pt_usertpsource:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},regexten:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},fromdomain:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},fromuser:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},host:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true,defaultValue:_0x79ac[82]},qualify:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true,defaultValue:_0x79ac[65]},keepalive:{type:_0x3aa0x7.INTEGER(11),allowNull:true},defaultip:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},defaultuser:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},rtptimeout:{type:_0x3aa0x7.INTEGER(11),allowNull:true},rtpholdtimeout:{type:_0x3aa0x7.INTEGER(11),allowNull:true},rtpkeepalive:{type:_0x3aa0x7.INTEGER(11),allowNull:true},sendrpid:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true,defaultValue:_0x79ac[66]},outboundproxy:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},callbackextension:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},timert1:{type:_0x3aa0x7.INTEGER(11),allowNull:true},timerb:{type:_0x3aa0x7.INTEGER(11),allowNull:true},qualifyfreq:{type:_0x3aa0x7.INTEGER(11),allowNull:true},contactpermit:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},contactdeny:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},contactacl:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},unsolicited_mailbox:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},use_q850_reason:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},maxforwards:{type:_0x3aa0x7.INTEGER(11),allowNull:true},encryption:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true,defaultValue:_0x79ac[66]},avpf:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true},force_avp:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true},icesupport:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true},dtlsenable:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true},dtlsverify:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66],_0x79ac[83],_0x79ac[84]),allowNull:true},dtlsrekey:{type:_0x3aa0x7.INTEGER(11),allowNull:true},dtlscertfile:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},dtlsprivatekey:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},dtlscipher:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},dtlscafile:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},dtlscapath:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},dtlssetup:{type:_0x3aa0x7.ENUM(_0x79ac[85],_0x79ac[86],_0x79ac[87]),allowNull:true},dtlsfingerprint:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},usereqphone:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true,defaultValue:_0x79ac[66]},recordonfeature:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},recordofffeature:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},call_limit:{type:_0x3aa0x7.INTEGER(11),allowNull:true,defaultValue:null},registertrying:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true},subscribemwi:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66]),allowNull:true},vmexten:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},mohinterpret:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},mohsuggest:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},parkinglot:{type:_0x3aa0x7[_0x79ac[9]],allowNull:true},canreinvite:{type:_0x3aa0x7.ENUM(_0x79ac[65],_0x79ac[66],_0x79ac[67],_0x79ac[68],_0x79ac[88]),allowNull:true,defaultValue:_0x79ac[66]}},{tableName:_0x79ac[89],instanceMethods:{authenticate:function(_0x3aa0xe){return this[_0x79ac[22]](_0x3aa0xe)===this[_0x79ac[21]]},makeSalt:function(){return crypto[_0x79ac[91]](16).toString(_0x79ac[90])},encryptPassword:function(_0x3aa0xb){if(!_0x3aa0xb||!this[_0x79ac[19]]){return _0x79ac[92]};var _0x3aa0xf= new Buffer(this[_0x79ac[19]],_0x79ac[90]);return crypto[_0x79ac[93]](_0x3aa0xb,_0x3aa0xf,10000,64).toString(_0x79ac[90])},md5Password:function(_0x3aa0xb){if(!_0x3aa0xb){return _0x79ac[92]};return md5(_0x3aa0xb)}},associate:function(_0x3aa0x10){_0x3aa0x8[_0x79ac[94]](_0x3aa0x10.ChatMessage);_0x3aa0x8[_0x79ac[94]](_0x3aa0x10.MailMessage);_0x3aa0x8[_0x79ac[94]](_0x3aa0x10.Contact);_0x3aa0x8[_0x79ac[94]](_0x3aa0x10.Action);_0x3aa0x8[_0x79ac[96]](_0x3aa0x10.Module,{through:_0x79ac[95]});_0x3aa0x8[_0x79ac[96]](_0x3aa0x10.Channel,{through:_0x79ac[97]});_0x3aa0x8[_0x79ac[96]](_0x3aa0x10.MailRoom,{through:_0x79ac[98]});_0x3aa0x8[_0x79ac[96]](_0x3aa0x10.Team,{through:_0x3aa0x10[_0x79ac[99]]});_0x3aa0x8[_0x79ac[96]](_0x3aa0x10.ChatRoom,{through:_0x3aa0x10[_0x79ac[100]]});_0x3aa0x8[_0x79ac[96]](_0x3aa0x10.MailQueue,{through:_0x3aa0x10[_0x79ac[101]],required:false});_0x3aa0x8[_0x79ac[96]](_0x3aa0x10.FaxQueue,{through:_0x3aa0x10[_0x79ac[102]],required:false});_0x3aa0x8[_0x79ac[96]](_0x3aa0x10.ChatQueue,{through:_0x3aa0x10[_0x79ac[103]],required:false});_0x3aa0x8[_0x79ac[96]](_0x3aa0x10.VoiceQueue,{through:_0x3aa0x10[_0x79ac[104]],required:false});_0x3aa0x8[_0x79ac[96]](_0x3aa0x10.List,{through:_0x3aa0x10[_0x79ac[105]]});_0x3aa0x8[_0x79ac[94]](_0x3aa0x10.VoiceExtension,{foreignKey:_0x79ac[106],as:_0x79ac[107],onDelete:_0x79ac[108],hooks:true});_0x3aa0x8[_0x79ac[109]](_0x79ac[16],{where:{role:{$in:[_0x79ac[15],_0x79ac[16]]}}});_0x3aa0x8[_0x79ac[109]](_0x79ac[110],{include:[_0x3aa0x10[_0x79ac[5]],_0x3aa0x10[_0x79ac[111]],_0x3aa0x10[_0x79ac[112]],_0x3aa0x10[_0x79ac[113]]]});_0x3aa0x8[_0x79ac[109]](_0x79ac[18],{where:{role:_0x79ac[18]}});_0x3aa0x8[_0x79ac[109]](_0x79ac[114],function(_0x3aa0x11){var _0x3aa0x12={where:{}};if(_0x3aa0x11[_0x79ac[33]]){_0x3aa0x12[_0x79ac[115]][_0x79ac[33]]=(_0x3aa0x11[_0x79ac[33]]===_0x79ac[116])?true:false;delete _0x3aa0x11[_0x79ac[33]]}else {if(_0x3aa0x11[_0x79ac[117]]){_0x3aa0x12[_0x79ac[115]][_0x79ac[117]]=(_0x3aa0x11[_0x79ac[117]]===_0x79ac[116])?true:false;delete _0x3aa0x11[_0x79ac[117]]}else {if(_0x3aa0x11[_0x79ac[118]]){_0x3aa0x12[_0x79ac[115]][_0x79ac[118]]=(_0x3aa0x11[_0x79ac[118]]===_0x79ac[116])?true:false;delete _0x3aa0x11[_0x79ac[118]]}else {if(_0x3aa0x11[_0x79ac[119]]){_0x3aa0x12[_0x79ac[115]][_0x79ac[119]]=(_0x3aa0x11[_0x79ac[119]]===_0x79ac[116])?true:false;delete _0x3aa0x11[_0x79ac[119]]}}}};return _0x3aa0x12});_0x3aa0x8[_0x79ac[109]](_0x79ac[120],function(_0x3aa0x11){var _0x3aa0x12={where:{}};if(_0x3aa0x11[_0x79ac[121]]){_0x3aa0x12[_0x79ac[115]][_0x79ac[121]]=(_0x3aa0x11[_0x79ac[121]]===_0x79ac[116])?true:false;delete _0x3aa0x11[_0x79ac[121]]};return _0x3aa0x12});_0x3aa0x8[_0x79ac[109]](_0x79ac[122],function(_0x3aa0x11){var _0x3aa0x12={where:{}};if(_0x3aa0x11[_0x79ac[123]]){_0x3aa0x12[_0x79ac[115]][_0x79ac[123]]=_0x3aa0x11[_0x79ac[123]];delete _0x3aa0x11[_0x79ac[123]]};return _0x3aa0x12});_0x3aa0x8[_0x79ac[109]](_0x79ac[124],function(_0x3aa0x11){var _0x3aa0x12={where:{}};if(_0x3aa0x11[_0x79ac[34]]){_0x3aa0x12[_0x79ac[115]][_0x79ac[34]]=_0x3aa0x11[_0x79ac[34]];delete _0x3aa0x11[_0x79ac[34]]};return _0x3aa0x12});_0x3aa0x8[_0x79ac[109]](_0x79ac[17],{where:{role:_0x79ac[17]},attributes:[_0x79ac[125],_0x79ac[10],_0x79ac[13],_0x79ac[27],_0x79ac[126],_0x79ac[28],_0x79ac[127],_0x79ac[128],_0x79ac[129],_0x79ac[130],_0x79ac[131],_0x79ac[132],_0x79ac[133],_0x79ac[134],_0x79ac[121],_0x79ac[135],_0x79ac[136],_0x79ac[137],_0x79ac[41],_0x79ac[44],_0x79ac[46],_0x79ac[43],_0x79ac[45],_0x79ac[47],_0x79ac[138],_0x79ac[139],_0x79ac[33],_0x79ac[119],_0x79ac[117],_0x79ac[118],_0x79ac[140],_0x79ac[141],_0x79ac[123],_0x79ac[142],_0x79ac[34],_0x79ac[36],_0x79ac[143],_0x79ac[144],_0x79ac[145],_0x79ac[146],_0x79ac[147],_0x79ac[148],_0x79ac[149]]})}});return _0x3aa0x8} \ No newline at end of file diff --git a/server/models/user_has_chat_queue.js b/server/models/user_has_chat_queue.js index 6479a3d..8d117b9 100644 --- a/server/models/user_has_chat_queue.js +++ b/server/models/user_has_chat_queue.js @@ -1,22 +1 @@ -/** - * 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; -}; +var _0x8fff=["\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(_0x8fff[0]);module[_0x8fff[1]]=function(_0x9abdx2,_0x9abdx3){var _0x9abdx4=_0x9abdx2[_0x8fff[6]](_0x8fff[2],{penalty:{type:_0x9abdx3[_0x8fff[3]],defaultValue:0},queue:{type:_0x9abdx3[_0x8fff[4]]}},{tableName:_0x8fff[5]});return _0x9abdx4} \ No newline at end of file diff --git a/server/models/user_has_chat_room.js b/server/models/user_has_chat_room.js index 277debd..9c79288 100644 --- a/server/models/user_has_chat_room.js +++ b/server/models/user_has_chat_room.js @@ -1,19 +1 @@ - -/** - * 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; -}; +var _0x9274=["\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(_0x9274[0]);module[_0x9274[1]]=function(_0x20c0x2,_0x20c0x3){var _0x20c0x4=_0x20c0x2[_0x9274[6]](_0x9274[2],{LastMessageRead:{type:_0x20c0x3[_0x9274[3]],defaultValue:0},Hide:{type:_0x20c0x3[_0x9274[4]],defaultValue:false}},{tableName:_0x9274[5]});return _0x20c0x4} \ No newline at end of file diff --git a/server/models/user_has_fax_queue.js b/server/models/user_has_fax_queue.js index 3bcb67d..70e9551 100644 --- a/server/models/user_has_fax_queue.js +++ b/server/models/user_has_fax_queue.js @@ -1,22 +1 @@ -/** - * 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; -}; +var _0x7d2e=["\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(_0x7d2e[0]);module[_0x7d2e[1]]=function(_0xd881x2,_0xd881x3){var _0xd881x4=_0xd881x2[_0x7d2e[6]](_0x7d2e[2],{penalty:{type:_0xd881x3[_0x7d2e[3]],defaultValue:0},queue:{type:_0xd881x3[_0x7d2e[4]]}},{tableName:_0x7d2e[5]});return _0xd881x4} \ No newline at end of file diff --git a/server/models/user_has_list.js b/server/models/user_has_list.js index 907d218..5fad187 100644 --- a/server/models/user_has_list.js +++ b/server/models/user_has_list.js @@ -1,21 +1 @@ -/** - * - */ - -var crypto = require('crypto'); - -module.exports = function(sequelize, DataTypes) { - var UserHasList = sequelize.define('UserHasList', { - membername: { - type: DataTypes.STRING - } - }, { - tableName: 'cm_user_has_lists', - indexes: [{ - name: 'membername', - fields: ['membername'] - }] - }); - - return UserHasList; -}; +var _0xa961=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x4C\x69\x73\x74","\x53\x54\x52\x49\x4E\x47","\x63\x6D\x5F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x73","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0xa961[0]);module[_0xa961[1]]=function(_0xd244x2,_0xd244x3){var _0xd244x4=_0xd244x2[_0xa961[6]](_0xa961[2],{membername:{type:_0xd244x3[_0xa961[3]]}},{tableName:_0xa961[4],indexes:[{name:_0xa961[5],fields:[_0xa961[5]]}]});return _0xd244x4} \ No newline at end of file diff --git a/server/models/user_has_mail_queue.js b/server/models/user_has_mail_queue.js index c6358cb..ec6aefb 100644 --- a/server/models/user_has_mail_queue.js +++ b/server/models/user_has_mail_queue.js @@ -1,22 +1 @@ -/** - * 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; -}; +var _0x2490=["\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(_0x2490[0]);module[_0x2490[1]]=function(_0xa264x2,_0xa264x3){var _0xa264x4=_0xa264x2[_0x2490[6]](_0x2490[2],{penalty:{type:_0xa264x3[_0x2490[3]],defaultValue:0},queue:{type:_0xa264x3[_0x2490[4]]}},{tableName:_0x2490[5]});return _0xa264x4} \ No newline at end of file diff --git a/server/models/user_has_team.js b/server/models/user_has_team.js index a0c38b6..a61dfc6 100644 --- a/server/models/user_has_team.js +++ b/server/models/user_has_team.js @@ -1,14 +1 @@ -/** - * Chat Website Model - */ - -var crypto = require('crypto'); - -module.exports = function(sequelize, DataTypes) { - - var UserHasTeam = sequelize.define('UserHasTeam', {}, { - tableName: 'user_has_teams' - }); - - return UserHasTeam; -}; +var _0xfcef=["\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(_0xfcef[0]);module[_0xfcef[1]]=function(_0x62dfx2,_0x62dfx3){var _0x62dfx4=_0x62dfx2[_0xfcef[4]](_0xfcef[2],{},{tableName:_0xfcef[3]});return _0x62dfx4} \ No newline at end of file diff --git a/server/models/user_has_voice_queue.js b/server/models/user_has_voice_queue.js index 0b14b55..9c87d6c 100644 --- a/server/models/user_has_voice_queue.js +++ b/server/models/user_has_voice_queue.js @@ -1,118 +1 @@ -/** - * Chat Website Model - */ - -var crypto = require('crypto'); -var moment = require('moment'); - -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', moment().format("YYYY-MM-DD HH:mm:ss")); - } - } - }, - 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; -}; +var _0xf1fb=["\x63\x72\x79\x70\x74\x6F","\x6D\x6F\x6D\x65\x6E\x74","\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","\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\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","\x66\x6E","\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(_0xf1fb[0]);var moment=require(_0xf1fb[1]);module[_0xf1fb[2]]=function(_0xcccex3,_0xcccex4){var _0xcccex5=_0xcccex3[_0xf1fb[38]](_0xf1fb[3],{logged:{type:_0xcccex4[_0xf1fb[4]],defaultValue:false},loggedAt:{type:_0xcccex4[_0xf1fb[5]]},ringinuse:{type:_0xcccex4[_0xf1fb[4]]},penalty:{type:_0xcccex4[_0xf1fb[6]],defaultValue:0},stateinterface:{type:_0xcccex4[_0xf1fb[7]]},queue:{type:_0xcccex4[_0xf1fb[7]]},membername:{type:_0xcccex4[_0xf1fb[7]]},interface:{type:_0xcccex4[_0xf1fb[7]]},membership:{type:_0xcccex4[_0xf1fb[7]]},callstaken:{type:_0xcccex4[_0xf1fb[6]]},lastcall:{type:_0xcccex4[_0xf1fb[5]],set:function(_0xcccex6){if(_0xcccex6===_0xf1fb[8]){this[_0xf1fb[10]](_0xf1fb[9],null)}else {this[_0xf1fb[10]](_0xf1fb[9],moment()[_0xf1fb[12]](_0xf1fb[11]))}}},status:{type:_0xcccex4[_0xf1fb[6]],set:function(_0xcccex7){this[_0xf1fb[10]](_0xf1fb[13],_0xcccex7);var _0xcccex8=_0xf1fb[14];switch(_0xcccex7){case _0xf1fb[8]:_0xcccex8=_0xf1fb[14];break;case _0xf1fb[16]:_0xcccex8=_0xf1fb[15];break;case _0xf1fb[18]:_0xcccex8=_0xf1fb[17];break;case _0xf1fb[20]:_0xcccex8=_0xf1fb[19];break;case _0xf1fb[22]:_0xcccex8=_0xf1fb[21];break;case _0xf1fb[24]:_0xcccex8=_0xf1fb[23];break;case _0xf1fb[26]:_0xcccex8=_0xf1fb[25];break;case _0xf1fb[28]:_0xcccex8=_0xf1fb[27];break;case _0xf1fb[30]:_0xcccex8=_0xf1fb[29];break};this[_0xf1fb[10]](_0xf1fb[31],_0xcccex8);this[_0xf1fb[10]](_0xf1fb[32],_0xcccex3[_0xf1fb[34]](_0xf1fb[33]))}},statusdesc:{type:_0xcccex4[_0xf1fb[7]]},statusAt:{type:_0xcccex4[_0xf1fb[5]]},paused:{type:_0xcccex4[_0xf1fb[4]],defaultValue:false,set:function(_0xcccex9){this[_0xf1fb[10]](_0xf1fb[35],parseInt(_0xcccex9,10)?true:false)}},pausedAt:{type:_0xcccex4[_0xf1fb[5]]},reason:{type:_0xcccex4[_0xf1fb[7]]}},{tableName:_0xf1fb[36],indexes:[{name:_0xf1fb[37],fields:[_0xf1fb[37]]}]});return _0xcccex5} \ No newline at end of file diff --git a/server/models/variable.js b/server/models/variable.js index 68778bc..c64dd96 100644 --- a/server/models/variable.js +++ b/server/models/variable.js @@ -1,33 +1 @@ -'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; - -}; +var _0xbb17=["\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"];_0xbb17[0];module[_0xbb17[1]]=function(_0xf870x1,_0xf870x2){var _0xf870x3=_0xf870x1[_0xbb17[8]](_0xbb17[2],{name:{type:_0xf870x2[_0xbb17[3]],unique:true,allowNull:false,validate:{notEmpty:true}},description:_0xf870x2[_0xbb17[3]]},{tableName:_0xbb17[4],associate:function(_0xf870x4){_0xf870x3[_0xbb17[5]](_0xf870x4.ZendeskField);_0xf870x3[_0xbb17[5]](_0xf870x4.DeskField);_0xf870x3[_0xbb17[5]](_0xf870x4.SalesforceField);_0xf870x3[_0xbb17[5]](_0xf870x4.FreshdeskField);_0xf870x3[_0xbb17[5]](_0xf870x4.SugarcrmField);_0xf870x3[_0xbb17[7]](_0xbb17[6],{include:[{all:true}]})}});return _0xf870x3} \ No newline at end of file diff --git a/server/models/voice_context.js b/server/models/voice_context.js index e81e9ab..9c528e8 100644 --- a/server/models/voice_context.js +++ b/server/models/voice_context.js @@ -1,32 +1 @@ -/** - * 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; -}; +var _0xc9fc=["\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[_0xc9fc[0]]=function(_0xb866x1,_0xb866x2){var _0xb866x3=_0xb866x1[_0xc9fc[7]](_0xc9fc[1],{name:{type:_0xb866x2[_0xc9fc[2]],unique:true},description:{type:_0xb866x2[_0xc9fc[2]],allowNull:true},defaultEntry:{type:_0xb866x2[_0xc9fc[3]],defaultValue:0}},{tableName:_0xc9fc[4],associate:function(_0xb866x4){_0xb866x3[_0xc9fc[6]](_0xb866x4.VoiceExtension,{onDelete:_0xc9fc[5],hooks:true})}});return _0xb866x3} \ No newline at end of file diff --git a/server/models/voice_extension.js b/server/models/voice_extension.js index 6d42a6e..a141765 100644 --- a/server/models/voice_extension.js +++ b/server/models/voice_extension.js @@ -1,112 +1 @@ -/* 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; -}; +var _0x9ef5=["\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(_0x9ef5[0]);var reverseMustache=require(_0x9ef5[1]);module[_0x9ef5[2]]=function(_0x4cdbx3,_0x4cdbx4){var _0x4cdbx5=_0x4cdbx3[_0x9ef5[41]](_0x9ef5[3],{context:{type:_0x4cdbx4[_0x9ef5[4]],allowNull:false,unique:_0x9ef5[5],validate:{notEmpty:true,is:/[A-Za-z0-9\.\_]+$/i}},exten:{type:_0x4cdbx4[_0x9ef5[4]],allowNull:false,unique:_0x9ef5[5]},priority:{type:_0x4cdbx4[_0x9ef5[4]],allowNull:false,defaultValue:_0x9ef5[6],unique:_0x9ef5[5]},tag:{type:_0x4cdbx4[_0x9ef5[4]],allowNull:false,defaultValue:_0x9ef5[7]},app:{type:_0x4cdbx4[_0x9ef5[4]],allowNull:false,defaultValue:_0x9ef5[8]},appdata:{type:_0x4cdbx4[_0x9ef5[4]],allowNull:true,get:function(){if(!this[_0x9ef5[10]](_0x9ef5[9])){if(this[_0x9ef5[10]](_0x9ef5[11])===_0x9ef5[12]&&this[_0x9ef5[10]](_0x9ef5[13])===_0x9ef5[14]){var _0x4cdbx6=reverseMustache({template:_0x9ef5[15],content:this[_0x9ef5[10]](_0x9ef5[16])});return [_0x4cdbx6[_0x9ef5[17]],this[_0x9ef5[10]](_0x9ef5[18])||_0x9ef5[19],_0x4cdbx6[_0x9ef5[20]],_0x4cdbx6[_0x9ef5[21]]]}else {return this[_0x9ef5[10]](_0x9ef5[16])[_0x9ef5[23]](_0x9ef5[22])}}else {return this[_0x9ef5[10]](_0x9ef5[16])}}},type:{type:_0x4cdbx4.ENUM(_0x9ef5[24],_0x9ef5[14],_0x9ef5[25],_0x9ef5[26],_0x9ef5[27],_0x9ef5[28],_0x9ef5[29]),allowNull:false},description:{type:_0x4cdbx4[_0x9ef5[4]]},interval:{type:_0x4cdbx4[_0x9ef5[4]]},IntervalId:{type:_0x4cdbx4[_0x9ef5[30]]},isApp:{type:_0x4cdbx4[_0x9ef5[31]],defaultValue:false},callerID:{type:_0x4cdbx4[_0x9ef5[4]],allowNull:true},record:{type:_0x4cdbx4[_0x9ef5[31]],defaultValue:false}},{tableName:_0x9ef5[32],associate:function(_0x4cdbx7){_0x4cdbx5[_0x9ef5[35]](_0x4cdbx7.VoiceExtension,{as:_0x9ef5[33],onDelete:_0x9ef5[34],hooks:true});_0x4cdbx5[_0x9ef5[39]](_0x9ef5[36],{include:[{model:_0x4cdbx7[_0x9ef5[3]],as:_0x9ef5[33],required:false,where:{isApp:true},attributes:[_0x9ef5[11],_0x9ef5[37],_0x9ef5[38],_0x9ef5[18],_0x9ef5[16],_0x9ef5[13]]}]});_0x4cdbx5[_0x9ef5[39]](_0x9ef5[40],{where:{VoiceExtensionId:null}})}});return _0x4cdbx5} \ No newline at end of file diff --git a/server/models/voice_musiconhold.js b/server/models/voice_musiconhold.js index c405ca3..6c6e879 100644 --- a/server/models/voice_musiconhold.js +++ b/server/models/voice_musiconhold.js @@ -1,71 +1 @@ -/* 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; -}; +var _0xae24=["\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[_0xae24[0]]=function(_0xe733x1,_0xe733x2){var _0xe733x3=_0xe733x1[_0xae24[14]](_0xae24[1],{name:{type:_0xe733x2[_0xae24[2]],allowNull:false,unique:true},mode:{type:_0xe733x2.ENUM(_0xae24[3],_0xae24[4],_0xae24[5],_0xae24[6],_0xae24[7],_0xae24[8]),allowNull:true,defaultValue:_0xae24[4]},directory:{type:_0xe733x2[_0xae24[2]],allowNull:true},application:{type:_0xe733x2[_0xae24[2]],allowNull:true},digit:{type:_0xe733x2[_0xae24[2]],allowNull:true},sort:{type:_0xe733x2[_0xae24[2]],allowNull:true,defaultValue:_0xae24[9]},format:{type:_0xe733x2[_0xae24[2]],allowNull:true,defaultValue:_0xae24[10]},stamp:{type:_0xae24[11]},defaultEntry:{type:_0xe733x2[_0xae24[12]],defaultValue:0}},{tableName:_0xae24[13]});_0xe733x3[_0xae24[20]](function(_0xe733x4){if(_0xe733x4[_0xae24[16]](_0xae24[15])){throw new Error({message:_0xae24[17]})};if(_0xe733x4[_0xae24[18]]){throw new Error({message:_0xae24[19]})}});_0xe733x3[_0xae24[22]](function(_0xe733x4){if(_0xe733x4[_0xae24[18]]){throw new Error({message:_0xae24[21]})}});return _0xe733x3} \ No newline at end of file diff --git a/server/models/voice_queue.js b/server/models/voice_queue.js index 71d35c8..b91f74b 100644 --- a/server/models/voice_queue.js +++ b/server/models/voice_queue.js @@ -1,305 +1 @@ -/* 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; -}; +var _0x3357=["\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[_0x3357[0]]=function(_0xfd8bx1,_0xfd8bx2){var _0xfd8bx3=_0xfd8bx1[_0x3357[28]](_0x3357[1],{name:{type:_0xfd8bx2[_0x3357[2]],primaryKey:true,unique:true,validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},musiconhold:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:_0x3357[3]},announce:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:_0x3357[4]},strategy:{type:_0xfd8bx2.ENUM(_0x3357[5],_0x3357[6],_0x3357[7],_0x3357[8],_0x3357[9],_0x3357[10],_0x3357[11],_0x3357[12]),allowNull:false,defaultValue:_0x3357[5]},servicelevel:{type:_0xfd8bx2.INTEGER(11),allowNull:true,defaultValue:0},context:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:null},penaltymemberslimit:{type:_0xfd8bx2.INTEGER(11),allowNull:true},timeout:{type:_0xfd8bx2.INTEGER(11),allowNull:true,defaultValue:0},retry:{type:_0xfd8bx2.INTEGER(11),allowNull:true,defaultValue:0},timeoutpriority:{type:_0xfd8bx2[_0x3357[2]],allowNull:true},weight:{type:_0xfd8bx2.INTEGER(11),allowNull:true,defaultValue:0},wrapuptime:{type:_0xfd8bx2.INTEGER(11),allowNull:true,defaultValue:0},autofill:{type:_0xfd8bx2.ENUM(_0x3357[13],_0x3357[14]),allowNull:true,defaultValue:_0x3357[13]},autopause:{type:_0xfd8bx2.ENUM(_0x3357[13],_0x3357[14],_0x3357[15]),allowNull:true,defaultValue:_0x3357[14]},autopausedelay:{type:_0xfd8bx2.INTEGER(11),allowNull:true},autopausebusy:{type:_0xfd8bx2.ENUM(_0x3357[13],_0x3357[14]),allowNull:true,defaultValue:_0x3357[14]},autopauseunavail:{type:_0xfd8bx2.ENUM(_0x3357[13],_0x3357[14]),allowNull:true,defaultValue:_0x3357[14]},maxlen:{type:_0xfd8bx2.INTEGER(11),allowNull:true,defaultValue:0},setinterfacevar:{type:_0xfd8bx2.ENUM(_0x3357[13],_0x3357[14]),allowNull:true,defaultValue:_0x3357[14]},setqueueentryvar:{type:_0xfd8bx2.ENUM(_0x3357[13],_0x3357[14]),allowNull:true,defautValue:_0x3357[14]},setqueuevar:{type:_0xfd8bx2.ENUM(_0x3357[13],_0x3357[14]),allowNull:true,defaultValue:_0x3357[14]},membermacro:{type:_0xfd8bx2[_0x3357[2]],allowNull:true},membergosub:{type:_0xfd8bx2[_0x3357[2]],allowNull:true},announce_frequency:{type:_0xfd8bx2.INTEGER(11),allowNull:true,defaultValue:0},min_announce_frequency:{type:_0xfd8bx2.INTEGER(11),allowNull:true,defaultValue:0},periodic_announce_frequency:{type:_0xfd8bx2.INTEGER(11),allowNull:true,defaultValue:0},random_periodic_announce:{type:_0xfd8bx2.ENUM(_0x3357[13],_0x3357[14]),allowNull:true,defaultValue:_0x3357[14]},relative_periodic_announce:{type:_0xfd8bx2.ENUM(_0x3357[13],_0x3357[14]),allowNull:true,defaultValue:_0x3357[13]},announce_holdtime:{type:_0xfd8bx2.ENUM(_0x3357[13],_0x3357[14],_0x3357[16]),allowNull:true,defaultValue:_0x3357[14]},announce_position:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:_0x3357[14]},announce_to_first_user:{type:_0xfd8bx2.ENUM(_0x3357[13],_0x3357[14]),allowNull:true},announce_position_limit:{type:_0xfd8bx2.INTEGER(11),allowNull:true},announce_round_seconds:{type:_0xfd8bx2.ENUM(_0x3357[17],_0x3357[18],_0x3357[19],_0x3357[20],_0x3357[21],_0x3357[22]),allowNull:true,defaultValue:_0x3357[17]},monitor_format:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:_0x3357[4]},monitor_type:{type:_0xfd8bx2[_0x3357[2]],allowNull:true},queue_youarenext:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:null},queue_thereare:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:null},queue_callswaiting:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:null},queue_holdtime:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:null},queue_minute:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:null},queue_minutes:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:null},queue_seconds:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:null},queue_thankyou:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:null},queue_reporthold:{type:_0xfd8bx2[_0x3357[2]],allowNull:true},queue_quantity1:{type:_0xfd8bx2[_0x3357[2]],allowNull:true},queue_quantity2:{type:_0xfd8bx2[_0x3357[2]],allowNull:true},queue_periodic_announce:{type:_0xfd8bx2[_0x3357[2]],allowNull:true},queue_less_than:{type:_0xfd8bx2[_0x3357[2]],allowNull:true},periodic_announce:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:_0x3357[4]},joinempty:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:_0x3357[13]},leavewhenempty:{type:_0xfd8bx2[_0x3357[2]],allowNull:true,defaultValue:_0x3357[14]},reportholdtime:{type:_0xfd8bx2.ENUM(_0x3357[13],_0x3357[14]),allowNull:true,defaultValue:_0x3357[14]},ringinuse:{type:_0xfd8bx2.ENUM(_0x3357[13],_0x3357[14]),allowNull:true,defaultValue:_0x3357[14]},memberdelay:{type:_0xfd8bx2.INTEGER(11),allowNull:true,defaultValue:0},timeoutrestart:{type:_0xfd8bx2.ENUM(_0x3357[13],_0x3357[14]),allowNull:true,defaultValue:_0x3357[14]},defaultrule:{type:_0xfd8bx2[_0x3357[2]],allowNull:true},description:{type:_0xfd8bx2[_0x3357[2]],allowNull:true},acw:{type:_0xfd8bx2[_0x3357[23]],defaultValue:0},acwTimeout:{type:_0xfd8bx2.INTEGER(11),defaultValue:10}},{tableName:_0x3357[24],associate:function(_0xfd8bx4){_0xfd8bx3[_0x3357[27]](_0xfd8bx4.User,{through:_0xfd8bx4[_0x3357[25]],foreignKey:_0x3357[26],required:false})}});_0xfd8bx3[_0x3357[32]](function(_0xfd8bx5){if(_0xfd8bx5[_0x3357[30]](_0x3357[29])){throw new Error(_0x3357[31])}});return _0xfd8bx3} \ No newline at end of file diff --git a/server/models/voice_recording.js b/server/models/voice_recording.js index 736aa24..f66907a 100644 --- a/server/models/voice_recording.js +++ b/server/models/voice_recording.js @@ -1,75 +1 @@ -/* 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; -}; +var _0x54b8=["\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(_0x54b8[0]);module[_0x54b8[1]]=function(_0xbe21x2,_0xbe21x3){var _0xbe21x4=_0xbe21x2[_0x54b8[11]](_0x54b8[2],{uniqueid:{type:_0xbe21x3[_0x54b8[3]],primaryKey:true},channel:{type:_0xbe21x3[_0x54b8[3]]},calleridnum:{type:_0xbe21x3[_0x54b8[3]]},calleridname:{type:_0xbe21x3[_0x54b8[3]]},connectedlinenum:{type:_0xbe21x3[_0x54b8[3]]},connectedlinename:{type:_0xbe21x3[_0x54b8[3]]},language:{type:_0xbe21x3[_0x54b8[3]]},accountcode:{type:_0xbe21x3[_0x54b8[3]]},context:{type:_0xbe21x3[_0x54b8[3]]},exten:{type:_0xbe21x3[_0x54b8[3]]},value:{type:_0xbe21x3[_0x54b8[3]]},type:{type:_0xbe21x3[_0x54b8[3]]},rating:{type:_0xbe21x3[_0x54b8[4]],defaultValue:0,validate:{max:5,min:0}},createdAt:{type:_0xbe21x3[_0x54b8[5]],get:function(){return moment(this[_0x54b8[9]](_0x54b8[8]))[_0x54b8[7]](_0x54b8[6])}},updatedAt:{type:_0xbe21x3[_0x54b8[5]],get:function(){return moment(this[_0x54b8[9]](_0x54b8[8]))[_0x54b8[7]](_0x54b8[6])}}},{tableName:_0x54b8[10],associate:function(_0xbe21x5){}});return _0xbe21x4} \ No newline at end of file diff --git a/server/models/voice_voicemail.js b/server/models/voice_voicemail.js index f814f4b..224c060 100644 --- a/server/models/voice_voicemail.js +++ b/server/models/voice_voicemail.js @@ -1,144 +1 @@ -/* 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; -}; +var _0xc658=["\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[_0xc658[0]]=function(_0x257dx1,_0x257dx2){var _0x257dx3=_0x257dx1[_0xc658[15]](_0xc658[1],{uniqueid:{type:_0x257dx2.INTEGER(4),primaryKey:true,allowNull:false,autoIncrement:true},customer_id:{type:_0x257dx2[_0xc658[2]]},context:{type:_0x257dx2[_0xc658[2]],defaultValue:_0xc658[3],unique:_0xc658[4]},mailbox:{type:_0x257dx2[_0xc658[2]],defaultValue:_0xc658[5],allowNull:false,unique:_0xc658[4]},password:{type:_0x257dx2[_0xc658[2]]},fullname:{type:_0x257dx2[_0xc658[2]]},email:{type:_0x257dx2[_0xc658[2]]},pager:{type:_0x257dx2[_0xc658[2]]},tz:{type:_0x257dx2[_0xc658[2]],defaultValue:_0xc658[6]},attach:{type:_0x257dx2.ENUM(_0xc658[7],_0xc658[8]),defaultValue:_0xc658[7],allowNull:false},saycid:{type:_0x257dx2.ENUM(_0xc658[7],_0xc658[8]),defaultValue:_0xc658[7],allowNull:false},dialout:{type:_0x257dx2[_0xc658[2]]},callback:{type:_0x257dx2[_0xc658[2]]},review:{type:_0x257dx2.ENUM(_0xc658[7],_0xc658[8]),defaultValue:_0xc658[8],allowNull:false},operator:{type:_0x257dx2.ENUM(_0xc658[7],_0xc658[8]),defaultValue:_0xc658[8],allowNull:false},envelope:{type:_0x257dx2.ENUM(_0xc658[7],_0xc658[8]),defaultValue:_0xc658[8],allowNull:false},sayduration:{type:_0x257dx2.ENUM(_0xc658[7],_0xc658[8]),defaultValue:_0xc658[8],allowNull:false},saydurationm:{type:_0xc658[9],defaultValue:1,allowNull:false},sendvoicemail:{type:_0x257dx2.ENUM(_0xc658[7],_0xc658[8]),defaultValue:_0xc658[8],allowNull:false},"\x64\x65\x6C\x65\x74\x65":{type:_0x257dx2.ENUM(_0xc658[7],_0xc658[8]),defaultValue:_0xc658[8],allowNull:false},nextaftercmd:{type:_0x257dx2.ENUM(_0xc658[7],_0xc658[8]),defaultValue:_0xc658[7],allowNull:false},forcename:{type:_0x257dx2.ENUM(_0xc658[7],_0xc658[8]),defaultValue:_0xc658[8],allowNull:false},forcegreetings:{type:_0x257dx2.ENUM(_0xc658[7],_0xc658[8]),defaultValue:_0xc658[8],allowNull:false},hidefromdir:{type:_0x257dx2.ENUM(_0xc658[7],_0xc658[8]),defaultValue:_0xc658[7],allowNull:false},stamp:{type:_0xc658[10]},emailsubject:{type:_0x257dx2[_0xc658[2]]},emailbody:{type:_0x257dx2[_0xc658[2]]},name:{type:_0x257dx2[_0xc658[2]]},maxsecs:{type:_0x257dx2.INTEGER(255),defaultValue:180,allowNull:false},maxmsg:{type:_0x257dx2.INTEGER(255),defaultValue:100,allowNull:false}},{tableName:_0xc658[11],indexes:[{name:_0xc658[12],fields:[_0xc658[13],_0xc658[14]]}]});return _0x257dx3} \ No newline at end of file diff --git a/server/models/voice_voicemail_messages.js b/server/models/voice_voicemail_messages.js index fbfc691..2f1578b 100644 --- a/server/models/voice_voicemail_messages.js +++ b/server/models/voice_voicemail_messages.js @@ -1,83 +1 @@ -/* 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; -}; +var _0x79db=["\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[_0x79db[0]]=function(_0xe57ax1,_0xe57ax2){var _0xe57ax3=_0xe57ax1[_0x79db[14]](_0x79db[1],{msgnum:{type:_0xe57ax2.INTEGER(11),defaultValue:0,allowNull:false},dir:{type:_0xe57ax2[_0x79db[2]],defaultValue:_0x79db[3]},context:{type:_0xe57ax2[_0x79db[2]],defaultValue:_0x79db[3]},macrocontext:{type:_0xe57ax2[_0x79db[2]],defaultValue:_0x79db[3]},callerid:{type:_0xe57ax2[_0x79db[2]],defaultValue:_0x79db[3]},origtime:{type:_0xe57ax2[_0x79db[2]],defaultValue:_0x79db[3]},duration:{type:_0xe57ax2[_0x79db[2]],defaultValue:_0x79db[3]},mailboxuser:{type:_0xe57ax2[_0x79db[2]],defaultValue:_0x79db[3]},mailboxcontext:{type:_0xe57ax2[_0x79db[2]],defaultValue:_0x79db[3]},recording:{type:_0xe57ax2.BLOB(_0x79db[4]),defaultValue:null},flag:{type:_0xe57ax2[_0x79db[2]],defaultValue:_0x79db[3]},msg_id:{type:_0xe57ax2[_0x79db[2]],defaultValue:_0x79db[3]},stamp:{type:_0x79db[5],allowNull:false}},{tableName:_0x79db[6],associate:function(_0xe57ax4){_0xe57ax3[_0x79db[12]](_0x79db[7],function(_0xe57ax5){var _0xe57ax6={where:{}};if(_0xe57ax5[_0x79db[8]]&&_0xe57ax5[_0x79db[7]]){where:{_0xe57ax6[_0x79db[10]][_0x79db[9]]=_0xe57ax5[_0x79db[8]];_0xe57ax6[_0x79db[10]][_0x79db[11]]=_0xe57ax5[_0x79db[7]]}delete _0xe57ax5[_0x79db[8]];delete _0xe57ax5[_0x79db[7]]};return _0xe57ax6})},indexes:[{name:_0x79db[13],fields:[_0x79db[13]]}]});return _0xe57ax3} \ No newline at end of file diff --git a/server/models/zendesk_account.js b/server/models/zendesk_account.js index 899cf38..37f9678 100644 --- a/server/models/zendesk_account.js +++ b/server/models/zendesk_account.js @@ -1,42 +1 @@ -'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; - -}; +var _0x57db=["\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"];_0x57db[0];module[_0x57db[1]]=function(_0x30dfx1,_0x30dfx2){var _0x30dfx3=_0x30dfx1[_0x57db[15]](_0x57db[2],{name:_0x30dfx2[_0x57db[3]],description:_0x30dfx2[_0x57db[3]],username:{type:_0x30dfx2[_0x57db[3]],unique:true},password:_0x30dfx2[_0x57db[3]],token:_0x30dfx2[_0x57db[3]],remoteUri:{type:_0x30dfx2[_0x57db[3]],unique:true},authType:{type:_0x30dfx2.ENUM(_0x57db[4],_0x57db[5]),defaultValue:_0x57db[4]}},{tableName:_0x57db[6],associate:function(_0x30dfx4){_0x30dfx3[_0x57db[9]](_0x30dfx4.ZendeskConfiguration,{as:_0x57db[7],foreignKey:_0x57db[8]});_0x30dfx3[_0x57db[14]](_0x57db[10],{include:[{model:_0x30dfx4[_0x57db[11]],as:_0x57db[7],required:false,attributes:[_0x57db[12],_0x57db[13]]}]})}});return _0x30dfx3} \ No newline at end of file diff --git a/server/models/zendesk_configuration.js b/server/models/zendesk_configuration.js index 9363273..ea20b3e 100644 --- a/server/models/zendesk_configuration.js +++ b/server/models/zendesk_configuration.js @@ -1,44 +1 @@ -'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; - -}; +var _0xb49f=["\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"];_0xb49f[0];module[_0xb49f[1]]=function(_0x9ee7x1,_0x9ee7x2){var _0x9ee7x3=_0x9ee7x1[_0xb49f[18]](_0xb49f[2],{name:_0x9ee7x2[_0xb49f[3]],description:_0x9ee7x2[_0xb49f[3]]},{tableName:_0xb49f[4],associate:function(_0x9ee7x4){_0x9ee7x3[_0xb49f[6]](_0x9ee7x4.ZendeskAccount,{foreignKey:_0xb49f[5]});_0x9ee7x3[_0xb49f[8]](_0xb49f[7],function(_0x9ee7x5){return {where:{AccountId:_0x9ee7x5},include:[{all:true}]}});_0x9ee7x3[_0xb49f[11]](_0x9ee7x4.ZendeskField,{as:_0xb49f[9],foreignKey:_0xb49f[10]});_0x9ee7x3[_0xb49f[11]](_0x9ee7x4.ZendeskField,{as:_0xb49f[12],foreignKey:_0xb49f[13]});_0x9ee7x3[_0xb49f[11]](_0x9ee7x4.ZendeskField,{as:_0xb49f[14],foreignKey:_0xb49f[15]});_0x9ee7x3[_0xb49f[17]](_0x9ee7x4.Tag,{through:_0xb49f[16]})}});return _0x9ee7x3} \ No newline at end of file diff --git a/server/models/zendesk_field.js b/server/models/zendesk_field.js index 278c7fa..b768ec7 100644 --- a/server/models/zendesk_field.js +++ b/server/models/zendesk_field.js @@ -1,32 +1 @@ -'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; - -}; +var _0xdcdf=["\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"];_0xdcdf[0];module[_0xdcdf[1]]=function(_0x1778x1,_0x1778x2){var _0x1778x3=_0x1778x1[_0xdcdf[12]](_0xdcdf[2],{type:{type:_0x1778x2.ENUM(_0xdcdf[3],_0xdcdf[4],_0xdcdf[5],_0xdcdf[6]),defaultValue:_0xdcdf[3]},content:_0x1778x2[_0xdcdf[7]],key:_0x1778x2[_0xdcdf[7]],keyType:{type:_0x1778x2.ENUM(_0xdcdf[3],_0xdcdf[4],_0xdcdf[5])},keyContent:_0x1778x2[_0xdcdf[7]],idField:_0x1778x2[_0xdcdf[8]],nameField:_0x1778x2[_0xdcdf[7]],customField:{type:_0x1778x2[_0xdcdf[9]],defaultValue:true},variableName:_0x1778x2[_0xdcdf[7]]},{tableName:_0xdcdf[10],associate:function(_0x1778x4){_0x1778x3[_0xdcdf[11]](_0x1778x4.Variable)}});return _0x1778x3} \ No newline at end of file diff --git a/server/routes.js b/server/routes.js index 2bd0d7a..e4b515a 100644 --- a/server/routes.js +++ b/server/routes.js @@ -1,155 +1 @@ -/** - * 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/chat/rooms', require('./api/report_chat_room')); - app.use('/api/sms/queues', require('./api/sms_queue')); - app.use('/api/sms/applications', require('./api/sms_application')); - app.use('/api/sms/messages', require('./api/sms_message')); - app.use('/api/sms/rooms', require('./api/sms_room')); - app.use('/api/sms/accounts', require('./api/sms_account')); - 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/lists', require('./api/list')); - app.use('/api/contactmanager/user_has_lists', require('./api/user_has_list')); - 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); - // }); -}; +var _0x11f8=["\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\x68\x61\x74\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D","\x75\x73\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\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","\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\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\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\x6C\x69\x73\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6C\x69\x73\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\x6C\x69\x73\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74","\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"];_0x11f8[0];var config=require(_0x11f8[1]);var errors=require(_0x11f8[2]);var path=require(_0x11f8[3]);var moment=require(_0x11f8[4]);module[_0x11f8[5]]=function(_0x9efcx5){var _0x9efcx6=_0x9efcx5[_0x11f8[7]](_0x11f8[6]);_0x9efcx5[_0x11f8[10]](_0x11f8[8],require(_0x11f8[9]));_0x9efcx5[_0x11f8[10]](_0x11f8[11],require(_0x11f8[12]));_0x9efcx5[_0x11f8[10]](_0x11f8[13],require(_0x11f8[14]));_0x9efcx5[_0x11f8[10]](_0x11f8[15],require(_0x11f8[16]));_0x9efcx5[_0x11f8[10]](_0x11f8[17],require(_0x11f8[18]));_0x9efcx5[_0x11f8[10]](_0x11f8[19],require(_0x11f8[20]));_0x9efcx5[_0x11f8[10]](_0x11f8[21],require(_0x11f8[22]));_0x9efcx5[_0x11f8[10]](_0x11f8[23],require(_0x11f8[24]));_0x9efcx5[_0x11f8[10]](_0x11f8[25],require(_0x11f8[26]));_0x9efcx5[_0x11f8[10]](_0x11f8[27],require(_0x11f8[28]));_0x9efcx5[_0x11f8[10]](_0x11f8[29],require(_0x11f8[30]));_0x9efcx5[_0x11f8[10]](_0x11f8[31],require(_0x11f8[32]));_0x9efcx5[_0x11f8[10]](_0x11f8[33],require(_0x11f8[34]));_0x9efcx5[_0x11f8[10]](_0x11f8[35],require(_0x11f8[36]));_0x9efcx5[_0x11f8[10]](_0x11f8[37],require(_0x11f8[38]));_0x9efcx5[_0x11f8[10]](_0x11f8[39],require(_0x11f8[40]));_0x9efcx5[_0x11f8[10]](_0x11f8[41],require(_0x11f8[42]));_0x9efcx5[_0x11f8[10]](_0x11f8[43],require(_0x11f8[44]));_0x9efcx5[_0x11f8[10]](_0x11f8[45],require(_0x11f8[46]));_0x9efcx5[_0x11f8[10]](_0x11f8[47],require(_0x11f8[48]));_0x9efcx5[_0x11f8[10]](_0x11f8[49],require(_0x11f8[50]));_0x9efcx5[_0x11f8[10]](_0x11f8[51],require(_0x11f8[52]));_0x9efcx5[_0x11f8[10]](_0x11f8[53],require(_0x11f8[54]));_0x9efcx5[_0x11f8[10]](_0x11f8[55],require(_0x11f8[56]));_0x9efcx5[_0x11f8[10]](_0x11f8[57],require(_0x11f8[58]));_0x9efcx5[_0x11f8[10]](_0x11f8[59],require(_0x11f8[60]));_0x9efcx5[_0x11f8[10]](_0x11f8[61],require(_0x11f8[62]));_0x9efcx5[_0x11f8[10]](_0x11f8[63],require(_0x11f8[64]));_0x9efcx5[_0x11f8[10]](_0x11f8[65],require(_0x11f8[66]));_0x9efcx5[_0x11f8[10]](_0x11f8[67],require(_0x11f8[68]));_0x9efcx5[_0x11f8[10]](_0x11f8[69],require(_0x11f8[70]));_0x9efcx5[_0x11f8[10]](_0x11f8[71],require(_0x11f8[72]));_0x9efcx5[_0x11f8[10]](_0x11f8[73],require(_0x11f8[74]));_0x9efcx5[_0x11f8[10]](_0x11f8[75],require(_0x11f8[76]));_0x9efcx5[_0x11f8[10]](_0x11f8[77],require(_0x11f8[78]));_0x9efcx5[_0x11f8[10]](_0x11f8[79],require(_0x11f8[80]));_0x9efcx5[_0x11f8[10]](_0x11f8[81],require(_0x11f8[82]));_0x9efcx5[_0x11f8[10]](_0x11f8[83],require(_0x11f8[84]));_0x9efcx5[_0x11f8[10]](_0x11f8[85],require(_0x11f8[86]));_0x9efcx5[_0x11f8[10]](_0x11f8[87],require(_0x11f8[88]));_0x9efcx5[_0x11f8[10]](_0x11f8[89],require(_0x11f8[90]));_0x9efcx5[_0x11f8[10]](_0x11f8[91],require(_0x11f8[92]));_0x9efcx5[_0x11f8[10]](_0x11f8[93],require(_0x11f8[94]));_0x9efcx5[_0x11f8[10]](_0x11f8[95],require(_0x11f8[96]));_0x9efcx5[_0x11f8[10]](_0x11f8[97],require(_0x11f8[98]));_0x9efcx5[_0x11f8[10]](_0x11f8[99],require(_0x11f8[100]));_0x9efcx5[_0x11f8[10]](_0x11f8[101],require(_0x11f8[102]));_0x9efcx5[_0x11f8[10]](_0x11f8[103],require(_0x11f8[104]));_0x9efcx5[_0x11f8[10]](_0x11f8[105],require(_0x11f8[106]));_0x9efcx5[_0x11f8[10]](_0x11f8[107],require(_0x11f8[108]));_0x9efcx5[_0x11f8[10]](_0x11f8[109],require(_0x11f8[110]));_0x9efcx5[_0x11f8[10]](_0x11f8[111],require(_0x11f8[112]));_0x9efcx5[_0x11f8[10]](_0x11f8[113],require(_0x11f8[114]));_0x9efcx5[_0x11f8[10]](_0x11f8[115],require(_0x11f8[116]));_0x9efcx5[_0x11f8[10]](_0x11f8[117],require(_0x11f8[118]));_0x9efcx5[_0x11f8[10]](_0x11f8[119],require(_0x11f8[120]));_0x9efcx5[_0x11f8[10]](_0x11f8[121],require(_0x11f8[122]));_0x9efcx5[_0x11f8[10]](_0x11f8[123],require(_0x11f8[124]));_0x9efcx5[_0x11f8[10]](_0x11f8[125],require(_0x11f8[126]));_0x9efcx5[_0x11f8[10]](_0x11f8[127],require(_0x11f8[128]));_0x9efcx5[_0x11f8[10]](_0x11f8[129],require(_0x11f8[130]));_0x9efcx5[_0x11f8[10]](_0x11f8[131],require(_0x11f8[132]));_0x9efcx5[_0x11f8[10]](_0x11f8[133],require(_0x11f8[134]));_0x9efcx5[_0x11f8[10]](_0x11f8[135],require(_0x11f8[136]));_0x9efcx5[_0x11f8[10]](_0x11f8[137],require(_0x11f8[138]));_0x9efcx5[_0x11f8[10]](_0x11f8[139],require(_0x11f8[140]));_0x9efcx5[_0x11f8[10]](_0x11f8[141],require(_0x11f8[142]));_0x9efcx5[_0x11f8[10]](_0x11f8[143],require(_0x11f8[144]));_0x9efcx5[_0x11f8[10]](_0x11f8[145],require(_0x11f8[146]));_0x9efcx5[_0x11f8[10]](_0x11f8[147],require(_0x11f8[148]));_0x9efcx5[_0x11f8[10]](_0x11f8[149],require(_0x11f8[150]));_0x9efcx5[_0x11f8[10]](_0x11f8[151],require(_0x11f8[152]));_0x9efcx5[_0x11f8[10]](_0x11f8[153],require(_0x11f8[154]));_0x9efcx5[_0x11f8[10]](_0x11f8[155],require(_0x11f8[156]));_0x9efcx5[_0x11f8[10]](_0x11f8[157],require(_0x11f8[158]));_0x9efcx5[_0x11f8[10]](_0x11f8[159],require(_0x11f8[160]));_0x9efcx5[_0x11f8[10]](_0x11f8[161],require(_0x11f8[162]));_0x9efcx5[_0x11f8[10]](_0x11f8[163],require(_0x11f8[164]));_0x9efcx5[_0x11f8[10]](_0x11f8[165],require(_0x11f8[166]));_0x9efcx5[_0x11f8[10]](_0x11f8[167],require(_0x11f8[168]));_0x9efcx5[_0x11f8[10]](_0x11f8[169],require(_0x11f8[170]));_0x9efcx5[_0x11f8[10]](_0x11f8[171],require(_0x11f8[172]));_0x9efcx5[_0x11f8[10]](_0x11f8[173],require(_0x11f8[174]));_0x9efcx5[_0x11f8[10]](_0x11f8[175],require(_0x11f8[176]));_0x9efcx5[_0x11f8[10]](_0x11f8[177],require(_0x11f8[178]));_0x9efcx5[_0x11f8[10]](_0x11f8[179],require(_0x11f8[180]));_0x9efcx5[_0x11f8[10]](_0x11f8[181],require(_0x11f8[182]));_0x9efcx5[_0x11f8[10]](_0x11f8[183],require(_0x11f8[184]));_0x9efcx5[_0x11f8[10]](_0x11f8[165],require(_0x11f8[166]));_0x9efcx5[_0x11f8[10]](_0x11f8[185],require(_0x11f8[186]));_0x9efcx5[_0x11f8[10]](_0x11f8[187],require(_0x11f8[188]));_0x9efcx5[_0x11f8[10]](_0x11f8[189],require(_0x11f8[190]));_0x9efcx5[_0x11f8[10]](_0x11f8[191],require(_0x11f8[192]));_0x9efcx5[_0x11f8[10]](_0x11f8[193],require(_0x11f8[194]));_0x9efcx5[_0x11f8[10]](_0x11f8[195],require(_0x11f8[196]));_0x9efcx5[_0x11f8[10]](_0x11f8[197],require(_0x11f8[198]));_0x9efcx5[_0x11f8[10]](_0x11f8[199],require(_0x11f8[200]));_0x9efcx5[_0x11f8[10]](_0x11f8[201],require(_0x11f8[202]));_0x9efcx5[_0x11f8[10]](_0x11f8[203],require(_0x11f8[204]));_0x9efcx5[_0x11f8[10]](_0x11f8[205],require(_0x11f8[206]));_0x9efcx5[_0x11f8[10]](_0x11f8[207],require(_0x11f8[208]));_0x9efcx5[_0x11f8[10]](_0x11f8[209],require(_0x11f8[210]));_0x9efcx5[_0x11f8[10]](_0x11f8[211],require(_0x11f8[212]));_0x9efcx5[_0x11f8[214]](_0x11f8[213])[_0x11f8[7]](errors[404]);_0x9efcx5[_0x11f8[225]](_0x11f8[215],function(_0x9efcx7,_0x9efcx8,_0x9efcx9){var _0x9efcxa={};if(_0x11f8[216]===_0x9efcx6){_0x9efcxa[_0x11f8[217]]=path[_0x11f8[219]](config[_0x11f8[217]],_0x11f8[218])};if(_0x11f8[220]===_0x9efcx6||_0x11f8[221]===_0x9efcx6){_0x9efcxa[_0x11f8[217]]=path[_0x11f8[219]](config[_0x11f8[217]],_0x11f8[222])};_0x9efcx8[_0x11f8[224]](_0x11f8[223],_0x9efcxa)})} \ No newline at end of file diff --git a/server/utils/report_build.js b/server/utils/report_build.js index 5a75ac6..d294bfd 100644 --- a/server/utils/report_build.js +++ b/server/utils/report_build.js @@ -1,87 +1 @@ -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 + ')'; -} +var _0xf694=["\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(_0xf694[0]);var util=require(_0xf694[1]);exports[_0xf694[2]]=function(_0xf144x3,_0xf144x4){var _0xf144x5=[],_0xf144x6=[],_0xf144x7=[];_[_0xf694[20]](_0xf144x3.Fields,function(_0xf144x8){var _0xf144x9=_0xf694[3];if(_0xf144x8[_0xf694[4]]){switch(_0xf144x8[_0xf694[4]]){case _0xf694[8]:_0xf144x9=util[_0xf694[7]](_0xf694[5],_0xf144x8[_0xf694[6]]);break;case _0xf694[10]:_0xf144x9=util[_0xf694[7]](_0xf694[9],_0xf144x8[_0xf694[6]],_0xf144x8[_0xf694[6]]);break;case _0xf694[12]:_0xf144x9=util[_0xf694[7]](_0xf694[11],_0xf144x8[_0xf694[6]],_0xf144x8[_0xf694[6]]);break;default:_0xf144x9=util[_0xf694[7]](_0xf694[13],_0xf144x8[_0xf694[4]],_0xf144x8[_0xf694[6]])}}else {_0xf144x9=_0xf144x8[_0xf694[6]]};_0xf144x5[_0xf694[16]](util[_0xf694[7]](_0xf694[14],_0xf144x9,_0xf144x8[_0xf694[15]]));if(_0xf144x8[_0xf694[17]]){_0xf144x6[_0xf694[16]](_0xf144x8[_0xf694[6]])};if(_0xf144x8[_0xf694[18]]){_0xf144x7[_0xf694[16]](util[_0xf694[7]](_0xf694[19],_0xf144x8[_0xf694[6]],_0xf144x8[_0xf694[18]]))}});var _0xf144xa=_0xf144x3[_0xf694[21]]?getConditions(JSON[_0xf694[23]](_0xf144x3[_0xf694[21]])[_0xf694[22]]):_0xf694[24];var _0xf144xb=_0xf694[25];_0xf144xb+=_0xf694[26]+_0xf144x5[_0xf694[28]](_0xf694[27]);_0xf144xb+=_0xf694[29]+_0xf144x3[_0xf694[30]];_0xf144xb+=_0xf144xa!==_0xf694[24]?_0xf694[31]+_0xf144xa:_0xf694[3];var _0xf144xc,_0xf144xd;var _0xf144xe=[];if(_0xf144x4){_[_0xf694[42]](_0xf144x4,function(_0xf144xf,_0xf144x10){switch(_0xf144x10){case _0xf694[34]:_0xf144xe[_0xf694[16]](_0xf694[32]+_0xf144xf+_0xf694[33]);break;case _0xf694[36]:_0xf144xe[_0xf694[16]](_0xf694[35]+_0xf144xf+_0xf694[33]);break;case _0xf694[37]:;case _0xf694[38]:break;default:var _0xf144x11=_[_0xf694[39]](_0xf144x3.Fields,{alias:_0xf144x10});if(_0xf144x11){_0xf144xe[_0xf694[16]](_0xf144x11[_0xf694[6]]+_0xf694[40]+_0xf144xf+_0xf694[41])}else {_0xf144xe[_0xf694[16]](_0xf144x10+_0xf694[40]+_0xf144xf+_0xf694[41])}}})};if(_0xf144xe[_0xf694[43]]){_0xf144xb+=((_0xf144xa!==_0xf694[24])?_0xf694[44]:_0xf694[31])+_0xf144xe[_0xf694[28]](_0xf694[44])};_0xf144xb+=_0xf144x6[_0xf694[43]]?_0xf694[45]+_0xf144x6[_0xf694[28]](_0xf694[27]):_0xf694[3];_0xf144xb+=_0xf144x7[_0xf694[43]]?_0xf694[46]+_0xf144x7[_0xf694[28]](_0xf694[27]):_0xf694[3];return _0xf144xb};function getConditions(_0xf144x13){if(!_0xf144x13){return _0xf694[24]};for(var _0xf144x14=_0xf694[47],_0xf144x15=0;_0xf144x15<_0xf144x13[_0xf694[48]][_0xf694[43]];_0xf144x15++){_0xf144x15>0&&(_0xf144x14+=_0xf694[26]+_0xf144x13[_0xf694[49]]+_0xf694[26]);_0xf144x14+=_0xf144x13[_0xf694[48]][_0xf144x15][_0xf694[22]]?getConditions(_0xf144x13[_0xf694[48]][_0xf144x15][_0xf694[22]]):_0xf144x13[_0xf694[48]][_0xf144x15][_0xf694[6]]+_0xf694[26]+_0xf144x13[_0xf694[48]][_0xf144x15][_0xf694[50]]+_0xf694[51]+(_0xf144x13[_0xf694[48]][_0xf144x15][_0xf694[50]]===_0xf694[52]?_0xf694[53]+_0xf144x13[_0xf694[48]][_0xf144x15][_0xf694[54]]+_0xf694[53]:_0xf144x13[_0xf694[48]][_0xf144x15][_0xf694[54]])+_0xf694[33]};return _0xf144x14+_0xf694[55]} \ No newline at end of file diff --git a/server/utils/report_extraction.js b/server/utils/report_extraction.js index 0d973b7..f88a8d1 100644 --- a/server/utils/report_extraction.js +++ b/server/utils/report_extraction.js @@ -1,197 +1 @@ -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); - }); -} +var _0xcb56=["\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(_0xcb56[0]);var pdfMake=require(_0xcb56[1]);var _=require(_0xcb56[2]);var util=require(_0xcb56[3]);var ExtractedReport=require(_0xcb56[5])[_0xcb56[4]];var sequelize=require(_0xcb56[5])[_0xcb56[6]];var fs=require(_0xcb56[7]);var moment=require(_0xcb56[8]);var sr=require(_0xcb56[9]);var path=require(_0xcb56[10]);var config=require(_0xcb56[11]);var reportBuildUtils=require(_0xcb56[12]);var fonts={Roboto:{normal:path[_0xcb56[15]](config[_0xcb56[13]],_0xcb56[14]),bold:path[_0xcb56[15]](config[_0xcb56[13]],_0xcb56[16]),italics:path[_0xcb56[15]](config[_0xcb56[13]],_0xcb56[17]),bolditalics:path[_0xcb56[15]](config[_0xcb56[13]],_0xcb56[17])}};exports[_0xcb56[18]]=function(_0x5930xe,_0x5930xf,_0x5930x10){general(_0x5930xe,_0x5930xf,_0x5930x10,_0xcb56[19])};exports[_0xcb56[20]]=function(_0x5930xe,_0x5930xf,_0x5930x10){general(_0x5930xe,_0x5930xf,_0x5930x10,_0xcb56[21])};function general(_0x5930xe,_0x5930xf,_0x5930x10,_0x5930x12){extract(_0x5930xe,_0x5930xf,_0x5930x10,_0x5930x12)}function extract(_0x5930xe,_0x5930x14,_0x5930x10,_0x5930x12){var _0x5930xf=reportBuildUtils[_0xcb56[23]](_0x5930xe[_0xcb56[22]],_0x5930x14);sequelize[_0xcb56[33]](_0x5930xf,{type:sequelize[_0xcb56[32]][_0xcb56[31]]})[_0xcb56[30]](function(_0x5930x16){if(_0x5930x16){if(_0x5930x16[_0xcb56[27]]){switch(_0x5930x12){case _0xcb56[19]:createPdf(_0x5930x16,_0x5930xe,_0x5930x14,_0x5930x10);break;case _0xcb56[21]:createCsv(_0x5930x16,_0x5930xe,_0x5930x14,_0x5930x10);break;default:createCsv(_0x5930x16,_0x5930xe,_0x5930x14,_0x5930x10)}}else {updateExtracted(_0x5930x10,null,_0xcb56[28])}}else {updateExtracted(_0x5930x10,null,_0xcb56[29])}})[_0xcb56[26]](function(_0x5930x15){console[_0xcb56[24]](_0x5930x15);updateExtracted(_0x5930x10,null,_0xcb56[25])})}function createPdf(_0x5930x16,_0x5930xe,_0x5930x14,_0x5930x18){var _0x5930x19=sr({length:20,prefix:_0xcb56[34]+_0x5930xe[_0xcb56[35]]+_0xcb56[36],suffix:_0xcb56[37]});var _0x5930x1a=[];_[_0xcb56[41]](_0x5930xe.Fields,function(_0x5930x1b){_0x5930x1a[_0xcb56[40]]({text:_0x5930x1b[_0xcb56[38]],style:_0xcb56[39]})});var _0x5930x1c=[_0x5930x1a];_[_0xcb56[41]](_0x5930x16,function(_0x5930x1b){var _0x5930x1d=[];_[_0xcb56[44]](_0x5930x1b,function(_0x5930x1e,_0x5930x1f){_0x5930x1d[_0xcb56[40]](_0x5930x1e instanceof Date?moment(_0x5930x1e)[_0xcb56[43]](_0xcb56[42]).toString():_0x5930x1e)});_0x5930x1c[_0xcb56[40]](_0x5930x1d)});var _0x5930x20={content:[{text:_0x5930xe[_0xcb56[35]],style:_0xcb56[45]},_0x5930x14[_0xcb56[46]]?moment(_0x5930x14[_0xcb56[46]])[_0xcb56[43]](_0xcb56[42]).toString():_0xcb56[47]+_0xcb56[48]+_0x5930x14[_0xcb56[49]]?moment(_0x5930x14[_0xcb56[49]])[_0xcb56[43]](_0xcb56[42]).toString():_0xcb56[47],{style:_0xcb56[50],table:{headerRows:1,body:_0x5930x1c}}],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:_0xcb56[51]}}};var _0x5930x21= new pdfMake(fonts);var _0x5930x22=_0x5930x21[_0xcb56[52]](_0x5930x20);if(_0x5930x22){var _0x5930x23=fs[_0xcb56[54]](config[_0xcb56[53]]+_0x5930x19);_0x5930x23[_0xcb56[57]](_0xcb56[55],function(){updateExtracted(_0x5930x18,null,_0xcb56[56])});_0x5930x23[_0xcb56[57]](_0xcb56[58],function(){updateExtracted(_0x5930x18,_0x5930x19,_0xcb56[59])});_0x5930x22[_0xcb56[60]](_0x5930x23);_0x5930x22[_0xcb56[61]]()}else {updateExtracted(_0x5930x18,null,_0xcb56[62])}}function createCsv(_0x5930x16,_0x5930xe,_0x5930x14,_0x5930x18){var _0x5930x19=sr({length:20,prefix:_0xcb56[34]+_0x5930xe[_0xcb56[35]]+_0xcb56[36],suffix:_0xcb56[63]});var _0x5930x25=csv(_0x5930x16);if(_0x5930x25){fs[_0xcb56[65]](config[_0xcb56[53]]+_0x5930x19,_0x5930x25,function(_0x5930x15){if(_0x5930x15){console[_0xcb56[24]](_0x5930x15);updateExtracted(_0x5930x18,null,_0xcb56[64])}else {updateExtracted(_0x5930x18,_0x5930x19,_0xcb56[59])}})}else {updateExtracted(_0x5930x18,null,_0xcb56[66])}}function updateExtracted(_0x5930x18,_0x5930x19,_0x5930x27){ExtractedReport[_0xcb56[69]]({status:_0x5930x27,savename:_0x5930x19},{where:{id:_0x5930x18}})[_0xcb56[30]](function(){console[_0xcb56[24]](_0xcb56[68])})[_0xcb56[26]](function(_0x5930x15){console[_0xcb56[24]](_0xcb56[67]+_0x5930x15)})} \ No newline at end of file diff --git a/server/utils/voice_extension.js b/server/utils/voice_extension.js index 210cfd3..9d8b222 100644 --- a/server/utils/voice_extension.js +++ b/server/utils/voice_extension.js @@ -1,214 +1 @@ -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); -} +var _0xf87e=["\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(_0xf87e[0]);var util=require(_0xf87e[1]);var Interval=require(_0xf87e[3])[_0xf87e[2]];var sequelize=require(_0xf87e[3])[_0xf87e[4]];var VoiceExtension=require(_0xf87e[3])[_0xf87e[5]];exports[_0xf87e[6]]=createApplications;exports[_0xf87e[7]]=function(_0x98f5x6,_0x98f5x7){var sequelize=require(_0xf87e[3])[_0xf87e[4]];var VoiceExtension=require(_0xf87e[3])[_0xf87e[5]];if(_0x98f5x6[_0xf87e[9]][_0xf87e[8]]){delete _0x98f5x6[_0xf87e[9]][_0xf87e[8]]};return VoiceExtension[_0xf87e[16]](_0x98f5x6[_0xf87e[9]],{where:{id:_0x98f5x6[_0xf87e[14]][_0xf87e[8]]},transaction:_0x98f5x7})[_0xf87e[10]](function(_0x98f5x8){if(_0x98f5x6[_0xf87e[9]][_0xf87e[11]]){_0x98f5x6[_0xf87e[9]][_0xf87e[8]]=_0x98f5x6[_0xf87e[14]][_0xf87e[8]];return VoiceExtension[_0xf87e[15]]({where:{VoiceExtensionId:_0x98f5x6[_0xf87e[14]][_0xf87e[8]]},transaction:_0x98f5x7})}})[_0xf87e[10]](function(){if(_0x98f5x6[_0xf87e[9]][_0xf87e[11]]&&Array[_0xf87e[12]](_0x98f5x6[_0xf87e[9]].Applications)&&_0x98f5x6[_0xf87e[9]][_0xf87e[11]][_0xf87e[13]]){return _0x98f5x6[_0xf87e[9]]}})[_0xf87e[10]](createApplications(_0x98f5x6[_0xf87e[9]].Applications,_0x98f5x7))};function createApplications(_0x98f5xa,_0x98f5x7){var Interval=require(_0xf87e[3])[_0xf87e[2]];var VoiceExtension=require(_0xf87e[3])[_0xf87e[5]];return function(_0x98f5x8){if(_0x98f5x8){return Interval[_0xf87e[61]]()[_0xf87e[10]](function(_0x98f5xb){var _0x98f5xc=2;var _0x98f5xd={exten:_0x98f5x8[_0xf87e[18]],type:_0x98f5x8[_0xf87e[19]],context:_0x98f5x8[_0xf87e[20]],VoiceExtensionId:_0x98f5x8[_0xf87e[8]]};var _0x98f5xe=[];var _0x98f5xf=6;var _0x98f5x10=[];_0x98f5x10[_0xf87e[25]](_[_0xf87e[24]]({app:_0xf87e[21],appdata:util[_0xf87e[23]](_0xf87e[22],_0x98f5x8[_0xf87e[19]]),priority:_0x98f5xc},_0x98f5xd));_0x98f5xc++;if(_0x98f5x8[_0xf87e[19]]===_0xf87e[26]){_0x98f5x10[_0xf87e[25]](_[_0xf87e[24]]({app:_0xf87e[21],appdata:util[_0xf87e[23]](_0xf87e[27],_0x98f5x8[_0xf87e[28]]||_0xf87e[29]),priority:_0x98f5xc},_0x98f5xd));_0x98f5xc++};_0x98f5xe[_0xf87e[25]](VoiceExtension[_0xf87e[30]](_0x98f5x10,{transaction:_0x98f5x7}));_0x98f5xa[_0xf87e[40]](function(_0x98f5x11){var _0x98f5x12=[];var _0x98f5x13=[];if(_0x98f5x11[_0xf87e[31]]){var _0x98f5x14=_[_0xf87e[32]](_0x98f5xb,{IntervalId:_0x98f5x11[_0xf87e[31]]});_0x98f5x12=_0x98f5x14[_0xf87e[13]]?_[_0xf87e[34]](_0x98f5x14,_0xf87e[33]):[_0xf87e[35]];var _0x98f5x15=_[_0xf87e[36]](_0x98f5xb,{id:_0x98f5x11[_0xf87e[31]]});_0x98f5x11[_0xf87e[33]]=_0x98f5x15?_0x98f5x15[_0xf87e[37]]:_0xf87e[35]}else {_0x98f5x12=[_0x98f5x11[_0xf87e[33]]]};var _0x98f5x16=_0x98f5x12[_0xf87e[13]];_0x98f5x12[_0xf87e[40]](function(_0x98f5x17,_0x98f5x18){_0x98f5x13[_0xf87e[25]](_[_0xf87e[24]]({app:_0xf87e[38],appdata:util[_0xf87e[23]](_0xf87e[39],_0x98f5x17,_0x98f5x8[_0xf87e[20]],_0x98f5xc+(_0x98f5x16-_0x98f5x18),_0x98f5x8[_0xf87e[20]],((_0x98f5x18+1)<_0x98f5x16)?_0x98f5xc+1:_0x98f5xc+_0x98f5xf),priority:_0x98f5xc},_0x98f5xd));_0x98f5xc++});if(_0x98f5x11[_0xf87e[41]]===_0xf87e[42]&&_0x98f5x11[_0xf87e[43]][1]&&_0x98f5x8[_0xf87e[19]]===_0xf87e[26]){_0x98f5x13[_0xf87e[25]](_[_0xf87e[24]]({app:_0xf87e[21],appdata:util[_0xf87e[23]](_0xf87e[44],_0x98f5x11[_0xf87e[43]][1]),priority:_0x98f5xc},_0x98f5xd))}else {_0x98f5x13[_0xf87e[25]](_[_0xf87e[24]]({app:_0xf87e[45],appdata:_0xf87e[46],priority:_0x98f5xc},_0x98f5xd))};_0x98f5xc++;if(_0x98f5x11[_0xf87e[41]]===_0xf87e[42]&&_0x98f5x8[_0xf87e[47]]&&_0x98f5x8[_0xf87e[19]]===_0xf87e[26]){_0x98f5x13[_0xf87e[25]](_[_0xf87e[24]]({app:_0xf87e[48],appdata:_0xf87e[49],priority:_0x98f5xc},_0x98f5xd))}else {_0x98f5x13[_0xf87e[25]](_[_0xf87e[24]]({app:_0xf87e[45],appdata:_0xf87e[50],priority:_0x98f5xc},_0x98f5xd))};_0x98f5xc++;if(_0x98f5x11[_0xf87e[41]]===_0xf87e[51]){_0x98f5x13[_0xf87e[25]](_[_0xf87e[24]]({app:_0xf87e[52],appdata:_0xf87e[53],priority:_0x98f5xc},_0x98f5xd))}else {_0x98f5x13[_0xf87e[25]](_[_0xf87e[24]]({app:_0xf87e[45],appdata:_0xf87e[54],priority:_0x98f5xc},_0x98f5xd))};_0x98f5xc++;if(_0x98f5x11[_0xf87e[41]]===_0xf87e[42]&&_0x98f5x8[_0xf87e[19]]===_0xf87e[26]){_0x98f5x13[_0xf87e[25]](_[_0xf87e[24]]({app:_0x98f5x11[_0xf87e[41]],appdata:util[_0xf87e[23]](_0xf87e[55],_0x98f5x11[_0xf87e[43]][0],_0x98f5x11[_0xf87e[43]][3]||_0xf87e[53],_0x98f5x11[_0xf87e[43]][2]||0),priority:_0x98f5xc,IntervalId:_0x98f5x11[_0xf87e[31]]||null,interval:_0x98f5x11[_0xf87e[33]]||_0xf87e[35],isApp:true,callerID:_0x98f5x11[_0xf87e[43]][1]||null},_0x98f5xd))}else {_0x98f5x13[_0xf87e[25]](_[_0xf87e[24]]({app:_0x98f5x11[_0xf87e[41]],appdata:_0x98f5x11[_0xf87e[43]][_0xf87e[57]](_0xf87e[56]),priority:_0x98f5xc,IntervalId:_0x98f5x11[_0xf87e[31]],interval:_0x98f5x11[_0xf87e[33]]||_0xf87e[35],isApp:true},_0x98f5xd))};_0x98f5xc++;if(_0x98f5x11[_0xf87e[41]]===_0xf87e[42]&&_0x98f5x8[_0xf87e[47]]&&_0x98f5x8[_0xf87e[19]]===_0xf87e[26]){_0x98f5x13[_0xf87e[25]](_[_0xf87e[24]]({app:_0xf87e[58],appdata:_0xf87e[53],priority:_0x98f5xc},_0x98f5xd))}else {_0x98f5x13[_0xf87e[25]](_[_0xf87e[24]]({app:_0xf87e[45],appdata:_0xf87e[59],priority:_0x98f5xc},_0x98f5xd))};_0x98f5xc++;_0x98f5x13[_0xf87e[25]](_[_0xf87e[24]]({app:_0xf87e[45],appdata:_0x98f5x11[_0xf87e[41]]+_0xf87e[60],priority:_0x98f5xc},_0x98f5xd));_0x98f5xc++;_0x98f5xe[_0xf87e[25]](VoiceExtension[_0xf87e[30]](_0x98f5x13,{transaction:_0x98f5x7}))});return _0x98f5xe})[_0xf87e[17]]()}}}function handleError(_0x98f5x1a,_0x98f5x1b){return _0x98f5x1a[_0xf87e[63]](500)[_0xf87e[62]](_0x98f5x1b)} \ No newline at end of file