{"version":3,"sources":["webpack:///./src/consts/curveConfigDefaults.ts","webpack:///./src/views/referencecurves/PowerSpeed.vue?ac1e","webpack:///./src/components/referencecurves/PowerSpeedConfigEditDialog.vue?f0fa","webpack:///./src/components/referencecurves/PowerSpeedCurveDataEditDialog.vue?52ad","webpack:///./src/components/referencecurves/PowerSpeedCurveDataEditDialog.vue","webpack:///./src/components/referencecurves/PowerSpeedCurveDataEditDialog.vue?a82c","webpack:///./src/components/referencecurves/PowerSpeedCurveDataEditDialog.vue?5c1c","webpack:///./src/Scripts/clients/power-speed-curve-client.js","webpack:///./src/components/referencecurves/PowerSpeedConfigEditDialog.vue","webpack:///./src/components/referencecurves/PowerSpeedConfigEditDialog.vue?c103","webpack:///./src/components/referencecurves/PowerSpeedConfigEditDialog.vue?cb89","webpack:///./src/views/referencecurves/PowerSpeed.vue","webpack:///./src/views/referencecurves/PowerSpeed.vue?b682","webpack:///./src/views/referencecurves/PowerSpeed.vue?96cf","webpack:///./src/components/VesselSelectSimple.vue?7bd3","webpack:///./src/components/VesselSelectSimple.vue","webpack:///./src/components/VesselSelectSimple.vue?16ac","webpack:///./src/components/VesselSelectSimple.vue?9b17","webpack:///./src/views/referencecurves/PowerSpeed.vue?4fae","webpack:///./src/components/referencecurves/PowerSpeedConfigEditDialog.vue?343b","webpack:///./src/components/VesselSelectSimple.vue?28df","webpack:///../../../src/components/VTextarea/VTextarea.ts","webpack:///./src/Scripts/utilities/numericFilter.js","webpack:///./src/types/PowerSpeedCurveConfig.ts","webpack:///./src/components/referencecurves/PowerSpeedCurveDataEditDialog.vue?6feb"],"names":["curveTypeFormula","CurveFunction","Hoerl","min","max","Rational","Polynomial","Power","render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","attrs","on","addConfig","doSearchDebounced","slot","headers","filtredConfigs","debounceLoader","scopedSlots","_u","key","fn","ref","item","_g","isConfigValid","_l","vesselId","index","_s","getVesselName","$event","openConfigEditDialog","deleteConfig","proxy","editDialog","configToEdit","allVessels","currentCompanyVessels","fetchConfigs","staticRenderFns","dialogWidth","model","value","callback","$$v","isOpen","expression","selectedTab","clonedConfig","$set","powerSpeedCurveData","curveFormula","curveFunction","speedMin","speedMax","draftMin","draftMax","powerSpeedCurveParameters","length","openEditCurveSegmentModal","deleteCurveSegment","addNewCurve","companies","contentClass","onCompanyChanged","selectedCompanyId","filteredVessels","selectedVessels","saveConfig","discardChanges","editCurveSegmentDialog","curveSegmentToEdit","curveSegmentIndexToEdit","handleCurveSegmentSave","_e","curveOptions","clonedCurveData","selectedCurveFunctionFormula","_n","numericFilter","replaceDecimalPeriod","parameter","constant","refInFor","showActions","isRemoveConstantEnabled","removeParameter","isAddConstantEnabled","addParameter","saveChanges","PowerSpeedCurveDataEditDialog","parameters","Object","keys","selectedCurveFunction","JSON","parse","stringify","curveData","parametersNeeded","addMissingParameters","slice","push","missingParameters","filter","p","some","c","forEach","id","a0","a1","a2","event","numberHelper","numericWithNegativeFilter","includes","$refs","internalValue","replace","curveParameters","pop","$emit","curveDataIndex","Vue","__decorate","PropSync","required","default","Prop","Watch","Component","component","VBtn","VCard","VCardActions","VCardText","VCol","VDialog","VDivider","VIcon","VRow","VSelect","VTextField","VToolbar","VToolbarTitle","VTooltip","PowerSpeedCurveClient","net","get","post","config","put","del","Companies","getModule","CompaniesModule","store","User","UserModule","PowerSpeedConfigEditDialog","showAllCompany","name","text","class","width","sortable","searchQuery","_","debounce","updateSearchQueryInput","alreadySelectedVesselIds","vesselIds","v","i","userCompanyId","vessels","toLowerCase","Boolean","confirmDelete","open","confirmed","indexOf","splice","newValue","setTimeout","newCurve","map","updateConfig","handleConfigChange","VesselsClient","getVesselsByCompanyId","updatedCurveData","refreshCompanies","getVessels","unshift","Ref","components","VesselSelectSimple","ConfirmDialog","VDataTable","VProgressCircular","VTab","VTabItem","VTabs","VTabsItems","VTextarea","PowerSpeed","configs","isAdmin","vesselInSearch","isVesselInSearch","hasSearchQuery","description","getAllConfigs","postEmptyConfig","find","minNumberOfConstants","numberOfConstants","hasAtLeastOneCurve","areCurvesValid","every","isValidCurveData","$router","ignoreCompany","VSpacer","vessel","toggleVesselSelection","selectedVesselIds","_t","isSelected","parseInt","findIndex","type","Array","VCheckbox","VList","VListItem","baseMixins","mixins","extend","props","autoGrow","noResize","rowHeight","Number","String","validator","isNaN","parseFloat","rows","computed","classes","noResizeHandle","options","call","watch","val","$nextTick","calculateInputHeight","input","_this$$refs$input","style","removeProperty","lazyValue","mounted","methods","height","scrollHeight","minHeight","Math","genInput","tag","data","onInput","e","onKeyDown","isFocused","keyCode","stopPropagation","window","expect","target","toString","test","preventDefault"],"mappings":"yMAkCaA,GAnBmB,sBAC7BC,OAAcC,MAAQ,CACrBC,IAAK,EACLC,IAAK,IAHuB,iBAK7BH,OAAcI,SAAW,CACxBF,IAAK,EACLC,IAAK,IAPuB,iBAS7BH,OAAcK,WAAa,CAC1BH,IAAK,EACLC,IAAK,IAXuB,iBAa7BH,OAAcM,MAAQ,CACrBJ,IAAK,EACLC,IAAK,IAIoB,sBAC1BH,OAAcC,MAAQ,mBADI,iBAE1BD,OAAcI,SAAW,wBAFC,iBAG1BJ,OAAcK,WAAa,uBAHD,iBAI1BL,OAAcM,MAAQ,WAJI,I,2CClC7B,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,oBAAoB,CAACA,EAAG,KAAK,CAACE,YAAY,oBAAoB,CAACN,EAAIO,GAAG,+BAA+BH,EAAG,YAAYA,EAAG,QAAQ,CAACE,YAAY,wBAAwBE,MAAM,CAAC,MAAQ,GAAG,MAAQ,UAAUC,GAAG,CAAC,MAAQT,EAAIU,YAAY,CAACN,EAAG,SAAS,CAACI,MAAM,CAAC,MAAQ,KAAK,CAACR,EAAIO,GAAG,cAAcP,EAAIO,GAAG,iBAAiB,IAAI,GAAGH,EAAG,eAAe,CAACE,YAAY,iCAAiCE,MAAM,CAAC,MAAQ,SAA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AYA,GACVA,mBACAA,6BACAA,yBACAA,mBAJF,CAAYA,MAAa,M,kCCzBzB","file":"js/chunk-4ec7a860.ce41f04e.js","sourcesContent":["import { CurveFunction } from \"@/types/PowerSpeedCurveConfig\";\r\n\r\ntype CurveConstantCount = {\r\n // eslint-disable-next-line no-unused-vars\r\n [key in CurveFunction]: {\r\n min: number;\r\n max: number;\r\n };\r\n};\r\n\r\ntype CurveFunctionFormula = {\r\n // eslint-disable-next-line no-unused-vars\r\n [key in CurveFunction]: string;\r\n};\r\n\r\nexport const curveConstantsCount: CurveConstantCount = {\r\n [CurveFunction.Hoerl]: {\r\n min: 3,\r\n max: 3,\r\n },\r\n [CurveFunction.Rational]: {\r\n min: 4,\r\n max: 4,\r\n },\r\n [CurveFunction.Polynomial]: {\r\n min: 3,\r\n max: 7,\r\n },\r\n [CurveFunction.Power]: {\r\n min: 3,\r\n max: 7,\r\n },\r\n};\r\n\r\nexport const curveTypeFormula: CurveFunctionFormula = {\r\n [CurveFunction.Hoerl]: \"y=A*(B^x)*(x^C)\",\r\n [CurveFunction.Rational]: \"y=(A+Bx)/(1+Cx+Dx^2)\",\r\n [CurveFunction.Polynomial]: \"y=A+Bx+Cx^2+Dx^3...\",\r\n [CurveFunction.Power]: \"y=A*x^B\",\r\n};\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('default-container',[_c('h1',{staticClass:\"d-flex pt-4 px-4\"},[_vm._v(\" Power Speed Curve Configs \"),_c('v-spacer'),_c('v-btn',{staticClass:\"ml-2 font-weight-bold\",attrs:{\"small\":\"\",\"color\":\"accent\"},on:{\"click\":_vm.addConfig}},[_c('v-icon',{attrs:{\"small\":\"\"}},[_vm._v(\"mdi-plus\")]),_vm._v(\" Add Config \")],1)],1),_c('v-text-field',{staticClass:\"filter-input search-input px-4\",attrs:{\"label\":\"Search\",\"append-icon\":\"mdi-magnify\",\"persistent-placeholder\":\"\",\"hide-details\":\"\",\"flat\":\"\",\"outlined\":\"\",\"dense\":\"\"},on:{\"input\":_vm.doSearchDebounced}},[_c('template',{slot:\"append\"},[(_vm.debounceLoader)?_c('v-progress-circular',{staticClass:\"circle-loader\",attrs:{\"indeterminate\":\"\",\"color\":\"neutralDark75\"}}):_c('v-icon',[_vm._v(\"mdi-magnify\")])],1)],2),_c('v-data-table',{staticClass:\"configs-data-table\",attrs:{\"headers\":_vm.headers,\"items\":_vm.filtredConfigs,\"loading\":_vm.debounceLoader},scopedSlots:_vm._u([{key:\"item.isValid\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('span',_vm._g({},on),[(_vm.isConfigValid(item))?_c('v-icon',{attrs:{\"color\":\"success\"}},[_vm._v(\"mdi-check-circle-outline\")]):_c('v-icon',{attrs:{\"color\":\"error\"}},[_vm._v(\"mdi-alert-circle-outline\")])],1)]}}],null,true)},[(_vm.isConfigValid(item))?_c('span',[_vm._v(\"Config is valid\")]):_c('span',[_vm._v(\"Config is NOT valid\")])])]}},{key:\"item.vessels\",fn:function(ref){\nvar item = ref.item;\nreturn _vm._l((item.vesselIds),function(vesselId,index){return _c('v-tooltip',{key:index,attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('span',_vm._g({},on),[_vm._v(\" \"+_vm._s(_vm.getVesselName(vesselId))+\"; \")])]}}],null,true)},[_c('span',[_vm._v(_vm._s(_vm.getVesselName(vesselId)))])])})}},{key:\"item.edit\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('v-btn',_vm._g({attrs:{\"small\":\"\",\"icon\":\"\"},on:{\"click\":function($event){return _vm.openConfigEditDialog(item)}}},on),[_c('v-icon',{attrs:{\"color\":\"primary\"}},[_vm._v(\"mdi-pencil-outline\")])],1)]}}],null,true)},[_c('span',[_vm._v(\"Edit Config\")])])]}},{key:\"item.delete\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('v-btn',_vm._g({attrs:{\"small\":\"\",\"icon\":\"\"},on:{\"click\":function($event){return _vm.deleteConfig(item)}}},on),[_c('v-icon',{attrs:{\"color\":\"red\"}},[_vm._v(\"mdi-delete-outline\")])],1)]}}],null,true)},[_c('span',[_vm._v(\"Delete Config\")])])]}},(_vm.isNoData)?{key:\"no-data\",fn:function(){return [_c('div',{staticClass:\"no-data-slot\"},[_c('h6',{staticClass:\"text-h6\"},[_vm._v(\"There are no configs created yet\")])])]},proxy:true}:null],null,true)}),_c('PowerSpeedConfigEditDialog',{attrs:{\"value\":_vm.editDialog,\"config\":_vm.configToEdit,\"allVessels\":_vm.allVessels,\"currentCompanyVessels\":_vm.currentCompanyVessels,\"max-width\":'1050px'},on:{\"update:value\":function($event){_vm.editDialog=$event},\"onConfigSave\":_vm.fetchConfigs}}),_c('ConfirmDialog',{ref:\"confirmDelete\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.clonedConfig)?_c('v-dialog',{attrs:{\"max-width\":_vm.dialogWidth},model:{value:(_vm.isOpen),callback:function ($$v) {_vm.isOpen=$$v},expression:\"isOpen\"}},[_c('v-card',[_c('v-toolbar',{staticClass:\"font-weight-bold\",attrs:{\"dark\":\"\",\"color\":\"accent\",\"dense\":\"\",\"flat\":\"\"}},[_c('v-toolbar-title',[_vm._v(\" Add config \")])],1),_c('v-card-text',{staticClass:\"pb-0 pt-4\"},[_c('div',[_c('v-tabs',{staticClass:\"mb-4\",attrs:{\"grow\":\"\"},model:{value:(_vm.selectedTab),callback:function ($$v) {_vm.selectedTab=$$v},expression:\"selectedTab\"}},[_c('v-tab',{key:\"general\",staticClass:\"font-weight-bold\"},[_vm._v(\"Description\")]),_c('v-tab',{key:\"curves\",staticClass:\"font-weight-bold\"},[_vm._v(\"Curve segments\")]),_c('v-tab',{key:\"vessels\",staticClass:\"font-weight-bold\"},[_vm._v(\"Assigned vessels\")])],1),_c('v-tabs-items',{staticClass:\"tabs-content\",model:{value:(_vm.selectedTab),callback:function ($$v) {_vm.selectedTab=$$v},expression:\"selectedTab\"}},[_c('v-tab-item',{key:\"general\"},[_c('v-row',{staticClass:\"mt-2\"},[_c('v-col',[_c('v-textarea',{attrs:{\"clear-icon\":\"mdi-close-circle\",\"label\":\"Description\",\"row-height\":\"20\",\"rows\":\"2\",\"auto-grow\":\"\",\"persistent-placeholder\":\"\",\"clearable\":\"\",\"hide-details\":\"\",\"flat\":\"\",\"outlined\":\"\"},model:{value:(_vm.clonedConfig.description),callback:function ($$v) {_vm.$set(_vm.clonedConfig, \"description\", $$v)},expression:\"clonedConfig.description\"}})],1)],1)],1),_c('v-tab-item',{key:\"curves\"},[_c('v-data-table',{staticClass:\"configs-data-table\",attrs:{\"headers\":_vm.headers,\"items\":_vm.clonedConfig.powerSpeedCurveData},scopedSlots:_vm._u([{key:\"item.curveFormula\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('strong',{staticClass:\"mt-0 draft-measurement\"},[_vm._v(\" \"+_vm._s(_vm.curveFormula(item.curveFunction))+\" \")])]}},{key:\"item.speed\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(item.speedMin)+\" - \"+_vm._s(item.speedMax)+\" \")]}},{key:\"item.draft\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(item.draftMin)+\" - \"+_vm._s(item.draftMax)+\" \")]}},{key:\"item.constants\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(item.powerSpeedCurveParameters.length)+\" \")]}},{key:\"item.edit\",fn:function(ref){\nvar item = ref.item;\nvar index = ref.index;\nreturn [_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('v-btn',_vm._g({attrs:{\"small\":\"\",\"icon\":\"\"},on:{\"click\":function($event){return _vm.openEditCurveSegmentModal(item, index)}}},on),[_c('v-icon',{attrs:{\"color\":\"primary\"}},[_vm._v(\"mdi-pencil-outline\")])],1)]}}],null,true)},[_c('span',[_vm._v(\"Edit Config\")])])]}},{key:\"item.delete\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('v-btn',_vm._g({attrs:{\"small\":\"\",\"icon\":\"\"},on:{\"click\":function($event){return _vm.deleteCurveSegment(item)}}},on),[_c('v-icon',{attrs:{\"color\":\"red\"}},[_vm._v(\"mdi-delete-outline\")])],1)]}}],null,true)},[_c('span',[_vm._v(\"Delete Config\")])])]}},(_vm.isNoData)?{key:\"no-data\",fn:function(){return [_c('div',{staticClass:\"no-data-slot\"},[_c('h6',{staticClass:\"text-h6 mb-0\"},[_vm._v(\"There are no curve segments created yet\")])])]},proxy:true}:null],null,true)}),_c('v-btn',{staticClass:\"mb-2 font-weight-bold primary--text\",attrs:{\"color\":\"neutralLighten100\",\"small\":\"\",\"dark\":\"\"},on:{\"click\":_vm.addNewCurve}},[_vm._v(\" Add curve segment \")])],1),_c('v-tab-item',[_c('div',{staticClass:\"filters pt-2 mb-6\"},[_c('v-text-field',{staticClass:\"filter-input search-input\",attrs:{\"label\":\"Search by vessel name\",\"append-icon\":\"mdi-magnify\",\"persistent-placeholder\":\"\",\"hide-details\":\"\",\"flat\":\"\",\"outlined\":\"\",\"dense\":\"\"},on:{\"input\":_vm.doSearchDebounced}},[_c('template',{slot:\"append\"},[(_vm.debounceLoader)?_c('v-progress-circular',{staticClass:\"circle-loader\",attrs:{\"indeterminate\":\"\",\"color\":\"neutralDark75\"}}):_c('v-icon',[_vm._v(\"mdi-magnify\")])],1)],2),_c('v-select',{staticClass:\"filter-input company-select\",attrs:{\"items\":_vm.companies,\"item-value\":\"id\",\"item-text\":\"name\",\"label\":\"Filter vessels by Company\",\"menu-props\":{ contentClass: 'company-select-dropdown' },\"persistent-placeholder\":\"\",\"hide-details\":\"\",\"dense\":\"\",\"outlined\":\"\"},on:{\"change\":_vm.onCompanyChanged},model:{value:(_vm.selectedCompanyId),callback:function ($$v) {_vm.selectedCompanyId=$$v},expression:\"selectedCompanyId\"}})],1),_c('VesselSelectSimple',{attrs:{\"vessels\":_vm.filteredVessels,\"selectedVesselsList\":_vm.selectedVessels},on:{\"update:selectedVesselsList\":function($event){_vm.selectedVessels=$event},\"update:selected-vessels-list\":function($event){_vm.selectedVessels=$event}}})],1)],1)],1)]),_c('v-card-actions',{staticClass:\"justify-end align-center pb-4 pt-1 px-4\"},[_c('v-btn',{staticClass:\"font-weight-bold\",attrs:{\"color\":\"accent\"},on:{\"click\":_vm.saveConfig}},[_vm._v(\"Save\")]),_c('v-btn',{staticClass:\"font-weight-bold\",attrs:{\"text\":\"\"},on:{\"click\":_vm.discardChanges}},[_vm._v(\"Cancel\")])],1)],1),_c('ConfirmDialog',{ref:\"confirmDelete\"}),_c('PowerSpeedCurveDataEditDialog',{attrs:{\"value\":_vm.editCurveSegmentDialog,\"config\":_vm.clonedConfig,\"curveData\":_vm.curveSegmentToEdit,\"curveDataIndex\":_vm.curveSegmentIndexToEdit,\"max-width\":'680px'},on:{\"update:value\":function($event){_vm.editCurveSegmentDialog=$event},\"onSave\":_vm.handleCurveSegmentSave}})],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.clonedCurveData)?_c('v-dialog',{attrs:{\"max-width\":_vm.dialogWidth},model:{value:(_vm.isOpen),callback:function ($$v) {_vm.isOpen=$$v},expression:\"isOpen\"}},[_c('v-card',[_c('v-toolbar',{attrs:{\"dark\":\"\",\"color\":\"accent\",\"dense\":\"\",\"flat\":\"\"}},[_c('v-toolbar-title',{staticClass:\"font-weight-bold\"},[_vm._v(\" Curve settings \")])],1),_c('v-card-text',{staticClass:\"px-4 py-8\"},[_c('v-row',[_c('v-col',[_c('v-select',{attrs:{\"items\":_vm.curveOptions,\"label\":\"Curve Function\",\"persistent-placeholder\":\"\",\"hide-details\":\"\",\"dense\":\"\",\"outlined\":\"\"},model:{value:(_vm.clonedCurveData.curveFunction),callback:function ($$v) {_vm.$set(_vm.clonedCurveData, \"curveFunction\", $$v)},expression:\"clonedCurveData.curveFunction\"}})],1),_c('v-col',[_c('v-text-field',{attrs:{\"label\":\"Function\",\"persistent-placeholder\":\"\",\"disabled\":true,\"hide-details\":\"\",\"flat\":\"\",\"outlined\":\"\",\"dense\":\"\"},model:{value:(_vm.selectedCurveFunctionFormula),callback:function ($$v) {_vm.selectedCurveFunctionFormula=_vm._n($$v)},expression:\"selectedCurveFunctionFormula\"}})],1)],1),_c('v-row',[_c('v-col',{attrs:{\"cols\":\"6\"}},[_c('v-text-field',{ref:\"draftMin\",attrs:{\"label\":\"From (Draft)\",\"suffix\":\"m\",\"persistent-placeholder\":\"\",\"hide-details\":\"\",\"flat\":\"\",\"outlined\":\"\",\"dense\":\"\"},on:{\"keypress\":_vm.numericFilter,\"input\":function($event){return _vm.replaceDecimalPeriod($event, 'draftMin')}},model:{value:(_vm.clonedCurveData.draftMin),callback:function ($$v) {_vm.$set(_vm.clonedCurveData, \"draftMin\", _vm._n($$v))},expression:\"clonedCurveData.draftMin\"}})],1),_c('v-col',{attrs:{\"cols\":\"6\"}},[_c('v-text-field',{ref:\"draftMax\",attrs:{\"label\":\"To (Draft)\",\"suffix\":\"m\",\"persistent-placeholder\":\"\",\"hide-details\":\"\",\"flat\":\"\",\"outlined\":\"\",\"dense\":\"\"},on:{\"keypress\":_vm.numericFilter,\"input\":function($event){return _vm.replaceDecimalPeriod($event, 'draftMax')}},model:{value:(_vm.clonedCurveData.draftMax),callback:function ($$v) {_vm.$set(_vm.clonedCurveData, \"draftMax\", _vm._n($$v))},expression:\"clonedCurveData.draftMax\"}})],1),_c('v-col',{attrs:{\"cols\":\"6\"}},[_c('v-text-field',{ref:\"speedMin\",attrs:{\"label\":\"Min Speed\",\"suffix\":\"Knots\",\"persistent-placeholder\":\"\",\"hide-details\":\"\",\"flat\":\"\",\"outlined\":\"\",\"dense\":\"\"},on:{\"keypress\":_vm.numericFilter,\"input\":function($event){return _vm.replaceDecimalPeriod($event, 'speedMin')}},model:{value:(_vm.clonedCurveData.speedMin),callback:function ($$v) {_vm.$set(_vm.clonedCurveData, \"speedMin\", _vm._n($$v))},expression:\"clonedCurveData.speedMin\"}})],1),_c('v-col',{attrs:{\"cols\":\"6\"}},[_c('v-text-field',{ref:\"speedMax\",attrs:{\"label\":\"Max speed\",\"suffix\":\"Knots\",\"persistent-placeholder\":\"\",\"hide-details\":\"\",\"flat\":\"\",\"outlined\":\"\",\"dense\":\"\"},on:{\"keypress\":_vm.numericFilter,\"input\":function($event){return _vm.replaceDecimalPeriod($event, 'speedMax')}},model:{value:(_vm.clonedCurveData.speedMax),callback:function ($$v) {_vm.$set(_vm.clonedCurveData, \"speedMax\", _vm._n($$v))},expression:\"clonedCurveData.speedMax\"}})],1)],1),_c('v-row',[_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('div',{staticClass:\"constants-editor-wrapper\"},[_c('div',{staticClass:\"constants-editor-header\"},[_c('div',{staticClass:\"subtitle-1 font-weight-bold primary--text mb-2\"},[_vm._v(\"Constants\")]),_c('v-divider',{staticClass:\"mb-6\"})],1),_vm._l((_vm.curveParameters),function(parameter,index){return _c('div',{key:index,staticClass:\"constant-field mb-8\"},[_c('p',{staticClass:\"mb-0\"},[_c('span',{staticClass:\"constant-symbol\"},[_vm._v(\"Constant \"+_vm._s(parameter.constant)+\":\")])]),_c('div',{staticClass:\"constant-field-list\"},[_c('v-text-field',{ref:(\"constant\" + (parameter.constant) + \"0\"),refInFor:true,attrs:{\"label\":((parameter.constant) + \"0\"),\"hide-details\":\"\",\"flat\":\"\",\"outlined\":\"\",\"dense\":\"\"},on:{\"keypress\":_vm.numericFilter,\"input\":function($event){return _vm.replaceDecimalPeriod($event, ((parameter.constant) + \"0\"))}},model:{value:(parameter.a0),callback:function ($$v) {_vm.$set(parameter, \"a0\", _vm._n($$v))},expression:\"parameter.a0\"}}),_c('v-text-field',{ref:(\"constant\" + (parameter.constant) + \"1\"),refInFor:true,attrs:{\"label\":((parameter.constant) + \"1\"),\"hide-details\":\"\",\"flat\":\"\",\"outlined\":\"\",\"dense\":\"\"},on:{\"keypress\":_vm.numericFilter,\"input\":function($event){return _vm.replaceDecimalPeriod($event, ((parameter.constant) + \"1\"))}},model:{value:(parameter.a1),callback:function ($$v) {_vm.$set(parameter, \"a1\", _vm._n($$v))},expression:\"parameter.a1\"}}),_c('v-text-field',{ref:(\"constant\" + (parameter.constant) + \"2\"),refInFor:true,attrs:{\"label\":((parameter.constant) + \"2\"),\"hide-details\":\"\",\"flat\":\"\",\"outlined\":\"\",\"dense\":\"\"},on:{\"keypress\":_vm.numericFilter,\"input\":function($event){return _vm.replaceDecimalPeriod($event, ((parameter.constant) + \"2\"))}},model:{value:(parameter.a2),callback:function ($$v) {_vm.$set(parameter, \"a2\", _vm._n($$v))},expression:\"parameter.a2\"}})],1),(parameter.constant === 'D' && _vm.showActions)?_c('v-tooltip',{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [(_vm.isRemoveConstantEnabled())?_c('v-btn',_vm._g({staticClass:\"remove-constant\",attrs:{\"color\":\"error\",\"fab\":\"\",\"dark\":\"\",\"x-small\":\"\"},on:{\"click\":_vm.removeParameter}},on),[_c('v-icon',{attrs:{\"dark\":\"\"}},[_vm._v(\"mdi-minus\")])],1):_vm._e()]}}],null,true)},[_c('span',[_vm._v(\"Remove constant\")])]):_vm._e()],1)}),(_vm.showActions)?_c('v-btn',{staticClass:\"ma-2\",attrs:{\"disabled\":!_vm.isAddConstantEnabled(),\"color\":\"neutralLighten100\",\"small\":\"\"},on:{\"click\":_vm.addParameter}},[_c('v-icon',{attrs:{\"small\":\"\"}},[_vm._v(\"mdi-plus\")]),_vm._v(\"Add constant\")],1):_vm._e()],2)])],1)],1),_c('v-card-actions',{staticClass:\"justify-end align-center pb-4 pt-1 px-4\"},[_c('v-btn',{staticClass:\"font-weight-bold\",attrs:{\"color\":\"accent\"},on:{\"click\":_vm.saveChanges}},[_vm._v(\"Save\")]),_c('v-btn',{staticClass:\"font-weight-bold\",attrs:{\"text\":\"\"},on:{\"click\":_vm.discardChanges}},[_vm._v(\"Cancel\")])],1)],1)],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport numberHelper from \"Utilities/number-helper\";\nimport { curveTypeFormula } from \"@/consts/curveConfigDefaults\";\nimport { CurveFunction, PowerSpeedCurveConfig, PowerSpeedCurveData, PowerSpeedCurveParameter } from \"@/types/PowerSpeedCurveConfig\";\nimport { Component, Prop, PropSync, Vue, Watch } from \"vue-property-decorator\";\n\n@Component({})\nexport default class PowerSpeedCurveDataEditDialog extends Vue {\n @PropSync(\"value\", { required: true }) isOpen!: boolean;\n @PropSync(\"maxWidth\", { default: 1000 }) dialogWidth!: number;\n @Prop({ required: true }) config!: PowerSpeedCurveConfig;\n @Prop({ required: true }) curveData!: PowerSpeedCurveData;\n @Prop({ required: true }) curveDataIndex!: number;\n\n clonedCurveData: PowerSpeedCurveData | null = null;\n parameters: string[] = [\"A\", \"B\", \"C\", \"D\"];\n\n get curveOptions(): string[] {\n return Object.keys(CurveFunction);\n }\n\n get showActions(): boolean {\n if (!this.clonedCurveData) return false;\n return this.clonedCurveData.curveFunction === CurveFunction.Polynomial;\n }\n\n get selectedCurveFunction(): CurveFunction | undefined {\n return this.clonedCurveData?.curveFunction;\n }\n\n get selectedCurveFunctionFormula(): string {\n if (!this.selectedCurveFunction) return \"\";\n return curveTypeFormula[this.selectedCurveFunction];\n }\n\n get curveParameters(): PowerSpeedCurveParameter[] {\n if (!this.clonedCurveData || !this.selectedCurveFunction) return [];\n return this.clonedCurveData.powerSpeedCurveParameters;\n }\n\n @Watch(\"isOpen\")\n handleCurveDataChange(): void {\n this.clonedCurveData = JSON.parse(JSON.stringify(this.curveData));\n }\n\n @Watch(\"selectedCurveFunction\")\n handleCurveFunctionChange(): void {\n if (!this.clonedCurveData) return;\n const parametersNeeded = [\"A\", \"B\"];\n switch (this.selectedCurveFunction) {\n case CurveFunction.Power:\n this.addMissingParameters(parametersNeeded);\n this.clonedCurveData.powerSpeedCurveParameters = this.clonedCurveData.powerSpeedCurveParameters.slice(0, 2);\n break;\n case CurveFunction.Hoerl:\n parametersNeeded.push(\"C\");\n this.addMissingParameters(parametersNeeded);\n this.clonedCurveData.powerSpeedCurveParameters = this.clonedCurveData.powerSpeedCurveParameters.slice(0, 3);\n break;\n case CurveFunction.Polynomial:\n parametersNeeded.push(\"C\");\n this.addMissingParameters(parametersNeeded);\n this.clonedCurveData.powerSpeedCurveParameters = this.clonedCurveData?.powerSpeedCurveParameters.slice(0, 4);\n break;\n case CurveFunction.Rational:\n parametersNeeded.push(\"C\");\n parametersNeeded.push(\"D\");\n this.addMissingParameters(parametersNeeded);\n this.clonedCurveData.powerSpeedCurveParameters = this.clonedCurveData?.powerSpeedCurveParameters.slice(0, 4);\n break;\n default:\n break;\n }\n }\n\n addMissingParameters(parametersNeeded: string[]): void {\n const missingParameters = parametersNeeded.filter(p => !this.clonedCurveData?.powerSpeedCurveParameters.some(c => c.constant === p));\n missingParameters.forEach(parameter => {\n this.clonedCurveData?.powerSpeedCurveParameters.push({ id: 0, constant: parameter, a0: 0, a1: 0, a2: 0 });\n });\n }\n\n numericFilter(event: any): number {\n return numberHelper.numericWithNegativeFilter(event);\n }\n\n replaceDecimalPeriod($event: any, ref: string): void {\n if (!$event.includes(\",\") || !$event) return;\n if (ref.includes(\"constant\")) (this.$refs[ref] as any)[0].internalValue = $event.replace(/,/g, \".\");\n else (this.$refs[ref] as any).internalValue = $event.replace(/,/g, \".\");\n }\n\n isAddConstantEnabled(): boolean {\n return this.curveParameters.length < this.parameters.length;\n }\n\n isRemoveConstantEnabled(): boolean {\n return this.curveParameters.length > 3;\n }\n\n addParameter(): void {\n if (!this.clonedCurveData) return;\n if (this.clonedCurveData.powerSpeedCurveParameters.length >= this.parameters.length) return;\n const parameter = this.parameters[this.clonedCurveData.powerSpeedCurveParameters.length];\n this.clonedCurveData?.powerSpeedCurveParameters.push({ id: 0, constant: parameter, a0: 0, a1: 0, a2: 0 });\n }\n\n removeParameter(): void {\n if (!this.clonedCurveData) return;\n if (this.clonedCurveData.powerSpeedCurveParameters.length <= 3) return;\n this.clonedCurveData?.powerSpeedCurveParameters.pop();\n }\n\n saveChanges(): void {\n this.isOpen = false;\n this.$emit(\"onSave\", this.clonedCurveData, this.curveDataIndex);\n }\n\n discardChanges(): void {\n this.isOpen = false;\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PowerSpeedCurveDataEditDialog.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PowerSpeedCurveDataEditDialog.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./PowerSpeedCurveDataEditDialog.vue?vue&type=template&id=3421698e&scoped=true&\"\nimport script from \"./PowerSpeedCurveDataEditDialog.vue?vue&type=script&lang=ts&\"\nexport * from \"./PowerSpeedCurveDataEditDialog.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./PowerSpeedCurveDataEditDialog.vue?vue&type=style&index=0&id=3421698e&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3421698e\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VDivider } from 'vuetify/lib/components/VDivider';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\nimport { VToolbar } from 'vuetify/lib/components/VToolbar';\nimport { VToolbarTitle } from 'vuetify/lib/components/VToolbar';\nimport { VTooltip } from 'vuetify/lib/components/VTooltip';\ninstallComponents(component, {VBtn,VCard,VCardActions,VCardText,VCol,VDialog,VDivider,VIcon,VRow,VSelect,VTextField,VToolbar,VToolbarTitle,VTooltip})\n","import net from \"App/net\";\r\n\r\nclass PowerSpeedCurveClient {\r\n constructor() {\r\n }\r\n\r\n getAllConfigs() {\r\n return net.get(\"/ReferenceCurves/PowerSpeed/Configs\");\r\n }\r\n\r\n postEmptyConfig() {\r\n return net.post(\"/ReferenceCurves/PowerSpeed/Configs\");\r\n }\r\n\r\n updateConfig(config) {\r\n return net.put(\"/ReferenceCurves/PowerSpeed/Configs\", config);\r\n }\r\n\r\n deleteConfig(id) {\r\n return net.del(`/ReferenceCurves/PowerSpeed/Configs/${id}`);\r\n }\r\n}\r\n\r\n\r\nexport default new PowerSpeedCurveClient();\r\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { CurveFunction, PowerSpeedCurveConfig, PowerSpeedCurveData } from \"@/types/PowerSpeedCurveConfig\";\nimport { Component, Prop, PropSync, Vue, Watch, Ref } from \"vue-property-decorator\";\nimport store from \"@/store\";\nimport { getModule } from \"vuex-module-decorators\";\nimport { curveTypeFormula } from \"@/consts/curveConfigDefaults\";\nimport numericFilter from \"Utilities/numericFilter\";\nimport _ from \"underscore\";\n// components\nimport VesselSelectSimple from \"@/components/VesselSelectSimple.vue\";\nimport PowerSpeedCurveDataEditDialog from \"@/components/referencecurves/PowerSpeedCurveDataEditDialog.vue\";\nimport ConfirmDialog from \"@/components/ConfirmDialog.vue\";\n// types\nimport { Vessel } from \"@/types/Vessel\";\nimport { Company } from \"@/types/company\";\n// clients\nimport PowerSpeedCurveClient from \"Clients/power-speed-curve-client\";\nimport VesselsClient from \"Clients/vessels-client\";\n// modules\nimport CompaniesModule from \"@/store/clients/Companies.module\";\nimport UserModule from \"@/store/clients/User.module\";\n\nconst Companies = getModule(CompaniesModule, store);\nconst User = getModule(UserModule, store);\n\n@Component({\n components: {\n VesselSelectSimple,\n PowerSpeedCurveDataEditDialog,\n ConfirmDialog,\n },\n})\nexport default class PowerSpeedConfigEditDialog extends Vue {\n @Ref(\"confirmDelete\") confirmDelete!: any;\n @PropSync(\"value\", { required: true }) isOpen!: boolean;\n @PropSync(\"maxWidth\", { default: 1000 }) dialogWidth!: number;\n @Prop({ required: true }) config!: PowerSpeedCurveConfig;\n @Prop({ required: true }) allVessels!: Vessel[];\n // @Prop({ required: true }) currentCompanyVessels!: Vessel[];\n selectedTab = 0;\n clonedConfig: PowerSpeedCurveConfig | null = null;\n selectedVessels: Vessel[] = [];\n selectedCompanyId: number | null = null;\n showAllCompany: Partial = { name: \"Show All Vessels\", id: 0 };\n\n editCurveSegmentDialog = false;\n curveSegmentToEdit: PowerSpeedCurveData | null = null;\n curveSegmentIndexToEdit = -1;\n\n headers = [\n {\n text: \"Curve\",\n value: \"curveFunction\",\n class: \"v-data-table-column-header\",\n width: \"10%\",\n sortable: true,\n },\n {\n text: \"Curve Formula\",\n value: \"curveFormula\",\n class: \"v-data-table-column-header\",\n width: \"20%\",\n },\n {\n text: \"Speed Range (knots)\",\n value: \"speed\",\n class: \"v-data-table-column-header\",\n width: \"10%\",\n },\n {\n text: \"Draft Range (m)\",\n value: \"draft\",\n class: \"v-data-table-column-header\",\n width: \"10%\",\n },\n {\n text: \"Constants\",\n value: \"constants\",\n class: \"v-data-table-column-header\",\n width: \"10%\",\n },\n\n {\n text: \"Edit\",\n value: \"edit\",\n class: \"v-data-table-column-header\",\n width: \"5%\",\n sortable: false,\n },\n {\n text: \"Delete\",\n value: \"delete\",\n class: \"v-data-table-column-header\",\n width: \"5%\",\n sortable: false,\n },\n ];\n searchQuery: string | null = null;\n debounceLoader = false;\n currentCompanyVessels: Vessel[] = [];\n\n @Watch(\"config\")\n handleConfigChange(): void {\n this.clonedConfig = JSON.parse(JSON.stringify(this.config));\n const alreadySelectedVesselIds = this.clonedConfig?.vesselIds;\n this.selectedVessels = this.allVessels.filter(v => alreadySelectedVesselIds?.some(i => i === v.id));\n }\n\n get companies(): Company[] {\n return Companies.companies;\n }\n\n get userCompanyId(): number | null {\n return User.userCompanyId;\n }\n\n get filteredVessels(): Vessel[] {\n if (this.searchQuery == null) return this.selectedCompanyId === 0 ? this.allVessels : this.currentCompanyVessels;\n const vessels = this.selectedCompanyId === 0 ? this.allVessels : this.currentCompanyVessels;\n return vessels.filter(v => v.name.toLowerCase().includes((this.searchQuery as string).toLowerCase()));\n }\n\n get isNoData(): boolean {\n return Boolean(this.clonedConfig?.powerSpeedCurveData.length === 0);\n }\n\n numericFilter(event: any): number {\n return numericFilter(event);\n }\n\n async deleteCurveSegment(curveData: PowerSpeedCurveData): Promise {\n const confirmed = await this.confirmDelete.open(\"Delete curve segment\", \"Are you sure you want to delete this curve segment?\");\n if (confirmed) {\n if (!this.clonedConfig) return;\n const index = this.clonedConfig.powerSpeedCurveData.indexOf(curveData);\n if (index > -1) this.clonedConfig.powerSpeedCurveData.splice(index, 1);\n }\n }\n\n updateSearchQueryInput(newValue: string): void {\n this.debounceLoader = true;\n this.searchQuery = newValue;\n setTimeout(() => (this.debounceLoader = false), 500);\n }\n\n doSearchDebounced = _.debounce(this.updateSearchQueryInput, 1000);\n\n addNewCurve(): void {\n const newCurve: PowerSpeedCurveData = {\n id: 0,\n curveFunction: CurveFunction.Hoerl,\n speedMin: 0,\n speedMax: 25,\n draftMin: 0,\n draftMax: 25,\n powerSpeedCurveParameters: [],\n };\n this.clonedConfig?.powerSpeedCurveData.push(newCurve);\n const index = (this.clonedConfig?.powerSpeedCurveData.length ?? 0) - 1;\n this.openEditCurveSegmentModal(newCurve, index);\n }\n\n curveFormula(curveFunction: CurveFunction): string {\n return curveTypeFormula[curveFunction];\n }\n\n async saveConfig(): Promise {\n if (this.clonedConfig) {\n this.clonedConfig.vesselIds = this.selectedVessels.map(v => v.id);\n await PowerSpeedCurveClient.updateConfig(this.clonedConfig);\n }\n this.isOpen = false;\n this.$emit(\"onConfigSave\");\n }\n\n discardChanges(): void {\n this.handleConfigChange();\n this.isOpen = false;\n }\n\n openEditCurveSegmentModal(curveData: PowerSpeedCurveData, index: number): void {\n this.editCurveSegmentDialog = true;\n this.curveSegmentToEdit = curveData;\n this.curveSegmentIndexToEdit = index;\n }\n\n async onCompanyChanged(): Promise {\n this.currentCompanyVessels = await VesselsClient.getVesselsByCompanyId(this.selectedCompanyId);\n }\n\n handleCurveSegmentSave(updatedCurveData: PowerSpeedCurveData, index: number): void {\n if (!this.clonedConfig) return;\n if (index > -1) {\n this.clonedConfig.powerSpeedCurveData.splice(index, 1, updatedCurveData);\n this.config.powerSpeedCurveData.splice(index, 1, updatedCurveData);\n }\n }\n\n async created(): Promise {\n await Companies.refreshCompanies();\n this.currentCompanyVessels = await VesselsClient.getVessels();\n this.companies.unshift(this.showAllCompany as Company);\n this.selectedCompanyId = this.userCompanyId;\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PowerSpeedConfigEditDialog.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PowerSpeedConfigEditDialog.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./PowerSpeedConfigEditDialog.vue?vue&type=template&id=58035820&scoped=true&\"\nimport script from \"./PowerSpeedConfigEditDialog.vue?vue&type=script&lang=ts&\"\nexport * from \"./PowerSpeedConfigEditDialog.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./PowerSpeedConfigEditDialog.vue?vue&type=style&index=0&id=58035820&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"58035820\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VProgressCircular } from 'vuetify/lib/components/VProgressCircular';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\nimport { VTab } from 'vuetify/lib/components/VTabs';\nimport { VTabItem } from 'vuetify/lib/components/VTabs';\nimport { VTabs } from 'vuetify/lib/components/VTabs';\nimport { VTabsItems } from 'vuetify/lib/components/VTabs';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\nimport { VTextarea } from 'vuetify/lib/components/VTextarea';\nimport { VToolbar } from 'vuetify/lib/components/VToolbar';\nimport { VToolbarTitle } from 'vuetify/lib/components/VToolbar';\nimport { VTooltip } from 'vuetify/lib/components/VTooltip';\ninstallComponents(component, {VBtn,VCard,VCardActions,VCardText,VCol,VDataTable,VDialog,VIcon,VProgressCircular,VRow,VSelect,VTab,VTabItem,VTabs,VTabsItems,VTextField,VTextarea,VToolbar,VToolbarTitle,VTooltip})\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue, Ref } from \"vue-property-decorator\";\nimport { getModule } from \"vuex-module-decorators\";\nimport store from \"@/store\";\nimport _ from \"underscore\";\n// components\nimport PowerSpeedConfigEditDialog from \"@/components/referencecurves/PowerSpeedConfigEditDialog.vue\";\nimport ConfirmDialog from \"@/components/ConfirmDialog.vue\";\n// clients\nimport PowerSpeedCurveClient from \"Clients/power-speed-curve-client\";\nimport VesselsClient from \"Clients/vessels-client\";\n// types\nimport { PowerSpeedCurveConfig, PowerSpeedCurveData } from \"@/types/PowerSpeedCurveConfig\";\nimport { Vessel } from \"@/types/Vessel\";\n// modules\nimport UserModule from \"@/store/clients/User.module\";\n\nconst User = getModule(UserModule, store);\n\n@Component({\n components: {\n PowerSpeedConfigEditDialog,\n ConfirmDialog,\n },\n})\nexport default class PowerSpeed extends Vue {\n @Ref(\"confirmDelete\") confirmDelete!: any;\n editDialog = false;\n configToEdit: PowerSpeedCurveConfig | null = null;\n configs: PowerSpeedCurveConfig[] = [];\n allVessels: Vessel[] = [];\n currentCompanyVessels: Vessel[] = [];\n doSearchDebounced = _.debounce(this.updateSearchQueryInput, 1000);\n searchQuery: string | null = null;\n debounceLoader = false;\n headers = [\n {\n text: \"Status\",\n value: \"isValid\",\n class: \"v-data-table-column-header\",\n width: \"5%\",\n sortable: false,\n },\n {\n text: \"Id\",\n value: \"id\",\n class: \"v-data-table-column-header\",\n width: \"5%\",\n },\n {\n text: \"Description\",\n value: \"description\",\n class: \"v-data-table-column-header\",\n width: \"20%\",\n },\n {\n text: \"Vessels\",\n value: \"vessels\",\n class: \"v-data-table-column-header\",\n width: \"60%\",\n },\n {\n text: \"Edit\",\n value: \"edit\",\n class: \"v-data-table-column-header\",\n width: \"5%\",\n sortable: false,\n },\n {\n text: \"Delete\",\n value: \"delete\",\n class: \"v-data-table-column-header\",\n width: \"5%\",\n sortable: false,\n },\n ];\n\n get isAdmin(): boolean {\n return User.isAdmin;\n }\n\n get isNoData(): boolean {\n return Boolean(this.configs.length === 0);\n }\n\n get filtredConfigs(): PowerSpeedCurveConfig[] {\n if (!this.searchQuery) return this.configs;\n\n // if searchable item is a vessel < >\n let vesselInSearch: Vessel | null = null;\n const isVesselInSearch = this.allVessels.some(v => {\n if (v.name.toLowerCase().includes((this.searchQuery as string).toLowerCase())) {\n vesselInSearch = v;\n return true;\n }\n });\n if (isVesselInSearch) {\n return this.configs.filter(config => {\n const hasSearchQuery = config.vesselIds.filter(id => {\n if (id === vesselInSearch?.id) {\n return id;\n }\n });\n return hasSearchQuery.length ? config : false;\n });\n // if searchable item is a vessel \n } else {\n return this.configs.filter(c => c.description && c.description.toLowerCase().includes((this.searchQuery as string).toLowerCase()));\n }\n }\n\n async fetchConfigs(): Promise {\n this.configs = await PowerSpeedCurveClient.getAllConfigs();\n }\n\n updateSearchQueryInput(newValue: string): void {\n this.debounceLoader = true;\n this.searchQuery = newValue;\n setTimeout(() => (this.debounceLoader = false), 500);\n }\n\n async addConfig(): Promise {\n await PowerSpeedCurveClient.postEmptyConfig();\n this.configs = await PowerSpeedCurveClient.getAllConfigs();\n this.openConfigEditDialog(this.configs[this.configs.length - 1]);\n }\n\n async deleteConfig(config: PowerSpeedCurveConfig): Promise {\n const confirmed = await this.confirmDelete.open(\"Delete config\", \"Are you sure you want to delete this config?\");\n if (confirmed) {\n await PowerSpeedCurveClient.deleteConfig(config.id);\n this.configs = await PowerSpeedCurveClient.getAllConfigs();\n }\n }\n\n openConfigEditDialog(config: PowerSpeedCurveConfig): void {\n this.editDialog = true;\n this.configToEdit = config;\n }\n\n getVesselName(vesselId: number): string | undefined {\n return this.allVessels.find(v => v.id === vesselId)?.name;\n }\n\n isValidCurveData(curveData: PowerSpeedCurveData): boolean {\n let minNumberOfConstants = curveData.curveFunction === \"Rational\" ? 4 : 3;\n\n switch (curveData.curveFunction) {\n case \"Rational\":\n minNumberOfConstants = 4;\n break;\n case \"Power\":\n minNumberOfConstants = 2;\n break;\n default:\n minNumberOfConstants = 3;\n break;\n }\n const numberOfConstants = curveData.powerSpeedCurveParameters.length;\n return numberOfConstants >= minNumberOfConstants;\n }\n\n isConfigValid(config: PowerSpeedCurveConfig): boolean {\n const hasAtLeastOneCurve = config.powerSpeedCurveData.length > 0;\n const areCurvesValid = config.powerSpeedCurveData.every(c => this.isValidCurveData(c));\n return hasAtLeastOneCurve && areCurvesValid;\n }\n\n async created(): Promise {\n if (!this.isAdmin) this.$router.push(\"/\");\n this.fetchConfigs();\n const ignoreCompany = true;\n this.allVessels = await VesselsClient.getVessels(ignoreCompany);\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PowerSpeed.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PowerSpeed.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./PowerSpeed.vue?vue&type=template&id=8a59272a&scoped=true&\"\nimport script from \"./PowerSpeed.vue?vue&type=script&lang=ts&\"\nexport * from \"./PowerSpeed.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./PowerSpeed.vue?vue&type=style&index=0&id=8a59272a&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"8a59272a\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VProgressCircular } from 'vuetify/lib/components/VProgressCircular';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\nimport { VTooltip } from 'vuetify/lib/components/VTooltip';\ninstallComponents(component, {VBtn,VDataTable,VIcon,VProgressCircular,VSpacer,VTextField,VTooltip})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"vessel-select\"},[_c('v-list',{staticClass:\"d-flex flex-wrap py-3\"},[_vm._l((_vm.vessels),function(vessel){return _c('v-list-item',{key:vessel.id,attrs:{\"color\":\"primary lighten-2\",\"top\":\"\"}},[_c('v-checkbox',{attrs:{\"label\":vessel.name,\"color\":\"primary\"},on:{\"change\":function($event){return _vm.toggleVesselSelection(vessel)}},model:{value:(_vm.selectedVesselIds[vessel.id]),callback:function ($$v) {_vm.$set(_vm.selectedVesselIds, vessel.id, $$v)},expression:\"selectedVesselIds[vessel.id]\"}}),_vm._t(\"checkbox-append-content\",null,{\"vessel\":vessel})],2)})],2),_vm._t(\"footer-content\")],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue, PropSync, Prop } from \"vue-property-decorator\";\nimport { Vessel } from \"@/types/Vessel\";\n\n@Component({})\nexport default class VesselSelectSimple extends Vue {\n @PropSync(\"selectedVesselsList\", { type: Array, default: () => [] })\n selectedVessels!: Vessel[];\n @Prop({ type: Array, default: () => [], required: true })\n vessels!: Vessel[];\n\n get selectedVesselIds(): Record {\n const vesselIds: Record = {};\n this.vessels.forEach(vessel => {\n vesselIds[vessel.id] = this.isSelected(vessel.id);\n });\n return vesselIds;\n }\n\n set selectedVesselIds(value: Record) {\n Object.keys(value).forEach(vesselId => {\n const id = parseInt(vesselId, 10);\n const vessel = this.vessels.find(v => v.id === id);\n if (vessel && value[id] !== this.isSelected(id)) {\n this.toggleVesselSelection(vessel);\n }\n });\n }\n\n toggleVesselSelection(vessel: Vessel): void {\n const index = this.selectedVessels.findIndex(v => v.id === vessel.id);\n if (index === -1) {\n this.selectedVessels.push(vessel);\n } else {\n this.selectedVessels.splice(index, 1);\n }\n this.$emit(\"onSelectionChange\", vessel);\n }\n\n isSelected(id: number): boolean {\n return this.selectedVessels.some(v => v.id === id);\n }\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--15-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VesselSelectSimple.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--15-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VesselSelectSimple.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./VesselSelectSimple.vue?vue&type=template&id=7fec328c&scoped=true&\"\nimport script from \"./VesselSelectSimple.vue?vue&type=script&lang=ts&\"\nexport * from \"./VesselSelectSimple.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./VesselSelectSimple.vue?vue&type=style&index=0&id=7fec328c&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7fec328c\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VCheckbox } from 'vuetify/lib/components/VCheckbox';\nimport { VList } from 'vuetify/lib/components/VList';\nimport { VListItem } from 'vuetify/lib/components/VList';\ninstallComponents(component, {VCheckbox,VList,VListItem})\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PowerSpeed.vue?vue&type=style&index=0&id=8a59272a&scoped=true&lang=scss&\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PowerSpeedConfigEditDialog.vue?vue&type=style&index=0&id=58035820&lang=scss&scoped=true&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VesselSelectSimple.vue?vue&type=style&index=0&id=7fec328c&scoped=true&lang=scss&\"","// Styles\nimport './VTextarea.sass'\n\n// Extensions\nimport VTextField from '../VTextField/VTextField'\n\n// Utilities\nimport mixins from '../../util/mixins'\n\n// Types\nimport Vue from 'vue'\n\ninterface options extends Vue {\n $refs: {\n input: HTMLTextAreaElement\n }\n}\n\nconst baseMixins = mixins\n>(\n VTextField\n)\n\n/* @vue/component */\nexport default baseMixins.extend({\n name: 'v-textarea',\n\n props: {\n autoGrow: Boolean,\n noResize: Boolean,\n rowHeight: {\n type: [Number, String],\n default: 24,\n validator: (v: any) => !isNaN(parseFloat(v)),\n },\n rows: {\n type: [Number, String],\n default: 5,\n validator: (v: any) => !isNaN(parseInt(v, 10)),\n },\n },\n\n computed: {\n classes (): object {\n return {\n 'v-textarea': true,\n 'v-textarea--auto-grow': this.autoGrow,\n 'v-textarea--no-resize': this.noResizeHandle,\n ...VTextField.options.computed.classes.call(this),\n }\n },\n noResizeHandle (): boolean {\n return this.noResize || this.autoGrow\n },\n },\n\n watch: {\n autoGrow (val: boolean) {\n this.$nextTick(() => {\n val\n ? this.calculateInputHeight()\n : this.$refs.input?.style.removeProperty('height')\n })\n },\n lazyValue () {\n this.autoGrow && this.$nextTick(this.calculateInputHeight)\n },\n rowHeight () {\n this.autoGrow && this.$nextTick(this.calculateInputHeight)\n },\n },\n\n mounted () {\n setTimeout(() => {\n this.autoGrow && this.calculateInputHeight()\n }, 0)\n },\n\n methods: {\n calculateInputHeight () {\n const input = this.$refs.input\n if (!input) return\n\n input.style.height = '0'\n const height = input.scrollHeight\n const minHeight = parseInt(this.rows, 10) * parseFloat(this.rowHeight)\n // This has to be done ASAP, waiting for Vue\n // to update the DOM causes ugly layout jumping\n input.style.height = Math.max(minHeight, height) + 'px'\n },\n genInput () {\n const input = VTextField.options.methods.genInput.call(this)\n\n input.tag = 'textarea'\n delete input.data!.attrs!.type\n input.data!.attrs!.rows = this.rows\n\n return input\n },\n onInput (e: Event) {\n VTextField.options.methods.onInput.call(this, e)\n this.autoGrow && this.calculateInputHeight()\n },\n onKeyDown (e: KeyboardEvent) {\n // Prevents closing of a\n // dialog when pressing\n // enter\n if (this.isFocused && e.keyCode === 13) {\n e.stopPropagation()\n }\n\n this.$emit('keydown', e)\n },\n },\n})\n","export default function (event) {\r\n event = event ? event : window.event;\r\n const expect = event.target.value.toString() + event.key.toString();\r\n return !/^\\d?\\-?\\d*[.,]?\\d*$/.test(expect) ? event.preventDefault() : false;\r\n}\r\n","export interface PowerSpeedCurveConfig {\r\n id: number;\r\n description: string;\r\n powerSpeedCurveData: PowerSpeedCurveData[];\r\n vesselIds: number[];\r\n}\r\n\r\nexport interface PowerSpeedCurveData {\r\n id: number;\r\n curveFunction: CurveFunction;\r\n speedMin: number;\r\n speedMax: number;\r\n draftMin: number;\r\n draftMax: number;\r\n powerSpeedCurveParameters: PowerSpeedCurveParameter[];\r\n}\r\n\r\nexport interface PowerSpeedCurveParameter {\r\n id: number;\r\n constant: string;\r\n a0: number;\r\n a1: number;\r\n a2: number;\r\n}\r\n\r\nexport enum CurveFunction {\r\n Hoerl = \"Hoerl\",\r\n Polynomial = \"Polynomial\",\r\n Rational = \"Rational\",\r\n Power = \"Power\",\r\n}\r\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PowerSpeedCurveDataEditDialog.vue?vue&type=style&index=0&id=3421698e&lang=scss&scoped=true&\""],"sourceRoot":""}