From edadacdb666f0b62d03208c0001f782ac1368f22 Mon Sep 17 00:00:00 2001 From: Shreyans Jain Date: Thu, 23 Jan 2020 18:27:51 +0530 Subject: [PATCH 01/29] migrated mocha, chai to npm --- dist/imtables.js | 188 ++++++------- dist/imtables.min.js | 2 +- package-lock.json | 637 ++++++++++++++----------------------------- package.json | 3 +- 4 files changed, 308 insertions(+), 522 deletions(-) diff --git a/dist/imtables.js b/dist/imtables.js index fe7384c9..60d8126f 100644 --- a/dist/imtables.js +++ b/dist/imtables.js @@ -5456,116 +5456,116 @@ function getTemplate (name) { } // Simple templates we can define inline. TEMPLATES.clear = '
'; -exports.code_gen_js = "<% if (asHTML) { %>\n\n
\n\n\n\">\n\n<% } %>\n"; -exports.select_with_label = "\n\n<% if (options.length) { %>\n \n <% if (helpMessage) { %>\n \"\n class=\"help-block\">\n <%- Messages.getText(helpMessage) %>\n \n <% } %>\n<% } else { %>\n \n <%- Messages.getText(noOptionsMessage, {model: model}) %>\n \n<% } %>\n\n"; +exports.input_with_label = "\n\"\n value=\"<%- value %>\">\n<% if (helpMessage) { %>\n \"\n class=\"help-block\">\n <%- Messages.getText(helpMessage) %>\n \n<% } %>\n"; +exports.reset_button = "\n"; +exports.column_manager_path_chooser = "
\n
\n

\n <%- Messages.getText('columns.ChooseAPathFrom', {root: state.rootName}) %>\n

\n\n"; exports.modal_base = "
\">\n
\n
\n \n

<%- title %>

\n
\n
\n <%= body %>\n
\n
\n
\n"; -exports.constraints_heading = "<% /* requires constraints.length */ %>\n

\n <%- Messages.getText('constraints.Heading', {n: constraints.length}) %>\n

