{:uriI"×file:///root/projects/rails_db/app/assets/javascripts/codemirror/codemirror/addons/display/autorefresh.js?type=application/javascript&pipeline=self&id=ceb4f9894fe3fc2792451c6504cf60e8116a6b560fc7da9b056bf39582364ad4:ET:load_pathI"3/root/projects/rails_db/app/assets/javascripts;T: filenameI"g/root/projects/rails_db/app/assets/javascripts/codemirror/codemirror/addons/display/autorefresh.js;T: nameI"5codemirror/codemirror/addons/display/autorefresh;T:logical_pathI"=codemirror/codemirror/addons/display/autorefresh.self.js;T:content_typeI"application/javascript;T: sourceI"// CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror")) else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod) else // Plain browser env mod(CodeMirror) })(function(CodeMirror) { "use strict" CodeMirror.defineOption("autoRefresh", false, function(cm, val) { if (cm.state.autoRefresh) { stopListening(cm, cm.state.autoRefresh) cm.state.autoRefresh = null } if (val && cm.display.wrapper.offsetHeight == 0) startListening(cm, cm.state.autoRefresh = {delay: val.delay || 250}) }) function startListening(cm, state) { function check() { if (cm.display.wrapper.offsetHeight) { stopListening(cm, state) if (cm.display.lastWrapHeight != cm.display.wrapper.clientHeight) cm.refresh() } else { state.timeout = setTimeout(check, state.delay) } } state.timeout = setTimeout(check, state.delay) state.hurry = function() { clearTimeout(state.timeout) state.timeout = setTimeout(check, 50) } CodeMirror.on(window, "mouseup", state.hurry) CodeMirror.on(window, "keyup", state.hurry) } function stopListening(_cm, state) { clearTimeout(state.timeout) CodeMirror.off(window, "mouseup", state.hurry) CodeMirror.off(window, "keyup", state.hurry) } }); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"ufile-digest:///root/projects/rails_db/app/assets/javascripts/codemirror/codemirror/addons/display/autorefresh.js;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%óÔ'ì 1y—»‰aN¶7‚‚N«‡ýÊV¶úC“ÅTª Ñ: lengthi:dependencies_digest"%^3®Æ®QëqÅaAC6g±; ªXH'ÎBlt­~:idI"Eceb4f9894fe3fc2792451c6504cf60e8116a6b560fc7da9b056bf39582364ad4;F: mtimel+Àus]