Prompt:
callWithJQuery = (pivotModule) ->
    if typeof exports is "object" and typeof module is "object" # CommonJS
        pivotModule require("jquery")
    else if typeof define is "function" and define.amd # AMD
        define ["jquery"], pivotModule
    # Plain browser env
    else
        pivotModule jQuery

callWithJQuery ($) ->
    nf = $.pivotUtilities.numberFormat
    tpl = $.pivotUtilities.aggregatorTemplates

    frFmt =    nf(thousandsSep: " ", decimalSep: ",")
    frFmtInt = nf(digitsAfterDecimal: 0, thousandsSep: " ", decimalSep: ",")
    frFmtPct = nf(digitsAfterDecimal: 1, scaler: 100, suffix: "%", thousandsSep: " ", decimalSep: ",")

    $.pivotUtilities.locales.es =

        localeStrings:
            renderError: "Ocurrió un error durante la interpretación de la tabla dinámica."
            computeError: "Ocurrió un error durante el cálculo de la tabla dinámica."
            uiRenderError: "Ocurrió un error durante el dibujado de la tabla dinámica."
            selectAll: "Seleccionar todo"
            selectNone: "Deseleccionar todo"

Response:
tooMany: "(demasiados valores)"
            filterResults: "Filtrar resultados"
            totals: "Totales"
            vs: "vs"
            by: "por"
            apply: "Aplicar"
            cancel: "Cancelar"

        aggregators:
            "Cuenta":                             tpl.count(frFmtInt)
            "Cuenta de valores únicos":          tpl.countUnique(frFmtInt)
            "Lista de valores únicos":           tpl.listUnique(", ")
            "Suma":                              tpl.sum(frFmt)
            "Suma de enteros":                   tpl.sum(frFmtInt)
            "Promedio":                            tpl.average(frFmt)
            "Mínimo":                                       tpl.min(frFmt)
            "Máximo":                                       tpl.max(frFmt)
            "Suma de sumas":                    tpl.sumOverSum(frFmt)
            "Cota 80% superior":        tpl.sumOverSumBound80(true, frFmt)
            "Cota 80% inferior":        tpl.sumOverSumBound80(false, frFmt)
            "Proporción del total (suma)":      tpl.fractionOf(tpl.sum(),   "total", frFmtPct)
            "Proporción de la fila (suma)":    tpl.fractionOf(tpl.sum(),   "row",   frFmtPct)
            "Proporción de la columna (suma)":  tpl.fractionOf(tpl.sum(),   "col",   frFmtPct)
            "Proporción del total (cuenta)":     tpl.fractionOf(tpl.count(), "total", frFmtPct)
            "Proporción de la fila (cuenta)":   tpl.fractionOf(tpl.count(), "row",   frFmtPct)


Response:
###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
###