\n"; -exports.logic_manager_body = "
\n \n
\n
\n \n
\n"; -exports.value_control_row = "\n \n\n\n {{# if (editing) { }}\n
\n \n \n \n \n \n
\n {{# } else { }}\n {{{ icons.icon('Edit') }}}\n {{ value }}\n {{# } }}\n\n"; -exports.export_fasta_options = "

<%- Messages.getText('export.category.Options') %>

\n\n
\n \n \"\n placeholder=\"5kbp\"\n class=\"form-control im-fasta-ext\">\n
\n"; -exports.code_gen_button = "<% /* requires lang :: string, options.Langs :: [string] */ %>\n
\n \n \n \n
\n"; -exports.too_many_suggestions = "\n {{{ icons.icon('Info') }}}\n {{ messages.getText('conbuilder.TooManySuggestions') }}\n There are {{ extra }} values we could not include.\n\n"; -exports.modal_dialogue_opener = "\n"; -exports.column_manager_path_remover = "<% /* requires: removeTitle */ %>\n\">\n <%= Icons.icon('Remove') %>\n\n\n"; exports.cell_preview_items = "\n \n \n\n\n"; -exports.reset_button = "\n"; -exports.error_message = "<% if (error) { %>\n
\">\n <%= icons.icon('Error') %>\n \n <%- error.message || error %>\n \n
\n<% } %>\n\n"; -exports.list_dialogue_expander = "\n"; -exports.export_tab_menu = "<% _.each(data.tabs, function (tabDef) { %>\n
  • <%= data.tab === tabDef.ident ? 'active' : void 0 %>\">\n <%- data.Messages.getText(tabDef.key, data) %>\n
  • \n<% }); %>\n"; +exports.join_style = "<% /* requires innerJoinBtn, outerJoinBtn */ %>\n
    \n \n \n
    \n"; +exports.modal_error = "<% /* Renders an alert box at various levels, with appropriate icons and messages */ %>\n<% if (error) { %>\n
    \">\n <% if (!error.cannotDismiss) { %>\n \n <% } %>\n <%= Icons.icon(errorIcon(error)) %>\n <%- Messages.getText('ErrorTitle', error) %>\n <% if (error.key != null) { %>\n <%- Messages.getText(error.key) %>\n <% } else { %>\n <%- error.message || error %>\n <% } %>\n
    \n<% } %>\n"; +exports.type_value_controls = "\n<% if (subclasses.length == 1) { %>\n \n<% } else { %>\n <%= select(subclasses, isSelected, 'form-control im-value-type') %>\n<% } %>\n \n"; +exports.constraint_adder_options = "<% if (showTree) { %>\n
    \n
    \n find\n \"\n class=\"im-tree-filter form-control\" placeholder=\"path\">\n \n \n \n
    \n
    \n<% } %>\n
    \n
    \n <% if (!showTree) { %>\n \n <% } else { %>\n \n <% } %>\n
    \n
    \n \n
    \n
    \n"; +exports.list_dialogue_body = "
    \n\n
    \n
    \n

    \n <%= Icons.icon('Options') %>\n <%- Messages.getText('lists.ShowExtraOptions', state) %>\n

    \n
    \n
    \n\n
    \">\n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n"; +exports.modal_dialogue_opener = "\n"; +exports.column_manager_sort_order_editor = "<% /* requires: collection, available */ %>\n

    \n <%- Messages.getText('columns.CurrentSortOrder', {\n oes: collection\n }) %>\n

    \n\n\n <%- Messages.getText('columns.CurrentSortOrderHelp') %>\n\n\n
    \n\n
    \n
    \n <% if (collection.length) { %>\n
      \n <% } else { %>\n
      \n <%- Messages.getText('columns.NoSortOrder') %>\n
      \n <% } %>\n
      \n\n
      \n <% if (available) { %>\n
      \n
        \n
      \n
      \n <% } %>\n
      \n
      \n
      \n"; exports.column_header = "<% /* requires the properties of HeaderModel +\n * penult, last, headerClasses, colTitleClasses, penultClasses\n * and the usual Icons, Messages\n */ %>\n
      \">\n\n
      \n \n <% if (outerJoined && isReference) { %>\n \">\n <%= Icons.icon('Table') %>\n \n <% } %>\n\n <% if (sortable) { %>\n \n \">\n <%= Icons.icon(sortDirection || 'unsorted') %>\n \n
      \n
      <%- Messages.getText('table.header.FailedToInitSortMenu') %>
      \n
      \n
      \n <% } %>\n\n \">\n <%= Icons.icon('headerIconRemove') %>\n \n\n \">\n <%= Icons.icon(minimised ? 'headerIconReveal' : 'headerIconHide') %>\n \n\n \n \"\n data-toggle=\"dropdown\" >\n <%= Icons.icon('Filter') %>\n \n
      \n
      <%- Messages.getText('table.header.FailedToInitFilter') %>
      \n
      \n
      \n\n \n \"\n data-toggle=\"dropdown\" >\n <%= Icons.icon('Summary') %>\n \n
      \n
      <%- Messages.getText('table.header.FailedToInitSummary') %>
      \n
      \n
      \n\n <% if (isComposed) { %>\n \">\n <%= Icons.icon('Composed') %>\n \n <% } %>\n
      \n\n
      \">\n
      \">\n <%- penult %>\n
      \n <% if (last) { %>\n
      \n <%- last %>\n
      \n <% } %>\n
      \n\n
      \n\n"; exports.column_manager_restore_path = "<% /* requires: restoreTitle */ %>\n\">\n <%= Icons.icon('Add') %>\n\n\n"; -exports.list_value_controls = "<% if (suitableLists.length) { %>\n <%= select(suitableLists, isSelected, 'span7 im-value-options im-con-value im-con-value-list form-control', formatList, getOptionValue) %>\n<% } else { %>\n <%- messages.getText('conbuilder.NoSuitableLists') %>\n<% } %>\n"; -exports.formatted_sorting = " <% /* requires Icons, direction and name */ %>\n <%= Icons.icon(direction || 'unsorted') %>\n <%- name %>\n\n"; -exports.cell_preview_attribute = "\n <%- _.last(parts) %>\n <%- type %>\">\n <% if (isNumeric) { %>\n <%- numToString(+value) %>\n <% } else { %>\n <%- value %>\n <% } %>\n <% if (tooLong) { %>\n <%- valueOverspill %>\n \n ...\n <%= Icons.icon('More') %>\n \n <% } %>\n \n\n"; -exports.extra_value_controls = "\n\n"; -exports.pagination = "\n"; -exports.constraint_summary = "<% if (code) { %>\n
    • <%- code %>:
    • \n<% } %>\n<% _.each(labels, function (label) { %>\n
    • \n \">\n <% if (_.include(['error', 'warning'], label.type)) { %>\n <%= Icons.icon('Error') %>\n <%- Messages.getText('consummary.' + label.content) %>\n <% } else if (label.type === 'path') { %>\n <% _.each(label.content.split(' > '), function (part) { %>\n \" class=\"im-name-part\"><%- part %>\n <% }); %>\n <% } else { %>\n <% if (label.icon) { %><%= Icons.icon(label.icon) %><% } %>\n <%- label.content %>\n <% } %>\n \n
    • \n<% }); %>\n"; -exports.facet_frequency = "<% /* requires: error, initialized */ %>\n<% if (error) { %>\n <% /* Oh noes - something went wrong. */ %>\n
      \n <%= Icons.icon('Error') %>\n <%- Messages.getText('Error') %>\n <% if (error.key) { %>\n <%- Messages.getText(error.key) %>\n <% } else { %>\n <%- error.message || error %>\n <% } %>\n
      \n<% } else if (initialized) { %>\n <% /* Huzzah - there is data, which will be added here as child views */ %>\n<% } else { %>\n <% /* Boo - no data. Show an indeterminate progress bar while we wait. */ %>\n
      \n
      \n <%- Messages.getText('Loading') %>.\n
      \n
      \n<% } %>\n"; -exports.column_manager_position_controls = "
      \n <% if (index > 0) { %>\n <%= Icons.iconWithProps('ASC', {\n className: 'im-move-up',\n title: Messages.getText('columns.MoveUp')\n }) %>\n <% } %>\n <% if (!isLast) { %>\n <%= Icons.iconWithProps('DESC', {\n className: 'im-move-down',\n title: Messages.getText('columns.MoveDown')\n }) %>\n <% } %>\n
      \n\n"; -exports.export_format_controls = "

      \n\n<% _.each(formats, function (formatDef) { %>\n
      \n \n
      \n<% }); %>\n"; -exports.cell_preview_error = "
      \n

      Error

      \n

      Sorry. We could not fetch the preview due to an error:

      \n <%- message %>\n
      \n"; -exports.export_destination_radios = "\n<% _.each(destinations, function (d) { %>\n
      \">\n \n
      \n<% }); %>\n\n"; -exports.column_manager_sort_order_editor = "<% /* requires: collection, available */ %>\n

      \n <%- Messages.getText('columns.CurrentSortOrder', {\n oes: collection\n }) %>\n

      \n\n\n <%- Messages.getText('columns.CurrentSortOrderHelp') %>\n\n\n
      \n\n
      \n
      \n <% if (collection.length) { %>\n
        \n <% } else { %>\n
        \n <%- Messages.getText('columns.NoSortOrder') %>\n
        \n <% } %>\n
        \n\n
        \n <% if (available) { %>\n
        \n
          \n
        \n
        \n <% } %>\n
        \n
        \n
        \n"; -exports.facet_item = "
        \n \n \n (<%- count %>)\n \n <%- item %>\n \n
        \n"; -exports.checkbox = "\n"; -exports.attribute_value_controls = "
        \n \"\n value=\"<%- con.value %>\">\n
        \n"; -exports.input_with_label = "\n\"\n value=\"<%- value %>\">\n<% if (helpMessage) { %>\n \"\n class=\"help-block\">\n <%- Messages.getText(helpMessage) %>\n \n<% } %>\n"; -exports.export_dialogue = "
        \n \n
        \n
        \n
        \n"; -exports.input_with_button = "\"\n placeholder=\"<%- Messages.getText(placeholder) %>\">\n\n \n\n\n"; -exports.summary_no_results = "
        \n <%= Icons.icon('Warning') %>\n <%- Messages.getText('summary.NoResults', {path: pathName}) %>\n
        \n\n"; -exports.summary_items = "<% if (!(/boolean/i).test(type)) { %>\n
        \n \n \n \n \"\n placeholder=\"<%- Messages.getText('summary.FilterValuesPlaceholder') %>\">\n
        \n<% } %>\n\n
        \n \n \n <% _.each(colClasses, function (cls) { %>\n \">\n <% }); %>\n \n \n \n <% _.each(colHeaders, function (hdr) { %>\n \n <% }); %>\n \n \n \n \n
        <%- hdr %>
        \n\n <% if (hasMore) { %>\n
        \n <%- Messages.getText('summary.MoreItems') %>\n
        \n <% } %>\n
        \n\n
        \n
        \n"; -exports.list_dialogue_button_node = "\n \n <%- displayName || path %>\n \n <% if (state.count) { %>\n (<%- numToString(state.count) %>\n <%- pluralise((typeName || type), state.count) %>)\n <% } %>\n\n"; -exports.join_style = "<% /* requires innerJoinBtn, outerJoinBtn */ %>\n
        \n \n \n
        \n"; -exports.summary_heading = "<% /* requires:\n * numeric, available, got, uniqueValues\n * state.typeName, state.endName\n * filtered \n */ %>\n

        \n <% if (numeric) { %>\n <%- Messages.getText('summary.NumericDistribution', {n: available}) %>\n <%- state.typeName %>\n <%- pluralise(state.endName, got) %>\n <% } else { %> \n \n <%- Messages.getText('summary.Got', {available: available, got: got}) %>\n \n \n <%- Messages.getText('Number', {n: available}) %>\n \n <%- state.typeName %>\n <%- pluralise(state.endName, got) %>\n \n <%- Messages.getText('summary.Total', {\n filtered: filtered,\n total: uniqueValues\n }) %>\n \n <% } %> \n

        \n"; -exports.code_gen_body = "
        \n
        \n <% /* requires lang :: string, options :: {Extra :: {}, Langs :: [string]} */ %>\n
        \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        <%- generatedCode %>
        \n
        \n
        \n"; -exports.table_building = "

        <%- Messages.getText('table.Building') %>

        \n<%= IndeterminateProgressBar %>\n"; exports.code_gen_button_main = "<%= Icons.icon('CodeFile') %>\n\n <%- Messages.getText('codegen.GenerateCodeIn', {lang: lang}) %>\n\n\n <%- Messages.getText('codegen.Lang', {lang: lang}) %>\n\n\n"; -exports.type_value_controls = "\n<% if (subclasses.length == 1) { %>\n \n<% } else { %>\n <%= select(subclasses, isSelected, 'form-control im-value-type') %>\n<% } %>\n \n"; -exports.export_preview = "
        \n \n \n
        \n\n
        \n<%- state.preview %>\n
        \n\n
        \n nb\n <%- Messages.getText('export.preview.Limit') %>\n
        \n"; -exports.export_column_controls = "

        <%- Messages.getText('export.heading.Columns') %>

        \n\n\n\n
        \n"; -exports.only_one_item = "
        \n <%= Icons.icon('Info') %>\n <%= Messages.getText('summary.OnlyOne', {names: state, item: items[0]}) %>\n
        \n\n"; -exports.table_error = "
        \n\n

        <%= Icons.icon('Bug') %><%- Messages.getText('error.Oops') %>

        \n\n

        \n <%- Messages.getText(error.key || 'error.' + domain + '.Heading') %>\n

        \n\n

        <%- Messages.getText('error.' + domain + '.Body') %>

        \n\n \">\n <%= Icons.icon('Mail') %>\n <%- Messages.getText('error.EmailHelp') %>\n \n\n \n <% if (error.message) { %>\n \n <% } %>\n\n
        <%- indent(query) %>
        \n\n <% if (error.message) { %>\n
        <%- error.message %>
        \n <% } %>\n\n
        \n"; -exports.page_sizer = "<% /* Expects size, sizes */ %>\n<% if (sizes.length) { %>\n \n \n<% } %>\n"; exports.constraint_editor = "
        \n \n <% if (data.con.op) { %>\n
        \n \n
        \n <% } %>\n
        \n
        \n
        \n\n
        \n <% data.buttons.forEach(function (b, i) { %>\n \n <% }); %>\n
        \n"; -exports.facet_row = "<% /* requires: selected, symbol, item, count, percent, opacity, share */ %>\n\n <%- symbol %>\n
        \n\n\n\n <% if (item != null) { %>\n <%- item %>\n <% } else { %>\n  \n <% } %>\n\n\n\n <% if (max > 1) { %>\n
        %;background:<%- Messages.getText('summary.FacetBar', {opacity: opacity}) %>\">\n
        \n <% } %>\n <%- numToString(count) %>\n\n\n<% if (share != null) { %>\n <%- share.toFixed() %>%\n<% } %>\n"; -exports.table_subtables_header = "\">\n <%= Icons.icon('Remove') %>\n\n<% if (displayName && columnName) { %>\n <%- displayName.replace(columnName, '').replace(/^ > /, '') %>\n<% } %>\n"; -exports.null_value = " \n"; -exports.cell_preview_reference = "\n <%- _.rest(parts).join(' ') %>\n \">\n <%- values.join(', ') %>\n \n\n"; -exports.list_dialogue_button = "\n\n\n"; -exports.export_rows_reset_button = "\n\n<% if (tablePage) { %>\n \n<% } %>\n \n"; -exports.active_constraint = "
        \n <% if (data.con.editable != null && data.con.editable === false) { %>\n \">\n <%= data.icons.icon('Lock') %>\n \n <% } else { %>\n \"\n >\n <%= data.icons.icon('RemoveConstraint') %>\n \n \">\n <%= data.icons.icon('Edit') %>\n \n <% } %>\n
        \n\n<% /* We use the :empty selector on this element - hence it must be on one line */ %>\n
        \n"; -exports.column_manager_path_chooser_buttons = "\n\n\n"; -exports.large_table_disuader = "
        \n
        \n
        \n

        \n <%= size %> rows - are you sure?\n

        \n
        \n\n
        \n\n

        <%= Messages.getText('largetable.appeal', {size: size}) %>

        \n\n
          \n
        • \n

          \n If you want to see all the data, you can page \n \n <%= Icons.icon('GoBack') %>\n backwards\n \n and \n \n forwards\n <%= Icons.icon('GoForward') %>\n \n through the results.\n

          \n \n
        • \n\n
        • \n

          \n If you are looking for something specific, you can use the\n filtering tools\n to narrow down the result set. Then you \n might be able to fit the items you are interested in in a\n single page.\n

          \n \n
        • \n\n
        • \n

          \n If you want to get and save the results, we suggest\n downloading\n the results in a format that suits you. \n

          \n

        • \n\n
        \n
        \n\n
        \n \n \n
        \n
        \n
        \n"; -exports.cell_preview_reference_relation = "<% _.each(collection, function (relation) { %>\n
      • \n <%- _.last(relation.parts) %>\n <%- numToString(relation.count) %>\n
      • \n<% }); %>\n"; -exports.new_filter_dialogue = "
        \n
        \n
        \n \n \n
        \n"; exports.loop_value_controls = "<% if (candidateLoops.length) { %>\n <%= select(candidateLoops, isSelected, 'form-control im-value-options im-con-value') %>\n<% } else { %>\n <%- messages.getText('conbuilder.NoSuitableLoops') %>\n<% } %>\n"; -exports.export_compression_controls = "

        <%- Messages.getText('export.category.Compression', state) %>

        \n\n
        \n \n
        \n\n
        >\n
        \n \n
        \n\n
        \n \n
        \n
        \n\n"; -exports.slider = "
        \n <% _.each(markers, function(marker) { %>\n <%- marker.value %>\n <% }); %>\n
        \n"; -exports.join_manager_body = "\n\n
        \n <%= Icons.icon('Info') %>\n \n <%- Messages.getText('joins.ExplanationTitle') %>\n \n

        \">\n <%- Messages.getText('joins.Explanation') %>\n

        \n
        \n"; -exports.no_results = "<% /* requires: selectList :: [], canUndo :: bool */ %>\n\">\n
        \n <% if (canUndo) { %>\n \n <% } %>\n <%- Messages.getText('table.Empty') %>\n

        <%- Messages.getText('table.EmptyWhy') %>

        \n
        \n\n"; -exports.count_summary = "<% if (size && count) { %>\n <% var msg = (size == 0 ? '.ShowingAll' : '.ShowingRange'); %>\n <% ['xs', 'sm', 'md', 'lg'].forEach(function (pageSize) { %>\n -inline\">\n <%- Messages.getText('table.' + pageSize + msg, page) %>\n \n <% }); %>\n<% } %>\n"; -exports.classy_popover = "
        \" role=\"tooltip\">\n
        \n

        \n
        \n
        \n"; -exports.undo_history = "\n\n\n\n\n"; -exports.table_subtable = "\n\n
        \n
        \n"; -exports.modal_footer = "\n<% if (exportLink != null) { %>\n \n href=\"<%- exportLink %>\">\n <%= Icons.icon(primaryIcon) %>\n <%- primaryAction %>\n \n<% } else { %>\n <% /* We need the wrapper to deal with the fact that tooltips do not\n * work on disabled buttons. */ %>\n
        \n title=\"<%- Messages.getText(disabledReason) %>\"\n <% } %>>\n \n
        \n<% } %>\n"; -exports.column_manager_path_chooser = "
        \n
        \n

        \n <%- Messages.getText('columns.ChooseAPathFrom', {root: state.rootName}) %>\n

        \n\n"; -exports.column_manager_order_direction = "<% /* requires: direction, isNumeric */ %>\n\">\n \n <%- Messages.getText('columns.CurrentDirection', {\n dir: direction, numeric: isNumeric\n }) %>\n \n <%= Icons.icon('Sort' + (isNumeric ? 'Numeric' : 'String') + direction) %>\n\n"; -exports.download_popover = "<% /* requires: formats, query, path */ %>\n\n"; -exports.modal_error = "<% /* Renders an alert box at various levels, with appropriate icons and messages */ %>\n<% if (error) { %>\n
        \">\n <% if (!error.cannotDismiss) { %>\n \n <% } %>\n <%= Icons.icon(errorIcon(error)) %>\n <%- Messages.getText('ErrorTitle', error) %>\n <% if (error.key != null) { %>\n <%- Messages.getText(error.key) %>\n <% } else { %>\n <%- error.message || error %>\n <% } %>\n
        \n<% } %>\n"; -exports.row_surrogate = "<%= Icons.icon(above ? 'ASC' : 'DESC') %>\n<%- item %>: <%- count %>\n"; -exports.active_constraints = "<% /* requires: constraints.length */ %>\n
        \n

        \n <% if (constraints.length) { %>\n <%- Messages.getText('constraints.EditOrRemove') %>\n <% } else { %>\n <%- Messages.getText('constraints.None') %>\n <% } %>\n

        \n\n \n
        \n"; -exports.list_tag = "<%- id %>\n\">\n <%= Icons.icon('Remove') %>\n\n"; +exports.error_message = "<% if (error) { %>\n
        \">\n <%= icons.icon('Error') %>\n \n <%- error.message || error %>\n \n
        \n<% } %>\n\n"; exports.undo_history_step_section = "
        \n <% if (collection.length) { %>\n <%= Icons.icon(state.open ? 'ExpandedSection' : 'CollapsedSection') %>\n <% } %>\n <%- Messages.getText(summaryLabel, {n: count}) %>\n
        \n<% if (collection.length) { %>\n
        \">\n <% _.each(collection, function (e) { %>\n \">\n <%- labelContent(e) %>\n \n <% }); %>\n
        \n<% } %>\n"; -exports.export_destination_galaxy_options = "
        \n \n \">\n
        \n
        \n \n \n
        \n"; -exports.attribute_value_select = "\n"; -exports.column_manager_tabs = "\n"; -exports.export_flat_file_options = "

        <%- Messages.getText('export.category.ColumnHeaders', state) %>

        \n\n
        \n \n
        \n\n
        >\n
        \n \n
        \n\n
        \n \n
        \n
        \n\n"; -exports.constraint_adder_options = "<% if (showTree) { %>\n
        \n
        \n find\n \"\n class=\"im-tree-filter form-control\" placeholder=\"path\">\n \n \n \n
        \n
        \n<% } %>\n
        \n
        \n <% if (!showTree) { %>\n \n <% } else { %>\n \n <% } %>\n
        \n
        \n \n
        \n
        \n"; -exports.summary_items_controls = "\n\n
        \n \n \n \n
        \n\n
        \n \n <% if (!(/boolean/i).test(type)) { %>\n \n <% } %>\n
        \n\n"; -exports.facet_title = "<%= Icons.icon(state.open ? 'Expanded' : 'Collapsed') %>\n<%- pathName %>\n \n<%- Messages.getText('Number', {n: got} %>\n"; -exports.export_add_column_control = "
        \n
        \">\n <%= Icons.icon('Help', 'lg') %>\n
        \n
        \n \n
        \n
        \n"; -exports.export_column_control = "<%- item.getType() %>\n\n <% if (active) { %>\n <%= Icons.icon('Check') %>\n <% } else { %>\n <%= Icons.icon('UnCheck') %>\n <% } %>\n\n<%- name %>\n"; -exports.table_cell = "<% if (state.minimised) { %>\n …\n<% } else if (entity.id === null) { %>\n <% if (value !== null && formattedValue !== null) { %>\n <%= value %>\n <% } else if (entity.isNULL) { %>\n \n <%- Messages.getText('table.cell.NullEntity', {type: entity['class']}) %>\n \n <% } else { %>\n <%= NULL_VALUE %>\n <% } %>\n<% } else { %>\n checked<% } %>\n <% if (input.disabled) { %>disabled<% } %>\n style=\"display:<%- input.display %>\">\n\n <% if (field !== 'url') { %>\n \" href=\"<%= url %>\">\n\n <% if (isForeign) { %>\n <% if (icon) { %>\n \" class=\"im-external-link\">\n <% } else { %>\n <%= Icons.icon('ExternalLink') %>\n <% } %>\n <% } %>\n\n <% if (value !== null && formattedValue !== null && value !== 'null') { %>\n <%= formattedValue %>\n <% } else { %>\n <%= NULL_VALUE %>\n <% } %>\n\n \n <% } else if (field === 'url') { %>\n <% if (value !== null) { %>\n \">\n <%= Icons.icon('ExternalLink') %>\n <%= value %>\n \n <% } else { %>\n <%= NULL_VALUE %>\n <% } %>\n <% } %>\n<% } %>\n"; -exports.export_dialogue_footer = "<% if (linkToFile) { %>\n
        \n <%- Messages.getText('export.cloud.FileLocation', {cloud: dest}) %>\n \" target=\"_blank\"><%- linkToFile %>\n
        \n<% } %>\n\n\n\n<% if (dest === 'download') { %>\n \">\n <%= Icons.icon(primaryIcon) %>\n <%- primaryAction %>\n \n<% } else { %>\n \n<% } %>\n\n"; exports.progress_bar = "<% /* requires: doneness (float: 0 <= i <= 1) */ %>\n<% if (doneness != null && doneness >= 0) { %>\n
        \n
        \"\n aria-valuemin=\"0\"\n aria-valuemax=\"1\"\n style=\"width: <%- 100 * doneness %>%;\">\n <% if (doneness < 1) { %>\n \n <%- Math.round(100 * doneness) %>% <%- Messages.getText('Complete') %>\n \n <% } %>\n
        \n
        \n<% } %>\n"; -exports.list_dialogue_body = "
        \n\n
        \n
        \n

        \n <%= Icons.icon('Options') %>\n <%- Messages.getText('lists.ShowExtraOptions', state) %>\n

        \n
        \n
        \n\n
        \">\n
        \n\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n"; -exports.column_manager_path_name = "<% /* requires parts */ %>\n\n <% _.each(parts, function (part) { %>\n <%- part %>\n <% }); %>\n\n\n"; -exports.select = "\n"; -exports.list_tags_apology = "<% if (!hasTags) { %>\n \n <%- Messages.getText('lists.NoTags') %>\n \n<% } %>\n"; +exports.boolean_value_controls = "\n\n"; +exports.column_manager_select_list = "
        \n \n\n

        \n <%- Messages.getText('columns.ColumnsSelected', {columns: collection, removed: hasRubbish}) %>\n

        \n\n <%- Messages.getText('columns.CurrentViewHelp') %>\n\n
        \n\n
        \n\n
        \n
          \n
        \n
        \n\n
        \n
        \n <%= Icons.icon((hasRubbish ? 'RubbishFull' : 'Rubbish'), 'lg') %>\n <% if (hasRubbish) { %>\n
          \n
        \n <% } %>\n
        \n
        \n\n
        \n
        \n
        \n\n
        \n
        \n\n"; +exports.download_popover = "<% /* requires: formats, query, path */ %>\n\n"; +exports.facet_frequency = "<% /* requires: error, initialized */ %>\n<% if (error) { %>\n <% /* Oh noes - something went wrong. */ %>\n
        \n <%= Icons.icon('Error') %>\n <%- Messages.getText('Error') %>\n <% if (error.key) { %>\n <%- Messages.getText(error.key) %>\n <% } else { %>\n <%- error.message || error %>\n <% } %>\n
        \n<% } else if (initialized) { %>\n <% /* Huzzah - there is data, which will be added here as child views */ %>\n<% } else { %>\n <% /* Boo - no data. Show an indeterminate progress bar while we wait. */ %>\n
        \n
        \n <%- Messages.getText('Loading') %>.\n
        \n
        \n<% } %>\n"; +exports.active_progress_bar = "
        \n
        \n
        \n"; exports.export_destination_options = "
        \n \n
        \n \"\n class=\"form-control\"\n placeholder=\"<%- Messages.getText('export.param.Name') %>\"\n aria-label=\"<%- Messages.getText('export.param.Name') %>\">\n
        \n \n \n
        \n
        \n
        \n\n<% if (format && format.desc) { %>\n
        \n <%- Messages.getText(format.desc) %>\n
        \n<% } %>\n\n
        \n
        \n
        \n
        \n
        \n
        \n"; +exports.logic_manager_body = "
        \n \n
        \n
        \n \n
        \n"; +exports.export_rows_reset_button = "\n\n<% if (tablePage) { %>\n \n<% } %>\n \n"; +exports.list_dialogue_expander = "\n"; +exports.select_with_label = "\n\n<% if (options.length) { %>\n \n <% if (helpMessage) { %>\n \"\n class=\"help-block\">\n <%- Messages.getText(helpMessage) %>\n \n <% } %>\n<% } else { %>\n \n <%- Messages.getText(noOptionsMessage, {model: model}) %>\n \n<% } %>\n\n"; +exports.select = "\n"; +exports.attribute_value_select = "\n"; +exports.active_constraints = "<% /* requires: constraints.length */ %>\n
        \n

        \n <% if (constraints.length) { %>\n <%- Messages.getText('constraints.EditOrRemove') %>\n <% } else { %>\n <%- Messages.getText('constraints.None') %>\n <% } %>\n

        \n\n
          \n
        \n
        \n"; +exports.summary_items = "<% if (!(/boolean/i).test(type)) { %>\n
        \n \n \n \n \"\n placeholder=\"<%- Messages.getText('summary.FilterValuesPlaceholder') %>\">\n
        \n<% } %>\n\n
        \n \n \n <% _.each(colClasses, function (cls) { %>\n \">\n <% }); %>\n \n \n \n <% _.each(colHeaders, function (hdr) { %>\n \n <% }); %>\n \n \n \n \n
        <%- hdr %>
        \n\n <% if (hasMore) { %>\n
        \n <%- Messages.getText('summary.MoreItems') %>\n
        \n <% } %>\n
        \n\n
        \n
        \n"; +exports.export_dialogue = "
        \n \n
        \n
        \n
        \n"; +exports.pagination = "\n"; +exports.column_manager_order_direction = "<% /* requires: direction, isNumeric */ %>\n\">\n \n <%- Messages.getText('columns.CurrentDirection', {\n dir: direction, numeric: isNumeric\n }) %>\n \n <%= Icons.icon('Sort' + (isNumeric ? 'Numeric' : 'String') + direction) %>\n\n"; +exports.undo_history_step = "<% if (!state.current) { %>\n \n<% } %>\n\n

        \n <%- Messages.getText('undo.StepTitle', title) %>\n

        \n\n<% if (state.current) { %>\n <%- Messages.getText('undo.IsCurrentState') %>\n<% } %>\n
        \n\n\">\n <%- Messages.getText('undo.Revision', {v: revision}) %>\n\n\n
        \n <%- Messages.getText('undo.StepCount', {count: count}) %>\n <% if (diff) { %>\n 0 ) ? 'pos' : 'neg' %>\">\n <% if (diff > 0) { %>+<% } %><%- numToString(diff) %>\n \n <% } %>\n
        \n\n
        \n\n
        \n"; exports.column_name_popover = "<% _.each(parts, function (part) { %>\n <%- part %>\n<% }); %>\n"; +exports.active_constraint = "
        \n <% if (data.con.editable != null && data.con.editable === false) { %>\n \">\n <%= data.icons.icon('Lock') %>\n \n <% } else { %>\n \"\n >\n <%= data.icons.icon('RemoveConstraint') %>\n \n \">\n <%= data.icons.icon('Edit') %>\n \n <% } %>\n
        \n\n<% /* We use the :empty selector on this element - hence it must be on one line */ %>\n
        \n"; +exports.export_destination_galaxy_options = "
        \n \n \">\n
        \n
        \n \n \n
        \n"; +exports.list_dialogue_button_node = "\n \n <%- displayName || path %>\n \n <% if (state.count) { %>\n (<%- numToString(state.count) %>\n <%- pluralise((typeName || type), state.count) %>)\n <% } %>\n\n"; +exports.table_throbber = "\n \">\n

        <%- Messages.getText('table.RequestingData') %>

        \n
        \n
        \n
        \n \n\n"; +exports.list_tags_apology = "<% if (!hasTags) { %>\n \n <%- Messages.getText('lists.NoTags') %>\n \n<% } %>\n"; +exports.constraints_heading = "<% /* requires constraints.length */ %>\n

        \n <%- Messages.getText('constraints.Heading', {n: constraints.length}) %>\n

        \n"; +exports.table_cell = "<% if (state.minimised) { %>\n …\n<% } else if (entity.id === null) { %>\n <% if (value !== null && formattedValue !== null) { %>\n <%= value %>\n <% } else if (entity.isNULL) { %>\n \n <%- Messages.getText('table.cell.NullEntity', {type: entity['class']}) %>\n \n <% } else { %>\n <%= NULL_VALUE %>\n <% } %>\n<% } else { %>\n checked<% } %>\n <% if (input.disabled) { %>disabled<% } %>\n style=\"display:<%- input.display %>\">\n\n <% if (field !== 'url') { %>\n \" href=\"<%= url %>\">\n\n <% if (isForeign) { %>\n <% if (icon) { %>\n \" class=\"im-external-link\">\n <% } else { %>\n <%= Icons.icon('ExternalLink') %>\n <% } %>\n <% } %>\n\n <% if (value !== null && formattedValue !== null && value !== 'null') { %>\n <%= formattedValue %>\n <% } else { %>\n <%= NULL_VALUE %>\n <% } %>\n\n \n <% } else if (field === 'url') { %>\n <% if (value !== null) { %>\n \">\n <%= Icons.icon('ExternalLink') %>\n <%= value %>\n \n <% } else { %>\n <%= NULL_VALUE %>\n <% } %>\n <% } %>\n<% } %>\n"; exports.export_json_options = "

        <%- Messages.getText('export.category.Options') %>

        \n\n
        \n \n
        \n\n
        \n \n
        \n\n<% if ((size || start) && jsonFormat === 'objects') { %>\n
        \n

        <%- Messages.get('Warning') %>

        \n

        <%- Messages.get('export.json.ObjWarning') %>

        \n
        \n<% } %>\n\n"; +exports.code_gen_js = "<% if (asHTML) { %>\n\n
        \n\n\n\">\n\n<% } %>\n"; +exports.export_destination_radios = "\n<% _.each(destinations, function (d) { %>\n
        \">\n \n
        \n<% }); %>\n\n"; +exports.classy_popover = "
        \" role=\"tooltip\">\n
        \n

        \n
        \n
        \n"; +exports.join_manager_body = "
          \n\n
          \n <%= Icons.icon('Info') %>\n \n <%- Messages.getText('joins.ExplanationTitle') %>\n \n

          \">\n <%- Messages.getText('joins.Explanation') %>\n

          \n
          \n"; +exports.export_dialogue_footer = "<% if (linkToFile) { %>\n
          \n <%- Messages.getText('export.cloud.FileLocation', {cloud: dest}) %>\n \" target=\"_blank\"><%- linkToFile %>\n
          \n<% } %>\n\n\n\n<% if (dest === 'download') { %>\n \">\n <%= Icons.icon(primaryIcon) %>\n <%- primaryAction %>\n \n<% } else { %>\n \n<% } %>\n\n"; +exports.code_gen_button = "<% /* requires lang :: string, options.Langs :: [string] */ %>\n
          \n \n \n \n
          \n"; +exports.new_filter_dialogue = "
          \n
          \n
          \n \n \n
          \n"; +exports.extra_value_controls = "\n\n"; +exports.column_manager_path_remover = "<% /* requires: removeTitle */ %>\n\">\n <%= Icons.icon('Remove') %>\n\n\n"; +exports.cell_preview_error = "
          \n

          Error

          \n

          Sorry. We could not fetch the preview due to an error:

          \n <%- message %>\n
          \n"; +exports.export_format_controls = "

          \n\n<% _.each(formats, function (formatDef) { %>\n
          \n \n
          \n<% }); %>\n"; +exports.export_flat_file_options = "

          <%- Messages.getText('export.category.ColumnHeaders', state) %>

          \n\n
          \n \n
          \n\n
          >\n
          \n \n
          \n\n
          \n \n
          \n
          \n\n"; +exports.table_subtables_header = "\">\n <%= Icons.icon('Remove') %>\n\n<% if (displayName && columnName) { %>\n <%- displayName.replace(columnName, '').replace(/^ > /, '') %>\n<% } %>\n"; +exports.summary_no_results = "
          \n <%= Icons.icon('Warning') %>\n <%- Messages.getText('summary.NoResults', {path: pathName}) %>\n
          \n\n"; +exports.summary_selected_count = "<% if (state.selectedCount) { %>\n
          \n \n <%- Messages.getText('summary.SelectedCount', state) %>\n \n
          \n<% } %>\n"; +exports.list_tag = "<%- id %>\n\">\n <%= Icons.icon('Remove') %>\n\n"; +exports.attribute_value_controls = "
          \n \"\n value=\"<%- con.value %>\">\n
          \n"; +exports.column_manager_path_chooser_buttons = "\n\n\n"; +exports.column_manager_tabs = "\n"; +exports.table_subtable_summary = "<% if (rows.length) { %>\n <%= Icons.icon('Table') %>\n<% } else { %>\n <%= Icons.icon('EmptyTable') %>\n<% } %>\n<%- rows.length %>\n<%- pluralise(contentName, rows.length) %>\n"; exports.export_row_controls = "

          \n\n
          \n \n \"\n value=\"<%= size || max %>\">\n
          \n\n
          \n \n \"\n value=\"<%= start %>\">\n
          \n\n
          \n
          \n"; +exports.large_table_disuader = "
          \n
          \n
          \n

          \n <%= size %> rows - are you sure?\n

          \n
          \n\n
          \n\n

          <%= Messages.getText('largetable.appeal', {size: size}) %>

          \n\n
            \n
          • \n

            \n If you want to see all the data, you can page \n \n <%= Icons.icon('GoBack') %>\n backwards\n \n and \n \n forwards\n <%= Icons.icon('GoForward') %>\n \n through the results.\n

            \n \n
          • \n\n
          • \n

            \n If you are looking for something specific, you can use the\n filtering tools\n to narrow down the result set. Then you \n might be able to fit the items you are interested in in a\n single page.\n

            \n \n
          • \n\n
          • \n

            \n If you want to get and save the results, we suggest\n downloading\n the results in a format that suits you. \n

            \n

          • \n\n
          \n
          \n\n
          \n \n \n
          \n
          \n
          \n"; +exports.list_value_controls = "<% if (suitableLists.length) { %>\n <%= select(suitableLists, isSelected, 'span7 im-value-options im-con-value im-con-value-list form-control', formatList, getOptionValue) %>\n<% } else { %>\n <%- messages.getText('conbuilder.NoSuitableLists') %>\n<% } %>\n"; +exports.export_column_control = "<%- item.getType() %>\n\n <% if (active) { %>\n <%= Icons.icon('Check') %>\n <% } else { %>\n <%= Icons.icon('UnCheck') %>\n <% } %>\n\n<%- name %>\n"; +exports.null_value = " \n"; +exports.facet_item = "
          \n \n \n (<%- count %>)\n \n <%- item %>\n \n
          \n"; +exports.export_tab_menu = "<% _.each(data.tabs, function (tabDef) { %>\n
        • <%= data.tab === tabDef.ident ? 'active' : void 0 %>\">\n <%- data.Messages.getText(tabDef.key, data) %>\n
        • \n<% }); %>\n"; +exports.facet_row = "<% /* requires: selected, symbol, item, count, percent, opacity, share */ %>\n\n <%- symbol %>\n
          \n\n\n\n <% if (item != null) { %>\n <%- item %>\n <% } else { %>\n  \n <% } %>\n\n\n\n <% if (max > 1) { %>\n
          %;background:<%- Messages.getText('summary.FacetBar', {opacity: opacity}) %>\">\n
          \n <% } %>\n <%- numToString(count) %>\n\n\n<% if (share != null) { %>\n <%- share.toFixed() %>%\n<% } %>\n"; +exports.constraint_summary = "<% if (code) { %>\n
        • <%- code %>:
        • \n<% } %>\n<% _.each(labels, function (label) { %>\n
        • \n \">\n <% if (_.include(['error', 'warning'], label.type)) { %>\n <%= Icons.icon('Error') %>\n <%- Messages.getText('consummary.' + label.content) %>\n <% } else if (label.type === 'path') { %>\n <% _.each(label.content.split(' > '), function (part) { %>\n \" class=\"im-name-part\"><%- part %>\n <% }); %>\n <% } else { %>\n <% if (label.icon) { %><%= Icons.icon(label.icon) %><% } %>\n <%- label.content %>\n <% } %>\n \n
        • \n<% }); %>\n"; +exports.only_one_item = "
          \n <%= Icons.icon('Info') %>\n <%= Messages.getText('summary.OnlyOne', {names: state, item: items[0]}) %>\n
          \n\n"; +exports.code_gen_body = "
          \n
          \n <% /* requires lang :: string, options :: {Extra :: {}, Langs :: [string]} */ %>\n
          \n \n \n
          \n
          \n
          \n
          \n
          \n
          \n
          <%- generatedCode %>
          \n
          \n
          \n"; +exports.cell_preview_attribute = "\n <%- _.last(parts) %>\n <%- type %>\">\n <% if (isNumeric) { %>\n <%- numToString(+value) %>\n <% } else { %>\n <%- value %>\n <% } %>\n <% if (tooLong) { %>\n <%- valueOverspill %>\n \n ...\n <%= Icons.icon('More') %>\n \n <% } %>\n \n\n"; +exports.export_preview = "
          \n \n \n
          \n\n
          \n<%- state.preview %>\n
          \n\n
          \n nb\n <%- Messages.getText('export.preview.Limit') %>\n
          \n"; +exports.summary_items_controls = "\n\n
          \n \n \n \n
          \n\n
          \n \n <% if (!(/boolean/i).test(type)) { %>\n \n <% } %>\n
          \n\n"; +exports.table_subtable = "\n\n
          \n
          \n"; +exports.export_column_controls = "

          <%- Messages.getText('export.heading.Columns') %>

          \n\n
            \n
          \n\n
          \n"; exports.add_value_control = "
          \n
          \n
          \n
          \n \n \n \n \n
          \n"; exports.constraint_adder = "
          \n
          \n
          \n"; +exports.row_surrogate = "<%= Icons.icon(above ? 'ASC' : 'DESC') %>\n<%- item %>: <%- count %>\n"; +exports.table_building = "

          <%- Messages.getText('table.Building') %>

          \n<%= IndeterminateProgressBar %>\n"; +exports.checkbox = "\n"; +exports.column_manager_path_name = "<% /* requires parts */ %>\n\n <% _.each(parts, function (part) { %>\n <%- part %>\n <% }); %>\n\n\n"; +exports.cell_preview_reference = "\n <%- _.rest(parts).join(' ') %>\n \">\n <%- values.join(', ') %>\n \n\n"; +exports.value_control_row = "\n \n\n\n {{# if (editing) { }}\n
          \n \n \n \n \n \n
          \n {{# } else { }}\n {{{ icons.icon('Edit') }}}\n {{ value }}\n {{# } }}\n\n"; +exports.no_results = "<% /* requires: selectList :: [], canUndo :: bool */ %>\n\">\n
          \n <% if (canUndo) { %>\n \n <% } %>\n <%- Messages.getText('table.Empty') %>\n

          <%- Messages.getText('table.EmptyWhy') %>

          \n
          \n\n"; +exports.export_add_column_control = "
          \n
          \">\n <%= Icons.icon('Help', 'lg') %>\n
          \n
          \n \n
          \n
          \n"; +exports.cell_preview_reference_relation = "<% _.each(collection, function (relation) { %>\n
        • \n <%- _.last(relation.parts) %>\n <%- numToString(relation.count) %>\n
        • \n<% }); %>\n"; +exports.list_dialogue_button = "\n\n\n"; +exports.modal_footer = "\n<% if (exportLink != null) { %>\n \n href=\"<%- exportLink %>\">\n <%= Icons.icon(primaryIcon) %>\n <%- primaryAction %>\n \n<% } else { %>\n <% /* We need the wrapper to deal with the fact that tooltips do not\n * work on disabled buttons. */ %>\n
          \n title=\"<%- Messages.getText(disabledReason) %>\"\n <% } %>>\n \n
          \n<% } %>\n"; +exports.count_summary = "<% if (size && count) { %>\n <% var msg = (size == 0 ? '.ShowingAll' : '.ShowingRange'); %>\n <% ['xs', 'sm', 'md', 'lg'].forEach(function (pageSize) { %>\n -inline\">\n <%- Messages.getText('table.' + pageSize + msg, page) %>\n \n <% }); %>\n<% } %>\n"; +exports.input_with_button = "\"\n placeholder=\"<%- Messages.getText(placeholder) %>\">\n\n \n\n\n"; +exports.too_many_suggestions = "\n {{{ icons.icon('Info') }}}\n {{ messages.getText('conbuilder.TooManySuggestions') }}\n There are {{ extra }} values we could not include.\n\n"; +exports.slider = "
          \n <% _.each(markers, function(marker) { %>\n <%- marker.value %>\n <% }); %>\n
          \n"; +exports.table_error = "
          \n\n

          <%= Icons.icon('Bug') %><%- Messages.getText('error.Oops') %>

          \n\n

          \n <%- Messages.getText(error.key || 'error.' + domain + '.Heading') %>\n

          \n\n

          <%- Messages.getText('error.' + domain + '.Body') %>

          \n\n \">\n <%= Icons.icon('Mail') %>\n <%- Messages.getText('error.EmailHelp') %>\n \n\n \n <% if (error.message) { %>\n \n <% } %>\n\n
          <%- indent(query) %>
          \n\n <% if (error.message) { %>\n
          <%- error.message %>
          \n <% } %>\n\n
          \n"; +exports.export_fasta_options = "

          <%- Messages.getText('export.category.Options') %>

          \n\n
          \n \n \"\n placeholder=\"5kbp\"\n class=\"form-control im-fasta-ext\">\n
          \n"; +exports.undo_history = "\n\n\n\n
            \n
          • \n \"\n class=\"btn btn-xs btn-default im-toggle-trivial <%= state.hideTrivial ? 'active' : void 0 %>\">\n <%- Messages.getText('undo.ToggleTrivial', state) %>\n \n
          • \n
          \n"; +exports.page_sizer = "<% /* Expects size, sizes */ %>\n<% if (sizes.length) { %>\n \n \n<% } %>\n"; +exports.facet_title = "<%= Icons.icon(state.open ? 'Expanded' : 'Collapsed') %>\n<%- pathName %>\n \n<%- Messages.getText('Number', {n: got} %>\n"; exports.summary_stats = "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
          <%- Messages.getText('summary.Max') %><%- Messages.getText('summary.Min') %><%- Messages.getText('summary.Average') %><%- Messages.getText('summary.StdDev') %>
          <%- Messages.getText('Number', {n: max}) %><%- Messages.getText('Number', {n: min}) %><%- Messages.getText('Number', {n: average}) %><%- Messages.getText('Number', {n: stdev}) %>
          \n\n
          \n
          \n \">\n
          \n
          \n ...\n
          \n
          \n \">\n
          \n
          \n
          \n \n \n
          \n
          \n
          \n\n
          \n\n"; -exports.undo_history_step = "<% if (!state.current) { %>\n \n<% } %>\n\n

          \n <%- Messages.getText('undo.StepTitle', title) %>\n

          \n\n<% if (state.current) { %>\n <%- Messages.getText('undo.IsCurrentState') %>\n<% } %>\n
          \n\n\">\n <%- Messages.getText('undo.Revision', {v: revision}) %>\n\n\n
          \n <%- Messages.getText('undo.StepCount', {count: count}) %>\n <% if (diff) { %>\n 0 ) ? 'pos' : 'neg' %>\">\n <% if (diff > 0) { %>+<% } %><%- numToString(diff) %>\n \n <% } %>\n
          \n\n
          \n\n
          \n"; -exports.column_manager_select_list = "
          \n \n\n

          \n <%- Messages.getText('columns.ColumnsSelected', {columns: collection, removed: hasRubbish}) %>\n

          \n\n <%- Messages.getText('columns.CurrentViewHelp') %>\n\n
          \n\n
          \n\n
          \n
            \n
          \n
          \n\n
          \n
          \n <%= Icons.icon((hasRubbish ? 'RubbishFull' : 'Rubbish'), 'lg') %>\n <% if (hasRubbish) { %>\n
            \n
          \n <% } %>\n
          \n
          \n\n
          \n
          \n
          \n\n
          \n
          \n\n"; -exports.table_subtable_summary = "<% if (rows.length) { %>\n <%= Icons.icon('Table') %>\n<% } else { %>\n <%= Icons.icon('EmptyTable') %>\n<% } %>\n<%- rows.length %>\n<%- pluralise(contentName, rows.length) %>\n"; -exports.summary_selected_count = "<% if (state.selectedCount) { %>\n
          \n \n <%- Messages.getText('summary.SelectedCount', state) %>\n \n
          \n<% } %>\n"; -exports.boolean_value_controls = "\n\n"; -exports.active_progress_bar = "
          \n
          \n
          \n"; -exports.table_throbber = "\n \">\n

          <%- Messages.getText('table.RequestingData') %>

          \n
          \n
          \n
          \n \n\n"; +exports.export_compression_controls = "

          <%- Messages.getText('export.category.Compression', state) %>

          \n\n
          \n \n
          \n\n
          >\n
          \n \n
          \n\n
          \n \n
          \n
          \n\n"; +exports.column_manager_position_controls = "
          \n <% if (index > 0) { %>\n <%= Icons.iconWithProps('ASC', {\n className: 'im-move-up',\n title: Messages.getText('columns.MoveUp')\n }) %>\n <% } %>\n <% if (!isLast) { %>\n <%= Icons.iconWithProps('DESC', {\n className: 'im-move-down',\n title: Messages.getText('columns.MoveDown')\n }) %>\n <% } %>\n
          \n\n"; +exports.summary_heading = "<% /* requires:\n * numeric, available, got, uniqueValues\n * state.typeName, state.endName\n * filtered \n */ %>\n

          \n <% if (numeric) { %>\n <%- Messages.getText('summary.NumericDistribution', {n: available}) %>\n <%- state.typeName %>\n <%- pluralise(state.endName, got) %>\n <% } else { %> \n \n <%- Messages.getText('summary.Got', {available: available, got: got}) %>\n \n \n <%- Messages.getText('Number', {n: available}) %>\n \n <%- state.typeName %>\n <%- pluralise(state.endName, got) %>\n \n <%- Messages.getText('summary.Total', {\n filtered: filtered,\n total: uniqueValues\n }) %>\n \n <% } %> \n

          \n"; +exports.formatted_sorting = " <% /* requires Icons, direction and name */ %>\n <%= Icons.icon(direction || 'unsorted') %>\n <%- name %>\n\n"; },{"underscore":257}],68:[function(require,module,exports){ (function() { diff --git a/dist/imtables.min.js b/dist/imtables.min.js index e61090b3..25a17239 100644 --- a/dist/imtables.min.js +++ b/dist/imtables.min.js @@ -1 +1 @@ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).imtables=t()}}(function(){return function o(s,a,l){function u(e,t){if(!a[e]){if(!s[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(c)return c(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var r=a[e]={exports:{}};s[e][0].call(r.exports,function(t){return u(s[e][1][t]||t)},r,r.exports,o,s,a,l)}return a[e].exports}for(var c="function"==typeof require&&require,t=0;t').appendTo("head").attr({href:i+t}),n):r.ajax({url:i+t,cache:!0,dataType:"script"}).then(function(){return n})}},n.load=function(t){var i,r,o,e,n;return e=s.get("CDN.server"),r=s.get(["CDN","resources",t]),n=s.get(["CDN","tests",t]),o=u(e),r?l.isArray(r)?a.all(function(){var t,e,n;for(n=[],t=0,e=r.length;t"},s.prototype.iconWithProps=function(t,e){return this.icon(t,null,e)},s.prototype.getSize=function(t){var e;return null!=(e=this.get("size"+t.toUpperCase()))?e:""},s.prototype.iconClasses=function(t){return this.get("Base")+" "+this.get(t)},s.prototype._loadIconSet=function(){var t;if((t=i[this.options.get("icons")])&&(this.clear({silent:!0}),null!=t))return this.set(t)},s.prototype.initialize=function(t){return this.options=null!=t?t:n,this._loadIconSet(),this.listenTo(this.options,"change:icons",this._loadIconSet)},t=s,i.glyphicons={Base:"glyphicon",unsorted:"glyphicon-resize-vertical",ASC:"glyphicon-arrow-up",DESC:"glyphicon-arrow-down",headerIcon:"icon",headerIconRemove:"glyphicon-remove",headerIconHide:"glyphicon-minus",headerIconReveal:"glyphicon-fullscreen",SortStringASC:"glyphicon-sort-by-alphabet",SortStringDESC:"glyphicon-sort-by-alphabet-alt",SortNumericASC:"glyphicon-sort-by-order",SortNumericDESC:"glyphicon-sort-by-order-alt",RootClass:"glyphicon-stop",Yes:"glyphicon-star",No:"glyphicon-star-empty",Table:"glyphicon-list",Script:"glyphicon-console",Export:"glyphicon-cloud-download",Error:"glyphicon-warning-sign",Info:"glyphicon-info-sign",Warning:"glyphicon-warning-sign",Remove:"glyphicon-minus-sign",OK:"glyphicon-ok",Cancel:"glyphicon-remove",Check:"glyphicon-check",UnCheck:"glyphicon-unchecked",CheckUnCheck:"glyphicon-ok-none",Add:"glyphicon-plus-sign",Move:"glyphicon-move",More:"glyphicon-plus-sign",Filter:"glyphicon-filter",Summary:"glyphicon-stats",Undo:"glyphicon-refresh",Refresh:"glyphicon-refresh",Columns:"glyphicon-pause",Collapsed:"glyphicon-chevron-right",Expanded:"glyphicon-chevron-down",CollapsedSection:"glyphicon-triangle-right",ExpandedSection:"glyphicon-triangle-bottom",MoveDown:"glyphicon-chevron-down",GoBack:"glyphicon-chevron-left",GoForward:"glyphicon-chevron-right",MoveUp:"glyphicon-chevron-up",Toggle:"glyphicon-random",ExpandCollapse:"glyphicon-chevron-right icon-chevron-down",Help:"glyphicon-question-sign",ReverseRef:"glyphicon-retweet",Reorder:"glyphicon-menu-hamburger",Edit:"glyphicon-edit",ExtraValue:"glyphicon-map-marker",Tree:"glyphicon-plus",Download:"glyphicon-save-file",download:"glyphicon-cloud-download",Options:"glyphicon-tasks",ClipBoard:"glyphicon-paperclip",Composed:"glyphicon-tags",RemoveConstraint:"glyphicon-remove-sign",Dismiss:"glyphicon-remove-sign",ClosedReference:"glyphicon-expand",OpenReference:"glyphicon-collapse-down",Lock:"glyphicon-lock",Lists:"glyphicon-list-alt",Attribute:"glyphicon-unchecked",ExternalLink:"glyphicon-globe",tsv:"glyphicon-list",csv:"glyphicon-list",xml:"glyphicon-xml",json:"glyphicon-json",fake:"glyphicon-bug",Bug:"glyphicon-bug",Rubbish:"glyphicon-trash",RubbishFull:"glyphicon-trash",Joins:"glyphicon-link",Mail:"glyphicon-envelope"},i.fontawesome={Base:"fa",unsorted:"fa-unsorted",ASC:"fa-sort-up",DESC:"fa-sort-down",SortStringASC:"fa-sort-alpha-asc",SortStringDESC:"fa-sort-alpha-desc",SortNumericASC:"fa-sort-numeric-asc",SortNumericDESC:"fa-sort-numeric-desc",headerIcon:"fa",headerIconRemove:"fa-times",headerIconHide:"fa-ellipsis-h",headerIconReveal:"fa-arrows-h",sizeLG:"fa-2x",Yes:"fa-star",No:"fa-star-o",Table:"fa-list",EmptyTable:"fa-table",Script:"fa-file-code-o",Export:"fa-cloud-download",Remove:"fa-minus-circle",OK:"fa-check",Cancel:"fa-remove",Check:"fa-toggle-on",UnCheck:"fa-toggle-off",CheckUnCheck:"fa-toggle-on fa-toggle-off",Add:"fa-plus",Move:"fa-arrows",More:"fa-plus",Dropbox:"fa-dropbox",Drive:"fa-google",download:"fa-cloud-download",Galaxy:"fa-cloud-upload",Filter:"fa-filter",Summary:"fa-bar-chart-o",Undo:"fa-undo",Refresh:"fa-refresh",Columns:"fa-columns",Collapsed:"fa-chevron-right",Expanded:"fa-chevron-down",CollapsedSection:"fa-caret-right",ExpandedSection:"fa-caret-down",MoveDown:"fa-chevron-down",GoBack:"fa-chevron-left",GoForward:"fa-chevron-right",MoveUp:"fa-chevron-up",Toggle:"fa-retweet",ExpandCollapse:"fa-chevron-right fa-chevron-down",Help:"fa-question-circle",Tree:"fa-sitemap",ReverseRef:"fa-retweet",Reorder:"fa-reorder",Options:"fa-tasks",Edit:"fa-edit",ExtraValue:"fa-database",Download:"fa-file-archive-o",ClipBoard:"fa-paperclip",Composed:"fa-tags",RemoveConstraint:"fa-times-circle",Dismiss:"fa-times-circle",Error:"fa-warning",Info:"fa-info-circle",Warning:"fa-warning",Lock:"fa-lock",RootClass:"fa-square",Attribute:"fa-tag",ClosedReference:"fa-plus-square",OpenReference:"fa-plus-square-o",CodeFile:"fa-file-code-o",Rubbish:"fa-trash-o",RubbishFull:"fa-trash",Joins:"fa-share-alt",ExternalLink:"fa-globe",Lists:"fa-cloud-upload",tsv:"fa-file-excel-o",csv:"fa-file-excel-o",xml:"fa-code",json:"fa-json",fake:"fa-bug",Bug:"fa-bug",Mail:"fa-envelope"},u.exports=new t,u.exports.Icons=t,u.exports.registerIconSet=r,u.exports.names=function(){var t,e,n;return t=function(){var t;for(e in t=[],i)n=i[e],t.push(a.keys(n));return t}(),a.union.apply(null,t)}}).call(this)},{"./core-model":2,"./options":63,underscore:257}],15:[function(h,t,g){(function(){var e,t,n,p,a,i,l,f,d,u,c,r,o,s;f=h("underscore"),h("./shim"),u=h("imjs").Service.connect,a=h("es6-promise").Promise,s=h("./version"),l=h("./core/type-assertions"),e=h("./views/dashboard"),i=h("./views/table"),p=h("./options"),n=h("./messages"),t=h("./formatting"),o=h("./utils/simple-formatter"),r=function(o){var s;return s=function(t,e,n){var i,r;return l.Query.test(n)?new a(c(o,t,n,e)):(r=n.service,i=n.query,(l.Service.test(r)?r:u(r)).query(i).then(f.partial(s,t,e)))}},c=function(l,u,c,h){return null==h&&(h={}),function(t){var e,n,i,r,o,s,a;for(n=d(u),o="undefined"!=typeof page&&null!==page?f.pick(h,"start","size"):null,h=f.extend(f.omit(h,"start","size"),{model:o,query:c}),(a=l(h)).setElement(n),i=0,r=(s=f.result(a,"className").split(" ")).length;i Format","export.category.Columns":"<%= columns %> Columns","export.category.Preview":"Preview","export.preview.Limit":"Preview is limited to at most 3 results.","export.heading.Columns":"Columns","export.category.Rows":"<% if (rowCount === max) { %>\n All\n<% } else { %>\n <%= rowCount %> of <%= max %>\n<% } %>\nRows","export.category.Compression":"<% if (compression) { %>\n <%= compression.toUpperCase() %>\n<% } else { %>\n No\n<% } %> Compression","export.category.Options":"Options","export.category.JsonFormat":"As <%= (jsonFormat === 'objects') ? 'Objects' : 'Rows' %>","export.category.FastaFormat":"FASTA options","export.category.ColumnHeaders":"<% if (headers) { %>\n <%= {friendly: 'Formatted', path: 'Raw'}[headerType] %>\n<% } else { %>\n No\n<% } %>\nColumn Headers","export.category.Destination":"<% if (dest === 'download') { %>\n Download <%= format.EXT %> file\n<% } else { %>\n Send <%= format.EXT %> to <%= dest %>\n<% } %>","export.galaxy.name":["<% if (orgs.length === 1) { %><%= orgs[0] %> <% } %>","<%= cls %> data","<% if (branding) { %> from <%= branding.name %><% } %>"].join(""),"export.galaxy.info":"<%= query.root %> data from <%= query.service.root %>.\nUploaded from <%= currentLocation %>.\n<% if (lists.length) { %>source: <%= lists.join(', ') %><% } %>\n<% if (orgs.length) { %>organisms: <%= orgs.join(', ') %><% } %>","export.format.description.TSV":"A flat file format suitable for spreadsheet programmes","export.format.name.TSV":"Tab separated values.","export.format.description.CSV":"A flat file format, suitable for spreadsheet programmes","export.format.name.CSV":"Comma separated values.","export.format.description.XML":"A text format suitable for machine processing.","export.format.name.XML":"XML","export.format.name.JSON":"JSON","export.format.description.JSON":"A text format suitable for machine processing.","export.format.name.FASTA":"FASTA sequence.","export.format.description.FASTA":"FASTA output for sequence data.","export.format.name.GFF3":"GFF3 features.","export.format.description.GFF3":"GFF3 output for sequence features.","export.format.name.BED":"BED locations.","export.format.description.BED":"BED output for sequence feature locations.","export.format.name.FAKE":"Fake","export.format.description.FAKE":"Fake format for testing. Should only appear if the\nquery has departments in the view.","export.format.name.FAKE_2":"Also Fake","export.format.description.FAKE_2":"Fake format for testing. Should only appear if the\nquery has companies in the view.","export.param.Size":"Size: <%= size %>","export.param.Format":"Format","export.param.Start":"Offset: <%= start %>","export.param.Destination":"Destination","export.param.Name":"File name","export.help.AdditionalCols":"You can add any attributes of objects which are already\nin the query.","rows.All":"No limit","export.cloud.FileLocation":"Upload to <%- cloud %> successful. Your file is available at:","export.UseCompression":"Compress results","export.UseGZIP":"Use GZIP compression (produces a .gzip archive)","export.UseZIP":"Use Zip compression (produces a .zip archive)","export.AddHeaders":"Add column headers","export.json.Rows":"Return results as rows - each row is an Array of JSON values, e.g.:","export.SetTablePage":"Select rows in table","export.ResetRowSelection":"Select all rows","export.json.RowsExample":'["eve", "2R", 5866824, 5868300]',"export.json.ObjExample":'{\n "class": "Gene",\n "symbol": "eve",\n "chromosomeLocation": {\n "class": "ChromosomeLocation",\n "start": 5866824,\n "end": 5868300\n "locatedOn": {\n "class": "Chromosome",\n "primaryIdentifier": "2R"\n }\n }\n}',"export.json.Objects":"Return results as objects - each result is a nested graph of\ndata, e.g.:","export.json.ObjWarning":"Please note that it is not recommended to set the size parameters\nwhen requesting object results, since the size of the result\nset, and the position of the offsets will differ when multiple\nrows are replaced by a single object with a collection.","export.ff.FriendlyHeaders":'Human readable headers (eg. "Gene > Organism Name")',"export.ff.PathHeaders":'Raw path headers (eg. "Gene.organism.shortName)',"export.error.NoColumnsSelected":"No columns selected","export.error.OffsetOutOfBounds":"The offset is greater than the total number of results.",ListNameDuplicate:"List names must be unique. This name is already taken",ListNameEmpty:"Lists must have names. Please enter one",ListNameIllegal:"Some characters are not allowed in list names. This name contains the following\nillegal characters: <%- illegals.join(', ') %>. Please remove them.",ExportTitle:"Download results for <%= name || 'query' %>",ConfigureExport:"Configure Export",GetData:"Download Data",ExportHelp:"Download file containing results to your computer",ExportButton:"Download","download-file":"Download File",download:"Download file",Galaxy:"Send to Galaxy",Drive:"Save to Google Drive",Dropbox:"Save to Dropbox","Destdownload-file":"File",DestGalaxy:"Galaxy",ExportAlt:"Send Data Somewhere Else",ExportLong:'Download\nFile\nto your Computer',SendToGalaxy:'Send to\nGalaxy\nfor analysis',MyGalaxy:"Send to your Galaxy",ForgetGalaxy:"Clear this galaxy URL",GalaxyHelp:"Start a file upload job within Galaxy",GalaxyURILabel:"Galaxy Location:",GalaxyAlt:"Send to a specific Galaxy",SaveGalaxyURL:"Make this my default Galaxy",WhatIsGalaxy:"What is Galaxy?",WhatIsGalaxyURL:"https://galaxyproject.org/tutorials/g101/",GalaxyAuthExplanation:"If you have already logged into Galaxy with this browser, then the data\nwill be sent into your active account. Otherwise it will appear in a \ntemporary anonymous account.",CopyToClipBoard:"Copy to clipboard: +C, ",IsPrivateData:"This link provides access to data stored in your private lists. In order to do so\nit uses the API access token provided on initialisation. If this is your permanent\nAPI token you should be as careful of this link as you would of the data is provides\naccess to. If this is just a 24 hour access token, then you will need to replace it\nonce it becomes invalid.",LongURI:"The normal URI for this query (which includes the full query XML in the \nparameters) is too long for a GET request. The URI you can see here uses a\nquery-id, which has a limited validity. You should not store this URI for long\nterm use.",SendToOtherGalaxy:"Send",AllRows:"Whole Result Set",SomeRows:"Specific Range",WhichRows:"Rows to Export",RowsHelp:"Export all rows, or define a range of rows to export.",AllColumns:"All Current Columns",SomeColumns:"Choose Columns",CompressResults:"Compress results",NoCompression:"No compression",GZIPCompression:"GZIP",ZIPCompression:"ZIP",Copy:"copy to clip-board",ResultsPermaLink:"Perma-link to results",ResultsPermaLinkText:"Results URI",QueryXML:"Query XML",ResultsPermaLinkTitle:"Get a permanent URL for these results, suitable for your own use",ResultsPermaLinkShareTitle:"Get a permanent URL for these results, suitable for sharing with others",ColumnsHelp:"Export all columns, or choose specific columns to export.",WhichColumns:"Columns to Export",ResetColumns:"Reset Columns.",FirstRow:"From",LastRow:"To",SpreadsheetOptions:"Spreadsheet Options",ColumnHeaders:"Include Column Headers",PossibleColumns:"You can add any attribute from these nodes without changing your results:",ExportedColumns:"Exported Columns (drag to reorder)",ChangeColumns:"You may add any of the columns in the right hand box by clicking on the\nplus sign. You may remove unwanted columns by clicking on the minus signs\nin the left hand box. Note that while adding these columns will not alter your query,\nif you remove all the attributes from an item, then you may change the results\nyou receive.",OuterJoinWarning:"This query has outer-joined collections. This means that the number of rows in \nthe table is likely to be different from the number of rows in the exported results.\nYou are strongly discouraged from specifying specific ranges for export. If\nyou do specify a certain range, please check that you did in fact get all the \nresults you wanted.",IncludedFeatures:"Exportable parts of this Query - choose at least one:",FastaFeatures:"Features with Sequences in this Query - select one:",FastaOptions:"FASTA Specific Options",FastaExtension:"Extension (eg: 100/100bp/5kbp/0.5mbp):",ExtraAttributes:"Columns to include as extra attributes on each exported record:",NoSuitableColumns:"There are no columns of a suitable type for this format.",BEDOptions:"BED Specific Options",Gff3Options:"GFF3 Specific Options",ChrPrefix:'Prefix "chr" to the chromosome identifier as per UCSC convention (eg: chr2)',ConfigureExportHelp:"Configure the export options in these categories","largetable.ok":"Set page size to <%- size %>","largetable.abort":"Cancel","largetable.appeal":"You have requested a very large table size (<%= size %> rows per page). Your\nbrowser may struggle to render such a large table,\nand the page could become unresponsive. In any case,\nwill be very difficult for you to read the whole table\nin the page. We suggest the following alternatives:"}}).call(this)},{}],18:[function(t,e,n){(function(){var n;(n=t("../messages")).setWithPrefix("codegen",{AsHTML:"As HTML page",DialogueTitle:'Generated <%= Messages.getText("codegen.Lang", {lang: lang}) %>\nCode for <%= query.name || "Query" %>',CannotExportXML:"You cannot save the XML as a file directly. Please use your browser's cut\nand paste functionality.",PrimaryAction:"Save",ChooseLang:"Choose Language",ShowBoilerPlate:"Show comments",HighlightSyntax:"Highlight Syntax",GenerateCodeIn:function(t){var e;return e=t.lang,"Generate "+n.getText("codegen.Lang",{lang:e})+"\n"+("xml"!==e?"code":"")},Lang:function(t){var e;switch(e=t.lang){case"py":return"Python";case"pl":return"Perl";case"java":return"Java";case"rb":return"Ruby";case"js":return"JavaScript";case"xml":return"XML";default:throw new Error("Unknown language "+e)}}})}).call(this)},{"../messages":16}],19:[function(t,e,n){(function(){t("../messages").setWithPrefix("columns",{DialogueTitle:"Manage Columns",ApplyChanges:"Apply Changes",FindColumnToAdd:"Add a Column",AddColumn:"<% if (num < 1) { %>\n No columns chosen\n<% } else { %>\n Add <%= num %> new <%= pluralise('column', num) %>\n<% } %>",AddColumnToSortOrder:"Sort by this column",NoChangesToApply:"There are no changes to apply.",OrderVerb:"Add / Remove / Re-Arrange",OrderTitle:"Columns",SortVerb:"Configure",SortTitle:"Sort-Order",OnlyColsInView:"Only show columns in the table:",SortingHelpTitle:"What Columns Can I Sort by?",ViewTabTitle:"Selected Columns",SortOrderTabTitle:"Sort Order",CurrentView:"Current Columns",CurrentViewHelp:"Re-arrange or remove columns by dragging, or by using the buttons",CurrentSortOrder:"<% if (oes.length) { %>\n <%= oes.length %> Order <%= pluralise('Elements', oes.length) %>\n<% } else { %>\n Not sorted.\n<% } %>",NoSortOrder:"No sort order. Drop columns here to sort the table.",RemoveOrderElement:"Remove this column from the sort-order",CurrentSortOrderHelp:"Re-arrange, add or remove columns. The full set of available\ncolumns is listed below.",ColumnsSelected:'<%= columns.length %> <%= pluralise("Column", columns.length) %>\nSelected<% if (removed) { %>, <%= removed %> Removed<% } %>',ChooseAPathFrom:"Choose a path from <%= root %>",RemoveColumn:"Remove this column",MoveUp:"Move this column up",MoveDown:"Move this column down",ColumnWillBeRemoved:"This column will be removed",RestoreColumn:"Add this column back to the table",ChangeDirection:"Change sort direction",CurrentDirection:"Sorted in\n<%= (dir === 'DESC') ? 'reverse' : void 0 %>\n<%= numeric ? 'numerical' : 'alphabetical' %>\norder.",ManageColumns:"Manage Columns",ManageColumnsShort:"Columns"})}).call(this)},{"../messages":16}],20:[function(t,e,n){(function(){e.exports={All:"All",Reset:"Reset",Export:"Download",Clear:"Clear",Cancel:"Cancel",Complete:"Complete",Error:"Error",Warning:"Warning",Filter:"Filter",Loading:"Loading",Undo:"Undo",and:"and",or:"or",comma:",",Number:"<%= formatNumber(n) %>","modal.DefaultTitle":"Excuse me...","modal.Dismiss":"Close","modal.OK":"OK","modal.ApplyChanges":"Apply Changes","core.NoOptions":"There are no options to select from.",ErrorTitle:function(t){switch(t.level){case"Error":return"Error";case"Warning":return"Warning";case"Info":return"nb";case"Positive":return"Success";default:return"Error"}}}}).call(this)},{}],21:[function(t,e,n){(function(){t("../messages").setWithPrefix("constraints",{Heading:'<%= n %> Active <%= pluralise("Filter", n) %>',AddNewFilter:"Add New Filter",AddFilter:"Add filter",AddNew:"Add Filter",DefineNew:"Define a new filter",EditOrRemove:"edit or remove the currently active filters",None:"No active filters",NoOfValues:'<%= (n === 1) ? "one" : formatNumber(n) %> <%= pluralise("value", n) %>',NoOfIds:'<%= (n === 1) ? "one" : formatNumber(n) %> <%= pluralise("ID", n) %>',ISA:"is a",LookupIn:"in",AddConFor:"Add filter to\n<% if (isAttribute && !hideType) { %><%= typeName %><% } %>\n<%= _.last(parts) %>",ManageFilters:"Manage Filters",ManageFiltersShort:"Filters"})}).call(this)},{"../messages":16}],22:[function(e,t,n){(function(){var t;(t=e("../messages")).setWithPrefix("error",{Oops:"Oops! - Sorry we cannot get that table for you.",EmailHelp:"Send a bug report",ShowQuery:"Show query",ShowError:"Show error",ConnectionError:"Could not connect to server"}),t.setWithPrefix("error.mail",{Subject:"[IMTABLES] - Error running query."}),t.setWithPrefix("error.client",{Heading:"Application error.",Body:"This is due to an unexpected error in the tables\napplication - this is our fault, and we are sorry for the\ninconvenience. Please send us the pre-filled bug report so\nwe can fix this as soon as possible."}),t.setWithPrefix("error.server",{Heading:"Server error - our bad!",Body:"This is most likely related to the query that was just run. If you have\ntwo minutes, please send us an email with details of this query to help us\ndiagnose and fix this bug - we have already pre-filled the bug report,\nyou just need to hit send (and maybe give us some extra details).\nAlternatively, you might be able to fix this query by changing its column, \nfilters or joins; use the tools above to do so."})}).call(this)},{"../messages":16}],23:[function(e,t,n){(function(){var t;(t=e("../messages")).setWithPrefix("joins",{Heading:"Manage Relationships",Manage:function(){return t.getText("joins.Heading")},ManageShort:"Relationships",Inner:"Required",Outer:"Optional",ExplanationTitle:"What does this do?",Explanation:"You can specify the entity relationships within the query here. This\nhas a couple of effects - one is to exclude a class of matched results, the\nother is to change the way the results are presented in the table.\nIf set to required, then an entity which matches the filters\nbut lacks the given relationship will not be returned in the results,\nwhereas if set to optional it will. This also has an effect on the\nway that results are laid out: required collection relationships\nare returned inline, whereas optional collection relationships are\nreturned as nested sub-tables within the main result set."})}).call(this)},{"../messages":16}],24:[function(e,t,n){(function(){var t;(t=e("../messages")).setWithPrefix("lists",{DefaultName:"<%= typeName %> List (<%= new Date() %>)",Create:"Create List",Append:"Add to List",SaveAsList:"Save as List",CreateListTitle:"Create a new List\n<% if (state.count) { %>\n of <%= formatNumber(state.count) %>\n <%= pluralise(state.typeName, (state.count || 0)) %>\n<% } %>",AppendToListTitle:"Add\n<% if (state.count) { %>\n <%= formatNumber(state.count) %>\n <%= pluralise(state.typeName, (state.count || 0)) %>\n<% } %>\nto\n<%= target || 'a List' %>",NoTags:"No tags",AddTag:"Add a new tag",AddTagBtn:"add",RemoveTag:"Remove this tag",ShowExtraOptions:"<% if (minimised) { %>Show <% } %>Optional attributes",TargetDoesNotExist:"Your target list does not exist.",NoTargetSelected:"Please select a target list.",PossibleAppendTarget:"<%= name %> (<%= formatNumber(size) %> <%= pluralise((typeName || 'item'), size) %>)",NoObjectsSelected:"No objects selected. Choose objects from the table beneath. You can\ndrag this dialog around if it is in the way.",StartPicking:"Pick items from the table",NoCommonType:"There is no common type for these objects."}),t.setWithPrefix("lists.error",{MustBeLoggedIn:"You are not logged in. Anonymous users cannot create lists."}),t.setWithPrefix("lists.params",{Name:"List Name",NamePlaceholder:"List name is required",Desc:"List Description",DescPlaceholder:"Enter a description",Target:"Choose list to append items to"}),t.setWithPrefix("lists.params.help",{Name:"You must provide a unique list name",Target:"You must select a target list"}),t.setWithPrefix("lists.picker",{Expand:"show more options",Collapse:"show fewer options"}),t.setWithPrefix("lists.append",{NoSuitableLists:"No suitable lists were found\n<% if (model.type) { %>\n for <%- model.type %>.\n<% } else { %>\n because no items are selected, or they have no common type.\n<% } %>"})}).call(this)},{"../messages":16}],25:[function(e,t,n){(function(){var t;(t=e("../messages")).setWithPrefix("logic",{Heading:"Manage Constraint Logic",Manage:function(){return t.getText("logic.Heading")},ManageShort:"Constraint Logic",LogicLabel:function(){return t.getText("logic.ManageShort")},ApplyLogic:"Change logic"})}).call(this)},{"../messages":16}],26:[function(t,e,n){(function(){t("../messages").setWithPrefix("subtables",{OpenHint:"Click to view/hide rows",RemoveColumn:"Remove this column"})}).call(this)},{"../messages":16}],27:[function(t,e,n){(function(){t("../messages").setWithPrefix("summary",{Got:"<% if (available > got) { %>Showing <%= formatNumber(got) %> of<% } %>",Max:"Maximum",Min:"Minimum",Bucket:"<%= range.min %> to <%= range.max %>: <%= count %> values",Count:"Count",Item:"Item",Average:"Average",StdDev:"Standard Deviation",OnlyOne:"There is only one <%- names.typeName %> <%- names.endName %>:\n<%- item.item %>, which occurs\n\n <% if (item.count === 1) { %>\n once\n <% } else if (item.count === 2) { %>\n twice\n <% } else { %>\n <%- formatNumber(item.count) %> times\n <% } %>\n",NumericDistribution:"Showing distribution of <%= formatNumber(n) %>",FilterValuesPlaceholder:"Filter values",DownloadData:"Download data",DownloadFormat:"As",MoreItems:"Load more items",Include:"Restrict table to matching rows",Exclude:"Exclude matching rows from table",Reset:"Reset selection",Toggle:"Toggle selection",SelectFilter:"Select filter type",FacetBar:"rgba(206, 210, 222, <%= opacity %>)",NoResults:"No results for <%= path %>",SelectedCount:"<%= isApprox ? \"ca. \" : void 0 %><%= formatNumber(selectedCount) %>\n<%= pluralise('Item', selectedCount) %> Selected",Total:"<% if (filtered) { %>(filtered from <%= formatNumber(total) %>)<% } %>"})}).call(this)},{"../messages":16}],28:[function(e,t,n){(function(){var t;(t=e("../messages")).setWithPrefix("table",{Building:"Loading Table ...",OverlayText:"Requesting data...",Empty:"No Results",EmptyWhy:"This query returns no results. You may wish to change its filters"}),t.setWithPrefix("table.lg",{ShowingAll:"Showing all <%= formatNumber(count) %> rows",ShowingRange:'Showing <%= formatNumber(first) %> to <%= formatNumber(last) %>\nof <%= formatNumber(count) %> <%= pluralise("row", count) %>'}),t.setWithPrefix("table.md",{ShowingAll:"All <%= formatNumber(count) %> rows",ShowingRange:"Showing rows <%= formatNumber(first) %> to <%= formatNumber(last) %>\nof <%= formatNumber(count) %>"}),t.setWithPrefix("table.sm",{ShowingAll:"All rows",ShowingRange:"Rows <%= formatNumber(first) %> to <%= formatNumber(last) %>\nof <%= formatNumber(count) %>"}),t.setWithPrefix("table.xs",{ShowingAll:"All rows",ShowingRange:"<%= formatNumber(first) %> to <%= formatNumber(last) %>\nof <%= formatNumber(count) %>"}),t.setWithPrefix("table.header",{FailedToInitSortMenu:"Could not initialise the sorting menu.",FailedToInitFilter:"Could not initialise the filter menu.",FailedToInitSummary:"Could not intitialise the column summary.",ViewSummary:"View column summary",ToggleColumn:"Toggle column visibility",RemoveColumn:"Remove this column",SortColumn:"<% if (dir === 'ASC') { %>\n Sorted in ascending order.\n<% } else if (dir === 'DESC') { %>\n Sorted in descending order.\n<% } else { %>\n Sort this column.\n<% } %>",ToggleTables:"Expand/collapse all sub-tables",Composed:"This column replaces <%= replaces.length %> others. Click here\nto show the individual columns separately.",FilterTitle:"<% if (count > 0) { %>\n <%= count %> active filters.\n<% } else { %>\n Filter by values in this column.\n<% } %>"})}).call(this)},{"../messages":16}],29:[function(t,e,n){(function(){t("../messages").setWithPrefix("undo",{StepTitle:"<% if (label === 'Initial') { %>\n Initial State\n<% } else if (verb === 'Added') { %>\n <% if (label === 'sort order element') { %>\n Added <%= formatNumber(number) %> <%= pluralise('column', number) %> to the sort order\n <% } else if (label === 'column') { %>\n Selected <%= formatNumber(number) %> <%= pluralise('column', number) %>\n <% } else { %>\n Added <%= formatNumber(number) %> <%= pluralise(label, number) %>\n <% } %>\n<% } else if (verb === 'Removed') { %>\n <% if (label === 'sort order element') { %>\n Removed <%= formatNumber(number) %> <%= pluralise('column', number) %> from the sort order\n <% } else if (label === 'column') { %>\n Unselected <%= formatNumber(number) %> <%= pluralise('column', number) %>\n <% } else { %>\n Removed <%= formatNumber(number) %> <%= pluralise(label, number) %>\n <% } %>\n<% } else if (verb === 'Changed') { %>\n <% if (label === 'sort order element') { %>\n Changed sort order\n <% } else { %>\n Changed <%= pluralise(label, 2) %>\n <% } %>\n<% } else if (verb === 'Rearranged') { %>\n Rearranged <%= pluralise(label, 2) %>\n<% } else { %>\n !!!Cannot handle <%= verb %> <%= label %>!!!\n<% } %>",StepCount:'<%= formatNumber(count) %> <%= pluralise("row", count) %>',RevertToState:"Revert to this state",IsCurrentState:"This is the current state",ViewCount:'<%= n %> <%= pluralise("column", n) %> selected',ConstraintCount:"<% if (n) { %>\n <%= n %> <%= pluralise('filter', n) %>\n<% } else { %>\n No filters\n<% } %>",OrderElemCount:"<% if (n) { %>\n Sorted on <%= n %> <%= pluralise('column', n) %>\n<% } else { %>\n Not sorted\n<% } %>",ShowAllStates:"Show <%= n %> hidden <%= pluralise('state', n) %>",ToggleTrivial:'<%= hideTrivial ? "Hiding" : "Hide" %> minor steps',ToggleTrivialTitle:'<%= hideTrivial ? "Hiding" : "Hide" %> steps that did not change the row count',Revision:"no. <%= v %>",RevisionTitle:"revision <%= v %>",MoreSteps:'<%= more %> more <%= pluralise("step", more) %>'})}).call(this)},{"../messages":16}],30:[function(t,e,r){(function(){var i,n;i=t("jquery"),n=function(t){var e,n;return e=i("body").width(),n=t.width(),t.css({left:(e-n)/2,top:50})},r._showModal=function(){var t,e;return(t=this.$el).modal({show:!1}).addClass("im-floating").draggable({handle:".modal-header"}).show(function(){return n(t),t.animate({opacity:1},{complete:function(){return t.addClass("in")}})}),this.listenToOnce(this,"remove",(e=this,function(){return e.$el.draggable("destroy")}))},r._hideModal=function(){return this.$el.removeClass("in"),this.onHidden()}}).call(this)},{jquery:252}],31:[function(t,e,n){(function(){var p;p=t("underscore"),n.setChildIndices=function(e,n,t){var i,r,o,s,a,l,u,c,h;for(null==n&&(n="top"),null==t&&(t="collection"),s=this.children,i=this[t],h=p.compact(i.map(function(t){return s[e(t)]})),l=[],r=o=0,a=(u=p.sortBy(h,function(t){return t.el.getBoundingClientRect()[n]})).length;oe;)this.pop();return this.watch(t),null!=n&&n.trigger("replaced:by",t.get("query")),this.triggerChangedCurrent()},n)}).call(this)},{"../core/collection":5,"./step":59,underscore:257}],46:[function(e,o,t){(function(){var t,n,r={}.hasOwnProperty;function i(t,e,n){i.__super__.constructor.call(this,{classes:null!=e?e.map(String):void 0,id:n}),this.set({"service:base":t}),this.freeze("service:base","id","classes")}n=e("underscore"),t=e("../core-model"),o.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(i,t),i.prototype.toJSON=function(){var t,e;return e=this.get("service:url"),t=/^http/.test(e)?e:this.get("service:base")+e,n.extend(i.__super__.toJSON.apply(this,arguments),{"report:uri":t})},i.prototype.merge=function(t,e){return this.set(e,t.value),this.set({"service:url":t.url})},i)}).call(this)},{"../core-model":2,underscore:257}],47:[function(a,l,t){(function(){function t(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t}var e,c,h,n,i,r={}.hasOwnProperty;function o(t){var e,n;e=t.path,n=t.style,o.__super__.constructor.call(this,e),null!=n&&this.set({style:n})}function s(){return s.__super__.constructor.apply(this,arguments)}i=a("underscore"),e=a("../core/collection"),n=a("./path"),t(o,n),o.prototype.defaults=function(){return i.extend(o.__super__.defaults.apply(this,arguments),{style:"INNER"})},c=o,l.exports=(t(s,e),s.prototype.model=c,s.prototype.comparator="displayName",s.prototype.initialize=function(){return s.__super__.initialize.apply(this,arguments),this.listenTo(this,"change:displayName",this.sort)},s.prototype.getJoins=function(){return i.object(this.where({style:"OUTER"}).map(function(t){return[t.get("path"),t.get("style")]}))},h=s),h.fromQuery=function(t){var e,n,i,r,o,s,a,l,u;for(o in n=new h,a=t.joins)u=a[o],s=t.makePath(o),n.add(new c({style:u,path:s}));for(e=0,i=(l=t.getQueryNodes()).length;e "))}),r.set({contentName:o.compact([r.get("columnTypeName"),r.get("fieldName")]).join(" ")})}))},e.prototype.getPath=function(){return this.get("column")},e.prototype.toJSON=function(){return o.extend(e.__super__.toJSON.apply(this,arguments),{column:this.get("column").toString(),node:this.get("node").toString(),rows:this.get("rows").map(function(t){return t.map(function(t){return t.toJSON()})})})},e)}).call(this)},{"../core-model":2,underscore:257}],49:[function(e,i,t){(function(){var t,r={}.hasOwnProperty;function n(t,e){n.__super__.constructor.call(this),this.set({id:null,isNULL:!0,classes:[t],"service:base":"","service:url":"","report:uri":null}),e&&this.set(e,null)}t=e("../core-model"),i.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(n,t),n)}).call(this)},{"../core-model":2}],50:[function(e,n,t){(function(){var t,i,r={}.hasOwnProperty;function o(){return o.__super__.constructor.apply(this,arguments)}i=e("underscore"),t=e("backbone"),n.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(o,t.Model),o.prototype._defaults={},o.prototype.setLimits=function(t){return i.extend(this._defaults,t)},o.prototype.get=function(t){var e;return null!=(e=o.__super__.get.call(this,t))?e:t in this._defaults?this._defaults[t]:null},o.prototype.toJSON=function(){return i.extend({},this._defaults,this.attributes)},o.prototype.nullify=function(){var t,e,n,i,r;for(this.unset("min"),this.unset("max"),this.nulled=!0,r=[],e=0,n=(i=["change:min","change:max","change"]).length;e= 0");if(null!=this.size&&this.size<0)throw new Error("Size must be null or Natural")}e.exports=(t.prototype.end=function(){return this.all()?null:this.start+this.size},t.prototype.all=function(){return!this.size},t.prototype.isBefore=function(t){return null!=this.size&&this.end() ")}),e.freeze("displayName","parts")}));var e},n.prototype.setTypeName=function(t){var e;return(t.isAttribute()?t.getParent():t).getType().getDisplayName().then((e=this,function(t){return e.set({typeName:t})}))},n.prototype.pathAttributes=function(t){var e,n,i,r,o;return r=String(t),e={id:(n=t.isAttribute())?r:r+".id",path:r,type:null!=(i=(o=t.getType()).name)?i:o},n?(e.isNumeric=0<=l.call(a,o),e.isBoolean=0<=l.call(s,o)):(e.isReference=!0,e.isAttribute=!1),e},n)}).call(this)},{"../core-model":2,imjs:250}],57:[function(l,u,t){(function(){function t(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t}var e,n,i,o,r={}.hasOwnProperty;function s(){return s.__super__.constructor.apply(this,arguments)}function a(){return a.__super__.constructor.apply(this,arguments)}o=l("underscore"),n=l("../core-model"),e=l("../core/collection"),t(s,n),s.prototype.defaults=function(){return{index:null,query:null,cells:[]}},s.prototype.toJSON=function(){var r;return o.extend(s.__super__.toJSON.apply(this,arguments),{cells:function(){var t,e,n,i;for(i=[],t=0,e=(n=this.get("cells")).length;t\n\nvar selector = \'#some-elem\';\nvar service = {root: \'<%= service.root %>\'};\nvar query = <%= JSON.stringify(query, null, 2) %>;\n\nimtables.loadTable(\n selector, // Can also be an element, or a jQuery object.\n <%= JSON.stringify(page) %>, // May be null\n {service: service, query: query} // May be an imjs.Query\n).then(\n function (table) { console.log(\'Table loaded\', table); },\n function (error) { console.error(\'Could not load table\', error); }\n);\n<% if (asHTML) { %>\n<\/script>\n<% } %>\n',n.select_with_label='\n\n<% if (options.length) { %>\n \n <% if (helpMessage) { %>\n \n <%- Messages.getText(helpMessage) %>\n \n <% } %>\n<% } else { %>\n \n <%- Messages.getText(noOptionsMessage, {model: model}) %>\n \n<% } %>\n\n',n.modal_base='\n',n.constraints_heading="<% /* requires constraints.length */ %>\n

          \n <%- Messages.getText('constraints.Heading', {n: constraints.length}) %>\n

          \n",n.logic_manager_body='
          \n \n
          \n
          \n \n
          \n',n.value_control_row='\n \n\n\n {{# if (editing) { }}\n
          \n \n \n \n \n \n
          \n {{# } else { }}\n {{{ icons.icon(\'Edit\') }}}\n {{ value }}\n {{# } }}\n\n',n.export_fasta_options='

          <%- Messages.getText(\'export.category.Options\') %>

          \n\n
          \n \n \n
          \n',n.code_gen_button='<% /* requires lang :: string, options.Langs :: [string] */ %>\n
          \n \n \n \n
          \n',n.too_many_suggestions="\n {{{ icons.icon('Info') }}}\n {{ messages.getText('conbuilder.TooManySuggestions') }}\n There are {{ extra }} values we could not include.\n\n",n.modal_dialogue_opener='\n',n.column_manager_path_remover='<% /* requires: removeTitle */ %>\n\n <%= Icons.icon(\'Remove\') %>\n\n\n',n.cell_preview_items='\n \n \n\n\n',n.reset_button="\n",n.error_message="<% if (error) { %>\n
          \">\n <%= icons.icon('Error') %>\n \n <%- error.message || error %>\n \n
          \n<% } %>\n\n",n.list_dialogue_expander="\n",n.export_tab_menu='<% _.each(data.tabs, function (tabDef) { %>\n \n<% }); %>\n',n.column_header='<% /* requires the properties of HeaderModel +\n * penult, last, headerClasses, colTitleClasses, penultClasses\n * and the usual Icons, Messages\n */ %>\n
          \n\n
          \n \n <% if (outerJoined && isReference) { %>\n \n <%= Icons.icon(\'Table\') %>\n \n <% } %>\n\n <% if (sortable) { %>\n \n \n <%= Icons.icon(sortDirection || \'unsorted\') %>\n \n \n \n <% } %>\n\n \n <%= Icons.icon(\'headerIconRemove\') %>\n \n\n \n <%= Icons.icon(minimised ? \'headerIconReveal\' : \'headerIconHide\') %>\n \n\n \n \n <%= Icons.icon(\'Filter\') %>\n \n \n \n\n \n \n <%= Icons.icon(\'Summary\') %>\n \n \n \n\n <% if (isComposed) { %>\n \n <%= Icons.icon(\'Composed\') %>\n \n <% } %>\n
          \n\n
          \n
          \n <%- penult %>\n
          \n <% if (last) { %>\n
          \n <%- last %>\n
          \n <% } %>\n
          \n\n
          \n\n',n.column_manager_restore_path='<% /* requires: restoreTitle */ %>\n\n <%= Icons.icon(\'Add\') %>\n\n\n',n.list_value_controls="<% if (suitableLists.length) { %>\n <%= select(suitableLists, isSelected, 'span7 im-value-options im-con-value im-con-value-list form-control', formatList, getOptionValue) %>\n<% } else { %>\n <%- messages.getText('conbuilder.NoSuitableLists') %>\n<% } %>\n",n.formatted_sorting=" <% /* requires Icons, direction and name */ %>\n <%= Icons.icon(direction || 'unsorted') %>\n <%- name %>\n\n",n.cell_preview_attribute='\n <%- _.last(parts) %>\n \n <% if (isNumeric) { %>\n <%- numToString(+value) %>\n <% } else { %>\n <%- value %>\n <% } %>\n <% if (tooLong) { %>\n <%- valueOverspill %>\n \n ...\n <%= Icons.icon(\'More\') %>\n \n <% } %>\n \n\n',n.extra_value_controls='\n\n',n.pagination='
            \n \n \n
          • \n \n
          • \n
          • \n <% if (useSelect) { %>\n
            \n \n
            \n <% } else { %>\n \n \n <% } %>\n
          • \n
          • \n \n
          • \n \n \n
          \n',n.constraint_summary="<% if (code) { %>\n
        • <%- code %>:
        • \n<% } %>\n<% _.each(labels, function (label) { %>\n
        • \n \">\n <% if (_.include(['error', 'warning'], label.type)) { %>\n <%= Icons.icon('Error') %>\n <%- Messages.getText('consummary.' + label.content) %>\n <% } else if (label.type === 'path') { %>\n <% _.each(label.content.split(' > '), function (part) { %>\n \" class=\"im-name-part\"><%- part %>\n <% }); %>\n <% } else { %>\n <% if (label.icon) { %><%= Icons.icon(label.icon) %><% } %>\n <%- label.content %>\n <% } %>\n \n
        • \n<% }); %>\n",n.facet_frequency='<% /* requires: error, initialized */ %>\n<% if (error) { %>\n <% /* Oh noes - something went wrong. */ %>\n
          \n <%= Icons.icon(\'Error\') %>\n <%- Messages.getText(\'Error\') %>\n <% if (error.key) { %>\n <%- Messages.getText(error.key) %>\n <% } else { %>\n <%- error.message || error %>\n <% } %>\n
          \n<% } else if (initialized) { %>\n <% /* Huzzah - there is data, which will be added here as child views */ %>\n<% } else { %>\n <% /* Boo - no data. Show an indeterminate progress bar while we wait. */ %>\n
          \n
          \n <%- Messages.getText(\'Loading\') %>.\n
          \n
          \n<% } %>\n',n.column_manager_position_controls="
          \n <% if (index > 0) { %>\n <%= Icons.iconWithProps('ASC', {\n className: 'im-move-up',\n title: Messages.getText('columns.MoveUp')\n }) %>\n <% } %>\n <% if (!isLast) { %>\n <%= Icons.iconWithProps('DESC', {\n className: 'im-move-down',\n title: Messages.getText('columns.MoveDown')\n }) %>\n <% } %>\n
          \n\n",n.export_format_controls='

          \n\n<% _.each(formats, function (formatDef) { %>\n
          \n \n
          \n<% }); %>\n',n.cell_preview_error='
          \n

          Error

          \n

          Sorry. We could not fetch the preview due to an error:

          \n <%- message %>\n
          \n',n.export_destination_radios='\n<% _.each(destinations, function (d) { %>\n
          \n \n
          \n<% }); %>\n\n',n.column_manager_sort_order_editor='<% /* requires: collection, available */ %>\n

          \n <%- Messages.getText(\'columns.CurrentSortOrder\', {\n oes: collection\n }) %>\n

          \n\n\n <%- Messages.getText(\'columns.CurrentSortOrderHelp\') %>\n\n\n
          \n\n
          \n
          \n <% if (collection.length) { %>\n
            \n <% } else { %>\n
            \n <%- Messages.getText(\'columns.NoSortOrder\') %>\n
            \n <% } %>\n
            \n\n
            \n <% if (available) { %>\n
            \n
              \n
            \n
            \n <% } %>\n
            \n
            \n
            \n',n.facet_item='
            \n \n \n (<%- count %>)\n \n <%- item %>\n \n
            \n',n.checkbox="\n",n.attribute_value_controls='
            \n \n
            \n',n.input_with_label='\n\n<% if (helpMessage) { %>\n \n <%- Messages.getText(helpMessage) %>\n \n<% } %>\n',n.export_dialogue='
            \n \n
            \n
            \n
            \n',n.input_with_button='\n\n \n\n\n',n.summary_no_results="
            \n <%= Icons.icon('Warning') %>\n <%- Messages.getText('summary.NoResults', {path: pathName}) %>\n
            \n\n",n.summary_items='<% if (!(/boolean/i).test(type)) { %>\n
            \n \n \n \n \n
            \n<% } %>\n\n
            \n \n \n <% _.each(colClasses, function (cls) { %>\n \n <% }); %>\n \n \n \n <% _.each(colHeaders, function (hdr) { %>\n \n <% }); %>\n \n \n \n \n
            <%- hdr %>
            \n\n <% if (hasMore) { %>\n
            \n <%- Messages.getText(\'summary.MoreItems\') %>\n
            \n <% } %>\n
            \n\n
            \n
            \n',n.list_dialogue_button_node='\n \n <%- displayName || path %>\n \n <% if (state.count) { %>\n (<%- numToString(state.count) %>\n <%- pluralise((typeName || type), state.count) %>)\n <% } %>\n\n',n.join_style='<% /* requires innerJoinBtn, outerJoinBtn */ %>\n
            \n \n \n
            \n',n.summary_heading='<% /* requires:\n * numeric, available, got, uniqueValues\n * state.typeName, state.endName\n * filtered \n */ %>\n

            \n <% if (numeric) { %>\n <%- Messages.getText(\'summary.NumericDistribution\', {n: available}) %>\n <%- state.typeName %>\n <%- pluralise(state.endName, got) %>\n <% } else { %> \n \n <%- Messages.getText(\'summary.Got\', {available: available, got: got}) %>\n \n \n <%- Messages.getText(\'Number\', {n: available}) %>\n \n <%- state.typeName %>\n <%- pluralise(state.endName, got) %>\n \n <%- Messages.getText(\'summary.Total\', {\n filtered: filtered,\n total: uniqueValues\n }) %>\n \n <% } %> \n

            \n',n.code_gen_body='
            \n
            \n <% /* requires lang :: string, options :: {Extra :: {}, Langs :: [string]} */ %>\n
            \n \n \n
            \n
            \n
            \n
            \n
            \n
            \n
            <%- generatedCode %>
            \n
            \n
            \n',n.table_building="

            <%- Messages.getText('table.Building') %>

            \n<%= IndeterminateProgressBar %>\n",n.code_gen_button_main="<%= Icons.icon('CodeFile') %>\n\n <%- Messages.getText('codegen.GenerateCodeIn', {lang: lang}) %>\n\n\n <%- Messages.getText('codegen.Lang', {lang: lang}) %>\n\n\n",n.type_value_controls="\n<% if (subclasses.length == 1) { %>\n \n<% } else { %>\n <%= select(subclasses, isSelected, 'form-control im-value-type') %>\n<% } %>\n \n",n.export_preview='
            \n \n \n
            \n\n
            \n<%- state.preview %>\n
            \n\n
            \n nb\n <%- Messages.getText(\'export.preview.Limit\') %>\n
            \n',n.export_column_controls='

            <%- Messages.getText(\'export.heading.Columns\') %>

            \n\n
              \n
            \n\n
            \n',n.only_one_item="
            \n <%= Icons.icon('Info') %>\n <%= Messages.getText('summary.OnlyOne', {names: state, item: items[0]}) %>\n
            \n\n",n.table_error="
            \n\n

            <%= Icons.icon('Bug') %><%- Messages.getText('error.Oops') %>

            \n\n

            \n <%- Messages.getText(error.key || 'error.' + domain + '.Heading') %>\n

            \n\n

            <%- Messages.getText('error.' + domain + '.Body') %>

            \n\n \">\n <%= Icons.icon('Mail') %>\n <%- Messages.getText('error.EmailHelp') %>\n \n\n \n <% if (error.message) { %>\n \n <% } %>\n\n
            <%- indent(query) %>
            \n\n <% if (error.message) { %>\n
            <%- error.message %>
            \n <% } %>\n\n
            \n",n.page_sizer='<% /* Expects size, sizes */ %>\n<% if (sizes.length) { %>\n \n \n<% } %>\n',n.constraint_editor='
            \n \n <% if (data.con.op) { %>\n
            \n \n
            \n <% } %>\n
            \n
            \n
            \n\n
            \n <% data.buttons.forEach(function (b, i) { %>\n \n <% }); %>\n
            \n',n.facet_row='<% /* requires: selected, symbol, item, count, percent, opacity, share */ %>\n\n <%- symbol %>\n
            \n\n\n\n <% if (item != null) { %>\n <%- item %>\n <% } else { %>\n  \n <% } %>\n\n\n\n <% if (max > 1) { %>\n
            \n
            \n <% } %>\n <%- numToString(count) %>\n\n\n<% if (share != null) { %>\n <%- share.toFixed() %>%\n<% } %>\n',n.table_subtables_header="\">\n <%= Icons.icon('Remove') %>\n\n<% if (displayName && columnName) { %>\n <%- displayName.replace(columnName, '').replace(/^ > /, '') %>\n<% } %>\n",n.null_value=' \n',n.cell_preview_reference="\n <%- _.rest(parts).join(' ') %>\n \">\n <%- values.join(', ') %>\n \n\n",n.list_dialogue_button='\n\n\n',n.export_rows_reset_button="\n\n<% if (tablePage) { %>\n \n<% } %>\n \n",n.active_constraint='
            \n <% if (data.con.editable != null && data.con.editable === false) { %>\n \n <%= data.icons.icon(\'Lock\') %>\n \n <% } else { %>\n \n <%= data.icons.icon(\'RemoveConstraint\') %>\n \n \n <%= data.icons.icon(\'Edit\') %>\n \n <% } %>\n
            \n\n<% /* We use the :empty selector on this element - hence it must be on one line */ %>\n
            \n',n.column_manager_path_chooser_buttons="\n\n\n",n.large_table_disuader='\n',n.cell_preview_reference_relation='<% _.each(collection, function (relation) { %>\n
          • \n <%- _.last(relation.parts) %>\n <%- numToString(relation.count) %>\n
          • \n<% }); %>\n',n.new_filter_dialogue='\n\n',n.loop_value_controls="<% if (candidateLoops.length) { %>\n <%= select(candidateLoops, isSelected, 'form-control im-value-options im-con-value') %>\n<% } else { %>\n <%- messages.getText('conbuilder.NoSuitableLoops') %>\n<% } %>\n",n.export_compression_controls="

            <%- Messages.getText('export.category.Compression', state) %>

            \n\n
            \n \n
            \n\n
            >\n
            \n \n
            \n\n
            \n \n
            \n
            \n\n",n.slider='
            \n <% _.each(markers, function(marker) { %>\n <%- marker.value %>\n <% }); %>\n
            \n',n.join_manager_body="
              \n\n
              \n <%= Icons.icon('Info') %>\n \n <%- Messages.getText('joins.ExplanationTitle') %>\n \n

              \">\n <%- Messages.getText('joins.Explanation') %>\n

              \n
              \n",n.no_results="<% /* requires: selectList :: [], canUndo :: bool */ %>\n\">\n
              \n <% if (canUndo) { %>\n \n <% } %>\n <%- Messages.getText('table.Empty') %>\n

              <%- Messages.getText('table.EmptyWhy') %>

              \n
              \n\n",n.count_summary="<% if (size && count) { %>\n <% var msg = (size == 0 ? '.ShowingAll' : '.ShowingRange'); %>\n <% ['xs', 'sm', 'md', 'lg'].forEach(function (pageSize) { %>\n -inline\">\n <%- Messages.getText('table.' + pageSize + msg, page) %>\n \n <% }); %>\n<% } %>\n",n.classy_popover='\n',n.undo_history='\n\n\n\n\n',n.table_subtable='\n\n
              \n
              \n',n.modal_footer='\n<% if (exportLink != null) { %>\n \n href="<%- exportLink %>">\n <%= Icons.icon(primaryIcon) %>\n <%- primaryAction %>\n \n<% } else { %>\n <% /* We need the wrapper to deal with the fact that tooltips do not\n * work on disabled buttons. */ %>\n
              \n title="<%- Messages.getText(disabledReason) %>"\n <% } %>>\n \n
              \n<% } %>\n',n.column_manager_path_chooser="
              \n
              \n

              \n <%- Messages.getText('columns.ChooseAPathFrom', {root: state.rootName}) %>\n

              \n\n",n.column_manager_order_direction="<% /* requires: direction, isNumeric */ %>\n\">\n \n <%- Messages.getText('columns.CurrentDirection', {\n dir: direction, numeric: isNumeric\n }) %>\n \n <%= Icons.icon('Sort' + (isNumeric ? 'Numeric' : 'String') + direction) %>\n\n",n.download_popover='<% /* requires: formats, query, path */ %>\n\n',n.modal_error='<% /* Renders an alert box at various levels, with appropriate icons and messages */ %>\n<% if (error) { %>\n
              \n <% if (!error.cannotDismiss) { %>\n \n <% } %>\n <%= Icons.icon(errorIcon(error)) %>\n <%- Messages.getText(\'ErrorTitle\', error) %>\n <% if (error.key != null) { %>\n <%- Messages.getText(error.key) %>\n <% } else { %>\n <%- error.message || error %>\n <% } %>\n
              \n<% } %>\n',n.row_surrogate="<%= Icons.icon(above ? 'ASC' : 'DESC') %>\n<%- item %>: <%- count %>\n",n.active_constraints='<% /* requires: constraints.length */ %>\n
              \n

              \n <% if (constraints.length) { %>\n <%- Messages.getText(\'constraints.EditOrRemove\') %>\n <% } else { %>\n <%- Messages.getText(\'constraints.None\') %>\n <% } %>\n

              \n\n
                \n
              \n
              \n',n.list_tag="<%- id %>\n\">\n <%= Icons.icon('Remove') %>\n\n",n.undo_history_step_section="
              \n <% if (collection.length) { %>\n <%= Icons.icon(state.open ? 'ExpandedSection' : 'CollapsedSection') %>\n <% } %>\n <%- Messages.getText(summaryLabel, {n: count}) %>\n
              \n<% if (collection.length) { %>\n
              \">\n <% _.each(collection, function (e) { %>\n \">\n <%- labelContent(e) %>\n \n <% }); %>\n
              \n<% } %>\n",n.export_destination_galaxy_options='
              \n \n \n
              \n
              \n \n \n
              \n',n.attribute_value_select='\n',n.column_manager_tabs='\n',n.export_flat_file_options="

              <%- Messages.getText('export.category.ColumnHeaders', state) %>

              \n\n
              \n \n
              \n\n
              >\n
              \n \n
              \n\n
              \n \n
              \n
              \n\n",n.constraint_adder_options='<% if (showTree) { %>\n
              \n
              \n find\n \n \n \n \n
              \n
              \n<% } %>\n
              \n
              \n <% if (!showTree) { %>\n \n <% } else { %>\n \n <% } %>\n
              \n
              \n \n
              \n
              \n',n.summary_items_controls='\n\n
              \n \n \n \n
              \n\n
              \n \n <% if (!(/boolean/i).test(type)) { %>\n \n <% } %>\n
              \n\n',n.facet_title="<%= Icons.icon(state.open ? 'Expanded' : 'Collapsed') %>\n<%- pathName %>\n \n<%- Messages.getText('Number', {n: got} %>\n",n.export_add_column_control='
              \n
              \n <%= Icons.icon(\'Help\', \'lg\') %>\n
              \n
              \n \n
              \n
              \n',n.export_column_control="<%- item.getType() %>\n\n <% if (active) { %>\n <%= Icons.icon('Check') %>\n <% } else { %>\n <%= Icons.icon('UnCheck') %>\n <% } %>\n\n<%- name %>\n",n.table_cell='<% if (state.minimised) { %>\n …\n<% } else if (entity.id === null) { %>\n <% if (value !== null && formattedValue !== null) { %>\n <%= value %>\n <% } else if (entity.isNULL) { %>\n \n <%- Messages.getText(\'table.cell.NullEntity\', {type: entity[\'class\']}) %>\n \n <% } else { %>\n <%= NULL_VALUE %>\n <% } %>\n<% } else { %>\n checked<% } %>\n <% if (input.disabled) { %>disabled<% } %>\n style="display:<%- input.display %>">\n\n <% if (field !== \'url\') { %>\n \n\n <% if (isForeign) { %>\n <% if (icon) { %>\n \n <% } else { %>\n <%= Icons.icon(\'ExternalLink\') %>\n <% } %>\n <% } %>\n\n <% if (value !== null && formattedValue !== null && value !== \'null\') { %>\n <%= formattedValue %>\n <% } else { %>\n <%= NULL_VALUE %>\n <% } %>\n\n \n <% } else if (field === \'url\') { %>\n <% if (value !== null) { %>\n \n <%= Icons.icon(\'ExternalLink\') %>\n <%= value %>\n \n <% } else { %>\n <%= NULL_VALUE %>\n <% } %>\n <% } %>\n<% } %>\n',n.export_dialogue_footer='<% if (linkToFile) { %>\n
              \n <%- Messages.getText(\'export.cloud.FileLocation\', {cloud: dest}) %>\n <%- linkToFile %>\n
              \n<% } %>\n\n\n\n<% if (dest === \'download\') { %>\n \n <%= Icons.icon(primaryIcon) %>\n <%- primaryAction %>\n \n<% } else { %>\n \n<% } %>\n\n',n.progress_bar='<% /* requires: doneness (float: 0 <= i <= 1) */ %>\n<% if (doneness != null && doneness >= 0) { %>\n
              \n
              \n <% if (doneness < 1) { %>\n \n <%- Math.round(100 * doneness) %>% <%- Messages.getText(\'Complete\') %>\n \n <% } %>\n
              \n
              \n<% } %>\n',n.list_dialogue_body='
              \n\n
              \n
              \n

              \n <%= Icons.icon(\'Options\') %>\n <%- Messages.getText(\'lists.ShowExtraOptions\', state) %>\n

              \n
              \n
              \n\n
              \n
              \n\n
              \n
              \n
              \n
              \n
              \n
              \n
              \n
              \n
              \n
              \n
              \n
              \n
              \n',n.column_manager_path_name='<% /* requires parts */ %>\n\n <% _.each(parts, function (part) { %>\n <%- part %>\n <% }); %>\n\n\n',n.select='\n',n.list_tags_apology="<% if (!hasTags) { %>\n \n <%- Messages.getText('lists.NoTags') %>\n \n<% } %>\n",n.export_destination_options='
              \n \n
              \n \n
              \n \n \n
              \n
              \n
              \n\n<% if (format && format.desc) { %>\n
              \n <%- Messages.getText(format.desc) %>\n
              \n<% } %>\n\n
              \n
              \n
              \n
              \n
              \n
              \n',n.column_name_popover='<% _.each(parts, function (part) { %>\n <%- part %>\n<% }); %>\n',n.export_json_options="

              <%- Messages.getText('export.category.Options') %>

              \n\n
              \n \n
              \n\n
              \n \n
              \n\n<% if ((size || start) && jsonFormat === 'objects') { %>\n
              \n

              <%- Messages.get('Warning') %>

              \n

              <%- Messages.get('export.json.ObjWarning') %>

              \n
              \n<% } %>\n\n",n.export_row_controls='

              \n\n
              \n \n \n
              \n\n
              \n \n \n
              \n\n
              \n
              \n',n.add_value_control='
              \n
              \n
              \n
              \n \n \n \n \n
              \n',n.constraint_adder='
              \n
              \n
              \n',n.summary_stats='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
              <%- Messages.getText(\'summary.Max\') %><%- Messages.getText(\'summary.Min\') %><%- Messages.getText(\'summary.Average\') %><%- Messages.getText(\'summary.StdDev\') %>
              <%- Messages.getText(\'Number\', {n: max}) %><%- Messages.getText(\'Number\', {n: min}) %><%- Messages.getText(\'Number\', {n: average}) %><%- Messages.getText(\'Number\', {n: stdev}) %>
              \n\n
              \n
              \n \n
              \n
              \n ...\n
              \n
              \n \n
              \n
              \n
              \n \n \n
              \n
              \n
              \n\n
              \n\n',n.undo_history_step='<% if (!state.current) { %>\n \n<% } %>\n\n

              \n <%- Messages.getText(\'undo.StepTitle\', title) %>\n

              \n\n<% if (state.current) { %>\n <%- Messages.getText(\'undo.IsCurrentState\') %>\n<% } %>\n
              \n\n\n <%- Messages.getText(\'undo.Revision\', {v: revision}) %>\n\n\n
              \n <%- Messages.getText(\'undo.StepCount\', {count: count}) %>\n <% if (diff) { %>\n \n <% if (diff > 0) { %>+<% } %><%- numToString(diff) %>\n \n <% } %>\n
              \n\n
              \n\n
              \n',n.column_manager_select_list='
              \n \n\n

              \n <%- Messages.getText(\'columns.ColumnsSelected\', {columns: collection, removed: hasRubbish}) %>\n

              \n\n <%- Messages.getText(\'columns.CurrentViewHelp\') %>\n\n
              \n\n
              \n\n
              \n
                \n
              \n
              \n\n
              \n
              \n <%= Icons.icon((hasRubbish ? \'RubbishFull\' : \'Rubbish\'), \'lg\') %>\n <% if (hasRubbish) { %>\n
                \n
              \n <% } %>\n
              \n
              \n\n
              \n
              \n
              \n\n
              \n
              \n\n',n.table_subtable_summary="<% if (rows.length) { %>\n <%= Icons.icon('Table') %>\n<% } else { %>\n <%= Icons.icon('EmptyTable') %>\n<% } %>\n<%- rows.length %>\n<%- pluralise(contentName, rows.length) %>\n",n.summary_selected_count="<% if (state.selectedCount) { %>\n
              \n \n <%- Messages.getText('summary.SelectedCount', state) %>\n \n
              \n<% } %>\n",n.boolean_value_controls="\n\n",n.active_progress_bar='
              \n
              \n
              \n',n.table_throbber='\n \n

              <%- Messages.getText(\'table.RequestingData\') %>

              \n
              \n
              \n
              \n \n\n'},{underscore:257}],68:[function(t,e,i){(function(){var h,p,n,o;p=t("underscore"),h=t("../options"),n=t("pluralize"),o=p.template('\n',{variable:"data"}),i.select=function(t,e,n,i,r){return null==e&&(e=function(){return!1}),null==n&&(n=""),null==i&&(i=null),null==r&&(r=function(t){return null!=t?t.value:void 0}),o({options:t,selectedTest:e,classes:n,contentHandler:i,key:r})},i.pluralise=function(t,e){return null!=t?n(t,e):t},i.numToString=function(t){var e,n,i,r,o,s,a,l,u,c;if(!(null!=t?t.toFixed:void 0))return t;if(u=h.get("NUM_SEPARATOR"),n=h.get("NUM_CHUNK_SIZE"),l=[],o=0,-1$/.test(a)||(a+=">"),/^/.test(a),o=!(/\/>$/.test(a)||!r&&/<\/\w+>$/.test(a)||r),r&&i--,e.push(new Array(i).join(" ")+a),o&&i++;return e.join("\n")}}).call(this)},{}],89:[function(t,e,n){(function(){var a=[].indexOf||function(t){for(var e=0,n=this.length;en&&(this.tooMany=s({icons:i,messages:r,extra:total-n}))}a=n("underscore"),o=n("../options"),r=n("../messages"),i=n("../icons"),t=n("../templates/mustache-settings"),s=a.template("\n {{{ icons.icon('Info') }}}\n {{ messages.getText('conbuilder.TooManySuggestions') }}\n There are {{ extra }} values we could not include.\n\n",t),l.exports=(e.prototype.tooMany="",e.prototype.suggest=function(t,e){var r,n,i,o,s;return null==t||""===t?e(function(){var t,e,n,i;for(i=[],t=0,e=(n=this.suggestions.slice(0,10)).length;t=this.offset&&t.end()<=n)},e.prototype.dropRows=function(){return this.rows=null,this.offset=0},e.prototype.getRequestPage=function(t){var e,n,i,r,o,s,a,l;return e=this.rows,n=u.get("TableResults.CacheFactor"),r=u.get("TableResults.RequestLimit"),s=t.all()?t.size:t.size*n,null==e?new c(t.start,s):(l=this.offset+e.length,a=t.all()||t.start>=this.offset?t.start:Math.max(0,t.start-s),(o=new c(a,s)).isBefore(this.offset)?(i=o.rightGap(this.offset))+o.size>r?this.dropRows():o.size+=i:o.isAfter(l)&&((i=o.leftGap(l))+o.size>r?this.dropRows():(o.size+=i,o.start=l)),o)},e.prototype.addRowsToCache=function(r){return o=this,function(t){var e,n,i;if(e=o.rows,n=o.offset,null!=e){if(i=o.offset+e.length,r.starti?t.slice():t.concat(e.slice(r.end()-n))}else{if(r.start>i)throw new Error("Cannot add "+r+" to "+o+" - non contiguous");r.all()||i. You might want to remove this constraint"}),S.exports=(function(t,e){for(var n in e)w.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(C,t),C.include(e),C.prototype.className="im-attribute-value-controls",C.prototype.template=a.template("attribute_value_controls"),C.prototype.getData=function(){return u.extend(this.getBaseData(),{messages:o,con:this.model.toJSON()})},C.prototype.initialize=function(t){var e,n;if(this.query=t.query,C.__super__.initialize.apply(this,arguments),this.sliders=[],this.branding=new r,this.cast=(e=this.model.get("path").getType(),0<=x.call(i,e)?m:b),this.listenTo(o,"change",this.reRender),this.state.set({valuePlaceholder:o.getText("conbuilder.ValuePlaceholder")}),this.listenTo(this.branding,"change:defaults.value",function(){return this.state.set({valuePlaceholder:this.branding.get("defaults.value")})}),null!=this.query)return this.listenTo(this.query,"change:constraints",this.clearCachedData),this.listenTo(this.query,"change:constraints",this.reRender),d(this.query.service).then((n=this,function(t){return n.branding.set(t)}))},C.prototype.modelEvents=function(){return{destroy:function(){return this.stopListening()},"change:value":this.onChangeValue,"change:op":this.onChangeOp}},C.prototype.stateEvents=function(){return{"change:valuePlaceholder":this.reRender}},C.prototype.onChangeOp=function(){var t;return t=this.model.get("op"),null!=this.model.get("value")&&0<=x.call(s.MULTIVALUE_OPS,t)&&this.model.set({value:null,values:[this.model.get("value")]}),this.reRender()},C.prototype.onChangeValue=function(){return this.reRender()},C.prototype.removeAllChildren=function(){return this.removeTypeAheads(),this.removeSliders(),C.__super__.removeAllChildren.apply(this,arguments)},C.prototype.removeSliders=function(){var t,e;for(t=[];e=this.sliders.pop();)try{e.slider("destroy"),t.push(e.remove())}catch(t){}return t},C.prototype.events=function(){return{"change .im-con-value-attr":"setAttributeValue"}},C.prototype.updateInput=function(){var t;return(null!=(t=this.lastTypeahead())?t:this.$(".im-con-value-attr")).val(this.model.get("value"))},C.prototype.readAttrValue=function(){var e,t;e=(null!=(t=this.lastTypeahead())?t:this.$(".im-con-value-attr")).val();try{return null==e||n.test(e)?null:this.cast(e)}catch(t){return this.model.set({error:new Error(e+" might not be a legal value for "+this.path)}),e}},C.prototype.setAttributeValue=function(){return this.model.set({value:this.readAttrValue()})},C.prototype.postRender=function(){var e;return this.provideSuggestions().then(null,(e=this,function(t){return e.model.set({error:t})})),this.$(".im-con-value-attr").focus()},C.prototype.provideSuggestions=function(){return this.getSuggestions().then((r=this,function(t){var e,n,i;return i=t.stats,n=t.results,0===i.uniqueValues?(e=o.getText("constraintvalue.NoValues"),r.model.set({error:{message:e,level:"warning"}})):1===i.uniqueValues?(e=o.getText("constraintvalue.OneValue",{value:n[0].item}),r.model.set({error:{message:e,level:"warning"}})):null!=i.max?r.handleNumericSummary(i):null!=n[0].item?r.handleSummary(n,i.uniqueValues):void 0}));var r},C.prototype.clearCachedData=function(){return delete this.__suggestions,this.model.unset("error")},C.prototype.getSuggestions=function(){return null!=this.__suggestions?this.__suggestions:this.__suggestions=(e=this,function(){var r,o,t,s,a;return e.model.get("path")?(o=e.query.clone(),a=e.model.get("value"),s=String(e.model.get("path")),t=c.get("MaxSuggestions"),o.constraints=function(){var t,e,n,i;for(i=[],t=0,e=(n=o.constraints).length;t\n True\n\n\n",n),i.prototype.events=function(){return{"click .im-true":"setValueTrue","click .im-false":"setValueFalse"}},i.prototype.setValueTrue=function(){return this.model.set({value:!0})},i.prototype.setValueFalse=function(){return this.model.set({value:!1})},i)}).call(this)},{"../core-view":3,"../messages":16,"../options":63,"../templates/mustache-settings":69,underscore:257}],113:[function(h,p,t){(function(){function t(t,e){for(var n in e)l.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t}var e,n,i,r,o,s,a,l={}.hasOwnProperty;function u(){return u.__super__.constructor.apply(this,arguments)}function c(){return c.__super__.constructor.apply(this,arguments)}a=h("underscore"),n=h("../core-view"),h("../messages"),o=h("../options"),s=h("../templates"),e=h("../models/code-gen"),i=h("./code-gen-dialogue"),h("../messages/code-gen"),t(u,n),u.prototype.modelEvents=function(){return{"change:lang":this.reRender}},u.prototype.template=s.template("code-gen-button-main"),r=u,p.exports=(t(c,n),c.prototype.parameters=["query","tableState"],c.prototype.Model=e,c.prototype.template=s.template("code-gen-button"),c.prototype.getData=function(){return a.extend(c.__super__.getData.apply(this,arguments),{options:o.get("CodeGen")})},c.prototype.renderChildren=function(){return this.renderChildAt(".im-show-code-gen-dialogue",new r({model:this.model}))},c.prototype.events=function(){return{"click .dropdown-menu.im-code-gen-langs li":"chooseLang","click .im-show-code-gen-dialogue":"showDialogue"}},c.prototype.chooseLang=function(t){var e;return e=this.$(t.target).closest("li").data("lang"),this.model.set({lang:e}),this.showDialogue()},c.prototype.showDialogue=function(){var t,e;return e=this.tableState.pick("start","size"),t=new i({query:this.query,model:this.model,page:e}),this.renderChild("dialogue",t),t.show()},c)}).call(this)},{"../core-view":3,"../messages":16,"../messages/code-gen":18,"../models/code-gen":38,"../options":63,"../templates":67,"./code-gen-dialogue":114,underscore:257}],114:[function(T,S,t){(function(C){(function(){var i,t,e,n,r,o,s,a,l,u,c,h,p,f,d,g,m,y,v,_,b=[].indexOf||function(t){for(var e=0,n=this.length;e=e}),n=this.collection.last(),i=0,r=l.length;i ")).length?(4<=n.length?c.call(n,0,e=n.length-3):(e=0,[]),"..."+n[e++]+" > "+n[e++]+" > "+n[e++]):t},d.exports=(function(t,e){for(var n in e)h.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(p,r),p.include(t),p.prototype.className="row",p.prototype.initialize=function(t){return this.query=t.query,this.openNodes=t.openNodes,this.chosenPaths=t.chosenPaths,p.__super__.initialize.apply(this,arguments),this.state.set({chosen:[]}),this.listenTo(this.openNodes,"add remove reset",this.reRender),this.listenTo(this.chosenPaths,"add remove reset",this.reRender),this.listenTo(this.chosenPaths,"add remove reset",this.setChosen),this.setChosen(),this.generatePathSuggestions()},p.prototype.modelEvents=function(){return{destroy:this.stopListeningTo,"change:showTree change:allowRevRefs":this.reRender}},p.prototype.stateEvents=function(){return{"change:chosen change:suggestions":this.reRender}},p.prototype.pathAcceptable=function(t){var e;return"id"!==(null!=(e=t.end)?e.name:void 0)&&(!!this.model.get("canSelectReferences")||t.isAttribute())},p.prototype.generatePathSuggestions=function(){var t,e;return t=i.get("SuggestionDepth"),a(this.query,t).then((e=this,function(t){return e.state.set({suggestions:t.filter(function(t){return e.pathAcceptable(t.path)})})}))},p.prototype.getData=function(){var t,e;return e=this.openNodes.size(),t=this.chosenPaths.size(),s.extend({anyNodesOpen:e,anyNodeChosen:t},this.state.toJSON(),p.__super__.getData.apply(this,arguments))},p.prototype.template=e.template("constraint_adder_options"),p.prototype.render=function(){return p.__super__.render.apply(this,arguments),this.state.has("suggestions")&&this.installTypeahead(),this},p.prototype.installTypeahead=function(){var t,e,n,i,r;return this.removeTypeAheads(),e=this.$(".im-tree-filter"),i=this.state.get("suggestions"),n={minLength:3,highlight:!0},t={name:"path_suggestions",source:l(i),displayKey:"name"},this.activateTypeahead(e,n,t,i[0].name,(r=this,function(t,e){var n;return n=e.path,r.openNodes.add(n),r.model.get("multiSelect")?r.chosenPaths.add(n):r.chosenPaths.reset([n])}))},p.prototype.events=function(){return{"click .im-collapser":"collapseBranches","change .im-allow-rev-ref":"toggleReverseRefs","change .im-tree-filter":"setFilter","click .im-choose":"toggleShowTree","click .im-approve":"triggerApproval","click .im-clear-filter":"clearFilter"}},p.prototype.triggerApproval=function(){return this.model.trigger("approved")},p.prototype.remove=function(){return this.removeTypeAheads(),p.__super__.remove.apply(this,arguments)},p.prototype.clearFilter=function(){return this.model.set({filter:null}),this.reRender()},p.prototype.setFilter=function(t){var e;return e=t.target.value,this.model.set({filter:n.test(e)?null:e})},p.prototype.collapseBranches=function(){return this.openNodes.reset()},p.prototype.toggleShowTree=function(){return this.model.toggle("showTree")},p.prototype.toggleReverseRefs=function(){return this.model.toggle("allowRevRefs")},p.prototype.setConstraint=function(){return this.model.trigger("approved")},p.prototype.setChosen=function(){var i,r,e;return r=this.chosenPaths.toJSON(),o.all(function(){var t,e,n;for(n=[],t=0,e=r.length;t\n \n <% if (data.con.op) { %>\n
              \n \n
              \n <% } %>\n
              \n
              \n\n\n
              \n <% data.buttons.forEach(function (b, i) { %>\n \n <% }); %>\n
              \n',{variable:"data"}),x=function(t){var e,n;if(!(null!=(e=t.path)?e.isReference:void 0))throw new Error("No path or wrong type");return e.isRoot()&&v.concat(y.RANGE_OPS),e.isReference()?v.concat(y.RANGE_OPS).concat(t.new?["ISA"]:[]):(n=e.getType(),0<=T.call(o,n)?["=","!="].concat(m):i)},N.exports=(function(t,e){for(var n in e)S.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(k,n),k.prototype.tagName="div",k.prototype.className="form",k.prototype.parameters=["query","model"],k.prototype.optionalParameters=["buttonDelegate"],k.prototype.initialize=function(){return k.__super__.initialize.apply(this,arguments),this.path=this.model.get("path")},k.prototype.invariants=function(){return{modelHasPath:"No path found on model"}},k.prototype.modelHasPath=function(){return this.model.get("path")},k.prototype.getType=function(){return this.model.get("path").getType()},k.prototype.modelEvents=function(){return{"change:op change:displayName":this.reRender,destroy:this.stopListening}},k.prototype.events=function(){return{submit:function(t){return t.preventDefault(),t.stopPropagation()},"click .btn-cancel":"cancelEditing","click .btn-primary":"applyChanges","change .im-ops":"setOperator"}},k.prototype.delegateButtonEvents=function(){var t,e;return this.buttonDelegate.off("click.constraint-editor"),this.buttonDelegate.on("click.constraint-editor",".btn-cancel",(t=this,function(){return t.cancelEditing()})),this.buttonDelegate.on("click.constraint-editor",".btn-primary",(e=this,function(){return e.applyChanges()}))},k.prototype.setOperator=function(){return this.model.set({op:this.$(".im-ops").val()})},k.prototype.cancelEditing=function(){return this.model.trigger("cancel")},k.prototype.applyChanges=function(t){return null!=t&&t.preventDefault(),null!=t&&t.stopPropagation(),this.model.trigger("apply",this.getConstraint())},k.prototype.getConstraint=function(){var t,e,n;return e=(t=this.model.pick(["path","op","value","values","code","type"])).op,0<=T.call(p.concat(m),e)&&delete t.value,n=t.op,0<=T.call(r.concat(m),n)&&delete t.values,"ISA"===t.op&&delete t.op,t},k.prototype.getValueControls=function(){return null==this.path?null:this.isNullConstraint()?null:this.isTypeConstraint()?new b({model:this.model,query:this.query}):this.isMultiValueConstraint()?new g({model:this.model,query:this.query}):this.isListConstraint()?new u({model:this.model,query:this.query}):this.isBooleanConstraint()?new e({model:this.model,query:this.query}):this.isLoopConstraint()?new h({model:this.model,query:this.query}):this.isLookupConstraint()?new c({model:this.model,query:this.query}):this.isRangeConstraint()?new g({model:this.model,query:this.query}):this.path.isAttribute()?new t({model:this.model,query:this.query}):(this.model.set({error:new Error("cannot handle this constaint type")}),null)},k.prototype.isNullConstraint=function(){var t;return t=this.model.get("op"),0<=T.call(m,t)},k.prototype.isLoopConstraint=function(){var t;return this.path.isClass()&&("="===(t=this.model.get("op"))||"!="===t)},k.prototype.isTypeConstraint=function(){return this.path.isReference()&&(!this.model.get("op")||"ISA"===this.model.get("op"))},k.prototype.isBooleanConstraint=function(){var t,e;return t=this.path.getType(),0<=T.call(o,t)&&(e=this.model.get("op"),!(0<=T.call(m,e)))},k.prototype.isMultiValueConstraint=function(){var t;return this.path.isAttribute()&&(t=this.model.get("op"),0<=T.call(p,t))},k.prototype.isListConstraint=function(){var t;return this.path.isClass()&&(t=this.model.get("op"),0<=T.call(l,t))},k.prototype.isLookupConstraint=function(){var t;return this.path.isClass()&&(t=this.model.get("op"),0<=T.call(y.TERNARY_OPS,t))},k.prototype.isRangeConstraint=function(){var t;return this.path.isReference()&&(t=this.model.get("op"),0<=T.call(y.RANGE_OPS,t))},k.prototype.getOtherOperators=function(){return w.without(x(this.model.pick("new","path")),this.model.get("op"))},k.prototype.buttons=function(){var t;return null!=this.buttonDelegate?[]:(t=[{key:"conbuilder.Update",classes:"im-update"},{key:"conbuilder.Cancel",classes:"btn-cancel"}],this.model.get("new")?(t[0].key="conbuilder.Add",t[1].classes="im-remove-constraint"):t.push({key:"conbuilder.Remove",classes:"btn btn-default im-remove-constraint"}),t)},k.prototype.getData=function(){var t;return{buttons:this.buttons(),icons:t=a,messages:f,icons:t,otherOperators:this.getOtherOperators(),con:this.model.toJSON()}},k.prototype.template=_,k.prototype.render=function(){return k.__super__.render.apply(this,arguments),this.renderChild("valuecontrols",this.getValueControls(),this.$(".im-value-options")),this.renderChild("error",new s({model:this.model})),null!=this.buttonDelegate&&this.delegateButtonEvents(),this},k.prototype.remove=function(){var t,e;return null!=(t=this.buttonDelegate)&&t.off("click.constraint-editor"),this.$el.slideUp({always:(e=this,function(){return k.__super__.remove.call(e)})})},k)}).call(this)},{"../core-view":3,"../icons":14,"../messages":16,"./attribute-value-controls":111,"./boolean-value-controls":112,"./error-message":135,"./list-value-controls":191,"./lookup-value-controls":192,"./loop-value-controls":193,"./multi-value-controls":196,"./type-value-controls":226,imjs:250,underscore:257}],128:[function(h,p,t){(function(){var t,o,e,s,n,i,r,a={}.hasOwnProperty,l=[].indexOf||function(t){for(var e=0,n=this.length;e\n<%- Messages.getText(\'constraints.OtherPaths\') %>'),a.prototype.events=function(){return{click:function(){return this.state.toggle("open")}}},s=a,t(l,h),l.prototype.tagName="li",l.prototype.className="",l.prototype.template=function(){return""+l.__super__.template.apply(this,arguments)+""},f=l,m.exports=(t(u,e),u.prototype.parameters=["query","paths"],u.prototype.onChosen=function(t){return this.model.set({constraint:{path:t}})},u.prototype.renderOptions=function(){},u.prototype.showTree=function(){var t,e,n,i,r,o,s,a,l,u,c;for(s=(u=this.paths)[0],l=2<=u.length?g.call(u,1):[],r=new h({hideType:!0,model:new d(s)}),o=function(){var t,e,n;for(n=[],t=0,e=l.length;te&&(i=t.get("item").toString(),n=function(){var t,e,n;for(n=[],t=0,e=s.length;t=this.chartWidth?this.removeSelection():(null==this.selection&&(this.selection=this.getCanvas().append("svg:rect").attr("y",0).attr("height",.9*this.chartHeight).classed("rubberband-selection",!0)),this.selection.attr("x",t).attr("width",e))},e.prototype.onChangeRange=function(){var t,e,n,i,r,o;return this.shouldDrawBox()?(i=this.getScales(),e=(n=this.range.toJSON()).min,t=n.max,r=i.valToX(e),o=i.valToX(t)-r,this.drawSelection(r,o)):this.removeSelection()},e.prototype.removeSelection=function(){var t;return null!=(t=this.selection)&&t.remove(),this.selection=null},e.prototype.shouldDrawBox=function(){return this.range.isNotAll()},e.prototype.remove=function(){var t;return this.removeSelection(),null!=(t=this.paper)&&t.remove(),e.__super__.remove.apply(this,arguments)},e)}).call(this)},{"../../messages":16,"../../messages/summary":27,"../../options":63,"./visualisation-base":163,"d3-browserify":247,jquery:252,underscore:257}],154:[function(i,o,t){(function(){var t,e,r={}.hasOwnProperty;function n(){return n.__super__.constructor.apply(this,arguments)}t=i("../../core-view"),e=i("../../templates"),o.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(n,t),n.prototype.className="im-only-one",n.prototype.modelEvents=function(){return{change:this.reRender}},n.prototype.stateEvents=function(){return{change:this.reRender}},n.prototype.template=e.template("only_one_item"),n)}).call(this)},{"../../core-view":3,"../../templates":67}],155:[function(y,v,t){(function(){var s,r,o,a,n,t,i,u,l,c,e,h,p,f,d,g={}.hasOwnProperty;function m(){return m.__super__.constructor.apply(this,arguments)}i=y("underscore"),s=y("jquery"),u=y("d3-browserify"),a=y("../../options"),t=y("./visualisation-base"),o=function(t){return t.data.get("id")},r=u.layout.pie().value(function(t){return t.get("count")}),n={startAngle:0,endAngle:0},e=function(){var t,e;return t=a.get("PieColors"),e=i.isFunction(t)?t:u.scale[t](),function(t){return e(t.data.get("id"))}},p=function(t){var e;return null!=(e=t.get("currentPieCoords"))?e:n},d=function(t){return t.data.get("visible")?1:.25},h=function(t,e,n){return{startAngle:t,endAngle:e,selected:n.get("selected")?1:0}},c=function(l){return function(t){var e,n,i,r,o,s,a;return a=t.startAngle,i=t.endAngle,e=t.data,s=p(o=e),n=h(a,i,o),r=u.interpolateObject(s,n),o.set({currentPieCoords:r(1)}),function(t){return l(r(t))}}},f=function(t){return(t.endAngle+t.startAngle)/2>Math.PI},l=function(e,n,i){return u.svg.arc().startAngle(function(t){return t.startAngle}).endAngle(function(t){return t.endAngle}).innerRadius(function(t){return n+t.selected*i}).outerRadius(function(t){return e+t.selected*i})},v.exports=(function(t,e){for(var n in e)g.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(m,t),m.prototype.chartWidth=120,m.prototype.chartHeight=120,m.prototype.className="im-pie-chart",m.prototype.initialize=function(){return m.__super__.initialize.apply(this,arguments),this.listenTo(this.model.items,"change:selected change:visible",this.update),this.listenTo(a,"change:PieColors",this.onChangePalette),this.onChangePalette()},m.prototype.onChangePalette=function(){return this.colour=e(),this.update()},m.prototype._drawD3Chart=function(){var t,e,n,i,r,o,s;return n=this.chartHeight,s=this.$el.closest(":visible").width(),r=.4*n,i=.1*n,o=.08*n,e=u.select(this.el).append("svg").attr("class","chart").attr("height",n).attr("width",s),this.arc=l(r,i,o),this.arc_group=e.append("svg:g").attr("class","arc").attr("transform","translate("+s/2+","+n/2+")"),t=e.append("svg:g").attr("class","center_group").attr("transform","translate("+s/2+","+n/2+")"),e.append("svg:g").attr("class","label_group").attr("transform","translate("+s/2+","+n/2+")"),t.append("svg:circle").attr("fill","white").attr("r",i),this.update()},m.prototype.enter=function(t){var e,r,o,n;return r=this.el,n=this.model.items.reduce(function(t,e){return t+e.get("count")},0),o=function(t){return(t.data.get("count")/n*100).toFixed(1)},e=function(t){var e,n,i;return e=s(this),i=t.data.get("item")+": "+o(t)+"%",n=f(t)?"left":"right",e.tooltip({title:i,placement:n,container:r})},t.append("svg:path").attr("class","donut-arc").on("click",function(t){return t.data.toggle("selected")}).on("mouseover",function(t){return t.data.mousein()}).on("mouseout",function(t){return t.data.mouseout()}).each(e)},m.prototype.exit=function(t){return t.remove()},m.prototype.getChartData=function(){return this.model.items.models.slice()},m.prototype.update=function(){var t,e,n,i;if(null!=this.arc_group)return n=this.arc_group.selectAll("path").data(r(this.getChartData()),o),this.exit(n.exit()),this.enter(n.enter()),t=(i=a.get("D3.Transition")).DurationShort,e=i.Easing,n.attr("fill",this.colour),n.transition().duration(t).ease(e).style("opacity",d).attrTween("d",c(this.arc))},m)}).call(this)},{"../../options":63,"./visualisation-base":163,"d3-browserify":247,jquery:252,underscore:257}],156:[function(o,s,t){(function(){var t,e,n,r={}.hasOwnProperty;function i(){return i.__super__.constructor.apply(this,arguments)}n=o("underscore"),t=o("../../core-view"),e=o("../../templates"),s.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(i,t),i.prototype.className="im-facet-surrogate",i.prototype.initialize=function(t){return this.above=t.above,i.__super__.initialize.apply(this,arguments)},i.prototype.template=e.template("row_surrogate"),i.prototype.getData=function(){return n.extend(i.__super__.getData.apply(this,arguments),{above:this.above})},i.prototype.postRender=function(){return this.$el.addClass(this.above?"above":"below")},i.prototype.remove=function(){return this.$el.fadeOut("fast",(t=this,function(){return i.__super__.remove.call(t)}));var t},i)}).call(this)},{"../../core-view":3,"../../templates":67,underscore:257}],157:[function(l,u,t){(function(){var t,e,r,n,o,i,s={}.hasOwnProperty;function a(){return a.__super__.constructor.apply(this,arguments)}o=l("underscore"),e=l("../../core-view"),n=l("../../templates"),t=l("../../core/checkbox"),r=l("./row-surrogate"),l("../../messages/summary"),i=function(t){return!!t},u.exports=(function(t,e){for(var n in e)s.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(a,e),a.prototype.RERENDER_EVENT="change:count change:item change:symbol change:share",a.prototype.tagName="tr",a.prototype.className="im-facet-row",a.prototype.modelEvents=function(){return{"change:visible":this.onChangeVisibility,"change:hover":this.onChangeHover,"change:selected":this.onChangeSelected}},a.prototype.invariants=function(){return{modelHasCollection:"No collection on model"}},a.prototype.modelHasCollection=function(){var t;return null!=(null!=(t=this.model)?t.collection:void 0)},a.prototype.template=n.template("facet_row"),a.prototype.getData=function(){var t,e,n,i;return t=this.model.collection.getMaxCount(),e=((i=this.model.get("count")/t)/2+.5).toFixed(),n=(100*i).toFixed(),o.extend(a.__super__.getData.apply(this,arguments),{percent:n,opacity:e,max:t})},a.prototype.onRenderError=function(t){return console.error(t)},a.prototype.postRender=function(){return this.addCheckbox(),this.onChangeVisibility(),this.onChangeHover(),this.onChangeSelected()},a.prototype.addCheckbox=function(){return this.renderChildAt(".checkbox",new t({model:this.model,attr:"selected"}))},a.prototype.onChangeVisibility=function(){return this.$el.toggleClass("im-hidden",!this.model.get("visible"))},a.prototype.onChangeHover=function(){var t;return t=i(this.model.get("hover")),this.$el.toggleClass("hover",t),t?this.showSurrogateUnlessVisible():this.removeSurrogate()},a.prototype.onChangeSelected=function(){return this.$el.toggleClass("im-selected",this.model.get("selected"))},a.prototype.removeSurrogate=function(){return this.removeChild("surrogate")},a.prototype.showSurrogateUnlessVisible=function(){var t,e,n,i;if(this.removeSurrogate(),!this.isVisible())return e=this.isAbove(),t=(n=new r({model:this.model,above:e})).$el,i=this.getTable(),this.renderChild("surrogate",n,i),e?t.css({top:i.scrollTop()}):t.css({bottom:0-i.scrollTop()})},a.prototype.getTable=function(){return this.$el.closest(".im-item-table")},a.prototype.events=function(){return{click:"handleClick"}},a.prototype.handleClick=function(t){return t.stopPropagation(),this.model.toggle("selected")},a.prototype.isBelow=function(){var t;return t=this.getTable(),this.$el.offset().top+this.$el.outerHeight()>t.offset().top+t.outerHeight()},a.prototype.isAbove=function(){var t;return t=this.getTable(),this.$el.offset().top=e&&t.max<=n}},l=function(e,n){return function(t){return t.mine||t.max>n&&t.mini.length?this.constrainTo(l(t),function(){var t,e,n;for(n=[],t=0,e=i.length;t=",value:this.range.get("min")},{path:s,op:"<=",value:this.range.get("max")}],i=0,r=n.length;i\s*/,l.exports=(function(t,e){for(var n in e)s.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(i,t),i.prototype.tagName="li",i.prototype.className="im-formatted-path im-subpath",i.prototype.parameters=["query","path"],i.prototype.stateEvents=function(){return{change:this.reRender}},i.prototype.getData=function(){var t,e,n,i;return e=null!=(i=(n=this.state.toJSON())[this.path])?i.replace(n.group,"").replace(r,""):void 0,t=this.query.getSortDirection(this.path),{Icons:o,name:e,direction:t}},i.prototype.template=e.template("formatted_sorting"),i.prototype.events=function(){return{click:"sortByPath"}},i.prototype.sortByPath=function(){return n(this.query,this.path)},i)}).call(this)},{"../../core-view":3,"../../icons":14,"../../templates":67,"../../utils/sort-query-by-path":103}],169:[function(t,e,n){(function(){n.openDialogue=function(t){return this.renderChild("__dialogue__",t),t.show()},n.getDialogue=function(){var t;return null!=(t=this.children)?t.__dialogue__:void 0}}).call(this)},{}],170:[function(O,I,t){(function(){function t(t,e){for(var n in e)S.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t}var u,e,c,n,i,h,r,o,s,p,a,l,f,d,g,m,y,v,_,b,w,x,C,T,S={}.hasOwnProperty,k=[].indexOf||function(t){for(var e=0,n=this.length;er&&(-1===(a=l.indexOf(" ",.9*r))&&(a=r),o.tooLong=!0,o.valueOverspill=l.substring(a),o.value=l.substring(0,a))),this.fieldDetails.add(new u(o))},P.prototype.getRelationCounts=function(){var o,s,a,t,e,l,u;return T=this.model.get("types"),e=this.service.root,a=null!=(t=p.get(["ItemDetails","Count",e]))?t:{},function(){var t,e,n;for(n=[],t=0,e=T.length;t is of the wrong type (<%- type %>).","convalue.EmptyList":"<%- name %> is empty. This query will always return 0 results","convalue.BadList":'You do not have access to list called "<%- name %>". Choose one from the list.'}),s=h("../templates/helpers"),h("../templates/mustache-settings"),a=i.template("<% if (suitableLists.length) { %>\n <%= select(suitableLists, isSelected, 'span7 im-value-options im-con-value im-con-value-list form-control', formatList, getOptionValue) %>\n<% } else { %>\n <%- messages.getText('conbuilder.NoSuitableLists') %>\n<% } %>\n"),o=function(t){return t.name},e=function(t){return t.size?t.name+" ("+t.size+" "+t.typeName+"s)":t.name},l=function(t){return function(e){return t.makePath(e.type).getDisplayName().then(function(t){return i.extend(e,{typeName:t})})}},p.exports=(function(t,e){for(var n in e)u.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(c,t),c.prototype.className="im-list-value-controls",c.prototype.initialize=function(t){return this.query=t.query,c.__super__.initialize.apply(this,arguments),this.initialValue=this.model.get("value"),this.path=this.model.get("path"),this.setSuitableLists(),this.listenTo(this.model,"change",this.reRender),this.listenTo(this.model,"change:value",this.checkCurrentValue),this.checkCurrentValue()},c.prototype.checkCurrentValue=function(){var t,e,n,i;return n=this.model.get("value"),t=function(t){return i.model.set({error:new Error(r.getText("convalue.BadList",{name:n}))}),i.listenToOnce(i.model,"change:value",function(){return i.model.unset("error")})},e=function(t){var e,n;if(null!=(e=t.size?this.path.isa(t.type)?void 0:"convalue.BadType":"convalue.EmptyList"))return this.model.set({error:new Error(r.getText(e,t))}),this.listenToOnce(this.model,"change:value",(n=this,function(){return n.model.unset("error")}))},(i=this).query.service.fetchList(n).then(e,t)},c.prototype.events=function(){return{"change select":"setList"}},c.prototype.setList=function(){return this.model.set({value:this.$("select").val()})},c.prototype.setSuitableLists=function(){var t,e,n,i;if(!this.model.has("suitableLists"))return e=function(t){return i.model.set({suitableLists:t})},t=function(t){return n.model.set({error:t})},(n=i=this).fetchSuitableLists().then(e,t)},c.prototype.fetchSuitableLists=function(){return null!=this.__suitable_lists?this.__suitable_lists:this.__suitable_lists=this.query.service.fetchLists().then((e=this,function(i){var r,t;return t=function(){var t,e,n;for(n=[],t=0,e=i.length;t\n <%- messages.getText(\'conbuilder.ExtraLabel\') %>\n \n\n\n'),l.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(o,t),o.prototype.initialize=function(){return o.__super__.initialize.apply(this,arguments),this.state.set({extraPlaceholder:e.get("conbuilder.ExtraPlaceholder")}),this.listenTo(this.branding,"change:defaults.extraValue.path",this.reRender),this.listenTo(this.branding,"change:defaults.extraValue.value",function(){return this.state.set({extraPlaceholder:this.branding.get("defaults.extraValue.value")})}),this.listenTo(this.model,"change",this.reRender)},o.prototype.stateEvents=function(){return n.extend(o.__super__.stateEvents.apply(this,arguments),{"change:extraPlaceholder":this.reRender})},o.prototype.template=function(t){return o.__super__.template.apply(this,arguments)+i(t)},o.prototype.events=function(){return{"change .im-con-value-attr":"setValue","change .im-extra-value":"setExtraValue"}},o.prototype.setExtraValue=function(){var t,e;return(t=this.$("input.im-extra-value.tt-input")).length||(t=this.$("input.im-extra-value")),(e=t.val())?this.model.set({extraValue:e}):this.model.unset("extraValue")},o.prototype.setValue=function(){var t,e;return(t=this.$("input.im-con-value.tt-input")).length||(t=this.$("input.im-con-value")),(e=t.val())?this.model.set({value:e}):this.model.unset("value")},o.prototype.setBoth=function(){return this.setValue(),this.setExtraValue()},o.prototype.suggestExtra=function(){var t,e,n,i,r;return e=this.branding.get("defaults.extraValue.path"),r=this.branding.get("defaults.extraValue.extraFor"),null!=e&&this.model.get("path").isa(r)?(i=this.model.get("path")+"."+e,n=null!=this.__extra_suggestions?this.__extra_suggestions:this.__extra_suggestions=this.query.summarise(i),t=this.handleSuggestionSet.bind(this,this.$("input.im-extra-value"),"extraValue"),n.then(function(t){return t.results}).then(t)):a.resolve(!0)},o.prototype.suggestValue=function(){var e,t,n,o,i,s;return o=this.model.get("path"),i=this.query.service,e=o.getEndClass().name,t=i.fetchClassKeys().then(function(t){return t[e]}),null==this.__value_suggestions&&(this.__value_suggestions=t.then((s=this,function(i){var r,t;return(null!=i?i.length:void 0)?(t=function(){var t,e,n;for(n=[],t=0,e=i.length;t\n <%= select(candidateLoops, isSelected, 'form-control im-value-options im-con-value') %>\n<% } else { %>\n <%- messages.getText('conbuilder.NoSuitableLoops') %>\n<% } %>\n"),a=function(t){var e,n;return n=t.path,e=t.name,{value:n.toString(),text:e}},h.exports=(function(t,e){for(var n in e)l.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(u,t),u.prototype.initialize=function(t){return this.query=t.query,u.__super__.initialize.apply(this,arguments),this.path=this.model.get("path"),this.type=this.path.getType(),this.setCandidateLoops(),this.listenTo(this.model,"change",this.reRender)},u.prototype.events=function(){return{"change select":"setLoop"}},u.prototype.setLoop=function(){return this.model.set({value:this.$("select").val()})},u.prototype.setCandidateLoops=function(){if(!this.model.has("candidateLoops"))return this.getCandidateLoops().then((e=this,function(t){return e.model.set({candidateLoops:t})}));var e},u.prototype.isSuitable=function(t){return(t.isa(this.type)||this.path.isa(t.getType()))&&this.path.toString()!==t.toString()},u.prototype.getCandidateLoops=function(){return null!=this.__candidate_loops?this.__candidate_loops:this.__candidate_loops=(e=this,function(){var t,r;return t=function(){var t,e,n,i;for(i=[],t=0,e=(n=this.query.getQueryNodes()).length;t/,""):void 0},a=function(t){return""+t+""},c.exports=(function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(l,t),l.prototype.tagName="li",l.prototype.events=function(){return{"click a":"handleClick"}},l.prototype.initialize=function(t){return this.chosenPaths=t.chosenPaths,this.view=t.view,this.query=t.query,this.path=t.path,this.trail=t.trail,l.__super__.initialize.apply(this,arguments),this.depth=this.trail.length+1,this.state.set({visible:!0,highlitName:null,name:this.path.toString()}),this.listenTo(this.chosenPaths,"add remove reset",this.handleChoice),this.listenTo(this.state,"change:visible",this.onChangeVisible),this.listenTo(this.state,"change:highlitName",this.render),this.listenTo(this.state,"change:displayName",this.render),this.path.getDisplayName().then((e=this,function(t){return e.state.set({displayName:t,name:r(t)})}));var e},l.prototype.onChangeVisible=function(){return this.$el.toggle(this.state.get("visible"))},l.prototype.getFilterPatterns=function(){var t,e,n,i,r,o;if(t=this.model.get("filter"),s(t)){for(r=[],e=0,n=(i=t.split(/\s+/)).length;e\n <%= icon %>\n \n <%= name %>\n \n'),l.prototype.render=function(){return l.__super__.render.apply(this,arguments),this.$el.toggleClass("disabled",this.getDisabled()),i.get("ShowId")&&this.$("a").tooltip({placement:"bottom"}),this.handleChoice(),null!=this.view&&this.$el.toggleClass("in-view",this.view.contains(this.path)),this},l)}).call(this)},{"../../core-view":3,"../../icons":14,"../../options":63,underscore:257}],201:[function(o,s,t){(function(){var t,e,n,r={}.hasOwnProperty;function i(){return i.__super__.constructor.apply(this,arguments)}e=o("../../icons"),t=o("./attribute"),n=o("../../utils/events").ignore,s.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(i,t),i.prototype.initialize=function(t){return this.openNodes=t.openNodes,this.createSubFinder=t.createSubFinder,i.__super__.initialize.apply(this,arguments),this.state.set({collapsed:!0}),this.listenTo(this.openNodes,"add remove",this.setCollapsed),this.listenTo(this.state,"change:collapsed",this.onChangeCollapsed),this.setCollapsed()},i.prototype.setCollapsed=function(){var t;return null!=(t=this.state)?t.set({collapsed:!this.openNodes.contains(this.path)}):void 0},i.prototype.handleClick=function(t){return n(t),this.$(t.target).is("i")||!this.model.get("canSelectReferences")?this.openNodes.togglePresence(this.path):i.__super__.handleClick.call(this,t)},i.prototype.getData=function(){var t;return(t=i.__super__.getData.apply(this,arguments)).icon=e.icon(this.state.get("collapsed")?"ClosedReference":"OpenReference"),t},i.prototype.postRender=function(){return this.onChangeCollapsed()},i.prototype.onChangeCollapsed=function(){var t,e;return this.state.get("collapsed")?this.removeChild("subfinder"):(e=this.trail.concat([this.path]),t=this.createSubFinder({trail:e}),this.renderChild("subfinder",t))},i)}).call(this)},{"../../icons":14,"../../utils/events":81,"./attribute":200}],202:[function(i,o,t){(function(){var e,t,r={}.hasOwnProperty;function n(){return n.__super__.constructor.apply(this,arguments)}e=i("../../icons"),t=i("./reference"),o.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(n,t),n.prototype.className="im-reverse-reference",n.prototype.getData=function(){var t;return(t=n.__super__.getData.apply(this,arguments)).icon+=" "+e.icon("ReverseRef"),t},n.prototype.handleClick=function(t){return t.preventDefault(),t.stopPropagation(),this.$el.tooltip("hide")},n.prototype.render=function(){return n.__super__.render.apply(this,arguments),this.$el.attr({title:"Refers back to "+this.path.getParent().getParent()}).tooltip(),this},n)}).call(this)},{"../../icons":14,"./reference":201}],203:[function(n,o,t){(function(){var t,e,a,r={}.hasOwnProperty;function i(){return i.__super__.constructor.apply(this,arguments)}a=n("underscore"),e=n("../../icons"),t=n("./attribute"),o.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(i,t),i.prototype.className="im-rootclass",i.prototype.initialize=function(t){var e;return e=t.cd,this.openNodes=t.openNodes,t.trail=[],t.path=t.query.getPathInfo(e.name),i.__super__.initialize.call(this,t)},i.prototype.getData=function(){return a.extend(i.__super__.getData.call(this),{icon:e.icon("RootClass")})},i.prototype.handleClick=function(t){var r,e,o,n,s;return null!=t&&t.preventDefault(),null!=t&&t.stopPropagation(),this.$(t.target).is("i")||!this.model.get("canSelectReferences")?this.openNodes.size()?this.openNodes.reset([]):(n=this.path.getType(),r=n.collections,s=n.references,e=function(){var t,e,n,i;for(i=[],t=0,e=(n=a.values(s).concat(a.values(r))).length;t
              '},g.exports=(function(t,e){for(var n in e)l.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(f,e),f.prototype.className="im-query-tools",f.prototype.parameters=["tableState","history","selectedObjects"],f.prototype.optionalParameters=["bus","consumerContainer","consumerBtnClass"],f.prototype.bus=new t,f.prototype.template=function(){return o.map(a).join("")},f.prototype.initialize=function(){return f.__super__.initialize.apply(this,arguments),this.listenTo(this.history,"changed:current",this.renderQueryConsumers)},f.prototype.renderChildren=function(){return this.renderManagementTools(),this.renderUndo(),this.renderQueryConsumers()},f.prototype.renderManagementTools=function(){return this.renderChildAt(".im-query-management",new r({history:this.history}))},f.prototype.renderUndo=function(){var t;return t=this.$(".im-history"),this.renderChild("undo",new s({collection:this.history}),t)},f.prototype.getConsumerContainer=function(){var t;return null!=this.consumerContainer?(this.consumerContainer.classList.add(i.get("StylePrefix")),this.consumerContainer.classList.add("im-query-consumers"),this.$(".im-query-management").addClass("im-has-more-space"),this.$(".im-history").addClass("im-has-more-space"),this.consumerContainer):(t=this.$(".im-query-consumers").empty()).length?t:void 0},f.prototype.renderQueryConsumers=function(){var t,e,n,i,r,o,s,a;if(t=this.getConsumerContainer()){var l;if(o=this.history.getCurrentQuery(),a=this.selectedObjects,r=new h({query:o,tableState:this.tableState,selected:a}),this.listenTo(r,"all",(l=this,function(){var t,e,n,i;return e=arguments[0],t=2<=arguments.length?p.call(arguments,1):[],(n=l.bus).trigger.apply(n,["list-action:"+e].concat(p.call(t))),(i=l.bus).trigger.apply(i,["list-action",e].concat(p.call(t)))})),this.renderChild("save",new c({query:o,tableState:this.tableState}),t),this.renderChild("code",new u({query:o,tableState:this.tableState}),t),this.renderChild("lists",r,t),this.consumerContainer&&this.consumerBtnClass)for(e=0,i=(s=["save","code","lists"]).length;e",PreviewTitle:function(t){return t.types.join(a.get("DynamicObjects.NameDelimiter"))}}),r=y("../../models/selected-objects"),p=y("../../core/type-assertions"),h=l.template("classy-popover")({classes:"item-preview"}),s=function(t,e){return null!=e&&null!=t.model.findSharedAncestor(t,e)},c=u.memoize(s,function(t,e){return t+"<"+(null!=e?e:"!")}),v.exports=(function(t,e){for(var n in e)f.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(g,e),g.prototype.Model=t,g.prototype.tagName="td",g.prototype.className="im-result-field",g.prototype.id=function(){return u.uniqueId("im_table_cell_")},g.prototype.formatter=i.defaultFormatter,g.prototype.parameters=["model","service","selectedObjects","tableState","popovers"],g.prototype.optionalParameters=["formatter"],g.prototype.parameterTypes={model:p.InstanceOf(t,"models/cell"),selectedObjects:p.InstanceOf(r,"SelectedObjects"),formatter:p.Callable,tableState:p.Model,service:p.Service,popovers:new p.Structure("HasGet",{get:p.Function})},g.prototype.initialize=function(){return g.__super__.initialize.apply(this,arguments),this.listen()},g.prototype.initState=function(){return this.setSelected(),this.setSelectable(),this.setHighlit(),this.setMinimised()},g.prototype.getPath=function(){return this.model.get("column")},g.prototype.getTypes=function(){var t,e,n,i,r,o;if(r=this.model.get("node"),null==(e=this.model.get("entity").get("classes")))return[r];for(o=[],n=0,i=e.length;n=e.offset().left+e.width())return this.$el.addClass("too-far-over")},b.prototype.showSummary=function(t,e,n){var i,r,o,s,a;if(g(n),r=this.$(t),o=this.path(),r.hasClass("open"))return this.query.trigger("hiding:column-summary",o),r.removeClass("open"),null!=(s=this.children.summary)&&s.$el.hide(),this.removeChild("summary"),!1;if(this.$(".dropdown.open").removeClass("open"),this.query.trigger("showing:column-summary",o),a=new e({query:this.query,model:this.model}),!(i=this.$(t+" .dropdown-menu")).length)throw new Error(t+" not found");return i.empty(),this.renderChild("summary",a,i),r.addClass("open"),this.onDropdownShown({target:i[0]}),!0},b.prototype.ensureDropdownIsWithinTable=function(t,e,n){var i,r,o,s,a;if(null==n&&(n=360),r=t.getBoundingClientRect(),null!=(s=this.$el.closest("table")[0])){if(o=d(),i=this.$(e+" .dropdown-menu"),o<=n)return i.addClass("im-fullwidth-dropdown").css({width:o});if(i.css({width:null}),!(n>=d()))return a=s.getBoundingClientRect(),r.left+n>a.right?this.$(e+" .dropdown-menu").addClass("dropdown-menu-right"):void 0}},b.prototype.showColumnSummary=function(t){var e,n;if(e=this.model.get("isReference")?u:i,this.showSummary(".im-summary",e,t))return n=f(),this.$(".im-item-table").css({"max-height":Math.max(350,n/2)}),this.ensureDropdownIsWithinTable(t.target,".im-summary")},b.prototype.showFilterSummary=function(t){if(this.showSummary(".im-filter-summary",c,t))return this.ensureDropdownIsWithinTable(t.target,".im-filter-summary",500)},b.prototype.toggleColumnVisibility=function(t){return g(t),this.model.toggle("minimised")},b.prototype.setSortOrder=function(t){return g(t),this.model.get("replaces").length?this.showSummary(".im-col-sort",r,t):(y(this.query,this.model.getView()),this.$(".im-col-sort").removeClass("open"))},b.prototype.toggleSubTable=function(t){return g(t),this.expandedSubtables.toggle(this.model.pathInfo())},b)}).call(this)},{"../../core-view":3,"../../core/collection":5,"../../messages":16,"../../messages/table":28,"../../models/header":44,"../../options":63,"../../templates":67,"../../utils/css-class-set":79,"../../utils/events":81,"../../utils/on-change":93,"../../utils/sort-query-by-path":103,"../constraints/single-column":133,"../formatted-sorting":167,"./column-summary":211,"./outer-join-summary":217,underscore:257}],215:[function(v,_,t){(function(){var e,t,n,i,r,o,s,a,l,u,c,h,p,f,d,g,m={}.hasOwnProperty;function y(){return this.canUseFormatter=function(t,e){return function(){return t.apply(e,arguments)}}(this.canUseFormatter,this),y.__super__.constructor.apply(this,arguments)}d=v("underscore"),n=v("../../core-view"),p=v("../../templates"),i=v("../../formatting"),o=v("../../models/path-set"),t=v("../../models/column-headers"),s=v("../../utils/popover-factory"),r=v("../../models/history"),h=v("../../models/table"),l=v("../../models/selected-objects"),a=v("../item-preview"),f=v("../../core/type-assertions"),e=v("./cell-factory"),u=v("./body"),c=v("./head"),g=function(n){return function(t,e){return n(e,t)}},_.exports=(function(t,e){for(var n in e)m.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(y,n),y.prototype.className="im-results-table table table-striped table-bordered",y.prototype.tagName="table",y.prototype.throbber=p.template("table-throbber"),y.prototype.parameters=["history","columnHeaders","rows","tableState","blacklistedFormatters","selectedObjects"],y.prototype.parameterTypes={history:f.InstanceOf(r,"History"),blacklistedFormatters:f.Collection,rows:f.Collection,tableState:f.InstanceOf(h,"TableModel"),columnHeaders:f.InstanceOf(t,"ColumnHeaders"),selectedObjects:f.InstanceOf(l,"SelectedObjects")},y.prototype.initialize=function(){var t;return y.__super__.initialize.apply(this,arguments),t=(this.query=this.history.getCurrentQuery()).service,this.expandedSubtables=new o,this.popoverFactory=new s(t,a),this.cellFactory=e(t,this),this.listenTo(this.blacklistedFormatters,"reset add remove",this.renderBody),this.listenTo(this.history,"changed:current",this.setQuery)},y.prototype.setQuery=function(){return this.query=this.history.getCurrentQuery()},y.prototype.getFormatter=g(i.getFormatter),y.prototype.canUseFormatter=function(t){return null!=t&&!this.blacklistedFormatters.findWhere({formatter:t})},y.prototype.renderChildren=function(){return this.renderHeaders(),this.renderBody()},y.prototype.renderHeaders=function(){return this.renderChild("head",new c(d.pick(this,c.prototype.parameters)))},y.prototype.renderBody=function(){return this.renderChild("body",new u({collection:this.rows,history:this.history,makeCell:this.cellFactory}))},y.prototype.remove=function(){return this.expandedSubtables.close(),delete this.expandedSubtables,this.popoverFactory.destroy(),delete this.popoverFactory,delete this.cellFactory,y.__super__.remove.apply(this,arguments)},y)}).call(this)},{"../../core-view":3,"../../core/type-assertions":10,"../../formatting":13,"../../models/column-headers":39,"../../models/history":45,"../../models/path-set":55,"../../models/selected-objects":58,"../../models/table":61,"../../templates":67,"../../utils/popover-factory":98,"../item-preview":170,"./body":208,"./cell-factory":209,"./head":213,underscore:257}],216:[function(n,i,t){(function(){var o,t,s,e,r={}.hasOwnProperty;function a(){return a.__super__.constructor.apply(this,arguments)}s=n("underscore"),t=n("../modal"),e=n("../../templates").large_table_disuader,o={ACCEPT:"accept",CONSTRAIN:"constrain",BACK:"back",FWD:"forward",EXPORT:"export",DISMISS:"dismiss"},i.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(a,t),a.prototype.className=function(){return"im-page-size-sanity-check fade "+a.__super__.className.apply(this,arguments)},a.prototype.template=s.template(e),a.prototype.act=function(){return this.resolve("accept")},a.prototype.events=function(){return s.extend(a.__super__.events.apply(this,arguments),{"click .btn-primary":(r=this,function(){return r.resolve(o.ACCEPT)}),"click .add-filter-dialogue":(i=this,function(){return i.resolve(o.CONSTRAIN)}),"click .page-backwards":(n=this,function(){return n.resolve(o.BACK)}),"click .page-forwards":(e=this,function(){return e.resolve(o.FWD)}),"click .download-menu":(t=this,function(){return t.resolve(o.EXPORT)})});var t,e,n,i,r},a)}).call(this)},{"../../templates":67,"../modal":195,underscore:257}],217:[function(f,d,t){(function(){function t(t,e){for(var n in e)u.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t}var e,n,i,r,o,s,a,l,u={}.hasOwnProperty;function c(){return c.__super__.constructor.apply(this,arguments)}function h(){return h.__super__.constructor.apply(this,arguments)}function p(){return p.__super__.constructor.apply(this,arguments)}l=f("underscore"),n=f("../../core-view"),a=f("../../templates"),e=f("../../core/collection"),r=f("../../models/path"),i=f("./column-summary"),t(c,e),c.prototype.model=r,s=c,t(h,n),h.prototype.parameters=["showPathSummary"],h.prototype.className="im-subpath im-outer-joined-path",h.prototype.tagName="li",h.prototype.template=l.template(''+a.column_manager_path_name+""),h.prototype.modelEvents=function(){return{change:this.reRender}},h.prototype.events=function(){return{click:this.onClick}},h.prototype.onClick=function(t){return t.stopPropagation(),t.preventDefault(),this.showPathSummary(this.model)},o=h,d.exports=(t(p,n),p.prototype.parameters=["query"],p.prototype.className="im-summary-selector",p.prototype.tagName="ul",p.prototype.initialize=function(){var t,e,n,i;for(p.__super__.initialize.apply(this,arguments),this.subColumns=new s,e=0,n=(i=this.model.get("replaces")).length;e=this.pageSizeFeasibilityThreshold)||!t&&this.model.get("count")>=this.pageSizeFeasibilityThreshold},h)}).call(this)},{"../../core-view":3,"../../events":12,"../../templates":67,"../export-dialogue":136,"../has-dialogues":169,"../new-filter-dialogue":198,"./large-table-disuader":216,"./paging":220,underscore:257}],219:[function(a,l,t){(function(){var t,e,n,o,i,r={}.hasOwnProperty;function s(){return s.__super__.constructor.apply(this,arguments)}n=a("underscore"),e=a("../../core-view"),t=a("./paging"),i=function(t){return t.replace(/\s+/g,"")},o=function(t){return"string"==typeof t?parseInt(i(t),10):t},l.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(s,e),s.include(t),s.prototype.tagName="nav",s.prototype.className="im-table-pagination im-table-control",s.prototype.RERENDER_EVENT="change:start change:count change:size",s.prototype.template=n.template('
                \n \n \n
              • \n \n
              • \n
              • \n <% if (useSelect) { %>\n
                \n \n
                \n <% } else { %>\n \n \n <% } %>\n
              • \n
              • \n \n
              • \n \n \n
              \n'),s.prototype.modelEvents=function(){return{"change:count":this.setVisible}},s.prototype.getData=function(){var t,e,n,i,r;return n=this.model.toJSON(),r=n.start,i=n.size,t=n.count,{max:e=this.getMaxPage(),min:1,size:i,currentPage:this.getCurrentPage(),gotoStart:0===r?"disabled":void 0,goFiveBack:r<5*i?"disabled":void 0,goOneBack:r a").show(),r.hide()):(r.find(".control-group").addClass("error"),inp.val(null))},s)}).call(this)},{"../../core-view":3,"./paging":220,underscore:257}],220:[function(t,e,n){(function(){n.getCurrentPage=function(){var t,e,n;return n=(t=this.model.toJSON()).start,e=t.size,Math.floor(n/e)+1},n.getMaxPage=function(){var t,e,n,i;return t=(e=(n=this.model.toJSON()).count)%(i=n.size)==0?0:1,Math.floor(e/i)+t},n.goTo=function(t){return this.model.set({start:t})},n.goToPage=function(t){return this.model.set({start:(t-1)*this.model.get("size")})},n.goBack=function(t){var e,n,i;return i=(e=this.model.toJSON()).start,n=e.size,this.goTo(Math.max(0,i-t*n))},n.goForward=function(t){var e,n,i;return i=(e=this.model.toJSON()).start,n=e.size,this.goTo(Math.min(this.getMaxPage()*n,i+t*n))}}).call(this)},{}],221:[function(l,u,t){(function(){function t(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t}var e,r,n,i,o={}.hasOwnProperty;function s(){return s.__super__.constructor.apply(this,arguments)}function a(){return a.__super__.constructor.apply(this,arguments)}i=l("underscore"),e=l("../../core-view"),n=l("../../templates"),l("../../messages/subtables"),t(s,e),s.prototype.tagName="th",s.prototype.parameters=["columnModel","model","query"],s.prototype.template=n.template("table-subtables-header"),s.prototype.getData=function(){return i.extend(s.__super__.getData.apply(this,arguments),this.columnModel.pick("columnName"))},s.prototype.modelEvents=function(){return{"change:displayName":this.reRender}},s.prototype.events=function(){return{"click a":this.removeView}},s.prototype.removeView=function(){var t;return this.query.removeFromSelect(null!=(t=this.model.get("replaces"))?t:this.model.get("path"))},s.prototype.postRender=function(){return this.$("[title]").tooltip()},s.prototype.initialize=function(){return s.__super__.initialize.apply(this,arguments),this.listenTo(this.columnModel,"change:columnName",this.reRender)},s.prototype.remove=function(){return delete this.columnModel,s.__super__.remove.apply(this,arguments)},r=s,u.exports=(t(a,e),a.prototype.tagName="thead",a.prototype.template=function(){return""},a.prototype.parameters=["collection","columnModel","query"],a.prototype.collectionEvents=function(){return{"add remove":this.reRender}},a.prototype.renderChildren=function(){var n,i;return n=this.el.querySelector("tr"),this.collection.forEach((i=this,function(t,e){return i.renderChild(e,new r({model:t,query:i.query,columnModel:i.columnModel}),n)}))},a.prototype.remove=function(){return delete this.columnModel,a.__super__.remove.apply(this,arguments)},a)}).call(this)},{"../../core-view":3,"../../messages/subtables":26,"../../templates":67,underscore:257}],222:[function(o,s,t){(function(){var t,n,e,r={}.hasOwnProperty;function i(){return i.__super__.constructor.apply(this,arguments)}t=o("../../core-view"),n=o("./subtable-header"),e=o("../../utils/build-skipset"),s.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(i,t),i.prototype.tagName="table",i.prototype.className="im-subtable table table-condensed table-striped",i.prototype.parameters=["query","headers","model","rows","cellify"],i.prototype.render=function(){var t,e,n,i,r,o;for(this.removeAllChildren(),this.rendered&&(this.el.innerHTML=""),1 is not a legal value for this constraint. Choose another from the list.","typeconstraints.OneClass":"<%- name %> is the only legal value this constraint can have. You can always remove it though."}),h=o("../utils/to-named-path"),n=o("../templates/helpers"),s=function(t){return{value:t.path,text:t.name}},a.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(i,t),i.prototype.parameters=["query","model"],i.prototype.initialize=function(){var e;return i.__super__.initialize.apply(this,arguments),this.model.swap("type",(e=this,function(t){return null!=t?t:e.model.get("path").getType().name})),this.listenTo(u,"change",this.reRender),this.listenTo(this.state,"change:subclasses",this.reRender),this.setSubclasses()},i.prototype.getData=function(){var o,e;return e=this.model.get("type"),{select:n.select,messages:u,subclasses:function(){var t,e,n,i,r;for(r=[],t=0,e=(i=null!=(n=this.state.get("subclasses"))?n:[]).length;t\n <%- messages.getText('conbuilder.IsA') %>\n\n<% if (subclasses.length == 1) { %>\n \n<% } else { %>\n <%= select(subclasses, isSelected, 'form-control im-value-type') %>\n<% } %>\n \n"),i.prototype.setSubclasses=function(){if(!this.model.has("subclasses"))return this.getPossibleTypes().then((n=this,function(t){var e;return 1===t.length&&(e=u.getText("typeconstraints.OneClass",t[0]),n.model.set({error:{message:e,level:"warning"}})),n.state.set({subclasses:t})}));var n},i.prototype.getPossibleTypes=function(){var r,t,e,n,o,i,s,a,l;return t=(n=this.model.toJSON()).path,l=n.type,i=this.query.getSubclasses(),o=this.query.model,delete i[t],r=o.getPathInfo(t.toString(),i).getType(),s=function(){var t,e,n,i;for(i=[],t=0,e=(n=o.getSubclassesOf(r)).length;tthis.length&&(i=this.length),i<0&&(i+=this.length+1);var r,o,s=[],a=[],l=[],u=[],c={},h=e.add,p=e.merge,f=e.remove,d=!1,g=this.comparator&&null==i&&!1!==e.sort,m=w.isString(this.comparator)?this.comparator:null;for(o=0;o>16&255,o[s++]=e>>8&255,o[s++]=255&e;2===r&&(e=u[t.charCodeAt(l)]<<2|u[t.charCodeAt(l+1)]>>4,o[s++]=255&e);1===r&&(e=u[t.charCodeAt(l)]<<10|u[t.charCodeAt(l+1)]<<4|u[t.charCodeAt(l+2)]>>2,o[s++]=e>>8&255,o[s++]=255&e);return o},n.fromByteArray=function(t){for(var e,n=t.length,i=n%3,r=[],o=0,s=n-i;o>2]+a[e<<4&63]+"==")):2==i&&(e=(t[n-2]<<8)+t[n-1],r.push(a[e>>10]+a[e>>4&63]+a[e<<2&63]+"="));return r.join("")};for(var a=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,o=i.length;r>18&63]+a[r>>12&63]+a[r>>6&63]+a[63&r]);return o.join("")}u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63},{}],232:[function(t,e,n){t("../../js/transition.js"),t("../../js/alert.js"),t("../../js/button.js"),t("../../js/carousel.js"),t("../../js/collapse.js"),t("../../js/dropdown.js"),t("../../js/modal.js"),t("../../js/tooltip.js"),t("../../js/popover.js"),t("../../js/scrollspy.js"),t("../../js/tab.js"),t("../../js/affix.js")},{"../../js/affix.js":233,"../../js/alert.js":234,"../../js/button.js":235,"../../js/carousel.js":236,"../../js/collapse.js":237,"../../js/dropdown.js":238,"../../js/modal.js":239,"../../js/popover.js":240,"../../js/scrollspy.js":241,"../../js/tab.js":242,"../../js/tooltip.js":243,"../../js/transition.js":244}],233:[function(t,e,n){!function(l){"use strict";var u=function(t,e){this.options=l.extend({},u.DEFAULTS,e);var n=this.options.target===u.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=n.on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(i){return this.each(function(){var t=l(this),e=t.data("bs.affix"),n="object"==typeof i&&i;e||t.data("bs.affix",e=new u(this,n)),"string"==typeof i&&e[i]()})}u.VERSION="3.4.1",u.RESET="affix affix-top affix-bottom",u.DEFAULTS={offset:0,target:window},u.prototype.getState=function(t,e,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return rthis.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(ndocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},o.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},o.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth

              '}),((o.prototype=r.extend({},r.fn.tooltip.Constructor.prototype)).constructor=o).prototype.getDefaults=function(){return o.DEFAULTS},o.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();if(this.options.html){var i=typeof n;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"==i&&(n=this.sanitizeHtml(n))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"==i?"html":"append"](n)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(n);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},o.prototype.hasContent=function(){return this.getTitle()||this.getContent()},o.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},o.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=r.fn.popover;r.fn.popover=function(i){return this.each(function(){var t=r(this),e=t.data("bs.popover"),n="object"==typeof i&&i;!e&&/destroy|hide/.test(i)||(e||t.data("bs.popover",e=new o(this,n)),"string"==typeof i&&e[i]())})},r.fn.popover.Constructor=o,r.fn.popover.noConflict=function(){return r.fn.popover=t,this}}(jQuery)},{}],241:[function(t,e,n){!function(o){"use strict";function r(t,e){this.$body=o(document.body),this.$scrollElement=o(t).is(document.body)?o(window):o(t),this.options=o.extend({},r.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",o.proxy(this.process,this)),this.refresh(),this.process()}function e(i){return this.each(function(){var t=o(this),e=t.data("bs.scrollspy"),n="object"==typeof i&&i;e||t.data("bs.scrollspy",e=new r(this,n)),"string"==typeof i&&e[i]()})}r.VERSION="3.4.1",r.DEFAULTS={offset:10},r.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},r.prototype.refresh=function(){var t=this,i="offset",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),o.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=o(this),e=t.data("target")||t.attr("href"),n=/^#./.test(e)&&o(e);return n&&n.length&&n.is(":visible")&&[[n[i]().top+r,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},r.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),i<=e)return s!=(t=o[o.length-1])&&this.activate(t);if(s&&e=r[t]&&(void 0===r[t+1]||e .active"),r=n&&a.support.transition&&(i.length&&i.hasClass("fade")||!!e.find("> .fade").length);function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}i.length&&r?i.one("bsTransitionEnd",o).emulateTransitionEnd(s.TRANSITION_DURATION):o(),i.removeClass("in")};var t=a.fn.tab;a.fn.tab=e,a.fn.tab.Constructor=s,a.fn.tab.noConflict=function(){return a.fn.tab=t,this};function n(t){t.preventDefault(),e.call(a(this),"show")}a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery)},{}],243:[function(t,e,n){!function(g){"use strict";var i=["sanitize","whiteList","sanitizeFn"],s=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],t={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},a=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function d(t,e){var n=t.nodeName.toLowerCase();if(-1!==g.inArray(n,e))return-1===g.inArray(n,s)||Boolean(t.nodeValue.match(a)||t.nodeValue.match(l));for(var i=g(e).filter(function(t,e){return e instanceof RegExp}),r=0,o=i.length;r
              ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:t},m.prototype.init=function(t,e,n){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&g(document).find(g.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),r=i.length;r--;){var o=i[r];if("click"==o)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=o){var s="hover"==o?"mouseenter":"focusin",a="hover"==o?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){var e=this.$element.data();for(var n in e)e.hasOwnProperty(n)&&-1!==g.inArray(n,i)&&delete e[n];return(t=g.extend({},this.getDefaults(),e,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=r(t.template,t.whiteList,t.sanitizeFn)),t},m.prototype.getDelegateOptions=function(){var n={},i=this.getDefaults();return this._options&&g.each(this._options,function(t,e){i[t]!=e&&(n[t]=e)}),n},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var n=this,i=this.tip(),r=this.getUID(this.type);this.setContent(),i.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&i.addClass("fade");var o="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,a=s.test(o);a&&(o=o.replace(s,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(o).data("bs."+this.type,this),this.options.container?i.appendTo(g(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),u=i[0].offsetWidth,c=i[0].offsetHeight;if(a){var h=o,p=this.getPosition(this.$viewport);o="bottom"==o&&l.bottom+c>p.bottom?"top":"top"==o&&l.top-cp.width?"left":"left"==o&&l.left-us.top+s.height&&(r.top=s.top+s.height-l)}else{var u=e.left-o,c=e.left+o+n;us.right&&(r.left=s.left+s.width-c)}return r},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},m.prototype.sanitizeHtml=function(t){return r(t,this.options.whiteList,this.options.sanitizeFn)};var e=g.fn.tooltip;g.fn.tooltip=function(i){return this.each(function(){var t=g(this),e=t.data("bs.tooltip"),n="object"==typeof i&&i;!e&&/destroy|hide/.test(i)||(e||t.data("bs.tooltip",e=new m(this,n)),"string"==typeof i&&e[i]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery)},{}],244:[function(t,e,n){!function(i){"use strict";i.fn.emulateTransitionEnd=function(t){var e=!1,n=this;i(this).one("bsTransitionEnd",function(){e=!0});return setTimeout(function(){e||i(n).trigger(i.support.transition.end)},t),this},i(function(){i.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}(),i.support.transition&&(i.event.special.bsTransitionEnd={bindType:i.support.transition.end,delegateType:i.support.transition.end,handle:function(t){if(i(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery)},{}],245:[function(t,e,n){},{}],246:[function(t,e,L){(function(h){"use strict";var i=t("base64-js"),o=t("ieee754");L.Buffer=h,L.SlowBuffer=function(t){+t!=t&&(t=0);return h.alloc(+t)},L.INSPECT_MAX_BYTES=50;var n=2147483647;function s(t){if(n>>1;case"base64":return P(t).length;default:if(r)return i?-1:D(t).length;e=(""+e).toLowerCase(),r=!0}}function f(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function d(t,e,n,i,r){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):2147483647=t.length){if(r)return-1;n=t.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof e&&(e=h.from(e,i)),h.isBuffer(e))return 0===e.length?-1:g(t,e,n,i,r);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,i,r);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,i,r){var o,s=1,a=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;a/=s=2,l/=2,n/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(r){var c=-1;for(o=n;o>>10&1023|55296),c=56320|1023&c),i.push(c),r+=h}return function(t){var e=t.length;if(e<=b)return String.fromCharCode.apply(String,t);var n="",i=0;for(;ithis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,n);case"utf8":case"utf-8":return _(this,e,n);case"ascii":return w(this,e,n);case"latin1":case"binary":return x(this,e,n);case"base64":return v(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}.apply(this,arguments)},h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){var t="",e=L.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),""},h.prototype.compare=function(t,e,n,i,r){if(I(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),e<0||n>t.length||i<0||r>this.length)throw new RangeError("out of range index");if(r<=i&&n<=e)return 0;if(r<=i)return-1;if(n<=e)return 1;if(this===t)return 0;for(var o=(r>>>=0)-(i>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(o,s),l=this.slice(i,r),u=t.slice(e,n),c=0;c>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-e;if((void 0===n||rthis.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o,s,a,l,u,c,h,p,f,d=!1;;)switch(i){case"hex":return m(this,t,e,n);case"utf8":case"utf-8":return p=e,f=n,O(D(t,(h=this).length-p),h,p,f);case"ascii":return y(this,t,e,n);case"latin1":case"binary":return y(this,t,e,n);case"base64":return l=this,u=e,c=n,O(P(t),l,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s=e,a=n,O(function(t,e){for(var n,i,r,o=[],s=0;s>8,r=n%256,o.push(r),o.push(i);return o}(t,(o=this).length-s),o,s,a);default:if(d)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),d=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var b=4096;function w(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;rt.length)throw new RangeError("Index out of range")}function E(t,e,n,i){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(t,e,n,i,r){return e=+e,n>>>=0,r||E(t,0,n,4),o.write(t,e,n,i,23,4),n+4}function M(t,e,n,i,r){return e=+e,n>>>=0,r||E(t,0,n,8),o.write(t,e,n,i,52,8),n+8}h.prototype.slice=function(t,e){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):n>>=0,e>>>=0,n||S(t,e,this.length);for(var i=this[t],r=1,o=0;++o>>=0,e>>>=0,n||S(t,e,this.length);for(var i=this[t+--e],r=1;0>>=0,e||S(t,1,this.length),this[t]},h.prototype.readUInt16LE=function(t,e){return t>>>=0,e||S(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUInt16BE=function(t,e){return t>>>=0,e||S(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUInt32LE=function(t,e){return t>>>=0,e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUInt32BE=function(t,e){return t>>>=0,e||S(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||S(t,e,this.length);for(var i=this[t],r=1,o=0;++o>>=0,e>>>=0,n||S(t,e,this.length);for(var i=e,r=1,o=this[t+--i];0>>=0,e||S(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,e){t>>>=0,e||S(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt16BE=function(t,e){t>>>=0,e||S(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt32LE=function(t,e){return t>>>=0,e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return t>>>=0,e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readFloatLE=function(t,e){return t>>>=0,e||S(t,4,this.length),o.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return t>>>=0,e||S(t,4,this.length),o.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return t>>>=0,e||S(t,8,this.length),o.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return t>>>=0,e||S(t,8,this.length),o.read(this,t,!1,52,8)},h.prototype.writeUIntLE=function(t,e,n,i){t=+t,e>>>=0,n>>>=0,i||k(this,t,e,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[e]=255&t;++o>>=0,n>>>=0,i||k(this,t,e,n,Math.pow(2,8*n)-1,0);var r=n-1,o=1;for(this[e+r]=255&t;0<=--r&&(o*=256);)this[e+r]=t/o&255;return e+n},h.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,1,255,0),this[e]=255&t,e+1},h.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},h.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e>>>=0,!i){var r=Math.pow(2,8*n-1);k(this,t,e,n,r-1,-r)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},h.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e>>>=0,!i){var r=Math.pow(2,8*n-1);k(this,t,e,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;0<=--o&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},h.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},h.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeFloatLE=function(t,e,n){return N(this,t,e,!0,n)},h.prototype.writeFloatBE=function(t,e,n){return N(this,t,e,!1,n)},h.prototype.writeDoubleLE=function(t,e,n){return M(this,t,e,!0,n)},h.prototype.writeDoubleBE=function(t,e,n){return M(this,t,e,!1,n)},h.prototype.copy=function(t,e,n,i){if(!h.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),0=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function P(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(e,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function O(t,e,n,i){for(var r=0;r=e.length||r>=t.length);++r)e[r+n]=t[r];return r}function I(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function R(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":231,buffer:246,ieee754:249}],247:[function(t,e,n){e.exports=function(){var O={version:"3.4.11"};Date.now||(Date.now=function(){return+new Date});var r=[].slice,h=function(t){return r.call(t)},i=document,a=i.documentElement,I=window;try{h(a.childNodes)[0].nodeType}catch(t){h=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}try{i.createElement("div").style.setProperty("opacity",0,"")}catch(t){var e=I.Element.prototype,n=e.setAttribute,o=e.setAttributeNS,s=I.CSSStyleDeclaration.prototype,l=s.setProperty;e.setAttribute=function(t,e){n.call(this,t,e+"")},e.setAttributeNS=function(t,e,n){o.call(this,t,e,n+"")},s.setProperty=function(t,e,n){l.call(this,t,e+"",n)}}function u(t,e){return t>>1;o(t[r],e)<0?n=1+r:i=r}return n},right:function(t,e,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;0e;)r.push(i/o);else for(;(i=t+n*++s)=d.length)return p?p.call(f,t):h?t.sort(h):t;for(var e,r,o,s,a=-1,l=t.length,u=d[i++],c=new _;++a=d.length)return t;var r=[],o=e[i++];return t.forEach(function(t,e){r.push({key:t,values:n(e,i)})}),o?r.sort(function(t,e){return o(t.key,e.key)}):r}(g(O.map,t,0),0)},f.key=function(t){return d.push(t),f},f.sortKeys=function(t){return e[d.length-1]=t,f},f.sortValues=function(t){return h=t,f},f.rollup=function(t){return p=t,f},f},O.set=function(t){var e=new x;if(t)for(var n=0,i=t.length;n>16,t>>8&255,255&t)}function ie(t){return ne(t)+""}Gt.brighter=function(t){return new Ut(Math.min(100,this.l+Wt*(arguments.length?t:1)),this.a,this.b)},Gt.darker=function(t){return new Ut(Math.max(0,this.l-Wt*(arguments.length?t:1)),this.a,this.b)},Gt.rgb=function(){return Kt(this.l,this.a,this.b)};var re=(O.rgb=ee).prototype=new qt;function oe(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function se(t,e,n){var i,r,o,s=0,a=0,l=0;if(i=/([a-z]+)\((.*)\)/i.exec(t))switch(r=i[2].split(","),i[1]){case"hsl":return n(parseFloat(r[0]),parseFloat(r[1])/100,parseFloat(r[2])/100);case"rgb":return e(ce(r[0]),ce(r[1]),ce(r[2]))}return(o=he.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.substring(1),16))||(4===t.length?(s=(3840&o)>>4,s|=s>>4,a=240&o,a|=a>>4,l=15&o,l|=l<<4):7===t.length&&(s=(16711680&o)>>16,a=(65280&o)>>8,l=255&o)),e(s,a,l))}function ae(t,e,n){var i,r,o=Math.min(t/=255,e/=255,n/=255),s=Math.max(t,e,n),a=s-o,l=(s+o)/2;return a?(r=l<.5?a/(s+o):a/(2-s-o),i=t==s?(e-n)/a+(e=be.t&&(be.f=be.c(t-be.t)),be=be.n;return t}function Te(){for(var t,e=me,n=1/0;e;)e=e.f?t?t.n=e.n:me=e.n:(e.t=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Ne=O.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=O.round(t,Se(t,e))).toFixed(Math.max(0,Math.min(20,Se(t*(1+1e-15),e))))}});function Me(t){return t+""}var Ae=O.time={},De=Date;function Pe(){this._=new Date(1",h=e[3]||"",n=e[4]||"",p=e[5],f=+e[6],d=e[7],g=e[8],m=e[9],y=1,v="",_="",b=!1;switch(g&&(g=+g.substring(1)),(p||"0"===u&&"="===c)&&(p=u="0",c="=",d&&(f-=Math.floor((f-1)/4))),m){case"n":d=!0,m="g";break;case"%":y=100,_="%",m="f";break;case"p":y=100,_="%",m="r";break;case"b":case"o":case"x":case"X":"#"===n&&(v="0"+m.toLowerCase());case"c":case"d":b=!0,g=0;break;case"s":y=-1,m="r"}"$"===n&&(v=i[0],_=i[1]),"r"!=m||g||(m="g"),null!=g&&("g"==m?g=Math.max(1,Math.min(21,g)):"e"!=m&&"f"!=m||(g=Math.max(0,Math.min(20,g)))),m=Ne.get(m)||Me;var w=p&&d;return function(t){var e=_;if(b&&t%1)return"";var n=t<0||0===t&&1/t<0?(t=-t,"-"):h;if(y<0){var i=O.formatPrefix(t,g);t=i.scale(t),e=i.symbol+_}else t*=y;var r=(t=m(t,g)).lastIndexOf("."),o=r<0?t:t.substring(0,r),s=r<0?"":x+t.substring(r+1);!p&&d&&(o=C(o));var a=v.length+o.length+s.length+(w?0:n.length),l=a"===c?l+n+t:"^"===c?l.substring(0,a>>=1)+n+t+l.substring(a):n+(w?t:l+t))+e}}}(t),timeFormat:function(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths;function u(a){var l=a.length;function t(t){for(var e,n,i,r=[],o=-1,s=0;++oni(gn,yn)&&(yn=t):ni(t,yn)>ni(gn,yn)&&(gn=t):gn<=yn?(tni(gn,yn)&&(yn=t):ni(t,yn)>ni(gn,yn)&&(gn=t)}else Gn(t,e);xn=n,_n=t}function Qn(){kn.point=Kn}function Xn(){Sn[0]=gn,Sn[1]=yn,kn.point=Gn,xn=null}function Zn(t,e){if(xn){var n=t-_n;Cn+=180Ct&&(gn=-(yn=180)),Sn[0]=gn,Sn[1]=yn,xn=null}function ni(t,e){return(e-=t)<0?e+360:e}function ii(t,e){return t[0]-e[0]}function ri(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tni(a[0],a[1])&&(a[1]=o[1]),ni(o[0],a[1])>ni(a[0],a[1])&&(a[0]=o[0])):n.push(a=o);for(var i,r,o,s=-1/0,a=(e=0,n[r=n.length-1]);e<=r;a=o,++e)o=n[e],(i=ni(a[1],o[0]))>s&&(s=i,gn=o[0],yn=a[1])}return Tn=Sn=null,gn===1/0||mn===1/0?[[NaN,NaN],[NaN,NaN]]:[[gn,mn],[yn,vn]]}),O.geo.centroid=function(t){En=Nn=Mn=An=Dn=Pn=On=In=Rn=Ln=qn=0,O.geo.stream(t,oi);var e=Rn,n=Ln,i=qn,r=e*e+n*n+i*i;return rCt?Math.atan((Math.sin(e)*(o=Math.cos(i))*Math.sin(n)-Math.sin(i)*(r=Math.cos(e))*Math.sin(t))/(r*o*s)):(e+i)/2}(s,a,t,e),r.point(l,a),r.lineEnd(),r.lineStart(),r.point(n,a),o=0),r.point(s=t,a=e),l=n},lineEnd:function(){r.lineEnd(),s=a=NaN},clean:function(){return 2-o}}},function(t,e,n,i){var r;if(null==t)r=n*xt,i.point(-bt,r),i.point(0,r),i.point(bt,r),i.point(bt,0),i.point(bt,-r),i.point(0,-r),i.point(-bt,-r),i.point(-bt,0),i.point(-bt,r);else if(R(t[0]-e[0])>Ct){var o=t[0]i&&0Ct;return gi(g,function(a){var l,u,c,h,p;return{lineStart:function(){h=c=!1,p=1},point:function(t,e){var n,i=[t,e],r=g(t,e),o=f?r?0:y(t,e):r?y(t+(t<0?bt:-bt),e):0;if(!l&&(h=c=r)&&a.lineStart(),r!==c&&(n=m(l,i),(Jn(l,n)||Jn(i,n))&&(i[0]+=Ct,i[1]+=Ct,r=g(i[0],i[1]))),r!==c)p=0,r?(a.lineStart(),n=m(i,l),a.point(n[0],n[1])):(n=m(l,i),a.point(n[0],n[1]),a.lineEnd()),l=n;else if(d&&l&&f^r){var s;o&u||!(s=m(i,l,!0))||(p=0,f?(a.lineStart(),a.point(s[0][0],s[0][1]),a.point(s[1][0],s[1][1]),a.lineEnd()):(a.point(s[1][0],s[1][1]),a.lineEnd(),a.lineStart(),a.point(s[0][0],s[0][1])))}!r||l&&Jn(l,i)||a.point(i[0],i[1]),l=i,c=r,u=o},lineEnd:function(){c&&a.lineEnd(),l=null},clean:function(){return p|(h&&c)<<1}}},nr(r,6*St),f?[0,-r]:[-bt,r-bt]);function g(t,e){return Math.cos(t)*Math.cos(e)>k}function m(t,e,n){var i=[1,0,0],r=Bn($n(t),$n(e)),o=Hn(r,r),s=r[0],a=o-s*s;if(!a)return!n&&t;var l=k*o/a,u=-k*s/a,c=Bn(i,r),h=Wn(i,l);Un(h,Wn(r,u));var p=c,f=Hn(h,p),d=Hn(p,p),g=f*f-d*(Hn(h,h)-1);if(!(g<0)){var m=Math.sqrt(g),y=Wn(p,(-f-m)/d);if(Un(y,h),y=Yn(y),!n)return y;var v,_=t[0],b=e[0],w=t[1],x=e[1];b<_&&(v=_,_=b,b=v);var C=b-_,T=R(C-bt)Ct}).map(u)).concat(O.range(Math.ceil(s/d)*d,o,d).filter(function(t){return R(t%m)>Ct}).map(c))}return v.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},v.outline=function(){return{type:"Polygon",coordinates:[h(r).concat(p(a).slice(1),h(i).reverse().slice(1),p(l).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.majorExtent(t).minorExtent(t):v.minorExtent()},v.majorExtent=function(t){return arguments.length?(r=+t[0][0],i=+t[1][0],l=+t[0][1],a=+t[1][1],i=u)return}else o={x:m,y:l};n={x:m,y:u}}else{if(o){if(o.y=u)return}else o={x:(l-r)/i,y:l};n={x:(u-r)/i,y:u}}else{if(o){if(o.y=a)return}else o={x:s,y:i*s+r};n={x:a,y:i*a+r}}else{if(o){if(o.xCt||R(r-n)>Ct)&&(a.splice(s,0,new Xr(Kr(o.site,c,R(i-h)=s&&i.x<=l&&i.y>=a&&i.y<=u?[[s,u],[l,u],[l,a],[s,a]]:[]).point=r[e]}),o}function h(t){return t.map(function(t,e){return{x:Math.round(i(t,e)/Ct)*Ct,y:Math.round(r(t,e)/Ct)*Ct,i:e}})}return o.links=function(e){return ro(h(e)).edges.filter(function(t){return t.l&&t.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},o.triangles=function(p){var f=[];return ro(h(p)).cells.forEach(function(t,e){for(var n,i,r,o,s=t.site,a=t.edges.sort(Br),l=-1,u=a.length,c=a[u-1].edge,h=c.l===s?c.r:c.l;++lo&&(r=i.substring(o,r),a[s]?a[s]+=r:a[++s]=r),(e=e[0])===(n=n[0])?a[s]?a[s]+=n:a[++s]=n:(a[++s]=null,l.push({i:s,x:ho(e,n)})),o=go.lastIndex;return ol&&(l=e.x),e.y>u&&(u=e.y),n.push(e.x),i.push(e.y);else for(r=0;rr&&(i=n,r=e);return i}function us(t){return t.reduce(cs,0)}function cs(t,e){return t+e[1]}function hs(t,e){return ps(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function ps(t,e){for(var n=-1,i=+t[0],r=(t[1]-i)/e,o=[];++n<=e;)o[n]=r*n+i;return o}function fs(t){return[O.min(t),O.max(t)]}function ds(t,e){return t.value-e.value}function gs(t,e){var n=t._pack_next;(t._pack_next=e)._pack_prev=t,(e._pack_next=n)._pack_prev=e}function ms(t,e){(t._pack_next=e)._pack_prev=t}function ys(t,e){var n=e.x-t.x,i=e.y-t.y,r=t.r+e.r;return n*n+i*i<.999*r*r}function vs(t){if((e=t.children)&&(l=e.length)){var e,n,i,r,o,s,a,l,u=1/0,c=-1/0,h=1/0,p=-1/0;if(e.forEach(_s),(n=e[0]).x=-n.r,n.y=0,_(n),1=s[0]&&i<=s[1]&&((n=r[O.bisect(a,i,1,u)-1]).y+=c,n.push(t[e]));return r}return n.value=function(t){return arguments.length?(p=t,n):p},n.range=function(t){return arguments.length?(f=pe(t),n):f},n.bins=function(e){return arguments.length?(d="number"==typeof e?function(t){return ps(t,e)}:pe(e),n):d},n.frequency=function(t){return arguments.length?(h=!!t,n):h},n},O.layout.pack=function(){var l,u=O.layout.hierarchy().sort(ds),c=0,h=[1,1];function e(t,e){var n=u.call(this,t,e),i=n[0],r=h[0],o=h[1],s=null==l?Math.sqrt:"function"==typeof l?l:function(){return l};if(i.x=i.y=0,Go(i,function(t){t.r=+s(t.value)}),Go(i,vs),c){var a=c*(l?1:Math.max(2*i.r/r,2*i.r/o))/2;Go(i,function(t){t.r+=a}),Go(i,vs),Go(i,function(t){t.r-=a})}return function t(e,n,i,r){var o=e.children;e.x=n+=r*e.x;e.y=i+=r*e.y;e.r*=r;if(o)for(var s=-1,a=o.length;++ss.x&&(s=t),t.depth>a.depth&&(a=t)});var l=g(o,s)/2-o.x,u=p[0]/(s.x+g(s,o)/2+l),c=p[1]/(a.depth||1);Jo(i,function(t){t.x=(t.x+l)*u,t.y=t.depth*c})}return n}function d(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e.length){!function(t){var e,n=0,i=0,r=t.children,o=r.length;for(;0<=--o;)(e=r[o]).z+=n,e.m+=n,n+=e.s+(i+=e.c)}(t);var r=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+g(t._,i._),t.m=t.z-r):t.z=r}else i&&(t.z=i.z+g(t._,i._));t.parent.A=function(t,e,n){if(e){for(var i,r=t,o=t,s=e,a=r.parent.children[0],l=r.m,u=o.m,c=s.m,h=a.m;s=Ts(s),r=Cs(r),s&&r;)a=Cs(a),(o=Ts(o)).a=t,0<(i=s.z+c-r.z-l+g(s._,r._))&&(Ss((f=t,d=n,(p=s).a.parent===f.parent?p.a:d),t,i),l+=i,u+=i),c+=s.m,l+=r.m,h+=a.m,u+=o.m;s&&!Ts(o)&&(o.t=s,o.m+=c-u),r&&!Cs(a)&&(a.t=r,a.m+=l-h,n=t)}var p,f,d;return n}(t,i,t.parent.A||n[0])}function m(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function y(t){t.x*=p[0],t.y=t.depth*p[1]}return e.separation=function(t){return arguments.length?(g=t,e):g},e.size=function(t){return arguments.length?(f=null==(p=t)?y:null,e):f?null:p},e.nodeSize=function(t){return arguments.length?(f=null==(p=t)?null:y,e):f?p:null},Yo(e,h)},O.layout.cluster=function(){var c=O.layout.hierarchy().sort(null).value(null),h=xs,p=[1,1],f=!1;function e(t,e){var n,i=c.call(this,t,e),r=i[0],o=0;Go(r,function(t){var e=t.children;e&&e.length?(t.x=function(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}(e),t.y=function(t){return 1+O.max(t,function(t){return t.y})}(e)):(t.x=n?o+=h(t,n):0,t.y=0,n=t)});var s=function t(e){var n=e.children;return n&&n.length?t(n[0]):e}(r),a=function t(e){var n,i=e.children;return i&&(n=i.length)?t(i[n-1]):e}(r),l=s.x-h(s,a)/2,u=a.x+h(a,s)/2;return Go(r,f?function(t){t.x=(t.x-r.x)*p[0],t.y=(r.y-t.y)*p[1]}:function(t){t.x=(t.x-l)/(u-l)*p[0],t.y=(1-(r.y?t.y/r.y:1))*p[1]}),i}return e.separation=function(t){return arguments.length?(h=t,e):h},e.size=function(t){return arguments.length?(f=null==(p=t),e):f?null:p},e.nodeSize=function(t){return arguments.length?(f=null!=(p=t),e):f?p:null},Yo(e,c)},O.layout.treemap=function(){var i,r=O.layout.hierarchy(),c=Math.round,o=[1,1],s=null,h=ks,a=!1,p="squarify",l=.5*(1+Math.sqrt(5));function f(t,e){for(var n,i,r=-1,o=t.length;++rn.dy)&&(u=n.dy);++on.dx)&&(u=n.dx);++oi;o--);e=e.slice(r,o)}return e};o.tickFormat=function(t,e){if(!arguments.length)return $s;arguments.length<2?e=$s:"function"!=typeof e&&(e=O.format(e));var n,i=Math.max(.1,t/o.ticks().length),r=u?(n=1e-12,Math.ceil):(n=-1e-12,Math.floor);return function(t){return t/p(r(h(t)+n))<=i?e(t):""}};o.copy=function(){return t(e.copy(),l,u,c)};return Is(o,e)}(O.scale.linear().domain([0,1]),10,!0,[1,10])};var $s=O.format(".0e"),Hs={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function Bs(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}O.scale.pow=function(){return function t(e,n,i){var r=Bs(n),o=Bs(1/n);function s(t){return e(r(t))}s.invert=function(t){return o(e.invert(t))};s.domain=function(t){return arguments.length?(e.domain((i=t.map(Number)).map(r)),s):i};s.ticks=function(t){return qs(i,t)};s.tickFormat=function(t,e){return js(i,t,e)};s.nice=function(t){return s.domain(Rs(i,t))};s.exponent=function(t){return arguments.length?(r=Bs(n=t),o=Bs(1/n),e.domain(i.map(r)),s):n};s.copy=function(){return t(e.copy(),n,i)};return Is(s,e)}(O.scale.linear(),1,[0,1])},O.scale.sqrt=function(){return O.scale.pow().exponent(.5)},O.scale.ordinal=function(){return function t(l,u){var r,c,h;function p(t){return c[((r.get(t)||("range"===u.t?r.set(t,l.push(t)):NaN))-1)%c.length]}function f(e,n){return O.range(l.length).map(function(t){return e+n*t})}p.domain=function(t){if(!arguments.length)return l;l=[],r=new _;for(var e,n=-1,i=t.length;++np)return u();f.active=p,d.event&&d.event.start.call(c,r,h),d.tween.forEach(function(t,e){(e=e.call(c,r,h))&&a.push(e)}),O.timer(function(){return n.c=l(t||1)?hi:l,1},0,g)}function l(t){if(f.active!==p)return u();for(var e=t/s,n=o(e),i=a.length;0rect,.s>rect").attr("width",C[1]-C[0])}function A(t){t.select(".extent").attr("y",T[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",T[1]-T[0])}function a(){var h,n,i=this,t=O.select(O.event.target),r=b.of(i,arguments),o=O.select(i),e=t.datum(),s=!/^(n|s)$/.test(e)&&w,a=!/^(e|w)$/.test(e)&&x,p=t.classed("extent"),l=dt(),f=O.mouse(i),u=O.select(I).on("keydown.brush",function(){32==O.event.keyCode&&(p||(h=null,f[0]-=C[1],f[1]-=T[1],p=2),L())}).on("keyup.brush",function(){32==O.event.keyCode&&2==p&&(f[0]+=C[1],f[1]+=T[1],p=0,L())});if(O.event.changedTouches?u.on("touchmove.brush",g).on("touchend.brush",y):u.on("mousemove.brush",g).on("mouseup.brush",y),o.interrupt().selectAll("*").interrupt(),p)f[0]=C[0]-f[0],f[1]=T[0]-f[1];else if(e){var c=+/w$/.test(e),d=+/^n/.test(e);n=[C[1-c]-f[0],T[1-d]-f[1]],f[0]=C[c],f[1]=T[d]}else O.event.altKey&&(h=f.slice());function g(){var t=O.mouse(i),e=!1;n&&(t[0]+=n[0],t[1]+=n[1]),p||(O.event.altKey?(h||(h=[(C[0]+C[1])/2,(T[0]+T[1])/2]),f[0]=C[+(t[0]>1,c=-7,h=n?r-1:0,p=n?-1:1,f=t[e+h];for(h+=p,o=f&(1<<-c)-1,f>>=-c,c+=a;0>=-c,c+=i;0>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),2<=(e+=1<=s+h?p/l:p*Math.pow(2,1-h))*l&&(s++,l/=2),c<=s+h?(a=0,s=c):1<=s+h?(a=(e*l-1)*Math.pow(2,r),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,r),s=0));8<=r;t[n+f]=255&a,f+=d,a/=256,r-=8);for(s=s<"+J.escape(t)+"":""},c=function(e,n){var i,r;return function(){var t;for(i in t=[],e)r=e[i],0<=ot.call(n,i)&&t.push(i+'="'+J.escape(r)+'" ');return t}().join("")},j=function(t){return""},V=function(t){return""},H=function(t){return""},L=function(t){return""+d(f)(t.values)+""},k=function(t){return"'},h=function(t){var e;return null!=t.values?L(t):null!=t.ids?k(t):null==t.op?V(t):(e=t.op,0<=ot.call(l.NULL_OPS,e)?j(t):H(t))},T=function(t){return t.replace(/^[^\.]+\./,"")},g=function(t){var e,n,i,r,o,s,a,l,u,c,h,p;return a=t.path,c=t.type,s=t.op,h=t.value,p=t.values,o=t.loopPath,i=t.extraValue,r=t.ids,e=t.code,n=t.editable,u=t.switched,l=t.switchable,r=null!=r?r.slice():void 0,p=null!=p?p.slice():void 0,q({path:a,type:c,op:s,value:h,values:p,extraValue:i,ids:r,code:e,editable:n,switched:u,switchable:l,loopPath:o})},p=function(t){var e;return(e=g(t)).path=T(e.path),e},q=function(t){var e;for(e in t)null==t[e]&&delete t[e];return t},y=function(t,e){return"Did not remove a single constraint. original = "+t+", reduced = "+e},M=function(t,e){var n,i,r,o,s,a;if(n={path:t},null===e)n.op="IS NULL";else if(J.isArray(e))n.op="ONE OF",n.values=e;else if("string"==(o=typeof e)||"number"==o||"boolean"==o)s="function"==typeof e.toUpperCase?e.toUpperCase():void 0,0<=ot.call(l.NULL_OPS,s)?n.op=e:(n.op="=",n.value=e);else if(r=function(){var t;for(i in t=[],e)e[i],t.push(i);return t}(),0<=ot.call(r,"isa"))J.isArray(e.isa)?(n.op=i,n.values=e.isa):n.type=e.isa;else for(i in 0<=ot.call(r,"extraValue")&&(n.extraValue=e.extraValue),e)a=e[i],"extraValue"!==i&&(n.op=i,J.isArray(a)?n.values=a:n.value=a);return n},N=function(t){var e,n,i,r;return n={path:(t=t.slice()).shift()},1===t.length?(i="function"==typeof(e=t[0]).toUpperCase?e.toUpperCase():void 0,0<=ot.call(l.NULL_OPS,i)?n.op=e:n.type=e):2<=t.length&&(n.op=t[0],r=t[1],J.isArray(r)?n.values=r:n.value=r,3===t.length&&(n.extraValue=t[2])),n},U=function(i){var r;return function(){var t,e,n;for(n=[],t=0,e=i.length;t",">=","<","<=","CONTAINS","LIKE","NOT LIKE"],lt.MULTIVALUE_OPS=["ONE OF","NONE OF"],lt.RANGE_OPS=["OVERLAPS","DOES NOT OVERLAP","OUTSIDE","WITHIN","CONTAINS","DOES NOT CONTAIN"],lt.TERNARY_OPS=["LOOKUP"],lt.LOOP_OPS=["=","!="],lt.LIST_OPS=["IN","NOT IN"],lt.OP_DICT={"=":"=","==":"==",eq:"=",eqq:"==","!=":"!=",ne:"!=",">":">",gt:">",">=":">=",ge:">=","<":"<",lt:"<","<=":"<=",le:"<=",contains:"CONTAINS",CONTAINS:"CONTAINS","does not contain":"DOES NOT CONTAIN","DOES NOT CONTAIN":"DOES NOT CONTAIN",like:"LIKE",LIKE:"LIKE","not like":"NOT LIKE","NOT LIKE":"NOT LIKE",lookup:"LOOKUP","IS NULL":"IS NULL","is null":"IS NULL","IS NOT NULL":"IS NOT NULL","is not null":"IS NOT NULL","ONE OF":"ONE OF","one of":"ONE OF","NONE OF":"NONE OF","none of":"NONE OF",in:"IN","not in":"NOT IN",IN:"IN","NOT IN":"NOT IN",WITHIN:"WITHIN",within:"WITHIN",OVERLAPS:"OVERLAPS",overlaps:"OVERLAPS","DOES NOT OVERLAP":"DOES NOT OVERLAP","does not overlap":"DOES NOT OVERLAP",OUTSIDE:"OUTSIDE",outside:"OUTSIDE",ISA:"ISA",isa:"ISA"},tt=["name","view","sortOrder","constraintLogic","title","description","comment"],Q=["path","type","op","code","value","ids","loopPath"],nt=function(t,e){var n,i,r,o;for(r=[],n=0,i=e.length;n');return e}.call(this).join("")},lt.prototype.toXML=function(){var e,n,i;return e={model:this.model.name,view:this.views.join(" "),sortOrder:this.getSorting(),constraintLogic:this.constraintLogic},null!=this.name&&(e.name=this.name),""+this.getJoinXML()+this.getConstraintXML()+""},lt.prototype.toJSON=function(){var r,o,s,a;return q({name:this.name,title:this.title,comment:this.comment,description:this.description,constraintLogic:this.constraintLogic,from:this.root,select:function(){var t,e,n,i;for(i=[],t=0,e=(n=this.views).length;t"+r.toXML()+"",contentType:"application/xml",dataType:"json"},G(i,r.service.authorise(e).then(function(t){return r.service.doReq(t)}))}));var r},lt.prototype.getCodeURI=function(t){var e,n;return n={query:this.toXML(),lang:t,format:"text"},null!=(null!=(e=this.service)?e.token:void 0)&&(n.token=this.service.token),this.service.root+"query/code?"+W(n)},lt.prototype.getExportURI=function(t,e){var n,i;return null==t&&(t="tab"),null==e&&(e={}),0<=ot.call(lt.BIO_FORMATS,t)?this["get"+t.toUpperCase()+"URI"](e):(i=I(e,{query:this.toXML(),format:t}),null!=(null!=(n=this.service)?n.token:void 0)&&(i.token=this.service.token),this.service.root+"query/results?"+W(i))},lt.prototype.needsAuthentication=function(){return J.any(this.constraints,function(t){var e;return"NOT IN"===(e=t.op)||"IN"===e})},lt.prototype.fetchQID=function(t){return G(t,this.service.post("queries",{query:this.toXML()}).then(x("id")))},K=function(t){return t.append("primaryIdentifier").toString()},lt.prototype.__bio_req=function(t,r){var o,e;return e=this.makeListQuery(),o=function(e){return J.any(t,function(t){return e.isa(t)})},e.views=J.take(r)(function(){var t,e,n,i;for(i=[],t=0,e=(n=this.getViewNodes()).length;t":">",'"':""","'":"'"},y.escape=function(t){var e,n,i,r,o,s;if(null==t)return"";for(o=[],n=i=0,r=(s=String(t).replace(/[&<>"']/g,function(t){return a[t]})).length;0<=r?i<=r:r<=i;n=0<=r?++i:--i)256<(e=s.charCodeAt(n))?o.push("&#"+e+";"):o.push(s.charAt(n));return o.join("")},y.omap=function(s){var e;return e=c(function(t,e,n){var i,r,o;return i=(o=s(e,n))[0],r=o[1],f(r)&&(r=r.slice()),t[i]=r,t}),function(t){return e({},t)}},y.copy=y.omap(function(t,e){return[t,e]}),y.partition=function(r){return function(t){return c(function(t,e){var n,i;return i=t[0],n=t[1],r(e)?[i.concat([e]),n]:[i,n.concat([e])]})([[],[]],t)}},y.merge=function(t,e){return extend(extend({},t),e)},y.extend=function(t,e){var n,i,r;for(n in i=[],e)r=e[n],i.push(t[n]=r);return i},y.id=s=function(t){return t},y.concatMap=function(s){return function(t){var e,n,i,r,o;for(r=void 0,n=0,i=t.length;n"!==t[t.length-1]?t+">":t},r.parse=function(t){var e;if("string"!=typeof t)throw new Error("Expected a string - got "+t);if(!(t=i(t)))throw new Error("Expected content - got empty string");if(!(e=function(){try{return(new n).parseFromString(t,"text/xml")}catch(t){}}())||!e.documentElement||e.getElementsByTagName("parsererror").length)throw new Error("Invalid XML: "+t);return e}}).call(this)},{xmldom:12}],19:[function(t,e,n){!function(){var t=void 0!==n?n:this,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function a(t){this.message=t}(a.prototype=new Error).name="InvalidCharacterError",t.btoa||(t.btoa=function(t){for(var e,n,i=0,r=s,o="";t.charAt(0|i)||(r="=",i%1);o+=r.charAt(63&e>>8-i%1*8)){if(255<(n=t.charCodeAt(i+=.75)))throw new a("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|n}return o}),t.atob||(t.atob=function(t){if((t=t.replace(/=+$/,"")).length%4==1)throw new a("'atob' failed: The string to be decoded is not correctly encoded.");for(var e,n,i=0,r=0,o="";n=t.charAt(r++);~n&&(e=i%4?64*e+n:n,i++%4)&&(o+=String.fromCharCode(255&e>>(-2*i&6))))n=s.indexOf(n);return o})}()},{}],20:[function(n,t,i){(function(e){"use strict";var t=n("jsonparse"),l=n("through"),r=e.from&&e.from!==Uint8Array.from;function m(t,e){return"string"==typeof t?e==t:t&&"function"==typeof t.exec?t.exec(e):"boolean"==typeof t||"object"==typeof t?t:"function"==typeof t&&t(e)}i.parse=function(h,p){var f,n,i=new t,d=l(function(t){"string"==typeof t&&(t=r?e.from(t):new e(t)),i.write(t)},function(t){t&&d.write(t),f&&d.emit("header",f),n&&d.emit("footer",n),d.queue(null)});return"string"==typeof h&&(h=h.split(".").map(function(t){return"$*"===t?{emitKey:!0}:"*"===t||(""===t?{recurse:!0}:t)})),h&&h.length||(h=null),i.onValue=function(t){if(this.root||(d.root=t),h){for(var e=0,n=0,i=!1,r=!1;e>16),l((65280&i)>>8),l(255&i);return 2==r?l(255&(i=c(t.charAt(e))<<2|c(t.charAt(e+1))>>4)):1==r&&(l((i=c(t.charAt(e))<<10|c(t.charAt(e+1))<<4|c(t.charAt(e+2))>>2)>>8&255),l(255&i)),o},t.fromByteArray=function(t){var e,n,i,r,o=t.length%3,s="";function a(t){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)}for(e=0,i=t.length-o;e>18&63)+a(r>>12&63)+a(r>>6&63)+a(63&r);switch(o){case 1:s+=a((n=t[t.length-1])>>2),s+=a(n<<4&63),s+="==";break;case 2:s+=a((n=(t[t.length-2]<<8)+t[t.length-1])>>10),s+=a(n>>4&63),s+=a(n<<2&63),s+="="}return s}}(void 0===n?this.base64js={}:n)},{}],27:[function(t,e,n){var a=t("base64-js"),o=t("ieee754"),l=t("is-array");n.Buffer=c,n.SlowBuffer=c,n.INSPECT_MAX_BYTES=50,c.poolSize=8192;var u=1073741823;function c(t,e,n){if(!(this instanceof c))return new c(t,e,n);var i,r,o,s=typeof t;if("number"==s)i=0>>0:0;else if("string"==s)"base64"===e&&(t=function(t){for(t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(w,"");t.length%4!=0;)t+="=";return t}(t)),i=c.byteLength(t,e);else{if("object"!=s||null===t)throw new TypeError("must start with number, buffer, array or string");"Buffer"===t.type&&l(t.data)&&(t=t.data),i=0<+t.length?Math.floor(+t.length):0}if(this.length>u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");if(c.TYPED_ARRAY_SUPPORT?r=c._augment(new Uint8Array(i)):((r=this).length=i,r._isBuffer=!0),c.TYPED_ARRAY_SUPPORT&&"number"==typeof t.byteLength)r._set(t);else if(function(t){return l(t)||c.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}(t))if(c.isBuffer(t))for(o=0;ot.length)throw new TypeError("index out of range")}function s(t,e,n,i){e<0&&(e=65535+e+1);for(var r=0,o=Math.min(t.length-n,2);r>>8*(i?r:1-r)}function m(t,e,n,i){e<0&&(e=4294967295+e+1);for(var r=0,o=Math.min(t.length-n,4);r>>8*(i?r:3-r)&255}function y(t,e,n,i,r,o){if(rt.length)throw new TypeError("index out of range")}function v(t,e,n,i,r){return r||y(t,e,n,4,34028234663852886e22,-34028234663852886e22),o.write(t,e,n,i,23,4),n+4}function _(t,e,n,i,r){return r||y(t,e,n,8,17976931348623157e292,-17976931348623157e292),o.write(t,e,n,i,52,8),n+8}c.TYPED_ARRAY_SUPPORT=function(){try{var t=new ArrayBuffer(0),e=new Uint8Array(t);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(t){return!1}}(),c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");for(var n=t.length,i=e.length,r=0,o=Math.min(n,i);r>>1;break;case"utf8":case"utf-8":n=x(t).length;break;case"base64":n=C(t).length;break;default:n=t.length}return n},c.prototype.length=void 0,c.prototype.parent=void 0,c.prototype.toString=function(t,e,n){var i,r,o,s=!1;if(t||(t="utf8"),(e>>>=0)<0&&(e=0),(n=void 0===n||n===1/0?this.length:n>>>0)>this.length&&(n=this.length),n<=e)return"";for(;;)switch(t){case"hex":return d(this,e,n);case"utf8":case"utf-8":return p(this,e,n);case"ascii":case"binary":return f(this,e,n);case"base64":return i=this,o=n,0===(r=e)&&o===i.length?a.fromByteArray(i):a.fromByteArray(i.slice(r,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,e,n);default:if(s)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),s=!0}},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return 0===c.compare(this,t)},c.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return 0e&&(t+=" ... ")),""},c.prototype.compare=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return c.compare(this,t)},c.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},c.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},c.prototype.write=function(t,e,n,i){if(isFinite(e))isFinite(n)||(i=n,n=void 0);else{var r=i;i=e,e=n,n=r}e=Number(e)||0;var o,s=this.length-e;switch(n?s<(n=Number(n))&&(n=s):n=s,i=String(i||"utf8").toLowerCase()){case"hex":o=function(t,e,n,i){n=Number(n)||0;var r=t.length-n;i?r<(i=Number(i))&&(i=r):i=r;var o=e.length;if(o%2!=0)throw new Error("Invalid hex string");o/2>8,i=e%256,r.push(i),r.push(n);return r}(e),t,n,i,2)}(this,t,e,n);break;default:throw new TypeError("Unknown encoding: "+i)}return o},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},c.prototype.slice=function(t,e){var n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):n>>=0,n||r(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t,e+1},c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||r(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8):s(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||r(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t):s(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||r(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t):m(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||r(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t):m(this,t,e,!1),e+4},c.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||r(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||r(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8):s(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||r(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t):s(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||r(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):m(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||r(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t):m(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,n){return v(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return v(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return _(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return _(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e||(e=0),i!==n&&0!==t.length&&0!==this.length){if(i=t.length)throw new TypeError("targetStart out of bounds");if(n<0||n>=this.length)throw new TypeError("sourceStart out of bounds");if(i<0||i>this.length)throw new TypeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=this.length)throw new TypeError("start out of bounds");if(n<0||n>this.length)throw new TypeError("end out of bounds");var i;if("number"==typeof t)for(i=e;i=e.length||o>=t.length);o++)e[o+n]=t[o];return o}function S(t){try{return decodeURIComponent(t)}catch(t){return String.fromCharCode(65533)}}},{"base64-js":26,ieee754:47,"is-array":49}],28:[function(t,e,n){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function a(t){return"function"==typeof t}function l(t){return"object"==typeof t&&null!==t}function u(t){return void 0===t}((e.exports=i).EventEmitter=i).prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(t){if(!function(t){return"number"==typeof t}(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},i.prototype.emit=function(t){var e,n,i,r,o,s;if(this._events||(this._events={}),"error"===t&&(!this._events.error||l(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(u(n=this._events[t]))return!1;if(a(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,r=new Array(i-1),o=1;on&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.once=function(t,e){if(!a(e))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(t,i),n||(n=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},i.prototype.removeListener=function(t,e){var n,i,r,o;if(!a(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=(n=this._events[t]).length,i=-1,n===e||a(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(l(n)){for(o=r;0= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=v-_,T=Math.floor,S=String.fromCharCode;function k(t){throw RangeError(h[t])}function f(t,e){for(var n=t.length;n--;)t[n]=e(t[n]);return t}function d(t,e){return f(t.split(c),e).join(".")}function E(t){for(var e,n,i=[],r=0,o=t.length;r>>10&1023|55296),t=56320|1023&t),e+=S(t)}).join("")}function M(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function A(t,e,n){var i=0;for(t=n?T(t/a):t>>1,t+=T(t/e);p*b>>1T((y-d)/s))&&k("overflow"),d+=l*s,!(l<(u=a<=m?_:m+b<=a?b:a-m));a+=v)s>T(y/(c=v-u))&&k("overflow"),s*=c;m=A(d-o,e=p.length+1,0==o),T(d/e)>y-g&&k("overflow"),g+=T(d/e),d%=e,p.splice(d++,0,g)}return N(p)}function m(t){var e,n,i,r,o,s,a,l,u,c,h,p,f,d,g,m=[];for(p=(t=E(t)).length,e=x,o=w,s=n=0;sT((y-n)/(f=i+1))&&k("overflow"),n+=(a-e)*f,e=a,s=0;sy&&k("overflow"),h==e){for(l=n,u=v;!(l<(c=u<=o?_:o+b<=u?b:u-o));u+=v)g=l-c,d=v-c,m.push(S(M(c+g%d,0))),l=T(g/d);m.push(S(M(l,0))),o=A(n,f,i==r),n=0,++i}++n,++e}return m.join("")}if(r={version:"1.2.4",ucs2:{decode:E,encode:N},decode:g,encode:m,toASCII:function(t){return d(t,function(t){return u.test(t)?"xn--"+m(t):t})},toUnicode:function(t){return d(t,function(t){return l.test(t)?g(t.slice(4).toLowerCase()):t})}},e&&!e.nodeType)if(n)n.exports=r;else for(o in r)r.hasOwnProperty(o)&&(e[o]=r[o]);else t.punycode=r}(this)}).call(this,void 0!==s?s:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],31:[function(t,e,n){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":32}],32:[function(a,l,t){(function(t){l.exports=o;var e=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e},n=a("core-util-is");n.inherits=a("inherits");var i=a("./_stream_readable"),r=a("./_stream_writable");function o(t){if(!(this instanceof o))return new o(t);i.call(this,t),r.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",s)}function s(){this.allowHalfOpen||this._writableState.ended||t.nextTick(this.end.bind(this))}n.inherits(o,i),function(t,e){for(var n=0,i=t.length;ne.highWaterMark&&(e.highWaterMark=function(t){if(r<=t)t=r;else{t--;for(var e=1;e<32;e<<=1)t|=t>>e;t++}return t}(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(y("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?d.nextTick(function(){c(t)}):c(t))}function c(t){y("emit readable"),t.emit("readable"),v(t)}function v(t){var e=t._readableState;if(y("flow",e.flowing),e.flowing)do{var n=t.read()}while(null!==n&&e.flowing)}function h(t,e){var n,i=e.buffer,r=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===i.length)return null;if(0===r)n=null;else if(s)n=i.shift();else if(!t||r<=t)n=o?i.join(""):p.concat(i,r),i.length=0;else if(t=e.highWaterMark||e.ended))return y("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?f(this):u(this),null;if(0===(t=l(t,e))&&e.ended)return 0===e.length&&f(this),null;var i,r=e.needReadable;return y("need readable",r),(0===e.length||e.length-t=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived>5==6){this.charLength=2;break}if(e<=2&&n>>4==14){this.charLength=3;break}if(e<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=e},o.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var n=this.charReceived,i=this.charBuffer,r=this.encoding;e+=i.slice(0,n).toString(r)}return e}},{buffer:27}],43:[function(t,e,n){var D=t("punycode");function v(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}n.parse=o,n.resolve=function(t,e){return o(t,!1,!0).resolve(e)},n.resolveObject=function(t,e){return t?o(t,!1,!0).resolveObject(e):e},n.format=function(t){return H(t)&&(t=o(t)),t instanceof v?t.format():v.prototype.format.call(t)},n.Url=v;var P=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,r=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),O=["'"].concat(r),I=["%","/","?",";","#"].concat(O),R=["/","?","#"],L=/^[a-z0-9A-Z_-]{0,63}$/,q=/^([a-z0-9A-Z_-]{0,63})(.*)$/,j={javascript:!0,"javascript:":!0},z={javascript:!0,"javascript:":!0},F={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},$=t("querystring");function o(t,e,n){if(t&&a(t)&&t instanceof v)return t;var i=new v;return i.parse(t,e,n),i}function H(t){return"string"==typeof t}function a(t){return"object"==typeof t&&null!==t}function _(t){return null===t}v.prototype.parse=function(t,e,n){if(!H(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t;i=i.trim();var r=P.exec(i);if(r){var o=(r=r[0]).toLowerCase();this.protocol=o,i=i.substr(r.length)}if(n||r||i.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===i.substr(0,2);!s||r&&z[r]||(i=i.substr(2),this.slashes=!0)}if(!z[r]&&(s||r&&!F[r])){for(var a,l,u=-1,c=0;cthis.offset&&(this.emit("data",e.slice(this.offset)),this.offset=e.length)};var l=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{stream:41,util:58}],47:[function(t,e,n){n.read=function(t,e,n,i,r){var o,s,a=8*r-i-1,l=(1<>1,c=-7,h=n?r-1:0,p=n?-1:1,f=t[e+h];for(h+=p,o=f&(1<<-c)-1,f>>=-c,c+=a;0>=-c,c+=i;0>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),2<=(e+=1<=s+h?p/l:p*Math.pow(2,1-h))*l&&(s++,l/=2),c<=s+h?(a=0,s=c):1<=s+h?(a=(e*l-1)*Math.pow(2,r),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,r),s=0));8<=r;t[n+f]=255&a,f+=d,a/=256,r-=8);for(s=s<t.length){for(var o=0;o<=t.length-1-n;o++)this.temp_buffs[this.bytes_in_sequence][o]=t[n+o];this.bytes_remaining=n+this.bytes_in_sequence-t.length,n=t.length-1}else this.appendStringBuf(t,n,n+this.bytes_in_sequence),n=n+this.bytes_in_sequence-1}else if(34===e)this.tState=b,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(v,this.string),this.offset+=l.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===e)this.tState=I;else{if(!(32<=e))return this.charError(t,n);this.appendStringChar(e)}else if(this.tState===I)if(34===(e=t[n]))this.appendStringChar(e),this.tState=O;else if(92===e)this.appendStringChar(z),this.tState=O;else if(47===e)this.appendStringChar(F),this.tState=O;else if(98===e)this.appendStringChar($),this.tState=O;else if(102===e)this.appendStringChar(H),this.tState=O;else if(110===e)this.appendStringChar(B),this.tState=O;else if(114===e)this.appendStringChar(U),this.tState=O;else if(116===e)this.appendStringChar(W),this.tState=O;else{if(117!==e)return this.charError(t,n);this.unicode="",this.tState=R}else if(this.tState===R||this.tState===L||this.tState===q||this.tState===j){if(!(48<=(e=t[n])&&e<64||64",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=C(e||this.defaultElement||this)[0],this.element=C(e),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=C(),this.hoverable=C(),this.focusable=C(),this.classesElementLookup={},e!==this&&(C.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=C(e.style?e.ownerDocument:e.document||e),this.window=C(this.document[0].defaultView||this.document[0].parentWindow)),this.options=C.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:C.noop,_create:C.noop,_init:C.noop,destroy:function(){var n=this;this._destroy(),C.each(this.classesElementLookup,function(t,e){n._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:C.noop,widget:function(){return this.element},option:function(t,e){var n,i,r,o=t;if(0===arguments.length)return C.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(n=t.split(".")).shift(),n.length){for(i=o[t]=C.widget.extend({},this.options[t]),r=0;r
              "),i=n.children()[0];return C("body").append(n),t=i.offsetWidth,n.css("overflow","scroll"),t===(e=i.offsetWidth)&&(e=n[0].clientWidth),n.remove(),o=t-e},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),n=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),i="scroll"===e||"auto"===e&&t.widthx(T(i),T(r))?o.important="horizontal":o.important="vertical",h.using.call(this,t,o)}),s.offset(C.extend(u,{using:t}))})},C.ui.position={fit:{left:function(t,e){var n,i=e.within,r=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,s=t.left-e.collisionPosition.marginLeft,a=r-s,l=s+e.collisionWidth-o-r;e.collisionWidth>o?0o?0?@[\]^`{|}~])/g,function(t){return t.replace(h,"\\$1")}),C.fn.labels=function(){var t,e,n,i,r;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(i=this.eq(0).parents("label"),(n=this.attr("id"))&&(r=(t=this.eq(0).parents().last()).add(t.length?t.siblings():this.siblings()),e="label[for='"+C.ui.escapeSelector(n)+"']",i=i.add(r.find(e).addBack(e))),this.pushStack(i))},C.fn.scrollParent=function(t){var e=this.css("position"),n="absolute"===e,i=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var t=C(this);return(!n||"static"!==t.css("position"))&&i.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&r.length?r:C(this[0].ownerDocument||document)},C.extend(C.expr.pseudos,{tabbable:function(t){var e=C.attr(t,"tabindex"),n=null!=e;return(!n||0<=e)&&C.ui.focusable(t,n)}}),C.fn.extend({uniqueId:(p=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++p)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&C(this).removeAttr("id")})}}),C.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var h,p,f=!1;C(document).on("mouseup",function(){f=!1});C.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===C.data(t.target,e.widgetName+".preventClickEvent"))return C.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!f){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,n=1===t.which,i=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&C(t.target).closest(this.options.cancel).length;return!(n&&!i&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===C.data(t.target,this.widgetName+".preventClickEvent")&&C.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),f=!0))}},_mouseMove:function(t){if(this._mouseMoved){if(C.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&C.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,f=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),C.ui.plugin={add:function(t,e,n){var i,r=C.ui[t].prototype;for(i in n)r.plugins[i]=r.plugins[i]||[],r.plugins[i].push([e,n[i]])},call:function(t,e,n,i){var r,o=t.plugins[e];if(o&&(i||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(r=0;r").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=C.ui.safeActiveElement(this.document[0]);C(t.target).closest(e).length||C.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),C.ui.ddmanager&&(C.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0n[2]&&(l=n[2]+this.offset.click.left),t.pageY-this.offset.click.top>n[3]&&(u=n[3]+this.offset.click.top)),s.grid&&(r=s.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,u=n?r-this.offset.click.top>=n[1]||r-this.offset.click.top>n[3]?r:r-this.offset.click.top>=n[1]?r-s.grid[1]:r+s.grid[1]:r,o=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=n?o-this.offset.click.left>=n[0]||o-this.offset.click.left>n[2]?o:o-this.offset.click.left>=n[0]?o-s.grid[0]:o+s.grid[0]:o),"y"===s.axis&&(l=this.originalPageX),"x"===s.axis&&(u=this.originalPageY)),{top:u-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,n){return n=n||this._uiHash(),C.ui.plugin.call(this,t,[e,n,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),C.Widget.prototype._trigger.call(this,t,e,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),C.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,n){var i=C.extend({},t,{item:n.element});n.sortables=[],C(n.options.connectToSortable).each(function(){var t=C(this).sortable("instance");t&&!t.options.disabled&&(n.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,i))})},stop:function(e,t,n){var i=C.extend({},t,{item:n.element});n.cancelHelperRemoval=!1,C.each(n.sortables,function(){var t=this;t.isOver?(t.isOver=0,n.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,i))})},drag:function(n,i,r){C.each(r.sortables,function(){var t=!1,e=this;e.positionAbs=r.positionAbs,e.helperProportions=r.helperProportions,e.offset.click=r.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,C.each(r.sortables,function(){return this.positionAbs=r.positionAbs,this.helperProportions=r.helperProportions,this.offset.click=r.offset.click,this!==e&&this._intersectsWith(this.containerCache)&&C.contains(e.element[0],this.element[0])&&(t=!1),t})),t?(e.isOver||(e.isOver=1,r._parent=i.helper.parent(),e.currentItem=i.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return i.helper[0]},n.target=e.currentItem[0],e._mouseCapture(n,!0),e._mouseStart(n,!0,!0),e.offset.click.top=r.offset.click.top,e.offset.click.left=r.offset.click.left,e.offset.parent.left-=r.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=r.offset.parent.top-e.offset.parent.top,r._trigger("toSortable",n),r.dropped=e.element,C.each(r.sortables,function(){this.refreshPositions()}),r.currentItem=r.element,e.fromOutside=r),e.currentItem&&(e._mouseDrag(n),i.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",n,e._uiHash(e)),e._mouseStop(n,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),i.helper.appendTo(r._parent),r._refreshOffsets(n),i.position=r._generatePosition(n,!0),r._trigger("fromSortable",n),r.dropped=!1,C.each(r.sortables,function(){this.refreshPositions()}))})}}),C.ui.plugin.add("draggable","cursor",{start:function(t,e,n){var i=C("body"),r=n.options;i.css("cursor")&&(r._cursor=i.css("cursor")),i.css("cursor",r.cursor)},stop:function(t,e,n){var i=n.options;i._cursor&&C("body").css("cursor",i._cursor)}}),C.ui.plugin.add("draggable","opacity",{start:function(t,e,n){var i=C(e.helper),r=n.options;i.css("opacity")&&(r._opacity=i.css("opacity")),i.css("opacity",r.opacity)},stop:function(t,e,n){var i=n.options;i._opacity&&C(e.helper).css("opacity",i._opacity)}}),C.ui.plugin.add("draggable","scroll",{start:function(t,e,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(t,e,n){var i=n.options,r=!1,o=n.scrollParentNotHidden[0],s=n.document[0];o!==s&&"HTML"!==o.tagName?(i.axis&&"x"===i.axis||(n.overflowOffset.top+o.offsetHeight-t.pageY").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&C(this.element).on("mouseenter",function(){e.disabled||(n._removeClass("ui-resizable-autohide"),n._handles.show())}).on("mouseleave",function(){e.disabled||n.resizing||(n._addClass("ui-resizable-autohide"),n._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();function t(t){C(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var t,e,n,i,r,o=this.options,s=this;if(this.handles=o.handles||(C(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=C(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},e=0;e"),this._addClass(r,"ui-resizable-handle "+i),r.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.append(r);this._renderAxis=function(t){var e,n,i,r;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=C(this.handles[e]),this._on(this.handles[e],{mousedown:s._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=C(this.handles[e],this.element),r=/sw|ne|nw|se|n|s/.test(e)?n.outerHeight():n.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,r),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){s.resizing||(this.className&&(r=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),s.axis=r&&r[1]?r[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(t){var e,n,i=!1;for(e in this.handles)(n=C(this.handles[e])[0])!==t.target&&!C.contains(n,t.target)||(i=!0);return!this.options.disabled&&i},_mouseStart:function(t){var e,n,i,r=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),r.containment&&(e+=C(r.containment).scrollLeft()||0,n+=C(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:e,top:n},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,i=C(".ui-resizable-"+this.axis).css("cursor"),C("body").css("cursor","auto"===i?this.axis+"-resize":i),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e,n,i=this.originalMousePosition,r=this.axis,o=t.pageX-i.left||0,s=t.pageY-i.top||0,a=this._change[r];return this._updatePrevProperties(),a&&(e=a.apply(this,[t,o,s]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),C.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,n,i,r,o,s,a,l=this.options,u=this;return this._helper&&(i=(n=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:u.sizeDiff.height,r=n?0:u.sizeDiff.width,o={width:u.helper.width()-r,height:u.helper.height()-i},s=parseFloat(u.element.css("left"))+(u.position.left-u.originalPosition.left)||null,a=parseFloat(u.element.css("top"))+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(C.extend(o,{top:a,left:s})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),C("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,n,i,r,o,s=this.options;o={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,i=o.minWidth/this.aspectRatio,n=o.maxHeight*this.aspectRatio,r=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),i>o.minHeight&&(o.minHeight=i),nt.width,s=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,u=/sw|nw|w/.test(n),c=/nw|ne|n/.test(n);return o&&(t.width=e.minWidth),s&&(t.height=e.minHeight),i&&(t.width=e.maxWidth),r&&(t.height=e.maxHeight),o&&u&&(t.left=a-e.minWidth),i&&u&&(t.left=a-e.maxWidth),s&&c&&(t.top=l-e.minHeight),r&&c&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,n=[],i=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],r=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)n[e]=parseFloat(i[e])||0,n[e]+=parseFloat(r[e])||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,n=this.helper||this.element;e"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var n=this.originalSize;return{left:this.originalPosition.left+e,width:n.width-e}},n:function(t,e,n){var i=this.originalSize;return{top:this.originalPosition.top+n,height:i.height-n}},s:function(t,e,n){return{height:this.originalSize.height+n}},se:function(t,e,n){return C.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,n]))},sw:function(t,e,n){return C.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,n]))},ne:function(t,e,n){return C.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,n]))},nw:function(t,e,n){return C.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,n]))}},_propagate:function(t,e){C.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),C.ui.plugin.add("resizable","animate",{stop:function(e){var n=C(this).resizable("instance"),t=n.options,i=n._proportionallyResizeElements,r=i.length&&/textarea/i.test(i[0].nodeName),o=r&&n._hasScroll(i[0],"left")?0:n.sizeDiff.height,s=r?0:n.sizeDiff.width,a={width:n.size.width-s,height:n.size.height-o},l=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,u=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null;n.element.animate(C.extend(a,u&&l?{top:u,left:l}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(n.element.css("width")),height:parseFloat(n.element.css("height")),top:parseFloat(n.element.css("top")),left:parseFloat(n.element.css("left"))};i&&i.length&&C(i[0]).css({width:t.width,height:t.height}),n._updateCache(t),n._propagate("resize",e)}})}}),C.ui.plugin.add("resizable","containment",{start:function(){var n,i,t,e,r,o,s,a=C(this).resizable("instance"),l=a.options,u=a.element,c=l.containment,h=c instanceof C?c.get(0):/parent/.test(c)?u.parent().get(0):c;h&&(a.containerElement=C(h),/document/.test(c)||c===document?(a.containerOffset={left:0,top:0},a.containerPosition={left:0,top:0},a.parentData={element:C(document),left:0,top:0,width:C(document).width(),height:C(document).height()||document.body.parentNode.scrollHeight}):(n=C(h),i=[],C(["Top","Right","Left","Bottom"]).each(function(t,e){i[t]=a._num(n.css("padding"+e))}),a.containerOffset=n.offset(),a.containerPosition=n.position(),a.containerSize={height:n.innerHeight()-i[3],width:n.innerWidth()-i[1]},t=a.containerOffset,e=a.containerSize.height,r=a.containerSize.width,o=a._hasScroll(h,"left")?h.scrollWidth:r,s=a._hasScroll(h)?h.scrollHeight:e,a.parentData={element:h,left:t.left,top:t.top,width:o,height:s}))},resize:function(t){var e,n,i,r,o=C(this).resizable("instance"),s=o.options,a=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,c={top:0,left:0},h=o.containerElement,p=!0;h[0]!==document&&/static/.test(h.css("position"))&&(c=a),l.left<(o._helper?a.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-a.left:o.position.left-c.left),u&&(o.size.height=o.size.width/o.aspectRatio,p=!1),o.position.left=s.helper?a.left:0),l.top<(o._helper?a.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-a.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio,p=!1),o.position.top=o._helper?a.top:0),i=o.containerElement.get(0)===o.element.parent().get(0),r=/relative|absolute/.test(o.containerElement.css("position")),i&&r?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),e=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-c.left:o.offset.left-a.left)),n=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-c.top:o.offset.top-a.top)),e+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-e,u&&(o.size.height=o.size.width/o.aspectRatio,p=!1)),n+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-n,u&&(o.size.width=o.size.height*o.aspectRatio,p=!1)),p||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var t=C(this).resizable("instance"),e=t.options,n=t.containerOffset,i=t.containerPosition,r=t.containerElement,o=C(t.helper),s=o.offset(),a=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(r.css("position"))&&C(this).css({left:s.left-i.left-n.left,width:a,height:l}),t._helper&&!e.animate&&/static/.test(r.css("position"))&&C(this).css({left:s.left-i.left-n.left,width:a,height:l})}}),C.ui.plugin.add("resizable","alsoResize",{start:function(){var t=C(this).resizable("instance").options;C(t.alsoResize).each(function(){var t=C(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,n){var e=C(this).resizable("instance"),i=e.options,r=e.originalSize,o=e.originalPosition,s={height:e.size.height-r.height||0,width:e.size.width-r.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};C(i.alsoResize).each(function(){var t=C(this),i=C(this).data("ui-resizable-alsoresize"),r={},e=t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];C.each(e,function(t,e){var n=(i[e]||0)+(s[e]||0);n&&0<=n&&(r[e]=n||null)}),t.css(r)})},stop:function(){C(this).removeData("ui-resizable-alsoresize")}}),C.ui.plugin.add("resizable","ghost",{start:function(){var t=C(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==C.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=C(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=C(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),C.ui.plugin.add("resizable","grid",{resize:function(){var t,e=C(this).resizable("instance"),n=e.options,i=e.size,r=e.originalSize,o=e.originalPosition,s=e.axis,a="number"==typeof n.grid?[n.grid,n.grid]:n.grid,l=a[0]||1,u=a[1]||1,c=Math.round((i.width-r.width)/l)*l,h=Math.round((i.height-r.height)/u)*u,p=r.width+c,f=r.height+h,d=n.maxWidth&&n.maxWidthp,y=n.minHeight&&n.minHeight>f;n.grid=a,m&&(p+=l),y&&(f+=u),d&&(p-=l),g&&(f-=u),/^(se|s|e)$/.test(s)?(e.size.width=p,e.size.height=f):/^(ne)$/.test(s)?(e.size.width=p,e.size.height=f,e.position.top=o.top-h):/^(sw)$/.test(s)?(e.size.width=p,e.size.height=f,e.position.left=o.left-c):((f-u<=0||p-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(n){var i=this,t=this.options;this.opos=[n.pageX,n.pageY],this.elementPos=C(this.element[0]).offset(),this.options.disabled||(this.selectees=C(t.filter,this.element[0]),this._trigger("start",n),C(t.appendTo).append(this.helper),this.helper.css({left:n.pageX,top:n.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=C.data(this,"selectable-item");t.startselected=!0,n.metaKey||n.ctrlKey||(i._removeClass(t.$element,"ui-selected"),t.selected=!1,i._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,i._trigger("unselecting",n,{unselecting:t.element}))}),C(n.target).parents().addBack().each(function(){var t,e=C.data(this,"selectable-item");if(e)return t=!n.metaKey&&!n.ctrlKey||!e.$element.hasClass("ui-selected"),i._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?i._trigger("selecting",n,{selecting:e.element}):i._trigger("unselecting",n,{unselecting:e.element}),!1}))},_mouseDrag:function(i){if(this.dragged=!0,!this.options.disabled){var t,r=this,o=this.options,s=this.opos[0],a=this.opos[1],l=i.pageX,u=i.pageY;return ll||n.rightu||n.bottoms&&n.righta&&n.bottom *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,n){return e<=t&&t*{ cursor: "+o.cursor+" !important; }").appendTo(r)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(i=this.containers.length-1;0<=i;i--)this.containers[i]._trigger("activate",t,this._uiHash(this));return C.ui.ddmanager&&(C.ui.ddmanager.current=this),C.ui.ddmanager&&!o.dropBehaviour&&C.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,n,i,r,o=this.options,s=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageYt[this.floating?"width":"height"]?f:o",n.document[0]);return n._addClass(e,"ui-sortable-placeholder",i||n.currentItem[0].className)._removeClass(e,"ui-sortable-helper"),"tbody"===t?n._createTrPlaceholder(n.currentItem.find("tr").eq(0),C("",n.document[0]).appendTo(e)):"tr"===t?n._createTrPlaceholder(n.currentItem,e):"img"===t&&e.attr("src",n.currentItem.attr("src")),i||e.css("visibility","hidden"),e},update:function(t,e){i&&!r.forcePlaceholderSize||(e.height()||e.height(n.currentItem.innerHeight()-parseInt(n.currentItem.css("paddingTop")||0,10)-parseInt(n.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(n.currentItem.innerWidth()-parseInt(n.currentItem.css("paddingLeft")||0,10)-parseInt(n.currentItem.css("paddingRight")||0,10)))}}),n.placeholder=C(r.placeholder.element.call(n.element,n.currentItem)),n.currentItem.after(n.placeholder),r.placeholder.update(n,n.placeholder)},_createTrPlaceholder:function(t,e){var n=this;t.children().each(function(){C(" ",n.document[0]).attr("colspan",C(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){var e,n,i,r,o,s,a,l,u,c,h=null,p=null;for(e=this.containers.length-1;0<=e;e--)if(!C.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(h&&C.contains(this.containers[e].element[0],h.element[0]))continue;h=this.containers[e],p=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",t,this._uiHash(this)),this.containers[e].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(i=1e4,r=null,o=(u=h.floating||this._isFloating(this.currentItem))?"left":"top",s=u?"width":"height",c=u?"pageX":"pageY",n=this.items.length-1;0<=n;n--)C.contains(this.containers[p].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(a=this.items[n].item.offset()[o],l=!1,t[c]-a>this.items[n][s]/2&&(l=!0),Math.abs(t[c]-a)this.containment[2]&&(r=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),i.grid&&(e=this.originalPageY+Math.round((o-this.originalPageY)/i.grid[1])*i.grid[1],o=this.containment?e-this.offset.click.top>=this.containment[1]&&e-this.offset.click.top<=this.containment[3]?e:e-this.offset.click.top>=this.containment[1]?e-i.grid[1]:e+i.grid[1]:e,n=this.originalPageX+Math.round((r-this.originalPageX)/i.grid[0])*i.grid[0],r=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-i.grid[0]:n+i.grid[0]:n)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:s.scrollTop()),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:s.scrollLeft())}},_rearrange:function(t,e,n,i){n?n[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var r=this.counter;this._delay(function(){r===this.counter&&this.refreshPositions(!i)})},_clear:function(t,e){this.reverting=!1;var n,i=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function r(e,n,i){return function(t){i._trigger(e,t,n._uiHash(n))}}for(this.fromOutside&&!e&&i.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||i.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(i.push(function(t){this._trigger("remove",t,this._uiHash())}),i.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),i.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;0<=n;n--)e||i.push(r("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(i.push(r("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(n=0;n li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=C(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():C()}},_createIcons:function(){var t,e,n=this.options.icons;n&&(t=C(""),this._addClass(t,"ui-accordion-header-icon","ui-icon "+n.header),t.prependTo(this.headers),e=this.active.children(".ui-accordion-header-icon"),this._removeClass(e,n.header)._addClass(e,null,n.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())):this._activate(e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=C.ui.keyCode,n=this.headers.length,i=this.headers.index(t.target),r=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:r=this.headers[(i+1)%n];break;case e.LEFT:case e.UP:r=this.headers[(i-1+n)%n];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:r=this.headers[0];break;case e.END:r=this.headers[n-1]}r&&(C(t.target).attr("tabIndex",-1),C(r).attr("tabIndex",0),C(r).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===C.ui.keyCode.UP&&t.ctrlKey&&C(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=C()):!1===t.active?this._activate(0):this.active.length&&!C.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=C()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var n,t=this.options,e=t.heightStyle,i=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=C(this),e=t.uniqueId().attr("id"),n=t.next(),i=n.uniqueId().attr("id");t.attr("aria-controls",i),n.attr("aria-labelledby",e)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(t.event),"fill"===e?(n=i.height(),this.element.siblings(":visible").each(function(){var t=C(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(n-=t.outerHeight(!0))}),this.headers.each(function(){n-=C(this).outerHeight(!0)}),this.headers.next().each(function(){C(this).height(Math.max(0,n-C(this).innerHeight()+C(this).height()))}).css("overflow","auto")):"auto"===e&&(n=0,this.headers.next().each(function(){var t=C(this).is(":visible");t||C(this).show(),n=Math.max(n,C(this).css("height","").height()),t||C(this).hide()}).height(n))},_activate:function(t){var e=this._findActive(t)[0];e!==this.active[0]&&(e=e||this.active[0],this._eventHandler({target:e,currentTarget:e,preventDefault:C.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):C()},_setupEvents:function(t){var n={keydown:"_keydown"};t&&C.each(t.split(" "),function(t,e){n[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e,n,i=this.options,r=this.active,o=C(t.currentTarget),s=o[0]===r[0],a=s&&i.collapsible,l=a?C():o.next(),u=r.next(),c={oldHeader:r,oldPanel:u,newHeader:a?C():o,newPanel:l};t.preventDefault(),s&&!i.collapsible||!1===this._trigger("beforeActivate",t,c)||(i.active=!a&&this.headers.index(o),this.active=s?C():o,this._toggle(c),this._removeClass(r,"ui-accordion-header-active","ui-state-active"),i.icons&&(e=r.children(".ui-accordion-header-icon"),this._removeClass(e,null,i.icons.activeHeader)._addClass(e,null,i.icons.header)),s||(this._removeClass(o,"ui-accordion-header-collapsed")._addClass(o,"ui-accordion-header-active","ui-state-active"),i.icons&&(n=o.children(".ui-accordion-header-icon"),this._removeClass(n,null,i.icons.header)._addClass(n,null,i.icons.activeHeader)),this._addClass(o.next(),"ui-accordion-content-active")))},_toggle:function(t){var e=t.newPanel,n=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=n,this.options.animate?this._animate(e,n,t):(n.hide(),e.show(),this._toggleComplete(t)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt(C(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,n,e){function i(){a._toggleComplete(e)}var r,o,s,a=this,l=0,u=t.css("box-sizing"),c=t.length&&(!n.length||t.index()",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(t){var e=C(t.target),n=C(C.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&n.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var e=C(t.target).closest(".ui-menu-item"),n=C(t.currentTarget);e[0]===n[0]&&(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,n))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var n=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,n)},blur:function(t){this._delay(function(){C.contains(this.element[0],C.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=C(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,n,i,r,o=!0;switch(t.keyCode){case C.ui.keyCode.PAGE_UP:this.previousPage(t);break;case C.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case C.ui.keyCode.HOME:this._move("first","first",t);break;case C.ui.keyCode.END:this._move("last","last",t);break;case C.ui.keyCode.UP:this.previous(t);break;case C.ui.keyCode.DOWN:this.next(t);break;case C.ui.keyCode.LEFT:this.collapse(t);break;case C.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case C.ui.keyCode.ENTER:case C.ui.keyCode.SPACE:this._activate(t);break;case C.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1,n=this.previousFilter||"",r=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===n?r=!0:i=n+i,e=this._filterMenuItems(i),(e=r&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,n,i,r=this,o=this.options.icons.submenu,s=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=s.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=C(this),e=t.prev(),n=C("").data("ui-menu-submenu-caret",!0);r._addClass(n,"ui-menu-icon","ui-icon "+o),e.attr("aria-haspopup","true").prepend(n),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=s.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=C(this);r._isDivider(t)&&r._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(n=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!C.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var n=this.element.find(".ui-menu-icon");this._removeClass(n,null,this.options.icons.submenu)._addClass(n,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var n,i,r;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),r=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(r,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(n=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(n),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,n,i,r,o,s;this._hasScroll()&&(e=parseFloat(C.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(C.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-e-n,r=this.activeMenu.scrollTop(),o=this.activeMenu.height(),s=t.outerHeight(),i<0?this.activeMenu.scrollTop(r+i):o",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var n,i,r,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,o="input"===t;this.isMultiLine=e||!o&&this._isContentEditable(this.element),this.valueMethod=this.element[e||o?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))i=r=n=!0;else{i=r=n=!1;var e=C.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:n=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:n=!0,this._move("nextPage",t);break;case e.UP:n=!0,this._keyEvent("previous",t);break;case e.DOWN:n=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(n=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:i=!0,this._searchTimeout(t)}}},keypress:function(t){if(n)return n=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!i){var e=C.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(r)return r=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t))}}),this._initSource(),this.menu=C("
                ").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==C.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(t,e){var n,i;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){C(t.target).trigger(t.originalEvent)});i=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:i})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(i.value),(n=e.item.attr("aria-label")||i.value)&&C.trim(n).length&&(this.liveRegion.children().hide(),C("
                ").text(n).appendTo(this.liveRegion))},menuselect:function(t,e){var n=e.item.data("ui-autocomplete-item"),i=this.previous;this.element[0]!==C.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=i,this._delay(function(){this.previous=i,this.selectedItem=n})),!1!==this._trigger("select",t,{item:n})&&this._value(n.value),this.term=this._value(),this.close(t),this.selectedItem=n}}),this.liveRegion=C("
                ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||C.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?C(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_initSource:function(){var n,i,r=this;C.isArray(this.options.source)?(n=this.options.source,this.source=function(t,e){e(C.ui.autocomplete.filter(n,t.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,e){r.xhr&&r.xhr.abort(),r.xhr=C.ajax({url:i,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(i){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),n=i.altKey||i.ctrlKey||i.metaKey||i.shiftKey;t&&(!t||e||n)||(this.selectedItem=null,this.search(null,i))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(C("
                ").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),C.extend(C.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var n=new RegExp(C.ui.autocomplete.escapeRegex(e),"i");return C.grep(t,function(t){return n.test(t.label||t.value||t)})}}),C.widget("ui.autocomplete",C.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1").text(e).appendTo(this.liveRegion))}});C.ui.autocomplete;var m=/ui-corner-([a-z]){2,6}/g;C.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"
                ",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var s=this,a=[];C.each(this.options.items,function(r,t){var e,o={};if(t)return"controlgroupLabel"===r?((e=s.element.find(t)).each(function(){var t=C(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("")}),s._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),void(a=a.concat(e.get()))):void(C.fn[r]&&(o=s["_"+r+"Options"]?s["_"+r+"Options"]("middle"):{classes:{}},s.element.find(t).each(function(){var t=C(this),e=t[r]("instance"),n=C.widget.extend({},o);if("button"!==r||!t.parent(".ui-spinner").length){e||(e=t[r]()[r]("instance")),e&&(n.classes=s._resolveClassesValues(n.classes,e)),t[r](n);var i=t[r]("widget");C.data(i[0],"ui-controlgroup-data",e||t[r]("instance")),a.push(i[0])}})))}),this.childWidgets=C(C.uniqueSort(a)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=C(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){var n=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,n)},_buildSimpleOptions:function(t,e){var n="vertical"===this.options.direction,i={classes:{}};return i.classes[e]={middle:"",first:"ui-corner-"+(n?"top":"left"),last:"ui-corner-"+(n?"bottom":"right"),only:"ui-corner-all"}[t],i},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(n,i){var r={};return C.each(n,function(t){var e=i.options.classes[t]||"";e=C.trim(e.replace(m,"")),r[t]=(e+" "+n[t]).replace(/\s+/g," ")}),r},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"!==t?this.refresh():this._callChildMethod(e?"disable":"enable")},refresh:function(){var r,o=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),r=this.childWidgets,this.options.onlyVisible&&(r=r.filter(":visible")),r.length&&(C.each(["first","last"],function(t,e){var n=r[e]().data("ui-controlgroup-data");if(n&&o["_"+n.widgetName+"Options"]){var i=o["_"+n.widgetName+"Options"](1===r.length?"only":e);i.classes=o._resolveClassesValues(i.classes,n),n.element[n.widgetName](i)}else o._updateCornerClass(r[e](),e)}),this._callChildMethod("refresh"))}});C.widget("ui.checkboxradio",[C.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,e,n=this,i=this._super()||{};return this._readType(),e=this.element.labels(),this.label=C(e[e.length-1]),this.label.length||C.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){n.originalLabel+=3===this.nodeType?C(this).text():this.outerHTML}),this.originalLabel&&(i.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(i.disabled=t),i},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||C.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,e="input[name='"+C.ui.escapeSelector(t)+"']";return t?(this.form.length?C(this.form[0].elements).filter(e):C(e).filter(function(){return 0===C(this).form().length})).not(this.element):C([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=C(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(t){var e="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=C(""),this.iconSpace=C(" "),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(e+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):e+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",e),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]);var y;C.ui.checkboxradio;C.widget("ui.button",{version:"1.12.1",defaultElement:"").addClass(this._triggerClass).html(r?C("").attr({src:r,alt:i,title:i}):i)),t[s?"before":"after"](e.trigger),e.trigger.on("click",function(){return C.datepicker._datepickerShowing&&C.datepicker._lastInput===t[0]?C.datepicker._hideDatepicker():(C.datepicker._datepickerShowing&&C.datepicker._lastInput!==t[0]&&C.datepicker._hideDatepicker(),C.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,n,i,r,o=new Date(2009,11,20),s=this._get(t,"dateFormat");s.match(/[DM]/)&&(e=function(t){for(r=i=n=0;rn&&(n=t[r].length,i=r);return i},o.setMonth(e(this._get(t,s.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,s.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(t,e){var n=C(t);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(e.dpDiv),C.data(t,"datepicker",e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))},_dialogDatepicker:function(t,e,n,i,r){var o,s,a,l,u,c=this._dialogInst;return c||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=C(""),this._dialogInput.on("keydown",this._doKeyDown),C("body").append(this._dialogInput),(c=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},C.data(this._dialogInput[0],"datepicker",c)),E(c.settings,i||{}),e=e&&e.constructor===Date?this._formatDate(c,e):e,this._dialogInput.val(e),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(s=document.documentElement.clientWidth,a=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[s/2-100+l,a/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),c.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),C.blockUI&&C.blockUI(this.dpDiv),C.data(this._dialogInput[0],"datepicker",c),this},_destroyDatepicker:function(t){var e,n=C(t),i=C.data(t,"datepicker");n.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),C.removeData(t,"datepicker"),"input"===e?(i.append.remove(),i.trigger.remove(),n.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||n.removeClass(this.markerClassName).empty(),v===i&&(v=null))},_enableDatepicker:function(e){var t,n,i=C(e),r=C.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,r.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((n=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=C.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,n,i=C(e),r=C.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,r.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((n=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=C.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;ea&&il&&re;)--Z<0&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,n=this._get(t,"prevText"),n=W?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Z-J,1)),this._getFormatConfig(t)):n,i=this._canAdjustMonth(t,-1,tt,Z)?""+n+"":U?"":""+n+"",r=this._get(t,"nextText"),r=W?this.formatDate(r,this._daylightSavingAdjust(new Date(tt,Z+J,1)),this._getFormatConfig(t)):r,o=this._canAdjustMonth(t,1,tt,Z)?""+r+"":U?"":""+r+"",s=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?K:$,s=W?this.formatDate(s,a,this._getFormatConfig(t)):s,l=t.inline?"":"",u=B?"
                "+(H?l:"")+(this._isInRange(t,a)?"":"")+(H?"":l)+"
                ":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,h=this._get(t,"showWeek"),p=this._get(t,"dayNames"),f=this._get(t,"dayNamesMin"),d=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),y=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),_=this._getDefaultDate(t),b="",x=0;x"+(/all|left/.test(k)&&0===x?H?o:i:"")+(/all|right/.test(k)&&0===x?H?i:o:"")+this._generateMonthYearHeader(t,Z,tt,Q,X,0",N=h?"":"",w=0;w<7;w++)N+="";for(E+=N+"",A=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,A)),D=(this._getFirstDayOfMonth(tt,Z)-c+7)%7,P=Math.ceil((D+A)/7),O=G&&this.maxRows>P?this.maxRows:P,this.maxRows=O,I=this._daylightSavingAdjust(new Date(tt,Z,1-D)),R=0;R",L=h?"":"",w=0;w<7;w++)q=m?m.apply(t.input?t.input[0]:null,[I]):[!0,""],z=(j=I.getMonth()!==Z)&&!v||!q[0]||Q&&I"+(j&&!y?" ":z?""+I.getDate()+"":""+I.getDate()+"")+"",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I);E+=L+""}11<++Z&&(Z=0,tt++),C+=E+="
                "+this._get(t,"weekHeader")+""+f[M]+"
                "+this._get(t,"calculateWeek")(I)+"
                "+(G?"
                "+(0
                ":""):"")}b+=C}return b+=u,t._keyEvent=!1,b},_generateMonthYearHeader:function(t,e,n,i,r,o,s,a){var l,u,c,h,p,f,d,g,m=this._get(t,"changeMonth"),y=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),_="
                ",b="";if(o||!m)b+=""+s[e]+"";else{for(l=i&&i.getFullYear()===n,u=r&&r.getFullYear()===n,b+=""}if(v||(_+=b+(!o&&m&&y?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!y)_+=""+n+"";else{for(h=this._get(t,"yearRange").split(":"),p=(new Date).getFullYear(),d=(f=function(t){var e=t.match(/c[+\-].*/)?n+parseInt(t.substring(1),10):t.match(/[+\-].*/)?p+parseInt(t,10):parseInt(t,10);return isNaN(e)?p:e})(h[0]),g=Math.max(d,f(h[1]||"")),d=i?Math.max(d,i.getFullYear()):d,g=r?Math.min(g,r.getFullYear()):g,t.yearshtml+="",_+=t.yearshtml,t.yearshtml=null}return _+=this._get(t,"yearSuffix"),v&&(_+=(!o&&m&&y?"":" ")+b),_+="
                "},_adjustInstDate:function(t,e,n){var i=t.selectedYear+("Y"===n?e:0),r=t.selectedMonth+("M"===n?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(i,r))+("D"===n?e:0),s=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(i,r,o)));t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),"M"!==n&&"Y"!==n||this._notifyChange(t)},_restrictMinMax:function(t,e){var n=this._getMinMaxDate(t,"min"),i=this._getMinMaxDate(t,"max"),r=n&&e=r.getTime())&&(!o||e.getTime()<=o.getTime())&&(!s||e.getFullYear()>=s)&&(!a||e.getFullYear()<=a)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,n,i){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var r=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(i,n,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),r,this._getFormatConfig(t))}}),C.fn.datepicker=function(t){if(!this.length)return this;C.datepicker.initialized||(C(document).on("mousedown",C.datepicker._checkExternalClick),C.datepicker.initialized=!0),0===C("#"+C.datepicker._mainDivId).length&&C("body").append(C.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?C.datepicker["_"+t+"Datepicker"].apply(C.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?C.datepicker["_"+t+"Datepicker"].apply(C.datepicker,[this].concat(e)):C.datepicker._attachDatepicker(this,t)}):C.datepicker["_"+t+"Datepicker"].apply(C.datepicker,[this[0]].concat(e))},C.datepicker=new _,C.datepicker.initialized=!1,C.datepicker.uuid=(new Date).getTime(),C.datepicker.version="1.12.1";C.datepicker;C.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var e=C(this).css(t).offset().top;e<0&&C(this).css("top",t.top-e)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&C.fn.draggable&&this._makeDraggable(),this.options.resizable&&C.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?C(t):this.document.find(t||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:C.noop,enable:C.noop,close:function(t){var e=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||C.ui.safeBlur(C.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){e._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var n=!1,i=this.uiDialog.siblings(".ui-front:visible").map(function(){return+C(this).css("z-index")}).get(),r=Math.max.apply(null,i);return r>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",r+1),n=!0),n&&!e&&this._trigger("focus",t),n},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=C(C.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(t){function e(){var t=C.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===t||C.contains(this.uiDialog[0],t)||this._focusTabbable()}t.preventDefault(),e.call(this),this._delay(e)},_createWrapper:function(){this.uiDialog=C("
                ").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===C.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);if(t.keyCode===C.ui.keyCode.TAB&&!t.isDefaultPrevented()){var e=this.uiDialog.find(":tabbable"),n=e.filter(":first"),i=e.filter(":last");t.target!==i[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==n[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){i.trigger("focus")}),t.preventDefault()):(this._delay(function(){n.trigger("focus")}),t.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=C("
                "),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){C(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=C("").button({label:C("").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),t=C("").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=C("
                "),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=C("
                ").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var r=this,t=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),C.isEmptyObject(t)||C.isArray(t)&&!t.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(C.each(t,function(t,e){var n,i;e=C.isFunction(e)?{click:e,text:t}:e,e=C.extend({type:"button"},e),n=e.click,i={icon:e.icon,iconPosition:e.iconPosition,showLabel:e.showLabel,icons:e.icons,text:e.text},delete e.click,delete e.icon,delete e.iconPosition,delete e.showLabel,delete e.icons,"boolean"==typeof e.text&&delete e.text,C("",e).button(i).appendTo(r.uiButtonSet).on("click",function(){n.apply(r.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var r=this,o=this.options;function s(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(t,e){r._addClass(C(this),"ui-dialog-dragging"),r._blockFrames(),r._trigger("dragStart",t,s(e))},drag:function(t,e){r._trigger("drag",t,s(e))},stop:function(t,e){var n=e.offset.left-r.document.scrollLeft(),i=e.offset.top-r.document.scrollTop();o.position={my:"left top",at:"left"+(0<=n?"+":"")+n+" top"+(0<=i?"+":"")+i,of:r.window},r._removeClass(C(this),"ui-dialog-dragging"),r._unblockFrames(),r._trigger("dragStop",t,s(e))}})},_makeResizable:function(){var o=this,s=this.options,t=s.resizable,e=this.uiDialog.css("position"),n="string"==typeof t?t:"n,e,s,w,se,sw,ne,nw";function a(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:n,start:function(t,e){o._addClass(C(this),"ui-dialog-resizing"),o._blockFrames(),o._trigger("resizeStart",t,a(e))},resize:function(t,e){o._trigger("resize",t,a(e))},stop:function(t,e){var n=o.uiDialog.offset(),i=n.left-o.document.scrollLeft(),r=n.top-o.document.scrollTop();s.height=o.uiDialog.height(),s.width=o.uiDialog.width(),s.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=r?"+":"")+r,of:o.window},o._removeClass(C(this),"ui-dialog-resizing"),o._unblockFrames(),o._trigger("resizeStop",t,a(e))}}).css("position",e)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=C(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),e=C.inArray(this,t);-1!==e&&t.splice(e,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(t){var n=this,i=!1,r={};C.each(t,function(t,e){n._setOption(t,e),t in n.sizeRelatedOptions&&(i=!0),t in n.resizableRelatedOptions&&(r[t]=e)}),i&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(t,e){var n,i,r=this.uiDialog;"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:C("").text(""+this.options.closeText).html()}),"draggable"===t&&((n=r.is(":data(ui-draggable)"))&&!e&&r.draggable("destroy"),!n&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((i=r.is(":data(ui-resizable)"))&&!e&&r.resizable("destroy"),i&&"string"==typeof e&&r.resizable("option","handles",e),i||!1===e||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,n,i=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),i.minWidth>i.width&&(i.width=i.minWidth),t=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),e=Math.max(0,i.minHeight-t),n="number"==typeof i.maxHeight?Math.max(0,i.maxHeight-t):"none","auto"===i.height?this.element.css({minHeight:e,maxHeight:n,height:"auto"}):this.element.height(Math.max(0,i.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=C(this);return C("
                ").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!C(t.target).closest(".ui-dialog").length||!!C(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=C("
                ").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==C.uiBackCompat&&C.widget("ui.dialog",C.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}});C.ui.dialog,C.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=C("
                ").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,e=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(e.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=C("
                ").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),C.widget("ui.selectmenu",[C.ui.formResetMixin,{version:"1.12.1",defaultElement:"",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var i=this._super(),r=this.element;return C.each(["min","max","step"],function(t,e){var n=r.attr(e);null!=n&&n.length&&(i[e]=n)}),i},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((0").parent().append("")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0i.max?i.max:null!==i.min&&t"},_buttonHtml:function(){return""}});var M;C.ui.spinner;C.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(M=/#.*$/,function(t){var e,n;e=t.href.replace(M,""),n=location.href.replace(M,"");try{e=decodeURIComponent(e)}catch(t){}try{n=decodeURIComponent(n)}catch(t){}return 1?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=C.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!C.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=C()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=C()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var l=this,t=this.tabs,e=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){C(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){C(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return C("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=C(),this.anchors.each(function(t,e){var n,i,r,o=C(e).uniqueId().attr("id"),s=C(e).closest("li"),a=s.attr("aria-controls");l._isLocal(e)?(r=(n=e.hash).substring(1),i=l.element.find(l._sanitizeSelector(n))):(n="#"+(r=s.attr("aria-controls")||C({}).uniqueId()[0].id),(i=l.element.find(n)).length||(i=l._createPanel(r)).insertAfter(l.panels[t-1]||l.tablist),i.attr("aria-live","polite")),i.length&&(l.panels=l.panels.add(i)),a&&s.data("ui-tabs-aria-controls",a),s.attr({"aria-controls":r,"aria-labelledby":o}),i.attr("aria-labelledby",o)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return C("
                ").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,n,i;for(C.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;n=this.tabs[i];i++)e=C(n),!0===t||-1!==C.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var n={};t&&C.each(t.split(" "),function(t,e){n[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var n,e=this.element.parent();"fill"===t?(n=e.height(),n-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=C(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(n-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){n-=C(this).outerHeight(!0)}),this.panels.each(function(){C(this).height(Math.max(0,n-C(this).innerHeight()+C(this).height()))}).css("overflow","auto")):"auto"===t&&(n=0,this.panels.each(function(){n=Math.max(n,C(this).height("").height())}).height(n))},_eventHandler:function(t){var e=this.options,n=this.active,i=C(t.currentTarget).closest("li"),r=i[0]===n[0],o=r&&e.collapsible,s=o?C():this._getPanelForTab(i),a=n.length?this._getPanelForTab(n):C(),l={oldTab:n,oldPanel:a,newTab:o?C():i,newPanel:s};t.preventDefault(),i.hasClass("ui-state-disabled")||i.hasClass("ui-tabs-loading")||this.running||r&&!e.collapsible||!1===this._trigger("beforeActivate",t,l)||(e.active=!o&&this.tabs.index(i),this.active=r?C():i,this.xhr&&this.xhr.abort(),a.length||s.length||C.error("jQuery UI Tabs: Mismatching fragment identifier."),s.length&&this.load(this.tabs.index(i),t),this._toggle(t,l))},_toggle:function(t,e){var n=this,i=e.newPanel,r=e.oldPanel;function o(){n.running=!1,n._trigger("activate",t,e)}function s(){n._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),i.length&&n.options.show?n._show(i,n.options.show,o):(i.show(),o())}this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){n._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),s()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),s()),r.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&r.length?e.oldTab.attr("tabIndex",-1):i.length&&this.tabs.filter(function(){return 0===C(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var e,n=this._findActive(t);n[0]!==this.active[0]&&(n.length||(n=this.active),e=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:e,currentTarget:e,preventDefault:C.noop}))},_findActive:function(t){return!1===t?C():this.tabs.eq(t)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+C.ui.escapeSelector(t)+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){C.data(this,"ui-tabs-destroy")?C(this).remove():C(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=C(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(n){var t=this.options.disabled;!1!==t&&(t=void 0!==n&&(n=this._getIndex(n),C.isArray(t)?C.map(t,function(t){return t!==n?t:null}):C.map(this.tabs,function(t,e){return e!==n?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==C.inArray(t,e))return;e=C.isArray(e)?C.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,i){t=this._getIndex(t);function r(t,e){"abort"===e&&o.panels.stop(!1,!0),o._removeClass(n,"ui-tabs-loading"),s.removeAttr("aria-busy"),t===o.xhr&&delete o.xhr}var o=this,n=this.tabs.eq(t),e=n.find(".ui-tabs-anchor"),s=this._getPanelForTab(n),a={tab:n,panel:s};this._isLocal(e[0])||(this.xhr=C.ajax(this._ajaxSettings(e,i,a)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),s.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){s.html(t),o._trigger("load",i,a),r(n,e)},1)}).fail(function(t,e){setTimeout(function(){r(t,e)},1)})))},_ajaxSettings:function(t,n,i){var r=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,e){return r._trigger("beforeLoad",n,C.extend({jqXHR:t,ajaxSettings:e},i))}}},_getPanelForTab:function(t){var e=C(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+e))}}),!1!==C.uiBackCompat&&C.widget("ui.tabs",C.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});C.ui.tabs;C.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=C(this).attr("title")||"";return C("").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,e){var n=(t.attr("aria-describedby")||"").split(/\s+/);n.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",C.trim(n.join(" ")))},_removeDescribedBy:function(t){var e=t.data("ui-tooltip-id"),n=(t.attr("aria-describedby")||"").split(/\s+/),i=C.inArray(e,n);-1!==i&&n.splice(i,1),t.removeData("ui-tooltip-id"),(n=C.trim(n.join(" ")))?t.attr("aria-describedby",n):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=C("
                ").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=C([])},_setOption:function(t,e){var n=this;this._super(t,e),"content"===t&&C.each(this.tooltips,function(t,e){n._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var i=this;C.each(this.tooltips,function(t,e){var n=C.Event("blur");n.target=n.currentTarget=e.element[0],i.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=C(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=C(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=C([])},open:function(t){var n=this,e=C(t?t.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&e.parents().each(function(){var t,e=C(this);e.data("ui-tooltip-open")&&((t=C.Event("blur")).target=t.currentTarget=this,n.close(t,!0)),e.attr("title")&&(e.uniqueId(),n.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._registerCloseHandlers(t,e),this._updateContent(e,t))},_updateContent:function(e,n){var t,i=this.options.content,r=this,o=n?n.type:null;if("string"==typeof i||i.nodeType||i.jquery)return this._open(n,e,i);(t=i.call(e[0],function(t){r._delay(function(){e.data("ui-tooltip-open")&&(n&&(n.type=o),this._open(n,e,t))})}))&&this._open(n,e,t)},_open:function(t,e,n){var i,r,o,s,a=C.extend({},this.options.position);function l(t){a.of=t,r.is(":hidden")||r.position(a)}n&&((i=this._find(e))?i.tooltip.find(".ui-tooltip-content").html(n):(e.is("[title]")&&(t&&"mouseover"===t.type?e.attr("title",""):e.removeAttr("title")),i=this._tooltip(e),r=i.tooltip,this._addDescribedBy(e,r.attr("id")),r.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),(s=C("
                ").html(r.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),s.removeAttr("id").find("[id]").removeAttr("id"),s.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:l}),l(t)):r.position(C.extend({of:e},this.options.position)),r.hide(),this._show(r,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(o=this.delayedShow=setInterval(function(){r.is(":visible")&&(l(a.of),clearInterval(o))},C.fx.interval)),this._trigger("open",t,{tooltip:r})))},_registerCloseHandlers:function(t,n){var e={keyup:function(t){if(t.keyCode===C.ui.keyCode.ESCAPE){var e=C.Event(t);e.currentTarget=n[0],this.close(e,!0)}}};n[0]!==this.element[0]&&(e.remove=function(){this._removeTooltip(this._find(n).tooltip)}),t&&"mouseover"!==t.type||(e.mouseleave="close"),t&&"focusin"!==t.type||(e.focusout="close"),this._on(!0,n,e)},close:function(t){var e,n=this,i=C(t?t.currentTarget:this.element),r=this._find(i);r?(e=r.tooltip,r.closing||(clearInterval(this.delayedShow),i.data("ui-tooltip-title")&&!i.attr("title")&&i.attr("title",i.data("ui-tooltip-title")),this._removeDescribedBy(i),r.hiding=!0,e.stop(!0),this._hide(e,this.options.hide,function(){n._removeTooltip(C(this))}),i.removeData("ui-tooltip-open"),this._off(i,"mouseleave focusout keyup"),i[0]!==this.element[0]&&this._off(i,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&C.each(this.parents,function(t,e){C(e.element).attr("title",e.title),delete n.parents[t]}),r.closing=!0,this._trigger("close",t,{tooltip:e}),r.hiding||(r.closing=!1))):i.removeData("ui-tooltip-open")},_tooltip:function(t){var e=C("
                ").attr("role","tooltip"),n=C("
                ").appendTo(e),i=e.uniqueId().attr("id");return this._addClass(n,"ui-tooltip-content"),this._addClass(e,"ui-tooltip","ui-widget ui-widget-content"),e.appendTo(this._appendTo(t)),this.tooltips[i]={element:t,tooltip:e}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var r=this;C.each(this.tooltips,function(t,e){var n=C.Event("blur"),i=e.element;n.target=n.currentTarget=i[0],r.close(n,!0),C("#"+t).remove(),i.data("ui-tooltip-title")&&(i.attr("title")||i.attr("title",i.data("ui-tooltip-title")),i.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==C.uiBackCompat&&C.widget("ui.tooltip",C.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});C.ui.tooltip;var A,D,P,O,I,R,L,q,j,z,F,$,H,B,U,W,V,Y,J,G,K,Q="ui-effects-",X="ui-effects-style",Z="ui-effects-animated",tt=C;function et(t,e,n){var i=q[e.type]||{};return null==t?n||!e.def?null:e.def:(t=i.floor?~~t:parseFloat(t),isNaN(t)?e.def:i.mod?(t+i.mod)%i.mod:t<0?0:i.max")[0],F=A.each,z.style.cssText="background-color:rgba(1,1,1,.5)",j.rgba=-1o.mod/2?i+=o.mod:i-r>o.mod/2&&(i-=o.mod)),u[n]=et((r-i)*s+i,e)))}),this[e](u)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),n=e.pop(),i=R(t)._rgba;return R(A.map(e,function(t,e){return(1-n)*i[e]+n*t}))},toRgbaString:function(){var t="rgba(",e=A.map(this._rgba,function(t,e){return null==t?2
                ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:n.width(),height:n.height()},r=document.activeElement;try{r.id}catch(t){r=document.body}return n.wrap(t),n[0]!==r&&!C.contains(n[0],r)||C(r).trigger("focus"),t=n.parent(),"static"===n.css("position")?(t.css({position:"relative"}),n.css({position:"relative"})):(C.extend(i,{position:n.css("position"),zIndex:n.css("z-index")}),C.each(["top","left","bottom","right"],function(t,e){i[e]=n.css(e),isNaN(parseInt(i[e],10))&&(i[e]="auto")}),n.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),n.css(e),t.css(i).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!C.contains(t[0],e)||C(e).trigger("focus")),t}}),C.extend(C.effects,{version:"1.12.1",define:function(t,e,n){return n||(n=e,e="effect"),C.effects.effect[t]=n,C.effects.effect[t].mode=e,n},scaledDimensions:function(t,e,n){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var i="horizontal"!==n?(e||100)/100:1,r="vertical"!==n?(e||100)/100:1;return{height:t.height()*r,width:t.width()*i,outerHeight:t.outerHeight()*r,outerWidth:t.outerWidth()*i}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,n){var i=t.queue();1").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(Q+"placeholder",e)),t.css({position:n,left:i.left,top:i.top}),e},removePlaceholder:function(t){var e=Q+"placeholder",n=t.data(e);n&&(n.remove(),t.removeData(e))},cleanUp:function(t){C.effects.restoreStyle(t),C.effects.removePlaceholder(t)},setTransition:function(i,t,r,o){return o=o||{},C.each(t,function(t,e){var n=i.cssUnit(e);0
                ").appendTo("body").addClass(t.className).css({top:c.top-s,left:c.left-a,height:n.innerHeight(),width:n.innerWidth(),position:r?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){h.remove(),C.isFunction(e)&&e()})}}),C.fx.step.clip=function(t){t.clipInit||(t.start=C(t.elem).cssClip(),"string"==typeof t.end&&(t.end=at(t.end,t.elem)),t.clipInit=!0),C(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},K={},C.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){K[t]=function(t){return Math.pow(t,e+2)}}),C.extend(K,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}}),C.each(K,function(t,e){C.easing["easeIn"+t]=e,C.easing["easeOut"+t]=function(t){return 1-e(1-t)},C.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});C.effects,C.effects.define("blind","hide",function(t,e){var n={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},i=C(this),r=t.direction||"up",o=i.cssClip(),s={clip:C.extend({},o)},a=C.effects.createPlaceholder(i);s.clip[n[r][0]]=s.clip[n[r][1]],"show"===t.mode&&(i.cssClip(s.clip),a&&a.css(C.effects.clipToBox(s)),s.clip=o),a&&a.animate(C.effects.clipToBox(s),t.duration,t.easing),i.animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),C.effects.define("bounce",function(t,e){var n,i,r,o=C(this),s=t.mode,a="hide"===s,l="show"===s,u=t.direction||"up",c=t.distance,h=t.times||5,p=2*h+(l||a?1:0),f=t.duration/p,d=t.easing,g="up"===u||"down"===u?"top":"left",m="up"===u||"left"===u,y=0,v=o.queue().length;for(C.effects.createPlaceholder(o),r=o.css(g),c||(c=o["top"==g?"outerHeight":"outerWidth"]()/3),l&&((i={opacity:1})[g]=r,o.css("opacity",0).css(g,m?2*-c:2*c).animate(i,f,d)),a&&(c/=Math.pow(2,h-1)),(i={})[g]=r;y
                ").css({position:"absolute",visibility:"visible",left:-i*f,top:-n*d}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:f,height:d,left:r+(h?s*f:0),top:o+(h?a*d:0),opacity:h?0:1}).animate({left:r+(h?0:s*f),top:o+(h?0:a*d),opacity:h?1:0},t.duration||500,t.easing,m)}),C.effects.define("fade","toggle",function(t,e){var n="show"===t.mode;C(this).css("opacity",n?0:1).animate({opacity:n?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),C.effects.define("fold","hide",function(e,t){var n=C(this),i=e.mode,r="show"===i,o="hide"===i,s=e.size||15,a=/([0-9]+)%/.exec(s),l=!!e.horizFirst?["right","bottom"]:["bottom","right"],u=e.duration/2,c=C.effects.createPlaceholder(n),h=n.cssClip(),p={clip:C.extend({},h)},f={clip:C.extend({},h)},d=[h[l[0]],h[l[1]]],g=n.queue().length;a&&(s=parseInt(a[1],10)/100*d[o?0:1]),p.clip[l[0]]=s,f.clip[l[0]]=s,f.clip[l[1]]=0,r&&(n.cssClip(f.clip),c&&c.css(C.effects.clipToBox(f)),f.clip=h),n.queue(function(t){c&&c.animate(C.effects.clipToBox(p),u,e.easing).animate(C.effects.clipToBox(f),u,e.easing),t()}).animate(p,u,e.easing).animate(f,u,e.easing).queue(t),C.effects.unshift(n,g,4)}),C.effects.define("highlight","show",function(t,e){var n=C(this),i={backgroundColor:n.css("backgroundColor")};"hide"===t.mode&&(i.opacity=0),C.effects.saveStyle(n),n.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(i,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),C.effects.define("size",function(r,e){var t,o,n,i=C(this),s=["fontSize"],a=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],u=r.mode,c="effect"!==u,h=r.scale||"both",p=r.origin||["middle","center"],f=i.css("position"),d=i.position(),g=C.effects.scaledDimensions(i),m=r.from||g,y=r.to||C.effects.scaledDimensions(i,0);C.effects.createPlaceholder(i),"show"===u&&(n=m,m=y,y=n),o={from:{y:m.height/g.height,x:m.width/g.width},to:{y:y.height/g.height,x:y.width/g.width}},"box"!==h&&"both"!==h||(o.from.y!==o.to.y&&(m=C.effects.setTransition(i,a,o.from.y,m),y=C.effects.setTransition(i,a,o.to.y,y)),o.from.x!==o.to.x&&(m=C.effects.setTransition(i,l,o.from.x,m),y=C.effects.setTransition(i,l,o.to.x,y))),"content"!==h&&"both"!==h||o.from.y!==o.to.y&&(m=C.effects.setTransition(i,s,o.from.y,m),y=C.effects.setTransition(i,s,o.to.y,y)),p&&(t=C.effects.getBaseline(p,g),m.top=(g.outerHeight-m.outerHeight)*t.y+d.top,m.left=(g.outerWidth-m.outerWidth)*t.x+d.left,y.top=(g.outerHeight-y.outerHeight)*t.y+d.top,y.left=(g.outerWidth-y.outerWidth)*t.x+d.left),i.css(m),"content"!==h&&"both"!==h||(a=a.concat(["marginTop","marginBottom"]).concat(s),l=l.concat(["marginLeft","marginRight"]),i.find("*[width]").each(function(){var t=C(this),e=C.effects.scaledDimensions(t),n={height:e.height*o.from.y,width:e.width*o.from.x,outerHeight:e.outerHeight*o.from.y,outerWidth:e.outerWidth*o.from.x},i={height:e.height*o.to.y,width:e.width*o.to.x,outerHeight:e.height*o.to.y,outerWidth:e.width*o.to.x};o.from.y!==o.to.y&&(n=C.effects.setTransition(t,a,o.from.y,n),i=C.effects.setTransition(t,a,o.to.y,i)),o.from.x!==o.to.x&&(n=C.effects.setTransition(t,l,o.from.x,n),i=C.effects.setTransition(t,l,o.to.x,i)),c&&C.effects.saveStyle(t),t.css(n),t.animate(i,r.duration,r.easing,function(){c&&C.effects.restoreStyle(t)})})),i.animate(y,{queue:!1,duration:r.duration,easing:r.easing,complete:function(){var t=i.offset();0===y.opacity&&i.css("opacity",m.opacity),c||(i.css("position","static"===f?"relative":f).offset(t),C.effects.saveStyle(i)),e()}})}),C.effects.define("scale",function(t,e){var n=C(this),i=t.mode,r=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"effect"!==i?0:100),o=C.extend(!0,{from:C.effects.scaledDimensions(n),to:C.effects.scaledDimensions(n,r,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(o.from.opacity=1,o.to.opacity=0),C.effects.effect.size.call(this,o,e)}),C.effects.define("puff","hide",function(t,e){var n=C.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});C.effects.effect.scale.call(this,n,e)}),C.effects.define("pulsate","show",function(t,e){var n=C(this),i=t.mode,r="show"===i,o=r||"hide"===i,s=2*(t.times||5)+(o?1:0),a=t.duration/s,l=0,u=1,c=n.queue().length;for(!r&&n.is(":visible")||(n.css("opacity",0).show(),l=1);u>10|55296,1023&i|56320)}function r(){x()}var t,f,b,o,s,d,p,g,w,l,u,x,C,a,T,m,c,y,v,S="sizzle"+1*new Date,_=n.document,k=0,i=0,E=lt(),N=lt(),M=lt(),A=lt(),D=function(t,e){return t===e&&(u=!0),0},P={}.hasOwnProperty,e=[],O=e.pop,I=e.push,R=e.push,L=e.slice,q=function(t,e){for(var n=0,i=t.length;n+~]|"+z+")"+z+"*"),Y=new RegExp(z+"|>"),J=new RegExp(H),G=new RegExp("^"+F+"$"),K={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+$),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+z+"*(even|odd|(([+-]|)(\\d*)n|)"+z+"*(?:([+-]|)"+z+"*(\\d+)|))"+z+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+z+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+z+"*((?:-\\d)?\\d*)"+z+"*\\)|)(?=[^-]|$)","i")},Q=/HTML$/i,X=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,tt=/^[^{]+\{\s*\[native \w/,et=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,nt=/[+~]/,it=new RegExp("\\\\([\\da-f]{1,6}"+z+"?|("+z+")|.)","ig"),rt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ot=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},st=bt(function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{R.apply(e=L.call(_.childNodes),_.childNodes),e[_.childNodes.length].nodeType}catch(t){R={apply:e.length?function(t,e){I.apply(t,L.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function at(e,t,n,i){var r,o,s,a,l,u,c,h=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!i&&((t?t.ownerDocument||t:_)!==C&&x(t),t=t||C,T)){if(11!==p&&(l=et.exec(e)))if(r=l[1]){if(9===p){if(!(s=t.getElementById(r)))return n;if(s.id===r)return n.push(s),n}else if(h&&(s=h.getElementById(r))&&v(t,s)&&s.id===r)return n.push(s),n}else{if(l[2])return R.apply(n,t.getElementsByTagName(e)),n;if((r=l[3])&&f.getElementsByClassName&&t.getElementsByClassName)return R.apply(n,t.getElementsByClassName(r)),n}if(f.qsa&&!A[e+" "]&&(!m||!m.test(e))&&(1!==p||"object"!==t.nodeName.toLowerCase())){if(c=e,h=t,1===p&&Y.test(e)){for((a=t.getAttribute("id"))?a=a.replace(rt,ot):t.setAttribute("id",a=S),o=(u=d(e)).length;o--;)u[o]="#"+a+" "+_t(u[o]);c=u.join(","),h=nt.test(e)&&yt(t.parentNode)||t}try{return R.apply(n,h.querySelectorAll(c)),n}catch(t){A(e,!0)}finally{a===S&&t.removeAttribute("id")}}}return g(e.replace(U,"$1"),t,n,i)}function lt(){var i=[];return function t(e,n){return i.push(e+" ")>b.cacheLength&&delete t[i.shift()],t[e+" "]=n}}function ut(t){return t[S]=!0,t}function ct(t){var e=C.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ht(t,e){for(var n=t.split("|"),i=n.length;i--;)b.attrHandle[n[i]]=e}function pt(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ft(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function dt(n){return function(t){var e=t.nodeName.toLowerCase();return("input"===e||"button"===e)&&t.type===n}}function gt(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&st(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function mt(s){return ut(function(o){return o=+o,ut(function(t,e){for(var n,i=s([],t.length,o),r=i.length;r--;)t[n=i[r]]&&(t[n]=!(e[n]=t[n]))})})}function yt(t){return t&&void 0!==t.getElementsByTagName&&t}for(t in f=at.support={},s=at.isXML=function(t){var e=t.namespaceURI,n=(t.ownerDocument||t).documentElement;return!Q.test(e||n&&n.nodeName||"HTML")},x=at.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:_;return i!==C&&9===i.nodeType&&i.documentElement&&(a=(C=i).documentElement,T=!s(C),_!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",r,!1):n.attachEvent&&n.attachEvent("onunload",r)),f.attributes=ct(function(t){return t.className="i",!t.getAttribute("className")}),f.getElementsByTagName=ct(function(t){return t.appendChild(C.createComment("")),!t.getElementsByTagName("*").length}),f.getElementsByClassName=tt.test(C.getElementsByClassName),f.getById=ct(function(t){return a.appendChild(t).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),f.getById?(b.filter.ID=function(t){var e=t.replace(it,h);return function(t){return t.getAttribute("id")===e}},b.find.ID=function(t,e){if(void 0!==e.getElementById&&T){var n=e.getElementById(t);return n?[n]:[]}}):(b.filter.ID=function(t){var n=t.replace(it,h);return function(t){var e=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return e&&e.value===n}},b.find.ID=function(t,e){if(void 0!==e.getElementById&&T){var n,i,r,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(r=e.getElementsByName(t),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),b.find.TAG=f.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):f.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"!==t)return o;for(;n=o[r++];)1===n.nodeType&&i.push(n);return i},b.find.CLASS=f.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&T)return e.getElementsByClassName(t)},c=[],m=[],(f.qsa=tt.test(C.querySelectorAll))&&(ct(function(t){a.appendChild(t).innerHTML="
                ",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+z+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+z+"*(?:value|"+j+")"),t.querySelectorAll("[id~="+S+"-]").length||m.push("~="),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+S+"+*").length||m.push(".#.+[+~]")}),ct(function(t){t.innerHTML="";var e=C.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+z+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),a.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")})),(f.matchesSelector=tt.test(y=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ct(function(t){f.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),c.push("!=",H)}),m=m.length&&new RegExp(m.join("|")),c=c.length&&new RegExp(c.join("|")),e=tt.test(a.compareDocumentPosition),v=e||tt.test(a.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},D=e?function(t,e){if(t===e)return u=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!f.sortDetached&&e.compareDocumentPosition(t)===n?t===C||t.ownerDocument===_&&v(_,t)?-1:e===C||e.ownerDocument===_&&v(_,e)?1:l?q(l,t)-q(l,e):0:4&n?-1:1)}:function(t,e){if(t===e)return u=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,s=[t],a=[e];if(!r||!o)return t===C?-1:e===C?1:r?-1:o?1:l?q(l,t)-q(l,e):0;if(r===o)return pt(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?pt(s[i],a[i]):s[i]===_?-1:a[i]===_?1:0}),C},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if((t.ownerDocument||t)!==C&&x(t),f.matchesSelector&&T&&!A[e+" "]&&(!c||!c.test(e))&&(!m||!m.test(e)))try{var n=y.call(t,e);if(n||f.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){A(e,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(it,h),t[3]=(t[3]||t[4]||t[5]||"").replace(it,h),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return K.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&J.test(n)&&(e=d(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(it,h).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=E[t+" "];return e||(e=new RegExp("(^|"+z+")"+t+"("+z+"|$)"))&&E(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(n,i,r){return function(t){var e=at.attr(t,n);return null==e?"!="===i:!i||(e+="","="===i?e===r:"!="===i?e!==r:"^="===i?r&&0===e.indexOf(r):"*="===i?r&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function M(t,n,i){return _(n)?S.grep(t,function(t,e){return!!n.call(t,e,t)!==i}):n.nodeType?S.grep(t,function(t){return t===n!==i}):"string"!=typeof n?S.grep(t,function(t){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||A,"string"!=typeof t)return t.nodeType?(this[0]=t,this.length=1,this):_(t)?void 0!==n.ready?n.ready(t):t(S):S.makeArray(t,this);if(!(i="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:D.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof S?e[0]:e,S.merge(this,S.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:T,!0)),N.test(i[1])&&S.isPlainObject(e))for(i in e)_(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(r=T.getElementById(i[2]))&&(this[0]=r,this.length=1),this}).prototype=S.fn,A=S(T);var P=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function I(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}S.fn.extend({has:function(t){var e=S(t,this),n=e.length;return this.filter(function(){for(var t=0;t\x20\t\r\n\f]*)/i,ft=/^$|^module$|\/(?:java|ecma)script/i,dt={option:[1,""],thead:[1,"","
                "],col:[2,"","
                "],tr:[2,"","
                "],td:[3,"","
                "],_default:[0,"",""]};function gt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&E(t,e)?S.merge([t],n):n}function mt(t,e){for(var n=0,i=t.length;nx",v.noCloneChecked=!!yt.cloneNode(!0).lastChild.defaultValue;var wt=/^key/,xt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ct=/^([^.]*)(?:\.(.+)|)/;function Tt(){return!0}function St(){return!1}function kt(t,e){return t===function(){try{return T.activeElement}catch(t){}}()==("focus"===e)}function Et(t,e,n,i,r,o){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=void 0),e)Et(t,a,n,i,e[a],o);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=St;else if(!r)return t;return 1===o&&(s=r,(r=function(t){return S().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=S.guid++)),t.each(function(){S.event.add(this,e,r,i,n)})}function Nt(t,r,o){o?(G.set(t,r,!1),S.event.add(t,r,{namespace:!1,handler:function(t){var e,n,i=G.get(this,r);if(1&t.isTrigger&&this[r]){if(i.length)(S.event.special[r]||{}).delegateType&&t.stopPropagation();else if(i=a.call(arguments),G.set(this,r,i),e=o(this,r),this[r](),i!==(n=G.get(this,r))||e?G.set(this,r,!1):n={},i!==n)return t.stopImmediatePropagation(),t.preventDefault(),n.value}else i.length&&(G.set(this,r,{value:S.event.trigger(S.extend(i[0],S.Event.prototype),i.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===G.get(t,r)&&S.event.add(t,r,Tt)}S.event={global:{},add:function(e,t,n,i,r){var o,s,a,l,u,c,h,p,f,d,g,m=G.get(e);if(m)for(n.handler&&(n=(o=n).handler,r=o.selector),r&&S.find.matchesSelector(it,r),n.guid||(n.guid=S.guid++),(l=m.events)||(l=m.events={}),(s=m.handle)||(s=m.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(R)||[""]).length;u--;)f=g=(a=Ct.exec(t[u])||[])[1],d=(a[2]||"").split(".").sort(),f&&(h=S.event.special[f]||{},f=(r?h.delegateType:h.bindType)||f,h=S.event.special[f]||{},c=S.extend({type:f,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&S.expr.match.needsContext.test(r),namespace:d.join(".")},o),(p=l[f])||((p=l[f]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,i,d,s)||e.addEventListener&&e.addEventListener(f,s)),h.add&&(h.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[f]=!0)},remove:function(t,e,n,i,r){var o,s,a,l,u,c,h,p,f,d,g,m=G.hasData(t)&&G.get(t);if(m&&(l=m.events)){for(u=(e=(e||"").match(R)||[""]).length;u--;)if(f=g=(a=Ct.exec(e[u])||[])[1],d=(a[2]||"").split(".").sort(),f){for(h=S.event.special[f]||{},p=l[f=(i?h.delegateType:h.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)c=p[o],!r&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,h.remove&&h.remove.call(t,c));s&&!p.length&&(h.teardown&&!1!==h.teardown.call(t,d,m.handle)||S.removeEvent(t,f,m.handle),delete l[f])}else for(f in l)S.event.remove(t,f+e[u],n,i,!0);S.isEmptyObject(l)&&G.remove(t,"handle events")}},dispatch:function(t){var e,n,i,r,o,s,a=S.event.fix(t),l=new Array(arguments.length),u=(G.get(this,"events")||{})[a.type]||[],c=S.event.special[a.type]||{};for(l[0]=a,e=1;e\x20\t\r\n\f]*)[^>]*)\/>/gi,At=/\s*$/g;function Ot(t,e){return E(t,"table")&&E(11!==e.nodeType?e:e.firstChild,"tr")&&S(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Rt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Lt(t,e){var n,i,r,o,s,a,l,u;if(1===e.nodeType){if(G.hasData(t)&&(o=G.access(t),s=G.set(e,o),u=o.events))for(r in delete s.handle,s.events={},u)for(n=0,i=u[r].length;n")},clone:function(t,e,n){var i,r,o,s,a,l,u,c=t.cloneNode(!0),h=rt(t);if(!(v.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||S.isXMLDoc(t)))for(s=gt(c),i=0,r=(o=gt(t)).length;i").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",r=function(t){i.remove(),r=null,t&&e("error"===t.type?404:200,t.type)}),T.head.appendChild(i[0])},abort:function(){r&&r()}}});var en,nn=[],rn=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=nn.pop()||S.expando+"_"+Oe++;return this[t]=!0,t}}),S.ajaxPrefilter("json jsonp",function(t,e,n){var i,r,o,s=!1!==t.jsonp&&(rn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&rn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=_(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(rn,"$1"+i):!1!==t.jsonp&&(t.url+=(Ie.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return o||S.error(i+" was not called"),o[0]},t.dataTypes[0]="json",r=C[i],C[i]=function(){o=arguments},n.always(function(){void 0===r?S(C).removeProp(i):C[i]=r,t[i]&&(t.jsonpCallback=e.jsonpCallback,nn.push(i)),o&&_(r)&&r(o[0]),o=r=void 0}),"script"}),v.createHTMLDocument=((en=T.implementation.createHTMLDocument("").body).innerHTML="
                ",2===en.childNodes.length),S.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(v.createHTMLDocument?((i=(e=T.implementation.createHTMLDocument("")).createElement("base")).href=T.location.href,e.head.appendChild(i)):e=T),o=!n&&[],(r=N.exec(t))?[e.createElement(r[1])]:(r=bt([t],e,o),o&&o.length&&S(o).remove(),S.merge([],r.childNodes)));var i,r,o},S.fn.load=function(t,e,n){var i,r,o,s=this,a=t.indexOf(" ");return-1").append(S.parseHTML(t)).find(i):t)}).always(n&&function(t,e){s.each(function(){n.apply(this,o||[t.responseText,e,t])})}),this},S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){S.fn[e]=function(t){return this.on(e,t)}}),S.expr.pseudos.animated=function(e){return S.grep(S.timers,function(t){return e===t.elem}).length},S.offset={setOffset:function(t,e,n){var i,r,o,s,a,l,u=S.css(t,"position"),c=S(t),h={};"static"===u&&(t.style.position="relative"),a=c.offset(),o=S.css(t,"top"),l=S.css(t,"left"),r=("absolute"===u||"fixed"===u)&&-1<(o+l).indexOf("auto")?(s=(i=c.position()).top,i.left):(s=parseFloat(o)||0,parseFloat(l)||0),_(e)&&(e=e.call(t,n,S.extend({},a))),null!=e.top&&(h.top=e.top-a.top+s),null!=e.left&&(h.left=e.left-a.left+r),"using"in e?e.using.call(t,h):c.css(h)}},S.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){S.offset.setOffset(this,e,t)});var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,i=this[0],r={top:0,left:0};if("fixed"===S.css(i,"position"))e=i.getBoundingClientRect();else{for(e=this.offset(),n=i.ownerDocument,t=i.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===S.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((r=S(t).offset()).top+=S.css(t,"borderTopWidth",!0),r.left+=S.css(t,"borderLeftWidth",!0))}return{top:e.top-r.top-S.css(i,"marginTop",!0),left:e.left-r.left-S.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===S.css(t,"position");)t=t.offsetParent;return t||it})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,r){var o="pageYOffset"===r;S.fn[e]=function(t){return H(this,function(t,e,n){var i;if(g(t)?i=t:9===t.nodeType&&(i=t.defaultView),void 0===n)return i?i[r]:t[e];i?i.scrollTo(o?i.pageXOffset:n,o?n:i.pageYOffset):t[e]=n},e,t,arguments.length)}}),S.each(["top","left"],function(t,n){S.cssHooks[n]=Xt(v.pixelPosition,function(t,e){if(e)return e=Qt(t,n),Vt.test(e)?S(t).position()[n]+"px":e})}),S.each({Height:"height",Width:"width"},function(s,a){S.each({padding:"inner"+s,content:a,"":"outer"+s},function(i,o){S.fn[o]=function(t,e){var n=arguments.length&&(i||"boolean"!=typeof t),r=i||(!0===t||!0===e?"margin":"border");return H(this,function(t,e,n){var i;return g(t)?0===o.indexOf("outer")?t["inner"+s]:t.document.documentElement["client"+s]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+s],i["scroll"+s],t.body["offset"+s],i["offset"+s],i["client"+s])):void 0===n?S.css(t,e,r):S.style(t,e,n,r)},a,n?t:void 0,n)}})}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,n){S.fn[n]=function(t,e){return 0=this.maxSize&&(this.list.remove(i),delete this.hash[i.key],this.size--),(n=this.hash[t])?(n.val=e,this.list.moveToFront(n)):(n=new r(t,e),this.list.add(n),this.hash[t]=n,this.size++)},get:function(t){var e=this.hash[t];if(e)return this.list.moveToFront(e),e.val},reset:function(){this.size=0,this.hash={},this.list=new e}}),h.mixin(e.prototype,{add:function(t){this.head&&(t.next=this.head,this.head.prev=t),this.head=t,this.tail=this.tail||t},remove:function(t){t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev},moveToFront:function(t){this.remove(t),this.add(t)}}),t}(),e=function(){"use strict";var o;try{(o=window.localStorage).setItem("~~~","!"),o.removeItem("~~~")}catch(t){o=null}function t(t,e){this.prefix=["__",t,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+h.escapeRegExChars(this.prefix)),this.ls=e||o,this.ls||this._noop()}return h.mixin(t.prototype,{_prefix:function(t){return this.prefix+t},_ttlKey:function(t){return this._prefix(t)+this.ttlKey},_noop:function(){this.get=this.set=this.remove=this.clear=this.isExpired=h.noop},_safeSet:function(t,e){try{this.ls.setItem(t,e)}catch(t){"QuotaExceededError"===t.name&&(this.clear(),this._noop())}},get:function(t){return this.isExpired(t)&&this.remove(t),n(this.ls.getItem(this._prefix(t)))},set:function(t,e,n){return h.isNumber(n)?this._safeSet(this._ttlKey(t),r(i()+n)):this.ls.removeItem(this._ttlKey(t)),this._safeSet(this._prefix(t),r(e))},remove:function(t){return this.ls.removeItem(this._ttlKey(t)),this.ls.removeItem(this._prefix(t)),this},clear:function(){var t,e=function(t){var e,n,i=[],r=o.length;for(e=0;ee)}}),t;function i(){return(new Date).getTime()}function r(t){return JSON.stringify(h.isUndefined(t)?null:t)}function n(t){return c.parseJSON(t)}}(),r=function(){"use strict";var a=0,l={},u=6,e=new i(10);function t(t){t=t||{},this.cancelled=!1,this.lastReq=null,this._send=t.transport,this._get=t.limiter?t.limiter(this._get):this._get,this._cache=!1===t.cache?new i(0):e}return t.setMaxPendingRequests=function(t){u=t},t.resetCache=function(){e.reset()},h.mixin(t.prototype,{_fingerprint:function(t){return(t=t||{}).url+t.type+c.param(t.data||{})},_get:function(t,e){var n,i,r=this;function o(t){e(null,t),r._cache.set(n,t)}function s(){e(!0)}n=this._fingerprint(t),this.cancelled||n!==this.lastReq||((i=l[n])?i.done(o).fail(s):ae[i]||(r.push(t[n]),n++),i++);return r}(o,r):r}),o?h.map(function(t){for(var e={},n=[],i=0,r=t.length;i',menu:'
                '}}(n),selectors:function(t){var n={};return y.each(t,function(t,e){n[e]="."+t}),n}(n)}).css,html:e.html,classes:e.classes,selectors:e.selectors,mixin:function(t){y.mixin(t,e)}}}}(),v=function(){"use strict";var n;function t(t){t&&t.el||m.error("EventBus initialized without el"),this.$el=m(t.el)}return"typeahead:",n={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},y.mixin(t.prototype,{_trigger:function(t,e){var n;return n=m.Event("typeahead:"+t),(e=e||[]).unshift(n),this.$el.trigger.apply(this.$el,e),n},before:function(t){var e;return e=[].slice.call(arguments,1),this._trigger("before"+t,e).isDefaultPrevented()},trigger:function(t){var e;this._trigger(t,[].slice.call(arguments,1)),(e=n[t])&&this._trigger(e,[].slice.call(arguments,1))}}),t}(),e=function(){"use strict";var s=/\s+/,a=function(){var t;t=window.setImmediate?function(t){o(function(){t()})}:function(t){setTimeout(function(){t()},0)};return t}();return{onSync:function(t,e,n){return i.call(this,"sync",t,e,n)},onAsync:function(t,e,n){return i.call(this,"async",t,e,n)},off:function(t){var e;if(!this._callbacks)return this;t=t.split(s);for(;e=t.shift();)delete this._callbacks[e];return this},trigger:function(t){var e,n,i,r,o;if(!this._callbacks)return this;t=t.split(s),i=[].slice.call(arguments,1);for(;(e=t.shift())&&(n=this._callbacks[e]);)r=l(n.sync,this,[e].concat(i)),o=l(n.async,this,[e].concat(i)),r()&&a(o);return this}};function i(t,e,n,i){var r;if(!n)return this;for(e=e.split(s),n=i?function(t,e){return t.bind?t.bind(e):function(){t.apply(e,[].slice.call(arguments,0))}}(n,i):n,this._callbacks=this._callbacks||{};r=e.shift();)this._callbacks[r]=this._callbacks[r]||{sync:[],async:[]},this._callbacks[r][t].push(n);return this}function l(i,r,o){return function(){for(var t,e=0,n=i.length;!t&&e