(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[38],{

/***/ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/main/packages/Parameters.vue?vue&type=script&lang=js&":
/*!*********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/main/packages/Parameters.vue?vue&type=script&lang=js& ***!
  \*********************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_packages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/packages */ \"./src/utils/packages.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  components: {},\n  props: {\n    item: Object,\n    isGroup: Boolean\n  },\n  data() {\n    return {\n      active: false,\n      parameter: \"\",\n      isValid: false,\n      pattern: /\\/(([a-zA-Z]+)):(([\"]{1})?([`'])?([a-zA-Z0-9- _\\\\:.]+)([\"]{1})?([`'])?)|\\/(([a-zA-Z]+))/g,\n      regex: new RegExp(this.pattern)\n    };\n  },\n  computed: {\n    store() {\n      if (this.isGroup) return \"groupPackage\";else return \"computerPackage\";\n    },\n    findParam() {\n      return params => {\n        return Object(_utils_packages__WEBPACK_IMPORTED_MODULE_0__[\"findParam\"])(params, `--package-parameters`);\n      };\n    }\n  },\n  mounted() {\n    this.active = Object(_utils_packages__WEBPACK_IMPORTED_MODULE_0__[\"findParam\"])(this.item.tempCommand.parameters, \"--package-parameters\") ? true : false;\n  },\n  methods: {\n    validate(input) {\n      const result = input.match(this.pattern);\n      if (result && result.length > 0) this.parameter = result.map(x => x.trim()).join(\" \");else this.parameter = \"\";\n      this.isValid = input && this.regex.test(input) && this.parameter.length == input.length;\n    },\n    clean(item) {\n      const currentParam = Object(_utils_packages__WEBPACK_IMPORTED_MODULE_0__[\"findParam\"])(item.tempCommand.parameters, \"--package-parameters\");\n      if (currentParam) {\n        const newParams = Object(_utils_packages__WEBPACK_IMPORTED_MODULE_0__[\"addTempParam\"])(item.tempCommand.parameters, currentParam);\n        this.$store.commit(`${this.store}/editMergedPackage`, {\n          p: this.item,\n          obj: {\n            tempCommand: null\n          }\n        });\n        this.$store.commit(`${this.store}/editMergedPackage`, {\n          p: this.item,\n          obj: {\n            tempCommand: {\n              ...item.tempCommand,\n              parameters: newParams\n            }\n          }\n        });\n      }\n    },\n    addTempParam(item, param) {\n      const currentParam = Object(_utils_packages__WEBPACK_IMPORTED_MODULE_0__[\"findParam\"])(item.tempCommand.parameters, \"--package-parameters\");\n      let newParams = \"\";\n      if (currentParam) {\n        newParams = Object(_utils_packages__WEBPACK_IMPORTED_MODULE_0__[\"addTempParam\"])(item.tempCommand.parameters, currentParam);\n      } else {\n        param = `--package-parameters='\"${param.replace(/\"/g, '\"\"')}\"'`;\n        newParams = Object(_utils_packages__WEBPACK_IMPORTED_MODULE_0__[\"addTempParam\"])(item.tempCommand.parameters, param);\n      }\n      this.$store.commit(`${this.store}/editMergedPackage`, {\n        p: this.item,\n        obj: {\n          tempCommand: {\n            ...item.tempCommand,\n            parameters: newParams\n          }\n        }\n      });\n    }\n  }\n});\n\n//# sourceURL=webpack:///./src/components/main/packages/Parameters.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"7d40fa80-vue-loader-template\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/main/packages/Parameters.vue?vue&type=template&id=7e566026&":
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7d40fa80-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/main/packages/Parameters.vue?vue&type=template&id=7e566026& ***!
  \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\"div\", { staticClass: \"box\" }, [\n    _vm.active || _vm.findParam(_vm.item.tempCommand.parameters)\n      ? _c(\"p\", [\n          _c(\n            \"a\",\n            {\n              staticClass: \"title is-5 is-unselectable\",\n              attrs: { \"data-tooltip\": \"Click to remove\" },\n              on: {\n                click: function($event) {\n                  _vm.clean(_vm.item)\n                  _vm.active = false\n                }\n              }\n            },\n            [\n              _c(\n                \"span\",\n                {\n                  directives: [\n                    {\n                      name: \"show\",\n                      rawName: \"v-show\",\n                      value: _vm.findParam(_vm.item.tempCommand.parameters),\n                      expression: \"findParam(item.tempCommand.parameters)\"\n                    }\n                  ]\n                },\n                [_vm._m(0)]\n              ),\n              _vm._v(\" Package parameters \"),\n              _vm._m(1)\n            ]\n          )\n        ])\n      : _vm._e(),\n    !_vm.active && !_vm.findParam(_vm.item.tempCommand.parameters)\n      ? _c(\n          \"a\",\n          {\n            staticClass: \"title is-5 is-unselectable\",\n            attrs: { \"data-tooltip\": \"Click to add\" },\n            on: {\n              click: function($event) {\n                _vm.active = true\n              }\n            }\n          },\n          [_vm._v(\" Package parameters (none) \"), _vm._m(2)]\n        )\n      : _vm._e(),\n    _vm.active || _vm.findParam(_vm.item.tempCommand.parameters)\n      ? _c(\"div\", { staticClass: \"extrapadding\" }, [\n          !_vm.findParam(_vm.item.tempCommand.parameters)\n            ? _c(\"section\", [\n                _c(\"div\", { staticClass: \"control\" }, [\n                  _c(\"input\", {\n                    staticClass: \"input\",\n                    class: {\n                      \"is-warning\": !_vm.isValid,\n                      \"is-success\": _vm.isValid\n                    },\n                    attrs: {\n                      id: \"param\",\n                      name: \"param\",\n                      type: \"text\",\n                      placeholder:\n                        'Package parameters eg. /something /key:value /key:\"some value with space\"',\n                      value: \"\",\n                      autocomplete: \"off\",\n                      autocorrect: \"off\",\n                      autocapitalize: \"off\",\n                      spellcheck: \"false\"\n                    },\n                    on: {\n                      input: function($event) {\n                        return _vm.validate($event.target.value)\n                      },\n                      keydown: function($event) {\n                        if (\n                          !$event.type.indexOf(\"key\") &&\n                          _vm._k(\n                            $event.keyCode,\n                            \"enter\",\n                            13,\n                            $event.key,\n                            \"Enter\"\n                          )\n                        ) {\n                          return null\n                        }\n                        _vm.isValid && _vm.addTempParam(_vm.item, _vm.parameter)\n                      }\n                    }\n                  })\n                ]),\n                _c(\n                  \"button\",\n                  {\n                    staticClass: \"button margin-top-10 is-success is-small\",\n                    attrs: { disabled: !_vm.isValid },\n                    on: {\n                      click: function($event) {\n                        _vm.isValid && _vm.addTempParam(_vm.item, _vm.parameter)\n                      }\n                    }\n                  },\n                  [_vm._v(\" Add \")]\n                )\n              ])\n            : _vm._e(),\n          _vm.findParam(_vm.item.tempCommand.parameters)\n            ? _c(\"section\", [\n                _c(\"pre\", [\n                  _vm._v(_vm._s(_vm.findParam(_vm.item.tempCommand.parameters)))\n                ]),\n                _c(\n                  \"button\",\n                  {\n                    staticClass: \"button margin-top-10 is-danger is-small\",\n                    on: {\n                      click: function($event) {\n                        return _vm.clean(_vm.item)\n                      }\n                    }\n                  },\n                  [_vm._v(\" Reset \")]\n                )\n              ])\n            : _vm._e()\n        ])\n      : _vm._e()\n  ])\n}\nvar staticRenderFns = [\n  function() {\n    var _vm = this\n    var _h = _vm.$createElement\n    var _c = _vm._self._c || _h\n    return _c(\"span\", { staticClass: \"icon has-text-success\" }, [\n      _c(\"i\", { staticClass: \"mdi mdi-check has-text-success\" })\n    ])\n  },\n  function() {\n    var _vm = this\n    var _h = _vm.$createElement\n    var _c = _vm._self._c || _h\n    return _c(\"span\", { staticClass: \"icon\" }, [\n      _c(\"i\", { staticClass: \"mdi mdi-chevron-up\" })\n    ])\n  },\n  function() {\n    var _vm = this\n    var _h = _vm.$createElement\n    var _c = _vm._self._c || _h\n    return _c(\"span\", { staticClass: \"icon\" }, [\n      _c(\"i\", { staticClass: \"mdi mdi-chevron-down\" })\n    ])\n  }\n]\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/components/main/packages/Parameters.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%227d40fa80-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./src/components/main/packages/Parameters.vue":
/*!*****************************************************!*\
  !*** ./src/components/main/packages/Parameters.vue ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Parameters_vue_vue_type_template_id_7e566026___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Parameters.vue?vue&type=template&id=7e566026& */ \"./src/components/main/packages/Parameters.vue?vue&type=template&id=7e566026&\");\n/* harmony import */ var _Parameters_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Parameters.vue?vue&type=script&lang=js& */ \"./src/components/main/packages/Parameters.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n  _Parameters_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _Parameters_vue_vue_type_template_id_7e566026___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n  _Parameters_vue_vue_type_template_id_7e566026___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/components/main/packages/Parameters.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/main/packages/Parameters.vue?");

/***/ }),

/***/ "./src/components/main/packages/Parameters.vue?vue&type=script&lang=js&":
/*!******************************************************************************!*\
  !*** ./src/components/main/packages/Parameters.vue?vue&type=script&lang=js& ***!
  \******************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Parameters_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/babel-loader/lib!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./Parameters.vue?vue&type=script&lang=js& */ \"./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/main/packages/Parameters.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Parameters_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/components/main/packages/Parameters.vue?");

/***/ }),

/***/ "./src/components/main/packages/Parameters.vue?vue&type=template&id=7e566026&":
/*!************************************************************************************!*\
  !*** ./src/components/main/packages/Parameters.vue?vue&type=template&id=7e566026& ***!
  \************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_7d40fa80_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Parameters_vue_vue_type_template_id_7e566026___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"7d40fa80-vue-loader-template\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./Parameters.vue?vue&type=template&id=7e566026& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"7d40fa80-vue-loader-template\\\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/main/packages/Parameters.vue?vue&type=template&id=7e566026&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_7d40fa80_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Parameters_vue_vue_type_template_id_7e566026___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_7d40fa80_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Parameters_vue_vue_type_template_id_7e566026___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/main/packages/Parameters.vue?");

/***/ })

}]);