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,WAAY,KACZ,UAAW,KACX,aAAc,KACd,OAAQ,KACR,UAAW,KACX,OAAQ,IACR,UAAW,IACX,OAAQ,KACR,YAAa,KACb,eAAgB,KAChB,UAAW,KACX,OAAQ,KACR,UAAW,KACX,aAAc,KACd,gBAAiB,KACjB,OAAQ,IACR,UAAW,IACX,UAAW,KACX,aAAc,KACd,UAAW,IACX,aAAc,IACd,UAAW,KACX,aAAc,KACd,UAAW,KACX,aAAc,MAIf,SAAS8uB,EAAeC,GACvB,IAAInwB,EAAKowB,EAAsBD,GAC/B,OAAOE,EAAoBrwB,EAC5B,CACA,SAASowB,EAAsBD,GAC9B,IAAIE,EAAoBhB,EAAEjuB,EAAK+uB,GAAM,CACpC,IAAIngB,EAAI,IAAIsgB,MAAM,uBAAyBH,EAAM,KAEjD,MADAngB,EAAEud,KAAO,mBACHvd,CACP,CACA,OAAO5O,EAAI+uB,EACZ,CACAD,EAAejyB,KAAO,WACrB,OAAOD,OAAOC,KAAKmD,EACpB,EACA8uB,EAAehL,QAAUkL,EACzBlpB,EAAOqpB,QAAUL,EACjBA,EAAelwB,GAAK,I,qBCvSpB,EAAQ,KAAR,CAA0E,EAAQ,I,qBCAlF,EAAQ,KAAR,CAA0E,EAAQ,M,uBCAlF,EAAQ,KAAR,CAA0E,EAAQ,K,uBCAlF,EAAQ,KAAR,CAA0E,EAAQ,K,uBCAlF,EAAQ,KAAR,CAA0E,EAAQ,M,uBCAlF,EAAQ,KAAR,CAA0E,EAAQ,M,iBCAlFkH,EAAOqpB,QAAU,iL,mBCAjBrpB,EAAOqpB,QAAU,+S,kBCAjBrpB,EAAOqpB,QAAU,kgD,kBCAjBrpB,EAAOqpB,QAAU,4vB,mBCAjBrpB,EAAOqpB,QAAU,uF,mBCAjBrpB,EAAOqpB,QAAU,uF","sources":["webpack://evalarmjs/../share/app/javascript/ng/resource.js","webpack://evalarmjs/../share/app/javascript/ng/resty-factory.js","webpack://evalarmjs/../share/app/javascript/ng/setup-schema.js","webpack://evalarmjs/../share/app/javascript/ng/init.js","webpack://evalarmjs/../share/app/javascript/directives/eva-enum.js","webpack://evalarmjs/../share/app/javascript/directives/eva-filter-block.js","webpack://evalarmjs/../share/app/javascript/services/array-utils.js","webpack://evalarmjs/../share/app/javascript/directives/eva-sync-list.js","webpack://evalarmjs/../share/app/javascript/directives/eva-restore-form.js","webpack://evalarmjs/../share/app/javascript/directives/ng-ajax.js","webpack://evalarmjs/../share/app/javascript/directives/ng-pagination.js","webpack://evalarmjs/../share/app/javascript/directives/ng-popup.js","webpack://evalarmjs/../share/app/javascript/services/truncate.js","webpack://evalarmjs/../share/app/javascript/directives/eva-phone-link.js","webpack://evalarmjs/../share/app/javascript/repositories/country.js","webpack://evalarmjs/../share/app/javascript/repositories/user.js","webpack://evalarmjs/../share/app/javascript/ng/services/i18n.js","webpack://evalarmjs/../share/app/javascript/ng/services/view-mode.js","webpack://evalarmjs/../share/app/javascript/templates/index.js","webpack://evalarmjs/../share/app/javascript/templates/eva-view-popup.html","webpack://evalarmjs/../share/app/javascript/angular.js","webpack://evalarmjs/../share/app/javascript/directives/eva-location-logo.js","webpack://evalarmjs/../share/app/javascript/directives/eva-t-attr.js","webpack://evalarmjs/../share/app/javascript/ng/services/eva-uploader.js","webpack://evalarmjs/../share/app/javascript/ng/services/utils.js","webpack://evalarmjs/../share/app/javascript/directives/ng-tooltip.js","webpack://evalarmjs/../share/app/javascript/directives/ng-variants.js","webpack://evalarmjs/../share/app/javascript/directives/eva-react-form.js","webpack://evalarmjs/../share/app/javascript/directives/eva-location-limits.js","webpack://evalarmjs/../share/app/javascript/ng/services/ng-resource-filter.js","webpack://evalarmjs/../share/app/javascript/services/listFilterFactory.js","webpack://evalarmjs/../share/app/javascript/components/file-upload.js","webpack://evalarmjs/../share/app/javascript/components/modal.js","webpack://evalarmjs/../share/app/javascript/components/pagination.js","webpack://evalarmjs/../share/app/javascript/components/tooltip.js","webpack://evalarmjs/../share/app/javascript/services/api.js","webpack://evalarmjs/../share/app/javascript/services/confirm.js","webpack://evalarmjs/../share/app/javascript/services/createReactRoot.js","webpack://evalarmjs/../share/app/javascript/services/forms.js","webpack://evalarmjs/../share/app/javascript/services/i18n.js","webpack://evalarmjs/../share/app/javascript/services/person-role.js","webpack://evalarmjs/../share/app/javascript/services/rails-fetch.js","webpack://evalarmjs/../share/app/javascript/services/time.js","webpack://evalarmjs/../share/app/javascript/services/toastr.js","webpack://evalarmjs/../share/app/javascript/services/utils.js","webpack://evalarmjs/../../shared/node_modules/moment/locale/ sync ^\\.\\/.*$","webpack://evalarmjs/../share/app/javascript/directives/eva-nullify.js","webpack://evalarmjs/../share/app/javascript/directives/eva-view-popup.js","webpack://evalarmjs/../share/app/javascript/directives/ng-filter-form.js","webpack://evalarmjs/../share/app/javascript/directives/ng-numeric.js","webpack://evalarmjs/../share/app/javascript/repositories/lang.js","webpack://evalarmjs/../share/app/javascript/repositories/role.js","webpack://evalarmjs/../share/app/javascript/directives/eva-nullify.js?16ba","webpack://evalarmjs/../share/app/javascript/directives/eva-view-popup.js?3b8a","webpack://evalarmjs/../share/app/javascript/directives/ng-filter-form.js?8b14","webpack://evalarmjs/../share/app/javascript/directives/ng-numeric.js?4fc6","webpack://evalarmjs/../share/app/javascript/repositories/lang.js?fb5b","webpack://evalarmjs/../share/app/javascript/repositories/role.js?b788"],"sourcesContent":["import { fetchList, fetchPage, fetchOne } from '../services/api'\nimport { camelize } from '../services/utils'\nimport pluralize from 'pluralize'\n\nconst setNestedResourceCount = (resource, route, total) => {\n resource[`$${camelize(route)}Count`] = total;\n}\n\nconst updateResource = (resource, data) => {\n let route = pluralize(resource.route, 2);\n Object.keys(window.EVA.schema[route]).forEach(key => resource[key] = data[key])\n window.app.schema.processes.$handle(resource, resource.route);\n return resource;\n}\n\nexport default class {\n isA(route) {\n return this.route === route;\n }\n\n loadNestedResources(route, config) {\n return fetchList(`${this.itemPath()}/${route}`, route, config).then(list => {\n this[`$${camelize(route)}`] = list;\n setNestedResourceCount(this, route, list.$meta.total || list.length);\n return list;\n });\n }\n\n loadNestedResourcesCount(route) {\n return fetchPage(`${this.itemPath()}/${route}`, route, { page: 1, per_page: 1 }).then(({ total, list }) => {\n setNestedResourceCount(this, route, total || list.length);\n return this;\n });\n }\n\n reload(url) {\n return fetchOne(url || this.itemPath(), this.route, pluralize(this.route, 1)).then(data => updateResource(this, data));\n }\n\n applyChanges(data) {\n updateResource(this, data);\n }\n\n itemPath() {\n return this.$meta && this.$meta.$path || `/${this.route}/${id}`;\n }\n}\n","import { fetchListByIds, fetchList, fetchOne, fetchPage } from '../services/api'\nimport { findById } from '../services/utils'\nimport pluralize from 'pluralize'\n\n// per page is expected to be 25\n// (but it's dangerous assumption should be removed from system)\nconst preparePaginationOptions = (page = 1, configs = {}) => Object.assign({ page: page, per_page: 25 }, configs);\n\nclass Resty {\n constructor(route, namespace) {\n this.$route = route;\n this.namespace = namespace;\n this.endpoint = namespace ? `/${namespace}/${route}` : `/${route}`;\n }\n\n fetchList(config = {}) {\n return fetchList(this.endpoint, this.$route, config);\n }\n\n getList(...args) {\n return this.fetchList(...args);\n }\n\n fetchOne(id, key = null) {\n return fetchOne(`${this.endpoint}/${id}`, this.$route, key || pluralize(this.$route, 1));\n }\n\n page(page, config) {\n return fetchPage(this.endpoint, this.$route, preparePaginationOptions(page, { per_page: 25, ...config })).then(({ list }) => list, Promise.reject);\n }\n\n getListByIds(ids) {\n return fetchListByIds(this.endpoint, this.$route, ids);\n }\n\n loadListBelongsTo(slaveList, property, idProperty) {\n let ids = slaveList.map(r => r[idProperty]);\n return this.getListByIds(ids).then(masterList => {\n let attrName = `$${property}`;\n slaveList.forEach(slave => slave[attrName] = findById(masterList, slave[idProperty], null));\n return slaveList;\n });\n }\n\n nestedPage(resource, page, options) {\n return resource.getList(this.route(), preparePaginationOptions(page, options));\n }\n\n tableList(...args) {\n return this.page(...args);\n }\n\n route() {\n return this.$route;\n }\n}\n\nexport default (route, ...rest) => {\n let namespace, callback;\n\n if ((rest.length === 1) && (typeof rest[0] === 'function')) {\n callback = rest[0];\n } else {\n namespace = rest[0], callback = rest[1];\n }\n\n let service = new Resty(route, namespace);\n\n if (callback) callback(service);\n\n return service;\n}\n","import each from 'lodash-es/each'\nimport reduce from 'lodash-es/reduce'\nimport isObject from 'lodash-es/isObject'\nimport map from 'lodash-es/map'\nimport omit from 'lodash-es/omit'\nimport isNumber from 'lodash-es/isNumber'\nimport {\n findById, filterDeleted,\n sortBySortKeyName, sortBySortKeyTAttr, sortByFullName, toName\n} from '../services/utils'\nimport Resource from './resource'\nimport RestyFactory from './resty-factory'\n\nvar uuid = 0;\nconst getUUID = () => {\n uuid = uuid + 1;\n return uuid;\n}\n\nconst EDITABLE_MIMETYPES = ['application/pdf', 'image/png', 'image/jpeg'];\n\nconst capitalizeKey = str => str.slice(0, 1).toUpperCase() + str.slice(1);\n\nconst assignAlarmTypeMarkers = (holder, id) => {\n // $isEvacuation, $isSos, $isTech, $isSw\n Object.entries(window.EVA.enums.alarmTypes).forEach(([key, testId]) =>\n holder[`$is${capitalizeKey(key)}`] = id === testId);\n}\n\nconst sortAttachments = (a, b) => b.updatedAt - a.updatedAt;\n\nconst mapAlarmDetails = alarm => {\n assignAlarmTypeMarkers(alarm, alarm.alarmTypeId);\n\n alarm.$isActive = alarm.currentStatus < 3;\n alarm.$isInfo = alarm.currentStatus === 5;\n alarm.initiator.$name = toName(alarm.initiator.firstName, alarm.initiator.lastName);\n\n let entities = alarm.encapsulatedEntities;\n alarm.$alarmType = app.schema.normalize(entities.alarm_type, 'alarm_types');\n alarm.$alarmLevels = app.schema.normalizeList(entities.alarm_levels, 'alarm_levels');\n alarm.$alarmLevelHistory = alarm.alarmLevelsHistory.reduce((acc, item) => {\n let base = {\n onCreation: item.createdAt === alarm.createdAt,\n createdAt: item.createdAt,\n userInfo: item.userInfo || item.userName // external alarms don't have userInfo for now\n };\n item.alarmLevelIds.forEach(id => {\n let $alarmLevel = findById(alarm.$alarmLevels, id, null);\n if ($alarmLevel) {\n acc.push({ ...base, $alarmLevel });\n }\n });\n return acc;\n }, []);\n\n\n alarm.$buildingSectors = app.schema.normalizeList(entities.building_sectors, 'building_sectors');\n alarm.$buildingSectors.sort(sortBySortKeyName);\n\n alarm.$alarmSectors = app.schema.normalizeList(entities.alarm_sectors, 'alarm_sectors');\n alarm.$alarmSectors.sort(sortBySortKeyName);\n\n alarm.$roomSectors = app.schema.normalizeList(entities.room_sectors, 'room_sectors');\n alarm.$roomSectors.sort(sortBySortKeyName);\n\n alarm.statuses.forEach(status => {\n status.$kind = { 2: 'confirm', 3: 'cancel', 4: 'stop' }[status.value];\n status.initiator.$name = toName(status.initiator.firstName, status.initiator.lastName);\n });\n\n let answersMap = alarm.infoItems.reduce((acc, item) => {\n acc[item.id] = item.answers;\n return acc;\n }, {});\n // a workaround as sometimes external alarms don't have info items\n alarm.$infoItems = (entities.info_items || []).map(data => {\n let item = app.schema.normalize(data, 'info_items');\n item.$answers = (answersMap[item.id] || []).map((answer) => {\n answer.onCreation = answer.createdAt === alarm.createdAt;\n return answer;\n });\n return item;\n });\n\n let [$templateAttachment, $attachments] = alarm.attachments.reduce((acc, at) => {\n at.$isEditable = EDITABLE_MIMETYPES.includes(at.mimetype);\n if (['custom', 'external'].includes(at.kind)) {\n acc[1].push(at);\n } else if (at.kind === 'alarm_type') {\n acc[0] = at;\n }\n return acc;\n }, [null, []]);\n\n alarm.$templateAttachment = $templateAttachment;\n alarm.$attachments = $attachments.sort(sortAttachments);\n}\n\nconst mapContactList = (acc, data, contactsData) => {\n let list = app.schema.normalize(data, 'contact_lists');\n if (filterDeleted(list)) {\n list.$allContacts = app.schema.normalizeList(contactsData, 'contacts').filter(filterDeleted);\n list.$allContacts.sort(sortByFullName);\n list.$allContactsCount = list.$allContacts.length;\n acc[0].push(list);\n acc[1] = acc[1] + list.$allContactsCount;\n }\n return acc;\n}\n\nexport default app => {\n app.factory('Resty', () => RestyFactory);\n\n // holds all resource schemas\n let schema = {\n utils: { name: toName },\n defaults: {},\n\n mixins: {},\n extendMixins: function(changes) {\n var mixins = this.mixins;\n each(changes, function(custom, key) {\n if(mixins.hasOwnProperty(key)) {\n mixins[key] = Object.assign({}, mixins[key], custom);\n } else {\n mixins[key] = custom;\n }\n });\n },\n\n processes: {\n $handle: function(resource, type) {\n each(this[type], function(process) { process(resource); });\n }\n },\n extendProcesses: function(changes) {\n var processes = this.processes;\n each(changes, function(custom, key) {\n if(processes.hasOwnProperty(key)) {\n processes[key].push(custom);\n } else {\n processes[key] = [custom];\n }\n });\n },\n\n collectionProcesses: {},\n extendCollectionProcesses: function(changes) {\n var processes = this.collectionProcesses;\n each(changes, function(custom, key) {\n if(processes.hasOwnProperty(key)) {\n processes[key].push(custom);\n } else {\n processes[key] = [custom];\n }\n });\n }\n };\n\n let endsWith = (str, suffix) => str.indexOf(suffix, str.length - suffix.length) !== -1;\n\n var prepareValue = function(key, value) {\n if(endsWith(key, \"At\") && isNumber(value))\n // time value(add to unix timestamp nanoseconds fraction)\n return value * 1000;\n else\n return value;\n }\n\n // convert original output to defined schema\n var nextLevel = function(prevLevel, key) { if(prevLevel) return prevLevel[key]; }\n var applySchema = function(schema, source) {\n var resource = reduce(schema, function(result, path, key) {\n if(key == \"$nodes\") return result;\n let value = reduce(path, nextLevel, source);\n result[key] = prepareValue(key, value);\n return result;\n }, new Resource());\n\n if(schema.$nodes) {\n each(schema.$nodes, function(nodeSchema, nodeKey) {\n var source = resource[nodeKey];\n\n if(Array.isArray(source)) {\n resource[nodeKey] = map(source, nodeSource => applySchema(nodeSchema, nodeSource));\n } else if(isObject(source)) {\n resource[nodeKey] = applySchema(nodeSchema, source);\n }\n });\n }\n\n return resource;\n }\n\n schema.normalize = (source, route) => {\n let resource = window.EVA.schema[route] ? applySchema(window.EVA.schema[route], source) : source;\n resource.$uuid = getUUID();\n resource.route = route;\n Object.assign(resource, schema.mixins[route]);\n schema.processes.$handle(resource, route);\n return resource;\n }\n\n schema.normalizeList = (list, route) => {\n let result = (list || []).map(item => schema.normalize(item, route));\n let processings = schema.collectionProcesses[route] || [];\n processings.forEach(process => process(result));\n return result;\n }\n\n schema.normalizeCollection = (source, route, key = route) => {\n let collection = schema.normalizeList(source[key], route);\n schema.meta(collection, source, key);\n return collection;\n }\n\n schema.meta = (holder, source, key) => holder.$meta = omit(source, key);\n\n schema.extendProcesses({\n alarms(alarm) {\n mapAlarmDetails(alarm);\n let entities = alarm.encapsulatedEntities;\n\n let [contactLists, allContactsCount] = (entities.contact_lists || []).reduce(\n (acc, data) => mapContactList(acc, data, [].concat(data.contacts, data.users, data.sector_insiders)), [[], 0]);\n\n alarm.$contactLists = contactLists.filter(item => item.$allContactsCount !== 0);\n alarm.$allContactsCount = allContactsCount;\n\n // status == 1 || 2\n if (alarm.$isSos) {\n alarm.$isHandled = (alarm.currentStatus == 4);\n alarm.$location = (alarm.infoItems[0] || { answers: [{}] }).answers[0].answer;\n alarm.handle = value => alarm.$isHandled = value;\n }\n alarm.$massStopAllowed = alarm.$alarmType.prioKey === 3 && alarm.$isActive;\n },\n alarm_types(alarmType) {\n alarmType.$isAlarm = alarmType.category == 'alarm';\n alarmType.$isInfo = alarmType.category == 'info';\n assignAlarmTypeMarkers(alarmType, alarmType.id);\n // a mobile client has a separated UI or used by API internally\n alarmType.$isTechical = alarmType.$isSw || alarmType.$isTech;\n alarmType.$isSpecific = alarmType.$isSos || alarmType.$isTechical;\n },\n confirmations(confirmation) {\n confirmation.$name = toName(confirmation.firstName, confirmation.lastName);\n },\n contacts(contact) {\n contact.$name = toName(contact.firstName, contact.lastName);\n },\n contact_lists(contactList) {\n contactList.$allContactsCount = contactList.contactsCount + contactList.usersCount + contactList.sectorInsidersCount;\n },\n external_alarms(alarm) {\n mapAlarmDetails(alarm);\n\n let entities = alarm.encapsulatedEntities;\n alarm.$location = schema.normalize(entities.source_origin, 'locations');\n\n let [contactLists, allContactsCount] = entities.contact_lists.reduce((acc, data) =>\n mapContactList(acc, data, [].concat(data.external_contacts, data.internal_contacts)), [[], 0]);\n\n alarm.$contactLists = contactLists;\n alarm.$allContactsCount = allContactsCount;\n },\n info_items(infoItem) {\n // convert multi list:\n // { en: [en_item1, en_item2, en_item3], de: [de_item1, de_item2, de_item3]}\n // =>\n // [{en: en_item1, de: de_item1}, {en: en_item2, de: de_item2}, {en: en_item3, de: de_item3} ]\n infoItem.answers = Object.entries(infoItem.answers).reduce((acc, [locale, list]) => {\n list.forEach((item, i) => {\n if (!acc[i]) {\n acc[i] = {};\n }\n acc[i][locale] = item;\n });\n return acc;\n }, []);\n },\n route_maps(routeMap) {\n routeMap.$isBackFileExists = !!(routeMap.backUploadedAt || routeMap.backSource);\n },\n tasks(task) {\n task.$type = window.EVA.enums.taskTypes[task.type];\n task.$scanType = window.EVA.enums.taskScanTypes[task.scanType];\n }\n });\n\n schema.extendMixins({\n countries: {\n isDefault() {\n return this.id == 'de';\n }\n },\n documents: {\n downloadFilePath(l, appId = null) {\n var acc = ['/documents'];\n if (appId !== null) {\n acc.push(appId)\n }\n acc.push(this.id, l, 'file');\n return `${acc.join('/')}?cb=${this.updatedAt}`;\n }\n },\n external_unit_types: {\n isDefault() {\n return this.id == '0000000001';\n }\n }\n });\n\n schema.extendProcesses({\n evacuation_users(user) {\n user.$name = toName(user.firstName, user.lastName);\n },\n users(user) {\n user.$name = toName(user.firstName, user.lastName);\n }\n });\n\n let multiLangSortFactory = (attr) => (list) => list.sort((a, b) => sortBySortKeyTAttr(a, b, attr));\n schema.extendCollectionProcesses({\n alarm_types: multiLangSortFactory('name'),\n alarm_levels: multiLangSortFactory('name'),\n info_items: multiLangSortFactory('question')\n });\n\n return schema;\n}\n","import 'script-loader!angular/angular.min'\nimport 'angular-file-upload'\nimport 'angular-loading-bar'\nimport pluralize from 'pluralize'\nimport setupSchema from './setup-schema'\nimport pick from 'lodash-es/pick'\nimport { I18n } from '../services/i18n'\n\nconst app = window.angular.module('App', ['cfp.loadingBar', 'angularFileUpload']);\n\napp.init = () => {\n const injector = window.angular.injector(['ng', 'App']);\n app.get = name => injector.get(name);\n if(!gon.app) return;\n\n $(() => window.angular.bootstrap(document.body, ['App']));\n};\n\napp.run(['$rootScope', $rootScope => {\n Object.assign($rootScope, pick(window, 'Routes'));\n $rootScope.I18n = I18n;\n $rootScope.pluralize = pluralize;\n $rootScope.$closeWindow = () => window.close();\n}]);\n\napp.cacheTemplates = list => {\n app.run(['$templateCache', $cache => {\n Object.keys(list).forEach(name => $cache.put(`/ng/${name}.html`, list[name]));\n }]);\n};\n\nwindow.app = app;\n\napp.schema = setupSchema(app);\n\nexport default app;\n","const getEnum = (dict, value) => {\n let item = dict.find(tuple => tuple[1] == value);\n if (item) return item[0];\n}\n\nexport default () => ({\n restrict: 'A',\n scope: { value: '=evaEnum' },\n link(scope, element, attrs) {\n let dict = JSON.parse(attrs.evaEnumDict);\n element.text(getEnum(dict, scope.value));\n scope.$watch('value', (value) => element.text(getEnum(dict, value)));\n }\n});\n","import { mapByIds } from '../services/utils'\n\nclass Cache {\n get(key) {\n if (!this.hasOwnProperty(key)) this[key] = [];\n return this[key]\n }\n\n reset(key) {\n this.get(key).length = 0;\n }\n}\n\nexport default () => ({\n transclude: 'element',\n scope: { config: '=evaFilterBlock' },\n link($scope, $element, $attrs, ctrl, transclude) {\n var config = $scope.config;\n\n $scope.config.dict().then(dict => {\n transclude((node, $scope) => {\n $scope.dict = dict;\n var filters = $scope.filters = config.filters;;\n $scope.config = config;\n var cache = new Cache();\n\n $scope.reset = (...keys) => keys.forEach(key => {\n cache.reset(key);\n delete filters[key]\n });\n\n $scope.isInit = key => !filters.hasOwnProperty(key);\n\n $scope.isFilterInclude = (key, value) =>\n filters.hasOwnProperty(key) && filters[key].includes(value);\n\n $scope.selectedSeria = (key, list) => {\n var result = cache.get(key);\n if (result.length === 0) {\n result.splice(0, 0, ...mapByIds(list, filters[key]));\n }\n return result;\n }\n\n $scope.toggleFilterItem = (key, value) => {\n cache.reset(key);\n\n var list = filters[key];\n if (!list) {\n filters[key] = [value];\n return;\n }\n\n var i = list.indexOf(value);\n if (i === -1) {\n list.push(value);\n return;\n }\n\n if (list.length === 1) {\n delete filters[key];\n } else {\n list.splice(i, 1);\n }\n }\n\n var $body = $('body');\n node.on('click', '[eva-filter-button]', e => {\n e.stopPropagation();\n\n if (node.hasClass('open')) {\n config.callback();\n node.removeClass('open');\n $body.off('click.evaFilterBlock');\n } else {\n node.addClass('open');\n $('body').on('click.evaFilterBlock', e => {\n var $target = $(e.target);\n if ($target.parents().index(node[0]) >= 0) return;\n\n config.callback();\n node.removeClass('open');\n $body.off('click.evaFilterBlock');\n });\n }\n });\n\n $element.after(node)\n });\n });\n }\n});\n","export const deleteItem = (list, item) => {\n let i = list.indexOf(item);\n if (i !== -1) list.splice(i, 1);\n return list;\n}\n\nexport const replaceBy = (left, right) => {\n left.length = 0;\n left.push(...right);\n}\n","import pluck from 'lodash-es/map'\nimport { deleteItem, replaceBy } from '../services/array-utils'\n\nconst defaultValidation = () => true;\nconst getCandidates = (dictionary, selected) => {\n var uuids = pluck(selected, '$uuid');\n return dictionary.reduce((result, item) => {\n if (!uuids.includes(item.$uuid)) result.push(item);\n return result;\n }, []);\n}\n\nexport default () => ({\n transclude: 'element',\n replace: true,\n scope: { selected: \"=\", dictionary: \"=\", filters: \"=\" },\n controller: [\"$scope\", \"pageFromArray\", \"$attrs\", function ($scope, paginate, $attrs) {\n var selected = $scope.selected,\n candidates = getCandidates($scope.dictionary, selected);\n\n var selectedPageNumber = 1, candidatePageNumber = 1,\n paginateSelected, paginateCandidate;\n\n if ($attrs.validate) {\n $scope.isValid = $scope.$parent[$attrs.validate];\n var invalidSelected = selected.filter((resource) => !$scope.isValid(resource, 'init'));\n invalidSelected.forEach(resource => {\n deleteItem(selected, resource);\n candidates.unshift(resource);\n });\n } else {\n $scope.isValid = defaultValidation;\n }\n\n $scope.updateSelectedPage = function (page) {\n selectedPageNumber = page;\n $scope.selectedPage = paginateSelected(page);\n }\n\n $scope.updateCandidatePage = function (page) {\n candidatePageNumber = page;\n $scope.candidatePage = paginateCandidate(page);\n }\n\n if ($scope.filters) {\n $scope.sfilter = $scope.cfilter = $scope.filters[0];\n $scope.$watch(\"sfilter\", () => $scope.updateSelectedPage(1));\n $scope.$watch(\"cfilter\", () => $scope.updateCandidatePage(1));\n\n paginateSelected = function (page) {\n var $$selected = $scope.sfilter.apply(selected);\n return paginate($$selected, page);\n }\n paginateCandidate = function (page) {\n var $$candidates = $scope.cfilter.apply(candidates);\n return paginate($$candidates, page);\n }\n } else {\n paginateSelected = function (page) {\n return paginate(selected, page);\n }\n paginateCandidate = function (page) {\n return paginate(candidates, page);\n }\n }\n\n var refreshPages = function () {\n $scope.updateSelectedPage(selectedPageNumber);\n $scope.updateCandidatePage(candidatePageNumber);\n }\n\n $scope.moveResource = function (resource) {\n if (selected.includes(resource)) {\n candidates.push(resource);\n deleteItem(selected, resource);\n } else {\n selected.push(resource);\n deleteItem(candidates, resource);\n }\n refreshPages();\n }\n\n $scope.movePage = function (page) {\n if (page == $scope.selectedPage) {\n page = page.filter(r => $scope.isValid(r, 'reject'));\n candidates.push(...page);\n page.forEach(resource => deleteItem(selected, resource));\n } else {\n page = page.filter(r => $scope.isValid(r, 'select'));\n selected.push(...page);\n page.forEach(resource => deleteItem(candidates, resource));\n }\n refreshPages();\n }\n\n $scope.$watchCollection(\"dictionary\", function (dictionary) {\n replaceBy(candidates, getCandidates(dictionary, selected));\n refreshPages();\n });\n\n $scope.$watchCollection(\"selected\", function () {\n refreshPages();\n });\n\n refreshPages();\n }],\n link: function ($scope, $element, $attrs, ctrl, transcludeFn) {\n transcludeFn($scope, clone => $element.after(clone));\n }\n});\n","import { I18n } from '../services/i18n'\nimport confirm from '../services/confirm'\nimport { commit } from '../services/rails-fetch'\n\nexport default ['utils', utils => ({\n link($scope, $element, $attrs) {\n $element.on('ajax:formErrors', (e, xhr) => {\n let errors = (xhr.errors.resource || []);\n if (!errors.includes('deleted')) return;\n let message = I18n.t('ui.eva_restore_form.message', { email: $scope.form.email });\n\n confirm(message, { size: 'md' }).then(() => {\n utils.startLoadingBar();\n let form = e.target;\n let body = new FormData(form);\n body.append('restore', true);\n commit(form.getAttribute('action'), form.getAttribute('method') || 'post', { body }).then(resp => {\n window.location = resp.headers.get('location') || $attrs.evaRestoreForm;\n utils.completeLoadingBar();\n });\n });\n });\n }\n})];\n","import toastr from '../services/toastr'\n\nconst ngAjax = function() {\n var provider = this;\n\n var redirectByXhr = function(xhr) {\n var url = xhr.getResponseHeader(\"Location\");\n if(url) window.location.href = url;\n }\n\n var reloadPage = function() {\n window.location.reload(true);\n }\n\n provider.onError = function(xhr, element, callback) {\n callback(xhr, element);\n }\n\n provider.onSuccess = function(xhr, element, callback) {\n callback(xhr, element);\n }\n\n provider.$get = function() {\n return {\n onErrorResponse: function(xhr, callback) {\n if(xhr.status == 401) {\n redirectByXhr(xhr)\n } else {\n callback();\n }\n },\n onError: function(xhr, element, callback) {\n this.onErrorResponse(xhr, function() {\n provider.onError(xhr, element, callback);\n })\n },\n onSuccess: function(xhr, element, callback) {\n provider.onSuccess(xhr, element, callback);\n },\n onSuccessCallback: function(expression, scope) {\n if(expression === 'true') {\n return function(xhr) { redirectByXhr(xhr); }\n } else if(expression === 'alert') {\n return function(xhr, element) { alert(element.attr('ng-ajax-success-message')); }\n } else if(expression === 'reload') {\n return reloadPage;\n } else {\n return function(xhr, element) {\n var response = xhr.responseJSON || {};\n scope.$eval(expression, { $element: element, $response: response });\n scope.$apply();\n }\n }\n }\n }\n }\n}\n\nconst onErrorCallback = (xhr, form) => {\n let errors = (xhr.responseJSON || {}).errors || {};\n $.inlineErrorsUpdate(form, errors);\n form.trigger(\"ajax:formErrors\", [xhr.responseJSON]);\n}\n\nconst ngAjaxForm = ['utils', 'ngAjax', (utils, ngAjax) => {\n $(\"body\").on(\"ajax:beforeSend\", \"[ng-ajax-form]\", function(_, xhr, settings) {\n settings[\"dataType\"] = \"json\";\n $(this).inlineErrors(\"reset\");\n utils.startLoadingBar();\n xhr.complete(() => utils.completeLoadingBar());\n }).on(\"ajax:error\", \"[ng-ajax-form]\", function(a, xhr) {\n ngAjax.onError(xhr, $(this), onErrorCallback);\n window.scrollToTop();\n }).on('eva:uploadStarted ajax:beforeSend', \"[ng-ajax-form]\", function() {\n $(this).find(':submit, button').prop('disabled', true);\n }).on('eva:uploadCompleted ajax:complete', \"[ng-ajax-form]\", function() {\n $(this).find(':submit, button').prop('disabled', false);\n });\n\n return {\n link(scope, element, attrs) {\n element.attr('data-remote', true);\n let callback = ngAjax.onSuccessCallback(attrs.ngAjaxForm, scope);\n element.on('ajax:success', (_a, _b, _c, xhr) => ngAjax.onSuccess(xhr, element, callback));\n }\n };\n}];\n\nconst ngAjaxLink = [\"utils\", \"ngAjax\", (utils, ngAjax) => {\n window.$('body').on('ajax:beforeSend', '[ng-ajax-link]', (_, xhr) => {\n utils.startLoadingBar();\n // there is no garantee that DOM will exist at ajax:complete\n // so we could not use events ajax:complete ajax:success ajax:error\n xhr.complete(() => utils.completeLoadingBar());\n });\n\n return {\n link(scope, element, attrs) {\n if (attrs.hasOwnProperty('disabled')) return;\n\n element.attr('data-remote', true);\n let callback = ngAjax.onSuccessCallback(attrs.ngAjaxLink, scope);\n element\n .on('ajax:success', (_a, _b, _c, xhr) => ngAjax.onSuccess(xhr, element, callback))\n .on('ajax:error', (_, xhr) => {\n let json = xhr.responseJSON;\n if (!json) return;\n\n let msg = json.error_message || (json.errors && json.errors.base[0]);\n if (msg) {\n toastr(msg, { theme: 'danger' });\n }\n });\n }\n };\n}];\n\nexport default app => {\n app.provider('ngAjax', ngAjax);\n app.directive('ngAjaxForm', ngAjaxForm);\n app.directive('ngAjaxLink', ngAjaxLink);\n}\n","import Pagination from '../components/pagination'\nimport createReactRoot from '../services/createReactRoot'\n\nconst opts = { perPage: 25, startPage: 1, padding: 3, sidePadding: 3 };\n\nexport const reloader = function(collection) {\n var page = collection.$meta.page;\n if(collection.length == 1) page -= 1;\n if(page < 1) page = 1;\n this(page);\n}\n\nconst pageFromArray = (list, page) => {\n var i = (page - opts.startPage) * opts.perPage;\n if (i >= list.length)\n i = Math.max((list.length - opts.perPage), 0);\n var end = i + opts.perPage, result = [], item;\n while (i < end) {\n item = list[i];\n if (item) {\n result.push(item);\n i++;\n } else {\n break;\n }\n }\n result.$meta = { total: list.length, page: page };\n return result;\n};\n\nexport default app => {\n app.service('pageFromArray', function() { return pageFromArray })\n\n .service('paginators', ['cfpLoadingBar', (loadingBar) => {\n return {\n forArray(dictionary, callback) {\n let paginator = page => {\n loadingBar.start();\n callback(pageFromArray(dictionary, page));\n loadingBar.complete();\n }\n paginator.onDelete = $index => {\n dictionary.splice($index, 1);\n paginator(1);\n }\n paginator(1);\n return paginator;\n },\n forNestedRoute(resource, route, callback) {\n let paginator = (page) => {\n loadingBar.start();\n resource.loadNestedResources(route, { page, per_page: opts.perPage }).then((...args) => {\n callback(...args);\n loadingBar.complete();\n });\n };\n paginator.reload = reloader;\n paginator(1);\n return paginator;\n },\n forTable(klass, ...config) {\n let callback, options;\n if(config.length == 2) {\n options = config[0];\n callback = config[1];\n } else {\n options = {};\n callback = config[0];\n }\n\n let initPage = options.page || 1;\n delete options.page;\n let paginator = page => {\n loadingBar.start();\n klass.tableList(page, options).then((...args) => {\n if(callback) callback.apply(null, args);\n loadingBar.complete();\n });\n }\n paginator.reload = reloader;\n paginator(initPage);\n return paginator;\n }\n };\n }])\n\n .directive('ngPagination', () => {\n return {\n restrict: \"E\",\n scope: { collection: \"=\", onPageChange: \"=goToPage\" },\n template: '
',\n link($scope, $element) {\n let meta = $scope.collection.$meta;\n if(!meta || (meta.total === undefined)) return;\n\n let app = createReactRoot($element[0]);\n let render = (meta) => {\n app.unmount();\n app.render(\n\n