nextcloud/apps/workflowengine/js/workflowengine.js.map

1 line
87 KiB
Plaintext

{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./apps/workflowengine/src/workflowengine.js","webpack:///./apps/workflowengine/src/admin.js","webpack:///./apps/workflowengine/src/templates.js","webpack:///./apps/workflowengine/src/filemimetypeplugin.js","webpack:///./apps/workflowengine/src/filenameplugin.js","webpack:///./apps/workflowengine/src/filesizeplugin.js","webpack:///./apps/workflowengine/src/filesystemtagsplugin.js","webpack:///./apps/workflowengine/src/requestremoteaddressplugin.js","webpack:///./apps/workflowengine/src/requesttimeplugin.js","webpack:///./apps/workflowengine/src/requesturlplugin.js","webpack:///./apps/workflowengine/src/requestuseragentplugin.js","webpack:///./apps/workflowengine/src/usergroupmembershipplugin.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","window","OCA","WorkflowEngine","Handlebars","registerHelper","currentValue","itemValue","classname","check","getCheckByClass","_","isUndefined","extend","availablePlugins","availableChecks","className","length","Operation","OC","Backbone","Model","defaults","class","checks","operation","OperationsCollection","Collection","model","url","generateUrl","OperationView","View","templateId","events","change .check-class","change .check-operator","change .check-value","change .operation-name","change .operation-operation","click .button-reset","click .button-save","click .button-add","click .button-delete","click .button-delete-check","originalModel","hasChanged","message","errorMessage","saving","groups","template","vars","Templates","shortRuleDescTXT","addRuleTXT","resetTXT","saveTXT","savingTXT","initialize","this","JSON","parse","stringify","on","console","log","render","undefined","self","$","ajax","linkToOCS","dataType","quietMillis","success","data","ocs","forEach","group","push","id","displayname","Notification","error","type","delete","PasswordConfirmation","requiresPasswordConfirmation","requirePasswordConfirmation","destroy","remove","reset","set","silent","save","response","options","responseText","context","add","clone","operators","operator","checkChanged","event","target","parentElement","classList","substr","has","warn","deleteCheck","arguments","splice","operationChanged","$el","html","toJSON","classes","each","find","element","$element","valueElement","first","plugin","isFunction","delay","elements","css","OperationsView","collection","click .button-add-operation","addRuleGroupTXT","Plugins","getPlugins","getCheck","fetch","once","renderOperation","subView","append","templates","1","container","depth0","helpers","partials","3","5","blockParams","depths","stack1","helper","alias1","nullContext","alias2","helperMissing","alias4","escapeExpression","_typeof","index","hash","fn","program","inverse","noop","getOperators","6","selectItem","8","10","11","13","15","16","17","19","21","compiler","main","alias5","lambda","useData","useDepths","FileMimeTypePlugin","placeholder","_validateRegex","removeClass","addClass","attr","tooltip","placement","string","exec","register","FileNamePlugin","FileSizePlugin","FileSystemTagsPlugin","SystemTags","select2","allowClear","multiple","query","debounce","callback","results","filterByName","term","initSelection","val","formatResult","tag","getDescriptiveTag","formatSelection","tagId","escapeMarkup","RequestRemoteAddressPlugin","_validateIPv6","_validateIPv4","RequestTimePlugin","timezones","_$element","startTime","endTime","timezone","jstz","determine","isString","splittedStart","split","splittedEnd","valueJSON","insertBefore","timezoneInput","search","more","parent","update","moment","parsedDate","format","indexValue","trigger","RequestURLPlugin","predefinedValues","text","children","indexOf","unshift","createSearchChoice","RequestUserAgentPlugin","UserGroupMembershipPlugin","groupId","escapeHTML"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,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R7H,GAAI6K,EACJ5K,YAAahC,EAAOuE,KAAK,SAAU1C,GAClC,OAAOA,EAAME,KAAO6K,IAClB5K,cAEM4K,EACVhD,EAAS,CACR7H,GAAI6K,EACJ5K,YAAa4K,IAGdhD,KAGFM,aAAc,SAAU1F,GACvB,MAAO,SAAWqI,WAAWrI,EAAQxC,aAAe,WAErDqI,gBAAiB,SAAU7F,GAC1B,MAAO,gBAAgBqI,WAAWrI,EAAQzC,IAAI,KAAK8K,WAAWrI,EAAQxC,aAAa,gBAOxF/D,GAAGoH,QAAQ6D,SAAS,kCAAmClM,IAAIC,eAAeoI,QAAQsH","file":"workflowengine.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import './admin'\nimport './templates'\nimport './filemimetypeplugin'\nimport './filenameplugin'\nimport './filesizeplugin'\nimport './filesystemtagsplugin'\nimport './requestremoteaddressplugin'\nimport './requesttimeplugin'\nimport './requesturlplugin'\nimport './requestuseragentplugin'\nimport './usergroupmembershipplugin'\n\nwindow.OCA.WorkflowEngine = OCA.WorkflowEngine\n","/**\n * @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n(function() {\n\tHandlebars.registerHelper('selectItem', function(currentValue, itemValue) {\n\t\tif (currentValue === itemValue) {\n\t\t\treturn 'selected=\"selected\"';\n\t\t}\n\n\t\treturn \"\";\n\t});\n\n\tHandlebars.registerHelper('getOperators', function(classname) {\n\t\tvar check = OCA.WorkflowEngine.getCheckByClass(classname);\n\t\tif (!_.isUndefined(check)) {\n\t\t\treturn check['operators'];\n\t\t}\n\t\treturn [];\n\t});\n\n\tOCA.WorkflowEngine = _.extend(OCA.WorkflowEngine || {}, {\n\t\tavailablePlugins: [],\n\t\tavailableChecks: [],\n\n\t\tgetCheckByClass: function(className) {\n\t\t\tvar length = OCA.WorkflowEngine.availableChecks.length;\n\t\t\tfor (var i = 0; i < length; i++) {\n\t\t\t\tif (OCA.WorkflowEngine.availableChecks[i]['class'] === className) {\n\t\t\t\t\treturn OCA.WorkflowEngine.availableChecks[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t});\n\n\t/**\n\t * 888b d888 888 888\n\t * 8888b d8888 888 888\n\t * 88888b.d88888 888 888\n\t * 888Y88888P888 .d88b. .d88888 .d88b. 888 .d8888b\n\t * 888 Y888P 888 d88\"\"88b d88\" 888 d8P Y8b 888 88K\n\t * 888 Y8P 888 888 888 888 888 88888888 888 \"Y8888b.\n\t * 888 \" 888 Y88..88P Y88b 888 Y8b. 888 X88\n\t * 888 888 \"Y88P\" \"Y88888 \"Y8888 888 88888P'\n\t */\n\n\t/**\n\t * @class OCA.WorkflowEngine.Operation\n\t */\n\tOCA.WorkflowEngine.Operation =\n\t\tOC.Backbone.Model.extend({\n\t\t\tdefaults: {\n\t\t\t\t'class': 'OCA\\\\WorkflowEngine\\\\Operation',\n\t\t\t\t'name': '',\n\t\t\t\t'checks': [],\n\t\t\t\t'operation': ''\n\t\t\t}\n\t\t});\n\n\t/**\n\t * .d8888b. 888 888 888 d8b\n\t * d88P Y88b 888 888 888 Y8P\n\t * 888 888 888 888 888\n\t * 888 .d88b. 888 888 .d88b. .d8888b 888888 888 .d88b. 88888b. .d8888b\n\t * 888 d88\"\"88b 888 888 d8P Y8b d88P\" 888 888 d88\"\"88b 888 \"88b 88K\n\t * 888 888 888 888 888 888 88888888 888 888 888 888 888 888 888 \"Y8888b.\n\t * Y88b d88P Y88..88P 888 888 Y8b. Y88b. Y88b. 888 Y88..88P 888 888 X88\n\t * \"Y8888P\" \"Y88P\" 888 888 \"Y8888 \"Y8888P \"Y888 888 \"Y88P\" 888 888 88888P'\n\t */\n\n\t/**\n\t * @class OCA.WorkflowEngine.OperationsCollection\n\t *\n\t * collection for all configurated operations\n\t */\n\tOCA.WorkflowEngine.OperationsCollection =\n\t\tOC.Backbone.Collection.extend({\n\t\t\tmodel: OCA.WorkflowEngine.Operation,\n\t\t\turl: OC.generateUrl('apps/workflowengine/operations')\n\t\t});\n\n\t/**\n\t * 888 888 d8b\n\t * 888 888 Y8P\n\t * 888 888\n\t * Y88b d88P 888 .d88b. 888 888 888 .d8888b\n\t * Y88b d88P 888 d8P Y8b 888 888 888 88K\n\t * Y88o88P 888 88888888 888 888 888 \"Y8888b.\n\t * Y888P 888 Y8b. Y88b 888 d88P X88\n\t * Y8P 888 \"Y8888 \"Y8888888P\" 88888P'\n\t */\n\n\t/**\n\t * @class OCA.WorkflowEngine.OperationView\n\t *\n\t * this creates the view for a single operation\n\t */\n\tOCA.WorkflowEngine.OperationView =\n\t\tOC.Backbone.View.extend({\n\t\t\ttemplateId: '#operation-template',\n\t\t\tevents: {\n\t\t\t\t'change .check-class': 'checkChanged',\n\t\t\t\t'change .check-operator': 'checkChanged',\n\t\t\t\t'change .check-value': 'checkChanged',\n\t\t\t\t'change .operation-name': 'operationChanged',\n\t\t\t\t'change .operation-operation': 'operationChanged',\n\t\t\t\t'click .button-reset': 'reset',\n\t\t\t\t'click .button-save': 'save',\n\t\t\t\t'click .button-add': 'add',\n\t\t\t\t'click .button-delete': 'delete',\n\t\t\t\t'click .button-delete-check': 'deleteCheck'\n\t\t\t},\n\t\t\toriginalModel: null,\n\t\t\thasChanged: false,\n\t\t\tmessage: '',\n\t\t\terrorMessage: '',\n\t\t\tsaving: false,\n\t\t\tgroups: [],\n\t\t\ttemplate: function(vars) {\n\t\t\t\treturn OCA.WorkflowEngine.Templates['operation'](_.extend(\n\t\t\t\t\t{\n\t\t\t\t\t\tshortRuleDescTXT: t('workflowengine', 'Short rule description'),\n\t\t\t\t\t\taddRuleTXT: t('workflowengine', 'Add rule'),\n\t\t\t\t\t\tresetTXT: t('workflowengine', 'Reset'),\n\t\t\t\t\t\tsaveTXT: t('workflowengine', 'Save'),\n\t\t\t\t\t\tsavingTXT: t('workflowengine', 'Saving…')\n\t\t\t\t\t},\n\t\t\t\t\tvars\n\t\t\t\t));\n\t\t\t},\n\t\t\tinitialize: function() {\n\t\t\t\t// this creates a new copy of the object to definitely have a new reference and being able to reset the model\n\t\t\t\tthis.originalModel = JSON.parse(JSON.stringify(this.model));\n\t\t\t\tthis.model.on('change', function() {\n\t\t\t\t\tconsole.log('model changed');\n\t\t\t\t\tthis.hasChanged = true;\n\t\t\t\t\tthis.render();\n\t\t\t\t}, this);\n\n\t\t\t\tif (this.model.get('id') === undefined) {\n\t\t\t\t\tthis.hasChanged = true;\n\t\t\t\t}\n\t\t\t\tvar self = this;\n\t\t\t\t$.ajax({\n\t\t\t\t\turl: OC.linkToOCS('cloud/groups', 2) + 'details',\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tquietMillis: 100,\n\t\t\t\t}).success(function(data) {\n\t\t\t\t\tif (data.ocs.data.groups && data.ocs.data.groups.length > 0) {\n\n\t\t\t\t\t\tdata.ocs.data.groups.forEach(function(group) {\n\t\t\t\t\t\t\tself.groups.push({ id: group.id, displayname: group.displayname });\n\t\t\t\t\t\t});\n\t\t\t\t\t\tself.render();\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tOC.Notification.error(t('workflowengine', 'Group list is empty'), { type: 'error' });\n\t\t\t\t\t\tconsole.log(data);\n\t\t\t\t\t}\n\t\t\t\t}).error(function(data) {\n\t\t\t\t\tOC.Notification.error(t('workflowengine', 'Unable to retrieve the group list'), { type: 'error' });\n\t\t\t\t\tconsole.log(data);\n\t\t\t\t});\n\t\t\t},\n\t\t\tdelete: function() {\n\t\t\t\tif (OC.PasswordConfirmation.requiresPasswordConfirmation()) {\n\t\t\t\t\tOC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.delete, this));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.model.destroy();\n\t\t\t\tthis.remove();\n\t\t\t},\n\t\t\treset: function() {\n\t\t\t\tthis.hasChanged = false;\n\t\t\t\t// silent is need to not trigger the change event which resets the hasChanged attribute\n\t\t\t\tthis.model.set(this.originalModel, { silent: true });\n\t\t\t\tthis.render();\n\t\t\t},\n\t\t\tsave: function() {\n\t\t\t\tif (OC.PasswordConfirmation.requiresPasswordConfirmation()) {\n\t\t\t\t\tOC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.save, this));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar success = function(model, response, options) {\n\t\t\t\t\tthis.saving = false;\n\t\t\t\t\tthis.originalModel = JSON.parse(JSON.stringify(this.model));\n\n\t\t\t\t\tthis.message = t('workflowengine', 'Saved');\n\t\t\t\t\tthis.errorMessage = '';\n\t\t\t\t\tthis.render();\n\t\t\t\t};\n\t\t\t\tvar error = function(model, response, options) {\n\t\t\t\t\tthis.saving = false;\n\t\t\t\t\tthis.hasChanged = true;\n\n\t\t\t\t\tthis.message = t('workflowengine', 'Saving failed:');\n\t\t\t\t\tthis.errorMessage = response.responseText;\n\t\t\t\t\tthis.render();\n\t\t\t\t};\n\t\t\t\tthis.hasChanged = false;\n\t\t\t\tthis.saving = true;\n\t\t\t\tthis.render();\n\t\t\t\tthis.model.save(null, { success: success, error: error, context: this });\n\t\t\t},\n\t\t\tadd: function() {\n\t\t\t\tvar checks = _.clone(this.model.get('checks')),\n\t\t\t\t\tclassname = OCA.WorkflowEngine.availableChecks[0]['class'],\n\t\t\t\t\toperators = OCA.WorkflowEngine.availableChecks[0]['operators'];\n\n\t\t\t\tchecks.push({\n\t\t\t\t\t'class': classname,\n\t\t\t\t\t'operator': operators[0]['operator'],\n\t\t\t\t\t'value': ''\n\t\t\t\t});\n\t\t\t\tthis.model.set({ 'checks': checks });\n\t\t\t},\n\t\t\tcheckChanged: function(event) {\n\t\t\t\tvar value = event.target.value,\n\t\t\t\t\tid = $(event.target.parentElement).data('id'),\n\t\t\t\t\t// this creates a new copy of the object to definitely have a new reference\n\t\t\t\t\tchecks = JSON.parse(JSON.stringify(this.model.get('checks'))),\n\t\t\t\t\tkey = null;\n\n\t\t\t\tfor (var i = 0; i < event.target.classList.length; i++) {\n\t\t\t\t\tvar className = event.target.classList[i];\n\t\t\t\t\tif (className.substr(0, 'check-'.length) === 'check-') {\n\t\t\t\t\t\tkey = className.substr('check-'.length);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (key === null) {\n\t\t\t\t\tconsole.warn('checkChanged triggered but element doesn\\'t have any \"check-\" class');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (!_.has(checks[id], key)) {\n\t\t\t\t\tconsole.warn('key \"' + key + '\" is not available in check', check);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tchecks[id][key] = value;\n\t\t\t\t// if the class is changed most likely also the operators have changed\n\t\t\t\t// with this we set the operator to the first possible operator\n\t\t\t\tif (key === 'class') {\n\t\t\t\t\tvar check = OCA.WorkflowEngine.getCheckByClass(value);\n\t\t\t\t\tif (!_.isUndefined(check)) {\n\t\t\t\t\t\tchecks[id]['operator'] = check['operators'][0]['operator'];\n\t\t\t\t\t\tchecks[id]['value'] = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// model change will trigger render\n\t\t\t\tthis.model.set({ 'checks': checks });\n\t\t\t},\n\t\t\tdeleteCheck: function(event) {\n\t\t\t\tconsole.log(arguments);\n\t\t\t\tvar id = $(event.target.parentElement).data('id'),\n\t\t\t\t\tchecks = JSON.parse(JSON.stringify(this.model.get('checks')));\n\n\t\t\t\t// splice removes 1 element at index `id`\n\t\t\t\tchecks.splice(id, 1);\n\t\t\t\t// model change will trigger render\n\t\t\t\tthis.model.set({ 'checks': checks });\n\t\t\t},\n\t\t\toperationChanged: function(event) {\n\t\t\t\tvar value = event.target.value,\n\t\t\t\t\tkey = null;\n\n\t\t\t\tfor (var i = 0; i < event.target.classList.length; i++) {\n\t\t\t\t\tvar className = event.target.classList[i];\n\t\t\t\t\tif (className.substr(0, 'operation-'.length) === 'operation-') {\n\t\t\t\t\t\tkey = className.substr('operation-'.length);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (key === null) {\n\t\t\t\t\tconsole.warn('operationChanged triggered but element doesn\\'t have any \"operation-\" class');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (key !== 'name' && key !== 'operation') {\n\t\t\t\t\tconsole.warn('key \"' + key + '\" is no valid attribute');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// model change will trigger render\n\t\t\t\tthis.model.set(key, value);\n\t\t\t},\n\t\t\trender: function() {\n\t\t\t\tthis.$el.html(this.template({\n\t\t\t\t\toperation: this.model.toJSON(),\n\t\t\t\t\tclasses: OCA.WorkflowEngine.availableChecks,\n\t\t\t\t\thasChanged: this.hasChanged,\n\t\t\t\t\tmessage: this.message,\n\t\t\t\t\terrorMessage: this.errorMessage,\n\t\t\t\t\tsaving: this.saving\n\t\t\t\t}));\n\n\t\t\t\tvar checks = this.model.get('checks');\n\t\t\t\t_.each(this.$el.find('.check'), function(element) {\n\t\t\t\t\tvar $element = $(element),\n\t\t\t\t\t\tid = $element.data('id'),\n\t\t\t\t\t\tcheck = checks[id],\n\t\t\t\t\t\tvalueElement = $element.find('.check-value').first();\n\t\t\t\t\tvar self = this;\n\n\t\t\t\t\t_.each(OCA.WorkflowEngine.availablePlugins, function(plugin) {\n\t\t\t\t\t\tif (_.isFunction(plugin.render)) {\n\t\t\t\t\t\t\tplugin.render(valueElement, check, self.groups);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}, this);\n\n\t\t\t\tif (this.message !== '') {\n\t\t\t\t\t// hide success messages after some time\n\t\t\t\t\t_.delay(function(elements) {\n\t\t\t\t\t\t$(elements).css('opacity', 0);\n\t\t\t\t\t}, 7000, this.$el.find('.msg.success'));\n\t\t\t\t\tthis.message = '';\n\t\t\t\t}\n\n\t\t\t\treturn this.$el;\n\t\t\t}\n\t\t});\n\n\t/**\n\t * @class OCA.WorkflowEngine.OperationsView\n\t *\n\t * this creates the view for configured operations\n\t */\n\tOCA.WorkflowEngine.OperationsView =\n\t\tOC.Backbone.View.extend({\n\t\t\ttemplateId: '#operations-template',\n\t\t\tcollection: null,\n\t\t\t$el: null,\n\t\t\tevents: {\n\t\t\t\t'click .button-add-operation': 'add'\n\t\t\t},\n\t\t\ttemplate: function(vars) {\n\t\t\t\treturn OCA.WorkflowEngine.Templates['operations'](_.extend(\n\t\t\t\t\t{\n\t\t\t\t\t\taddRuleGroupTXT: t('workflowengine', 'Add rule group')\n\t\t\t\t\t},\n\t\t\t\t\tvars\n\t\t\t\t));\n\t\t\t},\n\t\t\tinitialize: function(classname) {\n\t\t\t\tif (!OCA.WorkflowEngine.availablePlugins.length) {\n\t\t\t\t\tOCA.WorkflowEngine.availablePlugins = OC.Plugins.getPlugins('OCA.WorkflowEngine.CheckPlugins');\n\t\t\t\t\t_.each(OCA.WorkflowEngine.availablePlugins, function(plugin) {\n\t\t\t\t\t\tif (_.isFunction(plugin.getCheck)) {\n\t\t\t\t\t\t\tOCA.WorkflowEngine.availableChecks.push(plugin.getCheck(classname));\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tdata: {\n\t\t\t\t\t\t'class': classname\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthis.collection.once('sync', this.render, this);\n\t\t\t},\n\t\t\tadd: function() {\n\t\t\t\tvar operation = this.collection.create();\n\t\t\t\tthis.renderOperation(operation);\n\t\t\t},\n\t\t\trenderOperation: function(subView) {\n\t\t\t\tvar operationsElement = this.$el.find('.operations');\n\t\t\t\toperationsElement.append(subView.$el);\n\t\t\t\tsubView.render();\n\t\t\t},\n\t\t\trender: function() {\n\t\t\t\tthis.$el.html(this.template());\n\t\t\t\tthis.collection.each(this.renderOperation, this);\n\t\t\t}\n\t\t});\n})();\n","(function() {\n var template = Handlebars.template, templates = OCA.WorkflowEngine.Templates = OCA.WorkflowEngine.Templates || {};\ntemplates['operation'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" modified\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n return \"\t\t\t<span class=\\\"button-delete icon-delete\\\"></span>\\n\";\n},\"5\":function(container,depth0,helpers,partials,data,blockParams,depths) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t<div class=\\\"check\\\" data-id=\\\"\"\n + alias4(((helper = (helper = helpers.index || (data && data.index)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"index\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t\t\t\t<select class=\\\"check-class\\\">\\n\"\n + ((stack1 = helpers.each.call(alias1,(depths[1] != null ? depths[1].classes : depths[1]),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(6, data, 0, blockParams, depths),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t\t\t</select>\\n\t\t\t\t<select class=\\\"check-operator\\\">\\n\"\n + ((stack1 = helpers.each.call(alias1,(helpers.getOperators || (depth0 && depth0.getOperators) || alias2).call(alias1,(depth0 != null ? depth0[\"class\"] : depth0),{\"name\":\"getOperators\",\"hash\":{},\"data\":data}),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(8, data, 0, blockParams, depths),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t\t\t</select>\\n\t\t\t\t<input type=\\\"text\\\" class=\\\"check-value\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"value\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t\t\t\t<span class=\\\"button-delete-check icon-delete\\\"></span>\\n\t\t\t</div>\\n\";\n},\"6\":function(container,depth0,helpers,partials,data,blockParams,depths) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t\t\t\t<option value=\\\"\"\n + alias4(((helper = (helper = helpers[\"class\"] || (depth0 != null ? depth0[\"class\"] : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"class\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" \"\n + ((stack1 = (helpers.selectItem || (depth0 && depth0.selectItem) || alias2).call(alias1,(depth0 != null ? depth0[\"class\"] : depth0),(depths[1] != null ? depths[1][\"class\"] : depths[1]),{\"name\":\"selectItem\",\"hash\":{},\"data\":data})) != null ? stack1 : \"\")\n + \">\"\n + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"</option>\\n\";\n},\"8\":function(container,depth0,helpers,partials,data,blockParams,depths) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t\t\t\t<option value=\\\"\"\n + alias4(((helper = (helper = helpers.operator || (depth0 != null ? depth0.operator : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"operator\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" \"\n + ((stack1 = (helpers.selectItem || (depth0 && depth0.selectItem) || alias2).call(alias1,(depth0 != null ? depth0.operator : depth0),(depths[1] != null ? depths[1].operator : depths[1]),{\"name\":\"selectItem\",\"hash\":{},\"data\":data})) != null ? stack1 : \"\")\n + \">\"\n + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"</option>\\n\";\n},\"10\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {});\n\n return ((stack1 = helpers[\"if\"].call(alias1,((stack1 = (depth0 != null ? depth0.operation : depth0)) != null ? stack1.id : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(11, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t<button class=\\\"button-save pull-right\\\">\"\n + container.escapeExpression(((helper = (helper = helpers.saveTXT || (depth0 != null ? depth0.saveTXT : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(alias1,{\"name\":\"saveTXT\",\"hash\":{},\"data\":data}) : helper)))\n + \"</button>\\n\";\n},\"11\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\t\t\t<button class=\\\"button-reset pull-right\\\">\"\n + container.escapeExpression(((helper = (helper = helpers.resetTXT || (depth0 != null ? depth0.resetTXT : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"resetTXT\",\"hash\":{},\"data\":data}) : helper)))\n + \"</button>\\n\";\n},\"13\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\t\t<span class=\\\"icon-loading-small pull-right\\\"></span>\\n\t\t<span class=\\\"pull-right\\\">\"\n + container.escapeExpression(((helper = (helper = helpers.savingTXT || (depth0 != null ? depth0.savingTXT : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"savingTXT\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\";\n},\"15\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.message : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(16, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"16\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"\\n\t\t<span class=\\\"msg pull-right \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.errorMessage : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(17, data, 0),\"inverse\":container.program(19, data, 0),\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t\t\t\"\n + container.escapeExpression(((helper = (helper = helpers.message || (depth0 != null ? depth0.message : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(alias1,{\"name\":\"message\",\"hash\":{},\"data\":data}) : helper)))\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.errorMessage : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(21, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\n\t\t\t\t</span>\\n\t\";\n},\"17\":function(container,depth0,helpers,partials,data) {\n return \"error\";\n},\"19\":function(container,depth0,helpers,partials,data) {\n return \"success\";\n},\"21\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \" \"\n + container.escapeExpression(((helper = (helper = helpers.errorMessage || (depth0 != null ? depth0.errorMessage : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"errorMessage\",\"hash\":{},\"data\":data}) : helper)));\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data,blockParams,depths) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression, alias5=container.lambda;\n\n return \"<div class=\\\"operation\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.hasChanged : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0, blockParams, depths),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t<div class=\\\"operation-header\\\">\\n\t\t<input type=\\\"text\\\" class=\\\"operation-name\\\" placeholder=\\\"\"\n + alias4(((helper = (helper = helpers.shortRuleDescTXT || (depth0 != null ? depth0.shortRuleDescTXT : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shortRuleDescTXT\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" value=\\\"\"\n + alias4(alias5(((stack1 = (depth0 != null ? depth0.operation : depth0)) != null ? stack1.name : stack1), depth0))\n + \"\\\" />\\n\t\t<input type=\\\"text\\\" class=\\\"operation-operation\\\" value=\\\"\"\n + alias4(alias5(((stack1 = (depth0 != null ? depth0.operation : depth0)) != null ? stack1.operation : stack1), depth0))\n + \"\\\" />\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,((stack1 = (depth0 != null ? depth0.operation : depth0)) != null ? stack1.id : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0, blockParams, depths),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t</div>\\n\\n\t<div class=\\\"checks\\\">\\n\"\n + ((stack1 = helpers.each.call(alias1,((stack1 = (depth0 != null ? depth0.operation : depth0)) != null ? stack1.checks : stack1),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(5, data, 0, blockParams, depths),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t</div>\\n\t<button class=\\\"button-add\\\">\"\n + alias4(((helper = (helper = helpers.addRuleTXT || (depth0 != null ? depth0.addRuleTXT : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"addRuleTXT\",\"hash\":{},\"data\":data}) : helper)))\n + \"</button>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.hasChanged : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(10, data, 0, blockParams, depths),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.saving : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(13, data, 0, blockParams, depths),\"inverse\":container.program(15, data, 0, blockParams, depths),\"data\":data})) != null ? stack1 : \"\")\n + \"\\n</div>\\n\";\n},\"useData\":true,\"useDepths\":true});\ntemplates['operations'] = template({\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"<div class=\\\"operations\\\"></div>\\n<button class=\\\"button-add-operation\\\">\"\n + container.escapeExpression(((helper = (helper = helpers.addRuleGroupTXT || (depth0 != null ? depth0.addRuleGroupTXT : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"addRuleGroupTXT\",\"hash\":{},\"data\":data}) : helper)))\n + \"</button>\\n\";\n},\"useData\":true});\n})();","/**\n * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n(function() {\n\n\tOCA.WorkflowEngine = OCA.WorkflowEngine || {};\n\tOCA.WorkflowEngine.Plugins = OCA.WorkflowEngine.Plugins || {};\n\n\tOCA.WorkflowEngine.Plugins.FileMimeTypePlugin = {\n\t\tgetCheck: function() {\n\t\t\treturn {\n\t\t\t\t'class': 'OCA\\\\WorkflowEngine\\\\Check\\\\FileMimeType',\n\t\t\t\t'name': t('workflowengine', 'File MIME type'),\n\t\t\t\t'operators': [\n\t\t\t\t\t{'operator': 'is', 'name': t('workflowengine', 'is')},\n\t\t\t\t\t{'operator': '!is', 'name': t('workflowengine', 'is not')},\n\t\t\t\t\t{'operator': 'matches', 'name': t('workflowengine', 'matches')},\n\t\t\t\t\t{'operator': '!matches', 'name': t('workflowengine', 'does not match')}\n\t\t\t\t]\n\t\t\t};\n\t\t},\n\t\trender: function(element, check) {\n\t\t\tif (check['class'] !== 'OCA\\\\WorkflowEngine\\\\Check\\\\FileMimeType') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar placeholder = 'text/plain';\n\t\t\tif (check['operator'] === 'matches' || check['operator'] === '!matches') {\n\t\t\t\tplaceholder = '/^text\\\\/(plain|html)$/i';\n\n\t\t\t\tif (this._validateRegex(check['value'])) {\n\t\t\t\t\t$(element).removeClass('invalid-input');\n\t\t\t\t} else {\n\t\t\t\t\t$(element).addClass('invalid-input');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$(element).css('width', '250px')\n\t\t\t\t.attr('placeholder', placeholder)\n\t\t\t\t.attr('title', t('workflowengine', 'Example: {placeholder}', {placeholder: placeholder}))\n\t\t\t\t.addClass('has-tooltip')\n\t\t\t\t.tooltip({\n\t\t\t\t\tplacement: 'bottom'\n\t\t\t\t});\n\t\t},\n\n\t\t_validateRegex: function(string) {\n\t\t\tvar regexRegex = /^\\/(.*)\\/([gui]{0,3})$/,\n\t\t\t\tresult = regexRegex.exec(string);\n\t\t\treturn result !== null;\n\t\t}\n\t};\n})();\n\nOC.Plugins.register('OCA.WorkflowEngine.CheckPlugins', OCA.WorkflowEngine.Plugins.FileMimeTypePlugin);\n","/**\n * @copyright Copyright (c) 2018 Daniel Kesselberg <mail@danielkesselberg.de>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n(function () {\n\n\tOCA.WorkflowEngine = OCA.WorkflowEngine || {};\n\tOCA.WorkflowEngine.Plugins = OCA.WorkflowEngine.Plugins || {};\n\n\tOCA.WorkflowEngine.Plugins.FileNamePlugin = {\n\t\tgetCheck: function () {\n\t\t\treturn {\n\t\t\t\t'class': 'OCA\\\\WorkflowEngine\\\\Check\\\\FileName',\n\t\t\t\t'name': t('workflowengine', 'File name'),\n\t\t\t\t'operators': [\n\t\t\t\t\t{'operator': 'is', 'name': t('workflowengine', 'is')},\n\t\t\t\t\t{'operator': '!is', 'name': t('workflowengine', 'is not')},\n\t\t\t\t\t{\n\t\t\t\t\t\t'operator': 'matches',\n\t\t\t\t\t\t'name': t('workflowengine', 'matches')\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t'operator': '!matches',\n\t\t\t\t\t\t'name': t('workflowengine', 'does not match')\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t};\n\t\t},\n\t\trender: function (element, check) {\n\t\t\tif (check['class'] !== 'OCA\\\\WorkflowEngine\\\\Check\\\\FileName') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar placeholder = 'dummy.jpg';\n\t\t\tif (check['operator'] === 'matches' || check['operator'] === '!matches') {\n\t\t\t\tplaceholder = '/^dummy-.+$/i';\n\n\t\t\t\tif (this._validateRegex(check['value'])) {\n\t\t\t\t\t$(element).removeClass('invalid-input');\n\t\t\t\t} else {\n\t\t\t\t\t$(element).addClass('invalid-input');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$(element).css('width', '250px')\n\t\t\t\t.attr('placeholder', placeholder)\n\t\t\t\t.attr('title', t('workflowengine', 'Example: {placeholder}', {placeholder: placeholder}))\n\t\t\t\t.addClass('has-tooltip')\n\t\t\t\t.tooltip({\n\t\t\t\t\tplacement: 'bottom'\n\t\t\t\t});\n\t\t},\n\n\t\t_validateRegex: function (string) {\n\t\t\tvar regexRegex = /^\\/(.*)\\/([gui]{0,3})$/,\n\t\t\t\tresult = regexRegex.exec(string);\n\t\t\treturn result !== null;\n\t\t}\n\t};\n})();\n\nOC.Plugins.register('OCA.WorkflowEngine.CheckPlugins', OCA.WorkflowEngine.Plugins.FileNamePlugin);","/**\n * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n(function() {\n\n\tOCA.WorkflowEngine = OCA.WorkflowEngine || {};\n\tOCA.WorkflowEngine.Plugins = OCA.WorkflowEngine.Plugins || {};\n\n\tOCA.WorkflowEngine.Plugins.FileSizePlugin = {\n\t\tgetCheck: function() {\n\t\t\treturn {\n\t\t\t\t'class': 'OCA\\\\WorkflowEngine\\\\Check\\\\FileSize',\n\t\t\t\t'name': t('workflowengine', 'File size (upload)'),\n\t\t\t\t'operators': [\n\t\t\t\t\t{'operator': 'less', 'name': t('workflowengine', 'less')},\n\t\t\t\t\t{'operator': '!greater', 'name': t('workflowengine', 'less or equals')},\n\t\t\t\t\t{'operator': '!less', 'name': t('workflowengine', 'greater or equals')},\n\t\t\t\t\t{'operator': 'greater', 'name': t('workflowengine', 'greater')}\n\t\t\t\t]\n\t\t\t};\n\t\t},\n\t\trender: function(element, check) {\n\t\t\tif (check['class'] !== 'OCA\\\\WorkflowEngine\\\\Check\\\\FileSize') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar placeholder = '12 MB'; // Do not translate!!!\n\t\t\t$(element).css('width', '250px')\n\t\t\t\t.attr('placeholder', placeholder)\n\t\t\t\t.attr('title', t('workflowengine', 'Example: {placeholder}', {placeholder: placeholder}))\n\t\t\t\t.addClass('has-tooltip')\n\t\t\t\t.tooltip({\n\t\t\t\t\tplacement: 'bottom'\n\t\t\t\t});\n\t\t}\n\t};\n})();\n\nOC.Plugins.register('OCA.WorkflowEngine.CheckPlugins', OCA.WorkflowEngine.Plugins.FileSizePlugin);\n","/**\n * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n(function() {\n\n\tOCA.WorkflowEngine = OCA.WorkflowEngine || {};\n\tOCA.WorkflowEngine.Plugins = OCA.WorkflowEngine.Plugins || {};\n\n\tOCA.WorkflowEngine.Plugins.FileSystemTagsPlugin = {\n\t\tgetCheck: function() {\n\t\t\tthis.collection = OC.SystemTags.collection;\n\n\t\t\treturn {\n\t\t\t\t'class': 'OCA\\\\WorkflowEngine\\\\Check\\\\FileSystemTags',\n\t\t\t\t'name': t('workflowengine', 'File system tag'),\n\t\t\t\t'operators': [\n\t\t\t\t\t{'operator': 'is', 'name': t('workflowengine', 'is tagged with')},\n\t\t\t\t\t{'operator': '!is', 'name': t('workflowengine', 'is not tagged with')}\n\t\t\t\t]\n\t\t\t};\n\t\t},\n\t\trender: function(element, check) {\n\t\t\tif (check['class'] !== 'OCA\\\\WorkflowEngine\\\\Check\\\\FileSystemTags') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$(element).css('width', '400px');\n\n\t\t\t$(element).select2({\n\t\t\t\tallowClear: false,\n\t\t\t\tmultiple: false,\n\t\t\t\tplaceholder: t('workflowengine', 'Select tag…'),\n\t\t\t\tquery: _.debounce(function(query) {\n\t\t\t\t\tquery.callback({\n\t\t\t\t\t\tresults: OC.SystemTags.collection.filterByName(query.term)\n\t\t\t\t\t});\n\t\t\t\t}, 100, true),\n\t\t\t\tid: function(element) {\n\t\t\t\t\treturn element.get('id');\n\t\t\t\t},\n\t\t\t\tinitSelection: function(element, callback) {\n\t\t\t\t\tcallback($(element).val());\n\t\t\t\t},\n\t\t\t\tformatResult: function (tag) {\n\t\t\t\t\treturn OC.SystemTags.getDescriptiveTag(tag);\n\t\t\t\t},\n\t\t\t\tformatSelection: function (tagId) {\n\t\t\t\t\tvar tag = OC.SystemTags.collection.get(tagId);\n\t\t\t\t\tif (!_.isUndefined(tag)) {\n\t\t\t\t\t\treturn OC.SystemTags.getDescriptiveTag(tag);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tescapeMarkup: function(m) {\n\t\t\t\t\treturn m;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n})();\n\nOC.Plugins.register('OCA.WorkflowEngine.CheckPlugins', OCA.WorkflowEngine.Plugins.FileSystemTagsPlugin);\n","/**\n * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n(function() {\n\n\tOCA.WorkflowEngine = OCA.WorkflowEngine || {};\n\tOCA.WorkflowEngine.Plugins = OCA.WorkflowEngine.Plugins || {};\n\n\tOCA.WorkflowEngine.Plugins.RequestRemoteAddressPlugin = {\n\t\tgetCheck: function() {\n\t\t\treturn {\n\t\t\t\t'class': 'OCA\\\\WorkflowEngine\\\\Check\\\\RequestRemoteAddress',\n\t\t\t\t'name': t('workflowengine', 'Request remote address'),\n\t\t\t\t'operators': [\n\t\t\t\t\t{'operator': 'matchesIPv4', 'name': t('workflowengine', 'matches IPv4')},\n\t\t\t\t\t{'operator': '!matchesIPv4', 'name': t('workflowengine', 'does not match IPv4')},\n\t\t\t\t\t{'operator': 'matchesIPv6', 'name': t('workflowengine', 'matches IPv6')},\n\t\t\t\t\t{'operator': '!matchesIPv6', 'name': t('workflowengine', 'does not match IPv6')}\n\t\t\t\t]\n\t\t\t};\n\t\t},\n\t\trender: function(element, check) {\n\t\t\tif (check['class'] !== 'OCA\\\\WorkflowEngine\\\\Check\\\\RequestRemoteAddress') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar placeholder = '127.0.0.1/32'; // Do not translate!!!\n\t\t\tif (check['operator'] === 'matchesIPv6' || check['operator'] === '!matchesIPv6') {\n\t\t\t\tplaceholder = '::1/128'; // Do not translate!!!\n\t\t\t\tif (this._validateIPv6(check['value'])) {\n\t\t\t\t\t$(element).removeClass('invalid-input');\n\t\t\t\t} else {\n\t\t\t\t\t$(element).addClass('invalid-input');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (this._validateIPv4(check['value'])) {\n\t\t\t\t\t$(element).removeClass('invalid-input');\n\t\t\t\t} else {\n\t\t\t\t\t$(element).addClass('invalid-input');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$(element).css('width', '300px')\n\t\t\t\t.attr('placeholder', placeholder)\n\t\t\t\t.attr('title', t('workflowengine', 'Example: {placeholder}', {placeholder: placeholder}))\n\t\t\t\t.addClass('has-tooltip')\n\t\t\t\t.tooltip({\n\t\t\t\t\tplacement: 'bottom'\n\t\t\t\t});\n\t\t},\n\n\t\t_validateIPv4: function(string) {\n\t\t\tvar regexRegex = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\/(3[0-2]|[1-2][0-9]|[1-9])$/,\n\t\t\t\tresult = regexRegex.exec(string);\n\t\t\treturn result !== null;\n\t\t},\n\n\t\t_validateIPv6: function(string) {\n\t\t\tvar regexRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((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])|([0-9a-fA-F]{1,4}:){1,4}:((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]))\\/(1([01][0-9]|2[0-8])|[1-9][0-9]|[0-9])$/,\n\t\t\t\tresult = regexRegex.exec(string);\n\t\t\treturn result !== null;\n\t\t}\n\t};\n})();\n\nOC.Plugins.register('OCA.WorkflowEngine.CheckPlugins', OCA.WorkflowEngine.Plugins.RequestRemoteAddressPlugin);\n","/**\n * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n(function() {\n\n\tOCA.WorkflowEngine = OCA.WorkflowEngine || {};\n\tOCA.WorkflowEngine.Plugins = OCA.WorkflowEngine.Plugins || {};\n\n\tOCA.WorkflowEngine.Plugins.RequestTimePlugin = {\n\t\ttimezones: [\n\t\t\t\"Europe/Berlin\",\n\t\t\t\"Europe/London\"\n\t\t],\n\t\t_$element: null,\n\t\tgetCheck: function() {\n\t\t\treturn {\n\t\t\t\t'class': 'OCA\\\\WorkflowEngine\\\\Check\\\\RequestTime',\n\t\t\t\t'name': t('workflowengine', 'Request time'),\n\t\t\t\t'operators': [\n\t\t\t\t\t{'operator': 'in', 'name': t('workflowengine', 'between')},\n\t\t\t\t\t{'operator': '!in', 'name': t('workflowengine', 'not between')}\n\t\t\t\t]\n\t\t\t};\n\t\t},\n\t\trender: function(element, check) {\n\t\t\tif (check['class'] !== 'OCA\\\\WorkflowEngine\\\\Check\\\\RequestTime') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar startTime = '09:00',\n\t\t\t\tendTime = '18:00',\n\t\t\t\ttimezone = jstz.determine().name(),\n\t\t\t\t$element = $(element);\n\n\t\t\tif (_.isString(check['value']) && check['value'] !== '') {\n\t\t\t\tvar value = JSON.parse(check['value']),\n\t\t\t\t\tsplittedStart = value[0].split(' ', 2),\n\t\t\t\t\tsplittedEnd = value[1].split(' ', 2);\n\n\t\t\t\tstartTime = splittedStart[0];\n\t\t\t\tendTime = splittedEnd[0];\n\t\t\t\ttimezone = splittedStart[1];\n\t\t\t}\n\n\t\t\tvar valueJSON = JSON.stringify([startTime + ' ' + timezone, endTime + ' ' + timezone]);\n\t\t\tif (check['value'] !== valueJSON) {\n\t\t\t\tcheck['value'] = valueJSON;\n\t\t\t\t$element.val(valueJSON);\n\t\t\t}\n\n\t\t\t$element.css('display', 'none');\n\n\t\t\t$('<input>')\n\t\t\t\t.attr('type', 'text')\n\t\t\t\t.attr('placeholder', t('workflowengine', 'Start'))\n\t\t\t\t.attr('title', t('workflowengine', 'Example: {placeholder}', {placeholder: '16:00'}))\n\t\t\t\t.addClass('has-tooltip')\n\t\t\t\t.tooltip({\n\t\t\t\t\tplacement: 'bottom'\n\t\t\t\t})\n\t\t\t\t.addClass('start')\n\t\t\t\t.val(startTime)\n\t\t\t\t.insertBefore($element);\n\t\t\t$('<input>')\n\t\t\t\t.attr('type', 'text')\n\t\t\t\t.attr('placeholder', t('workflowengine', 'End'))\n\t\t\t\t.attr('title', t('workflowengine', 'Example: {placeholder}', {placeholder: '16:00'}))\n\t\t\t\t.addClass('has-tooltip')\n\t\t\t\t.tooltip({\n\t\t\t\t\tplacement: 'bottom'\n\t\t\t\t})\n\t\t\t\t.addClass('end')\n\t\t\t\t.val(endTime)\n\t\t\t\t.insertBefore($element);\n\n\t\t\tvar timezoneInput = $('<input>')\n\t\t\t\t.attr('type', 'hidden')\n\t\t\t\t.css('width', '250px')\n\t\t\t\t.insertBefore($element)\n\t\t\t\t.val(timezone);\n\n\t\t\ttimezoneInput.select2({\n\t\t\t\tallowClear: false,\n\t\t\t\tmultiple: false,\n\t\t\t\tplaceholder: t('workflowengine', 'Select timezone…'),\n\t\t\t\tajax: {\n\t\t\t\t\turl: OC.generateUrl('apps/workflowengine/timezones'),\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tquietMillis: 100,\n\t\t\t\t\tdata: function (term) {\n\t\t\t\t\t\tif (term === '') {\n\t\t\t\t\t\t\t// Default search in the same continent...\n\t\t\t\t\t\t\tterm = jstz.determine().name().split('/');\n\t\t\t\t\t\t\tterm = term[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tsearch: term\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t\tresults: function (response) {\n\t\t\t\t\t\tvar results = [];\n\t\t\t\t\t\t$.each(response, function(timezone) {\n\t\t\t\t\t\t\tresults.push({ id: timezone });\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tresults: results,\n\t\t\t\t\t\t\tmore: false\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tinitSelection: function (element, callback) {\n\t\t\t\t\tcallback(element.val());\n\t\t\t\t},\n\t\t\t\tformatResult: function (element) {\n\t\t\t\t\treturn '<span>' + element.id + '</span>';\n\t\t\t\t},\n\t\t\t\tformatSelection: function (element) {\n\t\t\t\t\tif (!_.isUndefined(element.id)) {\n\t\t\t\t\t\telement = element.id;\n\t\t\t\t\t}\n\t\t\t\t\treturn '<span>' + element + '</span>';\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Has to be added after select2 for `event.target.classList`\n\t\t\ttimezoneInput.addClass('timezone');\n\n\t\t\t$element.parent()\n\t\t\t\t.on('change', '.start', _.bind(this.update, this))\n\t\t\t\t.on('change', '.end', _.bind(this.update, this))\n\t\t\t\t.on('change', '.timezone', _.bind(this.update, this));\n\n\t\t\tthis._$element = $element;\n\t\t},\n\t\tupdate: function(event) {\n\t\t\tvar value = event.target.value,\n\t\t\t\tkey = null;\n\n\t\t\tfor (var i = 0; i < event.target.classList.length; i++) {\n\t\t\t\tkey = event.target.classList[i];\n\t\t\t}\n\n\t\t\tif (key === null) {\n\t\t\t\tconsole.warn('update triggered but element doesn\\'t have any class');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar data = JSON.parse(this._$element.val()),\n\t\t\t\tstartTime = moment(data[0].split(' ', 2)[0], 'H:m Z'),\n\t\t\t\tendTime = moment(data[1].split(' ', 2)[0], 'H:m Z'),\n\t\t\t\ttimezone = data[0].split(' ', 2)[1];\n\n\t\t\tif (key === 'start' || key === 'end') {\n\t\t\t\tvar parsedDate = moment(value, ['H:m', 'h:m a'], true).format('HH:mm');\n\n\t\t\t\tif (parsedDate === 'Invalid date') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar indexValue = 0;\n\t\t\t\tif (key === 'end') {\n\t\t\t\t\tindexValue = 1;\n\t\t\t\t}\n\t\t\t\tdata[indexValue] = parsedDate + ' ' + timezone;\n\t\t\t}\n\n\t\t\tif (key === 'timezone') {\n\t\t\t\tdata[0] = startTime.format('HH:mm') + ' ' + value;\n\t\t\t\tdata[1] = endTime.format('HH:mm') + ' ' + value;\n\t\t\t}\n\n\t\t\tthis._$element.val(JSON.stringify(data));\n\t\t\tthis._$element.trigger('change');\n\t\t}\n\t};\n})();\n\nOC.Plugins.register('OCA.WorkflowEngine.CheckPlugins', OCA.WorkflowEngine.Plugins.RequestTimePlugin);\n","/**\n * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n(function() {\n\n\tOCA.WorkflowEngine = OCA.WorkflowEngine || {};\n\tOCA.WorkflowEngine.Plugins = OCA.WorkflowEngine.Plugins || {};\n\n\tOCA.WorkflowEngine.Plugins.RequestURLPlugin = {\n\t\tpredefinedValues: ['webdav'],\n\t\tgetCheck: function() {\n\t\t\treturn {\n\t\t\t\t'class': 'OCA\\\\WorkflowEngine\\\\Check\\\\RequestURL',\n\t\t\t\t'name': t('workflowengine', 'Request URL'),\n\t\t\t\t'operators': [\n\t\t\t\t\t{'operator': 'is', 'name': t('workflowengine', 'is')},\n\t\t\t\t\t{'operator': '!is', 'name': t('workflowengine', 'is not')},\n\t\t\t\t\t{'operator': 'matches', 'name': t('workflowengine', 'matches')},\n\t\t\t\t\t{'operator': '!matches', 'name': t('workflowengine', 'does not match')}\n\t\t\t\t]\n\t\t\t};\n\t\t},\n\t\trender: function(element, check) {\n\t\t\tif (check['class'] !== 'OCA\\\\WorkflowEngine\\\\Check\\\\RequestURL') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar placeholder = 'https://localhost/index.php';\n\n\t\t\tif (check['operator'] === 'matches' || check['operator'] === '!matches') {\n\t\t\t\tplaceholder = '/^https\\\\:\\\\/\\\\/localhost\\\\/index\\\\.php$/i';\n\t\t\t}\n\n\t\t\t$(element).css('width', '250px')\n\t\t\t\t.attr('placeholder', placeholder)\n\t\t\t\t.attr('title', t('workflowengine', 'Example: {placeholder}', {placeholder: placeholder}))\n\t\t\t\t.addClass('has-tooltip')\n\t\t\t\t.tooltip({\n\t\t\t\t\tplacement: 'bottom'\n\t\t\t\t});\n\n\t\t\tif (check['operator'] === 'matches' || check['operator'] === '!matches') {\n\t\t\t\tif (this._validateRegex(check['value'])) {\n\t\t\t\t\t$(element).removeClass('invalid-input');\n\t\t\t\t} else {\n\t\t\t\t\t$(element).addClass('invalid-input');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdata = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: t('workflowengine', 'Predefined URLs'),\n\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t{id: 'webdav', text: t('workflowengine', 'Files WebDAV')}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t];\n\t\t\t\tif (this.predefinedValues.indexOf(check['value']) === -1) {\n\t\t\t\t\tdata.unshift({\n\t\t\t\t\t\tid: check['value'],\n\t\t\t\t\t\ttext: check['value']\n\t\t\t\t\t})\n\t\t\t\t}\n\n\n\t\t\t\t$(element).select2({\n\t\t\t\t\tdata: data,\n\t\t\t\t\tcreateSearchChoice: function(term) {\n\t\t\t\t\t\tif (self.predefinedValues.indexOf(check['value']) === -1) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tid: term,\n\t\t\t\t\t\t\t\ttext: term\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tid: function(element) {\n\t\t\t\t\t\treturn element.id;\n\t\t\t\t\t},\n\t\t\t\t\tformatResult: function (tag) {\n\t\t\t\t\t\treturn tag.text;\n\t\t\t\t\t},\n\t\t\t\t\tformatSelection: function (tag) {\n\t\t\t\t\t\treturn tag.text;\n\t\t\t\t\t},\n\t\t\t\t\tescapeMarkup: function(m) {\n\t\t\t\t\t\treturn m;\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\n\t\t_validateRegex: function(string) {\n\t\t\tvar regexRegex = /^\\/(.*)\\/([gui]{0,3})$/,\n\t\t\t\tresult = regexRegex.exec(string);\n\t\t\treturn result !== null;\n\t\t}\n\t};\n})();\n\nOC.Plugins.register('OCA.WorkflowEngine.CheckPlugins', OCA.WorkflowEngine.Plugins.RequestURLPlugin);\n","/**\n * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n(function() {\n\n\tOCA.WorkflowEngine = OCA.WorkflowEngine || {};\n\tOCA.WorkflowEngine.Plugins = OCA.WorkflowEngine.Plugins || {};\n\n\tOCA.WorkflowEngine.Plugins.RequestUserAgentPlugin = {\n\t\tpredefinedValues: ['android', 'ios', 'desktop'],\n\t\tgetCheck: function() {\n\t\t\treturn {\n\t\t\t\t'class': 'OCA\\\\WorkflowEngine\\\\Check\\\\RequestUserAgent',\n\t\t\t\t'name': t('workflowengine', 'Request user agent'),\n\t\t\t\t'operators': [\n\t\t\t\t\t{'operator': 'is', 'name': t('workflowengine', 'is')},\n\t\t\t\t\t{'operator': '!is', 'name': t('workflowengine', 'is not')},\n\t\t\t\t\t{'operator': 'matches', 'name': t('workflowengine', 'matches')},\n\t\t\t\t\t{'operator': '!matches', 'name': t('workflowengine', 'does not match')}\n\t\t\t\t]\n\t\t\t};\n\t\t},\n\t\trender: function(element, check) {\n\t\t\tif (check['class'] !== 'OCA\\\\WorkflowEngine\\\\Check\\\\RequestUserAgent') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar placeholder = 'Mozilla/5.0 User Agent';\n\n\t\t\tif (check.operator === 'matches' || check.operator === '!matches') {\n\t\t\t\tplaceholder = '/^Mozilla\\\\/5\\\\.0 (.*)$/i';\n\t\t\t}\n\n\t\t\t$(element).css('width', '250px')\n\t\t\t\t.attr('placeholder', placeholder)\n\t\t\t\t.attr('title', t('workflowengine', 'Example: {placeholder}', {placeholder: placeholder}))\n\t\t\t\t.addClass('has-tooltip')\n\t\t\t\t.tooltip({\n\t\t\t\t\tplacement: 'bottom'\n\t\t\t\t});\n\n\t\t\tif (check.operator === 'matches' || check.operator === '!matches') {\n\t\t\t\tif (this._validateRegex(check.value)) {\n\t\t\t\t\t$(element).removeClass('invalid-input');\n\t\t\t\t} else {\n\t\t\t\t\t$(element).addClass('invalid-input');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar self = this,\n\t\t\t\t\tdata = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: t('workflowengine', 'Sync clients'),\n\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t{id: 'android', text: t('workflowengine', 'Android client')},\n\t\t\t\t\t\t\t{id: 'ios', text: t('workflowengine', 'iOS client')},\n\t\t\t\t\t\t\t{id: 'desktop', text: t('workflowengine', 'Desktop client')},\n\t\t\t\t\t\t\t{id: 'mail', text: t('workflowengine', 'Thunderbird & Outlook addons')}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t];\n\t\t\t\tif (this.predefinedValues.indexOf(check.value) === -1) {\n\t\t\t\t\tdata.unshift({\n\t\t\t\t\t\tid: check.value,\n\t\t\t\t\t\ttext: check.value\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t$(element).select2({\n\t\t\t\t\tdata: data,\n\t\t\t\t\tcreateSearchChoice: function(term) {\n\t\t\t\t\t\tif (self.predefinedValues.indexOf(check.value) === -1) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tid: term,\n\t\t\t\t\t\t\t\ttext: term\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tid: function(element) {\n\t\t\t\t\t\treturn element.id;\n\t\t\t\t\t},\n\t\t\t\t\tformatResult: function (tag) {\n\t\t\t\t\t\treturn tag.text;\n\t\t\t\t\t},\n\t\t\t\t\tformatSelection: function (tag) {\n\t\t\t\t\t\treturn tag.text;\n\t\t\t\t\t},\n\t\t\t\t\tescapeMarkup: function(m) {\n\t\t\t\t\t\treturn m;\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\n\t\t_validateRegex: function(string) {\n\t\t\tvar regexRegex = /^\\/(.*)\\/([gui]{0,3})$/,\n\t\t\t\tresult = regexRegex.exec(string);\n\t\t\treturn result !== null;\n\t\t}\n\t};\n})();\n\nOC.Plugins.register('OCA.WorkflowEngine.CheckPlugins', OCA.WorkflowEngine.Plugins.RequestUserAgentPlugin);\n","/**\n * @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n(function() {\n\n\tOCA.WorkflowEngine = OCA.WorkflowEngine || {};\n\tOCA.WorkflowEngine.Plugins = OCA.WorkflowEngine.Plugins || {};\n\n\tOCA.WorkflowEngine.Plugins.UserGroupMembershipPlugin = {\n\t\tgetCheck: function() {\n\t\t\treturn {\n\t\t\t\t'class': 'OCA\\\\WorkflowEngine\\\\Check\\\\UserGroupMembership',\n\t\t\t\t'name': t('workflowengine', 'User group membership'),\n\t\t\t\t'operators': [\n\t\t\t\t\t{'operator': 'is', 'name': t('workflowengine', 'is member of')},\n\t\t\t\t\t{'operator': '!is', 'name': t('workflowengine', 'is not member of')}\n\t\t\t\t]\n\t\t\t};\n\t\t},\n\t\trender: function(element, check, groups) {\n\t\t\tif (check['class'] !== 'OCA\\\\WorkflowEngine\\\\Check\\\\UserGroupMembership') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$(element).css('width', '400px');\n\n\t\t\t$(element).select2({\n\t\t\t\tdata: { results: groups, text: 'displayname' },\n\t\t\t\tinitSelection: function (element, callback) {\n\t\t\t\t\tvar groupId = element.val();\n\t\t\t\t\tif (groupId && groups.length > 0) {\n\t\t\t\t\t\tcallback({\n\t\t\t\t\t\t\tid: groupId,\n\t\t\t\t\t\t\tdisplayname: groups.find(function (group) {\n\t\t\t\t\t\t\t\treturn group.id === groupId;\n\t\t\t\t\t\t\t}).displayname\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (groupId) {\n\t\t\t\t\t\tcallback({\n\t\t\t\t\t\t\tid: groupId,\n\t\t\t\t\t\t\tdisplayname: groupId\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tformatResult: function (element) {\n\t\t\t\t\treturn '<span>' + escapeHTML(element.displayname) + '</span>';\n\t\t\t\t},\n\t\t\t\tformatSelection: function (element) {\n\t\t\t\t\treturn '<span title=\"'+escapeHTML(element.id)+'\">'+escapeHTML(element.displayname)+'</span>';\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n})();\n\nOC.Plugins.register('OCA.WorkflowEngine.CheckPlugins', OCA.WorkflowEngine.Plugins.UserGroupMembershipPlugin);\n"],"sourceRoot":""}