{"version":3,"sources":["webpack://bioterio//IMTSP/bioterio/app/javascript/controllers|sync|/_controller\\.js$/","webpack://bioterio/./app/javascript/controllers/datepicker_controller.js","webpack://bioterio/./app/javascript/controllers/file_controller.js","webpack://bioterio/./app/javascript/controllers/file_form_controller.js","webpack://bioterio/./app/javascript/controllers/project_controller.js","webpack://bioterio/./app/javascript/controllers/report_controller.js","webpack://bioterio/./app/javascript/controllers/selectboxajax_controller.js","webpack://bioterio/./app/javascript/controllers/tooltip_controller.js","webpack://bioterio/./app/javascript/controllers/index.js","webpack://bioterio/./app/javascript/packs/application.js"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","connect","console","log","$","this","dtTarget","flatpickr","static","allowInput","dateFormat","Controller","targets","verifyUploadFields","divRemoveFiles","parent","next","length","each","index","html","trim","show","prev","hide","hideUploadField","preventDefault","$link","target","divRemoveFile","divUploadFile","initialize","submit","event","ajax","url","data","get","dataType","type","FormData","element","processData","contentType","success","error","err","changeColor","$target","color","css","row","closest","children","on","showHistoric","currentTarget","toggle","urlCollection","myTarget","select2","placeholder","minimumInputLength","quietMillis","term","page","q","results","item","name","cache","initSelection","callback","val","done","formatResult","formatSelection","dropdownCssClass","escapeMarkup","m","tooltip","application","Application","context","require","load","definitionsFromContext","window","cable","ActionCable","NProgress","Turbolinks"],"mappings":"2FAAA,IAAIA,EAAM,CACT,6BAA8B,KAC9B,uBAAwB,KACxB,4BAA6B,KAC7B,0BAA2B,KAC3B,yBAA0B,KAC1B,gCAAiC,KACjC,0BAA2B,KAC3B,uCAAwC,KACxC,iCAAkC,KAClC,sCAAuC,KACvC,oCAAqC,KACrC,mCAAoC,KACpC,0CAA2C,KAC3C,oCAAqC,MAItC,SAASC,EAAeC,GACvB,IAAIC,EAAKC,EAAsBF,GAC/B,OAAOG,EAAoBF,GAE5B,SAASC,EAAsBF,GAC9B,IAAIG,EAAoBC,EAAEN,EAAKE,GAAM,CACpC,IAAIK,EAAI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9B,EAAS+B,GAC/B,IAAMnF,EAAKe,EAAEqC,GAASgC,MACX,KAAPpF,GACFe,EAAE8B,KAAF,IAAWwB,EAAX,IAA4BrE,EAA5B,QAAuC,CACnCiD,SAAU,SAEboC,MAAK,SAAStC,GACboC,EAASpC,OAKfuC,aAAc,SAASvC,EAAM4B,GAC3B,OAAO5B,EAAKiC,MAGdO,gBAAiB,SAASxC,GACxB,OAAOA,EAAKiC,MAGdQ,iBAAkB,UAClBC,aAAc,SAAUC,GAAK,OAAOA,M,WArDbpE,I,EACpBC,QAAU,CAAE,O,0VCEnBX,QAAA,WACEC,QAAQC,IAAI,iBACZC,EAAE,2BAA2B4E,W,WALJrE,I,EACpBC,QAAU,I,yGCGbqE,EAAcC,aACdC,EAAUC,QAChBH,EAAYI,MAAKC,OAAuBH,I,6ECRxCC,gBAkBAG,OAAOC,MAAQC,qBAGfF,OAAOG,UAAYA,IAGnBC,YACAA,wBAA+B,O","file":"js/application-ec1877cc796f55b71f67.js","sourcesContent":["var map = {\n\t\"./datepicker_controller.js\": 6047,\n\t\"./file_controller.js\": 9539,\n\t\"./file_form_controller.js\": 2840,\n\t\"./project_controller.js\": 6190,\n\t\"./report_controller.js\": 2453,\n\t\"./selectboxajax_controller.js\": 9702,\n\t\"./tooltip_controller.js\": 6783,\n\t\"controllers/datepicker_controller.js\": 6047,\n\t\"controllers/file_controller.js\": 9539,\n\t\"controllers/file_form_controller.js\": 2840,\n\t\"controllers/project_controller.js\": 6190,\n\t\"controllers/report_controller.js\": 2453,\n\t\"controllers/selectboxajax_controller.js\": 9702,\n\t\"controllers/tooltip_controller.js\": 6783\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 7074;","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"dt\" ]\n\n connect() {\n console.log('START DATEPICKER')\n\n $(this.dtTarget).flatpickr({\n \"locale\": \"pt\",\n static: true,\n allowInput: true,\n dateFormat: \"d/m/Y\",\n })\n }\n\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = []\n\n verifyUploadFields() {\n //get all file fields from form\n const divRemoveFiles = $('input[type=file]').parent().next()\n\n if (divRemoveFiles.length > 0) {\n //check each file field if contains html\n divRemoveFiles.each(function (index) {\n if ($(this).html().trim()) {\n $(this).show()\n $(this).prev().hide()\n } else {\n $(this).hide()\n $(this).prev().show()\n }\n })\n }\n }\n\n hideUploadField(e) {\n e.preventDefault()\n\n const $link = $(e.target)\n const divRemoveFile = $link.parent()\n const divUploadFile = $link.parent().prev()\n\n divRemoveFile.hide()\n divUploadFile.show()\n }\n\n initialize() {\n this.verifyUploadFields()\n }\n\n connect() {\n console.log('START FILE')\n\n\n }\n\n}","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = []\n\n connect() {\n console.log('START FILE FORM')\n }\n\n submit(event) {\n event.preventDefault()\n\n $.ajax({\n url: this.data.get('url'),\n dataType: 'script',\n type: 'POST',\n data: new FormData(this.element),\n processData: false,\n contentType: false,\n success: () => {\n console.log('success')\n },\n error: err => {\n console.log(`Erro ao acessar o serviço. ${err}`)\n }\n })\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = []\n\n connect() {\n console.log('START PROJETO')\n $('.historic').hide()\n }\n\n changeColor(e) {\n let $target = $(e.target)\n // salva cor original da célula\n let color = $target.css('background-color')\n // seleciona linha desta célula, e logo a seguir todas células (children) da linha selecionada\n let row = $target.closest('tr').children()\n // troca cor da linha\n row.css('background-color', '#BBFFFF')\n // ao sair recupera cor original\n $target.on('mouseout', function () {\n row.css('background-color', color)\n })\n }\n\n showHistoric(e) {\n $('.historic').css('background-color', '#BBFFFF')\n //se a linha estiver oculta, mostre-a, ou vice-versa\n $(e.currentTarget).parent().next().toggle()\n }\n\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = []\n\n connect() {\n console.log('START REPORT')\n $('.historic').hide()\n }\n\n changeColor(e) {\n let $target = $(e.target)\n // salva cor original da célula\n let color = $target.css('background-color')\n // seleciona linha desta célula, e logo a seguir todas células (children) da linha selecionada\n let row = $target.closest('tr').children()\n // troca cor da linha\n row.css('background-color', '#BBFFFF')\n // ao sair recupera cor original\n $target.on('mouseout', function () {\n row.css('background-color', color)\n })\n }\n\n showHistoric(e) {\n $('.historic').css('background-color', '#BBFFFF')\n //se a linha estiver oculta, mostre-a, ou vice-versa\n $(e.currentTarget).parent().next().toggle()\n }\n\n}","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = [ 'my' ]\n\n connect() {\n console.log('START SELECTBOXAJAX')\n const urlCollection = this.data.get('collection')\n\n $(this.myTarget).select2({\n placeholder: \"Digite o nome\",\n minimumInputLength: 3,\n ajax: { // instead of writing the function to execute the request we use Select2's convenient helper\n url: `/${urlCollection}`,\n dataType: 'json',\n quietMillis: 250,\n data: function (term, page) {\n return {\n q: term, // search term\n };\n },\n results: function (data, page) { // parse the results into the format expected by Select2.\n // since we are using custom formatting functions we do not need to alter the remote JSON data\n return {\n results: $.map(data, function (item) {\n return {\n id: item.id,\n name: item.name\n }\n })\n };\n },\n cache: true\n },\n initSelection: function(element, callback) {\n const id = $(element).val()\n if (id !== \"\") {\n $.ajax(`/${urlCollection}/${id}.json`, {\n dataType: \"json\"\n })\n .done(function(data) {\n callback(data)\n })\n }\n },\n\n formatResult: function(data, term){\n return data.name\n },\n\n formatSelection: function(data){\n return data.name\n },\n\n dropdownCssClass: \"bigdrop\", // apply css that makes the dropdown taller\n escapeMarkup: function (m) { return m } // we do not want to escape markup since we are displaying html in results\n\n })\n\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = []\n\n connect() {\n console.log('START TOOLTIP')\n $('[data-toggle=\"tooltip\"]').tooltip()\n }\n\n}","// Load all the controllers within this directory and all subdirectories. \n// Controller files must be named *_controller.js.\n\nimport { Application } from \"stimulus\"\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\"\n\nconst application = Application.start()\nconst context = require.context(\"controllers\", true, /_controller\\.js$/)\napplication.load(definitionsFromContext(context))","require(\"@rails/ujs\").start()\n//require(\"@rails/activestorage\").start()\n//require(\"channels\")\n//require(\"trix\")\n//require(\"@rails/actiontext\")\n\nimport $ from 'jquery'\nimport 'qtip2'\nimport 'cocoon-js'\nimport 'select2'\nimport 'select2/select2_locale_pt-BR'\nimport 'bootstrap'\nimport 'controllers'\n\nimport flatPickr from 'flatpickr'\nimport { Portuguese } from 'flatpickr/dist/l10n/pt'\n\nimport ActionCable from 'actioncable'\nwindow.cable = ActionCable.createConsumer()\n\nimport NProgress from 'nprogress'\nwindow.NProgress = NProgress\n\nimport Turbolinks from 'turbolinks'\nTurbolinks.start()\nTurbolinks.setProgressBarDelay(250)\n\nimport 'stylesheets/application'"],"sourceRoot":""}