cyclotronDirectives.directive 'jsonedit', ->
    {
        restrict: 'EAC'
        scope:
            model: '='
        replace: true
        template: '

'

        controller: ($scope, dashboardService) ->

            $scope.aceLoaded = (editor) ->
                editor.setOptions {
                    maxLines: Infinity
                    minLines: 10
                    enableBasicAutocompletion: true
                }
                editor.focus()

            # Settings for the JSON Editor
            $scope.aceOptions =
                useWrapMode : true
                showGutter: true
                showPrintMargin: false
                mode: 'json'
                theme: 'chrome'
                onLoad: $scope.aceLoaded

            $scope.jsonValue = dashboardService.toString $scope.model

            $scope.$watch 'jsonValue', (json) ->
                # Catch parse errors due to incomplete objects
                try
                    if $scope.model?
                        _.replaceInside $scope.model, dashboardService.parse(json)


Prompt:
###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
###

cyclotronDirectives.directive 'jsonedit', ->
    {
        restrict: 'EAC'
        scope:
            model: '='
        replace: true
        template: '

'

        controller: ($scope, dashboardService) ->

Response:
$scope.aceLoaded = (editor) ->
                editor.setOptions {
                    maxLines: Infinity
                    minLines: 10
                    enableBasicAutocompletion: true
                }
                editor.focus()

            # Settings for the JSON Editor
            $scope.aceOptions =
                useWrapMode : true
                showGutter: true
                showPrintMargin: false
                mode: 'json'
                theme: 'chrome'
                onLoad: $scope.aceLoaded

            $scope.jsonValue = dashboardService.toString $scope.model

            $scope.$watch 'jsonValue', (json) ->
                # Catch parse errors due to incomplete objects
                try
                    if $scope.model?
                        _.replaceInside $scope.model, dashboardService.parse(json)


Response:
###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
###

cyclotronDirectives.directive 'jsonedit', ->
    {
        restrict: 'EAC'
        scope:
            model: '='
        replace: true
        template: '

'

        controller: ($scope, dashboardService) ->

            $scope.aceLoaded = (editor) ->
                editor.setOptions {
                    maxLines: Infinity
                    minLines: 10
                    enableBasicAutocompletion: true
                }
                editor.focus()

            # Settings for the JSON Editor
            $scope.aceOptions =
                useWrapMode : true
                showGutter: true
                showPrintMargin: false
                mode: 'json'
                theme: 'chrome'
                onLoad: $scope.aceLoaded

            $scope.jsonValue = dashboardService.toString $scope.model

            $scope.$watch 'jsonValue', (json) ->
                # Catch parse errors due to incomplete objects
                try
                    if $scope.model?
                        _.replaceInside $scope.model, dashboardService.parse(json)


Prompt:
###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
###

cyclotronDirectives.directive 'jsonedit', ->
    {
        restrict: 'EAC'
        scope:
            model: '='
        replace: true
        template: '

'

        controller: ($scope, dashboardService) ->

Response:
$scope.aceLoaded = (editor) ->
                editor.setOptions {
                    maxLines: Infinity
                    minLines: 10
                    enableBasicAutocompletion: true
                }
                editor.focus()

            # Settings for the JSON Editor
            $scope.aceOptions =
                useWrapMode : true
                showGutter: true
                showPrintMargin: false
                mode: 'json'
                theme: 'chrome'
                onLoad: $scope.aceLoaded

            $scope.jsonValue = dashboardService.toString $scope.model

            $scope.$watch 'jsonValue', (json) ->
                # Catch parse errors due to incomplete objects
                try
                    if $scope.model?
                        _.replaceInside $scope.model, dashboardService.parse(json)


Response:
class Exporter
  constructor: (@engine) ->
    return unless @command = location.search.match(/export=([a-z0-9]+)/)?[1]

    engine.addEventListener('precompile', @preexport)

  preexport: =>
    # Let every element get an ID
    if (scope = @engine.scope).nodeType == 9
      scope = @engine.scope.body
    @engine.identify(scope)
    for element in scope.getElementsByTagName('*')
      if element.tagName != 'SCRIPT' &&
          (element.tagName != 'STYLE' || element.getAttribute('type')?.indexOf('gss') > -1)
        @engine.identify(element)
    if window.Sizes
      @sizes = []
      for pairs in window.Sizes
        for width in pairs[0]
          for height in pairs[1]
            @sizes.push(width + 'x' + height)

    if @command.indexOf('x') > -1
      [width, height] = @command.split('x')
      baseline = 72
      width = parseInt(width) * baseline
      height = parseInt(height) * baseline
      window.addEventListener 'load', =>
        localStorage[@command] = JSON.stringify(@export())
        @postexport()

      document.body.style.width = width + 'px'
      @engine.intrinsic.properties['::window[height]'] = ->
        return height
      @engine.intrinsic.properties['::window[width]'] = ->
        return width

    else
      if @command == 'true'
        localStorage.clear()
        @postexport()

  postexport: =>
    for size in @sizes
      unless localStorage[size]
        location.search = location.search.replace(/[&?]export=([a-z0-9])+/, '') + '?export=' + size
        return
    result = {}
    for property, value of localStorage
      if property.match(/^\d+x\d+$/)


Prompt:
class Exporter
  constructor: (@engine) ->
    return unless @command = location.search.match(/export=([a-z0-9]+)/)?[1]

    engine.addEventListener('precompile', @preexport)

  preexport: =>
    # Let every element get an ID
    if (scope = @engine.scope).nodeType == 9
      scope = @engine.scope.body
    @engine.identify(scope)
    for element in scope.getElementsByTagName('*')
      if element.tagName != 'SCRIPT' &&
          (element.tagName != 'STYLE' || element.getAttribute('type')?.indexOf('gss') > -1)
        @engine.identify(element)
    if window.Sizes
      @sizes = []
      for pairs in window.Sizes
        for width in pairs[0]
          for height in pairs[1]
            @sizes.push(width + 'x' + height)

    if @command.indexOf('x') > -1
      [width, height] = @command.split('x')
      baseline = 72

Response:
width = parseInt(width) * baseline
      height = parseInt(height) * baseline
      window.addEventListener 'load', =>
        localStorage[@command] = JSON.stringify(@export())
        @postexport()

      document.body.style.width = width + 'px'
      @engine.intrinsic.properties['::window[height]'] = ->
        return height
      @engine.intrinsic.properties['::window[width]'] = ->
        return width

    else
      if @command == 'true'
        localStorage.clear()
        @postexport()

  postexport: =>
    for size in @sizes
      unless localStorage[size]
        location.search = location.search.replace(/[&?]export=([a-z0-9])+/, '') + '?export=' + size
        return
    result = {}
    for property, value of localStorage
      if property.match(/^\d+x\d+$/)


Response:
result[property] = JSON.parse(value)
    document.write(JSON.stringify(result))

  export: ->
    values = {}
    for path, value of @engine.values
      if (index = path.indexOf('[')) > -1 && path.indexOf('"') == -1
        property = @engine.intrinsic.camelize(path.substring(index + 1, path.length - 1))
        id = path.substring(0, index)
        if property == 'x' || property == 'y' || document.body.style[property] != undefined
          unless @engine.values[id + '[intrinsic-' + property + ']']?
            values[path] = Math.ceil(value)
    values.stylesheets = @engine.Stylesheet.export()
    return values

module.exports = Exporter


Prompt:
result[property] = JSON.parse(value)
    document.write(JSON.stringify(result))

  export: ->
    values = {}
    for path, value of @engine.values
      if (index = path.indexOf('[')) > -1 && path.indexOf('"') == -1
        property = @engine.intrinsic.camelize(path.substring(index + 1, path.length - 1))

Response:
id = path.substring(0, index)
        if property == 'x' || property == 'y' || document.body.style[property] != undefined
          unless @engine.values[id + '[intrinsic-' + property + ']']?
            values[path] = Math.ceil(value)
    values.stylesheets = @engine.Stylesheet.export()
    return values

module.exports = Exporter


Response:
class Exporter
  preexport: ->

    # Let every element get an ID
    if (scope = @scope).nodeType == 9
      scope = @scope.body
    @identify(scope)
    for element in scope.getElementsByTagName('*')
      if element.tagName != 'SCRIPT' &&
          (element.tagName != 'STYLE' || element.getAttribute('type')?.indexOf('gss') > -1)
        @identify(element)
    if window.Sizes
      @sizes = []
      for pairs in window.Sizes
        for width in pairs[0]
          for height in pairs[1]
            @sizes.push(width + 'x' + height)
    if match = location.search.match(/export=([a-z0-9]+)/)?[1]
      if match.indexOf('x') > -1
        [width, height] = match.split('x')
        baseline = 72
        width = parseInt(width) * baseline
        height = parseInt(height) * baseline
        window.addEventListener 'load', =>
          localStorage[match] = JSON.stringify(@export())
          @postexport()

        document.body.style.width = width + 'px'
        @intrinsic.properties['::window[height]'] = ->
          return height
        @intrinsic.properties['::window[width]'] = ->
          return width

      else
        if match == 'true'
          localStorage.clear()
          @postexport()

  postexport: ->
    for size in @sizes
      unless localStorage[size]
        location.search = location.search.replace(/[&?]export=([a-z0-9])+/, '') + '?export=' + size
        return
    result = {}
    for property, value of localStorage
      if property.match(/^\d+x\d+$/)
        result[property] = JSON.parse(value)
    document.write(JSON.stringify(result))

  export: ->


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
class Exporter
  preexport: ->

    # Let every element get an ID
    if (scope = @scope).nodeType == 9
      scope = @scope.body
    @identify(scope)
    for element in scope.getElementsByTagName('*')
      if element.tagName != 'SCRIPT' &&
          (element.tagName != 'STYLE' || element.getAttribute('type')?.indexOf('gss') > -1)
        @identify(element)
    if window.Sizes
      @sizes = []
      for pairs in window.Sizes
        for width in pairs[0]
          for height in pairs[1]
            @sizes.push(width + 'x' + height)
    if match = location.search.match(/export=([a-z0-9]+)/)?[1]
      if match.indexOf('x') > -1
        [width, height] = match.split('x')
        baseline = 72
        width = parseInt(width) * baseline
        height = parseInt(height) * baseline
        window.addEventListener 'load', =>
          localStorage[match] = JSON.stringify(@export())
          @postexport()

        document.body.style.width = width + 'px'
        @intrinsic.properties['::window[height]'] = ->
          return height
        @intrinsic.properties['::window[width]'] = ->
          return width

      else
        if match == 'true'
          localStorage.clear()
          @postexport()

  postexport: ->
    for size in @sizes
      unless localStorage[size]
        location.search = location.search.replace(/[&?]export=([a-z0-9])+/, '') + '?export=' + size
        return
    result = {}
    for property, value of localStorage
      if property.match(/^\d+x\d+$/)
        result[property] = JSON.parse(value)
    document.write(JSON.stringify(result))

  export: ->
```

Response:
var Exporter;

Exporter = class Exporter {
  preexport() {
    var baseline, element, height, i, j, k, l, len, len1, len2, len3, match, pairs, ref, ref1, ref2, ref3, ref4, ref5, scope, width;
    // Let every element get an ID
    if ((scope = this.scope).nodeType === 9) {
      scope = this.scope.body;
    }
    this.identify(scope);
    ref = scope.getElementsByTagName('*');
    for (i = 0, len = ref.length; i < len; i++) {
      element = ref[i];
      if (element.tagName !== 'SCRIPT' && (element.tagName !== 'STYLE' || ((ref1 = element.getAttribute('type')) != null ? ref1.indexOf('gss') : void 0) > -1)) {
        this.identify(element);
      }
    }
    if (window.Sizes) {
      this.sizes = [];
      ref2 = window.Sizes;
      for (j = 0, len1 = ref2.length; j < len1; j++) {
        pairs = ref2[j];
        ref3 = pairs[0];
        for (k = 0, len2 = ref3.length; k < len2; k++) {
          width = ref3[k];
          ref4 = pairs[1];
          for (l = 0, len3 = ref4.length; l < len3; l++) {
            height = ref4[l];
            this.sizes.push(width + 'x' + height);
          }
        }
      }
    }
    if (match = (ref5 = location.search.match(/export=([a-z0-9]+)/)) != null ? ref5[1] : void 0) {
      if (match.indexOf('x') > -1) {
        [width, height] = match.split('x');
        baseline = 72;
        width = parseInt(width) * baseline;
        height = parseInt(height) * baseline;
        window.addEventListener('load', () => {
          localStorage[match] = JSON.stringify(this.export());
          return this.postexport();
        });
        document.body.style.width = width + 'px';
        this.intrinsic.properties['::window[height]'] = function() {
          return height;
        };
        return this.intrinsic.properties['::window[width]'] = function() {
          return width;
        };
      } else {
        if (match === 'true') {
          localStorage.clear();
          return this.postexport();
        }
      }
    }
  }

  postexport() {
    var i, len, property, ref, result, size, value;
    ref = this.sizes;
    for (i = 0, len = ref.length; i < len; i++) {
      size = ref[i];
      if (!localStorage[size]) {
        location.search = location.search.replace(/[&?]export=([a-z0-9])+/, '') + '?export=' + size;
        return;
      }
    }
    result = {};
    for (property in localStorage) {
      value = localStorage[property];
      if (property.match(/^\d+x\d+$/)) {
        result[property] = JSON.parse(value);
      }
    }
    return document.write(JSON.stringify(result));
  }

  export() {}

};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var Exporter;

Exporter = class Exporter {
  preexport() {
    var baseline, element, height, i, j, k, l, len, len1, len2, len3, match, pairs, ref, ref1, ref2, ref3, ref4, ref5, scope, width;
    // Let every element get an ID
    if ((scope = this.scope).nodeType === 9) {
      scope = this.scope.body;
    }
    this.identify(scope);
    ref = scope.getElementsByTagName('*');
    for (i = 0, len = ref.length; i < len; i++) {
      element = ref[i];
      if (element.tagName !== 'SCRIPT' && (element.tagName !== 'STYLE' || ((ref1 = element.getAttribute('type')) != null ? ref1.indexOf('gss') : void 0) > -1)) {
        this.identify(element);
      }
    }
    if (window.Sizes) {
      this.sizes = [];
      ref2 = window.Sizes;
      for (j = 0, len1 = ref2.length; j < len1; j++) {
        pairs = ref2[j];
        ref3 = pairs[0];
        for (k = 0, len2 = ref3.length; k < len2; k++) {
          width = ref3[k];
          ref4 = pairs[1];
          for (l = 0, len3 = ref4.length; l < len3; l++) {
            height = ref4[l];
            this.sizes.push(width + 'x' + height);
          }
        }
      }
    }
    if (match = (ref5 = location.search.match(/export=([a-z0-9]+)/)) != null ? ref5[1] : void 0) {
      if (match.indexOf('x') > -1) {
        [width, height] = match.split('x');
        baseline = 72;
        width = parseInt(width) * baseline;
        height = parseInt(height) * baseline;
        window.addEventListener('load', () => {
          localStorage[match] = JSON.stringify(this.export());
          return this.postexport();
        });
        document.body.style.width = width + 'px';
        this.intrinsic.properties['::window[height]'] = function() {
          return height;
        };
        return this.intrinsic.properties['::window[width]'] = function() {
          return width;
        };
      } else {
        if (match === 'true') {
          localStorage.clear();
          return this.postexport();
        }
      }
    }
  }

  postexport() {
    var i, len, property, ref, result, size, value;
    ref = this.sizes;
    for (i = 0, len = ref.length; i < len; i++) {
      size = ref[i];
      if (!localStorage[size]) {
        location.search = location.search.replace(/[&?]export=([a-z0-9])+/, '') + '?export=' + size;
        return;
      }
    }
    result = {};
    for (property in localStorage) {
      value = localStorage[property];
      if (property.match(/^\d+x\d+$/)) {
        result[property] = JSON.parse(value);
      }
    }
    return document.write(JSON.stringify(result));
  }

  export() {}

};
```

Response:
class Exporter
  preexport: ->

    # Let every element get an ID
    if (scope = @scope).nodeType == 9
      scope = @scope.body
    @identify(scope)
    for element in scope.getElementsByTagName('*')
      if element.tagName != 'SCRIPT' &&
          (element.tagName != 'STYLE' || element.getAttribute('type')?.indexOf('gss') > -1)
        @identify(element)
    if window.Sizes
      @sizes = []
      for pairs in window.Sizes
        for width in pairs[0]
          for height in pairs[1]
            @sizes.push(width + 'x' + height)
    if match = location.search.match(/export=([a-z0-9]+)/)?[1]
      if match.indexOf('x') > -1
        [width, height] = match.split('x')
        baseline = 72
        width = parseInt(width) * baseline
        height = parseInt(height) * baseline
        window.addEventListener 'load', =>
          localStorage[match] = JSON.stringify(@export())
          @postexport()

        document.body.style.width = width + 'px'
        @intrinsic.properties['::window[height]'] = ->
          return height
        @intrinsic.properties['::window[width]'] = ->
          return width

      else
        if match == 'true'
          localStorage.clear()
          @postexport()

  postexport: ->
    for size in @sizes
      unless localStorage[size]
        location.search = location.search.replace(/[&?]export=([a-z0-9])+/, '') + '?export=' + size
        return
    result = {}
    for property, value of localStorage
      if property.match(/^\d+x\d+$/)
        result[property] = JSON.parse(value)
    document.write(JSON.stringify(result))

  export: ->


Prompt:
class Exporter
  preexport: ->

    # Let every element get an ID
    if (scope = @scope).nodeType == 9
      scope = @scope.body
    @identify(scope)
    for element in scope.getElementsByTagName('*')
      if element.tagName != 'SCRIPT' &&
          (element.tagName != 'STYLE' || element.getAttribute('type')?.indexOf('gss') > -1)
        @identify(element)
    if window.Sizes
      @sizes = []
      for pairs in window.Sizes
        for width in pairs[0]
          for height in pairs[1]
            @sizes.push(width + 'x' + height)
    if match = location.search.match(/export=([a-z0-9]+)/)?[1]
      if match.indexOf('x') > -1
        [width, height] = match.split('x')
        baseline = 72
        width = parseInt(width) * baseline
        height = parseInt(height) * baseline
        window.addEventListener 'load', =>
          localStorage[match] = JSON.stringify(@export())

Response:
@postexport()

        document.body.style.width = width + 'px'
        @intrinsic.properties['::window[height]'] = ->
          return height
        @intrinsic.properties['::window[width]'] = ->
          return width

      else
        if match == 'true'
          localStorage.clear()
          @postexport()

  postexport: ->
    for size in @sizes
      unless localStorage[size]
        location.search = location.search.replace(/[&?]export=([a-z0-9])+/, '') + '?export=' + size
        return
    result = {}
    for property, value of localStorage
      if property.match(/^\d+x\d+$/)
        result[property] = JSON.parse(value)
    document.write(JSON.stringify(result))

  export: ->


Response:
values = {}
    for path, value of @values
      if (index = path.indexOf('[')) > -1 && path.indexOf('"') == -1
        property = @camelize(path.substring(index + 1, path.length - 1))
        id = path.substring(0, index)
        if property == 'x' || property == 'y' || document.body.style[property] != undefined
          unless @values[id + '[intrinsic-' + property + ']']?
            values[path] = Math.ceil(value)
    values.stylesheets = @stylesheets.export()
    return values

module.export = Exporter


Prompt:
values = {}
    for path, value of @values
      if (index = path.indexOf('[')) > -1 && path.indexOf('"') == -1
        property = @camelize(path.substring(index + 1, path.length - 1))
        id = path.substring(0, index)
        if property == 'x' || property == 'y' || document.body.style[property] != undefined

Response:
unless @values[id + '[intrinsic-' + property + ']']?
            values[path] = Math.ceil(value)
    values.stylesheets = @stylesheets.export()
    return values

module.export = Exporter


Response:
class Exporter
  preexport: ->

    # Let every element get an ID
    if (scope = @scope).nodeType == 9
      scope = @scope.body
    @identity(scope)
    for element in scope.getElementsByTagName('*')
      if element.tagName != 'SCRIPT' &&
          (element.tagName != 'STYLE' || element.getAttribute('type')?.indexOf('gss') > -1)
        @identity(element)
    if window.Sizes
      @sizes = []
      for pairs in window.Sizes
        for width in pairs[0]
          for height in pairs[1]
            @sizes.push(width + 'x' + height)
    if match = location.search.match(/export=([a-z0-9]+)/)?[1]
      if match.indexOf('x') > -1
        [width, height] = match.split('x')
        baseline = 72
        width = parseInt(width) * baseline
        height = parseInt(height) * baseline
        window.addEventListener 'load', =>
          localStorage[match] = JSON.stringify(@export())
          @postexport()

        document.body.style.width = width + 'px'
        @intrinsic.properties['::window[height]'] = ->
          return height
        @intrinsic.properties['::window[width]'] = ->
          return width

      else
        if match == 'true'
          localStorage.clear()
          @postexport()

  postexport: ->
    for size in @sizes
      unless localStorage[size]
        location.search = location.search.replace(/[&?]export=([a-z0-9])+/, '') + '?export=' + size
        return
    result = {}
    for property, value of localStorage
      if property.match(/^\d+x\d+$/)
        result[property] = JSON.parse(value)
    document.write(JSON.stringify(result))

  export: ->


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
class Exporter
  preexport: ->

    # Let every element get an ID
    if (scope = @scope).nodeType == 9
      scope = @scope.body
    @identity(scope)
    for element in scope.getElementsByTagName('*')
      if element.tagName != 'SCRIPT' &&
          (element.tagName != 'STYLE' || element.getAttribute('type')?.indexOf('gss') > -1)
        @identity(element)
    if window.Sizes
      @sizes = []
      for pairs in window.Sizes
        for width in pairs[0]
          for height in pairs[1]
            @sizes.push(width + 'x' + height)
    if match = location.search.match(/export=([a-z0-9]+)/)?[1]
      if match.indexOf('x') > -1
        [width, height] = match.split('x')
        baseline = 72
        width = parseInt(width) * baseline
        height = parseInt(height) * baseline
        window.addEventListener 'load', =>
          localStorage[match] = JSON.stringify(@export())
          @postexport()

        document.body.style.width = width + 'px'
        @intrinsic.properties['::window[height]'] = ->
          return height
        @intrinsic.properties['::window[width]'] = ->
          return width

      else
        if match == 'true'
          localStorage.clear()
          @postexport()

  postexport: ->
    for size in @sizes
      unless localStorage[size]
        location.search = location.search.replace(/[&?]export=([a-z0-9])+/, '') + '?export=' + size
        return
    result = {}
    for property, value of localStorage
      if property.match(/^\d+x\d+$/)
        result[property] = JSON.parse(value)
    document.write(JSON.stringify(result))

  export: ->
```

Response:
var Exporter;

Exporter = class Exporter {
  preexport() {
    var baseline, element, height, i, j, k, l, len, len1, len2, len3, match, pairs, ref, ref1, ref2, ref3, ref4, ref5, scope, width;
    // Let every element get an ID
    if ((scope = this.scope).nodeType === 9) {
      scope = this.scope.body;
    }
    this.identity(scope);
    ref = scope.getElementsByTagName('*');
    for (i = 0, len = ref.length; i < len; i++) {
      element = ref[i];
      if (element.tagName !== 'SCRIPT' && (element.tagName !== 'STYLE' || ((ref1 = element.getAttribute('type')) != null ? ref1.indexOf('gss') : void 0) > -1)) {
        this.identity(element);
      }
    }
    if (window.Sizes) {
      this.sizes = [];
      ref2 = window.Sizes;
      for (j = 0, len1 = ref2.length; j < len1; j++) {
        pairs = ref2[j];
        ref3 = pairs[0];
        for (k = 0, len2 = ref3.length; k < len2; k++) {
          width = ref3[k];
          ref4 = pairs[1];
          for (l = 0, len3 = ref4.length; l < len3; l++) {
            height = ref4[l];
            this.sizes.push(width + 'x' + height);
          }
        }
      }
    }
    if (match = (ref5 = location.search.match(/export=([a-z0-9]+)/)) != null ? ref5[1] : void 0) {
      if (match.indexOf('x') > -1) {
        [width, height] = match.split('x');
        baseline = 72;
        width = parseInt(width) * baseline;
        height = parseInt(height) * baseline;
        window.addEventListener('load', () => {
          localStorage[match] = JSON.stringify(this.export());
          return this.postexport();
        });
        document.body.style.width = width + 'px';
        this.intrinsic.properties['::window[height]'] = function() {
          return height;
        };
        return this.intrinsic.properties['::window[width]'] = function() {
          return width;
        };
      } else {
        if (match === 'true') {
          localStorage.clear();
          return this.postexport();
        }
      }
    }
  }

  postexport() {
    var i, len, property, ref, result, size, value;
    ref = this.sizes;
    for (i = 0, len = ref.length; i < len; i++) {
      size = ref[i];
      if (!localStorage[size]) {
        location.search = location.search.replace(/[&?]export=([a-z0-9])+/, '') + '?export=' + size;
        return;
      }
    }
    result = {};
    for (property in localStorage) {
      value = localStorage[property];
      if (property.match(/^\d+x\d+$/)) {
        result[property] = JSON.parse(value);
      }
    }
    return document.write(JSON.stringify(result));
  }

  export() {}

};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var Exporter;

Exporter = class Exporter {
  preexport() {
    var baseline, element, height, i, j, k, l, len, len1, len2, len3, match, pairs, ref, ref1, ref2, ref3, ref4, ref5, scope, width;
    // Let every element get an ID
    if ((scope = this.scope).nodeType === 9) {
      scope = this.scope.body;
    }
    this.identity(scope);
    ref = scope.getElementsByTagName('*');
    for (i = 0, len = ref.length; i < len; i++) {
      element = ref[i];
      if (element.tagName !== 'SCRIPT' && (element.tagName !== 'STYLE' || ((ref1 = element.getAttribute('type')) != null ? ref1.indexOf('gss') : void 0) > -1)) {
        this.identity(element);
      }
    }
    if (window.Sizes) {
      this.sizes = [];
      ref2 = window.Sizes;
      for (j = 0, len1 = ref2.length; j < len1; j++) {
        pairs = ref2[j];
        ref3 = pairs[0];
        for (k = 0, len2 = ref3.length; k < len2; k++) {
          width = ref3[k];
          ref4 = pairs[1];
          for (l = 0, len3 = ref4.length; l < len3; l++) {
            height = ref4[l];
            this.sizes.push(width + 'x' + height);
          }
        }
      }
    }
    if (match = (ref5 = location.search.match(/export=([a-z0-9]+)/)) != null ? ref5[1] : void 0) {
      if (match.indexOf('x') > -1) {
        [width, height] = match.split('x');
        baseline = 72;
        width = parseInt(width) * baseline;
        height = parseInt(height) * baseline;
        window.addEventListener('load', () => {
          localStorage[match] = JSON.stringify(this.export());
          return this.postexport();
        });
        document.body.style.width = width + 'px';
        this.intrinsic.properties['::window[height]'] = function() {
          return height;
        };
        return this.intrinsic.properties['::window[width]'] = function() {
          return width;
        };
      } else {
        if (match === 'true') {
          localStorage.clear();
          return this.postexport();
        }
      }
    }
  }

  postexport() {
    var i, len, property, ref, result, size, value;
    ref = this.sizes;
    for (i = 0, len = ref.length; i < len; i++) {
      size = ref[i];
      if (!localStorage[size]) {
        location.search = location.search.replace(/[&?]export=([a-z0-9])+/, '') + '?export=' + size;
        return;
      }
    }
    result = {};
    for (property in localStorage) {
      value = localStorage[property];
      if (property.match(/^\d+x\d+$/)) {
        result[property] = JSON.parse(value);
      }
    }
    return document.write(JSON.stringify(result));
  }

  export() {}

};
```

Response:
class Exporter
  preexport: ->

    # Let every element get an ID
    if (scope = @scope).nodeType == 9
      scope = @scope.body
    @identity(scope)
    for element in scope.getElementsByTagName('*')
      if element.tagName != 'SCRIPT' &&
          (element.tagName != 'STYLE' || element.getAttribute('type')?.indexOf('gss') > -1)
        @identity(element)
    if window.Sizes
      @sizes = []
      for pairs in window.Sizes
        for width in pairs[0]
          for height in pairs[1]
            @sizes.push(width + 'x' + height)
    if match = location.search.match(/export=([a-z0-9]+)/)?[1]
      if match.indexOf('x') > -1
        [width, height] = match.split('x')
        baseline = 72
        width = parseInt(width) * baseline
        height = parseInt(height) * baseline
        window.addEventListener 'load', =>
          localStorage[match] = JSON.stringify(@export())
          @postexport()

        document.body.style.width = width + 'px'
        @intrinsic.properties['::window[height]'] = ->
          return height
        @intrinsic.properties['::window[width]'] = ->
          return width

      else
        if match == 'true'
          localStorage.clear()
          @postexport()

  postexport: ->
    for size in @sizes
      unless localStorage[size]
        location.search = location.search.replace(/[&?]export=([a-z0-9])+/, '') + '?export=' + size
        return
    result = {}
    for property, value of localStorage
      if property.match(/^\d+x\d+$/)
        result[property] = JSON.parse(value)
    document.write(JSON.stringify(result))

  export: ->


Prompt:
class Exporter
  preexport: ->

    # Let every element get an ID
    if (scope = @scope).nodeType == 9
      scope = @scope.body
    @identity(scope)
    for element in scope.getElementsByTagName('*')
      if element.tagName != 'SCRIPT' &&
          (element.tagName != 'STYLE' || element.getAttribute('type')?.indexOf('gss') > -1)
        @identity(element)
    if window.Sizes
      @sizes = []
      for pairs in window.Sizes
        for width in pairs[0]
          for height in pairs[1]
            @sizes.push(width + 'x' + height)
    if match = location.search.match(/export=([a-z0-9]+)/)?[1]
      if match.indexOf('x') > -1
        [width, height] = match.split('x')
        baseline = 72
        width = parseInt(width) * baseline
        height = parseInt(height) * baseline
        window.addEventListener 'load', =>
          localStorage[match] = JSON.stringify(@export())

Response:
@postexport()

        document.body.style.width = width + 'px'
        @intrinsic.properties['::window[height]'] = ->
          return height
        @intrinsic.properties['::window[width]'] = ->
          return width

      else
        if match == 'true'
          localStorage.clear()
          @postexport()

  postexport: ->
    for size in @sizes
      unless localStorage[size]
        location.search = location.search.replace(/[&?]export=([a-z0-9])+/, '') + '?export=' + size
        return
    result = {}
    for property, value of localStorage
      if property.match(/^\d+x\d+$/)
        result[property] = JSON.parse(value)
    document.write(JSON.stringify(result))

  export: ->


Response:
{Schema} = require 'mongoose'
Err = require 'err1st'
_ = require 'lodash'
uuid = require 'uuid'
crypto = require 'crypto'
util = require '../util'

_hashId = -> crypto.createHash('sha1').update(uuid.v4() + Date.now()).digest('hex')

module.exports = IntegrationSchema = new Schema
  creator: type: Schema.Types.ObjectId, ref: 'User'
  team: type: Schema.Types.ObjectId, ref: 'Team'
  room: type: Schema.Types.ObjectId, ref: 'Room'
  robot: type: Schema.Types.ObjectId, ref: 'User'
  category: type: String  # Integration category: weibo/github
  hashId: type: String, default: _hashId
  group: type: String
  # For authorized integrations
  token: String
  refreshToken: String
  showname: type: String
  openId: String
  notifications: type: Object
  # Options
  title: type: String
  iconUrl: String
  # Rss
  url: String
  description: type: String
  # Github
  repos: type: Array
  events: Array
  project: _id: String, name: String
  config: Object
  # Data saved by system
  data: Object
  errorInfo: String
  errorTimes: type: Number, default: 0
  lastErrorInfo: String
  createdAt: type: Date, default: Date.now
  updatedAt: type: Date, default: Date.now
,
  read: 'secondaryPreferred'
  toObject:
    virtuals: true
    getters: true
  toJSON:
    virtuals: true
    getters: true


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
{Schema} = require 'mongoose'
Err = require 'err1st'
_ = require 'lodash'
uuid = require 'uuid'
crypto = require 'crypto'
util = require '../util'

_hashId = -> crypto.createHash('sha1').update(uuid.v4() + Date.now()).digest('hex')

module.exports = IntegrationSchema = new Schema
  creator: type: Schema.Types.ObjectId, ref: 'User'
  team: type: Schema.Types.ObjectId, ref: 'Team'
  room: type: Schema.Types.ObjectId, ref: 'Room'
  robot: type: Schema.Types.ObjectId, ref: 'User'
  category: type: String  # Integration category: weibo/github
  hashId: type: String, default: _hashId
  group: type: String
  # For authorized integrations
  token: String
  refreshToken: String
  showname: type: String
  openId: String
  notifications: type: Object
  # Options
  title: type: String
  iconUrl: String
  # Rss
  url: String
  description: type: String
  # Github
  repos: type: Array
  events: Array
  project: _id: String, name: String
  config: Object
  # Data saved by system
  data: Object
  errorInfo: String
  errorTimes: type: Number, default: 0
  lastErrorInfo: String
  createdAt: type: Date, default: Date.now
  updatedAt: type: Date, default: Date.now
,
  read: 'secondaryPreferred'
  toObject:
    virtuals: true
    getters: true
  toJSON:
    virtuals: true
    getters: true
```

Response:
var Err, IntegrationSchema, Schema, _, _hashId, crypto, util, uuid;

({Schema} = require('mongoose'));

Err = require('err1st');

_ = require('lodash');

uuid = require('uuid');

crypto = require('crypto');

util = require('../util');

_hashId = function() {
  return crypto.createHash('sha1').update(uuid.v4() + Date.now()).digest('hex');
};

module.exports = IntegrationSchema = new Schema({
  creator: {
    type: Schema.Types.ObjectId,
    ref: 'User'
  },
  team: {
    type: Schema.Types.ObjectId,
    ref: 'Team'
  },
  room: {
    type: Schema.Types.ObjectId,
    ref: 'Room'
  },
  robot: {
    type: Schema.Types.ObjectId,
    ref: 'User'
  },
  category: {
    type: String // Integration category: weibo/github
  },
  hashId: {
    type: String,
    default: _hashId
  },
  group: {
    type: String
  },
  // For authorized integrations
  token: String,
  refreshToken: String,
  showname: {
    type: String
  },
  openId: String,
  notifications: {
    type: Object
  },
  // Options
  title: {
    type: String
  },
  iconUrl: String,
  // Rss
  url: String,
  description: {
    type: String
  },
  // Github
  repos: {
    type: Array
  },
  events: Array,
  project: {
    _id: String,
    name: String
  },
  config: Object,
  // Data saved by system
  data: Object,
  errorInfo: String,
  errorTimes: {
    type: Number,
    default: 0
  },
  lastErrorInfo: String,
  createdAt: {
    type: Date,
    default: Date.now
  },
  updatedAt: {
    type: Date,
    default: Date.now
  }
}, {
  read: 'secondaryPreferred',
  toObject: {
    virtuals: true,
    getters: true
  },
  toJSON: {
    virtuals: true,
    getters: true
  }
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var Err, IntegrationSchema, Schema, _, _hashId, crypto, util, uuid;

({Schema} = require('mongoose'));

Err = require('err1st');

_ = require('lodash');

uuid = require('uuid');

crypto = require('crypto');

util = require('../util');

_hashId = function() {
  return crypto.createHash('sha1').update(uuid.v4() + Date.now()).digest('hex');
};

module.exports = IntegrationSchema = new Schema({
  creator: {
    type: Schema.Types.ObjectId,
    ref: 'User'
  },
  team: {
    type: Schema.Types.ObjectId,
    ref: 'Team'
  },
  room: {
    type: Schema.Types.ObjectId,
    ref: 'Room'
  },
  robot: {
    type: Schema.Types.ObjectId,
    ref: 'User'
  },
  category: {
    type: String // Integration category: weibo/github
  },
  hashId: {
    type: String,
    default: _hashId
  },
  group: {
    type: String
  },
  // For authorized integrations
  token: String,
  refreshToken: String,
  showname: {
    type: String
  },
  openId: String,
  notifications: {
    type: Object
  },
  // Options
  title: {
    type: String
  },
  iconUrl: String,
  // Rss
  url: String,
  description: {
    type: String
  },
  // Github
  repos: {
    type: Array
  },
  events: Array,
  project: {
    _id: String,
    name: String
  },
  config: Object,
  // Data saved by system
  data: Object,
  errorInfo: String,
  errorTimes: {
    type: Number,
    default: 0
  },
  lastErrorInfo: String,
  createdAt: {
    type: Date,
    default: Date.now
  },
  updatedAt: {
    type: Date,
    default: Date.now
  }
}, {
  read: 'secondaryPreferred',
  toObject: {
    virtuals: true,
    getters: true
  },
  toJSON: {
    virtuals: true,
    getters: true
  }
});
```

Response:
{Schema} = require 'mongoose'
Err = require 'err1st'
_ = require 'lodash'
uuid = require 'uuid'
crypto = require 'crypto'
util = require '../util'

_hashId = -> crypto.createHash('sha1').update(uuid.v4() + Date.now()).digest('hex')

module.exports = IntegrationSchema = new Schema
  creator: type: Schema.Types.ObjectId, ref: 'User'
  team: type: Schema.Types.ObjectId, ref: 'Team'
  room: type: Schema.Types.ObjectId, ref: 'Room'
  robot: type: Schema.Types.ObjectId, ref: 'User'
  category: type: String  # Integration category: weibo/github
  hashId: type: String, default: _hashId
  group: type: String
  # For authorized integrations
  token: String
  refreshToken: String
  showname: type: String
  openId: String
  notifications: type: Object
  # Options
  title: type: String
  iconUrl: String
  # Rss
  url: String
  description: type: String
  # Github
  repos: type: Array
  events: Array
  project: _id: String, name: String
  config: Object
  # Data saved by system
  data: Object
  errorInfo: String
  errorTimes: type: Number, default: 0
  lastErrorInfo: String
  createdAt: type: Date, default: Date.now
  updatedAt: type: Date, default: Date.now
,
  read: 'secondaryPreferred'
  toObject:
    virtuals: true
    getters: true
  toJSON:
    virtuals: true
    getters: true


Prompt:
{Schema} = require 'mongoose'
Err = require 'err1st'
_ = require 'lodash'
uuid = require 'uuid'
crypto = require 'crypto'
util = require '../util'

_hashId = -> crypto.createHash('sha1').update(uuid.v4() + Date.now()).digest('hex')

module.exports = IntegrationSchema = new Schema
  creator: type: Schema.Types.ObjectId, ref: 'User'
  team: type: Schema.Types.ObjectId, ref: 'Team'
  room: type: Schema.Types.ObjectId, ref: 'Room'
  robot: type: Schema.Types.ObjectId, ref: 'User'
  category: type: String  # Integration category: weibo/github
  hashId: type: String, default: _hashId
  group: type: String
  # For authorized integrations
  token: String
  refreshToken: String
  showname: type: String
  openId: String
  notifications: type: Object
  # Options

Response:
title: type: String
  iconUrl: String
  # Rss
  url: String
  description: type: String
  # Github
  repos: type: Array
  events: Array
  project: _id: String, name: String
  config: Object
  # Data saved by system
  data: Object
  errorInfo: String
  errorTimes: type: Number, default: 0
  lastErrorInfo: String
  createdAt: type: Date, default: Date.now
  updatedAt: type: Date, default: Date.now
,
  read: 'secondaryPreferred'
  toObject:
    virtuals: true
    getters: true
  toJSON:
    virtuals: true
    getters: true


Response:
IntegrationSchema.virtual '_creatorId'
  .get -> @creator?._id or @creator
  .set (_id) -> @creator = _id

IntegrationSchema.virtual '_roomId'
  .get -> @room?._id or @room
  .set (_id) -> @room = _id

IntegrationSchema.virtual '_teamId'
  .get -> @team?._id or @team
  .set (_id) -> @team = _id

IntegrationSchema.virtual '_robotId'
  .get -> @robot?._id or @robot
  .set (_id) -> @robot = _id

IntegrationSchema.virtual 'webhookUrl'
  .get -> if @hashId then util.buildWebhookUrl(@hashId) else ''


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
IntegrationSchema.virtual '_creatorId'
  .get -> @creator?._id or @creator
  .set (_id) -> @creator = _id

IntegrationSchema.virtual '_roomId'
  .get -> @room?._id or @room
  .set (_id) -> @room = _id

IntegrationSchema.virtual '_teamId'
  .get -> @team?._id or @team
  .set (_id) -> @team = _id

IntegrationSchema.virtual '_robotId'
  .get -> @robot?._id or @robot
  .set (_id) -> @robot = _id

IntegrationSchema.virtual 'webhookUrl'
  .get -> if @hashId then util.buildWebhookUrl(@hashId) else ''
```

Response:
IntegrationSchema.virtual('_creatorId').get(function() {
  var ref;
  return ((ref = this.creator) != null ? ref._id : void 0) || this.creator;
}).set(function(_id) {
  return this.creator = _id;
});

IntegrationSchema.virtual('_roomId').get(function() {
  var ref;
  return ((ref = this.room) != null ? ref._id : void 0) || this.room;
}).set(function(_id) {
  return this.room = _id;
});

IntegrationSchema.virtual('_teamId').get(function() {
  var ref;
  return ((ref = this.team) != null ? ref._id : void 0) || this.team;
}).set(function(_id) {
  return this.team = _id;
});

IntegrationSchema.virtual('_robotId').get(function() {
  var ref;
  return ((ref = this.robot) != null ? ref._id : void 0) || this.robot;
}).set(function(_id) {
  return this.robot = _id;
});

IntegrationSchema.virtual('webhookUrl').get(function() {
  if (this.hashId) {
    return util.buildWebhookUrl(this.hashId);
  } else {
    return '';
  }
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
IntegrationSchema.virtual('_creatorId').get(function() {
  var ref;
  return ((ref = this.creator) != null ? ref._id : void 0) || this.creator;
}).set(function(_id) {
  return this.creator = _id;
});

IntegrationSchema.virtual('_roomId').get(function() {
  var ref;
  return ((ref = this.room) != null ? ref._id : void 0) || this.room;
}).set(function(_id) {
  return this.room = _id;
});

IntegrationSchema.virtual('_teamId').get(function() {
  var ref;
  return ((ref = this.team) != null ? ref._id : void 0) || this.team;
}).set(function(_id) {
  return this.team = _id;
});

IntegrationSchema.virtual('_robotId').get(function() {
  var ref;
  return ((ref = this.robot) != null ? ref._id : void 0) || this.robot;
}).set(function(_id) {
  return this.robot = _id;
});

IntegrationSchema.virtual('webhookUrl').get(function() {
  if (this.hashId) {
    return util.buildWebhookUrl(this.hashId);
  } else {
    return '';
  }
});
```

Response:
IntegrationSchema.virtual '_creatorId'
  .get -> @creator?._id or @creator
  .set (_id) -> @creator = _id

IntegrationSchema.virtual '_roomId'
  .get -> @room?._id or @room
  .set (_id) -> @room = _id

IntegrationSchema.virtual '_teamId'
  .get -> @team?._id or @team
  .set (_id) -> @team = _id

IntegrationSchema.virtual '_robotId'
  .get -> @robot?._id or @robot
  .set (_id) -> @robot = _id

IntegrationSchema.virtual 'webhookUrl'
  .get -> if @hashId then util.buildWebhookUrl(@hashId) else ''


Prompt:
IntegrationSchema.virtual '_creatorId'
  .get -> @creator?._id or @creator
  .set (_id) -> @creator = _id

IntegrationSchema.virtual '_roomId'
  .get -> @room?._id or @room
  .set (_id) -> @room = _id

IntegrationSchema.virtual '_teamId'

Response:
.get -> @team?._id or @team
  .set (_id) -> @team = _id

IntegrationSchema.virtual '_robotId'
  .get -> @robot?._id or @robot
  .set (_id) -> @robot = _id

IntegrationSchema.virtual 'webhookUrl'
  .get -> if @hashId then util.buildWebhookUrl(@hashId) else ''


Response:
suite 'CDATA Guards:', ->
  test 'constructor', ->
    err(
      () -> xml('test').ins()
      Error
      "Missing instruction target. parent: <test>"
    )


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
suite 'CDATA Guards:', ->
  test 'constructor', ->
    err(
      () -> xml('test').ins()
      Error
      "Missing instruction target. parent: <test>"
    )
```

Response:
suite('CDATA Guards:', function() {
  return test('constructor', function() {
    return err(function() {
      return xml('test').ins();
    }, Error, "Missing instruction target. parent: <test>");
  });
});


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
suite('CDATA Guards:', function() {
  return test('constructor', function() {
    return err(function() {
      return xml('test').ins();
    }, Error, "Missing instruction target. parent: <test>");
  });
});
```

Response:
suite 'CDATA Guards:', ->
  test 'constructor', ->
    err(
      () -> xml('test').ins()
      Error
      "Missing instruction target. parent: <test>"
    )


Prompt:
suite 'CDATA Guards:', ->
  test 'constructor', ->
    err(

Response:
() -> xml('test').ins()
      Error
      "Missing instruction target. parent: <test>"
    )


Response:
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method
    else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  headerTpl: null
  callbacks: DEFAULT_CALLBACKS
  functionOverrides: {}
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  acceptSpaceBar: false
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method
    else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  headerTpl: null
  callbacks: DEFAULT_CALLBACKS
  functionOverrides: {}
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  acceptSpaceBar: false
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300
```

Response:
var Api;

Api = {
  // load a flag's data

  // @params at[String] the flag
  // @params data [Array] data to storage.
  load: function(at, data) {
    var c;
    if (c = this.controller(at)) {
      return c.model.load(data);
    }
  },
  isSelecting: function() {
    var ref;
    return !!((ref = this.controller()) != null ? ref.view.visible() : void 0);
  },
  hide: function() {
    var ref;
    return (ref = this.controller()) != null ? ref.view.hide() : void 0;
  },
  reposition: function() {
    var c;
    if (c = this.controller()) {
      return c.view.reposition(c.rect());
    }
  },
  setIframe: function(iframe, asRoot) {
    this.setupRootElement(iframe, asRoot);
    return null;
  },
  run: function() {
    return this.dispatch();
  },
  destroy: function() {
    this.shutdown();
    return this.$inputor.data('atwho', null);
  }
};

$.fn.atwho = function(method) {
  var _args, result;
  _args = arguments;
  result = null;
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function() {
    var $this, app;
    if (!(app = ($this = $(this)).data("atwho"))) {
      $this.data('atwho', (app = new App(this)));
    }
    if (typeof method === 'object' || !method) {
      return app.reg(method.at, method);
    } else if (Api[method] && app) {
      return result = Api[method].apply(app, Array.prototype.slice.call(_args, 1));
    } else {
      return $.error(`Method ${method} does not exist on jQuery.atwho`);
    }
  });
  if (result != null) {
    return result;
  } else {
    return this;
  }
};

$.fn.atwho.default = {
  at: void 0,
  alias: void 0,
  data: null,
  displayTpl: "<li>${name}</li>",
  insertTpl: "${atwho-at}${name}",
  headerTpl: null,
  callbacks: DEFAULT_CALLBACKS,
  functionOverrides: {},
  searchKey: "name",
  suffix: void 0,
  hideWithoutSuffix: false,
  startWithSpace: true,
  acceptSpaceBar: false,
  highlightFirst: true,
  limit: 5,
  maxLen: 20,
  minLen: 0,
  displayTimeout: 300
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var Api;

Api = {
  // load a flag's data

  // @params at[String] the flag
  // @params data [Array] data to storage.
  load: function(at, data) {
    var c;
    if (c = this.controller(at)) {
      return c.model.load(data);
    }
  },
  isSelecting: function() {
    var ref;
    return !!((ref = this.controller()) != null ? ref.view.visible() : void 0);
  },
  hide: function() {
    var ref;
    return (ref = this.controller()) != null ? ref.view.hide() : void 0;
  },
  reposition: function() {
    var c;
    if (c = this.controller()) {
      return c.view.reposition(c.rect());
    }
  },
  setIframe: function(iframe, asRoot) {
    this.setupRootElement(iframe, asRoot);
    return null;
  },
  run: function() {
    return this.dispatch();
  },
  destroy: function() {
    this.shutdown();
    return this.$inputor.data('atwho', null);
  }
};

$.fn.atwho = function(method) {
  var _args, result;
  _args = arguments;
  result = null;
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function() {
    var $this, app;
    if (!(app = ($this = $(this)).data("atwho"))) {
      $this.data('atwho', (app = new App(this)));
    }
    if (typeof method === 'object' || !method) {
      return app.reg(method.at, method);
    } else if (Api[method] && app) {
      return result = Api[method].apply(app, Array.prototype.slice.call(_args, 1));
    } else {
      return $.error(`Method ${method} does not exist on jQuery.atwho`);
    }
  });
  if (result != null) {
    return result;
  } else {
    return this;
  }
};

$.fn.atwho.default = {
  at: void 0,
  alias: void 0,
  data: null,
  displayTpl: "<li>${name}</li>",
  insertTpl: "${atwho-at}${name}",
  headerTpl: null,
  callbacks: DEFAULT_CALLBACKS,
  functionOverrides: {},
  searchKey: "name",
  suffix: void 0,
  hideWithoutSuffix: false,
  startWithSpace: true,
  acceptSpaceBar: false,
  highlightFirst: true,
  limit: 5,
  maxLen: 20,
  minLen: 0,
  displayTimeout: 300
};
```

Response:
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method
    else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  headerTpl: null
  callbacks: DEFAULT_CALLBACKS
  functionOverrides: {}
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  acceptSpaceBar: false
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300


Prompt:
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method

Response:
else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  headerTpl: null
  callbacks: DEFAULT_CALLBACKS
  functionOverrides: {}
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  acceptSpaceBar: false
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300


Response:
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method
    else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  headerTpl: null
  callbacks: DEFAULT_CALLBACKS
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  acceptSpaceBar: false
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300
  delay: null


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method
    else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  headerTpl: null
  callbacks: DEFAULT_CALLBACKS
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  acceptSpaceBar: false
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300
  delay: null
```

Response:
var Api;

Api = {
  // load a flag's data

  // @params at[String] the flag
  // @params data [Array] data to storage.
  load: function(at, data) {
    var c;
    if (c = this.controller(at)) {
      return c.model.load(data);
    }
  },
  isSelecting: function() {
    var ref;
    return !!((ref = this.controller()) != null ? ref.view.visible() : void 0);
  },
  hide: function() {
    var ref;
    return (ref = this.controller()) != null ? ref.view.hide() : void 0;
  },
  reposition: function() {
    var c;
    if (c = this.controller()) {
      return c.view.reposition(c.rect());
    }
  },
  setIframe: function(iframe, asRoot) {
    this.setupRootElement(iframe, asRoot);
    return null;
  },
  run: function() {
    return this.dispatch();
  },
  destroy: function() {
    this.shutdown();
    return this.$inputor.data('atwho', null);
  }
};

$.fn.atwho = function(method) {
  var _args, result;
  _args = arguments;
  result = null;
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function() {
    var $this, app;
    if (!(app = ($this = $(this)).data("atwho"))) {
      $this.data('atwho', (app = new App(this)));
    }
    if (typeof method === 'object' || !method) {
      return app.reg(method.at, method);
    } else if (Api[method] && app) {
      return result = Api[method].apply(app, Array.prototype.slice.call(_args, 1));
    } else {
      return $.error(`Method ${method} does not exist on jQuery.atwho`);
    }
  });
  if (result != null) {
    return result;
  } else {
    return this;
  }
};

$.fn.atwho.default = {
  at: void 0,
  alias: void 0,
  data: null,
  displayTpl: "<li>${name}</li>",
  insertTpl: "${atwho-at}${name}",
  headerTpl: null,
  callbacks: DEFAULT_CALLBACKS,
  searchKey: "name",
  suffix: void 0,
  hideWithoutSuffix: false,
  startWithSpace: true,
  acceptSpaceBar: false,
  highlightFirst: true,
  limit: 5,
  maxLen: 20,
  minLen: 0,
  displayTimeout: 300,
  delay: null
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var Api;

Api = {
  // load a flag's data

  // @params at[String] the flag
  // @params data [Array] data to storage.
  load: function(at, data) {
    var c;
    if (c = this.controller(at)) {
      return c.model.load(data);
    }
  },
  isSelecting: function() {
    var ref;
    return !!((ref = this.controller()) != null ? ref.view.visible() : void 0);
  },
  hide: function() {
    var ref;
    return (ref = this.controller()) != null ? ref.view.hide() : void 0;
  },
  reposition: function() {
    var c;
    if (c = this.controller()) {
      return c.view.reposition(c.rect());
    }
  },
  setIframe: function(iframe, asRoot) {
    this.setupRootElement(iframe, asRoot);
    return null;
  },
  run: function() {
    return this.dispatch();
  },
  destroy: function() {
    this.shutdown();
    return this.$inputor.data('atwho', null);
  }
};

$.fn.atwho = function(method) {
  var _args, result;
  _args = arguments;
  result = null;
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function() {
    var $this, app;
    if (!(app = ($this = $(this)).data("atwho"))) {
      $this.data('atwho', (app = new App(this)));
    }
    if (typeof method === 'object' || !method) {
      return app.reg(method.at, method);
    } else if (Api[method] && app) {
      return result = Api[method].apply(app, Array.prototype.slice.call(_args, 1));
    } else {
      return $.error(`Method ${method} does not exist on jQuery.atwho`);
    }
  });
  if (result != null) {
    return result;
  } else {
    return this;
  }
};

$.fn.atwho.default = {
  at: void 0,
  alias: void 0,
  data: null,
  displayTpl: "<li>${name}</li>",
  insertTpl: "${atwho-at}${name}",
  headerTpl: null,
  callbacks: DEFAULT_CALLBACKS,
  searchKey: "name",
  suffix: void 0,
  hideWithoutSuffix: false,
  startWithSpace: true,
  acceptSpaceBar: false,
  highlightFirst: true,
  limit: 5,
  maxLen: 20,
  minLen: 0,
  displayTimeout: 300,
  delay: null
};
```

Response:
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method
    else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  headerTpl: null
  callbacks: DEFAULT_CALLBACKS
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  acceptSpaceBar: false
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300
  delay: null


Prompt:
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method

Response:
else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  headerTpl: null
  callbacks: DEFAULT_CALLBACKS
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  acceptSpaceBar: false
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300
  delay: null


Response:
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method
    else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  headerTpl: null
  callbacks: DEFAULT_CALLBACKS
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300
  delay: null
  spaceSelectsMatch: no


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method
    else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  headerTpl: null
  callbacks: DEFAULT_CALLBACKS
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300
  delay: null
  spaceSelectsMatch: no
```

Response:
var Api;

Api = {
  // load a flag's data

  // @params at[String] the flag
  // @params data [Array] data to storage.
  load: function(at, data) {
    var c;
    if (c = this.controller(at)) {
      return c.model.load(data);
    }
  },
  isSelecting: function() {
    var ref;
    return !!((ref = this.controller()) != null ? ref.view.visible() : void 0);
  },
  hide: function() {
    var ref;
    return (ref = this.controller()) != null ? ref.view.hide() : void 0;
  },
  reposition: function() {
    var c;
    if (c = this.controller()) {
      return c.view.reposition(c.rect());
    }
  },
  setIframe: function(iframe, asRoot) {
    this.setupRootElement(iframe, asRoot);
    return null;
  },
  run: function() {
    return this.dispatch();
  },
  destroy: function() {
    this.shutdown();
    return this.$inputor.data('atwho', null);
  }
};

$.fn.atwho = function(method) {
  var _args, result;
  _args = arguments;
  result = null;
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function() {
    var $this, app;
    if (!(app = ($this = $(this)).data("atwho"))) {
      $this.data('atwho', (app = new App(this)));
    }
    if (typeof method === 'object' || !method) {
      return app.reg(method.at, method);
    } else if (Api[method] && app) {
      return result = Api[method].apply(app, Array.prototype.slice.call(_args, 1));
    } else {
      return $.error(`Method ${method} does not exist on jQuery.atwho`);
    }
  });
  if (result != null) {
    return result;
  } else {
    return this;
  }
};

$.fn.atwho.default = {
  at: void 0,
  alias: void 0,
  data: null,
  displayTpl: "<li>${name}</li>",
  insertTpl: "${atwho-at}${name}",
  headerTpl: null,
  callbacks: DEFAULT_CALLBACKS,
  searchKey: "name",
  suffix: void 0,
  hideWithoutSuffix: false,
  startWithSpace: true,
  highlightFirst: true,
  limit: 5,
  maxLen: 20,
  minLen: 0,
  displayTimeout: 300,
  delay: null,
  spaceSelectsMatch: false
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var Api;

Api = {
  // load a flag's data

  // @params at[String] the flag
  // @params data [Array] data to storage.
  load: function(at, data) {
    var c;
    if (c = this.controller(at)) {
      return c.model.load(data);
    }
  },
  isSelecting: function() {
    var ref;
    return !!((ref = this.controller()) != null ? ref.view.visible() : void 0);
  },
  hide: function() {
    var ref;
    return (ref = this.controller()) != null ? ref.view.hide() : void 0;
  },
  reposition: function() {
    var c;
    if (c = this.controller()) {
      return c.view.reposition(c.rect());
    }
  },
  setIframe: function(iframe, asRoot) {
    this.setupRootElement(iframe, asRoot);
    return null;
  },
  run: function() {
    return this.dispatch();
  },
  destroy: function() {
    this.shutdown();
    return this.$inputor.data('atwho', null);
  }
};

$.fn.atwho = function(method) {
  var _args, result;
  _args = arguments;
  result = null;
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function() {
    var $this, app;
    if (!(app = ($this = $(this)).data("atwho"))) {
      $this.data('atwho', (app = new App(this)));
    }
    if (typeof method === 'object' || !method) {
      return app.reg(method.at, method);
    } else if (Api[method] && app) {
      return result = Api[method].apply(app, Array.prototype.slice.call(_args, 1));
    } else {
      return $.error(`Method ${method} does not exist on jQuery.atwho`);
    }
  });
  if (result != null) {
    return result;
  } else {
    return this;
  }
};

$.fn.atwho.default = {
  at: void 0,
  alias: void 0,
  data: null,
  displayTpl: "<li>${name}</li>",
  insertTpl: "${atwho-at}${name}",
  headerTpl: null,
  callbacks: DEFAULT_CALLBACKS,
  searchKey: "name",
  suffix: void 0,
  hideWithoutSuffix: false,
  startWithSpace: true,
  highlightFirst: true,
  limit: 5,
  maxLen: 20,
  minLen: 0,
  displayTimeout: 300,
  delay: null,
  spaceSelectsMatch: false
};
```

Response:
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method
    else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  headerTpl: null
  callbacks: DEFAULT_CALLBACKS
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300
  delay: null
  spaceSelectsMatch: no


Prompt:
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method

Response:
else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  headerTpl: null
  callbacks: DEFAULT_CALLBACKS
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300
  delay: null
  spaceSelectsMatch: no


Response:
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method
    else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  callbacks: DEFAULT_CALLBACKS
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300
  delay: null
  spaceSelectsMatch: no
  tabSelectsMatch: yes


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method
    else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  callbacks: DEFAULT_CALLBACKS
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300
  delay: null
  spaceSelectsMatch: no
  tabSelectsMatch: yes
```

Response:
var Api;

Api = {
  // load a flag's data

  // @params at[String] the flag
  // @params data [Array] data to storage.
  load: function(at, data) {
    var c;
    if (c = this.controller(at)) {
      return c.model.load(data);
    }
  },
  isSelecting: function() {
    var ref;
    return !!((ref = this.controller()) != null ? ref.view.visible() : void 0);
  },
  hide: function() {
    var ref;
    return (ref = this.controller()) != null ? ref.view.hide() : void 0;
  },
  reposition: function() {
    var c;
    if (c = this.controller()) {
      return c.view.reposition(c.rect());
    }
  },
  setIframe: function(iframe, asRoot) {
    this.setupRootElement(iframe, asRoot);
    return null;
  },
  run: function() {
    return this.dispatch();
  },
  destroy: function() {
    this.shutdown();
    return this.$inputor.data('atwho', null);
  }
};

$.fn.atwho = function(method) {
  var _args, result;
  _args = arguments;
  result = null;
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function() {
    var $this, app;
    if (!(app = ($this = $(this)).data("atwho"))) {
      $this.data('atwho', (app = new App(this)));
    }
    if (typeof method === 'object' || !method) {
      return app.reg(method.at, method);
    } else if (Api[method] && app) {
      return result = Api[method].apply(app, Array.prototype.slice.call(_args, 1));
    } else {
      return $.error(`Method ${method} does not exist on jQuery.atwho`);
    }
  });
  if (result != null) {
    return result;
  } else {
    return this;
  }
};

$.fn.atwho.default = {
  at: void 0,
  alias: void 0,
  data: null,
  displayTpl: "<li>${name}</li>",
  insertTpl: "${atwho-at}${name}",
  callbacks: DEFAULT_CALLBACKS,
  searchKey: "name",
  suffix: void 0,
  hideWithoutSuffix: false,
  startWithSpace: true,
  highlightFirst: true,
  limit: 5,
  maxLen: 20,
  minLen: 0,
  displayTimeout: 300,
  delay: null,
  spaceSelectsMatch: false,
  tabSelectsMatch: true
};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var Api;

Api = {
  // load a flag's data

  // @params at[String] the flag
  // @params data [Array] data to storage.
  load: function(at, data) {
    var c;
    if (c = this.controller(at)) {
      return c.model.load(data);
    }
  },
  isSelecting: function() {
    var ref;
    return !!((ref = this.controller()) != null ? ref.view.visible() : void 0);
  },
  hide: function() {
    var ref;
    return (ref = this.controller()) != null ? ref.view.hide() : void 0;
  },
  reposition: function() {
    var c;
    if (c = this.controller()) {
      return c.view.reposition(c.rect());
    }
  },
  setIframe: function(iframe, asRoot) {
    this.setupRootElement(iframe, asRoot);
    return null;
  },
  run: function() {
    return this.dispatch();
  },
  destroy: function() {
    this.shutdown();
    return this.$inputor.data('atwho', null);
  }
};

$.fn.atwho = function(method) {
  var _args, result;
  _args = arguments;
  result = null;
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function() {
    var $this, app;
    if (!(app = ($this = $(this)).data("atwho"))) {
      $this.data('atwho', (app = new App(this)));
    }
    if (typeof method === 'object' || !method) {
      return app.reg(method.at, method);
    } else if (Api[method] && app) {
      return result = Api[method].apply(app, Array.prototype.slice.call(_args, 1));
    } else {
      return $.error(`Method ${method} does not exist on jQuery.atwho`);
    }
  });
  if (result != null) {
    return result;
  } else {
    return this;
  }
};

$.fn.atwho.default = {
  at: void 0,
  alias: void 0,
  data: null,
  displayTpl: "<li>${name}</li>",
  insertTpl: "${atwho-at}${name}",
  callbacks: DEFAULT_CALLBACKS,
  searchKey: "name",
  suffix: void 0,
  hideWithoutSuffix: false,
  startWithSpace: true,
  highlightFirst: true,
  limit: 5,
  maxLen: 20,
  minLen: 0,
  displayTimeout: 300,
  delay: null,
  spaceSelectsMatch: false,
  tabSelectsMatch: true
};
```

Response:
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method
    else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  callbacks: DEFAULT_CALLBACKS
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300
  delay: null
  spaceSelectsMatch: no
  tabSelectsMatch: yes


Prompt:
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method

Response:
else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  callbacks: DEFAULT_CALLBACKS
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  highlightFirst: yes
  limit: 5
  maxLen: 20
  minLen: 0
  displayTimeout: 300
  delay: null
  spaceSelectsMatch: no
  tabSelectsMatch: yes


Response:
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method
    else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  callbacks: DEFAULT_CALLBACKS
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  highlightFirst: yes
  limit: 5
  maxLen: 20
  displayTimeout: 300
  delay: null
  spaceSelectsMatch: no
  tabSelectsMatch: yes
  editableAtwhoQueryAttrs: {}


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
Api =
  # load a flag's data
  #
  # @params at[String] the flag
  # @params data [Array] data to storage.
  load: (at, data) -> c.model.load data if c = this.controller(at)
  isSelecting: () -> !!this.controller()?.view.visible()
  hide: () -> this.controller()?.view.hide()
  reposition: () ->
    if c = this.controller()
      c.view.reposition(c.rect())
  setIframe: (iframe, asRoot) -> this.setupRootElement(iframe, asRoot); null;
  run: -> this.dispatch()
  destroy: ->
    this.shutdown()
    @$inputor.data('atwho', null)

$.fn.atwho = (method) ->
  _args = arguments
  result = null
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each ->
    if not app = ($this = $ this).data "atwho"
      $this.data 'atwho', (app = new App this)
    if typeof method is 'object' || !method
      app.reg method.at, method
    else if Api[method] and app
      result = Api[method].apply app, Array::slice.call(_args, 1)
    else
      $.error "Method #{method} does not exist on jQuery.atwho"
  if result? then result else this

$.fn.atwho.default =
  at: undefined
  alias: undefined
  data: null
  displayTpl: "<li>${name}</li>"
  insertTpl: "${atwho-at}${name}"
  callbacks: DEFAULT_CALLBACKS
  searchKey: "name"
  suffix: undefined
  hideWithoutSuffix: no
  startWithSpace: yes
  highlightFirst: yes
  limit: 5
  maxLen: 20
  displayTimeout: 300
  delay: null
  spaceSelectsMatch: no
  tabSelectsMatch: yes
  editableAtwhoQueryAttrs: {}
```

Response:
var Api;

Api = {
  // load a flag's data

  // @params at[String] the flag
  // @params data [Array] data to storage.
  load: function(at, data) {
    var c;
    if (c = this.controller(at)) {
      return c.model.load(data);
    }
  },
  isSelecting: function() {
    var ref;
    return !!((ref = this.controller()) != null ? ref.view.visible() : void 0);
  },
  hide: function() {
    var ref;
    return (ref = this.controller()) != null ? ref.view.hide() : void 0;
  },
  reposition: function() {
    var c;
    if (c = this.controller()) {
      return c.view.reposition(c.rect());
    }
  },
  setIframe: function(iframe, asRoot) {
    this.setupRootElement(iframe, asRoot);
    return null;
  },
  run: function() {
    return this.dispatch();
  },
  destroy: function() {
    this.shutdown();
    return this.$inputor.data('atwho', null);
  }
};

$.fn.atwho = function(method) {
  var _args, result;
  _args = arguments;
  result = null;
  this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function() {
    var $this, app;
    if (!(app = ($this = $(this)).data("atwho"))) {
      $this.data('atwho', (app = new App(this)));
    }
    if (typeof method === 'object' || !method) {
      return app.reg(method.at, method);
    } else if (Api[method] && app) {
      return result = Api[method].apply(app, Array.prototype.slice.call(_args, 1));
    } else {
      return $.error(`Method ${method} does not exist on jQuery.atwho`);
    }
  });
  if (result != null) {
    return result;
  } else {
    return this;
  }
};

$.fn.atwho.default = {
  at: void 0,
  alias: void 0,
  data: null,
  displayTpl: "<li>${name}</li>",
  insertTpl: "${atwho-at}${name}",
  callbacks: DEFAULT_CALLBACKS,
  searchKey: "name",
  suffix: void 0,
  hideWithoutSuffix: false,
  startWithSpace: true,
  highlightFirst: true,
  limit: 5,
  maxLen: 20,
  displayTimeout: 300,
  delay: null,
  spaceSelectsMatch: false,
  tabSelectsMatch: true,
  editableAtwhoQueryAttrs: {}
};