hunk.code_window:     // append additional style
       classContainer.html('<style>' + className + ' {' + classValue + '}</style>');
   }
   export function rgb2hex(rgbIn) {
       if (/^#[0-9A-F]{6}$/i.test(rgbIn)) {
           return rgbIn;
       }
       var rgb = rgbIn.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
       function hex(x) {
           return ('0' + parseInt(x, 10).toString(16)).slice(-2);
       }
       return '#' + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
   }
   export function updateCodeTheme(userTheme) {
       let cssPath = '';
       Constants.THEME_ELEMENTS.forEach((element) => {
           if (element.id === 'codeTheme') {
  
hunk.labels: keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep
hunk.file_path: webapp/utils/utils.jsx
hunk.type: replace
file: // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
  // See License.txt for license information.
  
  export default class DelayedAction {
      constructor(action) {
          this.action = action;
  
          this.timer = -1;
  
          // bind fire since it doesn't get passed the correct this value with setTimeout
          this.fire = this.fire.bind(this);
      }
  
      fire() {
          this.action();
  
          this.timer = -1;
      }
  
      fireAfter(timeout) {
          if (this.timer >= 0) {
              window.clearTimeout(this.timer);
          }
  
          this.timer = window.setTimeout(this.fire, timeout);
      }
  
      cancel() {
          window.clearTimeout(this.timer);
      }
  }
  